From 56daa2cb6cc54e7bc8de013bd7d3fb10b617d9fe Mon Sep 17 00:00:00 2001 From: ltdrobot Date: Mon, 7 Sep 2026 15:04:53 +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-08-24 16:13:15 +0900", "hash": "9cbd578e38a5ef59f9462b61d1e03338b208cba6", "title": "gh-151138: Update Windows temp directory locations in tempfile.rst (#151210)" } } After: { "branch": "main", "commit": { "date": "2026-09-07 16:33:54 +0200", "hash": "1f25c333a280561e86cc0af69af307b53ddbaaac", "title": "gh-156505: Speed up difflib.HtmlDiff for lopsided replacements (GH-156506)" } } 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/34131221333 - Job: https://github.com/localizethedocs/python-docs-l10n/actions/runs/34131221333/job/101776354213 --- main/locale/pot/LC_MESSAGES/c-api/marshal.pot | 60 +- main/locale/pot/LC_MESSAGES/faq/design.pot | 139 +- .../pot/LC_MESSAGES/faq/programming.pot | 5 +- main/locale/pot/LC_MESSAGES/glossary.pot | 4 +- main/locale/pot/LC_MESSAGES/howto/curses.pot | 199 +- .../pot/LC_MESSAGES/library/argparse.pot | 411 +-- main/locale/pot/LC_MESSAGES/library/ast.pot | 6 +- .../pot/LC_MESSAGES/library/asyncio-task.pot | 4 +- .../pot/LC_MESSAGES/library/asyncio-tools.pot | 3 +- .../locale/pot/LC_MESSAGES/library/atexit.pot | 123 +- .../library/concurrent.interpreters.pot | 8 +- .../locale/pot/LC_MESSAGES/library/ctypes.pot | 872 ++--- .../locale/pot/LC_MESSAGES/library/curses.pot | 703 ++-- .../pot/LC_MESSAGES/library/difflib.pot | 244 +- .../pot/LC_MESSAGES/library/doctest.pot | 299 +- .../pot/LC_MESSAGES/library/functions.pot | 915 +++--- .../pot/LC_MESSAGES/library/imaplib.pot | 30 +- .../pot/LC_MESSAGES/library/inspect.pot | 502 +-- .../pot/LC_MESSAGES/library/mimetypes.pot | 83 +- main/locale/pot/LC_MESSAGES/library/os.pot | 60 +- .../pot/LC_MESSAGES/library/pyexpat.pot | 460 +-- main/locale/pot/LC_MESSAGES/library/site.pot | 35 +- .../pot/LC_MESSAGES/library/stdtypes.pot | 2899 +++++++++-------- main/locale/pot/LC_MESSAGES/library/sys.pot | 474 +-- main/locale/pot/LC_MESSAGES/library/test.pot | 579 ++-- .../LC_MESSAGES/library/time-complexity.pot | 664 ++++ .../library/tkinter.fontchooser.pot | 3 +- .../LC_MESSAGES/library/tkinter.systray.pot | 3 +- .../pot/LC_MESSAGES/library/tomllib.pot | 86 +- .../locale/pot/LC_MESSAGES/library/turtle.pot | 1010 +++--- .../pot/LC_MESSAGES/library/unittest.pot | 1011 +++--- .../LC_MESSAGES/library/urllib.request.pot | 195 +- main/locale/pot/LC_MESSAGES/library/venv.pot | 60 +- .../pot/LC_MESSAGES/library/weakref.pot | 92 +- .../LC_MESSAGES/library/xml.dom.minidom.pot | 70 +- .../pot/LC_MESSAGES/library/xml.dom.pot | 1152 +++++-- .../LC_MESSAGES/library/xml.dom.pulldom.pot | 131 +- .../library/xml.etree.elementtree.pot | 368 ++- .../LC_MESSAGES/library/xml.sax.handler.pot | 251 +- .../pot/LC_MESSAGES/library/xml.sax.pot | 82 +- .../LC_MESSAGES/library/xml.sax.reader.pot | 82 +- .../pot/LC_MESSAGES/library/xml.sax.utils.pot | 12 +- .../pot/LC_MESSAGES/reference/expressions.pot | 1130 +++---- .../LC_MESSAGES/tutorial/datastructures.pot | 157 +- .../pot/LC_MESSAGES/tutorial/modules.pot | 23 +- main/locale/pot/LC_MESSAGES/using/windows.pot | 160 +- main/locale/pot/LC_MESSAGES/whatsnew/3.14.pot | 6 +- main/locale/pot/LC_MESSAGES/whatsnew/3.15.pot | 979 +++--- main/locale/pot/LC_MESSAGES/whatsnew/3.16.pot | 532 +-- main/references.json | 6 +- 50 files changed, 9641 insertions(+), 7741 deletions(-) create mode 100644 main/locale/pot/LC_MESSAGES/library/time-complexity.pot diff --git a/main/locale/pot/LC_MESSAGES/c-api/marshal.pot b/main/locale/pot/LC_MESSAGES/c-api/marshal.pot index af7f6cf7fbe..ed6744a0905 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/marshal.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/marshal.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-10 09:04+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -40,73 +40,87 @@ msgid "" "`Python module documentation ` for details." msgstr "" -#: ../../../c-api/marshal.rst:21 +#: ../../../c-api/marshal.rst:19 +msgid "" +"The following exceptions can be raised by these functions: :exc:`ValueError` " +"if the value cannot be marshalled, :exc:`ValueError` or :exc:`TypeError` if " +"the data is malformed, :exc:`EOFError` if the end of the data is reached " +"before the value is complete, :exc:`OSError` if reading from or writing to " +"a :c:expr:`FILE*` fails, :exc:`KeyboardInterrupt` if reading or writing is " +"interrupted by a signal, and :exc:`MemoryError` if memory allocation fails." +msgstr "" + +#: ../../../c-api/marshal.rst:27 +msgid "" +"Previously, in functions taking a :c:expr:`FILE*`, the reading functions " +"raised :exc:`EOFError` instead of :exc:`OSError` and :exc:" +"`KeyboardInterrupt`, and the writing functions ignored I/O errors and " +"interruptions." +msgstr "" + +#: ../../../c-api/marshal.rst:35 msgid "The current format version. See :py:data:`marshal.version`." msgstr "" -#: ../../../c-api/marshal.rst:25 +#: ../../../c-api/marshal.rst:39 msgid "" "Marshal a :c:expr:`long` integer, *value*, to *file*. This will only write " "the least-significant 32 bits of *value*; regardless of the size of the " "native :c:expr:`long` type. *version* indicates the file format." msgstr "" -#: ../../../c-api/marshal.rst:29 ../../../c-api/marshal.rst:37 +#: ../../../c-api/marshal.rst:43 ../../../c-api/marshal.rst:51 msgid "" "This function can fail, in which case it sets the error indicator. Use :c:" "func:`PyErr_Occurred` to check for that." msgstr "" -#: ../../../c-api/marshal.rst:34 +#: ../../../c-api/marshal.rst:48 msgid "" "Marshal a Python object, *value*, to *file*. *version* indicates the file " "format." msgstr "" -#: ../../../c-api/marshal.rst:42 +#: ../../../c-api/marshal.rst:56 msgid "" "Return a bytes object containing the marshalled representation of *value*. " "*version* indicates the file format." msgstr "" -#: ../../../c-api/marshal.rst:46 +#: ../../../c-api/marshal.rst:59 ../../../c-api/marshal.rst:88 +#: ../../../c-api/marshal.rst:101 ../../../c-api/marshal.rst:109 +msgid "On error, raises an exception and returns ``NULL``." +msgstr "" + +#: ../../../c-api/marshal.rst:62 msgid "The following functions allow marshalled values to be read back in." msgstr "" -#: ../../../c-api/marshal.rst:51 +#: ../../../c-api/marshal.rst:67 msgid "" "Return a C :c:expr:`long` from the data stream in a :c:expr:`FILE*` opened " "for reading. Only a 32-bit value can be read in using this function, " "regardless of the native size of :c:expr:`long`." msgstr "" -#: ../../../c-api/marshal.rst:55 ../../../c-api/marshal.rst:65 -msgid "" -"On error, sets the appropriate exception (:exc:`EOFError`) and returns " -"``-1``." +#: ../../../c-api/marshal.rst:71 ../../../c-api/marshal.rst:80 +msgid "On error, raises an exception and returns ``-1``." msgstr "" -#: ../../../c-api/marshal.rst:61 +#: ../../../c-api/marshal.rst:76 msgid "" "Return a C :c:expr:`short` from the data stream in a :c:expr:`FILE*` opened " "for reading. Only a 16-bit value can be read in using this function, " "regardless of the native size of :c:expr:`short`." msgstr "" -#: ../../../c-api/marshal.rst:71 +#: ../../../c-api/marshal.rst:85 msgid "" "Return a Python object from the data stream in a :c:expr:`FILE*` opened for " "reading." msgstr "" -#: ../../../c-api/marshal.rst:74 ../../../c-api/marshal.rst:88 -#: ../../../c-api/marshal.rst:97 -msgid "" -"On error, sets the appropriate exception (:exc:`EOFError`, :exc:`ValueError` " -"or :exc:`TypeError`) and returns ``NULL``." -msgstr "" - -#: ../../../c-api/marshal.rst:80 +#: ../../../c-api/marshal.rst:93 msgid "" "Return a Python object from the data stream in a :c:expr:`FILE*` opened for " "reading. Unlike :c:func:`PyMarshal_ReadObjectFromFile`, this function " @@ -117,7 +131,7 @@ msgid "" "anything else from the file." msgstr "" -#: ../../../c-api/marshal.rst:94 +#: ../../../c-api/marshal.rst:106 msgid "" "Return a Python object from the data stream in a byte buffer containing " "*len* bytes pointed to by *data*." diff --git a/main/locale/pot/LC_MESSAGES/faq/design.pot b/main/locale/pot/LC_MESSAGES/faq/design.pot index 211f9ad0c64..e9ccd57cad3 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: 2026-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -561,11 +561,11 @@ msgid "" "however, that a tuple is only hashable if all of its elements are hashable." msgstr "" -#: ../../../faq/design.rst:434 +#: ../../../faq/design.rst:436 msgid "How are lists implemented in CPython?" msgstr "" -#: ../../../faq/design.rst:436 +#: ../../../faq/design.rst:438 msgid "" "CPython's lists are really variable-length arrays, not Lisp-style linked " "lists. The implementation uses a contiguous array of references to other " @@ -573,13 +573,13 @@ msgid "" "head structure." msgstr "" -#: ../../../faq/design.rst:440 +#: ../../../faq/design.rst:442 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:443 +#: ../../../faq/design.rst:445 msgid "" "When items are appended or inserted, the array of references is resized. " "Some cleverness is applied to improve the performance of appending items " @@ -588,10 +588,15 @@ msgid "" msgstr "" #: ../../../faq/design.rst:450 +msgid "" +"See :ref:`time-complexity` for the costs of the various list operations." +msgstr "" + +#: ../../../faq/design.rst:456 msgid "How are dictionaries implemented in CPython?" msgstr "" -#: ../../../faq/design.rst:452 +#: ../../../faq/design.rst:458 msgid "" "CPython's dictionaries are implemented as resizable hash tables. Compared " "to B-trees, this gives better performance for lookup (the most common " @@ -599,7 +604,7 @@ msgid "" "simpler." msgstr "" -#: ../../../faq/design.rst:456 +#: ../../../faq/design.rst:462 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 " @@ -612,11 +617,17 @@ msgid "" "O notation -- to retrieve a key." msgstr "" -#: ../../../faq/design.rst:467 +#: ../../../faq/design.rst:471 +msgid "" +"See :ref:`time-complexity` for the costs of the various dictionary " +"operations." +msgstr "" + +#: ../../../faq/design.rst:475 msgid "Why must dictionary keys be immutable?" msgstr "" -#: ../../../faq/design.rst:469 +#: ../../../faq/design.rst:477 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 " @@ -629,7 +640,7 @@ msgid "" "would be different." msgstr "" -#: ../../../faq/design.rst:478 +#: ../../../faq/design.rst:486 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 " @@ -637,17 +648,17 @@ msgid "" "dictionary keys." msgstr "" -#: ../../../faq/design.rst:482 +#: ../../../faq/design.rst:490 msgid "Some unacceptable solutions that have been proposed:" msgstr "" -#: ../../../faq/design.rst:484 +#: ../../../faq/design.rst:492 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:490 +#: ../../../faq/design.rst:498 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 " @@ -655,14 +666,14 @@ msgid "" "`is`." msgstr "" -#: ../../../faq/design.rst:494 +#: ../../../faq/design.rst:502 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:498 +#: ../../../faq/design.rst:506 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 " @@ -670,7 +681,7 @@ msgid "" "every value in ``d.keys()`` is usable as a key of the dictionary." msgstr "" -#: ../../../faq/design.rst:503 +#: ../../../faq/design.rst:511 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 " @@ -680,7 +691,7 @@ msgid "" "loop." msgstr "" -#: ../../../faq/design.rst:509 +#: ../../../faq/design.rst:517 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 " @@ -690,14 +701,14 @@ msgid "" "the object is in the dictionary (or other structure). ::" msgstr "" -#: ../../../faq/design.rst:534 +#: ../../../faq/design.rst:542 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:538 +#: ../../../faq/design.rst:546 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__() == " @@ -706,7 +717,7 @@ msgid "" "based structures will misbehave." msgstr "" -#: ../../../faq/design.rst:543 +#: ../../../faq/design.rst:551 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 " @@ -714,11 +725,11 @@ msgid "" "consequences of not meeting them correctly. Consider yourself warned." msgstr "" -#: ../../../faq/design.rst:550 +#: ../../../faq/design.rst:558 msgid "Why doesn't list.sort() return the sorted list?" msgstr "" -#: ../../../faq/design.rst:552 +#: ../../../faq/design.rst:560 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 " @@ -728,7 +739,7 @@ msgid "" "around." msgstr "" -#: ../../../faq/design.rst:558 +#: ../../../faq/design.rst:566 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 " @@ -736,11 +747,11 @@ msgid "" "dictionary in sorted order::" msgstr "" -#: ../../../faq/design.rst:568 +#: ../../../faq/design.rst:576 msgid "How do you specify and enforce an interface spec in Python?" msgstr "" -#: ../../../faq/design.rst:570 +#: ../../../faq/design.rst:578 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 " @@ -748,7 +759,7 @@ msgid "" "helps in the construction of large programs." msgstr "" -#: ../../../faq/design.rst:575 +#: ../../../faq/design.rst:583 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` " @@ -758,13 +769,13 @@ msgid "" "`~collections.abc.MutableMapping`." msgstr "" -#: ../../../faq/design.rst:582 +#: ../../../faq/design.rst:590 msgid "" "For Python, many of the advantages of interface specifications can be " "obtained by an appropriate test discipline for components." msgstr "" -#: ../../../faq/design.rst:585 +#: ../../../faq/design.rst:593 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 " @@ -776,7 +787,7 @@ msgid "" "in a module." msgstr "" -#: ../../../faq/design.rst:593 +#: ../../../faq/design.rst:601 msgid "" "An appropriate testing discipline can help build large complex applications " "in Python as well as having interface specifications would. In fact, it can " @@ -788,7 +799,7 @@ msgid "" "test suite." msgstr "" -#: ../../../faq/design.rst:601 +#: ../../../faq/design.rst:609 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 " @@ -797,11 +808,11 @@ msgid "" "not write test cases at all." msgstr "" -#: ../../../faq/design.rst:609 +#: ../../../faq/design.rst:617 msgid "Why is there no goto?" msgstr "" -#: ../../../faq/design.rst:611 +#: ../../../faq/design.rst:619 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 " @@ -812,7 +823,7 @@ msgid "" "`continue` and :keyword:`break`)." msgstr "" -#: ../../../faq/design.rst:618 +#: ../../../faq/design.rst:626 msgid "" "One can also use exceptions to provide a \"structured goto\" that works even " "across function calls. Many feel that exceptions can conveniently emulate " @@ -820,24 +831,24 @@ msgid "" "other languages. For example::" msgstr "" -#: ../../../faq/design.rst:634 +#: ../../../faq/design.rst:642 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:639 +#: ../../../faq/design.rst:647 msgid "Why can't raw strings (r-strings) end with a backslash?" msgstr "" -#: ../../../faq/design.rst:641 +#: ../../../faq/design.rst:649 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:645 +#: ../../../faq/design.rst:653 msgid "" "Raw strings were designed to ease creating input for processors (chiefly " "regular expression engines) that want to do their own backslash escape " @@ -847,33 +858,33 @@ msgid "" "rules work well when r-strings are used for their intended purpose." msgstr "" -#: ../../../faq/design.rst:652 +#: ../../../faq/design.rst:660 msgid "" "If you're trying to build Windows pathnames, note that all Windows system " "calls accept forward slashes too::" msgstr "" -#: ../../../faq/design.rst:657 +#: ../../../faq/design.rst:665 msgid "" "If you're trying to build a pathname for a DOS command, try e.g. one of ::" msgstr "" -#: ../../../faq/design.rst:665 +#: ../../../faq/design.rst:673 msgid "Why doesn't Python have a \"with\" statement for attribute assignments?" msgstr "" -#: ../../../faq/design.rst:667 +#: ../../../faq/design.rst:675 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:675 +#: ../../../faq/design.rst:683 msgid "In Python, such a construct would be ambiguous." msgstr "" -#: ../../../faq/design.rst:677 +#: ../../../faq/design.rst:685 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 " @@ -881,7 +892,7 @@ msgid "" "*always* knows the scope of every variable at compile time." msgstr "" -#: ../../../faq/design.rst:682 +#: ../../../faq/design.rst:690 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 " @@ -890,11 +901,11 @@ msgid "" "one, or a member attribute?" msgstr "" -#: ../../../faq/design.rst:688 +#: ../../../faq/design.rst:696 msgid "For instance, take the following incomplete snippet::" msgstr "" -#: ../../../faq/design.rst:694 +#: ../../../faq/design.rst:702 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 " @@ -903,36 +914,36 @@ msgid "" "you see, the dynamic nature of Python makes such choices much harder." msgstr "" -#: ../../../faq/design.rst:700 +#: ../../../faq/design.rst:708 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:707 +#: ../../../faq/design.rst:715 msgid "write this::" msgstr "" -#: ../../../faq/design.rst:714 +#: ../../../faq/design.rst:722 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:718 +#: ../../../faq/design.rst:726 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:724 +#: ../../../faq/design.rst:732 msgid "Why don't generators support the with statement?" msgstr "" -#: ../../../faq/design.rst:726 +#: ../../../faq/design.rst:734 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 " @@ -941,28 +952,28 @@ msgid "" "`with` statement." msgstr "" -#: ../../../faq/design.rst:734 +#: ../../../faq/design.rst:742 msgid "Why are colons required for the if/while/def/class statements?" msgstr "" -#: ../../../faq/design.rst:736 +#: ../../../faq/design.rst:744 msgid "" "The colon is required primarily to enhance readability (one of the results " "of the experimental ABC language). Consider this::" msgstr "" -#: ../../../faq/design.rst:742 +#: ../../../faq/design.rst:750 msgid "versus ::" msgstr "" -#: ../../../faq/design.rst:747 +#: ../../../faq/design.rst:755 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:750 +#: ../../../faq/design.rst:758 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 " @@ -970,21 +981,21 @@ msgid "" "the program text." msgstr "" -#: ../../../faq/design.rst:756 +#: ../../../faq/design.rst:764 msgid "Why does Python allow commas at the end of lists and tuples?" msgstr "" -#: ../../../faq/design.rst:758 +#: ../../../faq/design.rst:766 msgid "" "Python lets you add a trailing comma at the end of lists, tuples, and " "dictionaries::" msgstr "" -#: ../../../faq/design.rst:769 +#: ../../../faq/design.rst:777 msgid "There are several reasons to allow this." msgstr "" -#: ../../../faq/design.rst:771 +#: ../../../faq/design.rst:779 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 " @@ -992,20 +1003,20 @@ msgid "" "reordered without creating a syntax error." msgstr "" -#: ../../../faq/design.rst:776 +#: ../../../faq/design.rst:784 msgid "" "Accidentally omitting the comma can lead to errors that are hard to " "diagnose. For example::" msgstr "" -#: ../../../faq/design.rst:786 +#: ../../../faq/design.rst:794 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:789 +#: ../../../faq/design.rst:797 msgid "" "Allowing the trailing comma may also make programmatic code generation " "easier." diff --git a/main/locale/pot/LC_MESSAGES/faq/programming.pot b/main/locale/pot/LC_MESSAGES/faq/programming.pot index 46b44127ea5..0fc57a76c51 100644 --- a/main/locale/pot/LC_MESSAGES/faq/programming.pot +++ b/main/locale/pot/LC_MESSAGES/faq/programming.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-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1254,7 +1254,8 @@ msgid "" ":class:`str` and :class:`bytes` objects are immutable, therefore " "concatenating many strings together is inefficient as each concatenation " "creates a new object. In the general case, the total runtime cost is " -"quadratic in the total string length." +"quadratic in the total string length. See :ref:`time-complexity` for more " +"information." msgstr "" #: ../../../faq/programming.rst:1141 diff --git a/main/locale/pot/LC_MESSAGES/glossary.pot b/main/locale/pot/LC_MESSAGES/glossary.pot index b595ec4a7aa..57ae1354a80 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-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1612,7 +1612,7 @@ msgstr "" msgid "" "A built-in Python :term:`sequence`. Despite its name it is more akin to an " "array in other languages than to a linked list since access to elements is " -"*O*\\ (1)." +"*O*\\ (1). See :ref:`time-complexity`." msgstr "" #: ../../../glossary.rst:946 diff --git a/main/locale/pot/LC_MESSAGES/howto/curses.pot b/main/locale/pot/LC_MESSAGES/howto/curses.pot index 818dc4bd0d7..62ceb3dbe5f 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-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -328,7 +328,7 @@ msgstr "" msgid "Form" msgstr "" -#: ../../../howto/curses.rst:277 ../../../howto/curses.rst:345 +#: ../../../howto/curses.rst:277 ../../../howto/curses.rst:349 msgid "Description" msgstr "" @@ -377,28 +377,30 @@ msgstr "" #: ../../../howto/curses.rst:298 msgid "" -"The :meth:`~curses.window.addstr` method takes a Python string or bytestring " -"as the value to be displayed. The contents of bytestrings are sent to the " -"terminal as-is. Strings are encoded to bytes using the value of the " -"window's :attr:`~window.encoding` attribute; this defaults to the default " -"system encoding as returned by :func:`locale.getencoding`." +"The :meth:`~curses.window.addstr` method takes a Python string, bytestring " +"or :class:`~curses.complexstr` as the value to be displayed. The contents " +"of bytestrings are sent to the terminal as-is. On a build without wide-" +"character support strings are encoded using the value of the window's :attr:" +"`~window.encoding` attribute; this defaults to the default system encoding " +"as returned by :func:`locale.getencoding`." msgstr "" -#: ../../../howto/curses.rst:304 +#: ../../../howto/curses.rst:306 msgid "" "The :meth:`~curses.window.addch` methods take a character, which can be " -"either a string of length 1, a bytestring of length 1, or an integer." +"either a string of length 1, a bytestring of length 1, an integer, or a :" +"class:`~curses.complexchar`." msgstr "" -#: ../../../howto/curses.rst:307 +#: ../../../howto/curses.rst:310 msgid "" -"Constants are provided for extension characters; these constants are " -"integers greater than 255. For example, :const:`ACS_PLMINUS` is a +/- " -"symbol, and :const:`ACS_ULCORNER` is the upper left corner of a box (handy " -"for drawing borders). You can also use the appropriate Unicode character." +"Constants are provided for the characters of the terminal's alternate " +"character set. For example, :const:`ACS_PLMINUS` is a +/- symbol, and :const:" +"`ACS_ULCORNER` is the upper left corner of a box (handy for drawing " +"borders). You can also use the appropriate Unicode character." msgstr "" -#: ../../../howto/curses.rst:313 +#: ../../../howto/curses.rst:317 msgid "" "Windows remember where the cursor was left after the last operation, so if " "you leave out the *y,x* coordinates, the string or character will be " @@ -409,21 +411,20 @@ msgid "" "cursor blinking at some apparently random location." msgstr "" -#: ../../../howto/curses.rst:321 +#: ../../../howto/curses.rst:325 msgid "" "If your application doesn't need a blinking cursor at all, you can call " -"``curs_set(False)`` to make it invisible. For compatibility with older " -"curses versions, there's a ``leaveok(bool)`` function that's a synonym for :" -"func:`~curses.curs_set`. When *bool* is true, the curses library will " -"attempt to suppress the flashing cursor, and you won't need to worry about " -"leaving it in odd locations." +"``curs_set(False)`` to make it invisible. The window method :meth:`~curses." +"window.leaveok` does something different: when its argument is true, curses " +"leaves the cursor wherever the last update put it, instead of moving it back " +"to the window's cursor position." msgstr "" -#: ../../../howto/curses.rst:330 +#: ../../../howto/curses.rst:334 msgid "Attributes and Color" msgstr "" -#: ../../../howto/curses.rst:332 +#: ../../../howto/curses.rst:336 msgid "" "Characters can be displayed in different ways. Status lines in a text-based " "application are commonly shown in reverse video, or a text viewer may need " @@ -431,7 +432,7 @@ msgid "" "an attribute for each cell on the screen." msgstr "" -#: ../../../howto/curses.rst:337 +#: ../../../howto/curses.rst:341 msgid "" "An attribute is an integer, each bit representing a different attribute. " "You can try to display text with multiple attribute bits set, but curses " @@ -441,72 +442,81 @@ msgid "" "attributes, listed here." msgstr "" -#: ../../../howto/curses.rst:345 +#: ../../../howto/curses.rst:349 msgid "Attribute" msgstr "" -#: ../../../howto/curses.rst:347 +#: ../../../howto/curses.rst:351 msgid ":const:`A_BLINK`" msgstr "" -#: ../../../howto/curses.rst:347 +#: ../../../howto/curses.rst:351 msgid "Blinking text" msgstr "" -#: ../../../howto/curses.rst:349 +#: ../../../howto/curses.rst:353 msgid ":const:`A_BOLD`" msgstr "" -#: ../../../howto/curses.rst:349 +#: ../../../howto/curses.rst:353 msgid "Extra bright or bold text" msgstr "" -#: ../../../howto/curses.rst:351 +#: ../../../howto/curses.rst:355 msgid ":const:`A_DIM`" msgstr "" -#: ../../../howto/curses.rst:351 +#: ../../../howto/curses.rst:355 msgid "Half bright text" msgstr "" -#: ../../../howto/curses.rst:353 +#: ../../../howto/curses.rst:357 msgid ":const:`A_REVERSE`" msgstr "" -#: ../../../howto/curses.rst:353 +#: ../../../howto/curses.rst:357 msgid "Reverse-video text" msgstr "" -#: ../../../howto/curses.rst:355 +#: ../../../howto/curses.rst:359 msgid ":const:`A_STANDOUT`" msgstr "" -#: ../../../howto/curses.rst:355 +#: ../../../howto/curses.rst:359 msgid "The best highlighting mode available" msgstr "" -#: ../../../howto/curses.rst:357 +#: ../../../howto/curses.rst:361 msgid ":const:`A_UNDERLINE`" msgstr "" -#: ../../../howto/curses.rst:357 +#: ../../../howto/curses.rst:361 msgid "Underlined text" msgstr "" -#: ../../../howto/curses.rst:360 +#: ../../../howto/curses.rst:364 msgid "" "So, to display a reverse-video status line on the top line of the screen, " "you could code::" msgstr "" -#: ../../../howto/curses.rst:367 +#: ../../../howto/curses.rst:371 +msgid "" +"A :class:`~curses.complexchar` carries its attributes and color pair " +"together with the text of one character cell, and a :class:`~curses." +"complexstr` is a run of such cells. They are what :meth:`~curses.window." +"in_wch` and :meth:`~curses.window.in_wchstr` return, so a part of the screen " +"can be read and written back with its appearance intact." +msgstr "" + +#: ../../../howto/curses.rst:379 msgid "" "The curses library also supports color on those terminals that provide it. " "The most common such terminal is probably the Linux console, followed by " "color xterms." msgstr "" -#: ../../../howto/curses.rst:371 +#: ../../../howto/curses.rst:383 msgid "" "To use color, you must call the :func:`~curses.start_color` function soon " "after calling :func:`~curses.initscr`, to initialize the default color set " @@ -518,7 +528,7 @@ msgid "" "for the sake of these functions.)" msgstr "" -#: ../../../howto/curses.rst:381 +#: ../../../howto/curses.rst:393 msgid "" "The curses library maintains a finite number of color pairs, containing a " "foreground (or text) color and a background color. You can get the " @@ -528,11 +538,11 @@ msgid "" "work on all terminals." msgstr "" -#: ../../../howto/curses.rst:388 +#: ../../../howto/curses.rst:400 msgid "An example, which displays a line of text using color pair 1::" msgstr "" -#: ../../../howto/curses.rst:393 +#: ../../../howto/curses.rst:405 msgid "" "As I said before, a color pair consists of a foreground and background " "color. The ``init_pair(n, f, b)`` function changes the definition of color " @@ -540,7 +550,7 @@ msgid "" "hard-wired to white on black, and cannot be changed." msgstr "" -#: ../../../howto/curses.rst:398 +#: ../../../howto/curses.rst:410 msgid "" "Colors are numbered, and :func:`start_color` initializes 8 basic colors when " "it activates color mode. They are: 0:black, 1:red, 2:green, 3:yellow, 4:" @@ -549,20 +559,20 @@ msgid "" "const:`curses.COLOR_RED`, and so forth." msgstr "" -#: ../../../howto/curses.rst:404 +#: ../../../howto/curses.rst:416 msgid "" "Let's put all this together. To change color 1 to red text on a white " "background, you would call::" msgstr "" -#: ../../../howto/curses.rst:409 +#: ../../../howto/curses.rst:421 msgid "" "When you change a color pair, any text already displayed using that color " "pair will change to the new colors. You can also display new text in this " "color with::" msgstr "" -#: ../../../howto/curses.rst:415 +#: ../../../howto/curses.rst:427 msgid "" "Very fancy terminals can change the definitions of the actual colors to a " "given RGB value. This lets you change color 1, which is usually red, to " @@ -574,60 +584,66 @@ msgid "" "your system's man pages for more information." msgstr "" -#: ../../../howto/curses.rst:426 +#: ../../../howto/curses.rst:438 msgid "User Input" msgstr "" -#: ../../../howto/curses.rst:428 +#: ../../../howto/curses.rst:440 msgid "" "The C curses library offers only very simple input mechanisms. Python's :mod:" "`curses` module adds a basic text-input widget. (Other libraries such as :" "pypi:`Urwid` have more extensive collections of widgets.)" msgstr "" -#: ../../../howto/curses.rst:432 -msgid "There are two methods for getting input from a window:" +#: ../../../howto/curses.rst:444 +msgid "There are three methods for getting input from a window:" msgstr "" -#: ../../../howto/curses.rst:434 +#: ../../../howto/curses.rst:446 msgid "" -":meth:`~curses.window.getch` refreshes the screen and then waits for the " +":meth:`~curses.window.get_wch` refreshes the screen and then waits for the " "user to hit a key, displaying the key if :func:`~curses.echo` has been " "called earlier. You can optionally specify a coordinate to which the cursor " "should be moved before pausing." msgstr "" -#: ../../../howto/curses.rst:439 +#: ../../../howto/curses.rst:451 msgid "" -":meth:`~curses.window.getkey` does the same thing but converts the integer " -"to a string. Individual characters are returned as 1-character strings, and " -"special keys such as function keys return longer strings containing a key " -"name such as ``KEY_UP`` or ``^G``." +":meth:`~curses.window.getch` does the same thing but returns the code of the " +"key instead of a character. With ncurses this is a single byte of the key's " +"encoding in the current locale, so a character encoded with several bytes " +"takes several calls, one byte per call." msgstr "" -#: ../../../howto/curses.rst:444 +#: ../../../howto/curses.rst:457 +msgid "" +":meth:`~curses.window.getkey` does the same as :meth:`!getch` but returns a " +"string: an ordinary key as a 1-character string, and a special key as its " +"name, such as ``KEY_UP``." +msgstr "" + +#: ../../../howto/curses.rst:462 msgid "" "It's possible to not wait for the user using the :meth:`~curses.window." -"nodelay` window method. After ``nodelay(True)``, :meth:`!getch` and :meth:`!" -"getkey` for the window become non-blocking. To signal that no input is " -"ready, :meth:`!getch` returns ``curses.ERR`` (a value of -1) and :meth:`!" -"getkey` raises an exception. There's also a :func:`~curses.halfdelay` " -"function, which can be used to (in effect) set a timer on each :meth:`!" -"getch`; if no input becomes available within a specified delay (measured in " -"tenths of a second), curses raises an exception." +"nodelay` window method. After ``nodelay(True)``, the reads for the window " +"become non-blocking. To signal that no input is ready, :meth:`!get_wch` and :" +"meth:`!getkey` raise an exception, and :meth:`!getch` returns ``-1``. " +"There's also a :func:`~curses.halfdelay` function, which can be used to (in " +"effect) set a timer on each read; if no input becomes available within a " +"specified delay (measured in tenths of a second), the read fails the same " +"way." msgstr "" -#: ../../../howto/curses.rst:454 +#: ../../../howto/curses.rst:473 msgid "" -"The :meth:`!getch` method returns an integer; if it's between 0 and 255, it " -"represents the ASCII code of the key pressed. Values greater than 255 are " -"special keys such as Page Up, Home, or the cursor keys. You can compare the " -"value returned to constants such as :const:`curses.KEY_PPAGE`, :const:" -"`curses.KEY_HOME`, or :const:`curses.KEY_LEFT`. The main loop of your " -"program may look something like this::" +"Special keys such as Page Up, Home, or the cursor keys are returned by all " +"three as one of the :ref:`KEY_* constants `, all " +"larger than 255. You can compare the value returned to constants such as :" +"const:`curses.KEY_PPAGE`, :const:`curses.KEY_HOME`, or :const:`curses." +"KEY_LEFT`. The main loop of your program may look something like this::" msgstr "" -#: ../../../howto/curses.rst:470 +#: ../../../howto/curses.rst:490 msgid "" "The :mod:`curses.ascii` module supplies ASCII class membership functions " "that take either integer or 1-character string arguments; these may be " @@ -637,16 +653,17 @@ msgid "" "returns the control character corresponding to its argument." msgstr "" -#: ../../../howto/curses.rst:477 +#: ../../../howto/curses.rst:497 msgid "" -"There's also a method to retrieve an entire string, :meth:`~curses.window." -"getstr`. It isn't used very often, because its functionality is quite " -"limited; the only editing keys available are the backspace key and the Enter " -"key, which terminates the string. It can optionally be limited to a fixed " -"number of characters. ::" +"There's also a method to retrieve an entire line, :meth:`~curses.window." +"get_wstr`. It isn't used very often, because its functionality is quite " +"limited; the only editing keys available are the erase and kill characters, " +"and the Enter key, which terminates the line. It can optionally be limited " +"to a fixed number of characters; :meth:`~curses.window.getstr` returns a " +"bytes object instead. ::" msgstr "" -#: ../../../howto/curses.rst:488 +#: ../../../howto/curses.rst:509 msgid "" "The :mod:`curses.textpad` module supplies a text box that supports an Emacs-" "like set of keybindings. Various methods of the :class:`~curses.textpad." @@ -654,16 +671,16 @@ msgid "" "results either with or without trailing spaces. Here's an example::" msgstr "" -#: ../../../howto/curses.rst:512 +#: ../../../howto/curses.rst:533 msgid "" "See the library documentation on :mod:`curses.textpad` for more details." msgstr "" -#: ../../../howto/curses.rst:516 +#: ../../../howto/curses.rst:537 msgid "For More Information" msgstr "" -#: ../../../howto/curses.rst:518 +#: ../../../howto/curses.rst:539 msgid "" "This HOWTO doesn't cover some advanced topics, such as reading the contents " "of the screen or capturing mouse events from an xterm instance, but the " @@ -671,7 +688,7 @@ msgid "" "complete. You should browse it next." msgstr "" -#: ../../../howto/curses.rst:523 +#: ../../../howto/curses.rst:544 msgid "" "If you're in doubt about the detailed behavior of the curses functions, " "consult the manual pages for your curses implementation, whether it's " @@ -680,7 +697,7 @@ msgid "" "ref:`ACS_\\* ` characters available to you." msgstr "" -#: ../../../howto/curses.rst:530 +#: ../../../howto/curses.rst:551 msgid "" "Because the curses API is so large, some functions aren't supported in the " "Python interface. Often this isn't because they're difficult to implement, " @@ -690,29 +707,29 @@ msgid "" "org/>`_ to learn more about submitting patches to Python." msgstr "" -#: ../../../howto/curses.rst:538 +#: ../../../howto/curses.rst:559 msgid "" "`Writing Programs with NCURSES `_: a lengthy tutorial for C programmers." msgstr "" -#: ../../../howto/curses.rst:540 +#: ../../../howto/curses.rst:561 msgid "`The ncurses man page `_" msgstr "" -#: ../../../howto/curses.rst:541 +#: ../../../howto/curses.rst:562 msgid "" "`The ncurses FAQ `_" msgstr "" -#: ../../../howto/curses.rst:542 +#: ../../../howto/curses.rst:563 msgid "" "`\"Use curses... don't swear\" `_: video of a PyCon 2013 talk on controlling terminals using " "curses or Urwid." msgstr "" -#: ../../../howto/curses.rst:544 +#: ../../../howto/curses.rst:565 msgid "" "`\"Console Applications with Urwid\" `_: video of a PyCon CA 2012 talk demonstrating some " diff --git a/main/locale/pot/LC_MESSAGES/library/argparse.pot b/main/locale/pot/LC_MESSAGES/library/argparse.pot index ea6be141077..c73b7f12107 100644 --- a/main/locale/pot/LC_MESSAGES/library/argparse.pot +++ b/main/locale/pot/LC_MESSAGES/library/argparse.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -806,10 +806,13 @@ msgid "" msgstr "" #: ../../../library/argparse.rst:838 -msgid "Note, the *default* will be ``None`` unless explicitly set to *0*." +msgid "" +"Unless explicitly set, the *default* will be ``None``. If the default value " +"is a non-zero number, the count starts from that number rather than from " +"zero." msgstr "" -#: ../../../library/argparse.rst:840 +#: ../../../library/argparse.rst:842 msgid "" "``'help'`` - This prints a complete help message for all the options in the " "current parser and then exits. By default a help action is automatically " @@ -817,14 +820,14 @@ msgid "" "output is created." msgstr "" -#: ../../../library/argparse.rst:845 +#: ../../../library/argparse.rst:847 msgid "" "``'version'`` - This expects a ``version=`` keyword argument in the :meth:" "`~ArgumentParser.add_argument` call, and prints version information and " "exits when invoked::" msgstr "" -#: ../../../library/argparse.rst:855 +#: ../../../library/argparse.rst:857 msgid "" "You may also specify an arbitrary action by passing an :class:`Action` " "subclass (e.g. :class:`BooleanOptionalAction`) or other object that " @@ -833,7 +836,7 @@ msgid "" "with non-zero ``nargs``) can be used with positional arguments." msgstr "" -#: ../../../library/argparse.rst:861 +#: ../../../library/argparse.rst:863 msgid "" "The recommended way to create a custom action is to extend :class:`Action`, " "overriding the :meth:`!__call__` method and optionally the :meth:`!__init__` " @@ -842,19 +845,19 @@ msgid "" "their registered name." msgstr "" -#: ../../../library/argparse.rst:866 +#: ../../../library/argparse.rst:868 msgid "An example of a custom action::" msgstr "" -#: ../../../library/argparse.rst:886 +#: ../../../library/argparse.rst:888 msgid "For more details, see :class:`Action`." msgstr "" -#: ../../../library/argparse.rst:892 +#: ../../../library/argparse.rst:894 msgid "nargs" msgstr "" -#: ../../../library/argparse.rst:894 +#: ../../../library/argparse.rst:896 msgid "" ":class:`ArgumentParser` objects usually associate a single command-line " "argument with a single action to be taken. The ``nargs`` keyword argument " @@ -863,19 +866,19 @@ msgid "" "are:" msgstr "" -#: ../../../library/argparse.rst:899 +#: ../../../library/argparse.rst:901 msgid "" "``N`` (an integer). ``N`` arguments from the command line will be gathered " "together into a list. For example::" msgstr "" -#: ../../../library/argparse.rst:908 +#: ../../../library/argparse.rst:910 msgid "" "Note that ``nargs=1`` produces a list of one item. This is different from " "the default, in which the item is produced by itself." msgstr "" -#: ../../../library/argparse.rst:913 +#: ../../../library/argparse.rst:915 msgid "" "``'?'``. One argument will be consumed from the command line if possible, " "and produced as a single item. If no command-line argument is present, the " @@ -885,13 +888,13 @@ msgid "" "produced. Some examples to illustrate this::" msgstr "" -#: ../../../library/argparse.rst:930 +#: ../../../library/argparse.rst:932 msgid "" "One of the more common uses of ``nargs='?'`` is to allow optional input and " "output files::" msgstr "" -#: ../../../library/argparse.rst:945 +#: ../../../library/argparse.rst:947 msgid "" "``'*'``. All command-line arguments present are gathered into a list. Note " "that it generally doesn't make much sense to have more than one positional " @@ -899,14 +902,14 @@ msgid "" "``nargs='*'`` is possible. For example::" msgstr "" -#: ../../../library/argparse.rst:959 +#: ../../../library/argparse.rst:961 msgid "" "``'+'``. Just like ``'*'``, all command-line arguments present are gathered " "into a list. Additionally, an error message will be generated if there " "wasn't at least one command-line argument present. For example::" msgstr "" -#: ../../../library/argparse.rst:971 +#: ../../../library/argparse.rst:973 msgid "" "If the ``nargs`` keyword argument is not provided, the number of arguments " "consumed is determined by the action_. Generally this means a single " @@ -915,11 +918,11 @@ msgid "" "``'store_const'``) set ``nargs=0``." msgstr "" -#: ../../../library/argparse.rst:981 +#: ../../../library/argparse.rst:983 msgid "const" msgstr "" -#: ../../../library/argparse.rst:983 +#: ../../../library/argparse.rst:985 msgid "" "The ``const`` argument of :meth:`~ArgumentParser.add_argument` is used to " "hold constant values that are not read from the command line but are " @@ -927,7 +930,7 @@ msgid "" "common uses of it are:" msgstr "" -#: ../../../library/argparse.rst:987 +#: ../../../library/argparse.rst:989 msgid "" "When :meth:`~ArgumentParser.add_argument` is called with " "``action='store_const'`` or ``action='append_const'``. These actions add " @@ -937,7 +940,7 @@ msgid "" "receive a default value of ``None``." msgstr "" -#: ../../../library/argparse.rst:995 +#: ../../../library/argparse.rst:997 msgid "" "When :meth:`~ArgumentParser.add_argument` is called with option strings " "(like ``-f`` or ``--foo``) and ``nargs='?'``. This creates an optional " @@ -947,17 +950,17 @@ msgid "" "See the nargs_ description for examples." msgstr "" -#: ../../../library/argparse.rst:1002 +#: ../../../library/argparse.rst:1004 msgid "" "``const=None`` by default, including when ``action='append_const'`` or " "``action='store_const'``." msgstr "" -#: ../../../library/argparse.rst:1009 +#: ../../../library/argparse.rst:1011 msgid "default" msgstr "" -#: ../../../library/argparse.rst:1011 +#: ../../../library/argparse.rst:1013 msgid "" "All optional arguments and some positional arguments may be omitted at the " "command line. The ``default`` keyword argument of :meth:`~ArgumentParser." @@ -967,13 +970,13 @@ msgid "" "command line::" msgstr "" -#: ../../../library/argparse.rst:1025 +#: ../../../library/argparse.rst:1027 msgid "" "If the target namespace already has an attribute set, the action *default* " "will not overwrite it::" msgstr "" -#: ../../../library/argparse.rst:1033 +#: ../../../library/argparse.rst:1035 msgid "" "If the ``default`` value is a string, the parser parses the value as if it " "were a command-line argument. In particular, the parser applies any type_ " @@ -981,37 +984,37 @@ msgid "" "`Namespace` return value. Otherwise, the parser uses the value as is::" msgstr "" -#: ../../../library/argparse.rst:1044 +#: ../../../library/argparse.rst:1046 msgid "" "For positional arguments with nargs_ equal to ``?`` or ``*``, the " "``default`` value is used when no command-line argument was present::" msgstr "" -#: ../../../library/argparse.rst:1054 +#: ../../../library/argparse.rst:1056 msgid "" "Because ``nargs='*'`` gathers any supplied values into a list, an absent " "positional argument yields an empty list (``[]``). Only a non-``None`` " "*default* overrides this (so ``default=None`` still gives ``[]``)." msgstr "" -#: ../../../library/argparse.rst:1058 +#: ../../../library/argparse.rst:1060 msgid "" "For required_ arguments, the ``default`` value is ignored. For example, this " "applies to positional arguments with nargs_ values other than ``?`` or " "``*``, or optional arguments marked as ``required=True``." msgstr "" -#: ../../../library/argparse.rst:1062 +#: ../../../library/argparse.rst:1064 msgid "" "Providing ``default=argparse.SUPPRESS`` causes no attribute to be added if " "the command-line argument was not present::" msgstr "" -#: ../../../library/argparse.rst:1076 +#: ../../../library/argparse.rst:1078 msgid "type" msgstr "" -#: ../../../library/argparse.rst:1078 +#: ../../../library/argparse.rst:1080 msgid "" "By default, the parser reads command-line arguments in as simple strings. " "However, quite often the command-line string should instead be interpreted " @@ -1020,13 +1023,13 @@ msgid "" "checking and type conversions to be performed." msgstr "" -#: ../../../library/argparse.rst:1084 +#: ../../../library/argparse.rst:1086 msgid "" "If the type_ keyword is used with the default_ keyword, the type converter " "is only applied if the default is a string." msgstr "" -#: ../../../library/argparse.rst:1087 +#: ../../../library/argparse.rst:1089 msgid "" "The argument to ``type`` can be a callable that accepts a single string or " "the name of a registered type (see :meth:`~ArgumentParser.register`) If the " @@ -1035,28 +1038,28 @@ msgid "" "is displayed. Other exception types are not handled." msgstr "" -#: ../../../library/argparse.rst:1093 +#: ../../../library/argparse.rst:1095 msgid "Common built-in types and functions can be used as type converters:" msgstr "" -#: ../../../library/argparse.rst:1107 +#: ../../../library/argparse.rst:1109 msgid "User defined functions can be used as well:" msgstr "" -#: ../../../library/argparse.rst:1119 +#: ../../../library/argparse.rst:1121 msgid "" "The :func:`bool` function is not recommended as a type converter. All it " "does is convert empty strings to ``False`` and non-empty strings to " "``True``. This is usually not what is desired::" msgstr "" -#: ../../../library/argparse.rst:1128 +#: ../../../library/argparse.rst:1130 msgid "" "See :class:`BooleanOptionalAction` or ``action='store_true'`` for common " "alternatives." msgstr "" -#: ../../../library/argparse.rst:1131 +#: ../../../library/argparse.rst:1133 msgid "" "In general, the ``type`` keyword is a convenience that should only be used " "for simple conversions that can only raise one of the three supported " @@ -1064,7 +1067,7 @@ msgid "" "management should be done downstream after the arguments are parsed." msgstr "" -#: ../../../library/argparse.rst:1136 +#: ../../../library/argparse.rst:1138 msgid "" "For example, JSON or YAML conversions have complex error cases that require " "better reporting than can be given by the ``type`` keyword. A :exc:`~json." @@ -1072,7 +1075,7 @@ msgid "" "exception would not be handled at all." msgstr "" -#: ../../../library/argparse.rst:1141 +#: ../../../library/argparse.rst:1143 msgid "" "Even :class:`~argparse.FileType` has its limitations for use with the " "``type`` keyword. If one argument uses :class:`~argparse.FileType` and then " @@ -1082,17 +1085,17 @@ msgid "" "files." msgstr "" -#: ../../../library/argparse.rst:1148 +#: ../../../library/argparse.rst:1150 msgid "" "For type checkers that simply check against a fixed set of values, consider " "using the choices_ keyword instead." msgstr "" -#: ../../../library/argparse.rst:1155 +#: ../../../library/argparse.rst:1157 msgid "choices" msgstr "" -#: ../../../library/argparse.rst:1157 +#: ../../../library/argparse.rst:1159 msgid "" "Some command-line arguments should be selected from a restricted set of " "values. These can be handled by passing a sequence object as the *choices* " @@ -1101,33 +1104,33 @@ msgid "" "be displayed if the argument was not one of the acceptable values::" msgstr "" -#: ../../../library/argparse.rst:1172 +#: ../../../library/argparse.rst:1174 msgid "" "Any sequence can be passed as the *choices* value, so :class:`list` " "objects, :class:`tuple` objects, and custom sequences are all supported." msgstr "" -#: ../../../library/argparse.rst:1175 +#: ../../../library/argparse.rst:1177 msgid "" "Use of :class:`enum.Enum` is not recommended because it is difficult to " "control its appearance in usage, help, and error messages." msgstr "" -#: ../../../library/argparse.rst:1178 +#: ../../../library/argparse.rst:1180 msgid "" "Note that *choices* are checked after any type_ conversions have been " "performed, so objects in *choices* should match the type_ specified. This " "can make *choices* appear unfamiliar in usage, help, or error messages." msgstr "" -#: ../../../library/argparse.rst:1183 +#: ../../../library/argparse.rst:1185 msgid "" "To keep *choices* user-friendly, consider a custom type wrapper that " "converts and formats values, or omit type_ and handle conversion in your " "application code." msgstr "" -#: ../../../library/argparse.rst:1187 +#: ../../../library/argparse.rst:1189 msgid "" "Formatted choices override the default *metavar* which is normally derived " "from *dest*. This is usually what you want because the user never sees the " @@ -1135,11 +1138,11 @@ msgid "" "are many choices), just specify an explicit metavar_." msgstr "" -#: ../../../library/argparse.rst:1196 +#: ../../../library/argparse.rst:1198 msgid "required" msgstr "" -#: ../../../library/argparse.rst:1198 +#: ../../../library/argparse.rst:1200 msgid "" "In general, the :mod:`!argparse` module assumes that flags like ``-f`` and " "``--bar`` indicate *optional* arguments, which can always be omitted at the " @@ -1147,24 +1150,24 @@ msgid "" "the ``required=`` keyword argument to :meth:`~ArgumentParser.add_argument`::" msgstr "" -#: ../../../library/argparse.rst:1211 +#: ../../../library/argparse.rst:1213 msgid "" "As the example shows, if an option is marked as ``required``, :meth:" "`~ArgumentParser.parse_args` will report an error if that option is not " "present at the command line." msgstr "" -#: ../../../library/argparse.rst:1217 +#: ../../../library/argparse.rst:1219 msgid "" "Required options are generally considered bad form because users expect " "*options* to be *optional*, and thus they should be avoided when possible." msgstr "" -#: ../../../library/argparse.rst:1224 +#: ../../../library/argparse.rst:1226 msgid "help" msgstr "" -#: ../../../library/argparse.rst:1226 +#: ../../../library/argparse.rst:1228 msgid "" "The ``help`` value is a string containing a brief description of the " "argument. When a user requests help (usually by using ``-h`` or ``--help`` " @@ -1172,7 +1175,7 @@ msgid "" "each argument." msgstr "" -#: ../../../library/argparse.rst:1231 +#: ../../../library/argparse.rst:1233 msgid "" "The ``help`` strings can include various format specifiers to avoid " "repetition of things like the program name or the argument default_. The " @@ -1181,23 +1184,23 @@ msgid "" "``%(type)s``, etc.::" msgstr "" -#: ../../../library/argparse.rst:1248 +#: ../../../library/argparse.rst:1250 msgid "" "As the help string supports %-formatting, if you want a literal ``%`` to " "appear in the help string, you must escape it as ``%%``." msgstr "" -#: ../../../library/argparse.rst:1251 +#: ../../../library/argparse.rst:1253 msgid "" ":mod:`!argparse` supports silencing the help entry for certain options, by " "setting the ``help`` value to ``argparse.SUPPRESS``::" msgstr "" -#: ../../../library/argparse.rst:1266 +#: ../../../library/argparse.rst:1268 msgid "metavar" msgstr "" -#: ../../../library/argparse.rst:1268 +#: ../../../library/argparse.rst:1270 msgid "" "When :class:`ArgumentParser` generates help messages, it needs some way to " "refer to each expected argument. By default, :class:`!ArgumentParser` " @@ -1209,29 +1212,29 @@ msgid "" "command-line argument will be referred to as ``FOO``. An example::" msgstr "" -#: ../../../library/argparse.rst:1292 +#: ../../../library/argparse.rst:1294 msgid "An alternative name can be specified with ``metavar``::" msgstr "" -#: ../../../library/argparse.rst:1309 +#: ../../../library/argparse.rst:1311 msgid "" "Note that ``metavar`` only changes the *displayed* name - the name of the " "attribute on the :meth:`~ArgumentParser.parse_args` object is still " "determined by the dest_ value." msgstr "" -#: ../../../library/argparse.rst:1313 +#: ../../../library/argparse.rst:1315 msgid "" "Different values of ``nargs`` may cause the metavar to be used multiple " "times. Providing a tuple to ``metavar`` specifies a different display for " "each of the arguments::" msgstr "" -#: ../../../library/argparse.rst:1332 +#: ../../../library/argparse.rst:1334 msgid "dest" msgstr "" -#: ../../../library/argparse.rst:1334 +#: ../../../library/argparse.rst:1336 msgid "" "Most :class:`ArgumentParser` actions add some value as an attribute of the " "object returned by :meth:`~ArgumentParser.parse_args`. The name of this " @@ -1241,7 +1244,7 @@ msgid "" "add_argument`::" msgstr "" -#: ../../../library/argparse.rst:1346 +#: ../../../library/argparse.rst:1348 msgid "" "For optional argument actions, the value of ``dest`` is normally inferred " "from the option strings. :class:`ArgumentParser` generates the value of " @@ -1255,11 +1258,11 @@ msgid "" "a valid attribute name. The examples below illustrate this behavior::" msgstr "" -#: ../../../library/argparse.rst:1368 +#: ../../../library/argparse.rst:1370 msgid "``dest`` allows a custom attribute name to be provided::" msgstr "" -#: ../../../library/argparse.rst:1375 +#: ../../../library/argparse.rst:1377 msgid "" "Multiple arguments may share the same ``dest``. By default, the value from " "the last such argument given on the command line wins. Use " @@ -1268,15 +1271,15 @@ msgid "" "conflict_handler_." msgstr "" -#: ../../../library/argparse.rst:1380 +#: ../../../library/argparse.rst:1382 msgid "Single-dash long option now takes precedence over short options." msgstr "" -#: ../../../library/argparse.rst:1387 +#: ../../../library/argparse.rst:1389 msgid "deprecated" msgstr "" -#: ../../../library/argparse.rst:1389 +#: ../../../library/argparse.rst:1391 msgid "" "During a project's lifetime, some arguments may need to be removed from the " "command line. Before removing them, you should inform your users that the " @@ -1287,11 +1290,11 @@ msgid "" "will be printed to :data:`sys.stderr` when the argument is used::" msgstr "" -#: ../../../library/argparse.rst:1412 +#: ../../../library/argparse.rst:1414 msgid "Action classes" msgstr "" -#: ../../../library/argparse.rst:1414 +#: ../../../library/argparse.rst:1416 msgid "" ":class:`!Action` classes implement the Action API, a callable which returns " "a callable which processes arguments from the command-line. Any object which " @@ -1299,7 +1302,7 @@ msgid "" "`~ArgumentParser.add_argument`." msgstr "" -#: ../../../library/argparse.rst:1423 +#: ../../../library/argparse.rst:1425 msgid "" ":class:`!Action` objects are used by an :class:`ArgumentParser` to represent " "the information needed to parse a single argument from one or more strings " @@ -1308,7 +1311,7 @@ msgid "" "`ArgumentParser.add_argument` except for the ``action`` itself." msgstr "" -#: ../../../library/argparse.rst:1429 +#: ../../../library/argparse.rst:1431 msgid "" "Instances of :class:`!Action` (or return value of any callable to the " "``action`` parameter) should have attributes :attr:`!dest`, :attr:`!" @@ -1317,46 +1320,46 @@ msgid "" "is to call :meth:`!Action.__init__`." msgstr "" -#: ../../../library/argparse.rst:1437 +#: ../../../library/argparse.rst:1439 msgid "" ":class:`!Action` instances should be callable, so subclasses must override " "the :meth:`!__call__` method, which should accept four parameters:" msgstr "" -#: ../../../library/argparse.rst:1440 +#: ../../../library/argparse.rst:1442 msgid "" "*parser* - The :class:`ArgumentParser` object which contains this action." msgstr "" -#: ../../../library/argparse.rst:1442 +#: ../../../library/argparse.rst:1444 msgid "" "*namespace* - The :class:`Namespace` object that will be returned by :meth:" "`~ArgumentParser.parse_args`. Most actions add an attribute to this object " "using :func:`setattr`." msgstr "" -#: ../../../library/argparse.rst:1446 +#: ../../../library/argparse.rst:1448 msgid "" "*values* - The associated command-line arguments, with any type conversions " "applied. Type conversions are specified with the type_ keyword argument to :" "meth:`~ArgumentParser.add_argument`." msgstr "" -#: ../../../library/argparse.rst:1450 +#: ../../../library/argparse.rst:1452 msgid "" "*option_string* - The option string that was used to invoke this action. The " "``option_string`` argument is optional, and will be absent if the action is " "associated with a positional argument." msgstr "" -#: ../../../library/argparse.rst:1454 +#: ../../../library/argparse.rst:1456 msgid "" "The :meth:`!__call__` method may perform arbitrary actions, but will " "typically set attributes on the ``namespace`` based on ``dest`` and " "``values``." msgstr "" -#: ../../../library/argparse.rst:1459 +#: ../../../library/argparse.rst:1461 msgid "" ":class:`!Action` subclasses can define a :meth:`!format_usage` method that " "takes no argument and return a string which will be used when printing the " @@ -1364,7 +1367,7 @@ msgid "" "will be used." msgstr "" -#: ../../../library/argparse.rst:1465 +#: ../../../library/argparse.rst:1467 msgid "" "A subclass of :class:`Action` for handling boolean flags with positive and " "negative options. Adding a single argument such as ``--foo`` automatically " @@ -1372,85 +1375,85 @@ msgid "" "``False`` respectively::" msgstr "" -#: ../../../library/argparse.rst:1476 +#: ../../../library/argparse.rst:1478 msgid "" "Single-dash long options are also supported. For example, negative option ``-" "nofoo`` is automatically added for positive option ``-foo``. But no " "additional options are added for short options such as ``-f``." msgstr "" -#: ../../../library/argparse.rst:1483 +#: ../../../library/argparse.rst:1485 msgid "Added support for single-dash options." msgstr "" -#: ../../../library/argparse.rst:1486 +#: ../../../library/argparse.rst:1488 msgid "Added support for alternate prefix_chars_." msgstr "" -#: ../../../library/argparse.rst:1490 +#: ../../../library/argparse.rst:1492 msgid "The parse_args() method" msgstr "" -#: ../../../library/argparse.rst:1494 +#: ../../../library/argparse.rst:1496 msgid "" "Convert argument strings to objects and assign them as attributes of the " "namespace. Return the populated namespace." msgstr "" -#: ../../../library/argparse.rst:1497 +#: ../../../library/argparse.rst:1499 msgid "" "Previous calls to :meth:`add_argument` determine exactly what objects are " "created and how they are assigned. See the documentation for :meth:`!" "add_argument` for details." msgstr "" -#: ../../../library/argparse.rst:1501 +#: ../../../library/argparse.rst:1503 msgid "" "args_ - List of strings to parse. The default is taken from :data:`sys." "argv`." msgstr "" -#: ../../../library/argparse.rst:1504 +#: ../../../library/argparse.rst:1506 msgid "" "namespace_ - An object to take the attributes. The default is a new empty :" "class:`Namespace` object." msgstr "" -#: ../../../library/argparse.rst:1509 +#: ../../../library/argparse.rst:1511 msgid "Option value syntax" msgstr "" -#: ../../../library/argparse.rst:1511 +#: ../../../library/argparse.rst:1513 msgid "" "The :meth:`~ArgumentParser.parse_args` method supports several ways of " "specifying the value of an option (if it takes one). In the simplest case, " "the option and its value are passed as two separate arguments::" msgstr "" -#: ../../../library/argparse.rst:1523 +#: ../../../library/argparse.rst:1525 msgid "" "For long options (options with names longer than a single character), the " "option and value can also be passed as a single command-line argument, using " "``=`` to separate them::" msgstr "" -#: ../../../library/argparse.rst:1530 +#: ../../../library/argparse.rst:1532 msgid "" "For short options (options only one character long), the option and its " "value can be concatenated::" msgstr "" -#: ../../../library/argparse.rst:1536 +#: ../../../library/argparse.rst:1538 msgid "" "Several short options can be joined together, using only a single ``-`` " "prefix, as long as only the last option (or none of them) requires a value::" msgstr "" -#: ../../../library/argparse.rst:1548 +#: ../../../library/argparse.rst:1550 msgid "Invalid arguments" msgstr "" -#: ../../../library/argparse.rst:1550 +#: ../../../library/argparse.rst:1552 msgid "" "While parsing the command line, :meth:`~ArgumentParser.parse_args` checks " "for a variety of errors, including ambiguous options, invalid types, invalid " @@ -1458,11 +1461,11 @@ msgid "" "an error, it exits and prints the error along with a usage message::" msgstr "" -#: ../../../library/argparse.rst:1576 +#: ../../../library/argparse.rst:1578 msgid "Arguments containing ``-``" msgstr "" -#: ../../../library/argparse.rst:1578 +#: ../../../library/argparse.rst:1580 msgid "" "The :meth:`~ArgumentParser.parse_args` method attempts to give errors " "whenever the user has clearly made a mistake, but some situations are " @@ -1474,7 +1477,7 @@ msgid "" "negative numbers::" msgstr "" -#: ../../../library/argparse.rst:1616 +#: ../../../library/argparse.rst:1618 msgid "" "If you have positional arguments that must begin with ``-`` and don't look " "like negative numbers, you can insert the pseudo-argument ``'--'`` which " @@ -1482,41 +1485,41 @@ msgid "" "positional argument::" msgstr "" -#: ../../../library/argparse.rst:1624 +#: ../../../library/argparse.rst:1626 msgid "" "See also :ref:`the argparse howto on ambiguous arguments ` for more details." msgstr "" -#: ../../../library/argparse.rst:1627 +#: ../../../library/argparse.rst:1629 msgid "" "Negative-number matching was expanded to include numbers in scientific " "notation (``-2.5e-6``), numbers containing underscores (``-1_234.5``), and " "complex numbers (``-1.2e-3j``)." msgstr "" -#: ../../../library/argparse.rst:1635 +#: ../../../library/argparse.rst:1637 msgid "Argument abbreviations (prefix matching)" msgstr "" -#: ../../../library/argparse.rst:1637 +#: ../../../library/argparse.rst:1639 msgid "" "The :meth:`~ArgumentParser.parse_args` method :ref:`by default " "` allows long options to be abbreviated to a prefix, if the " "abbreviation is unambiguous (the prefix matches a unique option)::" msgstr "" -#: ../../../library/argparse.rst:1652 +#: ../../../library/argparse.rst:1654 msgid "" "An error is produced for arguments that could produce more than one options. " "This feature can be disabled by setting :ref:`allow_abbrev` to ``False``." msgstr "" -#: ../../../library/argparse.rst:1658 +#: ../../../library/argparse.rst:1660 msgid "Beyond ``sys.argv``" msgstr "" -#: ../../../library/argparse.rst:1660 +#: ../../../library/argparse.rst:1662 msgid "" "Sometimes it may be useful to have an :class:`ArgumentParser` parse " "arguments other than those of :data:`sys.argv`. This can be accomplished by " @@ -1524,49 +1527,49 @@ msgid "" "useful for testing at the interactive prompt::" msgstr "" -#: ../../../library/argparse.rst:1680 +#: ../../../library/argparse.rst:1682 msgid "The Namespace object" msgstr "" -#: ../../../library/argparse.rst:1684 +#: ../../../library/argparse.rst:1686 msgid "" "Simple class used by default by :meth:`~ArgumentParser.parse_args` to create " "an object holding attributes and return it." msgstr "" -#: ../../../library/argparse.rst:1687 +#: ../../../library/argparse.rst:1689 msgid "" ":class:`!Namespace` objects support :func:`copy.replace`, which returns a " "copy of the object with the specified attributes replaced." msgstr "" -#: ../../../library/argparse.rst:1690 +#: ../../../library/argparse.rst:1692 msgid "Added support for :func:`copy.replace`." msgstr "" -#: ../../../library/argparse.rst:1693 +#: ../../../library/argparse.rst:1695 msgid "" "This class is deliberately simple, just an :class:`object` subclass with a " "readable string representation. If you prefer to have dict-like view of the " "attributes, you can use the standard Python idiom, :func:`vars`::" msgstr "" -#: ../../../library/argparse.rst:1703 +#: ../../../library/argparse.rst:1705 msgid "" "It may also be useful to have an :class:`ArgumentParser` assign attributes " "to an already existing object, rather than a new :class:`Namespace` object. " "This can be achieved by specifying the ``namespace=`` keyword argument::" msgstr "" -#: ../../../library/argparse.rst:1719 +#: ../../../library/argparse.rst:1721 msgid "Other utilities" msgstr "" -#: ../../../library/argparse.rst:1722 +#: ../../../library/argparse.rst:1724 msgid "Subcommands" msgstr "" -#: ../../../library/argparse.rst:1729 +#: ../../../library/argparse.rst:1731 msgid "" "Many programs split up their functionality into a number of subcommands, for " "example, the ``svn`` program can invoke subcommands like ``svn checkout``, " @@ -1581,69 +1584,69 @@ msgid "" "returns an :class:`!ArgumentParser` object that can be modified as usual." msgstr "" -#: ../../../library/argparse.rst:1741 +#: ../../../library/argparse.rst:1743 msgid "Description of parameters:" msgstr "" -#: ../../../library/argparse.rst:1743 +#: ../../../library/argparse.rst:1745 msgid "" "*title* - title for the sub-parser group in help output; by default " "\"subcommands\" if description is provided, otherwise uses title for " "positional arguments" msgstr "" -#: ../../../library/argparse.rst:1747 +#: ../../../library/argparse.rst:1749 msgid "" "*description* - description for the sub-parser group in help output, by " "default ``None``" msgstr "" -#: ../../../library/argparse.rst:1750 +#: ../../../library/argparse.rst:1752 msgid "" "*prog* - usage information that will be displayed with subcommand help, by " "default the name of the program and any positional arguments before the " "subparser argument" msgstr "" -#: ../../../library/argparse.rst:1754 +#: ../../../library/argparse.rst:1756 msgid "" "*parser_class* - class which will be used to create sub-parser instances, by " "default the class of the current parser (e.g. :class:`ArgumentParser`)" msgstr "" -#: ../../../library/argparse.rst:1757 +#: ../../../library/argparse.rst:1759 msgid "" "action_ - the basic type of action to be taken when this argument is " "encountered at the command line" msgstr "" -#: ../../../library/argparse.rst:1760 +#: ../../../library/argparse.rst:1762 msgid "" "dest_ - name of the attribute under which subcommand name will be stored; by " "default ``None`` and no value is stored" msgstr "" -#: ../../../library/argparse.rst:1763 +#: ../../../library/argparse.rst:1765 msgid "" "required_ - Whether or not a subcommand must be provided, by default " "``False`` (added in 3.7)" msgstr "" -#: ../../../library/argparse.rst:1766 +#: ../../../library/argparse.rst:1768 msgid "help_ - help for sub-parser group in help output, by default ``None``" msgstr "" -#: ../../../library/argparse.rst:1768 +#: ../../../library/argparse.rst:1770 msgid "" "metavar_ - string presenting available subcommands in help; by default it is " "``None`` and presents subcommands in form {cmd1, cmd2, ..}" msgstr "" -#: ../../../library/argparse.rst:1771 +#: ../../../library/argparse.rst:1773 msgid "Some example usage::" msgstr "" -#: ../../../library/argparse.rst:1792 +#: ../../../library/argparse.rst:1794 msgid "" "Note that the object returned by :meth:`~ArgumentParser.parse_args` will " "only contain attributes for the main parser and the subparser that was " @@ -1653,7 +1656,7 @@ msgid "" "only the ``foo`` and ``baz`` attributes are present." msgstr "" -#: ../../../library/argparse.rst:1799 +#: ../../../library/argparse.rst:1801 msgid "" "If a subparser defines an argument with the same ``dest`` as the parent " "parser, the two share a single namespace attribute, so the parent's value " @@ -1661,7 +1664,7 @@ msgid "" "both." msgstr "" -#: ../../../library/argparse.rst:1804 +#: ../../../library/argparse.rst:1806 msgid "" "Similarly, when a help message is requested from a subparser, only the help " "for that particular parser will be printed. The help message will not " @@ -1670,7 +1673,7 @@ msgid "" "to :meth:`~_SubParsersAction.add_parser` as above.)" msgstr "" -#: ../../../library/argparse.rst:1840 +#: ../../../library/argparse.rst:1842 msgid "" "The :meth:`~ArgumentParser.add_subparsers` method also supports ``title`` " "and ``description`` keyword arguments. When either is present, the " @@ -1678,7 +1681,7 @@ msgid "" "example::" msgstr "" -#: ../../../library/argparse.rst:1861 +#: ../../../library/argparse.rst:1863 msgid "" "One particularly effective way of handling subcommands is to combine the use " "of the :meth:`~ArgumentParser.add_subparsers` method with calls to :meth:" @@ -1686,7 +1689,7 @@ msgid "" "function it should execute. For example::" msgstr "" -#: ../../../library/argparse.rst:1898 +#: ../../../library/argparse.rst:1900 msgid "" "This way, you can let :meth:`~ArgumentParser.parse_args` do the job of " "calling the appropriate function after argument parsing is complete. " @@ -1697,57 +1700,57 @@ msgid "" "work::" msgstr "" -#: ../../../library/argparse.rst:1914 +#: ../../../library/argparse.rst:1916 msgid "New *required* keyword-only parameter." msgstr "" -#: ../../../library/argparse.rst:1917 +#: ../../../library/argparse.rst:1919 msgid "" "Subparser's *prog* is no longer affected by a custom usage message in the " "main parser." msgstr "" -#: ../../../library/argparse.rst:1925 +#: ../../../library/argparse.rst:1927 msgid "" "Create and return a new :class:`ArgumentParser` object for the subcommand " "*name*." msgstr "" -#: ../../../library/argparse.rst:1928 +#: ../../../library/argparse.rst:1930 msgid "The *name* argument is the name of the sub-command." msgstr "" -#: ../../../library/argparse.rst:1930 +#: ../../../library/argparse.rst:1932 msgid "The *help* argument provides a short description for this sub-command." msgstr "" -#: ../../../library/argparse.rst:1932 +#: ../../../library/argparse.rst:1934 msgid "" "The *aliases* argument allows providing alternative names for this sub-" "command. For example::" msgstr "" -#: ../../../library/argparse.rst:1942 +#: ../../../library/argparse.rst:1944 msgid "" "The *deprecated* argument, if ``True``, marks the sub-command as deprecated " "and will issue a warning when used. For example::" msgstr "" -#: ../../../library/argparse.rst:1952 +#: ../../../library/argparse.rst:1954 msgid "" "All other keyword arguments are passed directly to the :class:`!" "ArgumentParser` constructor." msgstr "" -#: ../../../library/argparse.rst:1955 +#: ../../../library/argparse.rst:1957 msgid "Added the *deprecated* parameter." msgstr "" -#: ../../../library/argparse.rst:1960 +#: ../../../library/argparse.rst:1962 msgid "FileType objects" msgstr "" -#: ../../../library/argparse.rst:1964 +#: ../../../library/argparse.rst:1966 msgid "" "The :class:`FileType` factory creates objects that can be passed to the type " "argument of :meth:`ArgumentParser.add_argument`. Arguments that have :class:" @@ -1756,14 +1759,14 @@ msgid "" "the :func:`open` function for more details)::" msgstr "" -#: ../../../library/argparse.rst:1976 +#: ../../../library/argparse.rst:1978 msgid "" "FileType objects understand the pseudo-argument ``'-'`` and automatically " "convert this into :data:`sys.stdin` for readable :class:`FileType` objects " "and :data:`sys.stdout` for writable :class:`FileType` objects::" msgstr "" -#: ../../../library/argparse.rst:1987 +#: ../../../library/argparse.rst:1989 msgid "" "If one argument uses *FileType* and then a subsequent argument fails, an " "error is reported but the file is not automatically closed. This can also " @@ -1772,15 +1775,15 @@ msgid "" "manage the files." msgstr "" -#: ../../../library/argparse.rst:1993 +#: ../../../library/argparse.rst:1995 msgid "Added the *encoding* and *errors* parameters." msgstr "" -#: ../../../library/argparse.rst:2000 +#: ../../../library/argparse.rst:2002 msgid "Argument groups" msgstr "" -#: ../../../library/argparse.rst:2005 +#: ../../../library/argparse.rst:2007 msgid "" "By default, :class:`ArgumentParser` groups command-line arguments into " "\"positional arguments\" and \"options\" when displaying help messages. When " @@ -1789,7 +1792,7 @@ msgid "" "method::" msgstr "" -#: ../../../library/argparse.rst:2022 +#: ../../../library/argparse.rst:2024 msgid "" "The :meth:`add_argument_group` method returns an argument group object which " "has an :meth:`~ArgumentParser.add_argument` method just like a regular :" @@ -1800,7 +1803,7 @@ msgid "" "this display::" msgstr "" -#: ../../../library/argparse.rst:2048 +#: ../../../library/argparse.rst:2050 msgid "" "The optional, keyword-only parameters argument_default_ and " "conflict_handler_ allow for finer-grained control of the behavior of the " @@ -1809,48 +1812,48 @@ msgid "" "rather than the entire parser." msgstr "" -#: ../../../library/argparse.rst:2053 +#: ../../../library/argparse.rst:2055 msgid "" "Note that any arguments not in your user-defined groups will end up back in " "the usual \"positional arguments\" and \"optional arguments\" sections." msgstr "" -#: ../../../library/argparse.rst:2056 +#: ../../../library/argparse.rst:2058 msgid "" "Within each argument group, arguments are displayed in help output in the " "order in which they are added." msgstr "" -#: ../../../library/argparse.rst:2059 +#: ../../../library/argparse.rst:2061 msgid "" "Calling :meth:`add_argument_group` on an argument group now raises an " "exception. This nesting was never supported, often failed to work correctly, " "and was unintentionally exposed through inheritance." msgstr "" -#: ../../../library/argparse.rst:2064 +#: ../../../library/argparse.rst:2066 msgid "Passing prefix_chars_ to :meth:`add_argument_group` is now deprecated." msgstr "" -#: ../../../library/argparse.rst:2070 +#: ../../../library/argparse.rst:2072 msgid "Mutual exclusion" msgstr "" -#: ../../../library/argparse.rst:2074 +#: ../../../library/argparse.rst:2076 msgid "" "Create a mutually exclusive group. :mod:`!argparse` will make sure that only " "one of the arguments in the mutually exclusive group was present on the " "command line::" msgstr "" -#: ../../../library/argparse.rst:2090 +#: ../../../library/argparse.rst:2092 msgid "" "The :meth:`add_mutually_exclusive_group` method also accepts a *required* " "argument, to indicate that at least one of the mutually exclusive arguments " "is required::" msgstr "" -#: ../../../library/argparse.rst:2102 +#: ../../../library/argparse.rst:2104 msgid "" "Note that currently mutually exclusive argument groups do not support the " "*title* and *description* arguments of :meth:`~ArgumentParser." @@ -1858,7 +1861,7 @@ msgid "" "argument group that has a title and description. For example::" msgstr "" -#: ../../../library/argparse.rst:2125 +#: ../../../library/argparse.rst:2127 msgid "" "Calling :meth:`add_argument_group` or :meth:`add_mutually_exclusive_group` " "on a mutually exclusive group now raises an exception. This nesting was " @@ -1866,11 +1869,11 @@ msgid "" "exposed through inheritance." msgstr "" -#: ../../../library/argparse.rst:2133 +#: ../../../library/argparse.rst:2135 msgid "Parser defaults" msgstr "" -#: ../../../library/argparse.rst:2137 +#: ../../../library/argparse.rst:2139 msgid "" "Most of the time, the attributes of the object returned by :meth:" "`parse_args` will be fully determined by inspecting the command-line " @@ -1879,7 +1882,7 @@ msgid "" "command line to be added::" msgstr "" -#: ../../../library/argparse.rst:2149 +#: ../../../library/argparse.rst:2151 msgid "" "Note that defaults can be set at both the parser level using :meth:" "`set_defaults` and at the argument level using :meth:`add_argument`. If both " @@ -1887,67 +1890,67 @@ msgid "" "used::" msgstr "" -#: ../../../library/argparse.rst:2159 +#: ../../../library/argparse.rst:2161 msgid "" "Parser-level defaults can be particularly useful when working with multiple " "parsers. See the :meth:`~ArgumentParser.add_subparsers` method for an " "example of this type." msgstr "" -#: ../../../library/argparse.rst:2165 +#: ../../../library/argparse.rst:2167 msgid "" "Get the default value for a namespace attribute, as set by either :meth:" "`~ArgumentParser.add_argument` or by :meth:`~ArgumentParser.set_defaults`::" msgstr "" -#: ../../../library/argparse.rst:2176 +#: ../../../library/argparse.rst:2178 msgid "Printing help" msgstr "" -#: ../../../library/argparse.rst:2178 +#: ../../../library/argparse.rst:2180 msgid "" "In most typical applications, :meth:`~ArgumentParser.parse_args` will take " "care of formatting and printing any usage or error messages. However, " "several formatting methods are available:" msgstr "" -#: ../../../library/argparse.rst:2184 +#: ../../../library/argparse.rst:2186 msgid "" "Print a brief description of how the :class:`ArgumentParser` should be " "invoked on the command line. If *file* is ``None``, :data:`sys.stdout` is " "assumed." msgstr "" -#: ../../../library/argparse.rst:2190 +#: ../../../library/argparse.rst:2192 msgid "" "Print a help message, including the program usage and information about the " "arguments registered with the :class:`ArgumentParser`. If *file* is " "``None``, :data:`sys.stdout` is assumed." msgstr "" -#: ../../../library/argparse.rst:2194 +#: ../../../library/argparse.rst:2196 msgid "" "There are also variants of these methods that simply return a string instead " "of printing it:" msgstr "" -#: ../../../library/argparse.rst:2199 +#: ../../../library/argparse.rst:2201 msgid "" "Return a string containing a brief description of how the :class:" "`ArgumentParser` should be invoked on the command line." msgstr "" -#: ../../../library/argparse.rst:2204 +#: ../../../library/argparse.rst:2206 msgid "" "Return a string containing a help message, including the program usage and " "information about the arguments registered with the :class:`ArgumentParser`." msgstr "" -#: ../../../library/argparse.rst:2209 +#: ../../../library/argparse.rst:2211 msgid "Partial parsing" msgstr "" -#: ../../../library/argparse.rst:2213 +#: ../../../library/argparse.rst:2215 msgid "" "Sometimes a script only needs to handle a specific set of command-line " "arguments, leaving any unrecognized arguments for another script or program. " @@ -1955,7 +1958,7 @@ msgid "" "useful." msgstr "" -#: ../../../library/argparse.rst:2218 +#: ../../../library/argparse.rst:2220 msgid "" "This method works similarly to :meth:`~ArgumentParser.parse_args`, but it " "does not raise an error for extra, unrecognized arguments. Instead, it " @@ -1963,7 +1966,7 @@ msgid "" "populated namespace and the list of any unrecognized arguments." msgstr "" -#: ../../../library/argparse.rst:2232 +#: ../../../library/argparse.rst:2234 msgid "" ":ref:`Prefix matching ` rules apply to :meth:" "`~ArgumentParser.parse_known_args`. The parser may consume an option even if " @@ -1971,11 +1974,11 @@ msgid "" "remaining arguments list." msgstr "" -#: ../../../library/argparse.rst:2239 +#: ../../../library/argparse.rst:2241 msgid "Customizing file parsing" msgstr "" -#: ../../../library/argparse.rst:2243 +#: ../../../library/argparse.rst:2245 msgid "" "Arguments that are read from a file (see the *fromfile_prefix_chars* keyword " "argument to the :class:`ArgumentParser` constructor) are read one argument " @@ -1983,47 +1986,47 @@ msgid "" "reading." msgstr "" -#: ../../../library/argparse.rst:2248 +#: ../../../library/argparse.rst:2250 msgid "" "This method takes a single argument *arg_line* which is a string read from " "the argument file. It returns a list of arguments parsed from this string. " "The method is called once per line read from the argument file, in order." msgstr "" -#: ../../../library/argparse.rst:2252 +#: ../../../library/argparse.rst:2254 msgid "" "A useful override of this method is one that treats each space-separated " "word as an argument. The following example demonstrates how to do this::" msgstr "" -#: ../../../library/argparse.rst:2259 +#: ../../../library/argparse.rst:2261 msgid "" "Note that with this override an argument can no longer contain spaces, since " "each space-separated word becomes a separate argument." msgstr "" -#: ../../../library/argparse.rst:2264 +#: ../../../library/argparse.rst:2266 msgid "Exiting methods" msgstr "" -#: ../../../library/argparse.rst:2268 +#: ../../../library/argparse.rst:2270 msgid "" "This method terminates the program, exiting with the specified *status* and, " "if given, it prints a *message* to :data:`sys.stderr` before that. The user " "can override this method to handle these steps differently::" msgstr "" -#: ../../../library/argparse.rst:2280 +#: ../../../library/argparse.rst:2282 msgid "" "This method prints a usage message, including the *message*, to :data:`sys." "stderr` and terminates the program with a status code of 2." msgstr "" -#: ../../../library/argparse.rst:2285 +#: ../../../library/argparse.rst:2287 msgid "Intermixed parsing" msgstr "" -#: ../../../library/argparse.rst:2290 +#: ../../../library/argparse.rst:2292 msgid "" "A number of Unix commands allow the user to intermix optional arguments with " "positional arguments. The :meth:`~ArgumentParser.parse_intermixed_args` " @@ -2031,7 +2034,7 @@ msgid "" "parsing style." msgstr "" -#: ../../../library/argparse.rst:2295 +#: ../../../library/argparse.rst:2297 msgid "" "These parsers do not support all the :mod:`!argparse` features, and will " "raise exceptions if unsupported features are used. In particular, " @@ -2039,7 +2042,7 @@ msgid "" "positionals are not supported." msgstr "" -#: ../../../library/argparse.rst:2300 +#: ../../../library/argparse.rst:2302 msgid "" "The following example shows the difference between :meth:`~ArgumentParser." "parse_known_args` and :meth:`~ArgumentParser.parse_intermixed_args`: the " @@ -2047,7 +2050,7 @@ msgid "" "collects all the positionals into ``rest``. ::" msgstr "" -#: ../../../library/argparse.rst:2315 +#: ../../../library/argparse.rst:2317 msgid "" ":meth:`~ArgumentParser.parse_known_intermixed_args` returns a two item tuple " "containing the populated namespace and the list of remaining argument " @@ -2055,11 +2058,11 @@ msgid "" "there are any remaining unparsed argument strings." msgstr "" -#: ../../../library/argparse.rst:2324 +#: ../../../library/argparse.rst:2326 msgid "Registering custom types or actions" msgstr "" -#: ../../../library/argparse.rst:2328 +#: ../../../library/argparse.rst:2330 msgid "" "Sometimes it's desirable to use a custom string in error messages to provide " "more user-friendly output. In these cases, :meth:`!register` can be used to " @@ -2067,7 +2070,7 @@ msgid "" "the type by their registered name instead of their callable name." msgstr "" -#: ../../../library/argparse.rst:2333 +#: ../../../library/argparse.rst:2335 msgid "" "The :meth:`!register` method accepts three arguments - a *registry_name*, " "specifying the internal registry where the object will be stored (e.g., " @@ -2075,47 +2078,47 @@ msgid "" "be registered, and object, the callable to be registered." msgstr "" -#: ../../../library/argparse.rst:2338 +#: ../../../library/argparse.rst:2340 msgid "" "The following example shows how to register a custom type with a parser::" msgstr "" -#: ../../../library/argparse.rst:2352 +#: ../../../library/argparse.rst:2354 msgid "Exceptions" msgstr "" -#: ../../../library/argparse.rst:2356 +#: ../../../library/argparse.rst:2358 msgid "An error from creating or using an argument (optional or positional)." msgstr "" -#: ../../../library/argparse.rst:2358 +#: ../../../library/argparse.rst:2360 msgid "" "The string value of this exception is the message, augmented with " "information about the argument that caused it." msgstr "" -#: ../../../library/argparse.rst:2363 +#: ../../../library/argparse.rst:2365 msgid "" "Raised when something goes wrong converting a command line string to a type." msgstr "" -#: ../../../library/argparse.rst:2367 +#: ../../../library/argparse.rst:2369 msgid "Guides and Tutorials" msgstr "" -#: ../../../library/argparse.rst:911 +#: ../../../library/argparse.rst:913 msgid "? (question mark)" msgstr "" -#: ../../../library/argparse.rst:911 ../../../library/argparse.rst:943 -#: ../../../library/argparse.rst:957 +#: ../../../library/argparse.rst:913 ../../../library/argparse.rst:945 +#: ../../../library/argparse.rst:959 msgid "in argparse module" msgstr "" -#: ../../../library/argparse.rst:943 +#: ../../../library/argparse.rst:945 msgid "* (asterisk)" msgstr "" -#: ../../../library/argparse.rst:957 +#: ../../../library/argparse.rst:959 msgid "+ (plus)" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/ast.pot b/main/locale/pot/LC_MESSAGES/library/ast.pot index b54f1196286..17cd8452f8b 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-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1194,8 +1194,8 @@ msgstr "" #: ../../../library/ast.rst:2255 msgid "" "In addition, if ``mode`` is ``'func_type'``, the input syntax is modified to " -"correspond to :pep:`484` \"signature type comments\", e.g. ``(str, int) -> " -"List[str]``." +"correspond to :pep:`484` \"signature type comments\", for example ``(str, " +"int) -> List[str]``." msgstr "" #: ../../../library/ast.rst:2259 diff --git a/main/locale/pot/LC_MESSAGES/library/asyncio-task.pot b/main/locale/pot/LC_MESSAGES/library/asyncio-task.pot index 65a59b7eac9..75c81866f1a 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-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -323,7 +323,7 @@ msgid "" "Create a task in this task group. The signature matches that of :func:" "`asyncio.create_task`. If the task group is inactive (e.g. not yet entered, " "already finished, or in the process of shutting down), we will close the " -"given ``coro``." +"given ``coro`` and raise :exc:`RuntimeError`." msgstr "" #: ../../../library/asyncio-task.rst:363 diff --git a/main/locale/pot/LC_MESSAGES/library/asyncio-tools.pot b/main/locale/pot/LC_MESSAGES/library/asyncio-tools.pot index 91bb9397434..2d807492b41 100644 --- a/main/locale/pot/LC_MESSAGES/library/asyncio-tools.pot +++ b/main/locale/pot/LC_MESSAGES/library/asyncio-tools.pot @@ -8,10 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/main/locale/pot/LC_MESSAGES/library/atexit.pot b/main/locale/pot/LC_MESSAGES/library/atexit.pot index db485406aac..58ddd308c53 100644 --- a/main/locale/pot/LC_MESSAGES/library/atexit.pot +++ b/main/locale/pot/LC_MESSAGES/library/atexit.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-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -23,103 +23,112 @@ msgstr "" #: ../../../library/atexit.rst:9 msgid "" -"The :mod:`!atexit` module defines functions to register and unregister " -"cleanup functions. Functions thus registered are automatically executed " -"upon normal interpreter termination. :mod:`!atexit` runs these functions in " -"the *reverse* order in which they were registered; if you register ``A``, " -"``B``, and ``C``, at interpreter termination time they will be run in the " -"order ``C``, ``B``, ``A``." +"The :mod:`!atexit` module defines functions to register and unregister :dfn:" +"`exit handlers`: functions that are automatically executed \"at exit\", that " +"is, upon normal program termination (for instance, if :func:`sys.exit` is " +"called or the main module's execution completes) or, more generally, upon :" +"term:`interpreter shutdown`." msgstr "" -#: ../../../library/atexit.rst:16 +#: ../../../library/atexit.rst:15 msgid "" -"**Note:** The functions registered via this module are not called when the " -"program is killed by a signal not handled by Python, when a Python fatal " -"internal error is detected, or when :func:`os._exit` is called." +"At exit, all registered exit handlers are called in the *reverse* order in " +"which they were registered. If you register ``A``, ``B``, and ``C``, at " +"interpreter shutdown time they will be run in the order ``C``, ``B``, ``A``. " +"The assumption is that lower level modules will normally be imported before " +"higher level modules and thus must be cleaned up later." msgstr "" -#: ../../../library/atexit.rst:20 +#: ../../../library/atexit.rst:22 msgid "" -"**Note:** The effect of registering or unregistering functions from within a " -"cleanup function is undefined." -msgstr "" - -#: ../../../library/atexit.rst:23 -msgid "" -"When used with C-API subinterpreters, registered functions are local to the " -"interpreter they were registered in." +"If an exception is raised during execution of an exit handler, a traceback " +"is printed (unless :exc:`SystemExit` is raised) and the exception " +"information is saved. After all exit handlers have had a chance to run, the " +"last exception to be raised is re-raised." msgstr "" -#: ../../../library/atexit.rst:29 +#: ../../../library/atexit.rst:27 msgid "" -"Register *func* as a function to be executed at termination. Any optional " -"arguments that are to be passed to *func* must be passed as arguments to :" -"func:`register`. It is possible to register the same function and arguments " -"more than once." +"In programs that use multiple interpreters, each interpreter has its own " +"stack of exit handlers, which are executed when the interpreter shuts down " +"(for example, with :meth:`concurrent.interpreters.Interpreter.close` or the " +"C API :c:func:`Py_EndInterpreter`). Registration functions in this module " +"only affect the interpreter they are called from." msgstr "" #: ../../../library/atexit.rst:34 msgid "" -"At normal program termination (for instance, if :func:`sys.exit` is called " -"or the main module's execution completes), all functions registered are " -"called in last in, first out order. The assumption is that lower level " -"modules will normally be imported before higher level modules and thus must " -"be cleaned up later." +"**Note:** Exit handlers are not called when the program is killed by a " +"signal not handled by Python, when a Python fatal internal error is " +"detected, or when :func:`os._exit` is called." msgstr "" -#: ../../../library/atexit.rst:40 +#: ../../../library/atexit.rst:38 msgid "" -"If an exception is raised during execution of the exit handlers, a traceback " -"is printed (unless :exc:`SystemExit` is raised) and the exception " -"information is saved. After all exit handlers have had a chance to run, the " -"last exception to be raised is re-raised." +"**Note:** The effect of registering or unregistering functions from within a " +"cleanup function is undefined." msgstr "" -#: ../../../library/atexit.rst:45 +#: ../../../library/atexit.rst:42 msgid "" -"This function returns *func*, which makes it possible to use it as a " -"decorator." +"When writing exit handlers, especially in C API extensions, keep in mind " +"that other exit handlers may still run arbitrary Python code after you clean " +"up. Such code should succeed or fail with an exception, rather than crash." msgstr "" -#: ../../../library/atexit.rst:49 +#: ../../../library/atexit.rst:47 msgid "" -"Starting new threads or calling :func:`os.fork` from a registered function " -"can lead to race condition between the main Python runtime thread freeing " -"thread states while internal :mod:`threading` routines or the new process " -"try to use that state. This can lead to crashes rather than clean shutdown." +"Attempts to start a new thread or :func:`os.fork` a new process in an exit " +"handler now leads to :exc:`RuntimeError`. Previously, this could cause race " +"conditions between the main Python runtime thread freeing thread states " +"while internal :mod:`threading` routines or the new process try to use that " +"state, which could lead to crashes rather than clean shutdown." msgstr "" #: ../../../library/atexit.rst:55 msgid "" -"Attempts to start a new thread or :func:`os.fork` a new process in a " -"registered function now leads to :exc:`RuntimeError`." +"When used with subinterpreters, registered functions are local to the " +"interpreter they were registered in." msgstr "" #: ../../../library/atexit.rst:61 msgid "" -"Remove *func* from the list of functions to be run at interpreter shutdown. :" -"func:`unregister` silently does nothing if *func* was not previously " -"registered. If *func* has been registered more than once, every occurrence " -"of that function in the :mod:`!atexit` call stack will be removed. Equality " -"comparisons (``==``) are used internally during unregistration, so function " -"references do not need to have matching identities." +"Register *func* as an exit handler. Any optional arguments that are to be " +"passed to *func* must be passed as arguments to :func:`register`. It is " +"possible to register the same function and arguments more than once." +msgstr "" + +#: ../../../library/atexit.rst:66 +msgid "" +"This function returns *func*, which makes it possible to use it as a " +"decorator." msgstr "" #: ../../../library/atexit.rst:71 +msgid "" +"Remove *func* from the list of exit handlers. :func:`unregister` silently " +"does nothing if *func* was not previously registered. If *func* has been " +"registered more than once, every occurrence of that function in the :mod:`!" +"atexit` call stack will be removed. Equality comparisons (``==``) are used " +"internally during unregistration, so function references do not need to have " +"matching identities." +msgstr "" + +#: ../../../library/atexit.rst:81 msgid "Module :mod:`readline`" msgstr "" -#: ../../../library/atexit.rst:72 +#: ../../../library/atexit.rst:82 msgid "" "Useful example of :mod:`!atexit` to read and write :mod:`readline` history " "files." msgstr "" -#: ../../../library/atexit.rst:79 +#: ../../../library/atexit.rst:89 msgid ":mod:`!atexit` Example" msgstr "" -#: ../../../library/atexit.rst:81 +#: ../../../library/atexit.rst:91 msgid "" "The following simple example demonstrates how a module can initialize a " "counter from a file when it is imported and save the counter's updated value " @@ -127,16 +136,16 @@ msgid "" "making an explicit call into this module at termination. ::" msgstr "" -#: ../../../library/atexit.rst:104 +#: ../../../library/atexit.rst:114 msgid "" "Positional and keyword arguments may also be passed to :func:`register` to " "be passed along to the registered function when it is called::" msgstr "" -#: ../../../library/atexit.rst:116 +#: ../../../library/atexit.rst:126 msgid "Usage as a :term:`decorator`::" msgstr "" -#: ../../../library/atexit.rst:124 +#: ../../../library/atexit.rst:134 msgid "This only works with functions that can be called without arguments." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/concurrent.interpreters.pot b/main/locale/pot/LC_MESSAGES/library/concurrent.interpreters.pot index f693a02d60f..80598df68f0 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-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -307,7 +307,7 @@ msgstr "" #: ../../../library/concurrent.interpreters.rst:194 msgid "" -"There is a small number of Python types that actually share mutable data " +"There are a small number of Python types that actually share mutable data " "between interpreters:" msgstr "" @@ -412,8 +412,8 @@ msgstr "" #: ../../../library/concurrent.interpreters.rst:277 msgid "" -"Return the result of calling running the given function in the interpreter " -"(in the current thread)." +"Return the result of running the given function in the interpreter (in the " +"current thread)." msgstr "" #: ../../../library/concurrent.interpreters.rst:284 diff --git a/main/locale/pot/LC_MESSAGES/library/ctypes.pot b/main/locale/pot/LC_MESSAGES/library/ctypes.pot index 9607a86e066..68ae54d42f2 100644 --- a/main/locale/pot/LC_MESSAGES/library/ctypes.pot +++ b/main/locale/pot/LC_MESSAGES/library/ctypes.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \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:2596 +#: ../../../library/ctypes.rst:226 ../../../library/ctypes.rst:2599 msgid "Fundamental data types" msgstr "" @@ -936,19 +936,21 @@ msgstr "" #: ../../../library/ctypes.rst:717 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." +"`ValueError` is raised. A :exc:`ValueError` is also raised if it has a " +"keyword-only, ``*args``, or ``**kwargs`` parameter, since :attr:`~ctypes." +"_CFuncPtr.argtypes` describes positional arguments only. If the name of the " +"function does not exist in *dll*, an :exc:`AttributeError` is raised." msgstr "" -#: ../../../library/ctypes.rst:721 ../../../library/ctypes.rst:2270 +#: ../../../library/ctypes.rst:724 ../../../library/ctypes.rst:2273 msgid "For example::" msgstr "" -#: ../../../library/ctypes.rst:739 +#: ../../../library/ctypes.rst:742 msgid "Passing pointers (or: passing parameters by reference)" msgstr "" -#: ../../../library/ctypes.rst:741 +#: ../../../library/ctypes.rst:744 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 " @@ -956,7 +958,7 @@ msgid "" "reference*." msgstr "" -#: ../../../library/ctypes.rst:745 +#: ../../../library/ctypes.rst:748 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:" @@ -965,11 +967,11 @@ msgid "" "you don't need the pointer object in Python itself::" msgstr "" -#: ../../../library/ctypes.rst:767 +#: ../../../library/ctypes.rst:770 msgid "Structures and unions" msgstr "" -#: ../../../library/ctypes.rst:769 +#: ../../../library/ctypes.rst:772 msgid "" "Structures and unions must derive from the :class:`Structure` and :class:" "`Union` base classes which are defined in the :mod:`!ctypes` module. Each " @@ -978,45 +980,45 @@ msgid "" "*field type*." msgstr "" -#: ../../../library/ctypes.rst:774 +#: ../../../library/ctypes.rst:777 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:777 +#: ../../../library/ctypes.rst:780 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:797 +#: ../../../library/ctypes.rst:800 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:800 +#: ../../../library/ctypes.rst:803 msgid "" "Here is a RECT structure which contains two POINTs named *upperleft* and " "*lowerright*::" msgstr "" -#: ../../../library/ctypes.rst:814 +#: ../../../library/ctypes.rst:817 msgid "" "Nested structures can also be initialized in the constructor in several " "ways::" msgstr "" -#: ../../../library/ctypes.rst:819 +#: ../../../library/ctypes.rst:822 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:834 +#: ../../../library/ctypes.rst:837 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 " @@ -1024,11 +1026,11 @@ msgid "" "structures with bit-fields should always be passed to functions by pointer." msgstr "" -#: ../../../library/ctypes.rst:840 +#: ../../../library/ctypes.rst:843 msgid "Structure/union layout, alignment and byte order" msgstr "" -#: ../../../library/ctypes.rst:842 +#: ../../../library/ctypes.rst:845 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 " @@ -1036,7 +1038,7 @@ msgid "" "definition; see the attribute documentation for details." msgstr "" -#: ../../../library/ctypes.rst:847 +#: ../../../library/ctypes.rst:850 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." @@ -1044,7 +1046,7 @@ msgid "" "documentation for details." msgstr "" -#: ../../../library/ctypes.rst:852 +#: ../../../library/ctypes.rst:855 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:" @@ -1053,18 +1055,18 @@ msgid "" "classes cannot contain pointer fields." msgstr "" -#: ../../../library/ctypes.rst:862 +#: ../../../library/ctypes.rst:865 msgid "Bit fields in structures and unions" msgstr "" -#: ../../../library/ctypes.rst:864 +#: ../../../library/ctypes.rst:867 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:877 +#: ../../../library/ctypes.rst:880 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 " @@ -1073,80 +1075,80 @@ msgid "" "details on the default behavior and how to change it." msgstr "" -#: ../../../library/ctypes.rst:888 +#: ../../../library/ctypes.rst:891 msgid "Arrays" msgstr "" -#: ../../../library/ctypes.rst:890 +#: ../../../library/ctypes.rst:893 msgid "" "Arrays are sequences, containing a fixed number of instances of the same " "type." msgstr "" -#: ../../../library/ctypes.rst:892 +#: ../../../library/ctypes.rst:895 msgid "" "The recommended way to create array types is by multiplying a data type with " "a positive integer::" msgstr "" -#: ../../../library/ctypes.rst:897 +#: ../../../library/ctypes.rst:900 msgid "" "Here is an example of a somewhat artificial data type, a structure " "containing 4 POINTs among other stuff::" msgstr "" -#: ../../../library/ctypes.rst:913 +#: ../../../library/ctypes.rst:916 msgid "Instances are created in the usual way, by calling the class::" msgstr "" -#: ../../../library/ctypes.rst:919 +#: ../../../library/ctypes.rst:922 msgid "" "The above code print a series of ``0 0`` lines, because the array contents " "is initialized to zeros." msgstr "" -#: ../../../library/ctypes.rst:922 +#: ../../../library/ctypes.rst:925 msgid "Initializers of the correct type can also be specified::" msgstr "" -#: ../../../library/ctypes.rst:938 +#: ../../../library/ctypes.rst:941 msgid "Pointers" msgstr "" -#: ../../../library/ctypes.rst:940 +#: ../../../library/ctypes.rst:943 msgid "" "Pointer instances are created by calling the :func:`pointer` function on a :" "mod:`!ctypes` type::" msgstr "" -#: ../../../library/ctypes.rst:948 +#: ../../../library/ctypes.rst:951 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:955 +#: ../../../library/ctypes.rst:958 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:964 +#: ../../../library/ctypes.rst:967 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:976 +#: ../../../library/ctypes.rst:979 msgid "Pointer instances can also be indexed with integers::" msgstr "" -#: ../../../library/ctypes.rst:982 +#: ../../../library/ctypes.rst:985 msgid "Assigning to an integer index changes the pointed to value::" msgstr "" -#: ../../../library/ctypes.rst:991 +#: ../../../library/ctypes.rst:994 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 " @@ -1155,7 +1157,7 @@ msgid "" "instead of a single item." msgstr "" -#: ../../../library/ctypes.rst:997 +#: ../../../library/ctypes.rst:1000 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 " @@ -1163,30 +1165,30 @@ msgid "" "returns a new type::" msgstr "" -#: ../../../library/ctypes.rst:1013 +#: ../../../library/ctypes.rst:1016 msgid "" "Calling the pointer type without an argument creates a ``NULL`` pointer. " "``NULL`` pointers have a ``False`` boolean value::" msgstr "" -#: ../../../library/ctypes.rst:1021 +#: ../../../library/ctypes.rst:1024 msgid "" ":mod:`!ctypes` checks for ``NULL`` when dereferencing pointers (but " "dereferencing invalid non-\\ ``NULL`` pointers would crash Python)::" msgstr "" -#: ../../../library/ctypes.rst:1039 +#: ../../../library/ctypes.rst:1042 msgid "Thread safety without the GIL" msgstr "" -#: ../../../library/ctypes.rst:1041 +#: ../../../library/ctypes.rst:1044 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:1050 +#: ../../../library/ctypes.rst:1053 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 " @@ -1195,11 +1197,11 @@ msgid "" "Lock` to synchronize access to memory:" msgstr "" -#: ../../../library/ctypes.rst:1070 +#: ../../../library/ctypes.rst:1073 msgid "Type conversions" msgstr "" -#: ../../../library/ctypes.rst:1072 +#: ../../../library/ctypes.rst:1075 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 " @@ -1210,7 +1212,7 @@ msgid "" "ctypes accepts an array of c_int::" msgstr "" -#: ../../../library/ctypes.rst:1093 +#: ../../../library/ctypes.rst:1096 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 " @@ -1219,11 +1221,11 @@ msgid "" "automatically." msgstr "" -#: ../../../library/ctypes.rst:1098 +#: ../../../library/ctypes.rst:1101 msgid "To set a POINTER type field to ``NULL``, you can assign ``None``::" msgstr "" -#: ../../../library/ctypes.rst:1105 +#: ../../../library/ctypes.rst:1108 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 " @@ -1232,11 +1234,11 @@ msgid "" "``values`` field, but not instances of other types::" msgstr "" -#: ../../../library/ctypes.rst:1117 +#: ../../../library/ctypes.rst:1120 msgid "For these cases, the :func:`cast` function is handy." msgstr "" -#: ../../../library/ctypes.rst:1119 +#: ../../../library/ctypes.rst:1122 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, " @@ -1245,60 +1247,60 @@ msgid "" "references the same memory block as the first argument::" msgstr "" -#: ../../../library/ctypes.rst:1130 +#: ../../../library/ctypes.rst:1133 msgid "" "So, :func:`cast` can be used to assign to the ``values`` field of ``Bar`` " "the structure::" msgstr "" -#: ../../../library/ctypes.rst:1143 +#: ../../../library/ctypes.rst:1146 msgid "Incomplete Types" msgstr "" -#: ../../../library/ctypes.rst:1145 +#: ../../../library/ctypes.rst:1148 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:1156 +#: ../../../library/ctypes.rst:1159 msgid "" "The straightforward translation into ctypes code would be this, but it does " "not work::" msgstr "" -#: ../../../library/ctypes.rst:1169 +#: ../../../library/ctypes.rst:1172 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:1181 +#: ../../../library/ctypes.rst:1184 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:1202 +#: ../../../library/ctypes.rst:1205 msgid "Callback functions" msgstr "" -#: ../../../library/ctypes.rst:1204 +#: ../../../library/ctypes.rst:1207 msgid "" ":mod:`!ctypes` allows creating C callable function pointers from Python " "callables. These are sometimes called *callback functions*." msgstr "" -#: ../../../library/ctypes.rst:1207 +#: ../../../library/ctypes.rst:1210 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:1211 +#: ../../../library/ctypes.rst:1214 msgid "" "The :func:`CFUNCTYPE` factory function creates types for callback functions " "using the ``cdecl`` calling convention. On Windows, the :func:`WINFUNCTYPE` " @@ -1306,21 +1308,21 @@ msgid "" "calling convention." msgstr "" -#: ../../../library/ctypes.rst:1216 +#: ../../../library/ctypes.rst:1219 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:1220 +#: ../../../library/ctypes.rst:1223 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:1230 +#: ../../../library/ctypes.rst:1233 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 " @@ -1330,44 +1332,44 @@ msgid "" "otherwise." msgstr "" -#: ../../../library/ctypes.rst:1236 +#: ../../../library/ctypes.rst:1239 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:1242 +#: ../../../library/ctypes.rst:1245 msgid "" "To get started, here is a simple callback that shows the values it gets " "passed::" msgstr "" -#: ../../../library/ctypes.rst:1252 +#: ../../../library/ctypes.rst:1255 msgid "The result::" msgstr "" -#: ../../../library/ctypes.rst:1262 +#: ../../../library/ctypes.rst:1265 msgid "Now we can actually compare the two items and return a useful result::" msgstr "" -#: ../../../library/ctypes.rst:1277 +#: ../../../library/ctypes.rst:1280 msgid "As we can easily check, our array is sorted now::" msgstr "" -#: ../../../library/ctypes.rst:1284 +#: ../../../library/ctypes.rst:1287 msgid "" "The function factories can be used as decorator factories, so we may as well " "write::" msgstr "" -#: ../../../library/ctypes.rst:1302 +#: ../../../library/ctypes.rst:1305 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:1306 +#: ../../../library/ctypes.rst:1309 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 " @@ -1377,35 +1379,35 @@ msgid "" "even when those calls are made from the same C thread." msgstr "" -#: ../../../library/ctypes.rst:1316 +#: ../../../library/ctypes.rst:1319 msgid "Accessing values exported from dlls" msgstr "" -#: ../../../library/ctypes.rst:1318 +#: ../../../library/ctypes.rst:1321 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:1322 +#: ../../../library/ctypes.rst:1325 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:1330 +#: ../../../library/ctypes.rst:1333 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:1333 +#: ../../../library/ctypes.rst:1336 msgid "Quoting the docs for that value:" msgstr "" -#: ../../../library/ctypes.rst:1335 +#: ../../../library/ctypes.rst:1338 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 " @@ -1414,19 +1416,19 @@ msgid "" "frozen modules." msgstr "" -#: ../../../library/ctypes.rst:1340 +#: ../../../library/ctypes.rst:1343 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:1354 +#: ../../../library/ctypes.rst:1357 msgid "" "We have defined the :c:struct:`_frozen` data type, so we can get the pointer " "to the table::" msgstr "" -#: ../../../library/ctypes.rst:1361 +#: ../../../library/ctypes.rst:1364 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 " @@ -1435,34 +1437,34 @@ msgid "" "the loop when we hit the ``NULL`` entry::" msgstr "" -#: ../../../library/ctypes.rst:1377 +#: ../../../library/ctypes.rst:1380 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:1385 +#: ../../../library/ctypes.rst:1388 msgid "Surprises" msgstr "" -#: ../../../library/ctypes.rst:1387 +#: ../../../library/ctypes.rst:1390 msgid "" "There are some edges in :mod:`!ctypes` where you might expect something " "other than what actually happens." msgstr "" -#: ../../../library/ctypes.rst:1390 +#: ../../../library/ctypes.rst:1393 msgid "Consider the following example::" msgstr "" -#: ../../../library/ctypes.rst:1410 +#: ../../../library/ctypes.rst:1413 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:1418 +#: ../../../library/ctypes.rst:1421 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 " @@ -1471,26 +1473,26 @@ msgid "" "have the expected effect." msgstr "" -#: ../../../library/ctypes.rst:1424 +#: ../../../library/ctypes.rst:1427 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:1428 +#: ../../../library/ctypes.rst:1431 msgid "" "Another example that may behave differently from what one would expect is " "this::" msgstr "" -#: ../../../library/ctypes.rst:1440 +#: ../../../library/ctypes.rst:1443 msgid "" "Objects instantiated from :class:`c_char_p` can only have their value set to " "bytes or integers." msgstr "" -#: ../../../library/ctypes.rst:1443 +#: ../../../library/ctypes.rst:1446 msgid "" "Why is it printing ``False``? ctypes instances are objects containing a " "memory block plus some :term:`descriptor`\\s accessing the contents of the " @@ -1499,17 +1501,17 @@ msgid "" "the contents again constructs a new Python object each time!" msgstr "" -#: ../../../library/ctypes.rst:1453 +#: ../../../library/ctypes.rst:1456 msgid "Variable-sized data types" msgstr "" -#: ../../../library/ctypes.rst:1455 +#: ../../../library/ctypes.rst:1458 msgid "" ":mod:`!ctypes` provides some support for variable-sized arrays and " "structures." msgstr "" -#: ../../../library/ctypes.rst:1457 +#: ../../../library/ctypes.rst:1460 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, " @@ -1518,39 +1520,39 @@ msgid "" "objects type, a :exc:`ValueError` is raised if this is tried::" msgstr "" -#: ../../../library/ctypes.rst:1477 +#: ../../../library/ctypes.rst:1480 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:1489 +#: ../../../library/ctypes.rst:1492 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:1497 +#: ../../../library/ctypes.rst:1500 msgid "ctypes reference" msgstr "" -#: ../../../library/ctypes.rst:1502 +#: ../../../library/ctypes.rst:1505 msgid "Loading shared libraries" msgstr "" -#: ../../../library/ctypes.rst:1504 +#: ../../../library/ctypes.rst:1507 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:1510 +#: ../../../library/ctypes.rst:1513 msgid "Represents a loaded shared library." msgstr "" -#: ../../../library/ctypes.rst:1512 +#: ../../../library/ctypes.rst:1515 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` " @@ -1560,7 +1562,7 @@ msgid "" "PyDLL`." msgstr "" -#: ../../../library/ctypes.rst:1519 +#: ../../../library/ctypes.rst:1522 msgid "" "If you have an existing :py:attr:`handle ` to an " "already loaded shared library, it can be passed as the *handle* argument to " @@ -1569,20 +1571,20 @@ msgid "" "it may be adjusted and/or validated." msgstr "" -#: ../../../library/ctypes.rst:1525 +#: ../../../library/ctypes.rst:1528 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:1529 +#: ../../../library/ctypes.rst:1532 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:1533 +#: ../../../library/ctypes.rst:1536 msgid "" "On Windows, the ``.DLL`` suffix may be missing. (For details, see " "`LoadLibraryExW`_ documentation.) Other platform-specific prefixes and " @@ -1591,7 +1593,7 @@ msgid "" "`ctypes-finding-shared-libraries` for more information." msgstr "" -#: ../../../library/ctypes.rst:1540 +#: ../../../library/ctypes.rst:1543 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 " @@ -1599,23 +1601,23 @@ msgid "" "is more portable.)" msgstr "" -#: ../../../library/ctypes.rst:1546 +#: ../../../library/ctypes.rst:1549 msgid "CPython implementation detail" msgstr "" -#: ../../../library/ctypes.rst:1548 +#: ../../../library/ctypes.rst:1551 msgid "" "Since CPython is linked to ``libc``, a ``None`` *name* is often used to " "access the C standard library::" msgstr "" -#: ../../../library/ctypes.rst:1557 +#: ../../../library/ctypes.rst:1560 msgid "" "To access the Python C API, prefer :py:data:`ctypes.pythonapi` which works " "across platforms." msgstr "" -#: ../../../library/ctypes.rst:1560 +#: ../../../library/ctypes.rst:1563 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 " @@ -1623,7 +1625,7 @@ msgid "" "configurable." msgstr "" -#: ../../../library/ctypes.rst:1565 +#: ../../../library/ctypes.rst:1568 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:`!" @@ -1633,14 +1635,14 @@ msgid "" "private copy, the same happens immediately after the function call." msgstr "" -#: ../../../library/ctypes.rst:1572 +#: ../../../library/ctypes.rst:1575 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:1576 +#: ../../../library/ctypes.rst:1579 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 :" @@ -1649,7 +1651,7 @@ msgid "" "private copy of the windows error code." msgstr "" -#: ../../../library/ctypes.rst:1582 +#: ../../../library/ctypes.rst:1585 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 " @@ -1659,7 +1661,7 @@ msgid "" "ensure the correct library and dependencies are loaded." msgstr "" -#: ../../../library/ctypes.rst:1589 +#: ../../../library/ctypes.rst:1592 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:" @@ -1671,22 +1673,22 @@ msgid "" "determine which one is not found using Windows debugging and tracing tools." msgstr "" -#: ../../../library/ctypes.rst:1601 +#: ../../../library/ctypes.rst:1604 msgid "" "`Microsoft DUMPBIN tool `_ -- A tool to find DLL " "dependents." msgstr "" -#: ../../../library/ctypes.rst:1604 +#: ../../../library/ctypes.rst:1607 msgid "Added *winmode* parameter." msgstr "" -#: ../../../library/ctypes.rst:1609 +#: ../../../library/ctypes.rst:1612 msgid "The *name* parameter can now be a :term:`path-like object`." msgstr "" -#: ../../../library/ctypes.rst:1611 +#: ../../../library/ctypes.rst:1614 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 " @@ -1695,26 +1697,26 @@ msgid "" "hand, accessing it through an index returns a new object each time::" msgstr "" -#: ../../../library/ctypes.rst:1624 +#: ../../../library/ctypes.rst:1627 msgid "" "The following public attributes are available. Their name starts with an " "underscore to not clash with exported function names:" msgstr "" -#: ../../../library/ctypes.rst:1629 +#: ../../../library/ctypes.rst:1632 msgid "The system handle used to access the library." msgstr "" -#: ../../../library/ctypes.rst:1633 +#: ../../../library/ctypes.rst:1636 msgid "The name of the library passed in the constructor." msgstr "" -#: ../../../library/ctypes.rst:1639 ../../../library/ctypes.rst:1656 -#: ../../../library/ctypes.rst:1665 +#: ../../../library/ctypes.rst:1642 ../../../library/ctypes.rst:1659 +#: ../../../library/ctypes.rst:1668 msgid "See :py:class:`~ctypes.CDLL`, the superclass, for common information." msgstr "" -#: ../../../library/ctypes.rst:1641 +#: ../../../library/ctypes.rst:1644 msgid "" "Functions in this library use the ``stdcall`` calling convention, and are " "assumed to return the windows specific :class:`HRESULT` code. :class:" @@ -1723,60 +1725,60 @@ msgid "" "value signals a failure, an :class:`OSError` is automatically raised." msgstr "" -#: ../../../library/ctypes.rst:1647 ../../../library/ctypes.rst:1661 -#: ../../../library/ctypes.rst:1724 ../../../library/ctypes.rst:1731 -#: ../../../library/ctypes.rst:1867 ../../../library/ctypes.rst:2030 -#: ../../../library/ctypes.rst:2082 ../../../library/ctypes.rst:2234 -#: ../../../library/ctypes.rst:2306 ../../../library/ctypes.rst:2315 -#: ../../../library/ctypes.rst:2329 ../../../library/ctypes.rst:2338 -#: ../../../library/ctypes.rst:2347 ../../../library/ctypes.rst:2362 -#: ../../../library/ctypes.rst:2429 ../../../library/ctypes.rst:2456 -#: ../../../library/ctypes.rst:2887 ../../../library/ctypes.rst:3376 +#: ../../../library/ctypes.rst:1650 ../../../library/ctypes.rst:1664 +#: ../../../library/ctypes.rst:1727 ../../../library/ctypes.rst:1734 +#: ../../../library/ctypes.rst:1870 ../../../library/ctypes.rst:2033 +#: ../../../library/ctypes.rst:2085 ../../../library/ctypes.rst:2237 +#: ../../../library/ctypes.rst:2309 ../../../library/ctypes.rst:2318 +#: ../../../library/ctypes.rst:2332 ../../../library/ctypes.rst:2341 +#: ../../../library/ctypes.rst:2350 ../../../library/ctypes.rst:2365 +#: ../../../library/ctypes.rst:2432 ../../../library/ctypes.rst:2459 +#: ../../../library/ctypes.rst:2890 ../../../library/ctypes.rst:3379 msgid "Availability" msgstr "" -#: ../../../library/ctypes.rst:1649 +#: ../../../library/ctypes.rst:1652 msgid "" ":exc:`WindowsError` used to be raised, which is now an alias of :exc:" "`OSError`." msgstr "" -#: ../../../library/ctypes.rst:1658 +#: ../../../library/ctypes.rst:1661 msgid "" "Functions in these libraries use the ``stdcall`` calling convention, and are " "assumed to return :c:expr:`int` by default." msgstr "" -#: ../../../library/ctypes.rst:1667 +#: ../../../library/ctypes.rst:1670 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:1672 +#: ../../../library/ctypes.rst:1675 msgid "Thus, this is only useful to call Python C API functions directly." msgstr "" -#: ../../../library/ctypes.rst:1677 +#: ../../../library/ctypes.rst:1680 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:1683 +#: ../../../library/ctypes.rst:1686 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:1689 +#: ../../../library/ctypes.rst:1692 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:1693 +#: ../../../library/ctypes.rst:1696 msgid "" "Shared libraries can also be loaded by using one of the prefabricated " "objects, which are instances of the :class:`LibraryLoader` class, either by " @@ -1784,13 +1786,13 @@ msgid "" "library as attribute of the loader instance." msgstr "" -#: ../../../library/ctypes.rst:1700 +#: ../../../library/ctypes.rst:1703 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:1703 +#: ../../../library/ctypes.rst:1706 msgid "" ":meth:`!__getattr__` has special behavior: It allows loading a shared " "library by accessing it as attribute of a library loader instance. The " @@ -1798,33 +1800,33 @@ msgid "" "each time." msgstr "" -#: ../../../library/ctypes.rst:1709 +#: ../../../library/ctypes.rst:1712 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:1713 +#: ../../../library/ctypes.rst:1716 msgid "These prefabricated library loaders are available:" msgstr "" -#: ../../../library/ctypes.rst:1717 +#: ../../../library/ctypes.rst:1720 msgid "Creates :class:`CDLL` instances." msgstr "" -#: ../../../library/ctypes.rst:1722 +#: ../../../library/ctypes.rst:1725 msgid "Creates :class:`WinDLL` instances." msgstr "" -#: ../../../library/ctypes.rst:1729 +#: ../../../library/ctypes.rst:1732 msgid "Creates :class:`OleDLL` instances." msgstr "" -#: ../../../library/ctypes.rst:1736 +#: ../../../library/ctypes.rst:1739 msgid "Creates :class:`PyDLL` instances." msgstr "" -#: ../../../library/ctypes.rst:1741 +#: ../../../library/ctypes.rst:1744 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:" @@ -1832,32 +1834,32 @@ msgid "" "correct :attr:`!restype` attribute to use these functions." msgstr "" -#: ../../../library/ctypes.rst:1746 ../../../library/ctypes.rst:1748 +#: ../../../library/ctypes.rst:1749 ../../../library/ctypes.rst:1751 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:1752 ../../../library/ctypes.rst:1754 +#: ../../../library/ctypes.rst:1755 ../../../library/ctypes.rst:1757 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:1758 ../../../library/ctypes.rst:1760 +#: ../../../library/ctypes.rst:1761 ../../../library/ctypes.rst:1763 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:1768 +#: ../../../library/ctypes.rst:1771 msgid "Finding shared libraries" msgstr "" -#: ../../../library/ctypes.rst:1770 +#: ../../../library/ctypes.rst:1773 msgid "" "When programming in a compiled language, shared libraries are accessed when " "compiling/linking a program, and when the program is run. The programmer " @@ -1866,7 +1868,7 @@ msgid "" "library to load." msgstr "" -#: ../../../library/ctypes.rst:1776 +#: ../../../library/ctypes.rst:1779 msgid "" "While the mapping from short names to filenames is not consistently exposed " "by platforms, the :mod:`!ctypes.util` module provides a function, :func:`!" @@ -1875,7 +1877,7 @@ msgid "" "platforms and configurations, the function is :term:`soft deprecated`." msgstr "" -#: ../../../library/ctypes.rst:1783 +#: ../../../library/ctypes.rst:1786 msgid "" "If wrapping a shared library with :mod:`!ctypes`, consider determining the " "shared library name at development time, and hardcoding it into the wrapper " @@ -1885,11 +1887,11 @@ msgid "" "find_library` as a default or fallback." msgstr "" -#: ../../../library/ctypes.rst:1794 +#: ../../../library/ctypes.rst:1797 msgid "Try to find a library and return a pathname." msgstr "" -#: ../../../library/ctypes.rst:1796 +#: ../../../library/ctypes.rst:1799 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 " @@ -1897,24 +1899,24 @@ msgid "" "passing to :py:class:`~ctypes.CDLL`." msgstr "" -#: ../../../library/ctypes.rst:1801 +#: ../../../library/ctypes.rst:1804 msgid "If no library can be found, return ``None``." msgstr "" -#: ../../../library/ctypes.rst:1803 +#: ../../../library/ctypes.rst:1806 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:1810 +#: ../../../library/ctypes.rst:1813 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:1813 +#: ../../../library/ctypes.rst:1816 msgid "" "On Linux, :func:`!find_library` tries to run external programs (``/sbin/" "ldconfig``, ``gcc``, ``objdump`` and ``ld``) to find the library file. If " @@ -1922,69 +1924,69 @@ msgid "" "by Python, the result of this function may be misleading." msgstr "" -#: ../../../library/ctypes.rst:1819 +#: ../../../library/ctypes.rst:1822 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:1823 +#: ../../../library/ctypes.rst:1826 msgid "Here are some examples::" msgstr "" -#: ../../../library/ctypes.rst:1834 +#: ../../../library/ctypes.rst:1837 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:1849 +#: ../../../library/ctypes.rst:1852 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:1856 +#: ../../../library/ctypes.rst:1859 msgid "" "Returns the filename of the VC runtime library used by Python, and by the " "extension modules." msgstr "" -#: ../../../library/ctypes.rst:1859 +#: ../../../library/ctypes.rst:1862 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:1863 +#: ../../../library/ctypes.rst:1866 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:1869 +#: ../../../library/ctypes.rst:1872 msgid "" "This function now always returns ``None``, as there are no more VC runtime " "DLLs that are a single file and supported by Microsoft." msgstr "" -#: ../../../library/ctypes.rst:1877 +#: ../../../library/ctypes.rst:1880 msgid "Listing loaded shared libraries" msgstr "" -#: ../../../library/ctypes.rst:1879 +#: ../../../library/ctypes.rst:1882 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:1883 +#: ../../../library/ctypes.rst:1886 msgid "" "The :mod:`!ctypes.util` module provides the :func:`~ctypes.util.dllist` " "function, which calls the different APIs provided by the various platforms " @@ -1992,7 +1994,7 @@ msgid "" "current process." msgstr "" -#: ../../../library/ctypes.rst:1887 +#: ../../../library/ctypes.rst:1890 msgid "" "The exact output of this function will be system dependent. On most " "platforms, the first entry of this list represents the current process " @@ -2000,11 +2002,11 @@ msgid "" "return may look like::" msgstr "" -#: ../../../library/ctypes.rst:1899 +#: ../../../library/ctypes.rst:1902 msgid "Foreign functions" msgstr "" -#: ../../../library/ctypes.rst:1901 +#: ../../../library/ctypes.rst:1904 msgid "" "As explained in the previous section, foreign functions can be accessed as " "attributes of loaded shared libraries. The function objects created in this " @@ -2013,35 +2015,35 @@ msgid "" "library loader." msgstr "" -#: ../../../library/ctypes.rst:1906 +#: ../../../library/ctypes.rst:1909 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:1920 +#: ../../../library/ctypes.rst:1923 msgid "Base class for C callable foreign functions." msgstr "" -#: ../../../library/ctypes.rst:1922 +#: ../../../library/ctypes.rst:1925 msgid "" "Instances of foreign functions are also C compatible data types; they " "represent C function pointers." msgstr "" -#: ../../../library/ctypes.rst:1925 +#: ../../../library/ctypes.rst:1928 msgid "" "This behavior can be customized by assigning to special attributes of the " "foreign function object." msgstr "" -#: ../../../library/ctypes.rst:1930 +#: ../../../library/ctypes.rst:1933 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:1933 +#: ../../../library/ctypes.rst:1936 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 " @@ -2051,7 +2053,7 @@ msgid "" "callable to the :attr:`errcheck` attribute." msgstr "" -#: ../../../library/ctypes.rst:1942 +#: ../../../library/ctypes.rst:1945 msgid "" "Assign a tuple of ctypes types to specify the argument types that the " "function accepts. Functions using the ``stdcall`` calling convention can " @@ -2060,7 +2062,7 @@ msgid "" "unspecified arguments as well." msgstr "" -#: ../../../library/ctypes.rst:1948 +#: ../../../library/ctypes.rst:1951 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` " @@ -2070,7 +2072,7 @@ msgid "" "object using ctypes conversion rules." msgstr "" -#: ../../../library/ctypes.rst:1955 +#: ../../../library/ctypes.rst:1958 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 " @@ -2078,38 +2080,38 @@ msgid "" "defining adapters that can adapt custom objects as function parameters." msgstr "" -#: ../../../library/ctypes.rst:1962 +#: ../../../library/ctypes.rst:1965 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:1969 +#: ../../../library/ctypes.rst:1972 msgid "" "*result* is what the foreign function returns, as specified by the :attr:`!" "restype` attribute." msgstr "" -#: ../../../library/ctypes.rst:1972 +#: ../../../library/ctypes.rst:1975 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:1976 +#: ../../../library/ctypes.rst:1979 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:1980 +#: ../../../library/ctypes.rst:1983 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:1985 ../../../library/ctypes.rst:1987 +#: ../../../library/ctypes.rst:1988 ../../../library/ctypes.rst:1990 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 " @@ -2118,18 +2120,18 @@ msgid "" "hook to replace the exception with its own." msgstr "" -#: ../../../library/ctypes.rst:1993 ../../../library/ctypes.rst:1995 +#: ../../../library/ctypes.rst:1996 ../../../library/ctypes.rst:1998 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:2002 +#: ../../../library/ctypes.rst:2005 msgid "Function prototypes" msgstr "" -#: ../../../library/ctypes.rst:2004 +#: ../../../library/ctypes.rst:2007 msgid "" "Foreign functions can also be created by instantiating function prototypes. " "Function prototypes are similar to function prototypes in C; they describe a " @@ -2140,7 +2142,7 @@ msgid "" "``@wrapper`` syntax. See :ref:`ctypes-callback-functions` for examples." msgstr "" -#: ../../../library/ctypes.rst:2015 +#: ../../../library/ctypes.rst:2018 msgid "" "The returned function prototype creates functions that use the standard C " "calling convention. The function will release the GIL during the call. If " @@ -2149,37 +2151,37 @@ msgid "" "after the call; *use_last_error* does the same for the Windows error code." msgstr "" -#: ../../../library/ctypes.rst:2025 +#: ../../../library/ctypes.rst:2028 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:2035 +#: ../../../library/ctypes.rst:2038 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:2038 +#: ../../../library/ctypes.rst:2041 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:2045 +#: ../../../library/ctypes.rst:2048 msgid "" "Returns a foreign function at the specified address which must be an integer." msgstr "" -#: ../../../library/ctypes.rst:2052 +#: ../../../library/ctypes.rst:2055 msgid "" "Create a C callable function (a callback function) from a Python *callable*." msgstr "" -#: ../../../library/ctypes.rst:2059 +#: ../../../library/ctypes.rst:2062 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 " @@ -2187,7 +2189,7 @@ msgid "" "small integer. The second item is the shared library instance." msgstr "" -#: ../../../library/ctypes.rst:2069 +#: ../../../library/ctypes.rst:2072 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* " @@ -2195,94 +2197,94 @@ msgid "" "identifier which is used in extended error reporting." msgstr "" -#: ../../../library/ctypes.rst:2074 +#: ../../../library/ctypes.rst:2077 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:2078 +#: ../../../library/ctypes.rst:2081 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:2085 +#: ../../../library/ctypes.rst:2088 msgid "" "The optional *paramflags* parameter creates foreign function wrappers with " "much more functionality than the features described above." msgstr "" -#: ../../../library/ctypes.rst:2088 +#: ../../../library/ctypes.rst:2091 msgid "" "*paramflags* must be a tuple of the same length as :attr:`~_CFuncPtr." "argtypes`." msgstr "" -#: ../../../library/ctypes.rst:2090 +#: ../../../library/ctypes.rst:2093 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:2093 +#: ../../../library/ctypes.rst:2096 msgid "" "The first item is an integer containing a combination of direction flags for " "the parameter:" msgstr "" -#: ../../../library/ctypes.rst:2096 +#: ../../../library/ctypes.rst:2099 msgid "1" msgstr "" -#: ../../../library/ctypes.rst:2097 +#: ../../../library/ctypes.rst:2100 msgid "Specifies an input parameter to the function." msgstr "" -#: ../../../library/ctypes.rst:2099 +#: ../../../library/ctypes.rst:2102 msgid "2" msgstr "" -#: ../../../library/ctypes.rst:2100 +#: ../../../library/ctypes.rst:2103 msgid "Output parameter. The foreign function fills in a value." msgstr "" -#: ../../../library/ctypes.rst:2102 +#: ../../../library/ctypes.rst:2105 msgid "4" msgstr "" -#: ../../../library/ctypes.rst:2103 +#: ../../../library/ctypes.rst:2106 msgid "Input parameter which defaults to the integer zero." msgstr "" -#: ../../../library/ctypes.rst:2105 +#: ../../../library/ctypes.rst:2108 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:2108 +#: ../../../library/ctypes.rst:2111 msgid "The optional third item is the default value for this parameter." msgstr "" -#: ../../../library/ctypes.rst:2111 +#: ../../../library/ctypes.rst:2114 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:2122 ../../../library/ctypes.rst:2145 +#: ../../../library/ctypes.rst:2125 ../../../library/ctypes.rst:2148 msgid "Here is the wrapping with :mod:`!ctypes`::" msgstr "" -#: ../../../library/ctypes.rst:2130 +#: ../../../library/ctypes.rst:2133 msgid "The ``MessageBox`` foreign function can now be called in these ways::" msgstr "" -#: ../../../library/ctypes.rst:2136 +#: ../../../library/ctypes.rst:2139 msgid "" "A second example demonstrates output parameters. The win32 " "``GetWindowRect`` function retrieves the dimensions of a specified window by " @@ -2290,7 +2292,7 @@ msgid "" "the C declaration::" msgstr "" -#: ../../../library/ctypes.rst:2154 +#: ../../../library/ctypes.rst:2157 msgid "" "Functions with output parameters will automatically return the output " "parameter value if there is a single one, or a tuple containing the output " @@ -2298,7 +2300,7 @@ msgid "" "now returns a RECT instance, when called." msgstr "" -#: ../../../library/ctypes.rst:2159 +#: ../../../library/ctypes.rst:2162 msgid "" "Output parameters can be combined with the :attr:`~_CFuncPtr.errcheck` " "protocol to do further output processing and error checking. The win32 " @@ -2307,7 +2309,7 @@ msgid "" "exception when the api call failed::" msgstr "" -#: ../../../library/ctypes.rst:2172 +#: ../../../library/ctypes.rst:2175 msgid "" "If the :attr:`~_CFuncPtr.errcheck` function returns the argument tuple it " "receives unchanged, :mod:`!ctypes` continues the normal processing it does " @@ -2317,58 +2319,58 @@ msgid "" "take place::" msgstr "" -#: ../../../library/ctypes.rst:2191 +#: ../../../library/ctypes.rst:2194 msgid "Utility functions" msgstr "" -#: ../../../library/ctypes.rst:2195 +#: ../../../library/ctypes.rst:2198 msgid "" "Returns the address of the memory buffer as integer. *obj* must be an " "instance of a ctypes type." msgstr "" -#: ../../../library/ctypes.rst:2198 +#: ../../../library/ctypes.rst:2201 msgid "" "Raises an :ref:`auditing event ` ``ctypes.addressof`` with " "argument ``obj``." msgstr "" -#: ../../../library/ctypes.rst:2203 +#: ../../../library/ctypes.rst:2206 msgid "" "Returns the alignment requirements of a ctypes type. *obj_or_type* must be a " "ctypes type or instance." msgstr "" -#: ../../../library/ctypes.rst:2209 +#: ../../../library/ctypes.rst:2212 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:2213 +#: ../../../library/ctypes.rst:2216 msgid "``byref(obj, offset)`` corresponds to this C code::" msgstr "" -#: ../../../library/ctypes.rst:2217 +#: ../../../library/ctypes.rst:2220 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:2223 +#: ../../../library/ctypes.rst:2226 msgid "" "Copies a COM pointer from *src* to *dst* and returns the Windows specific :c:" "type:`!HRESULT` value." msgstr "" -#: ../../../library/ctypes.rst:2226 +#: ../../../library/ctypes.rst:2229 msgid "" "If *src* is not ``NULL``, its ``AddRef`` method is called, incrementing the " "reference count." msgstr "" -#: ../../../library/ctypes.rst:2229 +#: ../../../library/ctypes.rst:2232 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 " @@ -2376,7 +2378,7 @@ msgid "" "necessary." msgstr "" -#: ../../../library/ctypes.rst:2241 +#: ../../../library/ctypes.rst:2244 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* " @@ -2384,81 +2386,81 @@ msgid "" "as a pointer." msgstr "" -#: ../../../library/ctypes.rst:2250 +#: ../../../library/ctypes.rst:2253 msgid "" "This function creates a mutable character buffer. The returned object is a " "ctypes array of :class:`c_char`." msgstr "" -#: ../../../library/ctypes.rst:2253 +#: ../../../library/ctypes.rst:2256 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:2256 +#: ../../../library/ctypes.rst:2259 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:2260 +#: ../../../library/ctypes.rst:2263 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:2263 +#: ../../../library/ctypes.rst:2266 msgid "" "If both arguments are given, *size* must not be less than ``len(init)``." msgstr "" -#: ../../../library/ctypes.rst:2267 +#: ../../../library/ctypes.rst:2270 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:2285 +#: ../../../library/ctypes.rst:2288 msgid "" "Raises an :ref:`auditing event ` ``ctypes.create_string_buffer`` " "with arguments ``init``, ``size``." msgstr "" -#: ../../../library/ctypes.rst:2291 +#: ../../../library/ctypes.rst:2294 msgid "" "This function creates a mutable unicode character buffer. The returned " "object is a ctypes array of :class:`c_wchar`." msgstr "" -#: ../../../library/ctypes.rst:2294 +#: ../../../library/ctypes.rst:2297 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:2297 +#: ../../../library/ctypes.rst:2300 msgid "" "Raises an :ref:`auditing event ` ``ctypes.create_unicode_buffer`` " "with arguments ``init``, ``size``." msgstr "" -#: ../../../library/ctypes.rst:2302 +#: ../../../library/ctypes.rst:2305 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:2311 +#: ../../../library/ctypes.rst:2314 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:2321 +#: ../../../library/ctypes.rst:2324 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. " @@ -2466,72 +2468,72 @@ msgid "" "The exact functionality is system dependent." msgstr "" -#: ../../../library/ctypes.rst:2326 +#: ../../../library/ctypes.rst:2329 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:2334 +#: ../../../library/ctypes.rst:2337 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:2343 +#: ../../../library/ctypes.rst:2346 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:2352 +#: ../../../library/ctypes.rst:2355 msgid "" "Returns the current value of the ctypes-private copy of the system :data:" "`errno` variable in the calling thread." msgstr "" -#: ../../../library/ctypes.rst:2355 +#: ../../../library/ctypes.rst:2358 msgid "" "Raises an :ref:`auditing event ` ``ctypes.get_errno`` with no " "arguments." msgstr "" -#: ../../../library/ctypes.rst:2359 +#: ../../../library/ctypes.rst:2362 msgid "" "Returns the current value of the ctypes-private copy of the system :data:`!" "LastError` variable in the calling thread." msgstr "" -#: ../../../library/ctypes.rst:2364 +#: ../../../library/ctypes.rst:2367 msgid "" "Raises an :ref:`auditing event ` ``ctypes.get_last_error`` with no " "arguments." msgstr "" -#: ../../../library/ctypes.rst:2369 +#: ../../../library/ctypes.rst:2372 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:2376 +#: ../../../library/ctypes.rst:2379 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:2383 +#: ../../../library/ctypes.rst:2386 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:2389 +#: ../../../library/ctypes.rst:2392 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 " @@ -2540,19 +2542,19 @@ msgid "" "relying on implementation details that may change in future Python versions." msgstr "" -#: ../../../library/ctypes.rst:2400 +#: ../../../library/ctypes.rst:2403 msgid "" "Create a new pointer instance, pointing to *obj*. The returned object is of " "the type ``POINTER(type(obj))``." msgstr "" -#: ../../../library/ctypes.rst:2403 +#: ../../../library/ctypes.rst:2406 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:2409 +#: ../../../library/ctypes.rst:2412 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 " @@ -2560,50 +2562,50 @@ msgid "" "but it is possible to enlarge the buffer." msgstr "" -#: ../../../library/ctypes.rst:2417 +#: ../../../library/ctypes.rst:2420 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:2420 +#: ../../../library/ctypes.rst:2423 msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_errno`` with " "argument ``errno``." msgstr "" -#: ../../../library/ctypes.rst:2425 +#: ../../../library/ctypes.rst:2428 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:2431 +#: ../../../library/ctypes.rst:2434 msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_last_error`` with " "argument ``error``." msgstr "" -#: ../../../library/ctypes.rst:2436 +#: ../../../library/ctypes.rst:2439 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:2442 +#: ../../../library/ctypes.rst:2445 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:2446 +#: ../../../library/ctypes.rst:2449 msgid "" "Raises an :ref:`auditing event ` ``ctypes.string_at`` with " "arguments ``ptr``, ``size``." msgstr "" -#: ../../../library/ctypes.rst:2451 +#: ../../../library/ctypes.rst:2454 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 " @@ -2611,39 +2613,39 @@ msgid "" "error." msgstr "" -#: ../../../library/ctypes.rst:2458 +#: ../../../library/ctypes.rst:2461 msgid "" "An instance of :exc:`WindowsError` used to be created, which is now an alias " "of :exc:`OSError`." msgstr "" -#: ../../../library/ctypes.rst:2465 +#: ../../../library/ctypes.rst:2468 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:2470 +#: ../../../library/ctypes.rst:2473 msgid "" "Raises an :ref:`auditing event ` ``ctypes.wstring_at`` with " "arguments ``ptr``, ``size``." msgstr "" -#: ../../../library/ctypes.rst:2475 +#: ../../../library/ctypes.rst:2478 msgid "" "Return a :class:`memoryview` object of length *size* that references memory " "starting at *void \\*ptr*." msgstr "" -#: ../../../library/ctypes.rst:2478 +#: ../../../library/ctypes.rst:2481 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:2483 +#: ../../../library/ctypes.rst:2486 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 " @@ -2653,17 +2655,17 @@ msgid "" "`~ctypes.byref` object.)" msgstr "" -#: ../../../library/ctypes.rst:2490 +#: ../../../library/ctypes.rst:2493 msgid "" "Raises an :ref:`auditing event ` ``ctypes.memoryview_at`` with " "arguments ``address``, ``size``, ``readonly``." msgstr "" -#: ../../../library/ctypes.rst:2498 +#: ../../../library/ctypes.rst:2501 msgid "Data types" msgstr "" -#: ../../../library/ctypes.rst:2503 +#: ../../../library/ctypes.rst:2506 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 " @@ -2673,13 +2675,13 @@ msgid "" "alive in case the memory block contains pointers." msgstr "" -#: ../../../library/ctypes.rst:2510 +#: ../../../library/ctypes.rst:2513 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:2515 +#: ../../../library/ctypes.rst:2518 msgid "" "This method returns a ctypes instance that shares the buffer of the *source* " "object. The *source* object must support the writeable buffer interface. " @@ -2688,13 +2690,13 @@ msgid "" "exc:`ValueError` is raised." msgstr "" -#: ../../../library/ctypes.rst:2521 ../../../library/ctypes.rst:2531 +#: ../../../library/ctypes.rst:2524 ../../../library/ctypes.rst:2534 msgid "" "Raises an :ref:`auditing event ` ``ctypes.cdata/buffer`` with " "arguments ``pointer``, ``size``, ``offset``." msgstr "" -#: ../../../library/ctypes.rst:2525 +#: ../../../library/ctypes.rst:2528 msgid "" "This method creates a ctypes instance, copying the buffer from the *source* " "object buffer which must be readable. The optional *offset* parameter " @@ -2702,19 +2704,19 @@ msgid "" "If the source buffer is not large enough a :exc:`ValueError` is raised." msgstr "" -#: ../../../library/ctypes.rst:2535 +#: ../../../library/ctypes.rst:2538 msgid "" "This method returns a ctypes type instance using the memory specified by " "*address* which must be an integer." msgstr "" -#: ../../../library/ctypes.rst:2538 ../../../library/ctypes.rst:2540 +#: ../../../library/ctypes.rst:2541 ../../../library/ctypes.rst:2543 msgid "" "This method, and others that indirectly call this method, raises an :ref:" "`auditing event ` ``ctypes.cdata`` with argument ``address``." msgstr "" -#: ../../../library/ctypes.rst:2546 +#: ../../../library/ctypes.rst:2549 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 " @@ -2722,36 +2724,36 @@ msgid "" "object that can be used as a function call parameter." msgstr "" -#: ../../../library/ctypes.rst:2551 +#: ../../../library/ctypes.rst:2554 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:2557 +#: ../../../library/ctypes.rst:2560 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:2561 +#: ../../../library/ctypes.rst:2564 msgid "Common class variables of ctypes data types:" msgstr "" -#: ../../../library/ctypes.rst:2565 +#: ../../../library/ctypes.rst:2568 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:2571 +#: ../../../library/ctypes.rst:2574 msgid "Common instance variables of ctypes data types:" msgstr "" -#: ../../../library/ctypes.rst:2575 +#: ../../../library/ctypes.rst:2578 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:" @@ -2759,13 +2761,13 @@ msgid "" "block." msgstr "" -#: ../../../library/ctypes.rst:2582 +#: ../../../library/ctypes.rst:2585 msgid "" "This read-only variable is true when the ctypes data instance has allocated " "the memory block itself, false otherwise." msgstr "" -#: ../../../library/ctypes.rst:2587 +#: ../../../library/ctypes.rst:2590 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. " @@ -2773,7 +2775,7 @@ msgid "" "dictionary." msgstr "" -#: ../../../library/ctypes.rst:2600 +#: ../../../library/ctypes.rst:2603 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 " @@ -2782,11 +2784,11 @@ msgid "" "types that are not and do not contain pointers can now be pickled." msgstr "" -#: ../../../library/ctypes.rst:2606 +#: ../../../library/ctypes.rst:2609 msgid "Instances have a single attribute:" msgstr "" -#: ../../../library/ctypes.rst:2610 +#: ../../../library/ctypes.rst:2613 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 " @@ -2794,7 +2796,7 @@ msgid "" "bytes object or string." msgstr "" -#: ../../../library/ctypes.rst:2615 +#: ../../../library/ctypes.rst:2618 msgid "" "When the ``value`` attribute is retrieved from a ctypes instance, usually a " "new object is returned each time. :mod:`!ctypes` does *not* implement " @@ -2802,17 +2804,17 @@ msgid "" "true for all other ctypes object instances." msgstr "" -#: ../../../library/ctypes.rst:2620 +#: ../../../library/ctypes.rst:2623 msgid "Each subclass has a class attribute:" msgstr "" -#: ../../../library/ctypes.rst:2624 +#: ../../../library/ctypes.rst:2627 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:2627 +#: ../../../library/ctypes.rst:2630 msgid "" "Types marked \\* in the summary may be (or always are) aliases of a " "different :class:`_SimpleCData` subclass, and will not necessarily use the " @@ -2823,7 +2825,7 @@ msgid "" "code will be unused." msgstr "" -#: ../../../library/ctypes.rst:2638 +#: ../../../library/ctypes.rst:2641 msgid "" "The :mod:`array` and :ref:`struct ` modules, as well as third-" "party modules like `numpy `." msgstr "" -#: ../../../library/ctypes.rst:3162 +#: ../../../library/ctypes.rst:3165 msgid "Offset of the field, in bytes." msgstr "" -#: ../../../library/ctypes.rst:3164 +#: ../../../library/ctypes.rst:3167 msgid "" "For bitfields, this is the offset of the underlying byte-aligned *storage " "unit*; see :attr:`~CField.bit_offset`." msgstr "" -#: ../../../library/ctypes.rst:3169 +#: ../../../library/ctypes.rst:3172 msgid "Size of the field, in bytes." msgstr "" -#: ../../../library/ctypes.rst:3171 +#: ../../../library/ctypes.rst:3174 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:3176 +#: ../../../library/ctypes.rst:3179 msgid "For non-bitfields, equivalent to :attr:`~CField.byte_size`." msgstr "" -#: ../../../library/ctypes.rst:3178 +#: ../../../library/ctypes.rst:3181 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:3185 +#: ../../../library/ctypes.rst:3188 msgid "True if this is a bitfield." msgstr "" -#: ../../../library/ctypes.rst:3190 +#: ../../../library/ctypes.rst:3193 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:3194 +#: ../../../library/ctypes.rst:3197 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:3198 +#: ../../../library/ctypes.rst:3201 msgid "" "For non-bitfields, :attr:`!bit_offset` is zero and :attr:`!bit_size` is " "equal to ``byte_size * 8``." msgstr "" -#: ../../../library/ctypes.rst:3203 +#: ../../../library/ctypes.rst:3206 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:3210 +#: ../../../library/ctypes.rst:3213 msgid "" "A :term:`decorator` that allows generating structure types using an " "annotation-based syntax, similar to the :mod:`dataclasses` module." msgstr "" -#: ../../../library/ctypes.rst:3213 +#: ../../../library/ctypes.rst:3216 msgid "For example:" msgstr "" -#: ../../../library/ctypes.rst:3227 +#: ../../../library/ctypes.rst:3230 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:3231 +#: ../../../library/ctypes.rst:3234 msgid "*endian* controls which structure class will be used as the base." msgstr "" -#: ../../../library/ctypes.rst:3233 +#: ../../../library/ctypes.rst:3236 msgid "If *endian* is ``'native'``, :class:`~ctypes.Structure` will be used." msgstr "" -#: ../../../library/ctypes.rst:3234 +#: ../../../library/ctypes.rst:3237 msgid "" "If *endian* is ``'big'``, :class:`~ctypes.BigEndianStructure` will be used." msgstr "" -#: ../../../library/ctypes.rst:3235 +#: ../../../library/ctypes.rst:3238 msgid "" "If *endian* is ``'little'``, :class:`~ctypes.LittleEndianStructure` will be " "used." msgstr "" -#: ../../../library/ctypes.rst:3237 +#: ../../../library/ctypes.rst:3240 msgid "Any other value will raise a :class:`ValueError`." msgstr "" -#: ../../../library/ctypes.rst:3239 +#: ../../../library/ctypes.rst:3242 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:3259 +#: ../../../library/ctypes.rst:3262 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:3263 +#: ../../../library/ctypes.rst:3266 msgid "" "*anonymous* specifies whether the field will be present in the :attr:" "`~ctypes.Structure._anonymous_` attribute of the generated class." msgstr "" -#: ../../../library/ctypes.rst:3266 +#: ../../../library/ctypes.rst:3269 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:3276 +#: ../../../library/ctypes.rst:3279 msgid "Arrays and pointers" msgstr "" -#: ../../../library/ctypes.rst:3280 +#: ../../../library/ctypes.rst:3283 msgid "Abstract base class for arrays." msgstr "" -#: ../../../library/ctypes.rst:3282 +#: ../../../library/ctypes.rst:3285 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 " @@ -3522,48 +3524,48 @@ msgid "" "an :class:`Array`." msgstr "" -#: ../../../library/ctypes.rst:3289 +#: ../../../library/ctypes.rst:3292 msgid "Arrays are :ref:`generic ` over the type of their elements." msgstr "" -#: ../../../library/ctypes.rst:3294 +#: ../../../library/ctypes.rst:3297 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:3301 +#: ../../../library/ctypes.rst:3304 msgid "Specifies the type of each element in the array." msgstr "" -#: ../../../library/ctypes.rst:3304 +#: ../../../library/ctypes.rst:3307 msgid "" "Array subclass constructors accept positional arguments, used to initialize " "the elements in order." msgstr "" -#: ../../../library/ctypes.rst:3309 +#: ../../../library/ctypes.rst:3312 msgid "" "Create an array. Equivalent to ``type * length``, where *type* is a :mod:`!" "ctypes` data type and *length* an integer." msgstr "" -#: ../../../library/ctypes.rst:3313 +#: ../../../library/ctypes.rst:3316 msgid "In favor of multiplication." msgstr "" -#: ../../../library/ctypes.rst:3319 +#: ../../../library/ctypes.rst:3322 msgid "Private, abstract base class for pointers." msgstr "" -#: ../../../library/ctypes.rst:3321 +#: ../../../library/ctypes.rst:3324 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:3325 +#: ../../../library/ctypes.rst:3328 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 :" @@ -3572,43 +3574,43 @@ msgid "" "probably crash with an access violation (if you're lucky)." msgstr "" -#: ../../../library/ctypes.rst:3335 +#: ../../../library/ctypes.rst:3338 msgid "Specifies the type pointed to." msgstr "" -#: ../../../library/ctypes.rst:3339 +#: ../../../library/ctypes.rst:3342 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:3346 +#: ../../../library/ctypes.rst:3349 msgid "Exceptions" msgstr "" -#: ../../../library/ctypes.rst:3350 +#: ../../../library/ctypes.rst:3353 msgid "" "This exception is raised when a foreign function call cannot convert one of " "the passed arguments." msgstr "" -#: ../../../library/ctypes.rst:3356 +#: ../../../library/ctypes.rst:3359 msgid "This exception is raised when a COM method call failed." msgstr "" -#: ../../../library/ctypes.rst:3360 +#: ../../../library/ctypes.rst:3363 msgid "The integer value representing the error code." msgstr "" -#: ../../../library/ctypes.rst:3364 +#: ../../../library/ctypes.rst:3367 msgid "The error message." msgstr "" -#: ../../../library/ctypes.rst:3368 +#: ../../../library/ctypes.rst:3371 msgid "The 5-tuple ``(descr, source, helpfile, helpcontext, progid)``." msgstr "" -#: ../../../library/ctypes.rst:3370 +#: ../../../library/ctypes.rst:3373 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.pot b/main/locale/pot/LC_MESSAGES/library/curses.pot index b30a7b170dc..d598975359d 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-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -579,7 +579,7 @@ msgid "" "const:`BUTTON_ALT`." msgstr "" -#: ../../../library/curses.rst:468 ../../../library/curses.rst:2809 +#: ../../../library/curses.rst:468 ../../../library/curses.rst:2810 msgid "" "The ``BUTTON5_*`` constants are now exposed if they are provided by the " "underlying curses library." @@ -618,7 +618,7 @@ msgid "" "Availability: if the underlying curses library provides ``has_mouse()``." msgstr "" -#: ../../../library/curses.rst:502 ../../../library/curses.rst:2819 +#: ../../../library/curses.rst:502 ../../../library/curses.rst:2820 msgid "Color" msgstr "" @@ -1575,7 +1575,7 @@ msgid "" "so the result can be written back unchanged with :meth:`addstr`." msgstr "" -#: ../../../library/curses.rst:1450 ../../../library/curses.rst:2315 +#: ../../../library/curses.rst:1450 ../../../library/curses.rst:2316 msgid "Attributes" msgstr "" @@ -2293,102 +2293,103 @@ msgstr "" #: ../../../library/curses.rst:2005 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`)." +"Encoding used to encode the string arguments of the methods and to decode " +"their results on a build without wide-character support. 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:2014 +#: ../../../library/curses.rst:2015 msgid "" "Write all data associated with the window into the provided file object. " "This information can be later retrieved using the :func:`getwin` function." msgstr "" -#: ../../../library/curses.rst:2019 +#: ../../../library/curses.rst:2020 msgid "" "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:2024 +#: ../../../library/curses.rst:2025 msgid "" "Availability: if the underlying curses library provides ``use_window()``." msgstr "" -#: ../../../library/curses.rst:2030 +#: ../../../library/curses.rst:2031 msgid "State queries" msgstr "" -#: ../../../library/curses.rst:2034 +#: ../../../library/curses.rst:2035 msgid "Return the current value set by :meth:`clearok`." msgstr "" -#: ../../../library/curses.rst:2040 +#: ../../../library/curses.rst:2041 msgid "Return the current value set by :meth:`idcok`." msgstr "" -#: ../../../library/curses.rst:2046 +#: ../../../library/curses.rst:2047 msgid "Return the current value set by :meth:`idlok`." msgstr "" -#: ../../../library/curses.rst:2052 +#: ../../../library/curses.rst:2053 msgid "Return the current value set by :meth:`immedok`." msgstr "" -#: ../../../library/curses.rst:2058 +#: ../../../library/curses.rst:2059 msgid "Return the current value set by :meth:`keypad`." msgstr "" -#: ../../../library/curses.rst:2064 +#: ../../../library/curses.rst:2065 msgid "Return the current value set by :meth:`leaveok`." msgstr "" -#: ../../../library/curses.rst:2070 +#: ../../../library/curses.rst:2071 msgid "" "Return ``True`` if the specified line was modified since the last call to :" "meth:`refresh`; otherwise return ``False``. Raise a :exc:`curses.error` " "exception if *line* is not valid for the given window." msgstr "" -#: ../../../library/curses.rst:2076 +#: ../../../library/curses.rst:2077 msgid "Return the current value set by :meth:`nodelay`." msgstr "" -#: ../../../library/curses.rst:2082 +#: ../../../library/curses.rst:2083 msgid "Return the current value set by :meth:`notimeout`." msgstr "" -#: ../../../library/curses.rst:2088 +#: ../../../library/curses.rst:2089 msgid "Return ``True`` if the window is a pad created by :func:`newpad`." msgstr "" -#: ../../../library/curses.rst:2094 +#: ../../../library/curses.rst:2095 msgid "Return the current value set by :meth:`scrollok`." msgstr "" -#: ../../../library/curses.rst:2100 +#: ../../../library/curses.rst:2101 msgid "" "Return ``True`` if the window is a subwindow created by :meth:`subwin` or :" "meth:`derwin`." msgstr "" -#: ../../../library/curses.rst:2107 +#: ../../../library/curses.rst:2108 msgid "Return the current value set by :meth:`syncok`." msgstr "" -#: ../../../library/curses.rst:2113 +#: ../../../library/curses.rst:2114 msgid "" "Return ``True`` if the specified window was modified since the last call to :" "meth:`refresh`; otherwise return ``False``." msgstr "" -#: ../../../library/curses.rst:2119 +#: ../../../library/curses.rst:2120 msgid "Screen objects" msgstr "" -#: ../../../library/curses.rst:2123 +#: ../../../library/curses.rst:2124 msgid "" "A *screen* object represents a terminal initialized by :func:`newterm` (or :" "func:`new_prescr`), in addition to the default screen created by :func:" @@ -2396,14 +2397,14 @@ msgid "" "instantiated directly." msgstr "" -#: ../../../library/curses.rst:2129 +#: ../../../library/curses.rst:2130 msgid "" "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:2139 +#: ../../../library/curses.rst:2140 msgid "" "Detach the screen's standard window, breaking the reference cycle between " "them so the screen can be reclaimed promptly instead of waiting for a " @@ -2412,36 +2413,36 @@ msgid "" "released once it and all its windows are no longer referenced." msgstr "" -#: ../../../library/curses.rst:2153 +#: ../../../library/curses.rst:2154 msgid "" "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:2160 +#: ../../../library/curses.rst:2161 msgid "" "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:2165 +#: ../../../library/curses.rst:2166 msgid "" "Availability: if the underlying curses library provides ``use_screen()``." msgstr "" -#: ../../../library/curses.rst:2173 +#: ../../../library/curses.rst:2174 msgid "Complex character objects" msgstr "" -#: ../../../library/curses.rst:2177 +#: ../../../library/curses.rst:2178 msgid "" "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:2181 +#: ../../../library/curses.rst:2182 msgid "" "*text* is the cell's text, *attr* a combination of the :ref:`WA_* attributes " "` (equivalent to the matching ``A_*`` constants), and " @@ -2450,7 +2451,7 @@ msgid "" "separately and is not limited to the value that fits in a :func:`color_pair`." msgstr "" -#: ../../../library/curses.rst:2188 +#: ../../../library/curses.rst:2189 msgid "" "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 " @@ -2460,13 +2461,13 @@ msgid "" "rendition, so it cannot be combined with an explicit *attr* argument." msgstr "" -#: ../../../library/curses.rst:2196 +#: ../../../library/curses.rst:2197 msgid "" ":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:2199 +#: ../../../library/curses.rst:2200 msgid "" "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 " @@ -2474,22 +2475,22 @@ msgid "" "limited to the value that fits in a :func:`color_pair`." msgstr "" -#: ../../../library/curses.rst:2206 +#: ../../../library/curses.rst:2207 msgid "The attributes of the character cell (read-only)." msgstr "" -#: ../../../library/curses.rst:2210 +#: ../../../library/curses.rst:2211 msgid "The color pair number of the character cell (read-only)." msgstr "" -#: ../../../library/curses.rst:2217 +#: ../../../library/curses.rst:2218 msgid "" "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:2221 +#: ../../../library/curses.rst:2222 msgid "" "If *cells* is a string, it is split into character cells (each a spacing " "character optionally followed by combining characters), and *attr* (a " @@ -2497,21 +2498,21 @@ msgid "" "(a color pair number), if given, are applied to every cell." msgstr "" -#: ../../../library/curses.rst:2226 +#: ../../../library/curses.rst:2227 msgid "" "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:2230 +#: ../../../library/curses.rst:2231 msgid "" "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:2235 +#: ../../../library/curses.rst:2236 msgid "" "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 " @@ -2521,48 +2522,48 @@ msgid "" "hashable." msgstr "" -#: ../../../library/curses.rst:2242 +#: ../../../library/curses.rst:2243 msgid "" "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:2246 +#: ../../../library/curses.rst:2247 msgid "" "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:2253 +#: ../../../library/curses.rst:2254 msgid "Constants" msgstr "" -#: ../../../library/curses.rst:2256 +#: ../../../library/curses.rst:2257 msgid "General" msgstr "" -#: ../../../library/curses.rst:2258 +#: ../../../library/curses.rst:2259 msgid "The :mod:`!curses` module defines the following data members:" msgstr "" -#: ../../../library/curses.rst:2263 +#: ../../../library/curses.rst:2264 msgid "" "Some curses routines that return an integer, such as :meth:`~window." "getch`, return :const:`ERR` upon failure." msgstr "" -#: ../../../library/curses.rst:2269 +#: ../../../library/curses.rst:2270 msgid "" "Some curses routines that return an integer, such as :func:`napms`, " "return :const:`OK` upon success." msgstr "" -#: ../../../library/curses.rst:2275 +#: ../../../library/curses.rst:2276 msgid "A bytes object representing the current version of the module." msgstr "" -#: ../../../library/curses.rst:2280 +#: ../../../library/curses.rst:2281 msgid "" "A named tuple containing the three components of the ncurses library " "version: *major*, *minor*, and *patch*. All values are integers. The " @@ -2570,129 +2571,129 @@ msgid "" "is equivalent to ``curses.ncurses_version.major`` and so on." msgstr "" -#: ../../../library/curses.rst:2285 +#: ../../../library/curses.rst:2286 msgid "Availability: if the ncurses library is used." msgstr "" -#: ../../../library/curses.rst:2291 +#: ../../../library/curses.rst:2292 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:2296 +#: ../../../library/curses.rst:2297 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:2301 +#: ../../../library/curses.rst:2302 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:2308 +#: ../../../library/curses.rst:2309 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:2317 +#: ../../../library/curses.rst:2318 msgid "" "Some constants are available to specify character cell attributes. The exact " "constants available are system dependent." msgstr "" -#: ../../../library/curses.rst:2323 +#: ../../../library/curses.rst:2324 msgid "Attribute" msgstr "" -#: ../../../library/curses.rst:2323 +#: ../../../library/curses.rst:2324 msgid "Wide attribute" msgstr "" -#: ../../../library/curses.rst:2323 ../../../library/curses.rst:2380 -#: ../../../library/curses.rst:2640 ../../../library/curses.rst:2737 -#: ../../../library/curses.rst:2790 +#: ../../../library/curses.rst:2324 ../../../library/curses.rst:2381 +#: ../../../library/curses.rst:2641 ../../../library/curses.rst:2738 +#: ../../../library/curses.rst:2791 msgid "Meaning" msgstr "" -#: ../../../library/curses.rst:2325 +#: ../../../library/curses.rst:2326 msgid "Alternate character set mode" msgstr "" -#: ../../../library/curses.rst:2327 +#: ../../../library/curses.rst:2328 msgid "Blink mode" msgstr "" -#: ../../../library/curses.rst:2329 +#: ../../../library/curses.rst:2330 msgid "Bold mode" msgstr "" -#: ../../../library/curses.rst:2331 +#: ../../../library/curses.rst:2332 msgid "Dim mode" msgstr "" -#: ../../../library/curses.rst:2333 +#: ../../../library/curses.rst:2334 msgid "Invisible or blank mode" msgstr "" -#: ../../../library/curses.rst:2335 +#: ../../../library/curses.rst:2336 msgid "Italic mode" msgstr "" -#: ../../../library/curses.rst:2337 +#: ../../../library/curses.rst:2338 msgid "Normal attribute" msgstr "" -#: ../../../library/curses.rst:2339 +#: ../../../library/curses.rst:2340 msgid "Protected mode" msgstr "" -#: ../../../library/curses.rst:2341 +#: ../../../library/curses.rst:2342 msgid "Reverse background and foreground colors" msgstr "" -#: ../../../library/curses.rst:2343 +#: ../../../library/curses.rst:2344 msgid "Standout mode" msgstr "" -#: ../../../library/curses.rst:2345 +#: ../../../library/curses.rst:2346 msgid "Underline mode" msgstr "" -#: ../../../library/curses.rst:2347 +#: ../../../library/curses.rst:2348 msgid "Horizontal highlight" msgstr "" -#: ../../../library/curses.rst:2349 +#: ../../../library/curses.rst:2350 msgid "Left highlight" msgstr "" -#: ../../../library/curses.rst:2351 +#: ../../../library/curses.rst:2352 msgid "Low highlight" msgstr "" -#: ../../../library/curses.rst:2353 +#: ../../../library/curses.rst:2354 msgid "Right highlight" msgstr "" -#: ../../../library/curses.rst:2355 +#: ../../../library/curses.rst:2356 msgid "Top highlight" msgstr "" -#: ../../../library/curses.rst:2357 +#: ../../../library/curses.rst:2358 msgid "Vertical highlight" msgstr "" -#: ../../../library/curses.rst:2360 +#: ../../../library/curses.rst:2361 msgid "``A_ITALIC`` was added." msgstr "" -#: ../../../library/curses.rst:2363 +#: ../../../library/curses.rst:2364 msgid "" "The :meth:`~window.attr_get`, :meth:`~window.attr_set`, :meth:`~window." "attr_on` and :meth:`~window.attr_off` methods use the parallel set of " @@ -2704,431 +2705,431 @@ msgid "" "with the ``attr_*`` methods." msgstr "" -#: ../../../library/curses.rst:2373 +#: ../../../library/curses.rst:2374 msgid "The ``WA_*`` constants were added." msgstr "" -#: ../../../library/curses.rst:2376 +#: ../../../library/curses.rst:2377 msgid "" "Several constants are available to extract corresponding attributes returned " "by some methods." msgstr "" -#: ../../../library/curses.rst:2380 +#: ../../../library/curses.rst:2381 msgid "Bit-mask" msgstr "" -#: ../../../library/curses.rst:2380 +#: ../../../library/curses.rst:2381 msgid "Wide bit-mask" msgstr "" -#: ../../../library/curses.rst:2382 +#: ../../../library/curses.rst:2383 msgid "Bit-mask to extract attributes" msgstr "" -#: ../../../library/curses.rst:2384 +#: ../../../library/curses.rst:2385 msgid "Bit-mask to extract a character" msgstr "" -#: ../../../library/curses.rst:2386 +#: ../../../library/curses.rst:2387 msgid "Bit-mask to extract color-pair field information" msgstr "" -#: ../../../library/curses.rst:2392 +#: ../../../library/curses.rst:2393 msgid "Keys" msgstr "" -#: ../../../library/curses.rst:2394 +#: ../../../library/curses.rst:2395 msgid "" "Keys are referred to by integer constants with names starting with " "``KEY_``. The exact keycaps available are system dependent." msgstr "" -#: ../../../library/curses.rst:2398 +#: ../../../library/curses.rst:2399 msgid "Key constant" msgstr "" -#: ../../../library/curses.rst:2398 +#: ../../../library/curses.rst:2399 msgid "Key" msgstr "" -#: ../../../library/curses.rst:2400 +#: ../../../library/curses.rst:2401 msgid "Minimum key value" msgstr "" -#: ../../../library/curses.rst:2402 +#: ../../../library/curses.rst:2403 msgid "Break key (unreliable)" msgstr "" -#: ../../../library/curses.rst:2404 +#: ../../../library/curses.rst:2405 msgid "Down-arrow" msgstr "" -#: ../../../library/curses.rst:2406 +#: ../../../library/curses.rst:2407 msgid "Up-arrow" msgstr "" -#: ../../../library/curses.rst:2408 +#: ../../../library/curses.rst:2409 msgid "Left-arrow" msgstr "" -#: ../../../library/curses.rst:2410 +#: ../../../library/curses.rst:2411 msgid "Right-arrow" msgstr "" -#: ../../../library/curses.rst:2412 +#: ../../../library/curses.rst:2413 msgid "Home key (upward+left arrow)" msgstr "" -#: ../../../library/curses.rst:2414 +#: ../../../library/curses.rst:2415 msgid "Backspace (unreliable)" msgstr "" -#: ../../../library/curses.rst:2416 +#: ../../../library/curses.rst:2417 msgid "Function keys. Up to 64 function keys are supported." msgstr "" -#: ../../../library/curses.rst:2419 +#: ../../../library/curses.rst:2420 msgid "Value of function key *n*" msgstr "" -#: ../../../library/curses.rst:2421 +#: ../../../library/curses.rst:2422 msgid "Delete line" msgstr "" -#: ../../../library/curses.rst:2423 +#: ../../../library/curses.rst:2424 msgid "Insert line" msgstr "" -#: ../../../library/curses.rst:2425 +#: ../../../library/curses.rst:2426 msgid "Delete character" msgstr "" -#: ../../../library/curses.rst:2427 +#: ../../../library/curses.rst:2428 msgid "Insert char or enter insert mode" msgstr "" -#: ../../../library/curses.rst:2429 +#: ../../../library/curses.rst:2430 msgid "Exit insert char mode" msgstr "" -#: ../../../library/curses.rst:2431 +#: ../../../library/curses.rst:2432 msgid "Clear screen" msgstr "" -#: ../../../library/curses.rst:2433 +#: ../../../library/curses.rst:2434 msgid "Clear to end of screen" msgstr "" -#: ../../../library/curses.rst:2435 +#: ../../../library/curses.rst:2436 msgid "Clear to end of line" msgstr "" -#: ../../../library/curses.rst:2437 +#: ../../../library/curses.rst:2438 msgid "Scroll 1 line forward" msgstr "" -#: ../../../library/curses.rst:2439 +#: ../../../library/curses.rst:2440 msgid "Scroll 1 line backward (reverse)" msgstr "" -#: ../../../library/curses.rst:2441 +#: ../../../library/curses.rst:2442 msgid "Next page" msgstr "" -#: ../../../library/curses.rst:2443 +#: ../../../library/curses.rst:2444 msgid "Previous page" msgstr "" -#: ../../../library/curses.rst:2445 +#: ../../../library/curses.rst:2446 msgid "Set tab" msgstr "" -#: ../../../library/curses.rst:2447 +#: ../../../library/curses.rst:2448 msgid "Clear tab" msgstr "" -#: ../../../library/curses.rst:2449 +#: ../../../library/curses.rst:2450 msgid "Clear all tabs" msgstr "" -#: ../../../library/curses.rst:2451 +#: ../../../library/curses.rst:2452 msgid "Enter or send (unreliable)" msgstr "" -#: ../../../library/curses.rst:2453 +#: ../../../library/curses.rst:2454 msgid "Soft (partial) reset (unreliable)" msgstr "" -#: ../../../library/curses.rst:2455 +#: ../../../library/curses.rst:2456 msgid "Reset or hard reset (unreliable)" msgstr "" -#: ../../../library/curses.rst:2457 +#: ../../../library/curses.rst:2458 msgid "Print" msgstr "" -#: ../../../library/curses.rst:2459 +#: ../../../library/curses.rst:2460 msgid "Home down or bottom (lower left)" msgstr "" -#: ../../../library/curses.rst:2461 +#: ../../../library/curses.rst:2462 msgid "Upper left of keypad" msgstr "" -#: ../../../library/curses.rst:2463 +#: ../../../library/curses.rst:2464 msgid "Upper right of keypad" msgstr "" -#: ../../../library/curses.rst:2465 +#: ../../../library/curses.rst:2466 msgid "Center of keypad" msgstr "" -#: ../../../library/curses.rst:2467 +#: ../../../library/curses.rst:2468 msgid "Lower left of keypad" msgstr "" -#: ../../../library/curses.rst:2469 +#: ../../../library/curses.rst:2470 msgid "Lower right of keypad" msgstr "" -#: ../../../library/curses.rst:2471 +#: ../../../library/curses.rst:2472 msgid "Back tab" msgstr "" -#: ../../../library/curses.rst:2473 +#: ../../../library/curses.rst:2474 msgid "Beg (beginning)" msgstr "" -#: ../../../library/curses.rst:2475 +#: ../../../library/curses.rst:2476 msgid "Cancel" msgstr "" -#: ../../../library/curses.rst:2477 +#: ../../../library/curses.rst:2478 msgid "Close" msgstr "" -#: ../../../library/curses.rst:2479 +#: ../../../library/curses.rst:2480 msgid "Cmd (command)" msgstr "" -#: ../../../library/curses.rst:2481 +#: ../../../library/curses.rst:2482 msgid "Copy" msgstr "" -#: ../../../library/curses.rst:2483 +#: ../../../library/curses.rst:2484 msgid "Create" msgstr "" -#: ../../../library/curses.rst:2485 +#: ../../../library/curses.rst:2486 msgid "End" msgstr "" -#: ../../../library/curses.rst:2487 +#: ../../../library/curses.rst:2488 msgid "Exit" msgstr "" -#: ../../../library/curses.rst:2489 +#: ../../../library/curses.rst:2490 msgid "Find" msgstr "" -#: ../../../library/curses.rst:2491 +#: ../../../library/curses.rst:2492 msgid "Help" msgstr "" -#: ../../../library/curses.rst:2493 +#: ../../../library/curses.rst:2494 msgid "Mark" msgstr "" -#: ../../../library/curses.rst:2495 +#: ../../../library/curses.rst:2496 msgid "Message" msgstr "" -#: ../../../library/curses.rst:2497 +#: ../../../library/curses.rst:2498 msgid "Move" msgstr "" -#: ../../../library/curses.rst:2499 +#: ../../../library/curses.rst:2500 msgid "Next" msgstr "" -#: ../../../library/curses.rst:2501 +#: ../../../library/curses.rst:2502 msgid "Open" msgstr "" -#: ../../../library/curses.rst:2503 +#: ../../../library/curses.rst:2504 msgid "Options" msgstr "" -#: ../../../library/curses.rst:2505 +#: ../../../library/curses.rst:2506 msgid "Prev (previous)" msgstr "" -#: ../../../library/curses.rst:2507 +#: ../../../library/curses.rst:2508 msgid "Redo" msgstr "" -#: ../../../library/curses.rst:2509 +#: ../../../library/curses.rst:2510 msgid "Ref (reference)" msgstr "" -#: ../../../library/curses.rst:2511 +#: ../../../library/curses.rst:2512 msgid "Refresh" msgstr "" -#: ../../../library/curses.rst:2513 +#: ../../../library/curses.rst:2514 msgid "Replace" msgstr "" -#: ../../../library/curses.rst:2515 +#: ../../../library/curses.rst:2516 msgid "Restart" msgstr "" -#: ../../../library/curses.rst:2517 +#: ../../../library/curses.rst:2518 msgid "Resume" msgstr "" -#: ../../../library/curses.rst:2519 +#: ../../../library/curses.rst:2520 msgid "Save" msgstr "" -#: ../../../library/curses.rst:2521 +#: ../../../library/curses.rst:2522 msgid "Shifted Beg (beginning)" msgstr "" -#: ../../../library/curses.rst:2523 +#: ../../../library/curses.rst:2524 msgid "Shifted Cancel" msgstr "" -#: ../../../library/curses.rst:2525 +#: ../../../library/curses.rst:2526 msgid "Shifted Command" msgstr "" -#: ../../../library/curses.rst:2527 +#: ../../../library/curses.rst:2528 msgid "Shifted Copy" msgstr "" -#: ../../../library/curses.rst:2529 +#: ../../../library/curses.rst:2530 msgid "Shifted Create" msgstr "" -#: ../../../library/curses.rst:2531 +#: ../../../library/curses.rst:2532 msgid "Shifted Delete char" msgstr "" -#: ../../../library/curses.rst:2533 +#: ../../../library/curses.rst:2534 msgid "Shifted Delete line" msgstr "" -#: ../../../library/curses.rst:2535 +#: ../../../library/curses.rst:2536 msgid "Select" msgstr "" -#: ../../../library/curses.rst:2537 +#: ../../../library/curses.rst:2538 msgid "Shifted End" msgstr "" -#: ../../../library/curses.rst:2539 +#: ../../../library/curses.rst:2540 msgid "Shifted Clear line" msgstr "" -#: ../../../library/curses.rst:2541 +#: ../../../library/curses.rst:2542 msgid "Shifted Exit" msgstr "" -#: ../../../library/curses.rst:2543 +#: ../../../library/curses.rst:2544 msgid "Shifted Find" msgstr "" -#: ../../../library/curses.rst:2545 +#: ../../../library/curses.rst:2546 msgid "Shifted Help" msgstr "" -#: ../../../library/curses.rst:2547 +#: ../../../library/curses.rst:2548 msgid "Shifted Home" msgstr "" -#: ../../../library/curses.rst:2549 +#: ../../../library/curses.rst:2550 msgid "Shifted Input" msgstr "" -#: ../../../library/curses.rst:2551 +#: ../../../library/curses.rst:2552 msgid "Shifted Left arrow" msgstr "" -#: ../../../library/curses.rst:2553 +#: ../../../library/curses.rst:2554 msgid "Shifted Message" msgstr "" -#: ../../../library/curses.rst:2555 +#: ../../../library/curses.rst:2556 msgid "Shifted Move" msgstr "" -#: ../../../library/curses.rst:2557 +#: ../../../library/curses.rst:2558 msgid "Shifted Next" msgstr "" -#: ../../../library/curses.rst:2559 +#: ../../../library/curses.rst:2560 msgid "Shifted Options" msgstr "" -#: ../../../library/curses.rst:2561 +#: ../../../library/curses.rst:2562 msgid "Shifted Prev" msgstr "" -#: ../../../library/curses.rst:2563 +#: ../../../library/curses.rst:2564 msgid "Shifted Print" msgstr "" -#: ../../../library/curses.rst:2565 +#: ../../../library/curses.rst:2566 msgid "Shifted Redo" msgstr "" -#: ../../../library/curses.rst:2567 +#: ../../../library/curses.rst:2568 msgid "Shifted Replace" msgstr "" -#: ../../../library/curses.rst:2569 +#: ../../../library/curses.rst:2570 msgid "Shifted Right arrow" msgstr "" -#: ../../../library/curses.rst:2571 +#: ../../../library/curses.rst:2572 msgid "Shifted Resume" msgstr "" -#: ../../../library/curses.rst:2573 +#: ../../../library/curses.rst:2574 msgid "Shifted Save" msgstr "" -#: ../../../library/curses.rst:2575 +#: ../../../library/curses.rst:2576 msgid "Shifted Suspend" msgstr "" -#: ../../../library/curses.rst:2577 +#: ../../../library/curses.rst:2578 msgid "Shifted Undo" msgstr "" -#: ../../../library/curses.rst:2579 +#: ../../../library/curses.rst:2580 msgid "Suspend" msgstr "" -#: ../../../library/curses.rst:2581 +#: ../../../library/curses.rst:2582 msgid "Undo" msgstr "" -#: ../../../library/curses.rst:2583 +#: ../../../library/curses.rst:2584 msgid "Mouse event has occurred" msgstr "" -#: ../../../library/curses.rst:2585 +#: ../../../library/curses.rst:2586 msgid "Terminal resize event" msgstr "" -#: ../../../library/curses.rst:2587 +#: ../../../library/curses.rst:2588 msgid "Maximum key value" msgstr "" -#: ../../../library/curses.rst:2590 +#: ../../../library/curses.rst:2591 msgid "" "On VT100s and their software emulations, such as X terminal emulators, there " "are normally at least four function keys (:const:`KEY_F1 `, :const:" @@ -3140,68 +3141,68 @@ msgid "" "keypad mappings are standard:" msgstr "" -#: ../../../library/curses.rst:2599 +#: ../../../library/curses.rst:2600 msgid "Keycap" msgstr "" -#: ../../../library/curses.rst:2599 ../../../library/curses.rst:2819 -#: ../../../library/curses.rst:2954 +#: ../../../library/curses.rst:2600 ../../../library/curses.rst:2820 +#: ../../../library/curses.rst:2955 msgid "Constant" msgstr "" -#: ../../../library/curses.rst:2601 +#: ../../../library/curses.rst:2602 msgid ":kbd:`Insert`" msgstr "" -#: ../../../library/curses.rst:2601 +#: ../../../library/curses.rst:2602 msgid "KEY_IC" msgstr "" -#: ../../../library/curses.rst:2603 +#: ../../../library/curses.rst:2604 msgid ":kbd:`Delete`" msgstr "" -#: ../../../library/curses.rst:2603 +#: ../../../library/curses.rst:2604 msgid "KEY_DC" msgstr "" -#: ../../../library/curses.rst:2605 +#: ../../../library/curses.rst:2606 msgid ":kbd:`Home`" msgstr "" -#: ../../../library/curses.rst:2605 +#: ../../../library/curses.rst:2606 msgid "KEY_HOME" msgstr "" -#: ../../../library/curses.rst:2607 +#: ../../../library/curses.rst:2608 msgid ":kbd:`End`" msgstr "" -#: ../../../library/curses.rst:2607 +#: ../../../library/curses.rst:2608 msgid "KEY_END" msgstr "" -#: ../../../library/curses.rst:2609 +#: ../../../library/curses.rst:2610 msgid ":kbd:`Page Up`" msgstr "" -#: ../../../library/curses.rst:2609 +#: ../../../library/curses.rst:2610 msgid "KEY_PPAGE" msgstr "" -#: ../../../library/curses.rst:2611 +#: ../../../library/curses.rst:2612 msgid ":kbd:`Page Down`" msgstr "" -#: ../../../library/curses.rst:2611 +#: ../../../library/curses.rst:2612 msgid "KEY_NPAGE" msgstr "" -#: ../../../library/curses.rst:2615 +#: ../../../library/curses.rst:2616 msgid "Alternate character set" msgstr "" -#: ../../../library/curses.rst:2619 +#: ../../../library/curses.rst:2620 msgid "" "The following table lists characters from the alternate character set. These " "are inherited from the VT100 terminal, and will generally be available on " @@ -3209,7 +3210,7 @@ msgid "" "available, curses falls back on a crude printable ASCII approximation." msgstr "" -#: ../../../library/curses.rst:2624 +#: ../../../library/curses.rst:2625 msgid "" "Every character has two names. The ``ACS_*`` code is an integer character, " "restricted to the 8-bit alternate character set of the terminal. The " @@ -3217,198 +3218,198 @@ msgid "" "is not restricted to the alternate character set." msgstr "" -#: ../../../library/curses.rst:2632 +#: ../../../library/curses.rst:2633 msgid "" "These are available only after :func:`initscr` has been called. The " "``WACS_*`` codes are only available if Python is built with wide character " "support." msgstr "" -#: ../../../library/curses.rst:2636 +#: ../../../library/curses.rst:2637 msgid "The ``WACS_*`` codes." msgstr "" -#: ../../../library/curses.rst:2640 +#: ../../../library/curses.rst:2641 msgid "ACS code" msgstr "" -#: ../../../library/curses.rst:2640 ../../../library/curses.rst:2737 +#: ../../../library/curses.rst:2641 ../../../library/curses.rst:2738 msgid "WACS code" msgstr "" -#: ../../../library/curses.rst:2642 +#: ../../../library/curses.rst:2643 msgid "alternate name for upper-right corner" msgstr "" -#: ../../../library/curses.rst:2644 +#: ../../../library/curses.rst:2645 msgid "solid square block" msgstr "" -#: ../../../library/curses.rst:2646 +#: ../../../library/curses.rst:2647 msgid "board of squares" msgstr "" -#: ../../../library/curses.rst:2648 +#: ../../../library/curses.rst:2649 msgid "alternate name for horizontal line" msgstr "" -#: ../../../library/curses.rst:2650 +#: ../../../library/curses.rst:2651 msgid "alternate name for upper-left corner" msgstr "" -#: ../../../library/curses.rst:2652 +#: ../../../library/curses.rst:2653 msgid "alternate name for top tee" msgstr "" -#: ../../../library/curses.rst:2654 +#: ../../../library/curses.rst:2655 msgid "bottom tee" msgstr "" -#: ../../../library/curses.rst:2656 +#: ../../../library/curses.rst:2657 msgid "bullet" msgstr "" -#: ../../../library/curses.rst:2658 +#: ../../../library/curses.rst:2659 msgid "checker board (stipple)" msgstr "" -#: ../../../library/curses.rst:2660 +#: ../../../library/curses.rst:2661 msgid "arrow pointing down" msgstr "" -#: ../../../library/curses.rst:2662 +#: ../../../library/curses.rst:2663 msgid "degree symbol" msgstr "" -#: ../../../library/curses.rst:2664 +#: ../../../library/curses.rst:2665 msgid "diamond" msgstr "" -#: ../../../library/curses.rst:2666 +#: ../../../library/curses.rst:2667 msgid "greater-than-or-equal-to" msgstr "" -#: ../../../library/curses.rst:2668 +#: ../../../library/curses.rst:2669 msgid "horizontal line" msgstr "" -#: ../../../library/curses.rst:2670 +#: ../../../library/curses.rst:2671 msgid "lantern symbol" msgstr "" -#: ../../../library/curses.rst:2672 +#: ../../../library/curses.rst:2673 msgid "left arrow" msgstr "" -#: ../../../library/curses.rst:2674 +#: ../../../library/curses.rst:2675 msgid "less-than-or-equal-to" msgstr "" -#: ../../../library/curses.rst:2676 +#: ../../../library/curses.rst:2677 msgid "lower-left corner" msgstr "" -#: ../../../library/curses.rst:2678 +#: ../../../library/curses.rst:2679 msgid "lower-right corner" msgstr "" -#: ../../../library/curses.rst:2680 +#: ../../../library/curses.rst:2681 msgid "left tee" msgstr "" -#: ../../../library/curses.rst:2682 +#: ../../../library/curses.rst:2683 msgid "not-equal sign" msgstr "" -#: ../../../library/curses.rst:2684 +#: ../../../library/curses.rst:2685 msgid "letter pi" msgstr "" -#: ../../../library/curses.rst:2686 +#: ../../../library/curses.rst:2687 msgid "plus-or-minus sign" msgstr "" -#: ../../../library/curses.rst:2688 +#: ../../../library/curses.rst:2689 msgid "big plus sign" msgstr "" -#: ../../../library/curses.rst:2690 +#: ../../../library/curses.rst:2691 msgid "right arrow" msgstr "" -#: ../../../library/curses.rst:2692 +#: ../../../library/curses.rst:2693 msgid "right tee" msgstr "" -#: ../../../library/curses.rst:2694 +#: ../../../library/curses.rst:2695 msgid "scan line 1" msgstr "" -#: ../../../library/curses.rst:2696 +#: ../../../library/curses.rst:2697 msgid "scan line 3" msgstr "" -#: ../../../library/curses.rst:2698 +#: ../../../library/curses.rst:2699 msgid "scan line 7" msgstr "" -#: ../../../library/curses.rst:2700 +#: ../../../library/curses.rst:2701 msgid "scan line 9" msgstr "" -#: ../../../library/curses.rst:2702 +#: ../../../library/curses.rst:2703 msgid "alternate name for lower-right corner" msgstr "" -#: ../../../library/curses.rst:2704 +#: ../../../library/curses.rst:2705 msgid "alternate name for vertical line" msgstr "" -#: ../../../library/curses.rst:2706 +#: ../../../library/curses.rst:2707 msgid "alternate name for right tee" msgstr "" -#: ../../../library/curses.rst:2708 +#: ../../../library/curses.rst:2709 msgid "alternate name for lower-left corner" msgstr "" -#: ../../../library/curses.rst:2710 +#: ../../../library/curses.rst:2711 msgid "alternate name for bottom tee" msgstr "" -#: ../../../library/curses.rst:2712 +#: ../../../library/curses.rst:2713 msgid "alternate name for left tee" msgstr "" -#: ../../../library/curses.rst:2714 +#: ../../../library/curses.rst:2715 msgid "alternate name for crossover or big plus" msgstr "" -#: ../../../library/curses.rst:2716 +#: ../../../library/curses.rst:2717 msgid "pound sterling" msgstr "" -#: ../../../library/curses.rst:2718 +#: ../../../library/curses.rst:2719 msgid "top tee" msgstr "" -#: ../../../library/curses.rst:2720 +#: ../../../library/curses.rst:2721 msgid "up arrow" msgstr "" -#: ../../../library/curses.rst:2722 +#: ../../../library/curses.rst:2723 msgid "upper-left corner" msgstr "" -#: ../../../library/curses.rst:2724 +#: ../../../library/curses.rst:2725 msgid "upper-right corner" msgstr "" -#: ../../../library/curses.rst:2726 +#: ../../../library/curses.rst:2727 msgid "vertical line" msgstr "" -#: ../../../library/curses.rst:2729 +#: ../../../library/curses.rst:2730 msgid "" "The following table lists the double-line and thick-line characters. They " "have no ``ACS_*`` counterpart, and are not provided by every implementation. " @@ -3417,188 +3418,188 @@ msgid "" "single line, ``D`` for a double line and ``T`` for a thick line." msgstr "" -#: ../../../library/curses.rst:2737 +#: ../../../library/curses.rst:2738 msgid "Alternate name" msgstr "" -#: ../../../library/curses.rst:2739 +#: ../../../library/curses.rst:2740 msgid "double-line bottom tee" msgstr "" -#: ../../../library/curses.rst:2741 +#: ../../../library/curses.rst:2742 msgid "double-line horizontal line" msgstr "" -#: ../../../library/curses.rst:2743 +#: ../../../library/curses.rst:2744 msgid "double-line lower-left corner" msgstr "" -#: ../../../library/curses.rst:2745 +#: ../../../library/curses.rst:2746 msgid "double-line lower-right corner" msgstr "" -#: ../../../library/curses.rst:2747 +#: ../../../library/curses.rst:2748 msgid "double-line left tee" msgstr "" -#: ../../../library/curses.rst:2749 +#: ../../../library/curses.rst:2750 msgid "double-line big plus sign" msgstr "" -#: ../../../library/curses.rst:2751 +#: ../../../library/curses.rst:2752 msgid "double-line right tee" msgstr "" -#: ../../../library/curses.rst:2753 +#: ../../../library/curses.rst:2754 msgid "double-line top tee" msgstr "" -#: ../../../library/curses.rst:2755 +#: ../../../library/curses.rst:2756 msgid "double-line upper-left corner" msgstr "" -#: ../../../library/curses.rst:2757 +#: ../../../library/curses.rst:2758 msgid "double-line upper-right corner" msgstr "" -#: ../../../library/curses.rst:2759 +#: ../../../library/curses.rst:2760 msgid "double-line vertical line" msgstr "" -#: ../../../library/curses.rst:2761 +#: ../../../library/curses.rst:2762 msgid "thick-line bottom tee" msgstr "" -#: ../../../library/curses.rst:2763 +#: ../../../library/curses.rst:2764 msgid "thick-line horizontal line" msgstr "" -#: ../../../library/curses.rst:2765 +#: ../../../library/curses.rst:2766 msgid "thick-line lower-left corner" msgstr "" -#: ../../../library/curses.rst:2767 +#: ../../../library/curses.rst:2768 msgid "thick-line lower-right corner" msgstr "" -#: ../../../library/curses.rst:2769 +#: ../../../library/curses.rst:2770 msgid "thick-line left tee" msgstr "" -#: ../../../library/curses.rst:2771 +#: ../../../library/curses.rst:2772 msgid "thick-line big plus sign" msgstr "" -#: ../../../library/curses.rst:2773 +#: ../../../library/curses.rst:2774 msgid "thick-line right tee" msgstr "" -#: ../../../library/curses.rst:2775 +#: ../../../library/curses.rst:2776 msgid "thick-line top tee" msgstr "" -#: ../../../library/curses.rst:2777 +#: ../../../library/curses.rst:2778 msgid "thick-line upper-left corner" msgstr "" -#: ../../../library/curses.rst:2779 +#: ../../../library/curses.rst:2780 msgid "thick-line upper-right corner" msgstr "" -#: ../../../library/curses.rst:2781 +#: ../../../library/curses.rst:2782 msgid "thick-line vertical line" msgstr "" -#: ../../../library/curses.rst:2785 +#: ../../../library/curses.rst:2786 msgid "Mouse buttons" msgstr "" -#: ../../../library/curses.rst:2787 +#: ../../../library/curses.rst:2788 msgid "" "The following table lists mouse button constants used by :meth:`getmouse`:" msgstr "" -#: ../../../library/curses.rst:2790 +#: ../../../library/curses.rst:2791 msgid "Mouse button constant" msgstr "" -#: ../../../library/curses.rst:2792 +#: ../../../library/curses.rst:2793 msgid "Mouse button *n* pressed" msgstr "" -#: ../../../library/curses.rst:2794 +#: ../../../library/curses.rst:2795 msgid "Mouse button *n* released" msgstr "" -#: ../../../library/curses.rst:2796 +#: ../../../library/curses.rst:2797 msgid "Mouse button *n* clicked" msgstr "" -#: ../../../library/curses.rst:2798 +#: ../../../library/curses.rst:2799 msgid "Mouse button *n* double clicked" msgstr "" -#: ../../../library/curses.rst:2800 +#: ../../../library/curses.rst:2801 msgid "Mouse button *n* triple clicked" msgstr "" -#: ../../../library/curses.rst:2802 +#: ../../../library/curses.rst:2803 msgid "Shift was down during button state change" msgstr "" -#: ../../../library/curses.rst:2804 +#: ../../../library/curses.rst:2805 msgid "Control was down during button state change" msgstr "" -#: ../../../library/curses.rst:2806 +#: ../../../library/curses.rst:2807 msgid "Alt was down during button state change" msgstr "" -#: ../../../library/curses.rst:2814 +#: ../../../library/curses.rst:2815 msgid "Colors" msgstr "" -#: ../../../library/curses.rst:2816 +#: ../../../library/curses.rst:2817 msgid "The following table lists the predefined colors:" msgstr "" -#: ../../../library/curses.rst:2821 +#: ../../../library/curses.rst:2822 msgid "Black" msgstr "" -#: ../../../library/curses.rst:2823 +#: ../../../library/curses.rst:2824 msgid "Blue" msgstr "" -#: ../../../library/curses.rst:2825 +#: ../../../library/curses.rst:2826 msgid "Cyan (light greenish blue)" msgstr "" -#: ../../../library/curses.rst:2827 +#: ../../../library/curses.rst:2828 msgid "Green" msgstr "" -#: ../../../library/curses.rst:2829 +#: ../../../library/curses.rst:2830 msgid "Magenta (purplish red)" msgstr "" -#: ../../../library/curses.rst:2831 +#: ../../../library/curses.rst:2832 msgid "Red" msgstr "" -#: ../../../library/curses.rst:2833 +#: ../../../library/curses.rst:2834 msgid "White" msgstr "" -#: ../../../library/curses.rst:2835 +#: ../../../library/curses.rst:2836 msgid "Yellow" msgstr "" -#: ../../../library/curses.rst:2840 +#: ../../../library/curses.rst:2841 msgid ":mod:`!curses.textpad` --- Text input widget for curses programs" msgstr "" -#: ../../../library/curses.rst:2845 +#: ../../../library/curses.rst:2846 msgid "" "The :mod:`!curses.textpad` module provides a :class:`Textbox` class that " "handles elementary text editing in a curses window, supporting a set of " @@ -3608,11 +3609,11 @@ msgid "" "purposes." msgstr "" -#: ../../../library/curses.rst:2851 +#: ../../../library/curses.rst:2852 msgid "The module :mod:`!curses.textpad` defines the following function:" msgstr "" -#: ../../../library/curses.rst:2856 +#: ../../../library/curses.rst:2857 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 " @@ -3624,15 +3625,15 @@ msgid "" "will be drawn with ASCII dashes, vertical bars, and plus signs." msgstr "" -#: ../../../library/curses.rst:2869 +#: ../../../library/curses.rst:2870 msgid "Textbox objects" msgstr "" -#: ../../../library/curses.rst:2871 +#: ../../../library/curses.rst:2872 msgid "You can instantiate a :class:`Textbox` object as follows:" msgstr "" -#: ../../../library/curses.rst:2876 +#: ../../../library/curses.rst:2877 msgid "" "Return a textbox widget object. The *win* argument should be a curses :ref:" "`window ` object in which the textbox is to be " @@ -3643,18 +3644,18 @@ msgid "" "`stripspaces` flag is initially on." msgstr "" -#: ../../../library/curses.rst:2884 +#: ../../../library/curses.rst:2885 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:2889 +#: ../../../library/curses.rst:2890 msgid ":class:`Textbox` objects have the following methods:" msgstr "" -#: ../../../library/curses.rst:2894 +#: ../../../library/curses.rst:2895 msgid "" "This is the entry point you will normally use. It accepts editing " "keystrokes until one of the termination keystrokes is entered. If " @@ -3665,176 +3666,176 @@ msgid "" "window are included is affected by the :attr:`stripspaces` attribute." msgstr "" -#: ../../../library/curses.rst:2903 +#: ../../../library/curses.rst:2904 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:2910 +#: ../../../library/curses.rst:2911 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:2915 ../../../library/curses.rst:2954 +#: ../../../library/curses.rst:2916 ../../../library/curses.rst:2955 msgid "Keystroke" msgstr "" -#: ../../../library/curses.rst:2915 +#: ../../../library/curses.rst:2916 msgid "Action" msgstr "" -#: ../../../library/curses.rst:2917 +#: ../../../library/curses.rst:2918 msgid ":kbd:`Control-A`" msgstr "" -#: ../../../library/curses.rst:2917 +#: ../../../library/curses.rst:2918 msgid "Go to left edge of window." msgstr "" -#: ../../../library/curses.rst:2919 ../../../library/curses.rst:2956 +#: ../../../library/curses.rst:2920 ../../../library/curses.rst:2957 msgid ":kbd:`Control-B`" msgstr "" -#: ../../../library/curses.rst:2919 +#: ../../../library/curses.rst:2920 msgid "Cursor left, wrapping to previous line if appropriate." msgstr "" -#: ../../../library/curses.rst:2922 +#: ../../../library/curses.rst:2923 msgid ":kbd:`Control-D`" msgstr "" -#: ../../../library/curses.rst:2922 +#: ../../../library/curses.rst:2923 msgid "Delete character under cursor." msgstr "" -#: ../../../library/curses.rst:2924 +#: ../../../library/curses.rst:2925 msgid ":kbd:`Control-E`" msgstr "" -#: ../../../library/curses.rst:2924 +#: ../../../library/curses.rst:2925 msgid "Go to right edge (stripspaces off) or end of line (stripspaces on)." msgstr "" -#: ../../../library/curses.rst:2927 ../../../library/curses.rst:2958 +#: ../../../library/curses.rst:2928 ../../../library/curses.rst:2959 msgid ":kbd:`Control-F`" msgstr "" -#: ../../../library/curses.rst:2927 +#: ../../../library/curses.rst:2928 msgid "Cursor right, wrapping to next line when appropriate." msgstr "" -#: ../../../library/curses.rst:2930 +#: ../../../library/curses.rst:2931 msgid ":kbd:`Control-G`" msgstr "" -#: ../../../library/curses.rst:2930 +#: ../../../library/curses.rst:2931 msgid "Terminate, returning the window contents." msgstr "" -#: ../../../library/curses.rst:2932 +#: ../../../library/curses.rst:2933 msgid ":kbd:`Control-H`" msgstr "" -#: ../../../library/curses.rst:2932 +#: ../../../library/curses.rst:2933 msgid "Delete character backward." msgstr "" -#: ../../../library/curses.rst:2934 +#: ../../../library/curses.rst:2935 msgid ":kbd:`Control-J`" msgstr "" -#: ../../../library/curses.rst:2934 +#: ../../../library/curses.rst:2935 msgid "" "Terminate if the window is 1 line, otherwise move to the start of the next " "line." msgstr "" -#: ../../../library/curses.rst:2938 +#: ../../../library/curses.rst:2939 msgid ":kbd:`Control-K`" msgstr "" -#: ../../../library/curses.rst:2938 +#: ../../../library/curses.rst:2939 msgid "If line is blank, delete it, otherwise clear to end of line." msgstr "" -#: ../../../library/curses.rst:2941 +#: ../../../library/curses.rst:2942 msgid ":kbd:`Control-L`" msgstr "" -#: ../../../library/curses.rst:2941 +#: ../../../library/curses.rst:2942 msgid "Refresh screen." msgstr "" -#: ../../../library/curses.rst:2943 ../../../library/curses.rst:2962 +#: ../../../library/curses.rst:2944 ../../../library/curses.rst:2963 msgid ":kbd:`Control-N`" msgstr "" -#: ../../../library/curses.rst:2943 +#: ../../../library/curses.rst:2944 msgid "Cursor down; move down one line." msgstr "" -#: ../../../library/curses.rst:2945 +#: ../../../library/curses.rst:2946 msgid ":kbd:`Control-O`" msgstr "" -#: ../../../library/curses.rst:2945 +#: ../../../library/curses.rst:2946 msgid "Insert a blank line at cursor location." msgstr "" -#: ../../../library/curses.rst:2947 ../../../library/curses.rst:2960 +#: ../../../library/curses.rst:2948 ../../../library/curses.rst:2961 msgid ":kbd:`Control-P`" msgstr "" -#: ../../../library/curses.rst:2947 +#: ../../../library/curses.rst:2948 msgid "Cursor up; move up one line." msgstr "" -#: ../../../library/curses.rst:2950 +#: ../../../library/curses.rst:2951 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:2956 +#: ../../../library/curses.rst:2957 msgid ":const:`~curses.KEY_LEFT`" msgstr "" -#: ../../../library/curses.rst:2958 +#: ../../../library/curses.rst:2959 msgid ":const:`~curses.KEY_RIGHT`" msgstr "" -#: ../../../library/curses.rst:2960 +#: ../../../library/curses.rst:2961 msgid ":const:`~curses.KEY_UP`" msgstr "" -#: ../../../library/curses.rst:2962 +#: ../../../library/curses.rst:2963 msgid ":const:`~curses.KEY_DOWN`" msgstr "" -#: ../../../library/curses.rst:2964 +#: ../../../library/curses.rst:2965 msgid ":const:`~curses.KEY_BACKSPACE`" msgstr "" -#: ../../../library/curses.rst:2964 +#: ../../../library/curses.rst:2965 msgid ":kbd:`Control-h`" msgstr "" -#: ../../../library/curses.rst:2967 +#: ../../../library/curses.rst:2968 msgid "" "All other keystrokes are treated as a command to insert the given character " "and move right (with line wrapping)." msgstr "" -#: ../../../library/curses.rst:2973 +#: ../../../library/curses.rst:2974 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:2979 +#: ../../../library/curses.rst:2980 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/difflib.pot b/main/locale/pot/LC_MESSAGES/library/difflib.pot index be1d8d72392..0b311287b82 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-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -155,7 +155,7 @@ msgstr "" msgid "Code" msgstr "" -#: ../../../library/difflib.rst:107 ../../../library/difflib.rst:584 +#: ../../../library/difflib.rst:107 ../../../library/difflib.rst:627 msgid "Meaning" msgstr "" @@ -241,17 +241,31 @@ msgid "" "*isjunk* parameter for an explanation." msgstr "" -#: ../../../library/difflib.rst:150 +#: ../../../library/difflib.rst:150 ../../../library/difflib.rst:203 +#: ../../../library/difflib.rst:297 ../../../library/difflib.rst:316 +#: ../../../library/difflib.rst:357 ../../../library/difflib.rst:450 +msgid "" +"Setting the optional *autojunk* argument to ``False`` will turn :ref:" +"`automatic junk heuristic ` off." +msgstr "" + +#: ../../../library/difflib.rst:153 ../../../library/difflib.rst:206 +#: ../../../library/difflib.rst:300 ../../../library/difflib.rst:332 +#: ../../../library/difflib.rst:375 ../../../library/difflib.rst:453 +msgid "Added keyword-only *autojunk* parameter." +msgstr "" + +#: ../../../library/difflib.rst:158 msgid "" ":class:`Differ` objects are used (deltas generated) via a single method:" msgstr "" -#: ../../../library/difflib.rst:155 +#: ../../../library/difflib.rst:163 msgid "" "Compare two sequences of lines, and generate the delta (a sequence of lines)." msgstr "" -#: ../../../library/difflib.rst:157 +#: ../../../library/difflib.rst:165 msgid "" "Each sequence must contain individual single-line strings ending with " "newlines. Such sequences can be obtained from the :meth:`~io.IOBase." @@ -260,7 +274,7 @@ msgid "" "IOBase.writelines` method of a file-like object." msgstr "" -#: ../../../library/difflib.rst:166 +#: ../../../library/difflib.rst:176 msgid "" "This class can be used to create an HTML table (or a complete HTML file " "containing the table) showing a side by side, line by line comparison of " @@ -268,58 +282,58 @@ msgid "" "generated in either full or contextual difference mode." msgstr "" -#: ../../../library/difflib.rst:173 +#: ../../../library/difflib.rst:183 msgid "" "The trailing newlines get stripped before the diff, so the result can be " "incomplete. See :gh:`71896` for details." msgstr "" -#: ../../../library/difflib.rst:176 +#: ../../../library/difflib.rst:186 msgid "The constructor for this class is:" msgstr "" -#: ../../../library/difflib.rst:181 +#: ../../../library/difflib.rst:191 msgid "Initializes instance of :class:`HtmlDiff`." msgstr "" -#: ../../../library/difflib.rst:183 +#: ../../../library/difflib.rst:193 msgid "" "*tabsize* is an optional keyword argument to specify tab stop spacing and " "defaults to ``8``." msgstr "" -#: ../../../library/difflib.rst:186 +#: ../../../library/difflib.rst:196 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:189 +#: ../../../library/difflib.rst:199 msgid "" "*linejunk* and *charjunk* are optional keyword arguments passed into :func:" "`ndiff` (used by :class:`HtmlDiff` to generate the side by side HTML " -"differences). See :func:`ndiff` documentation for argument default values " +"differences). See :func:`ndiff` documentation for argument default values " "and descriptions." msgstr "" -#: ../../../library/difflib.rst:193 +#: ../../../library/difflib.rst:210 msgid "The following methods are public:" msgstr "" -#: ../../../library/difflib.rst:198 +#: ../../../library/difflib.rst:215 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:202 +#: ../../../library/difflib.rst:219 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:205 +#: ../../../library/difflib.rst:222 msgid "" "*context* and *numlines* are both optional keyword arguments. Set *context* " "to ``True`` when contextual differences are to be shown, else the default is " @@ -332,45 +346,45 @@ msgid "" "without any leading context)." msgstr "" -#: ../../../library/difflib.rst:216 +#: ../../../library/difflib.rst:233 msgid "" "*fromdesc* and *todesc* are interpreted as unescaped HTML and should be " "properly escaped while receiving input from untrusted sources." msgstr "" -#: ../../../library/difflib.rst:219 +#: ../../../library/difflib.rst:236 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:225 +#: ../../../library/difflib.rst:242 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:229 +#: ../../../library/difflib.rst:246 msgid "" "The arguments for this method are the same as those for the :meth:" "`make_file` method." msgstr "" -#: ../../../library/difflib.rst:236 +#: ../../../library/difflib.rst:253 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:239 +#: ../../../library/difflib.rst:256 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:243 +#: ../../../library/difflib.rst:260 msgid "" "By default, the diff control lines (those with ``***`` or ``---``) are " "created with a trailing newline. This is helpful so that inputs created " @@ -379,13 +393,13 @@ msgid "" "trailing newlines." msgstr "" -#: ../../../library/difflib.rst:249 ../../../library/difflib.rst:381 +#: ../../../library/difflib.rst:266 ../../../library/difflib.rst:418 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:252 +#: ../../../library/difflib.rst:269 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*, " @@ -394,11 +408,11 @@ msgid "" "default to blanks." msgstr "" -#: ../../../library/difflib.rst:278 ../../../library/difflib.rst:408 +#: ../../../library/difflib.rst:295 ../../../library/difflib.rst:445 msgid "See :ref:`difflib-interface` for a more detailed example." msgstr "" -#: ../../../library/difflib.rst:283 +#: ../../../library/difflib.rst:306 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 " @@ -406,37 +420,37 @@ msgid "" "strings)." msgstr "" -#: ../../../library/difflib.rst:287 +#: ../../../library/difflib.rst:310 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:290 +#: ../../../library/difflib.rst:313 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:293 +#: ../../../library/difflib.rst:319 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:309 +#: ../../../library/difflib.rst:338 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:312 +#: ../../../library/difflib.rst:341 msgid "" "Optional keyword parameters *linejunk* and *charjunk* are filtering " "functions (or ``None``):" msgstr "" -#: ../../../library/difflib.rst:315 +#: ../../../library/difflib.rst:344 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 " @@ -447,7 +461,7 @@ msgid "" "this usually works better than using this function." msgstr "" -#: ../../../library/difflib.rst:323 +#: ../../../library/difflib.rst:352 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-" @@ -455,28 +469,28 @@ msgid "" "characters (a blank or tab; it's a bad idea to include newline in this!)." msgstr "" -#: ../../../library/difflib.rst:344 +#: ../../../library/difflib.rst:360 ../../../library/difflib.rst:387 +msgid "Example:" +msgstr "" + +#: ../../../library/difflib.rst:381 msgid "Return one of the two sequences that generated a delta." msgstr "" -#: ../../../library/difflib.rst:346 +#: ../../../library/difflib.rst:383 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:350 -msgid "Example:" -msgstr "" - -#: ../../../library/difflib.rst:367 +#: ../../../library/difflib.rst:404 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:370 +#: ../../../library/difflib.rst:407 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 " @@ -484,7 +498,7 @@ msgid "" "set by *n* which defaults to three." msgstr "" -#: ../../../library/difflib.rst:375 +#: ../../../library/difflib.rst:412 msgid "" "By default, the diff control lines (those with ``---``, ``+++``, or ``@@``) " "are created with a trailing newline. This is helpful so that inputs created " @@ -493,14 +507,14 @@ msgid "" "trailing newlines." msgstr "" -#: ../../../library/difflib.rst:384 +#: ../../../library/difflib.rst:421 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:388 +#: ../../../library/difflib.rst:425 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*, " @@ -509,18 +523,18 @@ msgid "" "default to blanks." msgstr "" -#: ../../../library/difflib.rst:410 +#: ../../../library/difflib.rst:447 msgid "Added the *color* parameter." msgstr "" -#: ../../../library/difflib.rst:416 +#: ../../../library/difflib.rst:459 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:421 +#: ../../../library/difflib.rst:464 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 " @@ -530,29 +544,29 @@ msgid "" "unknown/inconsistent encodings as *a* and *b*." msgstr "" -#: ../../../library/difflib.rst:434 +#: ../../../library/difflib.rst:477 msgid "Junk definition functions" msgstr "" -#: ../../../library/difflib.rst:438 +#: ../../../library/difflib.rst:481 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:445 +#: ../../../library/difflib.rst:488 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:453 +#: ../../../library/difflib.rst:496 msgid "SequenceMatcher objects" msgstr "" -#: ../../../library/difflib.rst:457 +#: ../../../library/difflib.rst:500 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 " @@ -561,30 +575,30 @@ msgid "" "ignored. For example, pass::" msgstr "" -#: ../../../library/difflib.rst:465 +#: ../../../library/difflib.rst:508 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:468 +#: ../../../library/difflib.rst:511 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:471 +#: ../../../library/difflib.rst:514 msgid "" "The optional argument *autojunk* can be used to disable the automatic junk " "heuristic." msgstr "" -#: ../../../library/difflib.rst:474 +#: ../../../library/difflib.rst:517 msgid "Added the *autojunk* parameter." msgstr "" -#: ../../../library/difflib.rst:477 +#: ../../../library/difflib.rst:520 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-" @@ -594,19 +608,19 @@ msgid "" "`set_seqs` or :meth:`set_seq2`." msgstr "" -#: ../../../library/difflib.rst:484 +#: ../../../library/difflib.rst:527 msgid "The *bjunk* and *bpopular* attributes." msgstr "" -#: ../../../library/difflib.rst:487 +#: ../../../library/difflib.rst:530 msgid ":class:`SequenceMatcher` objects have the following methods:" msgstr "" -#: ../../../library/difflib.rst:491 +#: ../../../library/difflib.rst:534 msgid "Set the two sequences to be compared." msgstr "" -#: ../../../library/difflib.rst:493 +#: ../../../library/difflib.rst:536 msgid "" ":class:`SequenceMatcher` computes and caches detailed information about the " "second sequence, so if you want to compare one sequence against many " @@ -614,23 +628,23 @@ msgid "" "call :meth:`set_seq1` repeatedly, once for each of the other sequences." msgstr "" -#: ../../../library/difflib.rst:501 +#: ../../../library/difflib.rst:544 msgid "" "Set the first sequence to be compared. The second sequence to be compared " "is not changed." msgstr "" -#: ../../../library/difflib.rst:507 +#: ../../../library/difflib.rst:550 msgid "" "Set the second sequence to be compared. The first sequence to be compared " "is not changed." msgstr "" -#: ../../../library/difflib.rst:513 +#: ../../../library/difflib.rst:556 msgid "Find longest matching block in ``a[alo:ahi]`` and ``b[blo:bhi]``." msgstr "" -#: ../../../library/difflib.rst:515 +#: ../../../library/difflib.rst:558 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 " @@ -642,7 +656,7 @@ msgid "" "that starts earliest in *b*." msgstr "" -#: ../../../library/difflib.rst:528 +#: ../../../library/difflib.rst:571 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 " @@ -651,7 +665,7 @@ msgid "" "junk except as identical junk happens to be adjacent to an interesting match." msgstr "" -#: ../../../library/difflib.rst:535 +#: ../../../library/difflib.rst:578 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 " @@ -659,26 +673,26 @@ msgid "" "matches the leftmost ``'abcd'`` in the second sequence:" msgstr "" -#: ../../../library/difflib.rst:544 +#: ../../../library/difflib.rst:587 msgid "If no blocks match, this returns ``(alo, blo, 0)``." msgstr "" -#: ../../../library/difflib.rst:546 +#: ../../../library/difflib.rst:589 msgid "This method returns a :term:`named tuple` ``Match(a, b, size)``." msgstr "" -#: ../../../library/difflib.rst:548 +#: ../../../library/difflib.rst:591 msgid "Added default arguments." msgstr "" -#: ../../../library/difflib.rst:554 +#: ../../../library/difflib.rst:597 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:559 +#: ../../../library/difflib.rst:602 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')`` " @@ -687,7 +701,7 @@ msgid "" "triples always describe non-adjacent equal blocks." msgstr "" -#: ../../../library/difflib.rst:576 +#: ../../../library/difflib.rst:619 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 == " @@ -695,95 +709,95 @@ msgid "" "tuple, and, likewise, *j1* equal to the previous *j2*." msgstr "" -#: ../../../library/difflib.rst:581 +#: ../../../library/difflib.rst:624 msgid "The *tag* values are strings, with these meanings:" msgstr "" -#: ../../../library/difflib.rst:584 +#: ../../../library/difflib.rst:627 msgid "Value" msgstr "" -#: ../../../library/difflib.rst:586 +#: ../../../library/difflib.rst:629 msgid "``'replace'``" msgstr "" -#: ../../../library/difflib.rst:586 +#: ../../../library/difflib.rst:629 msgid "``a[i1:i2]`` should be replaced by ``b[j1:j2]``." msgstr "" -#: ../../../library/difflib.rst:589 +#: ../../../library/difflib.rst:632 msgid "``'delete'``" msgstr "" -#: ../../../library/difflib.rst:589 +#: ../../../library/difflib.rst:632 msgid "``a[i1:i2]`` should be deleted. Note that ``j1 == j2`` in this case." msgstr "" -#: ../../../library/difflib.rst:592 +#: ../../../library/difflib.rst:635 msgid "``'insert'``" msgstr "" -#: ../../../library/difflib.rst:592 +#: ../../../library/difflib.rst:635 msgid "" "``b[j1:j2]`` should be inserted at ``a[i1:i1]``. Note that ``i1 == i2`` in " "this case." msgstr "" -#: ../../../library/difflib.rst:596 +#: ../../../library/difflib.rst:639 msgid "``'equal'``" msgstr "" -#: ../../../library/difflib.rst:596 +#: ../../../library/difflib.rst:639 msgid "``a[i1:i2] == b[j1:j2]`` (the sub-sequences are equal)." msgstr "" -#: ../../../library/difflib.rst:600 +#: ../../../library/difflib.rst:643 msgid "For example::" msgstr "" -#: ../../../library/difflib.rst:617 +#: ../../../library/difflib.rst:660 msgid "Return a :term:`generator` of groups with up to *n* lines of context." msgstr "" -#: ../../../library/difflib.rst:619 +#: ../../../library/difflib.rst:662 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:623 +#: ../../../library/difflib.rst:666 msgid "The groups are returned in the same format as :meth:`get_opcodes`." msgstr "" -#: ../../../library/difflib.rst:628 +#: ../../../library/difflib.rst:671 msgid "" "Return a measure of the sequences' similarity as a float in the range [0, 1]." msgstr "" -#: ../../../library/difflib.rst:631 +#: ../../../library/difflib.rst:674 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:635 +#: ../../../library/difflib.rst:678 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:643 +#: ../../../library/difflib.rst:686 msgid "Return an upper bound on :meth:`ratio` relatively quickly." msgstr "" -#: ../../../library/difflib.rst:648 +#: ../../../library/difflib.rst:691 msgid "Return an upper bound on :meth:`ratio` very quickly." msgstr "" -#: ../../../library/difflib.rst:651 +#: ../../../library/difflib.rst:694 msgid "" "The three methods that return the ratio of matching to total characters can " "give different results due to differing levels of approximation, although :" @@ -792,32 +806,32 @@ msgid "" "ratio`:" msgstr "" -#: ../../../library/difflib.rst:666 +#: ../../../library/difflib.rst:709 msgid "Examples" msgstr "" -#: ../../../library/difflib.rst:671 +#: ../../../library/difflib.rst:714 msgid "SequenceMatcher examples" msgstr "" -#: ../../../library/difflib.rst:673 +#: ../../../library/difflib.rst:716 msgid "This example compares two strings, considering blanks to be \"junk\":" msgstr "" -#: ../../../library/difflib.rst:679 +#: ../../../library/difflib.rst:722 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:686 +#: ../../../library/difflib.rst:729 msgid "" "If you're only interested in where the sequences match, :meth:" "`~SequenceMatcher.get_matching_blocks` is handy:" msgstr "" -#: ../../../library/difflib.rst:695 +#: ../../../library/difflib.rst:738 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 " @@ -825,30 +839,30 @@ msgid "" "is ``0``." msgstr "" -#: ../../../library/difflib.rst:699 +#: ../../../library/difflib.rst:742 msgid "" "If you want to know how to change the first sequence into the second, use :" "meth:`~SequenceMatcher.get_opcodes`:" msgstr "" -#: ../../../library/difflib.rst:710 +#: ../../../library/difflib.rst:753 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:714 +#: ../../../library/difflib.rst:757 msgid "" "`Simple version control recipe `_ for a small application built with :class:" "`SequenceMatcher`." msgstr "" -#: ../../../library/difflib.rst:722 +#: ../../../library/difflib.rst:765 msgid "Differ example" msgstr "" -#: ../../../library/difflib.rst:724 +#: ../../../library/difflib.rst:767 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 " @@ -856,42 +870,42 @@ msgid "" "objects):" msgstr "" -#: ../../../library/difflib.rst:743 +#: ../../../library/difflib.rst:786 msgid "Next we instantiate a Differ object:" msgstr "" -#: ../../../library/difflib.rst:747 +#: ../../../library/difflib.rst:790 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:751 +#: ../../../library/difflib.rst:794 msgid "Finally, we compare the two:" msgstr "" -#: ../../../library/difflib.rst:755 +#: ../../../library/difflib.rst:798 msgid "``result`` is a list of strings, so let's pretty-print it::" msgstr "" -#: ../../../library/difflib.rst:770 +#: ../../../library/difflib.rst:813 msgid "As a single multi-line string it looks like this::" msgstr "" -#: ../../../library/difflib.rst:789 +#: ../../../library/difflib.rst:832 msgid "A command-line interface to difflib" msgstr "" -#: ../../../library/difflib.rst:791 +#: ../../../library/difflib.rst:834 msgid "" "This example shows how to use difflib to create a ``diff``-like utility." msgstr "" -#: ../../../library/difflib.rst:796 +#: ../../../library/difflib.rst:839 msgid "ndiff example" msgstr "" -#: ../../../library/difflib.rst:798 +#: ../../../library/difflib.rst:841 msgid "This example shows how to use :func:`difflib.ndiff`." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/doctest.pot b/main/locale/pot/LC_MESSAGES/library/doctest.pot index e9cdf4e63ea..74743b8619d 100644 --- a/main/locale/pot/LC_MESSAGES/library/doctest.pot +++ b/main/locale/pot/LC_MESSAGES/library/doctest.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-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1217,6 +1217,13 @@ msgstr "" #: ../../../library/doctest.rst:1165 msgid "" +"Report every example, as in verbose mode, if the test runner reports more " +"than the test names, i.e. its :attr:`~unittest.TestResult.verbosity` is 3 or " +"higher (for example with ``python -m unittest -vv``)." +msgstr "" + +#: ../../../library/doctest.rst:1171 +msgid "" "Under the covers, :func:`DocTestSuite` creates a :class:`unittest.TestSuite` " "out of :class:`!doctest.DocTestCase` instances, and :class:`!DocTestCase` is " "a subclass of :class:`unittest.TestCase`. :class:`!DocTestCase` isn't " @@ -1224,14 +1231,14 @@ msgid "" "questions about the exact details of :mod:`unittest` integration." msgstr "" -#: ../../../library/doctest.rst:1171 +#: ../../../library/doctest.rst:1177 msgid "" "Similarly, :func:`DocFileSuite` creates a :class:`unittest.TestSuite` out " "of :class:`!doctest.DocFileCase` instances, and :class:`!DocFileCase` is a " "subclass of :class:`!DocTestCase`." msgstr "" -#: ../../../library/doctest.rst:1175 +#: ../../../library/doctest.rst:1181 msgid "" "So both ways of creating a :class:`unittest.TestSuite` run instances of :" "class:`!DocTestCase`. This is important for a subtle reason: when you run :" @@ -1244,23 +1251,23 @@ msgid "" "pass options through :mod:`!unittest` to :mod:`!doctest` test runners." msgstr "" -#: ../../../library/doctest.rst:1185 +#: ../../../library/doctest.rst:1191 msgid "" "For this reason, :mod:`!doctest` also supports a notion of :mod:`!doctest` " "reporting flags specific to :mod:`unittest` support, via this function:" msgstr "" -#: ../../../library/doctest.rst:1191 +#: ../../../library/doctest.rst:1197 msgid "Set the :mod:`!doctest` reporting flags to use." msgstr "" -#: ../../../library/doctest.rst:1193 +#: ../../../library/doctest.rst:1199 msgid "" "Argument *flags* takes the :ref:`bitwise OR ` of option flags. See " "section :ref:`doctest-options`. Only \"reporting flags\" can be used." msgstr "" -#: ../../../library/doctest.rst:1196 +#: ../../../library/doctest.rst:1202 msgid "" "This is a module-global setting, and affects all future doctests run by " "module :mod:`unittest`: the :meth:`!runTest` method of :class:`!" @@ -1274,17 +1281,17 @@ msgid "" "`!doctest`'s :mod:`!unittest` reporting flags are ignored." msgstr "" -#: ../../../library/doctest.rst:1207 +#: ../../../library/doctest.rst:1213 msgid "" "The value of the :mod:`unittest` reporting flags in effect before the " "function was called is returned by the function." msgstr "" -#: ../../../library/doctest.rst:1214 +#: ../../../library/doctest.rst:1220 msgid "Advanced API" msgstr "" -#: ../../../library/doctest.rst:1216 +#: ../../../library/doctest.rst:1222 msgid "" "The basic API is a simple wrapper that's intended to make doctest easy to " "use. It is fairly flexible, and should meet most users' needs; however, if " @@ -1292,85 +1299,85 @@ msgid "" "doctest's capabilities, then you should use the advanced API." msgstr "" -#: ../../../library/doctest.rst:1221 +#: ../../../library/doctest.rst:1227 msgid "" "The advanced API revolves around two container classes, which are used to " "store the interactive examples extracted from doctest cases:" msgstr "" -#: ../../../library/doctest.rst:1224 +#: ../../../library/doctest.rst:1230 msgid "" ":class:`Example`: A single Python :term:`statement`, paired with its " "expected output." msgstr "" -#: ../../../library/doctest.rst:1227 +#: ../../../library/doctest.rst:1233 msgid "" ":class:`DocTest`: A collection of :class:`Example`\\ s, typically extracted " "from a single docstring or text file." msgstr "" -#: ../../../library/doctest.rst:1230 +#: ../../../library/doctest.rst:1236 msgid "" "Additional processing classes are defined to find, parse, and run, and check " "doctest examples:" msgstr "" -#: ../../../library/doctest.rst:1233 +#: ../../../library/doctest.rst:1239 msgid "" ":class:`DocTestFinder`: Finds all docstrings in a given module, and uses a :" "class:`DocTestParser` to create a :class:`DocTest` from every docstring that " "contains interactive examples." msgstr "" -#: ../../../library/doctest.rst:1237 +#: ../../../library/doctest.rst:1243 msgid "" ":class:`DocTestParser`: Creates a :class:`DocTest` object from a string " "(such as an object's docstring)." msgstr "" -#: ../../../library/doctest.rst:1240 +#: ../../../library/doctest.rst:1246 msgid "" ":class:`DocTestRunner`: Executes the examples in a :class:`DocTest`, and " "uses an :class:`OutputChecker` to verify their output." msgstr "" -#: ../../../library/doctest.rst:1243 +#: ../../../library/doctest.rst:1249 msgid "" ":class:`OutputChecker`: Compares the actual output from a doctest example " "with the expected output, and decides whether they match." msgstr "" -#: ../../../library/doctest.rst:1246 +#: ../../../library/doctest.rst:1252 msgid "" "The relationships among these processing classes are summarized in the " "following diagram::" msgstr "" -#: ../../../library/doctest.rst:1262 +#: ../../../library/doctest.rst:1268 msgid "DocTest Objects" msgstr "" -#: ../../../library/doctest.rst:1267 +#: ../../../library/doctest.rst:1273 msgid "" "A collection of doctest examples that should be run in a single namespace. " "The constructor arguments are used to initialize the attributes of the same " "names." msgstr "" -#: ../../../library/doctest.rst:1271 +#: ../../../library/doctest.rst:1277 msgid "" ":class:`DocTest` defines the following attributes. They are initialized by " "the constructor, and should not be modified directly." msgstr "" -#: ../../../library/doctest.rst:1277 +#: ../../../library/doctest.rst:1283 msgid "" "A list of :class:`Example` objects encoding the individual interactive " "Python examples that should be run by this test." msgstr "" -#: ../../../library/doctest.rst:1283 +#: ../../../library/doctest.rst:1289 msgid "" "The namespace (aka globals) that the examples should be run in. This is a " "dictionary mapping names to values. Any changes to the namespace made by " @@ -1378,57 +1385,57 @@ msgid "" "`globs` after the test is run." msgstr "" -#: ../../../library/doctest.rst:1291 +#: ../../../library/doctest.rst:1297 msgid "" "A string name identifying the :class:`DocTest`. Typically, this is the name " "of the object or file that the test was extracted from." msgstr "" -#: ../../../library/doctest.rst:1297 +#: ../../../library/doctest.rst:1303 msgid "" "The name of the file that this :class:`DocTest` was extracted from; or " "``None`` if the filename is unknown, or if the :class:`!DocTest` was not " "extracted from a file." msgstr "" -#: ../../../library/doctest.rst:1304 +#: ../../../library/doctest.rst:1310 msgid "" "The line number within :attr:`filename` where this :class:`DocTest` begins, " "or ``None`` if the line number is unavailable. This line number is zero-" "based with respect to the beginning of the file." msgstr "" -#: ../../../library/doctest.rst:1311 +#: ../../../library/doctest.rst:1317 msgid "" "The string that the test was extracted from, or ``None`` if the string is " "unavailable, or if the test was not extracted from a string." msgstr "" -#: ../../../library/doctest.rst:1318 +#: ../../../library/doctest.rst:1324 msgid "Example Objects" msgstr "" -#: ../../../library/doctest.rst:1323 +#: ../../../library/doctest.rst:1329 msgid "" "A single interactive example, consisting of a Python statement and its " "expected output. The constructor arguments are used to initialize the " "attributes of the same names." msgstr "" -#: ../../../library/doctest.rst:1328 +#: ../../../library/doctest.rst:1334 msgid "" ":class:`Example` defines the following attributes. They are initialized by " "the constructor, and should not be modified directly." msgstr "" -#: ../../../library/doctest.rst:1334 +#: ../../../library/doctest.rst:1340 msgid "" "A string containing the example's source code. This source code consists of " "a single Python statement, and always ends with a newline; the constructor " "adds a newline when necessary." msgstr "" -#: ../../../library/doctest.rst:1341 +#: ../../../library/doctest.rst:1347 msgid "" "The expected output from running the example's source code (either from " "stdout, or a traceback in case of exception). :attr:`want` ends with a " @@ -1436,7 +1443,7 @@ msgid "" "The constructor adds a newline when necessary." msgstr "" -#: ../../../library/doctest.rst:1349 +#: ../../../library/doctest.rst:1355 msgid "" "The exception message generated by the example, if the example is expected " "to generate an exception; or ``None`` if it is not expected to generate an " @@ -1445,20 +1452,20 @@ msgid "" "unless it's ``None``. The constructor adds a newline if needed." msgstr "" -#: ../../../library/doctest.rst:1358 +#: ../../../library/doctest.rst:1364 msgid "" "The line number within the string containing this example where the example " "begins. This line number is zero-based with respect to the beginning of the " "containing string." msgstr "" -#: ../../../library/doctest.rst:1365 +#: ../../../library/doctest.rst:1371 msgid "" "The example's indentation in the containing string, i.e., the number of " "space characters that precede the example's first prompt." msgstr "" -#: ../../../library/doctest.rst:1371 +#: ../../../library/doctest.rst:1377 msgid "" "A dictionary mapping from option flags to ``True`` or ``False``, which is " "used to override default options for this example. Any option flags not " @@ -1467,11 +1474,11 @@ msgid "" "default, no options are set." msgstr "" -#: ../../../library/doctest.rst:1381 +#: ../../../library/doctest.rst:1387 msgid "DocTestFinder objects" msgstr "" -#: ../../../library/doctest.rst:1386 +#: ../../../library/doctest.rst:1392 msgid "" "A processing class used to extract the :class:`DocTest`\\ s that are " "relevant to a given object, from its docstring and the docstrings of its " @@ -1479,48 +1486,48 @@ msgid "" "classes, functions, methods, staticmethods, classmethods, and properties." msgstr "" -#: ../../../library/doctest.rst:1391 +#: ../../../library/doctest.rst:1397 msgid "" "The optional argument *verbose* can be used to display the objects searched " "by the finder. It defaults to ``False`` (no output)." msgstr "" -#: ../../../library/doctest.rst:1394 +#: ../../../library/doctest.rst:1400 msgid "" "The optional argument *parser* specifies the :class:`DocTestParser` object " "(or a drop-in replacement) that is used to extract doctests from docstrings." msgstr "" -#: ../../../library/doctest.rst:1397 +#: ../../../library/doctest.rst:1403 msgid "" "If the optional argument *recurse* is false, then :meth:`DocTestFinder.find` " "will only examine the given object, and not any contained objects." msgstr "" -#: ../../../library/doctest.rst:1400 +#: ../../../library/doctest.rst:1406 msgid "" "If the optional argument *exclude_empty* is false, then :meth:`DocTestFinder." "find` will include tests for objects with empty docstrings." msgstr "" -#: ../../../library/doctest.rst:1404 +#: ../../../library/doctest.rst:1410 msgid ":class:`DocTestFinder` defines the following method:" msgstr "" -#: ../../../library/doctest.rst:1409 +#: ../../../library/doctest.rst:1415 msgid "" "Return a list of the :class:`DocTest`\\ s that are defined by *obj*'s " "docstring, or by any of its contained objects' docstrings." msgstr "" -#: ../../../library/doctest.rst:1412 +#: ../../../library/doctest.rst:1418 msgid "" "The optional argument *name* specifies the object's name; this name will be " "used to construct names for the returned :class:`DocTest`\\ s. If *name* is " "not specified, then ``obj.__name__`` is used." msgstr "" -#: ../../../library/doctest.rst:1416 +#: ../../../library/doctest.rst:1422 msgid "" "The optional parameter *module* is the module that contains the given " "object. If the module is not specified or is ``None``, then the test finder " @@ -1528,26 +1535,26 @@ msgid "" "module is used:" msgstr "" -#: ../../../library/doctest.rst:1420 +#: ../../../library/doctest.rst:1426 msgid "As a default namespace, if *globs* is not specified." msgstr "" -#: ../../../library/doctest.rst:1422 +#: ../../../library/doctest.rst:1428 msgid "" "To prevent the DocTestFinder from extracting DocTests from objects that are " "imported from other modules. (Contained objects with modules other than " "*module* are ignored.)" msgstr "" -#: ../../../library/doctest.rst:1426 +#: ../../../library/doctest.rst:1432 msgid "To find the name of the file containing the object." msgstr "" -#: ../../../library/doctest.rst:1428 +#: ../../../library/doctest.rst:1434 msgid "To help find the line number of the object within its file." msgstr "" -#: ../../../library/doctest.rst:1430 +#: ../../../library/doctest.rst:1436 msgid "" "If *module* is ``False``, no attempt to find the module will be made. This " "is obscure, of use mostly in testing doctest itself: if *module* is " @@ -1556,7 +1563,7 @@ msgid "" "contained objects will (recursively) be searched for doctests." msgstr "" -#: ../../../library/doctest.rst:1436 +#: ../../../library/doctest.rst:1442 msgid "" "The globals for each :class:`DocTest` is formed by combining *globs* and " "*extraglobs* (bindings in *extraglobs* override bindings in *globs*). A new " @@ -1566,34 +1573,34 @@ msgid "" "is not specified, then it defaults to ``{}``." msgstr "" -#: ../../../library/doctest.rst:1447 +#: ../../../library/doctest.rst:1453 msgid "DocTestParser objects" msgstr "" -#: ../../../library/doctest.rst:1452 +#: ../../../library/doctest.rst:1458 msgid "" "A processing class used to extract interactive examples from a string, and " "use them to create a :class:`DocTest` object." msgstr "" -#: ../../../library/doctest.rst:1456 +#: ../../../library/doctest.rst:1462 msgid ":class:`DocTestParser` defines the following methods:" msgstr "" -#: ../../../library/doctest.rst:1461 +#: ../../../library/doctest.rst:1467 msgid "" "Extract all doctest examples from the given string, and collect them into a :" "class:`DocTest` object." msgstr "" -#: ../../../library/doctest.rst:1464 +#: ../../../library/doctest.rst:1470 msgid "" "*globs*, *name*, *filename*, and *lineno* are attributes for the new :class:" "`!DocTest` object. See the documentation for :class:`DocTest` for more " "information." msgstr "" -#: ../../../library/doctest.rst:1471 +#: ../../../library/doctest.rst:1477 msgid "" "Extract all doctest examples from the given string, and return them as a " "list of :class:`Example` objects. Line numbers are 0-based. The optional " @@ -1601,7 +1608,7 @@ msgid "" "error messages." msgstr "" -#: ../../../library/doctest.rst:1478 +#: ../../../library/doctest.rst:1484 msgid "" "Divide the given string into examples and intervening text, and return them " "as a list of alternating :class:`Example`\\ s and strings. Line numbers for " @@ -1609,33 +1616,33 @@ msgid "" "name identifying this string, and is only used for error messages." msgstr "" -#: ../../../library/doctest.rst:1485 +#: ../../../library/doctest.rst:1491 msgid "TestResults objects" msgstr "" -#: ../../../library/doctest.rst:1492 +#: ../../../library/doctest.rst:1498 msgid "Number of failed tests." msgstr "" -#: ../../../library/doctest.rst:1496 +#: ../../../library/doctest.rst:1502 msgid "Number of attempted tests." msgstr "" -#: ../../../library/doctest.rst:1500 +#: ../../../library/doctest.rst:1506 msgid "Number of skipped tests." msgstr "" -#: ../../../library/doctest.rst:1508 +#: ../../../library/doctest.rst:1514 msgid "DocTestRunner objects" msgstr "" -#: ../../../library/doctest.rst:1513 +#: ../../../library/doctest.rst:1519 msgid "" "A processing class used to execute and verify the interactive examples in a :" "class:`DocTest`." msgstr "" -#: ../../../library/doctest.rst:1516 +#: ../../../library/doctest.rst:1522 msgid "" "The comparison between expected outputs and actual outputs is done by an :" "class:`OutputChecker`. This comparison may be customized with a number of " @@ -1645,7 +1652,7 @@ msgid "" "constructor." msgstr "" -#: ../../../library/doctest.rst:1522 +#: ../../../library/doctest.rst:1528 msgid "" "The test runner's display output can be controlled in two ways. First, an " "output function can be passed to :meth:`run`; this function will be called " @@ -1656,14 +1663,14 @@ msgid "" "meth:`report_unexpected_exception`, and :meth:`report_failure`." msgstr "" -#: ../../../library/doctest.rst:1530 +#: ../../../library/doctest.rst:1536 msgid "" "The optional keyword argument *checker* specifies the :class:`OutputChecker` " "object (or drop-in replacement) that should be used to compare the expected " "outputs to the actual outputs of doctest examples." msgstr "" -#: ../../../library/doctest.rst:1534 +#: ../../../library/doctest.rst:1540 msgid "" "The optional keyword argument *verbose* controls the :class:" "`DocTestRunner`'s verbosity. If *verbose* is ``True``, then information is " @@ -1672,14 +1679,14 @@ msgid "" "verbose output is used iff the command-line switch ``-v`` is used." msgstr "" -#: ../../../library/doctest.rst:1540 +#: ../../../library/doctest.rst:1546 msgid "" "The optional keyword argument *optionflags* can be used to control how the " "test runner compares expected output to actual output, and how it displays " "failures. For more information, see section :ref:`doctest-options`." msgstr "" -#: ../../../library/doctest.rst:1544 +#: ../../../library/doctest.rst:1550 msgid "" "The test runner accumulates statistics. The aggregated number of attempted, " "failed and skipped examples is also available via the :attr:`tries`, :attr:" @@ -1687,60 +1694,60 @@ msgid "" "`summarize` methods return a :class:`TestResults` instance." msgstr "" -#: ../../../library/doctest.rst:1549 +#: ../../../library/doctest.rst:1555 msgid ":class:`DocTestRunner` defines the following methods:" msgstr "" -#: ../../../library/doctest.rst:1554 +#: ../../../library/doctest.rst:1560 msgid "" "Report that the given example was skipped. This method is provided to allow " "subclasses of :class:`DocTestRunner` to customize their output; it should " "not be called directly." msgstr "" -#: ../../../library/doctest.rst:1558 ../../../library/doctest.rst:1571 +#: ../../../library/doctest.rst:1564 ../../../library/doctest.rst:1577 msgid "" "*example* is the example about to be processed. *test* is the test " "containing *example*. *out* is the output function that was passed to :meth:" "`DocTestRunner.run`." msgstr "" -#: ../../../library/doctest.rst:1567 +#: ../../../library/doctest.rst:1573 msgid "" "Report that the test runner is about to process the given example. This " "method is provided to allow subclasses of :class:`DocTestRunner` to " "customize their output; it should not be called directly." msgstr "" -#: ../../../library/doctest.rst:1578 +#: ../../../library/doctest.rst:1584 msgid "" "Report that the given example ran successfully. This method is provided to " "allow subclasses of :class:`DocTestRunner` to customize their output; it " "should not be called directly." msgstr "" -#: ../../../library/doctest.rst:1582 ../../../library/doctest.rst:1593 +#: ../../../library/doctest.rst:1588 ../../../library/doctest.rst:1599 msgid "" "*example* is the example about to be processed. *got* is the actual output " "from the example. *test* is the test containing *example*. *out* is the " "output function that was passed to :meth:`DocTestRunner.run`." msgstr "" -#: ../../../library/doctest.rst:1589 +#: ../../../library/doctest.rst:1595 msgid "" "Report that the given example failed. This method is provided to allow " "subclasses of :class:`DocTestRunner` to customize their output; it should " "not be called directly." msgstr "" -#: ../../../library/doctest.rst:1600 +#: ../../../library/doctest.rst:1606 msgid "" "Report that the given example raised an unexpected exception. This method is " "provided to allow subclasses of :class:`DocTestRunner` to customize their " "output; it should not be called directly." msgstr "" -#: ../../../library/doctest.rst:1604 +#: ../../../library/doctest.rst:1610 msgid "" "*example* is the example about to be processed. *exc_info* is a tuple " "containing information about the unexpected exception (as returned by :func:" @@ -1748,14 +1755,14 @@ msgid "" "output function that was passed to :meth:`DocTestRunner.run`." msgstr "" -#: ../../../library/doctest.rst:1612 +#: ../../../library/doctest.rst:1618 msgid "" "Run the examples in *test* (a :class:`DocTest` object), and display the " "results using the writer function *out*. Return a :class:`TestResults` " "instance." msgstr "" -#: ../../../library/doctest.rst:1616 +#: ../../../library/doctest.rst:1622 msgid "" "The examples are run in the namespace ``test.globs``. If *clear_globs* is " "true (the default), then this namespace will be cleared after the test runs, " @@ -1763,54 +1770,54 @@ msgid "" "after the test completes, then use *clear_globs=False*." msgstr "" -#: ../../../library/doctest.rst:1621 +#: ../../../library/doctest.rst:1627 msgid "" "*compileflags* gives the set of flags that should be used by the Python " "compiler when running the examples. If not specified, then it will default " "to the set of future-import flags that apply to *globs*." msgstr "" -#: ../../../library/doctest.rst:1625 +#: ../../../library/doctest.rst:1631 msgid "" "The output of each example is checked using the :class:`DocTestRunner`'s " "output checker, and the results are formatted by the :meth:`!DocTestRunner." "report_\\*` methods." msgstr "" -#: ../../../library/doctest.rst:1632 +#: ../../../library/doctest.rst:1638 msgid "" "Print a summary of all the test cases that have been run by this " "DocTestRunner, and return a :class:`TestResults` instance." msgstr "" -#: ../../../library/doctest.rst:1635 +#: ../../../library/doctest.rst:1641 msgid "" "The optional *verbose* argument controls how detailed the summary is. If " "the verbosity is not specified, then the :class:`DocTestRunner`'s verbosity " "is used." msgstr "" -#: ../../../library/doctest.rst:1639 +#: ../../../library/doctest.rst:1645 msgid ":class:`DocTestParser` has the following attributes:" msgstr "" -#: ../../../library/doctest.rst:1643 +#: ../../../library/doctest.rst:1649 msgid "Number of attempted examples." msgstr "" -#: ../../../library/doctest.rst:1647 +#: ../../../library/doctest.rst:1653 msgid "Number of failed examples." msgstr "" -#: ../../../library/doctest.rst:1651 +#: ../../../library/doctest.rst:1657 msgid "Number of skipped examples." msgstr "" -#: ../../../library/doctest.rst:1659 +#: ../../../library/doctest.rst:1665 msgid "OutputChecker objects" msgstr "" -#: ../../../library/doctest.rst:1664 +#: ../../../library/doctest.rst:1670 msgid "" "A class used to check the whether the actual output from a doctest example " "matches the expected output. :class:`OutputChecker` defines two methods: :" @@ -1819,11 +1826,11 @@ msgid "" "string describing the differences between two outputs." msgstr "" -#: ../../../library/doctest.rst:1671 +#: ../../../library/doctest.rst:1677 msgid ":class:`OutputChecker` defines the following methods:" msgstr "" -#: ../../../library/doctest.rst:1675 +#: ../../../library/doctest.rst:1681 msgid "" "Return ``True`` iff the actual output from an example (*got*) matches the " "expected output (*want*). These strings are always considered to match if " @@ -1832,28 +1839,28 @@ msgid "" "`doctest-options` for more information about option flags." msgstr "" -#: ../../../library/doctest.rst:1684 +#: ../../../library/doctest.rst:1690 msgid "" "Return a string describing the differences between the expected output for a " "given example (*example*) and the actual output (*got*). *optionflags* is " "the set of option flags used to compare *want* and *got*." msgstr "" -#: ../../../library/doctest.rst:1692 +#: ../../../library/doctest.rst:1698 msgid "Debugging" msgstr "" -#: ../../../library/doctest.rst:1694 +#: ../../../library/doctest.rst:1700 msgid "Doctest provides several mechanisms for debugging doctest examples:" msgstr "" -#: ../../../library/doctest.rst:1696 +#: ../../../library/doctest.rst:1702 msgid "" "Several functions convert doctests to executable Python programs, which can " "be run under the Python debugger, :mod:`pdb`." msgstr "" -#: ../../../library/doctest.rst:1699 +#: ../../../library/doctest.rst:1705 msgid "" "The :class:`DebugRunner` class is a subclass of :class:`DocTestRunner` that " "raises an exception for the first failing example, containing information " @@ -1861,13 +1868,13 @@ msgid "" "debugging on the example." msgstr "" -#: ../../../library/doctest.rst:1704 +#: ../../../library/doctest.rst:1710 msgid "" "The :mod:`unittest` cases generated by :func:`DocTestSuite` support the :" "meth:`debug` method defined by :class:`unittest.TestCase`." msgstr "" -#: ../../../library/doctest.rst:1707 +#: ../../../library/doctest.rst:1713 msgid "" "You can add a call to :func:`pdb.set_trace` in a doctest example, and you'll " "drop into the Python debugger when that line is executed. Then you can " @@ -1875,21 +1882,21 @@ msgid "" "`a.py` contains just this module docstring::" msgstr "" -#: ../../../library/doctest.rst:1722 +#: ../../../library/doctest.rst:1728 msgid "Then an interactive Python session may look like this::" msgstr "" -#: ../../../library/doctest.rst:1755 +#: ../../../library/doctest.rst:1761 msgid "" "Functions that convert doctests to Python code, and possibly run the " "synthesized code under the debugger:" msgstr "" -#: ../../../library/doctest.rst:1761 +#: ../../../library/doctest.rst:1767 msgid "Convert text with examples to a script." msgstr "" -#: ../../../library/doctest.rst:1763 +#: ../../../library/doctest.rst:1769 msgid "" "Argument *s* is a string containing doctest examples. The string is " "converted to a Python script, where doctest examples in *s* are converted to " @@ -1897,22 +1904,22 @@ msgid "" "generated script is returned as a string. For example, ::" msgstr "" -#: ../../../library/doctest.rst:1778 +#: ../../../library/doctest.rst:1784 msgid "displays::" msgstr "" -#: ../../../library/doctest.rst:1788 +#: ../../../library/doctest.rst:1794 msgid "" "This function is used internally by other functions (see below), but can " "also be useful when you want to transform an interactive Python session into " "a Python script." msgstr "" -#: ../../../library/doctest.rst:1795 +#: ../../../library/doctest.rst:1801 msgid "Convert the doctest for an object to a script." msgstr "" -#: ../../../library/doctest.rst:1797 +#: ../../../library/doctest.rst:1803 msgid "" "Argument *module* is a module object, or dotted name of a module, containing " "the object whose doctests are of interest. Argument *name* is the name " @@ -1922,17 +1929,17 @@ msgid "" "module :file:`a.py` contains a top-level function :func:`!f`, then ::" msgstr "" -#: ../../../library/doctest.rst:1807 +#: ../../../library/doctest.rst:1813 msgid "" "prints a script version of function :func:`!f`'s docstring, with doctests " "converted to code, and the rest placed in comments." msgstr "" -#: ../../../library/doctest.rst:1813 +#: ../../../library/doctest.rst:1819 msgid "Debug the doctests for an object." msgstr "" -#: ../../../library/doctest.rst:1815 +#: ../../../library/doctest.rst:1821 msgid "" "The *module* and *name* arguments are the same as for function :func:" "`testsource` above. The synthesized Python script for the named object's " @@ -1940,13 +1947,13 @@ msgid "" "the control of the Python debugger, :mod:`pdb`." msgstr "" -#: ../../../library/doctest.rst:1820 +#: ../../../library/doctest.rst:1826 msgid "" "A shallow copy of ``module.__dict__`` is used for both local and global " "execution context." msgstr "" -#: ../../../library/doctest.rst:1823 +#: ../../../library/doctest.rst:1829 msgid "" "Optional argument *pm* controls whether post-mortem debugging is used. If " "*pm* has a true value, the script file is run directly, and the debugger " @@ -1958,30 +1965,30 @@ msgid "" "to :func:`pdb.run`." msgstr "" -#: ../../../library/doctest.rst:1834 +#: ../../../library/doctest.rst:1840 msgid "Debug the doctests in a string." msgstr "" -#: ../../../library/doctest.rst:1836 +#: ../../../library/doctest.rst:1842 msgid "" "This is like function :func:`debug` above, except that a string containing " "doctest examples is specified directly, via the *src* argument." msgstr "" -#: ../../../library/doctest.rst:1839 +#: ../../../library/doctest.rst:1845 msgid "" "Optional argument *pm* has the same meaning as in function :func:`debug` " "above." msgstr "" -#: ../../../library/doctest.rst:1841 +#: ../../../library/doctest.rst:1847 msgid "" "Optional argument *globs* gives a dictionary to use as both local and global " "execution context. If not specified, or ``None``, an empty dictionary is " "used. If specified, a shallow copy of the dictionary is used." msgstr "" -#: ../../../library/doctest.rst:1846 +#: ../../../library/doctest.rst:1852 msgid "" "The :class:`DebugRunner` class, and the special exceptions it may raise, are " "of most interest to testing framework authors, and will only be sketched " @@ -1989,7 +1996,7 @@ msgid "" "(which is a doctest!) for more details:" msgstr "" -#: ../../../library/doctest.rst:1854 +#: ../../../library/doctest.rst:1860 msgid "" "A subclass of :class:`DocTestRunner` that raises an exception as soon as a " "failure is encountered. If an unexpected exception occurs, an :exc:" @@ -1999,89 +2006,89 @@ msgid "" "the actual output." msgstr "" -#: ../../../library/doctest.rst:1861 +#: ../../../library/doctest.rst:1867 msgid "" "For information about the constructor parameters and methods, see the " "documentation for :class:`DocTestRunner` in section :ref:`doctest-advanced-" "api`." msgstr "" -#: ../../../library/doctest.rst:1864 +#: ../../../library/doctest.rst:1870 msgid "" "There are two exceptions that may be raised by :class:`DebugRunner` " "instances:" msgstr "" -#: ../../../library/doctest.rst:1869 +#: ../../../library/doctest.rst:1875 msgid "" "An exception raised by :class:`DocTestRunner` to signal that a doctest " "example's actual output did not match its expected output. The constructor " "arguments are used to initialize the attributes of the same names." msgstr "" -#: ../../../library/doctest.rst:1873 +#: ../../../library/doctest.rst:1879 msgid ":exc:`DocTestFailure` defines the following attributes:" msgstr "" -#: ../../../library/doctest.rst:1878 ../../../library/doctest.rst:1902 +#: ../../../library/doctest.rst:1884 ../../../library/doctest.rst:1908 msgid "The :class:`DocTest` object that was being run when the example failed." msgstr "" -#: ../../../library/doctest.rst:1883 ../../../library/doctest.rst:1907 +#: ../../../library/doctest.rst:1889 ../../../library/doctest.rst:1913 msgid "The :class:`Example` that failed." msgstr "" -#: ../../../library/doctest.rst:1888 +#: ../../../library/doctest.rst:1894 msgid "The example's actual output." msgstr "" -#: ../../../library/doctest.rst:1893 +#: ../../../library/doctest.rst:1899 msgid "" "An exception raised by :class:`DocTestRunner` to signal that a doctest " "example raised an unexpected exception. The constructor arguments are used " "to initialize the attributes of the same names." msgstr "" -#: ../../../library/doctest.rst:1897 +#: ../../../library/doctest.rst:1903 msgid ":exc:`UnexpectedException` defines the following attributes:" msgstr "" -#: ../../../library/doctest.rst:1912 +#: ../../../library/doctest.rst:1918 msgid "" "A tuple containing information about the unexpected exception, as returned " "by :func:`sys.exc_info`." msgstr "" -#: ../../../library/doctest.rst:1919 +#: ../../../library/doctest.rst:1925 msgid "Soapbox" msgstr "" -#: ../../../library/doctest.rst:1921 +#: ../../../library/doctest.rst:1927 msgid "" "As mentioned in the introduction, :mod:`!doctest` has grown to have three " "primary uses:" msgstr "" -#: ../../../library/doctest.rst:1924 +#: ../../../library/doctest.rst:1930 msgid "Checking examples in docstrings." msgstr "" -#: ../../../library/doctest.rst:1926 +#: ../../../library/doctest.rst:1932 msgid "Regression testing." msgstr "" -#: ../../../library/doctest.rst:1928 +#: ../../../library/doctest.rst:1934 msgid "Executable documentation / literate testing." msgstr "" -#: ../../../library/doctest.rst:1930 +#: ../../../library/doctest.rst:1936 msgid "" "These uses have different requirements, and it is important to distinguish " "them. In particular, filling your docstrings with obscure test cases makes " "for bad documentation." msgstr "" -#: ../../../library/doctest.rst:1934 +#: ../../../library/doctest.rst:1940 msgid "" "When writing a docstring, choose docstring examples with care. There's an " "art to this that needs to be learned---it may not be natural at first. " @@ -2093,7 +2100,7 @@ msgid "" "\"harmless\" change." msgstr "" -#: ../../../library/doctest.rst:1942 +#: ../../../library/doctest.rst:1948 msgid "" "Doctest also makes an excellent tool for regression testing, especially if " "you don't skimp on explanatory text. By interleaving prose and examples, it " @@ -2114,13 +2121,13 @@ msgid "" "different results, blurring the distinction between testing and explaining." msgstr "" -#: ../../../library/doctest.rst:1960 +#: ../../../library/doctest.rst:1966 msgid "" "Regression testing is best confined to dedicated objects or files. There " "are several options for organizing tests:" msgstr "" -#: ../../../library/doctest.rst:1963 +#: ../../../library/doctest.rst:1969 msgid "" "Write text files containing test cases as interactive examples, and test the " "files using :func:`testfile` or :func:`DocFileSuite`. This is recommended, " @@ -2128,7 +2135,7 @@ msgid "" "doctest." msgstr "" -#: ../../../library/doctest.rst:1968 +#: ../../../library/doctest.rst:1974 msgid "" "Define functions named ``_regrtest_topic`` that consist of single " "docstrings, containing test cases for the named topics. These functions can " @@ -2136,13 +2143,13 @@ msgid "" "test file." msgstr "" -#: ../../../library/doctest.rst:1972 +#: ../../../library/doctest.rst:1978 msgid "" "Define a :attr:`~module.__test__` dictionary mapping from regression test " "topics to docstrings containing test cases." msgstr "" -#: ../../../library/doctest.rst:1975 +#: ../../../library/doctest.rst:1981 msgid "" "When you have placed your tests in a module, the module can itself be the " "test runner. When a test fails, you can arrange for your test runner to re-" @@ -2150,11 +2157,11 @@ msgid "" "example of such a test runner::" msgstr "" -#: ../../../library/doctest.rst:1997 +#: ../../../library/doctest.rst:2003 msgid "Footnotes" msgstr "" -#: ../../../library/doctest.rst:1998 +#: ../../../library/doctest.rst:2004 msgid "" "Examples containing both expected output and an exception are not supported. " "Trying to guess where one ends and the other begins is too error-prone, and " diff --git a/main/locale/pot/LC_MESSAGES/library/functions.pot b/main/locale/pot/LC_MESSAGES/library/functions.pot index 3e576b5f3e0..6e99b7ace85 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-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -406,34 +406,68 @@ msgid "" "the argument is a complex number, its magnitude is returned." msgstr "" -#: ../../../library/functions.rst:69 +#: ../../../library/functions.rst:71 msgid "" -"Return an :term:`asynchronous iterator` for an :term:`asynchronous " -"iterable`. Equivalent to calling ``x.__aiter__()``." +"Return an :term:`asynchronous iterator` object. The first argument is " +"interpreted very differently depending on the presence of the other " +"arguments. Without other arguments, the single argument must be an :term:" +"`asynchronous iterable`, and the result is equivalent to calling ``x." +"__aiter__()``." msgstr "" -#: ../../../library/functions.rst:72 -msgid "Note: Unlike :func:`iter`, :func:`aiter` has no 2-argument variant." +#: ../../../library/functions.rst:78 +msgid "" +"If *stop_value* or *stop_exception* is given, then the first argument must " +"be a callable object. The asynchronous iterator created in this case calls " +"*callable* with no arguments and awaits the result for each call to its :" +"meth:`~object.__anext__` method; if the awaited value is equal to " +"*stop_value*, or if the call raises an exception matching *stop_exception*, :" +"exc:`StopAsyncIteration` will be raised, otherwise the value will be " +"returned. The callable is only called when the result of :meth:`~object." +"__anext__` is awaited." msgstr "" -#: ../../../library/functions.rst:78 +#: ../../../library/functions.rst:90 +msgid "" +"*stop_exception* is an exception class or a tuple of exception classes. If " +"*stop_value* is not specified, the iteration stops only when the callable " +"raises an exception. If the callable raises :exc:`StopAsyncIteration` which " +"does not match *stop_exception*, it is replaced with a :exc:`RuntimeError`, " +"as for asynchronous generators (see :pep:`525`)." +msgstr "" + +#: ../../../library/functions.rst:98 +msgid "" +"For example, reading fixed-size chunks from an asynchronous stream until the " +"end of file is reached::" +msgstr "" + +#: ../../../library/functions.rst:105 +msgid "Or consuming an :class:`asyncio.Queue` until it is shut down::" +msgstr "" + +#: ../../../library/functions.rst:113 +msgid "Added the *stop_value* and *stop_exception* parameters." +msgstr "" + +#: ../../../library/functions.rst:118 msgid "" "Return ``True`` if all elements of the *iterable* are true (or if the " "iterable is empty). Equivalent to::" msgstr "" -#: ../../../library/functions.rst:91 +#: ../../../library/functions.rst:131 msgid "" "When awaited, return the next item from the given :term:`asynchronous " "iterator`, or *default* if given and the iterator is exhausted." msgstr "" -#: ../../../library/functions.rst:94 +#: ../../../library/functions.rst:134 msgid "" "This is the async variant of the :func:`next` builtin, and behaves similarly." msgstr "" -#: ../../../library/functions.rst:97 +#: ../../../library/functions.rst:137 msgid "" "This calls the :meth:`~object.__anext__` method of *async_iterator*, " "returning an :term:`awaitable`. Awaiting this returns the next value of the " @@ -441,13 +475,13 @@ msgid "" "exhausted, otherwise :exc:`StopAsyncIteration` is raised." msgstr "" -#: ../../../library/functions.rst:106 +#: ../../../library/functions.rst:146 msgid "" "Return ``True`` if any element of the *iterable* is true. If the iterable " "is empty, return ``False``. Equivalent to::" msgstr "" -#: ../../../library/functions.rst:118 +#: ../../../library/functions.rst:158 msgid "" "As :func:`repr`, return a string containing a printable representation of an " "object, but escape the non-ASCII characters in the string returned by :func:" @@ -455,7 +489,7 @@ msgid "" "similar to that returned by :func:`repr` in Python 2." msgstr "" -#: ../../../library/functions.rst:126 +#: ../../../library/functions.rst:166 msgid "" "Convert an integer number to a binary string prefixed with \"0b\". The " "result is a valid Python expression. If *integer* is not a Python :class:" @@ -463,23 +497,23 @@ msgid "" "returns an integer. Some examples:" msgstr "" -#: ../../../library/functions.rst:136 +#: ../../../library/functions.rst:176 msgid "" "If the prefix \"0b\" is desired or not, you can use either of the following " "ways." msgstr "" -#: ../../../library/functions.rst:143 +#: ../../../library/functions.rst:183 msgid "" "See also :func:`enum.bin` to represent negative values as twos-complement." msgstr "" -#: ../../../library/functions.rst:145 ../../../library/functions.rst:990 -#: ../../../library/functions.rst:1374 +#: ../../../library/functions.rst:185 ../../../library/functions.rst:1030 +#: ../../../library/functions.rst:1439 msgid "See also :func:`format` for more information." msgstr "" -#: ../../../library/functions.rst:150 +#: ../../../library/functions.rst:190 msgid "" "Return a Boolean value, i.e. one of ``True`` or ``False``. The argument is " "converted using the standard :ref:`truth testing procedure `. If the " @@ -489,11 +523,11 @@ msgid "" "``False`` and ``True`` (see :ref:`typebool`)." msgstr "" -#: ../../../library/functions.rst:160 ../../../library/functions.rst:840 +#: ../../../library/functions.rst:200 ../../../library/functions.rst:880 msgid "The parameter is now positional-only." msgstr "" -#: ../../../library/functions.rst:165 +#: ../../../library/functions.rst:205 msgid "" "This function drops you into the debugger at the call site. Specifically, " "it calls :func:`sys.breakpointhook`, passing ``args`` and ``kws`` straight " @@ -506,26 +540,26 @@ msgid "" "not accessible, this function will raise :exc:`RuntimeError`." msgstr "" -#: ../../../library/functions.rst:177 +#: ../../../library/functions.rst:217 msgid "" "By default, the behavior of :func:`breakpoint` can be changed with the :" "envvar:`PYTHONBREAKPOINT` environment variable. See :func:`sys." "breakpointhook` for usage details." msgstr "" -#: ../../../library/functions.rst:181 +#: ../../../library/functions.rst:221 msgid "" "Note that this is not guaranteed if :func:`sys.breakpointhook` has been " "replaced." msgstr "" -#: ../../../library/functions.rst:184 +#: ../../../library/functions.rst:224 msgid "" "Raises an :ref:`auditing event ` ``builtins.breakpoint`` with " "argument ``breakpointhook``." msgstr "" -#: ../../../library/functions.rst:193 +#: ../../../library/functions.rst:233 msgid "" "Return a new array of bytes. The :class:`bytearray` class is a mutable " "sequence of integers in the range 0 <= x < 256. It has most of the usual " @@ -533,47 +567,47 @@ msgid "" "as most methods that the :class:`bytes` type has, see :ref:`bytes-methods`." msgstr "" -#: ../../../library/functions.rst:198 +#: ../../../library/functions.rst:238 msgid "" "The optional *source* parameter can be used to initialize the array in a few " "different ways:" msgstr "" -#: ../../../library/functions.rst:201 +#: ../../../library/functions.rst:241 msgid "" "If it is a *string*, you must also give the *encoding* (and optionally, " "*errors*) parameters; :func:`bytearray` then converts the string to bytes " "using :meth:`str.encode`." msgstr "" -#: ../../../library/functions.rst:205 +#: ../../../library/functions.rst:245 msgid "" "If it is an *integer*, the array will have that size and will be initialized " "with null bytes." msgstr "" -#: ../../../library/functions.rst:208 +#: ../../../library/functions.rst:248 msgid "" "If it is an object conforming to the :ref:`buffer interface " "`, a read-only buffer of the object will be used to " "initialize the bytes array." msgstr "" -#: ../../../library/functions.rst:211 +#: ../../../library/functions.rst:251 msgid "" "If it is an *iterable*, it must be an iterable of integers in the range ``0 " "<= x < 256``, which are used as the initial contents of the array." msgstr "" -#: ../../../library/functions.rst:214 +#: ../../../library/functions.rst:254 msgid "Without an argument, an array of size 0 is created." msgstr "" -#: ../../../library/functions.rst:216 +#: ../../../library/functions.rst:256 msgid "See also :ref:`binaryseq` and :ref:`typebytearray`." msgstr "" -#: ../../../library/functions.rst:224 +#: ../../../library/functions.rst:264 msgid "" "Return a new \"bytes\" object which is an immutable sequence of integers in " "the range ``0 <= x < 256``. :class:`bytes` is an immutable version of :" @@ -581,20 +615,20 @@ msgid "" "indexing and slicing behavior." msgstr "" -#: ../../../library/functions.rst:229 +#: ../../../library/functions.rst:269 msgid "" "Accordingly, constructor arguments are interpreted as for :func:`bytearray`." msgstr "" -#: ../../../library/functions.rst:231 +#: ../../../library/functions.rst:271 msgid "Bytes objects can also be created with literals, see :ref:`strings`." msgstr "" -#: ../../../library/functions.rst:233 +#: ../../../library/functions.rst:273 msgid "See also :ref:`binaryseq`, :ref:`typebytes`, and :ref:`bytes-methods`." msgstr "" -#: ../../../library/functions.rst:238 +#: ../../../library/functions.rst:278 msgid "" "Return :const:`True` if the *object* argument appears callable, :const:" "`False` if not. If this returns ``True``, it is still possible that a call " @@ -603,43 +637,43 @@ msgid "" "instances are callable if their class has a :meth:`~object.__call__` method." msgstr "" -#: ../../../library/functions.rst:244 +#: ../../../library/functions.rst:284 msgid "" "This function was first removed in Python 3.0 and then brought back in " "Python 3.2." msgstr "" -#: ../../../library/functions.rst:251 +#: ../../../library/functions.rst:291 msgid "" "Return the string representing a character with the specified Unicode code " "point. For example, ``chr(97)`` returns the string ``'a'``, while " "``chr(8364)`` returns the string ``'€'``. This is the inverse of :func:`ord`." msgstr "" -#: ../../../library/functions.rst:255 +#: ../../../library/functions.rst:295 msgid "" "The valid range for the argument is from 0 through 1,114,111 (0x10FFFF in " "base 16). :exc:`ValueError` will be raised if it is outside that range." msgstr "" -#: ../../../library/functions.rst:261 +#: ../../../library/functions.rst:301 msgid "Transform a method into a class method." msgstr "" -#: ../../../library/functions.rst:263 +#: ../../../library/functions.rst:303 msgid "" "A class method receives the class as an implicit first argument, just like " "an instance method receives the instance. To declare a class method, use " "this idiom::" msgstr "" -#: ../../../library/functions.rst:271 +#: ../../../library/functions.rst:311 msgid "" "The ``@classmethod`` form is a function :term:`decorator` -- see :ref:" "`function` for details." msgstr "" -#: ../../../library/functions.rst:274 +#: ../../../library/functions.rst:314 msgid "" "A class method can be called either on the class (such as ``C.f()``) or on " "an instance (such as ``C().f()``). The instance is ignored except for its " @@ -647,20 +681,20 @@ msgid "" "object is passed as the implied first argument." msgstr "" -#: ../../../library/functions.rst:279 +#: ../../../library/functions.rst:319 msgid "" "Class methods are different than C++ or Java static methods. If you want " "those, see :func:`staticmethod` in this section. For more information on " "class methods, see :ref:`types`." msgstr "" -#: ../../../library/functions.rst:283 +#: ../../../library/functions.rst:323 msgid "" "Class methods can now wrap other :term:`descriptors ` such as :" "func:`property`." msgstr "" -#: ../../../library/functions.rst:287 +#: ../../../library/functions.rst:327 msgid "" "Class methods now inherit the method attributes (:attr:`~function." "__module__`, :attr:`~function.__name__`, :attr:`~function.__qualname__`, :" @@ -668,13 +702,13 @@ msgid "" "new ``__wrapped__`` attribute." msgstr "" -#: ../../../library/functions.rst:294 +#: ../../../library/functions.rst:334 msgid "" "Class methods can no longer wrap other :term:`descriptors ` such " "as :func:`property`." msgstr "" -#: ../../../library/functions.rst:303 +#: ../../../library/functions.rst:343 msgid "" "Compile the *source* into a code or AST object. Code objects can be " "executed by :func:`exec` or :func:`eval`. *source* can either be a normal " @@ -682,14 +716,14 @@ msgid "" "documentation for information on how to work with AST objects." msgstr "" -#: ../../../library/functions.rst:308 +#: ../../../library/functions.rst:348 msgid "" "The *filename* argument should give the file from which the code was read; " "pass some recognizable value if it wasn't read from a file (``''`` " "is commonly used)." msgstr "" -#: ../../../library/functions.rst:312 +#: ../../../library/functions.rst:352 msgid "" "The *mode* argument specifies what kind of code must be compiled; it can be " "``'exec'`` if *source* consists of a sequence of statements, ``'eval'`` if " @@ -698,7 +732,7 @@ msgid "" "evaluate to something other than ``None`` will be printed)." msgstr "" -#: ../../../library/functions.rst:318 +#: ../../../library/functions.rst:358 msgid "" "The optional arguments *flags* and *dont_inherit* control which :ref:" "`compiler options ` should be activated and which :ref:" @@ -712,7 +746,7 @@ msgid "" "in the surrounding code are ignored." msgstr "" -#: ../../../library/functions.rst:329 +#: ../../../library/functions.rst:369 msgid "" "Compiler options and future statements are specified by bits which can be " "bitwise ORed together to specify multiple options. The bitfield required to " @@ -722,7 +756,7 @@ msgid "" "flags>` can be found in :mod:`ast` module, with ``PyCF_`` prefix." msgstr "" -#: ../../../library/functions.rst:337 +#: ../../../library/functions.rst:377 msgid "" "The argument *optimize* specifies the optimization level of the compiler; " "the default value of ``-1`` selects the optimization level of the " @@ -731,32 +765,32 @@ msgid "" "``__debug__`` is false) or ``2`` (docstrings are removed too)." msgstr "" -#: ../../../library/functions.rst:343 +#: ../../../library/functions.rst:383 msgid "" "The optional argument *module* specifies the module name. It is needed to " "unambiguous :ref:`filter ` syntax warnings by module name." msgstr "" -#: ../../../library/functions.rst:347 +#: ../../../library/functions.rst:387 msgid "" "This function raises :exc:`SyntaxError` or :exc:`ValueError` if the compiled " "source is invalid." msgstr "" -#: ../../../library/functions.rst:350 +#: ../../../library/functions.rst:390 msgid "" "If you want to parse Python code into its AST representation, see :func:`ast." "parse`." msgstr "" -#: ../../../library/functions.rst:353 ../../../library/functions.rst:355 +#: ../../../library/functions.rst:393 ../../../library/functions.rst:395 msgid "" "Raises an :ref:`auditing event ` ``compile`` with arguments " "``source`` and ``filename``. This event may also be raised by implicit " "compilation." msgstr "" -#: ../../../library/functions.rst:361 +#: ../../../library/functions.rst:401 msgid "" "When compiling a string with multi-line code in ``'single'`` or ``'eval'`` " "mode, input must be terminated by at least one newline character. This is " @@ -764,47 +798,47 @@ msgid "" "`code` module." msgstr "" -#: ../../../library/functions.rst:368 +#: ../../../library/functions.rst:408 msgid "" "It is possible to crash the Python interpreter with a sufficiently large/" "complex string when compiling to an AST object due to stack depth " "limitations in Python's AST compiler." msgstr "" -#: ../../../library/functions.rst:372 +#: ../../../library/functions.rst:412 msgid "" "Allowed use of Windows and Mac newlines. Also, input in ``'exec'`` mode " "does not have to end in a newline anymore. Added the *optimize* parameter." msgstr "" -#: ../../../library/functions.rst:376 +#: ../../../library/functions.rst:416 msgid "" "Previously, :exc:`TypeError` was raised when null bytes were encountered in " "*source*." msgstr "" -#: ../../../library/functions.rst:380 +#: ../../../library/functions.rst:420 msgid "" "``ast.PyCF_ALLOW_TOP_LEVEL_AWAIT`` can now be passed in flags to enable " "support for top-level ``await``, ``async for``, and ``async with``." msgstr "" -#: ../../../library/functions.rst:384 +#: ../../../library/functions.rst:424 msgid "Added the *module* parameter." msgstr "" -#: ../../../library/functions.rst:392 +#: ../../../library/functions.rst:432 msgid "" "Convert a single string or number to a complex number, or create a complex " "number from real and imaginary parts." msgstr "" -#: ../../../library/functions.rst:395 ../../../library/functions.rst:783 -#: ../../../library/functions.rst:1046 +#: ../../../library/functions.rst:435 ../../../library/functions.rst:823 +#: ../../../library/functions.rst:1086 msgid "Examples:" msgstr "" -#: ../../../library/functions.rst:416 +#: ../../../library/functions.rst:456 msgid "" "If the argument is a string, it must contain either a real part (in the same " "format as for :func:`float`) or an imaginary part (in the same format but " @@ -819,7 +853,7 @@ msgid "" "parentheses and leading and trailing whitespace characters are removed:" msgstr "" -#: ../../../library/functions.rst:435 +#: ../../../library/functions.rst:475 msgid "" "If the argument is a number, the constructor serves as a numeric conversion " "like :class:`int` and :class:`float`. For a general Python object ``x``, " @@ -829,7 +863,7 @@ msgid "" "__index__`." msgstr "" -#: ../../../library/functions.rst:444 +#: ../../../library/functions.rst:484 msgid "" "If two arguments are provided or keyword arguments are used, each argument " "may be any numeric type (including complex). If both arguments are real " @@ -840,38 +874,38 @@ msgid "" "number, only its real component is used in the above expressions." msgstr "" -#: ../../../library/functions.rst:454 +#: ../../../library/functions.rst:494 msgid "" "See also :meth:`complex.from_number` which only accepts a single numeric " "argument." msgstr "" -#: ../../../library/functions.rst:456 +#: ../../../library/functions.rst:496 msgid "If all arguments are omitted, returns ``0j``." msgstr "" -#: ../../../library/functions.rst:458 +#: ../../../library/functions.rst:498 msgid "The complex type is described in :ref:`typesnumeric`." msgstr "" -#: ../../../library/functions.rst:460 ../../../library/functions.rst:837 -#: ../../../library/functions.rst:1094 +#: ../../../library/functions.rst:500 ../../../library/functions.rst:877 +#: ../../../library/functions.rst:1134 msgid "Grouping digits with underscores as in code literals is allowed." msgstr "" -#: ../../../library/functions.rst:463 +#: ../../../library/functions.rst:503 msgid "" "Falls back to :meth:`~object.__index__` if :meth:`~object.__complex__` and :" "meth:`~object.__float__` are not defined." msgstr "" -#: ../../../library/functions.rst:467 +#: ../../../library/functions.rst:507 msgid "" "Passing a complex number as the *real* or *imag* argument is now deprecated; " "it should only be passed as a single positional argument." msgstr "" -#: ../../../library/functions.rst:474 +#: ../../../library/functions.rst:514 msgid "" "This is a relative of :func:`setattr`. The arguments are an object and a " "string. The string must be the name of one of the object's attributes. The " @@ -880,27 +914,27 @@ msgid "" "need not be a Python identifier (see :func:`setattr`)." msgstr "" -#: ../../../library/functions.rst:487 +#: ../../../library/functions.rst:527 msgid "" "Create a new dictionary. The :class:`dict` object is the dictionary class. " "See also :ref:`typesmapping` for documentation about this class." msgstr "" -#: ../../../library/functions.rst:490 +#: ../../../library/functions.rst:530 msgid "" "For other containers see the built-in :class:`frozendict`, :class:`list`, :" "class:`set`, and :class:`tuple` classes, as well as the :mod:`collections` " "module." msgstr "" -#: ../../../library/functions.rst:497 +#: ../../../library/functions.rst:537 msgid "" "Without arguments, return the list of names in the current local scope. " "With an argument, attempt to return a list of valid attributes for that " "object." msgstr "" -#: ../../../library/functions.rst:500 +#: ../../../library/functions.rst:540 msgid "" "If the object has a method named :meth:`~object.__dir__`, this method will " "be called and must return the list of attributes. This allows objects that " @@ -909,7 +943,7 @@ msgid "" "attributes." msgstr "" -#: ../../../library/functions.rst:507 +#: ../../../library/functions.rst:547 msgid "" "If the object does not provide :meth:`~object.__dir__`, the function tries " "its best to gather information from the object's :attr:`~object.__dict__` " @@ -918,37 +952,37 @@ msgid "" "func:`~object.__getattr__`." msgstr "" -#: ../../../library/functions.rst:513 +#: ../../../library/functions.rst:553 msgid "" "The default :func:`dir` mechanism behaves differently with different types " "of objects, as it attempts to produce the most relevant, rather than " "complete, information:" msgstr "" -#: ../../../library/functions.rst:517 +#: ../../../library/functions.rst:557 msgid "" "If the object is a module object, the list contains the names of the " "module's attributes." msgstr "" -#: ../../../library/functions.rst:520 +#: ../../../library/functions.rst:560 msgid "" "If the object is a type or class object, the list contains the names of its " "attributes, and recursively of the attributes of its bases." msgstr "" -#: ../../../library/functions.rst:523 +#: ../../../library/functions.rst:563 msgid "" "Otherwise, the list contains the object's attributes' names, the names of " "its class's attributes, and recursively of the attributes of its class's " "base classes." msgstr "" -#: ../../../library/functions.rst:527 +#: ../../../library/functions.rst:567 msgid "The resulting list is sorted alphabetically. For example:" msgstr "" -#: ../../../library/functions.rst:547 +#: ../../../library/functions.rst:587 msgid "" "Because :func:`dir` is supplied primarily as a convenience for use at an " "interactive prompt, it tries to supply an interesting set of names more than " @@ -957,7 +991,7 @@ msgid "" "attributes are not in the result list when the argument is a class." msgstr "" -#: ../../../library/functions.rst:557 +#: ../../../library/functions.rst:597 msgid "" "Take two (non-complex) numbers as arguments and return a pair of numbers " "consisting of their quotient and remainder when using integer division. " @@ -969,7 +1003,7 @@ msgid "" "and ``0 <= abs(a % b) < abs(b)``." msgstr "" -#: ../../../library/functions.rst:569 +#: ../../../library/functions.rst:609 msgid "" "Return an enumerate object. *iterable* must be a sequence, an :term:" "`iterator`, or some other object which supports iteration. The :meth:" @@ -978,7 +1012,7 @@ msgid "" "the values obtained from iterating over *iterable*." msgstr "" -#: ../../../library/functions.rst:581 +#: ../../../library/functions.rst:621 msgid "Equivalent to::" msgstr "" @@ -986,15 +1020,15 @@ msgstr "" msgid "Parameters" msgstr "" -#: ../../../library/functions.rst:593 +#: ../../../library/functions.rst:633 msgid "A Python expression." msgstr "" -#: ../../../library/functions.rst:597 +#: ../../../library/functions.rst:637 msgid "The global namespace (default: ``None``)." msgstr "" -#: ../../../library/functions.rst:601 +#: ../../../library/functions.rst:641 msgid "The local namespace (default: ``None``)." msgstr "" @@ -1002,7 +1036,7 @@ msgstr "" msgid "Returns" msgstr "" -#: ../../../library/functions.rst:605 +#: ../../../library/functions.rst:645 msgid "The result of the evaluated expression." msgstr "" @@ -1010,17 +1044,17 @@ msgstr "" msgid "raises" msgstr "" -#: ../../../library/functions.rst:606 +#: ../../../library/functions.rst:646 msgid "Syntax errors are reported as exceptions." msgstr "" -#: ../../../library/functions.rst:610 ../../../library/functions.rst:680 +#: ../../../library/functions.rst:650 ../../../library/functions.rst:720 msgid "" "This function executes arbitrary code. Calling it with untrusted user-" "supplied input will lead to security vulnerabilities." msgstr "" -#: ../../../library/functions.rst:613 +#: ../../../library/functions.rst:653 msgid "" "The *source* argument is parsed and evaluated as a Python expression " "(technically speaking, an :ref:`expression list `) using the " @@ -1039,11 +1073,11 @@ msgid "" "`nonlocal` statement)." msgstr "" -#: ../../../library/functions.rst:631 +#: ../../../library/functions.rst:671 msgid "Example:" msgstr "" -#: ../../../library/functions.rst:640 +#: ../../../library/functions.rst:680 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 +1085,7 @@ msgid "" "*mode* argument, :func:`eval`\\'s return value will be ``None``." msgstr "" -#: ../../../library/functions.rst:645 +#: ../../../library/functions.rst:685 msgid "" "Hints: dynamic execution of statements is supported by the :func:`exec` " "function. The :func:`globals` and :func:`locals` functions return the " @@ -1059,40 +1093,40 @@ msgid "" "pass around for use by :func:`eval` or :func:`exec`." msgstr "" -#: ../../../library/functions.rst:650 +#: ../../../library/functions.rst:690 msgid "" "If the given source is a string, then leading and trailing spaces and tabs " "are stripped." msgstr "" -#: ../../../library/functions.rst:653 +#: ../../../library/functions.rst:693 msgid "" "See :func:`ast.literal_eval` for a function to evaluate strings with " "expressions containing only literals." msgstr "" -#: ../../../library/functions.rst:656 ../../../library/functions.rst:658 -#: ../../../library/functions.rst:723 ../../../library/functions.rst:725 +#: ../../../library/functions.rst:696 ../../../library/functions.rst:698 +#: ../../../library/functions.rst:763 ../../../library/functions.rst:765 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:663 ../../../library/functions.rst:745 +#: ../../../library/functions.rst:703 ../../../library/functions.rst:785 msgid "The *globals* and *locals* arguments can now be passed as keywords." msgstr "" -#: ../../../library/functions.rst:667 ../../../library/functions.rst:749 +#: ../../../library/functions.rst:707 ../../../library/functions.rst:789 msgid "" "The semantics of the default *locals* namespace have been adjusted as " "described for the :func:`locals` builtin." msgstr "" -#: ../../../library/functions.rst:672 ../../../library/functions.rst:754 +#: ../../../library/functions.rst:712 ../../../library/functions.rst:794 msgid "*globals* can now be a :class:`frozendict`." msgstr "" -#: ../../../library/functions.rst:683 +#: ../../../library/functions.rst:723 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 +1139,7 @@ msgid "" "passed to the :func:`exec` function. The return value is ``None``." msgstr "" -#: ../../../library/functions.rst:694 +#: ../../../library/functions.rst:734 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 +1150,7 @@ msgid "" "are the same dictionary." msgstr "" -#: ../../../library/functions.rst:704 +#: ../../../library/functions.rst:744 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 +1159,7 @@ msgid "" "are treated as class variables in a class definition)." msgstr "" -#: ../../../library/functions.rst:710 +#: ../../../library/functions.rst:750 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 +1168,7 @@ msgid "" "security mechanism: the executed code can still access all builtins." msgstr "" -#: ../../../library/functions.rst:717 +#: ../../../library/functions.rst:757 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 +1176,25 @@ msgid "" "the length of the code object's :attr:`~codeobject.co_freevars` attribute." msgstr "" -#: ../../../library/functions.rst:730 +#: ../../../library/functions.rst:770 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:736 +#: ../../../library/functions.rst:776 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:740 +#: ../../../library/functions.rst:780 msgid "Added the *closure* parameter." msgstr "" -#: ../../../library/functions.rst:759 +#: ../../../library/functions.rst:799 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 +1202,7 @@ msgid "" "is assumed, that is, all elements of *iterable* that are false are removed." msgstr "" -#: ../../../library/functions.rst:765 +#: ../../../library/functions.rst:805 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 +1210,17 @@ msgid "" "``None``." msgstr "" -#: ../../../library/functions.rst:770 +#: ../../../library/functions.rst:810 msgid "" "See :func:`itertools.filterfalse` for the complementary function that " "returns elements of *iterable* for which *function* is false." msgstr "" -#: ../../../library/functions.rst:781 +#: ../../../library/functions.rst:821 msgid "Return a floating-point number constructed from a number or a string." msgstr "" -#: ../../../library/functions.rst:798 +#: ../../../library/functions.rst:838 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 +1231,13 @@ msgid "" "grammar, after leading and trailing whitespace characters are removed:" msgstr "" -#: ../../../library/functions.rst:819 +#: ../../../library/functions.rst:859 msgid "" "Case is not significant, so, for example, \"inf\", \"Inf\", \"INFINITY\", " "and \"iNfINity\" are all acceptable spellings for positive infinity." msgstr "" -#: ../../../library/functions.rst:822 +#: ../../../library/functions.rst:862 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 +1245,33 @@ msgid "" "float, an :exc:`OverflowError` will be raised." msgstr "" -#: ../../../library/functions.rst:827 +#: ../../../library/functions.rst:867 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:831 +#: ../../../library/functions.rst:871 msgid "" "See also :meth:`float.from_number` which only accepts a numeric argument." msgstr "" -#: ../../../library/functions.rst:833 +#: ../../../library/functions.rst:873 msgid "If no argument is given, ``0.0`` is returned." msgstr "" -#: ../../../library/functions.rst:835 +#: ../../../library/functions.rst:875 msgid "The float type is described in :ref:`typesnumeric`." msgstr "" -#: ../../../library/functions.rst:843 +#: ../../../library/functions.rst:883 msgid "" "Falls back to :meth:`~object.__index__` if :meth:`~object.__float__` is not " "defined." msgstr "" -#: ../../../library/functions.rst:853 +#: ../../../library/functions.rst:893 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 +1279,13 @@ msgid "" "is used by most built-in types: :ref:`formatspec`." msgstr "" -#: ../../../library/functions.rst:858 +#: ../../../library/functions.rst:898 msgid "" "The default *format_spec* is an empty string which usually gives the same " "effect as calling :func:`str(value) `." msgstr "" -#: ../../../library/functions.rst:861 +#: ../../../library/functions.rst:901 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 +1295,38 @@ msgid "" "return value are not strings." msgstr "" -#: ../../../library/functions.rst:868 +#: ../../../library/functions.rst:908 msgid "" "``object().__format__(format_spec)`` raises :exc:`TypeError` if " "*format_spec* is not an empty string." msgstr "" -#: ../../../library/functions.rst:879 +#: ../../../library/functions.rst:919 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:882 +#: ../../../library/functions.rst:922 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:892 +#: ../../../library/functions.rst:932 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:896 +#: ../../../library/functions.rst:936 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:904 +#: ../../../library/functions.rst:944 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 +1336,7 @@ msgid "" "raised. *name* need not be a Python identifier (see :func:`setattr`)." msgstr "" -#: ../../../library/functions.rst:913 +#: ../../../library/functions.rst:953 msgid "" "Since :ref:`private name mangling ` happens at " "compilation time, one must manually mangle a private attribute's (attributes " @@ -1310,14 +1344,14 @@ msgid "" "`getattr`." msgstr "" -#: ../../../library/functions.rst:921 +#: ../../../library/functions.rst:961 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:928 +#: ../../../library/functions.rst:968 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 +1359,7 @@ msgid "" "it raises an :exc:`AttributeError` or not.)" msgstr "" -#: ../../../library/functions.rst:936 +#: ../../../library/functions.rst:976 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 +1367,13 @@ msgid "" "value (even if they are of different types, as is the case for 1 and 1.0)." msgstr "" -#: ../../../library/functions.rst:943 +#: ../../../library/functions.rst:983 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:950 +#: ../../../library/functions.rst:990 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 +1383,7 @@ msgid "" "argument is any other kind of object, a help page on the object is generated." msgstr "" -#: ../../../library/functions.rst:957 +#: ../../../library/functions.rst:997 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 +1391,44 @@ msgid "" "parameters `." msgstr "" -#: ../../../library/functions.rst:962 +#: ../../../library/functions.rst:1002 msgid "" "This function is added to the built-in namespace by the :mod:`site` module." msgstr "" -#: ../../../library/functions.rst:964 +#: ../../../library/functions.rst:1004 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:971 +#: ../../../library/functions.rst:1011 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:980 +#: ../../../library/functions.rst:1020 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:992 +#: ../../../library/functions.rst:1032 msgid "" "See also :func:`int` for converting a hexadecimal string to an integer using " "a base of 16." msgstr "" -#: ../../../library/functions.rst:997 +#: ../../../library/functions.rst:1037 msgid "" "To obtain a hexadecimal string representation for a float, use the :meth:" "`float.hex` method." msgstr "" -#: ../../../library/functions.rst:1003 +#: ../../../library/functions.rst:1043 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 +1436,17 @@ msgid "" "value." msgstr "" -#: ../../../library/functions.rst:1008 +#: ../../../library/functions.rst:1048 msgid "This is the address of the object in memory." msgstr "" -#: ../../../library/functions.rst:1010 +#: ../../../library/functions.rst:1050 msgid "" "Raises an :ref:`auditing event ` ``builtins.id`` with argument " "``id``." msgstr "" -#: ../../../library/functions.rst:1016 +#: ../../../library/functions.rst:1056 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 +1454,38 @@ msgid "" "When EOF is read, :exc:`EOFError` is raised. Example::" msgstr "" -#: ../../../library/functions.rst:1026 +#: ../../../library/functions.rst:1066 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:1029 ../../../library/functions.rst:1031 +#: ../../../library/functions.rst:1069 ../../../library/functions.rst:1071 msgid "" "Raises an :ref:`auditing event ` ``builtins.input`` with argument " "``prompt`` before reading input" msgstr "" -#: ../../../library/functions.rst:1034 ../../../library/functions.rst:1036 +#: ../../../library/functions.rst:1074 ../../../library/functions.rst:1076 msgid "" "Raises an :ref:`auditing event ` ``builtins.input/result`` with " "the result after successfully reading input." msgstr "" -#: ../../../library/functions.rst:1043 +#: ../../../library/functions.rst:1083 msgid "" "Return an integer object constructed from a number or a string, or return " "``0`` if no arguments are given." msgstr "" -#: ../../../library/functions.rst:1063 +#: ../../../library/functions.rst:1103 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:1068 +#: ../../../library/functions.rst:1108 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 +1494,7 @@ msgid "" "whitespace, and have single underscores interspersed between digits." msgstr "" -#: ../../../library/functions.rst:1074 +#: ../../../library/functions.rst:1114 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 +1508,11 @@ msgid "" "while ``int('010')`` and ``int('010', 8)`` are." msgstr "" -#: ../../../library/functions.rst:1085 +#: ../../../library/functions.rst:1125 msgid "The integer type is described in :ref:`typesnumeric`." msgstr "" -#: ../../../library/functions.rst:1087 +#: ../../../library/functions.rst:1127 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 +1520,17 @@ msgid "" "` instead of :meth:`base.__index__ `." msgstr "" -#: ../../../library/functions.rst:1097 +#: ../../../library/functions.rst:1137 msgid "The first parameter is now positional-only." msgstr "" -#: ../../../library/functions.rst:1100 +#: ../../../library/functions.rst:1140 msgid "" "Falls back to :meth:`~object.__index__` if :meth:`~object.__int__` is not " "defined." msgstr "" -#: ../../../library/functions.rst:1103 +#: ../../../library/functions.rst:1143 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 +1540,12 @@ msgid "" "documentation." msgstr "" -#: ../../../library/functions.rst:1111 +#: ../../../library/functions.rst:1151 msgid "" ":func:`int` no longer delegates to the :meth:`~object.__trunc__` method." msgstr "" -#: ../../../library/functions.rst:1116 +#: ../../../library/functions.rst:1156 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,79 +1572,106 @@ msgid "" "`TypeError` exception is raised." msgstr "" -#: ../../../library/functions.rst:1148 +#: ../../../library/functions.rst:1189 msgid "" "Return an :term:`iterator` object. The first argument is interpreted very " -"differently depending on the presence of the second argument. Without a " -"second argument, the single argument must be a collection object which " -"supports the :term:`iterable` protocol (the :meth:`~object.__iter__` " -"method), or it must support the sequence protocol (the :meth:`~object." -"__getitem__` method with integer arguments starting at ``0``). If it does " -"not support either of those protocols, :exc:`TypeError` is raised. If the " -"second argument, *sentinel*, is given, then the first argument must be a " -"callable object. The iterator created in this case will call *callable* " -"with no arguments for each call to its :meth:`~iterator.__next__` method; if " -"the value returned is equal to *sentinel*, :exc:`StopIteration` will be " +"differently depending on the presence of the other arguments. Without other " +"arguments, the single argument must be a collection object which supports " +"the :term:`iterable` protocol (the :meth:`~object.__iter__` method), or it " +"must support the sequence protocol (the :meth:`~object.__getitem__` method " +"with integer arguments starting at ``0``). If it does not support either of " +"those protocols, :exc:`TypeError` is raised." +msgstr "" + +#: ../../../library/functions.rst:1198 +msgid "" +"If *stop_value* or *stop_exception* is given, then the first argument must " +"be a callable object. The iterator created in this case will call " +"*callable* with no arguments for each call to its :meth:`~iterator.__next__` " +"method; if the value returned is equal to *stop_value*, or if the call " +"raises an exception matching *stop_exception*, :exc:`StopIteration` will be " "raised, otherwise the value will be returned." msgstr "" -#: ../../../library/functions.rst:1162 +#: ../../../library/functions.rst:1206 +msgid "" +"*stop_exception* is an exception class or a tuple of exception classes. If " +"*stop_value* is not specified, the iteration stops only when the callable " +"raises an exception. If the callable raises :exc:`StopIteration` which does " +"not match *stop_exception*, it is replaced with a :exc:`RuntimeError`, as " +"for generators (see :pep:`479`)." +msgstr "" + +#: ../../../library/functions.rst:1214 msgid "See also :ref:`typeiter`." msgstr "" -#: ../../../library/functions.rst:1164 +#: ../../../library/functions.rst:1216 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:1176 +#: ../../../library/functions.rst:1225 +msgid "" +"*stop_exception* is useful for callables which report exhaustion by raising " +"an exception instead of returning a special value. For example, draining a " +"queue::" +msgstr "" + +#: ../../../library/functions.rst:1234 +msgid "" +"Added the *stop_exception* parameter and allowed passing *stop_value* by " +"keyword." +msgstr "" + +#: ../../../library/functions.rst:1241 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:1182 +#: ../../../library/functions.rst:1247 msgid "" "``len`` raises :exc:`OverflowError` on lengths larger than :data:`sys." "maxsize`, such as :class:`range(2 ** 100) `." msgstr "" -#: ../../../library/functions.rst:1190 +#: ../../../library/functions.rst:1255 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:1196 +#: ../../../library/functions.rst:1261 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:1200 +#: ../../../library/functions.rst:1265 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:1204 +#: ../../../library/functions.rst:1269 msgid "" "At class scope, it returns the namespace that will be passed to the " "metaclass constructor." msgstr "" -#: ../../../library/functions.rst:1207 +#: ../../../library/functions.rst:1272 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:1210 +#: ../../../library/functions.rst:1275 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 +1681,7 @@ msgid "" "returned mapping object." msgstr "" -#: ../../../library/functions.rst:1217 +#: ../../../library/functions.rst:1282 msgid "" "In an :term:`optimized scope` (including functions, generators, and " "coroutines), each call to ``locals()`` instead returns a fresh dictionary " @@ -1632,7 +1693,7 @@ msgid "" "previously returned dictionaries." msgstr "" -#: ../../../library/functions.rst:1226 +#: ../../../library/functions.rst:1291 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 +1702,19 @@ msgid "" "function." msgstr "" -#: ../../../library/functions.rst:1232 +#: ../../../library/functions.rst:1297 msgid "" "Calling ``locals()`` as part of a generator expression is equivalent to " "calling it in a nested generator function." msgstr "" -#: ../../../library/functions.rst:1235 +#: ../../../library/functions.rst:1300 msgid "" "The behaviour of ``locals()`` in a comprehension has been updated as " "described in :pep:`709`." msgstr "" -#: ../../../library/functions.rst:1239 +#: ../../../library/functions.rst:1304 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 +1723,7 @@ msgid "" "versions." msgstr "" -#: ../../../library/functions.rst:1249 +#: ../../../library/functions.rst:1314 msgid "" "Return an iterator that applies *function* to every item of *iterable*, " "yielding the results. If additional *iterables* arguments are passed, " @@ -1674,24 +1735,24 @@ msgid "" "see :func:`itertools.starmap`." msgstr "" -#: ../../../library/functions.rst:1258 +#: ../../../library/functions.rst:1323 msgid "Added the *strict* parameter." msgstr "" -#: ../../../library/functions.rst:1266 +#: ../../../library/functions.rst:1331 msgid "" "Return the largest item in an iterable or the largest of two or more " "arguments." msgstr "" -#: ../../../library/functions.rst:1269 +#: ../../../library/functions.rst:1334 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:1274 ../../../library/functions.rst:1312 +#: ../../../library/functions.rst:1339 ../../../library/functions.rst:1377 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 +1761,7 @@ msgid "" "`ValueError` is raised." msgstr "" -#: ../../../library/functions.rst:1280 +#: ../../../library/functions.rst:1345 msgid "" "If multiple items are maximal, the function returns the first one " "encountered. This is consistent with other sort-stability preserving tools " @@ -1708,34 +1769,34 @@ msgid "" "nlargest(1, iterable, key=keyfunc)``." msgstr "" -#: ../../../library/functions.rst:1285 ../../../library/functions.rst:1323 +#: ../../../library/functions.rst:1350 ../../../library/functions.rst:1388 msgid "Added the *default* keyword-only parameter." msgstr "" -#: ../../../library/functions.rst:1288 ../../../library/functions.rst:1326 +#: ../../../library/functions.rst:1353 ../../../library/functions.rst:1391 msgid "The *key* can be ``None``." msgstr "" -#: ../../../library/functions.rst:1296 +#: ../../../library/functions.rst:1361 msgid "" "Return a \"memory view\" object created from the given argument. See :ref:" "`typememoryview` for more information." msgstr "" -#: ../../../library/functions.rst:1304 +#: ../../../library/functions.rst:1369 msgid "" "Return the smallest item in an iterable or the smallest of two or more " "arguments." msgstr "" -#: ../../../library/functions.rst:1307 +#: ../../../library/functions.rst:1372 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:1318 +#: ../../../library/functions.rst:1383 msgid "" "If multiple items are minimal, the function returns the first one " "encountered. This is consistent with other sort-stability preserving tools " @@ -1743,14 +1804,14 @@ msgid "" "iterable, key=keyfunc)``." msgstr "" -#: ../../../library/functions.rst:1333 +#: ../../../library/functions.rst:1398 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:1340 +#: ../../../library/functions.rst:1405 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 +1819,13 @@ msgid "" "any arguments." msgstr "" -#: ../../../library/functions.rst:1347 +#: ../../../library/functions.rst:1412 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:1354 +#: ../../../library/functions.rst:1419 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 +1833,20 @@ msgid "" "returns an integer. For example:" msgstr "" -#: ../../../library/functions.rst:1364 +#: ../../../library/functions.rst:1429 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:1381 +#: ../../../library/functions.rst:1446 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:1385 +#: ../../../library/functions.rst:1450 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 +1855,7 @@ msgid "" "is set to ``False``.)" msgstr "" -#: ../../../library/functions.rst:1391 +#: ../../../library/functions.rst:1456 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 +1869,78 @@ msgid "" "unspecified.) The available modes are:" msgstr "" -#: ../../../library/functions.rst:1408 +#: ../../../library/functions.rst:1473 msgid "Character" msgstr "" -#: ../../../library/functions.rst:1408 +#: ../../../library/functions.rst:1473 msgid "Meaning" msgstr "" -#: ../../../library/functions.rst:1410 +#: ../../../library/functions.rst:1475 msgid "``'r'``" msgstr "" -#: ../../../library/functions.rst:1410 +#: ../../../library/functions.rst:1475 msgid "open for reading (default)" msgstr "" -#: ../../../library/functions.rst:1411 +#: ../../../library/functions.rst:1476 msgid "``'w'``" msgstr "" -#: ../../../library/functions.rst:1411 +#: ../../../library/functions.rst:1476 msgid "open for writing, truncating the file first" msgstr "" -#: ../../../library/functions.rst:1412 +#: ../../../library/functions.rst:1477 msgid "``'x'``" msgstr "" -#: ../../../library/functions.rst:1412 +#: ../../../library/functions.rst:1477 msgid "open for exclusive creation, failing if the file already exists" msgstr "" -#: ../../../library/functions.rst:1413 +#: ../../../library/functions.rst:1478 msgid "``'a'``" msgstr "" -#: ../../../library/functions.rst:1413 +#: ../../../library/functions.rst:1478 msgid "open for writing, appending to the end of file if it exists" msgstr "" -#: ../../../library/functions.rst:1414 +#: ../../../library/functions.rst:1479 msgid "``'b'``" msgstr "" -#: ../../../library/functions.rst:1414 ../../../library/functions.rst:1530 +#: ../../../library/functions.rst:1479 ../../../library/functions.rst:1595 msgid "binary mode" msgstr "" -#: ../../../library/functions.rst:1415 +#: ../../../library/functions.rst:1480 msgid "``'t'``" msgstr "" -#: ../../../library/functions.rst:1415 +#: ../../../library/functions.rst:1480 msgid "text mode (default)" msgstr "" -#: ../../../library/functions.rst:1416 +#: ../../../library/functions.rst:1481 msgid "``'+'``" msgstr "" -#: ../../../library/functions.rst:1416 +#: ../../../library/functions.rst:1481 msgid "open for updating (reading and writing)" msgstr "" -#: ../../../library/functions.rst:1419 +#: ../../../library/functions.rst:1484 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:1423 +#: ../../../library/functions.rst:1488 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 +1951,14 @@ msgid "" "specified *encoding* if given." msgstr "" -#: ../../../library/functions.rst:1433 +#: ../../../library/functions.rst:1498 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:1437 +#: ../../../library/functions.rst:1502 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 +1971,7 @@ msgid "" "*buffering* argument is given, the default buffering policy works as follows:" msgstr "" -#: ../../../library/functions.rst:1447 +#: ../../../library/functions.rst:1512 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 +1979,14 @@ msgid "" "kilobytes long." msgstr "" -#: ../../../library/functions.rst:1452 +#: ../../../library/functions.rst:1517 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:1456 +#: ../../../library/functions.rst:1521 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 +1995,7 @@ msgid "" "the list of supported encodings." msgstr "" -#: ../../../library/functions.rst:1462 +#: ../../../library/functions.rst:1527 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 +2004,14 @@ msgid "" "standard names can be found in :ref:`error-handlers`." msgstr "" -#: ../../../library/functions.rst:1474 +#: ../../../library/functions.rst:1539 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:1478 +#: ../../../library/functions.rst:1543 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 +2022,7 @@ msgid "" "given string, and the line ending is returned to the caller untranslated." msgstr "" -#: ../../../library/functions.rst:1486 +#: ../../../library/functions.rst:1551 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 +2031,7 @@ msgid "" "characters written are translated to the given string." msgstr "" -#: ../../../library/functions.rst:1492 +#: ../../../library/functions.rst:1557 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 +2039,7 @@ msgid "" "otherwise, an error will be raised." msgstr "" -#: ../../../library/functions.rst:1497 +#: ../../../library/functions.rst:1562 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 +2048,17 @@ msgid "" "similar to passing ``None``)." msgstr "" -#: ../../../library/functions.rst:1503 +#: ../../../library/functions.rst:1568 msgid "The newly created file is :ref:`non-inheritable `." msgstr "" -#: ../../../library/functions.rst:1505 +#: ../../../library/functions.rst:1570 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:1518 +#: ../../../library/functions.rst:1583 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 +2073,77 @@ msgid "" "FileIO`, is returned." msgstr "" -#: ../../../library/functions.rst:1539 +#: ../../../library/functions.rst:1604 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:1543 +#: ../../../library/functions.rst:1608 msgid "" "Raises an :ref:`auditing event ` ``open`` with arguments ``path``, " "``mode``, ``flags``." msgstr "" -#: ../../../library/functions.rst:1545 +#: ../../../library/functions.rst:1610 msgid "" "The ``mode`` and ``flags`` arguments may have been modified or inferred from " "the original call." msgstr "" -#: ../../../library/functions.rst:1550 +#: ../../../library/functions.rst:1615 msgid "The *opener* parameter was added." msgstr "" -#: ../../../library/functions.rst:1551 +#: ../../../library/functions.rst:1616 msgid "The ``'x'`` mode was added." msgstr "" -#: ../../../library/functions.rst:1552 +#: ../../../library/functions.rst:1617 msgid ":exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`." msgstr "" -#: ../../../library/functions.rst:1553 +#: ../../../library/functions.rst:1618 msgid "" ":exc:`FileExistsError` is now raised if the file opened in exclusive " "creation mode (``'x'``) already exists." msgstr "" -#: ../../../library/functions.rst:1558 +#: ../../../library/functions.rst:1623 msgid "The file is now non-inheritable." msgstr "" -#: ../../../library/functions.rst:1562 +#: ../../../library/functions.rst:1627 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:1565 +#: ../../../library/functions.rst:1630 msgid "The ``'namereplace'`` error handler was added." msgstr "" -#: ../../../library/functions.rst:1569 +#: ../../../library/functions.rst:1634 msgid "Support added to accept objects implementing :class:`os.PathLike`." msgstr "" -#: ../../../library/functions.rst:1570 +#: ../../../library/functions.rst:1635 msgid "" "On Windows, opening a console buffer may return a subclass of :class:`io." "RawIOBase` other than :class:`io.FileIO`." msgstr "" -#: ../../../library/functions.rst:1573 +#: ../../../library/functions.rst:1638 msgid "The ``'U'`` mode has been removed." msgstr "" -#: ../../../library/functions.rst:1578 +#: ../../../library/functions.rst:1643 msgid "Return the ordinal value of a character." msgstr "" -#: ../../../library/functions.rst:1580 +#: ../../../library/functions.rst:1645 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 +2151,14 @@ msgid "" "`chr`." msgstr "" -#: ../../../library/functions.rst:1585 +#: ../../../library/functions.rst:1650 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:1592 +#: ../../../library/functions.rst:1657 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 +2166,7 @@ msgid "" "power operator: ``base**exp``." msgstr "" -#: ../../../library/functions.rst:1597 +#: ../../../library/functions.rst:1662 msgid "" "When arguments are builtin numeric types with mixed operand types, the " "coercion rules for binary arithmetic operators apply. For :class:`int` " @@ -2120,7 +2181,7 @@ msgid "" "``pow(-9, 2.0)`` returns ``81.0``." msgstr "" -#: ../../../library/functions.rst:1609 +#: ../../../library/functions.rst:1674 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 +2190,29 @@ msgid "" "*base* modulo *mod*." msgstr "" -#: ../../../library/functions.rst:1615 +#: ../../../library/functions.rst:1680 msgid "Here's an example of computing an inverse for ``38`` modulo ``97``::" msgstr "" -#: ../../../library/functions.rst:1622 +#: ../../../library/functions.rst:1687 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:1627 +#: ../../../library/functions.rst:1692 msgid "" "Allow keyword arguments. Formerly, only positional arguments were supported." msgstr "" -#: ../../../library/functions.rst:1634 +#: ../../../library/functions.rst:1699 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:1638 +#: ../../../library/functions.rst:1703 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 +2221,7 @@ msgid "" "*end*." msgstr "" -#: ../../../library/functions.rst:1644 +#: ../../../library/functions.rst:1709 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 +2229,38 @@ msgid "" "binary mode file objects. For these, use ``file.write(...)`` instead." msgstr "" -#: ../../../library/functions.rst:1649 +#: ../../../library/functions.rst:1714 msgid "" "Output buffering is usually determined by *file*. However, if *flush* is " "true, the stream is forcibly flushed." msgstr "" -#: ../../../library/functions.rst:1653 +#: ../../../library/functions.rst:1718 msgid "Added the *flush* keyword argument." msgstr "" -#: ../../../library/functions.rst:1659 +#: ../../../library/functions.rst:1724 msgid "Return a property attribute." msgstr "" -#: ../../../library/functions.rst:1661 +#: ../../../library/functions.rst:1726 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:1665 +#: ../../../library/functions.rst:1730 msgid "A typical use is to define a managed attribute ``x``::" msgstr "" -#: ../../../library/functions.rst:1682 +#: ../../../library/functions.rst:1747 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:1685 +#: ../../../library/functions.rst:1750 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 +2268,14 @@ msgid "" "term:`decorator`::" msgstr "" -#: ../../../library/functions.rst:1698 +#: ../../../library/functions.rst:1763 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:1706 +#: ../../../library/functions.rst:1771 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 +2283,36 @@ msgid "" "with an example:" msgstr "" -#: ../../../library/functions.rst:1730 +#: ../../../library/functions.rst:1795 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:1734 +#: ../../../library/functions.rst:1799 msgid "" "The returned property object also has the attributes ``fget``, ``fset``, and " "``fdel`` corresponding to the constructor arguments." msgstr "" -#: ../../../library/functions.rst:1737 +#: ../../../library/functions.rst:1802 msgid "The docstrings of property objects are now writeable." msgstr "" -#: ../../../library/functions.rst:1742 +#: ../../../library/functions.rst:1807 msgid "" "Attribute holding the name of the property. The name of the property can be " "changed at runtime." msgstr "" -#: ../../../library/functions.rst:1753 +#: ../../../library/functions.rst:1818 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:1759 +#: ../../../library/functions.rst:1824 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 +2325,11 @@ msgid "" "raise :exc:`RuntimeError`." msgstr "" -#: ../../../library/functions.rst:1770 +#: ../../../library/functions.rst:1835 msgid "This class has a custom representation that can be evaluated::" msgstr "" -#: ../../../library/functions.rst:1783 +#: ../../../library/functions.rst:1848 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 +2337,14 @@ msgid "" "method with integer arguments starting at ``0``)." msgstr "" -#: ../../../library/functions.rst:1791 +#: ../../../library/functions.rst:1856 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:1795 +#: ../../../library/functions.rst:1860 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 +2355,13 @@ msgid "" "``None``. Otherwise, the return value has the same type as *number*." msgstr "" -#: ../../../library/functions.rst:1804 +#: ../../../library/functions.rst:1869 msgid "" "For a general Python object ``number``, ``round`` delegates to ``number." "__round__``." msgstr "" -#: ../../../library/functions.rst:1809 +#: ../../../library/functions.rst:1874 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 +2370,21 @@ msgid "" "information." msgstr "" -#: ../../../library/functions.rst:1820 +#: ../../../library/functions.rst:1885 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:1824 +#: ../../../library/functions.rst:1889 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:1831 +#: ../../../library/functions.rst:1896 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 +2393,7 @@ msgid "" "is equivalent to ``x.foobar = 123``." msgstr "" -#: ../../../library/functions.rst:1837 +#: ../../../library/functions.rst:1902 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 +2402,52 @@ msgid "" "notation, but is accessible through :func:`getattr` etc.." msgstr "" -#: ../../../library/functions.rst:1845 +#: ../../../library/functions.rst:1910 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:1853 +#: ../../../library/functions.rst:1918 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:1860 +#: ../../../library/functions.rst:1925 msgid "" "The optional *repr* argument can be used to specify a different " "representation::" msgstr "" -#: ../../../library/functions.rst:1866 +#: ../../../library/functions.rst:1931 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:1869 +#: ../../../library/functions.rst:1934 msgid "``sentinel`` does not support subclassing." msgstr "" -#: ../../../library/functions.rst:1871 +#: ../../../library/functions.rst:1936 msgid "Shallow and deep copies of a sentinel object return the object itself." msgstr "" -#: ../../../library/functions.rst:1873 +#: ../../../library/functions.rst:1938 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:1881 +#: ../../../library/functions.rst:1946 msgid "" "Sentinel objects support the :ref:`| ` operator for use in type " "expressions." msgstr "" -#: ../../../library/functions.rst:1883 +#: ../../../library/functions.rst:1948 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 +2457,81 @@ msgid "" "preserved after pickling::" msgstr "" -#: ../../../library/functions.rst:1901 +#: ../../../library/functions.rst:1966 msgid "Sentinel objects have the following attributes:" msgstr "" -#: ../../../library/functions.rst:1905 +#: ../../../library/functions.rst:1970 msgid "The sentinel's name." msgstr "" -#: ../../../library/functions.rst:1909 +#: ../../../library/functions.rst:1974 msgid "" "The name of the module where the sentinel was created. This attribute is " "writable." msgstr "" -#: ../../../library/functions.rst:1917 +#: ../../../library/functions.rst:1982 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:1921 +#: ../../../library/functions.rst:1986 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:1924 +#: ../../../library/functions.rst:1989 msgid "" "See :func:`itertools.islice` for an alternate version that returns an :term:" "`iterator`." msgstr "" -#: ../../../library/functions.rst:1931 +#: ../../../library/functions.rst:1996 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:1935 +#: ../../../library/functions.rst:2000 msgid "" "Slice objects are now :term:`hashable` (provided :attr:`~slice.start`, :attr:" "`~slice.stop`, and :attr:`~slice.step` are hashable)." msgstr "" -#: ../../../library/functions.rst:1941 +#: ../../../library/functions.rst:2006 msgid "Return a new sorted list from the items in *iterable*." msgstr "" -#: ../../../library/functions.rst:1943 +#: ../../../library/functions.rst:2008 msgid "" "Has two optional arguments which must be specified as keyword arguments." msgstr "" -#: ../../../library/functions.rst:1945 +#: ../../../library/functions.rst:2010 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:1949 +#: ../../../library/functions.rst:2014 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:1952 +#: ../../../library/functions.rst:2017 msgid "" "Use :func:`functools.cmp_to_key` to convert an old-style *cmp* function to a " "*key* function." msgstr "" -#: ../../../library/functions.rst:1955 +#: ../../../library/functions.rst:2020 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 +2539,7 @@ msgid "" "example, sort by department, then by salary grade)." msgstr "" -#: ../../../library/functions.rst:1960 +#: ../../../library/functions.rst:2025 msgid "" "The sort algorithm uses only ``<`` comparisons between items. While " "defining an :meth:`~object.__lt__` method will suffice for sorting, :PEP:`8` " @@ -2490,28 +2551,28 @@ msgid "" "method." msgstr "" -#: ../../../library/functions.rst:1969 +#: ../../../library/functions.rst:2034 msgid "" "For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`." msgstr "" -#: ../../../library/functions.rst:1973 +#: ../../../library/functions.rst:2038 msgid "Transform a method into a static method." msgstr "" -#: ../../../library/functions.rst:1975 +#: ../../../library/functions.rst:2040 msgid "" "A static method does not receive an implicit first argument. To declare a " "static method, use this idiom::" msgstr "" -#: ../../../library/functions.rst:1982 +#: ../../../library/functions.rst:2047 msgid "" "The ``@staticmethod`` form is a function :term:`decorator` -- see :ref:" "`function` for details." msgstr "" -#: ../../../library/functions.rst:1985 +#: ../../../library/functions.rst:2050 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 +2580,14 @@ msgid "" "(such as ``f()``)." msgstr "" -#: ../../../library/functions.rst:1990 +#: ../../../library/functions.rst:2055 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:1994 +#: ../../../library/functions.rst:2059 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 +2596,11 @@ msgid "" "cases, use this idiom::" msgstr "" -#: ../../../library/functions.rst:2006 +#: ../../../library/functions.rst:2071 msgid "For more information on static methods, see :ref:`types`." msgstr "" -#: ../../../library/functions.rst:2008 +#: ../../../library/functions.rst:2073 msgid "" "Static methods now inherit the method attributes (:attr:`~function." "__module__`, :attr:`~function.__name__`, :attr:`~function.__qualname__`, :" @@ -2547,25 +2608,25 @@ msgid "" "``__wrapped__`` attribute, and are now callable as regular functions." msgstr "" -#: ../../../library/functions.rst:2026 +#: ../../../library/functions.rst:2091 msgid "" "Return a :class:`str` version of *object*. See :func:`str` for details." msgstr "" -#: ../../../library/functions.rst:2028 +#: ../../../library/functions.rst:2093 msgid "" "``str`` is the built-in string :term:`class`. For general information about " "strings, see :ref:`textseq`." msgstr "" -#: ../../../library/functions.rst:2034 +#: ../../../library/functions.rst:2099 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:2038 +#: ../../../library/functions.rst:2103 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 +2635,43 @@ msgid "" "using :func:`itertools.chain`." msgstr "" -#: ../../../library/functions.rst:2044 +#: ../../../library/functions.rst:2109 msgid "The *start* parameter can be specified as a keyword argument." msgstr "" -#: ../../../library/functions.rst:2047 +#: ../../../library/functions.rst:2112 msgid "" "Summation of floats switched to an algorithm that gives higher accuracy and " "better commutativity on most builds." msgstr "" -#: ../../../library/functions.rst:2050 +#: ../../../library/functions.rst:2115 msgid "" "Added specialization for summation of complexes, using same algorithm as for " "summation of floats." msgstr "" -#: ../../../library/functions.rst:2058 +#: ../../../library/functions.rst:2123 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:2062 +#: ../../../library/functions.rst:2127 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:2066 +#: ../../../library/functions.rst:2131 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:2070 +#: ../../../library/functions.rst:2135 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 +2679,7 @@ msgid "" "whenever the inheritance hierarchy is updated." msgstr "" -#: ../../../library/functions.rst:2075 +#: ../../../library/functions.rst:2140 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 +2687,7 @@ msgid "" "(this is useful for classmethods)." msgstr "" -#: ../../../library/functions.rst:2080 +#: ../../../library/functions.rst:2145 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 +2697,7 @@ msgid "" "including generator expressions, which implicitly create nested functions.)" msgstr "" -#: ../../../library/functions.rst:2087 +#: ../../../library/functions.rst:2152 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 +2705,7 @@ msgid "" "closely parallels the use of *super* in other programming languages." msgstr "" -#: ../../../library/functions.rst:2092 +#: ../../../library/functions.rst:2157 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 +2718,18 @@ msgid "" "classes that are unknown prior to runtime)." msgstr "" -#: ../../../library/functions.rst:2102 +#: ../../../library/functions.rst:2167 msgid "For both use cases, a typical superclass call looks like this::" msgstr "" -#: ../../../library/functions.rst:2109 +#: ../../../library/functions.rst:2174 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:2113 +#: ../../../library/functions.rst:2178 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 +2739,7 @@ msgid "" "using statements or operators such as ``super()[name]``." msgstr "" -#: ../../../library/functions.rst:2121 +#: ../../../library/functions.rst:2186 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 +2749,39 @@ msgid "" "accessing the current instance for ordinary methods." msgstr "" -#: ../../../library/functions.rst:2128 +#: ../../../library/functions.rst:2193 msgid "" "For practical suggestions on how to design cooperative classes using :func:" "`super`, see `guide to using super() `_." msgstr "" -#: ../../../library/functions.rst:2132 +#: ../../../library/functions.rst:2197 msgid "" ":class:`super` objects are now :mod:`pickleable ` and :mod:" "`copyable `." msgstr "" -#: ../../../library/functions.rst:2141 +#: ../../../library/functions.rst:2206 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:2150 +#: ../../../library/functions.rst:2215 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:2154 +#: ../../../library/functions.rst:2219 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:2157 +#: ../../../library/functions.rst:2222 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 +2794,21 @@ msgid "" "type` objects:" msgstr "" -#: ../../../library/functions.rst:2172 +#: ../../../library/functions.rst:2237 msgid "See also:" msgstr "" -#: ../../../library/functions.rst:2174 +#: ../../../library/functions.rst:2239 msgid "" ":ref:`Documentation on attributes and methods on classes `." msgstr "" -#: ../../../library/functions.rst:2175 +#: ../../../library/functions.rst:2240 msgid ":ref:`bltin-type-objects`" msgstr "" -#: ../../../library/functions.rst:2177 +#: ../../../library/functions.rst:2242 msgid "" "Keyword arguments provided to the three argument form are passed to the " "appropriate metaclass machinery (usually :meth:`~object.__init_subclass__`) " @@ -2755,34 +2816,34 @@ msgid "" "would." msgstr "" -#: ../../../library/functions.rst:2182 +#: ../../../library/functions.rst:2247 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 +#: ../../../library/functions.rst:2252 msgid "See also :ref:`class-customization`." msgstr "" -#: ../../../library/functions.rst:2189 +#: ../../../library/functions.rst:2254 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:2195 +#: ../../../library/functions.rst:2260 msgid "*dict* can now be a :class:`frozendict`." msgstr "" -#: ../../../library/functions.rst:2200 +#: ../../../library/functions.rst:2265 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:2203 +#: ../../../library/functions.rst:2268 msgid "" "Objects such as modules and instances have an updateable :attr:`~object." "__dict__` attribute; however, other objects may have write restrictions on " @@ -2790,54 +2851,54 @@ msgid "" "MappingProxyType` to prevent direct dictionary updates)." msgstr "" -#: ../../../library/functions.rst:2208 +#: ../../../library/functions.rst:2273 msgid "Without an argument, :func:`vars` acts like :func:`locals`." msgstr "" -#: ../../../library/functions.rst:2210 +#: ../../../library/functions.rst:2275 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:2216 +#: ../../../library/functions.rst:2281 msgid "" "The result of calling this function without an argument has been updated as " "described for the :func:`locals` builtin." msgstr "" -#: ../../../library/functions.rst:2222 +#: ../../../library/functions.rst:2287 msgid "" "Iterate over several iterables in parallel, producing tuples with an item " "from each one." msgstr "" -#: ../../../library/functions.rst:2225 +#: ../../../library/functions.rst:2290 msgid "Example::" msgstr "" -#: ../../../library/functions.rst:2234 +#: ../../../library/functions.rst:2299 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:2237 +#: ../../../library/functions.rst:2302 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:2241 +#: ../../../library/functions.rst:2306 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:2245 +#: ../../../library/functions.rst:2310 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 " @@ -2845,51 +2906,51 @@ msgid "" "approaches to dealing with this issue:" msgstr "" -#: ../../../library/functions.rst:2250 +#: ../../../library/functions.rst:2315 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:2257 +#: ../../../library/functions.rst:2322 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:2264 +#: ../../../library/functions.rst:2329 msgid "" "Unlike the default behavior, it raises a :exc:`ValueError` if one iterable " "is exhausted before the others:" msgstr "" -#: ../../../library/functions.rst:2282 +#: ../../../library/functions.rst:2347 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:2286 +#: ../../../library/functions.rst:2351 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:2290 +#: ../../../library/functions.rst:2355 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:2293 +#: ../../../library/functions.rst:2358 msgid "Tips and tricks:" msgstr "" -#: ../../../library/functions.rst:2295 +#: ../../../library/functions.rst:2360 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 " @@ -2898,23 +2959,23 @@ msgid "" "iterator. This has the effect of dividing the input into n-length chunks." msgstr "" -#: ../../../library/functions.rst:2301 +#: ../../../library/functions.rst:2366 msgid "" ":func:`zip` in conjunction with the ``*`` operator can be used to unzip a " "list::" msgstr "" -#: ../../../library/functions.rst:2312 +#: ../../../library/functions.rst:2377 msgid "Added the ``strict`` argument." msgstr "" -#: ../../../library/functions.rst:2324 +#: ../../../library/functions.rst:2389 msgid "" "This is an advanced function that is not needed in everyday Python " "programming, unlike :func:`importlib.import_module`." msgstr "" -#: ../../../library/functions.rst:2327 +#: ../../../library/functions.rst:2392 msgid "" "This function is invoked by the :keyword:`import` statement. It can be " "replaced (by importing the :mod:`builtins` module and assigning to " @@ -2926,7 +2987,7 @@ msgid "" "discouraged in favor of :func:`importlib.import_module`." msgstr "" -#: ../../../library/functions.rst:2336 +#: ../../../library/functions.rst:2401 msgid "" "The function imports the module *name*, potentially using the given " "*globals* and *locals* to determine how to interpret the name in a package " @@ -2936,7 +2997,7 @@ msgid "" "determine the package context of the :keyword:`import` statement." msgstr "" -#: ../../../library/functions.rst:2343 +#: ../../../library/functions.rst:2408 msgid "" "*level* specifies whether to use absolute or relative imports. ``0`` (the " "default) means only perform absolute imports. Positive values for *level* " @@ -2945,7 +3006,7 @@ msgid "" "details)." msgstr "" -#: ../../../library/functions.rst:2349 +#: ../../../library/functions.rst:2414 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 " @@ -2953,168 +3014,168 @@ msgid "" "given, the module named by *name* is returned." msgstr "" -#: ../../../library/functions.rst:2354 +#: ../../../library/functions.rst:2419 msgid "" "For example, the statement ``import spam`` results in bytecode resembling " "the following code::" msgstr "" -#: ../../../library/functions.rst:2359 +#: ../../../library/functions.rst:2424 msgid "The statement ``import spam.ham`` results in this call::" msgstr "" -#: ../../../library/functions.rst:2363 +#: ../../../library/functions.rst:2428 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:2366 +#: ../../../library/functions.rst:2431 msgid "" "On the other hand, the statement ``from spam.ham import eggs, sausage as " "saus`` results in ::" msgstr "" -#: ../../../library/functions.rst:2373 +#: ../../../library/functions.rst:2438 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:2377 +#: ../../../library/functions.rst:2442 msgid "" "If you simply want to import a module (potentially within a package) by " "name, use :func:`importlib.import_module`." msgstr "" -#: ../../../library/functions.rst:2380 +#: ../../../library/functions.rst:2445 msgid "" "Negative values for *level* are no longer supported (which also changes the " "default value to 0)." msgstr "" -#: ../../../library/functions.rst:2384 +#: ../../../library/functions.rst:2449 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:2389 +#: ../../../library/functions.rst:2454 msgid "Footnotes" msgstr "" -#: ../../../library/functions.rst:2390 +#: ../../../library/functions.rst:2455 msgid "" "Note that the parser only accepts the Unix-style end of line convention. If " "you are reading the code from a file, make sure to use newline conversion " "mode to convert Windows or Mac-style newlines." msgstr "" -#: ../../../library/functions.rst:158 +#: ../../../library/functions.rst:198 msgid "Boolean" msgstr "" -#: ../../../library/functions.rst:158 ../../../library/functions.rst:2148 +#: ../../../library/functions.rst:198 ../../../library/functions.rst:2213 msgid "type" msgstr "" -#: ../../../library/functions.rst:674 +#: ../../../library/functions.rst:714 msgid "built-in function" msgstr "" -#: ../../../library/functions.rst:674 +#: ../../../library/functions.rst:714 msgid "exec" msgstr "" -#: ../../../library/functions.rst:777 +#: ../../../library/functions.rst:817 msgid "NaN" msgstr "" -#: ../../../library/functions.rst:777 +#: ../../../library/functions.rst:817 msgid "Infinity" msgstr "" -#: ../../../library/functions.rst:847 +#: ../../../library/functions.rst:887 msgid "__format__" msgstr "" -#: ../../../library/functions.rst:847 ../../../library/functions.rst:2016 +#: ../../../library/functions.rst:887 ../../../library/functions.rst:2081 msgid "string" msgstr "" -#: ../../../library/functions.rst:847 +#: ../../../library/functions.rst:887 msgid "format() (built-in function)" msgstr "" -#: ../../../library/functions.rst:1376 +#: ../../../library/functions.rst:1441 msgid "file object" msgstr "" -#: ../../../library/functions.rst:1376 ../../../library/functions.rst:1469 +#: ../../../library/functions.rst:1441 ../../../library/functions.rst:1534 msgid "open() built-in function" msgstr "" -#: ../../../library/functions.rst:1404 +#: ../../../library/functions.rst:1469 msgid "file" msgstr "" -#: ../../../library/functions.rst:1404 +#: ../../../library/functions.rst:1469 msgid "modes" msgstr "" -#: ../../../library/functions.rst:1469 +#: ../../../library/functions.rst:1534 msgid "universal newlines" msgstr "" -#: ../../../library/functions.rst:1530 +#: ../../../library/functions.rst:1595 msgid "line-buffered I/O" msgstr "" -#: ../../../library/functions.rst:1530 +#: ../../../library/functions.rst:1595 msgid "unbuffered I/O" msgstr "" -#: ../../../library/functions.rst:1530 +#: ../../../library/functions.rst:1595 msgid "buffer size, I/O" msgstr "" -#: ../../../library/functions.rst:1530 +#: ../../../library/functions.rst:1595 msgid "I/O control" msgstr "" -#: ../../../library/functions.rst:1530 +#: ../../../library/functions.rst:1595 msgid "buffering" msgstr "" -#: ../../../library/functions.rst:1530 +#: ../../../library/functions.rst:1595 msgid "text mode" msgstr "" -#: ../../../library/functions.rst:1530 ../../../library/functions.rst:2318 +#: ../../../library/functions.rst:1595 ../../../library/functions.rst:2383 msgid "module" msgstr "" -#: ../../../library/functions.rst:1530 +#: ../../../library/functions.rst:1595 msgid "sys" msgstr "" -#: ../../../library/functions.rst:2016 +#: ../../../library/functions.rst:2081 msgid "str() (built-in function)" msgstr "" -#: ../../../library/functions.rst:2148 +#: ../../../library/functions.rst:2213 msgid "object" msgstr "" -#: ../../../library/functions.rst:2318 +#: ../../../library/functions.rst:2383 msgid "statement" msgstr "" -#: ../../../library/functions.rst:2318 +#: ../../../library/functions.rst:2383 msgid "import" msgstr "" -#: ../../../library/functions.rst:2318 +#: ../../../library/functions.rst:2383 msgid "builtins" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/imaplib.pot b/main/locale/pot/LC_MESSAGES/library/imaplib.pot index edce4c73146..7ba51f70a35 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-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1002,25 +1002,41 @@ msgid "The following attributes are defined on instances of :class:`IMAP4`:" msgstr "" #: ../../../library/imaplib.rst:912 +msgid "A tuple of the capabilities advertised by the server, in upper case." +msgstr "" + +#: ../../../library/imaplib.rst:914 +msgid "" +"It is set when the connection is established, and refreshed after a " +"successful :meth:`~IMAP4.login`, :meth:`~IMAP4.authenticate` or :meth:" +"`~IMAP4.starttls`, because the server can advertise different capabilities " +"in different connection states." +msgstr "" + +#: ../../../library/imaplib.rst:920 +msgid "Refreshed after :meth:`~IMAP4.login` and :meth:`~IMAP4.authenticate`." +msgstr "" + +#: ../../../library/imaplib.rst:926 msgid "" "The most recent supported protocol in the ``CAPABILITY`` response from the " "server." msgstr "" -#: ../../../library/imaplib.rst:918 +#: ../../../library/imaplib.rst:932 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:924 +#: ../../../library/imaplib.rst:938 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:933 +#: ../../../library/imaplib.rst:947 msgid "" "Internal :class:`~io.BufferedReader` associated with the underlying socket. " "This property is documented for legacy purposes but not part of the public " @@ -1028,17 +1044,17 @@ msgid "" "closed before changing it." msgstr "" -#: ../../../library/imaplib.rst:944 +#: ../../../library/imaplib.rst:958 msgid "IMAP4 Example" msgstr "" -#: ../../../library/imaplib.rst:946 +#: ../../../library/imaplib.rst:960 msgid "" "Here is a minimal example (without error checking) that opens a mailbox and " "retrieves and prints all messages::" msgstr "" -#: ../../../library/imaplib.rst:963 +#: ../../../library/imaplib.rst:977 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 " diff --git a/main/locale/pot/LC_MESSAGES/library/inspect.pot b/main/locale/pot/LC_MESSAGES/library/inspect.pot index 79da0813d3c..f5deb0a9e27 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-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -832,15 +832,21 @@ msgstr "" #: ../../../library/inspect.rst:488 msgid "" +":term:`Duck-typed ` function-like objects now return ``True`` " +"if their code object has the :data:`CO_GENERATOR` flag." +msgstr "" + +#: ../../../library/inspect.rst:492 +msgid "" "Functions wrapped in :func:`functools.partialmethod` now return ``True`` if " "the wrapped function is a Python generator function." msgstr "" -#: ../../../library/inspect.rst:494 +#: ../../../library/inspect.rst:498 msgid "Return ``True`` if the object is a generator." msgstr "" -#: ../../../library/inspect.rst:499 +#: ../../../library/inspect.rst:503 msgid "" "Return ``True`` if the object is a :term:`coroutine function` (a function " "defined with an :keyword:`async def` syntax), a :func:`functools.partial` " @@ -848,129 +854,141 @@ msgid "" "`markcoroutinefunction`." msgstr "" -#: ../../../library/inspect.rst:506 +#: ../../../library/inspect.rst:510 msgid "" "Functions wrapped in :func:`functools.partial` now return ``True`` if the " "wrapped function is a :term:`coroutine function`." msgstr "" -#: ../../../library/inspect.rst:510 +#: ../../../library/inspect.rst:514 +msgid "" +":term:`Duck-typed ` function-like objects now return ``True`` " +"if their code object has the :data:`CO_COROUTINE` flag." +msgstr "" + +#: ../../../library/inspect.rst:518 msgid "" "Sync functions marked with :func:`markcoroutinefunction` now return ``True``." msgstr "" -#: ../../../library/inspect.rst:514 +#: ../../../library/inspect.rst:522 msgid "" "Functions wrapped in :func:`functools.partialmethod` now return ``True`` if " "the wrapped function is a :term:`coroutine function`." msgstr "" -#: ../../../library/inspect.rst:521 +#: ../../../library/inspect.rst:529 msgid "" "Decorator to mark a callable as a :term:`coroutine function` if it would not " "otherwise be detected by :func:`iscoroutinefunction`." msgstr "" -#: ../../../library/inspect.rst:524 +#: ../../../library/inspect.rst:532 msgid "" "This may be of use for sync functions that return a :term:`coroutine`, if " "the function is passed to an API that requires :func:`iscoroutinefunction`." msgstr "" -#: ../../../library/inspect.rst:527 +#: ../../../library/inspect.rst:535 msgid "" "When possible, using an :keyword:`async def` function is preferred. Also " "acceptable is calling the function and testing the return with :func:" "`iscoroutine`." msgstr "" -#: ../../../library/inspect.rst:536 +#: ../../../library/inspect.rst:544 msgid "" "Return ``True`` if the object is a :term:`coroutine` created by an :keyword:" "`async def` function." msgstr "" -#: ../../../library/inspect.rst:544 +#: ../../../library/inspect.rst:552 msgid "" "Return ``True`` if the object can be used in :keyword:`await` expression." msgstr "" -#: ../../../library/inspect.rst:546 +#: ../../../library/inspect.rst:554 msgid "" "Can also be used to distinguish generator-based coroutines from regular " "generators:" msgstr "" -#: ../../../library/inspect.rst:567 +#: ../../../library/inspect.rst:575 msgid "" "Return ``True`` if the object is an :term:`asynchronous generator` function, " "for example:" msgstr "" -#: ../../../library/inspect.rst:580 +#: ../../../library/inspect.rst:588 msgid "" "Functions wrapped in :func:`functools.partial` now return ``True`` if the " "wrapped function is an :term:`asynchronous generator` function." msgstr "" -#: ../../../library/inspect.rst:584 +#: ../../../library/inspect.rst:592 +msgid "" +":term:`Duck-typed ` function-like objects now return ``True`` " +"if their code object has the :data:`CO_ASYNC_GENERATOR` flag." +msgstr "" + +#: ../../../library/inspect.rst:596 msgid "" "Functions wrapped in :func:`functools.partialmethod` now return ``True`` if " "the wrapped function is a :term:`asynchronous generator` function." msgstr "" -#: ../../../library/inspect.rst:590 +#: ../../../library/inspect.rst:602 msgid "" "Return ``True`` if the object is an :term:`asynchronous generator iterator` " "created by an :term:`asynchronous generator` function." msgstr "" -#: ../../../library/inspect.rst:597 +#: ../../../library/inspect.rst:609 msgid "Return ``True`` if the object is a traceback." msgstr "" -#: ../../../library/inspect.rst:602 +#: ../../../library/inspect.rst:614 msgid "Return ``True`` if the object is a frame." msgstr "" -#: ../../../library/inspect.rst:607 +#: ../../../library/inspect.rst:619 msgid "Return ``True`` if the object is a code." msgstr "" -#: ../../../library/inspect.rst:612 +#: ../../../library/inspect.rst:624 msgid "" "Return ``True`` if the object is a built-in function or a bound built-in " "method." msgstr "" -#: ../../../library/inspect.rst:617 +#: ../../../library/inspect.rst:629 msgid "" "Return ``True`` if the type of object is a :class:`~types.MethodWrapperType`." msgstr "" -#: ../../../library/inspect.rst:619 +#: ../../../library/inspect.rst:631 msgid "" "These are instances of :class:`~types.MethodWrapperType`, such as :meth:" "`~object.__str__`, :meth:`~object.__eq__` and :meth:`~object.__repr__`." msgstr "" -#: ../../../library/inspect.rst:627 +#: ../../../library/inspect.rst:639 msgid "" "Return ``True`` if the object is a user-defined or built-in function or " "method." msgstr "" -#: ../../../library/inspect.rst:632 +#: ../../../library/inspect.rst:644 msgid "Return ``True`` if the object is an abstract base class." msgstr "" -#: ../../../library/inspect.rst:637 +#: ../../../library/inspect.rst:649 msgid "" "Return ``True`` if the object is a method descriptor, but not if :func:" "`isclass`, :func:`ismethod` or :func:`isfunction` is true." msgstr "" -#: ../../../library/inspect.rst:640 +#: ../../../library/inspect.rst:652 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__` " @@ -979,7 +997,7 @@ msgid "" "sensible, and :attr:`~definition.__doc__` often is." msgstr "" -#: ../../../library/inspect.rst:646 +#: ../../../library/inspect.rst:658 msgid "" "Method descriptors that also pass any of the other tests (:func:`!isclass`, :" "func:`!ismethod` or :func:`!isfunction`) make this function return " @@ -988,7 +1006,7 @@ msgid "" "object passes :func:`ismethod`." msgstr "" -#: ../../../library/inspect.rst:652 +#: ../../../library/inspect.rst:664 msgid "" "This function no longer incorrectly reports objects with :meth:`~object." "__get__` and :meth:`~object.__delete__`, but not :meth:`~object.__set__`, as " @@ -996,20 +1014,20 @@ msgid "" "descriptors)." msgstr "" -#: ../../../library/inspect.rst:660 +#: ../../../library/inspect.rst:672 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 +#: ../../../library/inspect.rst:675 msgid "" "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 +#: ../../../library/inspect.rst:679 msgid "" "Examples of data descriptors are :func:`properties `, getsets and " "member descriptors. Note that for the latter two (defined only in C " @@ -1017,14 +1035,14 @@ msgid "" "`isgetsetdescriptor` and :func:`ismemberdescriptor`, respectively." msgstr "" -#: ../../../library/inspect.rst:672 +#: ../../../library/inspect.rst:684 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 +#: ../../../library/inspect.rst:688 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 " @@ -1033,80 +1051,80 @@ msgid "" "data descriptors as well, which was not the case previously." msgstr "" -#: ../../../library/inspect.rst:685 +#: ../../../library/inspect.rst:697 msgid "Return ``True`` if the object is a getset descriptor." msgstr "" -#: ../../../library/inspect.rst:689 +#: ../../../library/inspect.rst:701 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:696 +#: ../../../library/inspect.rst:708 msgid "Return ``True`` if the object is a member descriptor." msgstr "" -#: ../../../library/inspect.rst:700 +#: ../../../library/inspect.rst:712 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:708 +#: ../../../library/inspect.rst:720 msgid "Retrieving source code" msgstr "" -#: ../../../library/inspect.rst:712 +#: ../../../library/inspect.rst:724 msgid "" "Get the documentation string for an object, cleaned up with :func:`cleandoc` " "(with the same meaning of *dedent*). If the documentation string for an " "object is not provided:" msgstr "" -#: ../../../library/inspect.rst:716 +#: ../../../library/inspect.rst:728 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:718 +#: ../../../library/inspect.rst:730 msgid "" "if the object is a method, a property or a descriptor, retrieve the " "documentation string from the inheritance hierarchy;" msgstr "" -#: ../../../library/inspect.rst:720 +#: ../../../library/inspect.rst:732 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:723 +#: ../../../library/inspect.rst:735 msgid "Return ``None`` if the documentation string is invalid or missing." msgstr "" -#: ../../../library/inspect.rst:725 +#: ../../../library/inspect.rst:737 msgid "Documentation strings are now inherited if not overridden." msgstr "" -#: ../../../library/inspect.rst:728 +#: ../../../library/inspect.rst:740 msgid "Added parameters *inherit_class_doc* and *fallback_to_class_doc*." msgstr "" -#: ../../../library/inspect.rst:731 +#: ../../../library/inspect.rst:743 msgid "" "Documentation strings on :class:`~functools.cached_property` objects are now " "inherited if not overridden." msgstr "" -#: ../../../library/inspect.rst:734 ../../../library/inspect.rst:815 +#: ../../../library/inspect.rst:746 ../../../library/inspect.rst:827 msgid "Added the *dedent* parameter." msgstr "" -#: ../../../library/inspect.rst:740 +#: ../../../library/inspect.rst:752 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 " @@ -1115,7 +1133,7 @@ msgid "" "been defined in C or the interactive shell." msgstr "" -#: ../../../library/inspect.rst:749 +#: ../../../library/inspect.rst:761 msgid "" "Return the name of the (text or binary) file in which an object was defined. " "An :exc:`OSError` is raised if the source code cannot be retrieved. This " @@ -1123,13 +1141,13 @@ msgid "" "or function." msgstr "" -#: ../../../library/inspect.rst:757 +#: ../../../library/inspect.rst:769 msgid "" "Try to guess which module an object was defined in. Return ``None`` if the " "module cannot be determined." msgstr "" -#: ../../../library/inspect.rst:763 +#: ../../../library/inspect.rst:775 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. An :exc:`OSError` " @@ -1137,7 +1155,7 @@ msgid "" "`TypeError` if the object is a built-in module, class, or function." msgstr "" -#: ../../../library/inspect.rst:772 +#: ../../../library/inspect.rst:784 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 " @@ -1148,13 +1166,13 @@ msgid "" "built-in module, class, or function." msgstr "" -#: ../../../library/inspect.rst:781 ../../../library/inspect.rst:795 +#: ../../../library/inspect.rst:793 ../../../library/inspect.rst:807 msgid "" ":exc:`OSError` is raised instead of :exc:`IOError`, now an alias of the " "former." msgstr "" -#: ../../../library/inspect.rst:788 +#: ../../../library/inspect.rst:800 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 " @@ -1163,13 +1181,13 @@ msgid "" "object is a built-in module, class, or function." msgstr "" -#: ../../../library/inspect.rst:802 +#: ../../../library/inspect.rst:814 msgid "" "Clean up indentation from docstrings that are indented to line up with " "blocks of code." msgstr "" -#: ../../../library/inspect.rst:805 +#: ../../../library/inspect.rst:817 msgid "" "All leading whitespace is removed from the first line. Any leading " "whitespace that can be uniformly removed from the second line onwards is " @@ -1177,7 +1195,7 @@ msgid "" "subsequently removed. Also, all tabs are expanded to spaces." msgstr "" -#: ../../../library/inspect.rst:810 +#: ../../../library/inspect.rst:822 msgid "" "Since Python 3.13 the compiler removes the indentation of docstrings, so " "*dedent* only affects documentation strings which are not written as " @@ -1185,28 +1203,28 @@ msgid "" "where the indentation is meaningful." msgstr "" -#: ../../../library/inspect.rst:822 +#: ../../../library/inspect.rst:834 msgid "Introspecting callables with the Signature object" msgstr "" -#: ../../../library/inspect.rst:826 +#: ../../../library/inspect.rst:838 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:833 +#: ../../../library/inspect.rst:845 msgid "Return a :class:`Signature` object for the given *callable*:" msgstr "" -#: ../../../library/inspect.rst:852 +#: ../../../library/inspect.rst:864 msgid "" "Accepts a wide range of Python callables, from plain functions and classes " "to :func:`functools.partial` objects." msgstr "" -#: ../../../library/inspect.rst:855 +#: ../../../library/inspect.rst:867 msgid "" "If some of the annotations are strings (e.g., because ``from __future__ " "import annotations`` was used), :func:`signature` will attempt to " @@ -1221,7 +1239,7 @@ msgid "" "STRING`` to return annotations in string format." msgstr "" -#: ../../../library/inspect.rst:869 +#: ../../../library/inspect.rst:881 msgid "" "Raises :exc:`ValueError` if no signature can be provided, and :exc:" "`TypeError` if that type of object is not supported. Also, if the " @@ -1230,36 +1248,36 @@ msgid "" "get_annotations` could potentially raise any kind of exception." msgstr "" -#: ../../../library/inspect.rst:875 +#: ../../../library/inspect.rst:887 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:879 +#: ../../../library/inspect.rst:891 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:885 ../../../library/inspect.rst:1021 +#: ../../../library/inspect.rst:897 ../../../library/inspect.rst:1033 msgid "The *globals*, *locals*, and *eval_str* parameters were added." msgstr "" -#: ../../../library/inspect.rst:888 ../../../library/inspect.rst:1314 +#: ../../../library/inspect.rst:900 ../../../library/inspect.rst:1326 msgid "The *annotation_format* parameter was added." msgstr "" -#: ../../../library/inspect.rst:893 +#: ../../../library/inspect.rst:905 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:899 +#: ../../../library/inspect.rst:911 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 " @@ -1267,14 +1285,14 @@ msgid "" "semantics." msgstr "" -#: ../../../library/inspect.rst:907 +#: ../../../library/inspect.rst:919 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:912 +#: ../../../library/inspect.rst:924 msgid "" "The optional *parameters* argument is a sequence of :class:`Parameter` " "objects, which is validated to check that there are no parameters with " @@ -1283,54 +1301,54 @@ msgid "" "defaults follow parameters without defaults." msgstr "" -#: ../../../library/inspect.rst:918 +#: ../../../library/inspect.rst:930 msgid "" "The optional *return_annotation* argument can be an arbitrary Python object. " "It represents the \"return\" annotation of the callable." msgstr "" -#: ../../../library/inspect.rst:921 +#: ../../../library/inspect.rst:933 msgid "" ":class:`!Signature` objects are *immutable*. Use :meth:`Signature.replace` " "or :func:`copy.replace` to make a modified copy." msgstr "" -#: ../../../library/inspect.rst:924 +#: ../../../library/inspect.rst:936 msgid ":class:`!Signature` objects are now picklable and :term:`hashable`." msgstr "" -#: ../../../library/inspect.rst:929 +#: ../../../library/inspect.rst:941 msgid "A special class-level marker to specify absence of a return annotation." msgstr "" -#: ../../../library/inspect.rst:933 +#: ../../../library/inspect.rst:945 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:937 ../../../library/inspect.rst:1309 +#: ../../../library/inspect.rst:949 ../../../library/inspect.rst:1321 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:944 +#: ../../../library/inspect.rst:956 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:949 +#: ../../../library/inspect.rst:961 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:955 +#: ../../../library/inspect.rst:967 msgid "" "Works the same way as :meth:`Signature.bind`, but allows the omission of " "some required arguments (mimics :func:`functools.partial` behavior.) " @@ -1338,7 +1356,7 @@ msgid "" "arguments do not match the signature." msgstr "" -#: ../../../library/inspect.rst:962 +#: ../../../library/inspect.rst:974 msgid "" "Create a new :class:`Signature` instance based on the instance :meth:" "`replace` was invoked on. It is possible to pass different *parameters* and/" @@ -1347,24 +1365,24 @@ msgid "" "Signature`, pass in :attr:`Signature.empty`." msgstr "" -#: ../../../library/inspect.rst:980 +#: ../../../library/inspect.rst:992 msgid "" ":class:`Signature` objects are also supported by the generic function :func:" "`copy.replace`." msgstr "" -#: ../../../library/inspect.rst:985 +#: ../../../library/inspect.rst:997 msgid "Create a string representation of the :class:`Signature` object." msgstr "" -#: ../../../library/inspect.rst:987 +#: ../../../library/inspect.rst:999 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:992 +#: ../../../library/inspect.rst:1004 msgid "" "If *quote_annotation_strings* is False, :term:`annotations ` in " "the signature are displayed without opening and closing quotation marks if " @@ -1373,151 +1391,151 @@ msgid "" "annotations`` was used." msgstr "" -#: ../../../library/inspect.rst:1000 +#: ../../../library/inspect.rst:1012 msgid "The *unquote_annotations* parameter was added." msgstr "" -#: ../../../library/inspect.rst:1005 +#: ../../../library/inspect.rst:1017 msgid "" "Return a :class:`Signature` (or its subclass) object for a given callable " "*obj*." msgstr "" -#: ../../../library/inspect.rst:1008 +#: ../../../library/inspect.rst:1020 msgid "This method simplifies subclassing of :class:`Signature`:" msgstr "" -#: ../../../library/inspect.rst:1017 +#: ../../../library/inspect.rst:1029 msgid "Its behavior is otherwise identical to that of :func:`signature`." msgstr "" -#: ../../../library/inspect.rst:1027 +#: ../../../library/inspect.rst:1039 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:1031 +#: ../../../library/inspect.rst:1043 msgid "Parameter objects are now picklable and :term:`hashable`." msgstr "" -#: ../../../library/inspect.rst:1036 +#: ../../../library/inspect.rst:1048 msgid "" "A special class-level marker to specify absence of default values and " "annotations." msgstr "" -#: ../../../library/inspect.rst:1041 +#: ../../../library/inspect.rst:1053 msgid "" "The name of the parameter as a string. The name must be a valid Python " "identifier." msgstr "" -#: ../../../library/inspect.rst:1046 +#: ../../../library/inspect.rst:1058 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:1050 +#: ../../../library/inspect.rst:1062 msgid "" "These parameter names are now exposed by this module as names like " "``implicit0``." msgstr "" -#: ../../../library/inspect.rst:1056 +#: ../../../library/inspect.rst:1068 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:1061 +#: ../../../library/inspect.rst:1073 msgid "" "The annotation for the parameter. If the parameter has no annotation, this " "attribute is set to :attr:`Parameter.empty`." msgstr "" -#: ../../../library/inspect.rst:1066 +#: ../../../library/inspect.rst:1078 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:1073 +#: ../../../library/inspect.rst:1085 msgid "Name" msgstr "" -#: ../../../library/inspect.rst:1073 +#: ../../../library/inspect.rst:1085 msgid "Meaning" msgstr "" -#: ../../../library/inspect.rst:1075 +#: ../../../library/inspect.rst:1087 msgid "*POSITIONAL_ONLY*" msgstr "" -#: ../../../library/inspect.rst:1075 +#: ../../../library/inspect.rst:1087 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:1080 +#: ../../../library/inspect.rst:1092 msgid "*POSITIONAL_OR_KEYWORD*" msgstr "" -#: ../../../library/inspect.rst:1080 +#: ../../../library/inspect.rst:1092 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:1085 +#: ../../../library/inspect.rst:1097 msgid "*VAR_POSITIONAL*" msgstr "" -#: ../../../library/inspect.rst:1085 +#: ../../../library/inspect.rst:1097 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:1090 +#: ../../../library/inspect.rst:1102 msgid "*KEYWORD_ONLY*" msgstr "" -#: ../../../library/inspect.rst:1090 +#: ../../../library/inspect.rst:1102 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:1095 +#: ../../../library/inspect.rst:1107 msgid "*VAR_KEYWORD*" msgstr "" -#: ../../../library/inspect.rst:1095 +#: ../../../library/inspect.rst:1107 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:1101 +#: ../../../library/inspect.rst:1113 msgid "Example: print all keyword-only arguments without default values:" msgstr "" -#: ../../../library/inspect.rst:1117 +#: ../../../library/inspect.rst:1129 msgid "Describes an enum value of :attr:`Parameter.kind`." msgstr "" -#: ../../../library/inspect.rst:1121 +#: ../../../library/inspect.rst:1133 msgid "Example: print all descriptions of arguments:" msgstr "" -#: ../../../library/inspect.rst:1138 +#: ../../../library/inspect.rst:1150 msgid "" "Create a new :class:`Parameter` instance based on the instance replaced was " "invoked on. To override a :class:`!Parameter` attribute, pass the " @@ -1525,101 +1543,101 @@ msgid "" "a :class:`!Parameter`, pass :attr:`Parameter.empty`." msgstr "" -#: ../../../library/inspect.rst:1156 +#: ../../../library/inspect.rst:1168 msgid "" ":class:`Parameter` objects are also supported by the generic function :func:" "`copy.replace`." msgstr "" -#: ../../../library/inspect.rst:1159 +#: ../../../library/inspect.rst:1171 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:1166 +#: ../../../library/inspect.rst:1178 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:1171 +#: ../../../library/inspect.rst:1183 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:1175 +#: ../../../library/inspect.rst:1187 msgid "" "Should be used in conjunction with :attr:`Signature.parameters` for any " "argument processing purposes." msgstr "" -#: ../../../library/inspect.rst:1180 +#: ../../../library/inspect.rst:1192 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:1185 +#: ../../../library/inspect.rst:1197 msgid "" ":attr:`arguments` is now of type :class:`dict`. Formerly, it was of type :" "class:`collections.OrderedDict`." msgstr "" -#: ../../../library/inspect.rst:1191 +#: ../../../library/inspect.rst:1203 msgid "" "A tuple of positional arguments values. Dynamically computed from the :attr:" "`arguments` attribute." msgstr "" -#: ../../../library/inspect.rst:1196 +#: ../../../library/inspect.rst:1208 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:1202 +#: ../../../library/inspect.rst:1214 msgid "A reference to the parent :class:`Signature` object." msgstr "" -#: ../../../library/inspect.rst:1206 +#: ../../../library/inspect.rst:1218 msgid "Set default values for missing arguments." msgstr "" -#: ../../../library/inspect.rst:1208 +#: ../../../library/inspect.rst:1220 msgid "" "For variable-positional arguments (``*args``) the default is an empty tuple." msgstr "" -#: ../../../library/inspect.rst:1211 +#: ../../../library/inspect.rst:1223 msgid "" "For variable-keyword arguments (``**kwargs``) the default is an empty dict." msgstr "" -#: ../../../library/inspect.rst:1224 +#: ../../../library/inspect.rst:1236 msgid "" "The :attr:`args` and :attr:`kwargs` properties can be used to invoke " "functions:" msgstr "" -#: ../../../library/inspect.rst:1239 +#: ../../../library/inspect.rst:1251 msgid ":pep:`362` - Function Signature Object." msgstr "" -#: ../../../library/inspect.rst:1240 +#: ../../../library/inspect.rst:1252 msgid "The detailed specification, implementation details and examples." msgstr "" -#: ../../../library/inspect.rst:1246 +#: ../../../library/inspect.rst:1258 msgid "Classes and functions" msgstr "" -#: ../../../library/inspect.rst:1250 +#: ../../../library/inspect.rst:1262 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 " @@ -1630,19 +1648,19 @@ msgid "" "will appear multiple times." msgstr "" -#: ../../../library/inspect.rst:1261 +#: ../../../library/inspect.rst:1273 msgid "" "Get the names and default values of a Python function's parameters. A :term:" "`named tuple` is returned:" msgstr "" -#: ../../../library/inspect.rst:1264 +#: ../../../library/inspect.rst:1276 msgid "" "``FullArgSpec(args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, " "annotations)``" msgstr "" -#: ../../../library/inspect.rst:1267 +#: ../../../library/inspect.rst:1279 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 " @@ -1657,7 +1675,7 @@ msgid "" "report the function return value annotation (if any)." msgstr "" -#: ../../../library/inspect.rst:1282 +#: ../../../library/inspect.rst:1294 msgid "" "Note that :func:`signature` and :ref:`Signature Object ` provide the recommended API for callable introspection, and support " @@ -1667,7 +1685,7 @@ msgid "" "``inspect`` module API." msgstr "" -#: ../../../library/inspect.rst:1289 +#: ../../../library/inspect.rst:1301 msgid "" "A member of the :class:`annotationlib.Format` enum can be passed to the " "*annotation_format* parameter to control the format of the returned " @@ -1676,14 +1694,14 @@ msgid "" "``VALUE`` format, creation of some argspecs may raise an exception." msgstr "" -#: ../../../library/inspect.rst:1297 +#: ../../../library/inspect.rst:1309 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:1302 +#: ../../../library/inspect.rst:1314 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 " @@ -1691,7 +1709,7 @@ msgid "" "code migrating away from the legacy :func:`!getargspec` API." msgstr "" -#: ../../../library/inspect.rst:1320 +#: ../../../library/inspect.rst:1332 msgid "" "Get information about arguments passed into a particular frame. A :term:" "`named tuple` ``ArgInfo(args, varargs, keywords, locals)`` is returned. " @@ -1700,18 +1718,18 @@ msgid "" "dictionary of the given frame." msgstr "" -#: ../../../library/inspect.rst:1327 ../../../library/inspect.rst:1337 +#: ../../../library/inspect.rst:1339 ../../../library/inspect.rst:1349 msgid "This function was inadvertently marked as deprecated in Python 3.5." msgstr "" -#: ../../../library/inspect.rst:1332 +#: ../../../library/inspect.rst:1344 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:1342 +#: ../../../library/inspect.rst:1354 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 " @@ -1719,7 +1737,7 @@ msgid "" "user-defined metatype is in use, cls will be the first element of the tuple." msgstr "" -#: ../../../library/inspect.rst:1350 +#: ../../../library/inspect.rst:1362 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 " @@ -1732,11 +1750,11 @@ msgid "" "example:" msgstr "" -#: ../../../library/inspect.rst:1376 +#: ../../../library/inspect.rst:1388 msgid "Use :meth:`Signature.bind` and :meth:`Signature.bind_partial` instead." msgstr "" -#: ../../../library/inspect.rst:1382 +#: ../../../library/inspect.rst:1394 msgid "" "Get the mapping of external name references in a Python function or method " "*func* to their current values. A :term:`named tuple` " @@ -1748,18 +1766,18 @@ msgid "" "builtins." msgstr "" -#: ../../../library/inspect.rst:1391 +#: ../../../library/inspect.rst:1403 msgid "" ":exc:`TypeError` is raised if *func* is not a Python function or method." msgstr "" -#: ../../../library/inspect.rst:1398 +#: ../../../library/inspect.rst:1410 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:1401 +#: ../../../library/inspect.rst:1413 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 " @@ -1769,37 +1787,37 @@ msgid "" "``__signature__`` attribute defined." msgstr "" -#: ../../../library/inspect.rst:1408 +#: ../../../library/inspect.rst:1420 msgid ":exc:`ValueError` is raised if a cycle is encountered." msgstr "" -#: ../../../library/inspect.rst:1415 +#: ../../../library/inspect.rst:1427 msgid "Compute the annotations dict for an object." msgstr "" -#: ../../../library/inspect.rst:1417 +#: ../../../library/inspect.rst:1429 msgid "" "This is an alias for :func:`annotationlib.get_annotations`; see the " "documentation of that function for more information." msgstr "" -#: ../../../library/inspect.rst:1422 +#: ../../../library/inspect.rst:1434 msgid "" "This function may execute arbitrary code contained in annotations. See :ref:" "`annotationlib-security` for more information." msgstr "" -#: ../../../library/inspect.rst:1427 +#: ../../../library/inspect.rst:1439 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:1435 +#: ../../../library/inspect.rst:1447 msgid "The interpreter stack" msgstr "" -#: ../../../library/inspect.rst:1437 +#: ../../../library/inspect.rst:1449 msgid "" "Some of the following functions return :class:`FrameInfo` objects. For " "backwards compatibility these objects allow tuple-like operations on all " @@ -1807,95 +1825,95 @@ msgid "" "may be removed in the future." msgstr "" -#: ../../../library/inspect.rst:1446 +#: ../../../library/inspect.rst:1458 msgid "The :ref:`frame object ` that the record corresponds to." msgstr "" -#: ../../../library/inspect.rst:1450 +#: ../../../library/inspect.rst:1462 msgid "" "The file name associated with the code being executed by the frame this " "record corresponds to." msgstr "" -#: ../../../library/inspect.rst:1455 +#: ../../../library/inspect.rst:1467 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:1460 +#: ../../../library/inspect.rst:1472 msgid "" "The function name that is being executed by the frame this record " "corresponds to." msgstr "" -#: ../../../library/inspect.rst:1464 +#: ../../../library/inspect.rst:1476 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:1469 ../../../library/inspect.rst:1508 +#: ../../../library/inspect.rst:1481 ../../../library/inspect.rst:1520 msgid "" "The index of the current line being executed in the :attr:`code_context` " "list." msgstr "" -#: ../../../library/inspect.rst:1473 +#: ../../../library/inspect.rst:1485 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:1477 +#: ../../../library/inspect.rst:1489 msgid "Return a :term:`named tuple` instead of a :class:`tuple`." msgstr "" -#: ../../../library/inspect.rst:1480 +#: ../../../library/inspect.rst:1492 msgid "" ":class:`!FrameInfo` is now a class instance (that is backwards compatible " "with the previous :term:`named tuple`)." msgstr "" -#: ../../../library/inspect.rst:1489 +#: ../../../library/inspect.rst:1501 msgid "" "The file name associated with the code being executed by the frame this " "traceback corresponds to." msgstr "" -#: ../../../library/inspect.rst:1494 +#: ../../../library/inspect.rst:1506 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:1499 +#: ../../../library/inspect.rst:1511 msgid "" "The function name that is being executed by the frame this traceback " "corresponds to." msgstr "" -#: ../../../library/inspect.rst:1503 +#: ../../../library/inspect.rst:1515 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:1512 +#: ../../../library/inspect.rst:1524 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:1517 +#: ../../../library/inspect.rst:1529 msgid "" ":class:`!Traceback` is now a class instance (that is backwards compatible " "with the previous :term:`named tuple`)." msgstr "" -#: ../../../library/inspect.rst:1524 +#: ../../../library/inspect.rst:1536 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 " @@ -1907,7 +1925,7 @@ msgid "" "consumption which occurs." msgstr "" -#: ../../../library/inspect.rst:1532 +#: ../../../library/inspect.rst:1544 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 :" @@ -1915,31 +1933,31 @@ msgid "" "disabled when Python was compiled or using :func:`gc.disable`. For example::" msgstr "" -#: ../../../library/inspect.rst:1544 +#: ../../../library/inspect.rst:1556 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:1548 +#: ../../../library/inspect.rst:1560 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:1555 +#: ../../../library/inspect.rst:1567 msgid "" "Get information about a frame or traceback object. A :class:`Traceback` " "object is returned." msgstr "" -#: ../../../library/inspect.rst:1558 +#: ../../../library/inspect.rst:1570 msgid "A :class:`Traceback` object is returned instead of a named tuple." msgstr "" -#: ../../../library/inspect.rst:1563 +#: ../../../library/inspect.rst:1575 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 " @@ -1947,19 +1965,19 @@ msgid "" "represents the outermost call on *frame*'s stack." msgstr "" -#: ../../../library/inspect.rst:1568 ../../../library/inspect.rst:1583 -#: ../../../library/inspect.rst:1609 ../../../library/inspect.rst:1624 +#: ../../../library/inspect.rst:1580 ../../../library/inspect.rst:1595 +#: ../../../library/inspect.rst:1621 ../../../library/inspect.rst:1636 msgid "" "A list of :term:`named tuples ` ``FrameInfo(frame, filename, " "lineno, function, code_context, index)`` is returned." msgstr "" -#: ../../../library/inspect.rst:1573 ../../../library/inspect.rst:1588 -#: ../../../library/inspect.rst:1614 ../../../library/inspect.rst:1629 +#: ../../../library/inspect.rst:1585 ../../../library/inspect.rst:1600 +#: ../../../library/inspect.rst:1626 ../../../library/inspect.rst:1641 msgid "A list of :class:`FrameInfo` objects is returned." msgstr "" -#: ../../../library/inspect.rst:1578 +#: ../../../library/inspect.rst:1590 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 " @@ -1967,11 +1985,11 @@ msgid "" "represents where the exception was raised." msgstr "" -#: ../../../library/inspect.rst:1593 +#: ../../../library/inspect.rst:1605 msgid "Return the frame object for the caller's stack frame." msgstr "" -#: ../../../library/inspect.rst:1597 +#: ../../../library/inspect.rst:1609 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 " @@ -1979,14 +1997,14 @@ msgid "" "``None``." msgstr "" -#: ../../../library/inspect.rst:1605 +#: ../../../library/inspect.rst:1617 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:1619 +#: ../../../library/inspect.rst:1631 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 " @@ -1994,11 +2012,11 @@ msgid "" "entry represents where the exception was raised." msgstr "" -#: ../../../library/inspect.rst:1633 +#: ../../../library/inspect.rst:1645 msgid "Fetching attributes statically" msgstr "" -#: ../../../library/inspect.rst:1635 +#: ../../../library/inspect.rst:1647 msgid "" "Both :func:`getattr` and :func:`hasattr` can trigger code execution when " "fetching or checking for the existence of attributes. Descriptors, like " @@ -2006,20 +2024,20 @@ msgid "" "`~object.__getattribute__` may be called." msgstr "" -#: ../../../library/inspect.rst:1641 +#: ../../../library/inspect.rst:1653 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:1648 +#: ../../../library/inspect.rst:1660 msgid "" "Retrieve attributes without triggering dynamic lookup via the descriptor " "protocol, :meth:`~object.__getattr__` or :meth:`~object.__getattribute__`." msgstr "" -#: ../../../library/inspect.rst:1652 +#: ../../../library/inspect.rst:1664 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 " @@ -2027,31 +2045,31 @@ msgid "" "return descriptors objects instead of instance members." msgstr "" -#: ../../../library/inspect.rst:1658 +#: ../../../library/inspect.rst:1670 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:1664 +#: ../../../library/inspect.rst:1676 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:1668 +#: ../../../library/inspect.rst:1680 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:1694 +#: ../../../library/inspect.rst:1706 msgid "Current State of Generators, Coroutines, and Asynchronous Generators" msgstr "" -#: ../../../library/inspect.rst:1696 +#: ../../../library/inspect.rst:1708 msgid "" "When implementing coroutine schedulers and for other advanced uses of " "generators, it is useful to determine whether a generator is currently " @@ -2060,32 +2078,32 @@ msgid "" "generator to be determined easily." msgstr "" -#: ../../../library/inspect.rst:1704 +#: ../../../library/inspect.rst:1716 msgid "Get current state of a generator-iterator." msgstr "" -#: ../../../library/inspect.rst:1706 ../../../library/inspect.rst:1722 -#: ../../../library/inspect.rst:1739 +#: ../../../library/inspect.rst:1718 ../../../library/inspect.rst:1734 +#: ../../../library/inspect.rst:1751 msgid "Possible states are:" msgstr "" -#: ../../../library/inspect.rst:1708 +#: ../../../library/inspect.rst:1720 msgid "GEN_CREATED: Waiting to start execution." msgstr "" -#: ../../../library/inspect.rst:1709 +#: ../../../library/inspect.rst:1721 msgid "GEN_RUNNING: Currently being executed by the interpreter." msgstr "" -#: ../../../library/inspect.rst:1710 +#: ../../../library/inspect.rst:1722 msgid "GEN_SUSPENDED: Currently suspended at a yield expression." msgstr "" -#: ../../../library/inspect.rst:1711 +#: ../../../library/inspect.rst:1723 msgid "GEN_CLOSED: Execution has completed." msgstr "" -#: ../../../library/inspect.rst:1717 +#: ../../../library/inspect.rst:1729 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 " @@ -2093,23 +2111,23 @@ msgid "" "``cr_frame`` attributes." msgstr "" -#: ../../../library/inspect.rst:1724 +#: ../../../library/inspect.rst:1736 msgid "CORO_CREATED: Waiting to start execution." msgstr "" -#: ../../../library/inspect.rst:1725 +#: ../../../library/inspect.rst:1737 msgid "CORO_RUNNING: Currently being executed by the interpreter." msgstr "" -#: ../../../library/inspect.rst:1726 +#: ../../../library/inspect.rst:1738 msgid "CORO_SUSPENDED: Currently suspended at an await expression." msgstr "" -#: ../../../library/inspect.rst:1727 +#: ../../../library/inspect.rst:1739 msgid "CORO_CLOSED: Execution has completed." msgstr "" -#: ../../../library/inspect.rst:1733 +#: ../../../library/inspect.rst:1745 msgid "" "Get current state of an asynchronous generator object. The function is " "intended to be used with asynchronous iterator objects created by :keyword:" @@ -2118,30 +2136,30 @@ msgid "" "``ag_frame`` attributes." msgstr "" -#: ../../../library/inspect.rst:1741 +#: ../../../library/inspect.rst:1753 msgid "AGEN_CREATED: Waiting to start execution." msgstr "" -#: ../../../library/inspect.rst:1742 +#: ../../../library/inspect.rst:1754 msgid "AGEN_RUNNING: Currently being executed by the interpreter." msgstr "" -#: ../../../library/inspect.rst:1743 +#: ../../../library/inspect.rst:1755 msgid "AGEN_SUSPENDED: Currently suspended at a yield expression." msgstr "" -#: ../../../library/inspect.rst:1744 +#: ../../../library/inspect.rst:1756 msgid "AGEN_CLOSED: Execution has completed." msgstr "" -#: ../../../library/inspect.rst:1748 +#: ../../../library/inspect.rst:1760 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:1754 +#: ../../../library/inspect.rst:1766 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. " @@ -2149,14 +2167,14 @@ msgid "" "generator, and all the same caveats apply." msgstr "" -#: ../../../library/inspect.rst:1759 +#: ../../../library/inspect.rst:1771 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:1765 +#: ../../../library/inspect.rst:1777 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 " @@ -2164,90 +2182,90 @@ msgid "" "dictionary." msgstr "" -#: ../../../library/inspect.rst:1774 +#: ../../../library/inspect.rst:1786 msgid "" "This function is analogous to :func:`~inspect.getgeneratorlocals`, but works " "for coroutine objects created by :keyword:`async def` functions." msgstr "" -#: ../../../library/inspect.rst:1781 +#: ../../../library/inspect.rst:1793 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:1791 +#: ../../../library/inspect.rst:1803 msgid "Code Objects Bit Flags" msgstr "" -#: ../../../library/inspect.rst:1793 +#: ../../../library/inspect.rst:1805 msgid "" "Python code objects have a :attr:`~codeobject.co_flags` attribute, which is " "a bitmap of the following flags:" msgstr "" -#: ../../../library/inspect.rst:1798 +#: ../../../library/inspect.rst:1810 msgid "The code object is optimized, using fast locals." msgstr "" -#: ../../../library/inspect.rst:1802 +#: ../../../library/inspect.rst:1814 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:1807 +#: ../../../library/inspect.rst:1819 msgid "The code object has a variable positional parameter (``*args``-like)." msgstr "" -#: ../../../library/inspect.rst:1811 +#: ../../../library/inspect.rst:1823 msgid "The code object has a variable keyword parameter (``**kwargs``-like)." msgstr "" -#: ../../../library/inspect.rst:1815 +#: ../../../library/inspect.rst:1827 msgid "The flag is set when the code object is a nested function." msgstr "" -#: ../../../library/inspect.rst:1819 +#: ../../../library/inspect.rst:1831 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:1824 +#: ../../../library/inspect.rst:1836 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:1832 +#: ../../../library/inspect.rst:1844 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:1841 +#: ../../../library/inspect.rst:1853 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:1849 +#: ../../../library/inspect.rst:1861 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:1857 +#: ../../../library/inspect.rst:1869 msgid "" "The flag is set when the code object is a function defined in class scope." msgstr "" -#: ../../../library/inspect.rst:1863 +#: ../../../library/inspect.rst:1875 msgid "" "The flags are specific to CPython, and may not be defined in other Python " "implementations. Furthermore, the flags are an implementation detail, and " @@ -2255,44 +2273,44 @@ msgid "" "use public APIs from the :mod:`!inspect` module for any introspection needs." msgstr "" -#: ../../../library/inspect.rst:1871 +#: ../../../library/inspect.rst:1883 msgid "Buffer flags" msgstr "" -#: ../../../library/inspect.rst:1875 +#: ../../../library/inspect.rst:1887 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:1879 +#: ../../../library/inspect.rst:1891 msgid "The meaning of the flags is explained at :ref:`buffer-request-types`." msgstr "" -#: ../../../library/inspect.rst:1906 +#: ../../../library/inspect.rst:1918 msgid "Command-line interface" msgstr "" -#: ../../../library/inspect.rst:1908 +#: ../../../library/inspect.rst:1920 msgid "" "The :mod:`!inspect` module also provides a basic introspection capability " "from the command line." msgstr "" -#: ../../../library/inspect.rst:1913 +#: ../../../library/inspect.rst:1925 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:1919 +#: ../../../library/inspect.rst:1931 msgid "" "Print information about the specified object rather than the source code" msgstr "" -#: ../../../library/inspect.rst:1923 +#: ../../../library/inspect.rst:1935 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/mimetypes.pot b/main/locale/pot/LC_MESSAGES/library/mimetypes.pot index 2e00113d5ef..2aebee363d5 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-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -175,21 +175,21 @@ msgid "" "extensions. Valid extensions are empty or start with a ``'.'``." msgstr "" -#: ../../../library/mimetypes.rst:135 ../../../library/mimetypes.rst:318 +#: ../../../library/mimetypes.rst:135 ../../../library/mimetypes.rst:320 msgid "Registered lower-case extensions are matched case-insensitively." msgstr "" -#: ../../../library/mimetypes.rst:137 ../../../library/mimetypes.rst:320 +#: ../../../library/mimetypes.rst:137 ../../../library/mimetypes.rst:322 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:140 ../../../library/mimetypes.rst:323 +#: ../../../library/mimetypes.rst:140 ../../../library/mimetypes.rst:325 msgid "*ext* values that do not start with ``'.'`` are deprecated." msgstr "" -#: ../../../library/mimetypes.rst:143 ../../../library/mimetypes.rst:326 +#: ../../../library/mimetypes.rst:143 ../../../library/mimetypes.rst:328 msgid "" "*ext* now must start with ``'.'``. Otherwise :exc:`ValueError` is raised." msgstr "" @@ -247,11 +247,12 @@ msgstr "" #: ../../../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 " -"copy of that provided by the module, and may be extended by loading " -"additional :file:`mime.types`\\ -style files into the database using the :" -"meth:`read` or :meth:`readfp` methods. The mapping dictionaries may also be " -"cleared before loading additional data if the default data is not desired." +"to the same database as the rest of this module. The initial database is " +"created from Python's built-in MIME type tables. It may be extended by " +"loading additional :file:`mime.types`\\ -style files into the database using " +"the :meth:`read` or :meth:`readfp` methods. The mapping dictionaries may " +"also be cleared before loading additional data if the default data is not " +"desired." msgstr "" #: ../../../library/mimetypes.rst:220 @@ -265,89 +266,91 @@ 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 " "same extension. For example, the :file:`.tgz` extension is mapped to :file:" -"`.tar.gz` to allow the encoding and type to be recognized separately. This " -"is initially a copy of the global :data:`suffix_map` defined in the module." +"`.tar.gz` to allow the encoding and type to be recognized separately. This " +"is initialized with some predefined values." msgstr "" #: ../../../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." +"Dictionary mapping filename extensions to encoding types. This is " +"initialized with some predefined values." msgstr "" #: ../../../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 " -"one is for the standard types. They are initialized by :data:`common_types` " -"and :data:`types_map`." +"one is for the standard types. They are initialized with some predefined " +"values and MIME type information loaded from files specified by the " +"*filenames* argument." msgstr "" -#: ../../../library/mimetypes.rst:249 +#: ../../../library/mimetypes.rst:250 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 " -"second one is for the standard types. They are initialized by :data:" -"`common_types` and :data:`types_map`." +"second one is for the standard types. They are initialized with some " +"predefined values and MIME type information loaded from files specified by " +"the *filenames* argument." msgstr "" -#: ../../../library/mimetypes.rst:257 +#: ../../../library/mimetypes.rst:259 msgid "" "Similar to the :func:`guess_extension` function, using the tables stored as " "part of the object." msgstr "" -#: ../../../library/mimetypes.rst:263 +#: ../../../library/mimetypes.rst:265 msgid "" "Similar to the :func:`guess_type` function, using the tables stored as part " "of the object." msgstr "" -#: ../../../library/mimetypes.rst:269 +#: ../../../library/mimetypes.rst:271 msgid "" "Similar to the :func:`guess_file_type` function, using the tables stored as " "part of the object." msgstr "" -#: ../../../library/mimetypes.rst:277 +#: ../../../library/mimetypes.rst:279 msgid "" "Similar to the :func:`guess_all_extensions` function, using the tables " "stored as part of the object." msgstr "" -#: ../../../library/mimetypes.rst:283 +#: ../../../library/mimetypes.rst:285 msgid "" "Load MIME information from a file named *filename*. This uses :meth:" "`readfp` to parse the file." msgstr "" -#: ../../../library/mimetypes.rst:286 +#: ../../../library/mimetypes.rst:288 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:292 +#: ../../../library/mimetypes.rst:294 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:295 ../../../library/mimetypes.rst:305 +#: ../../../library/mimetypes.rst:297 ../../../library/mimetypes.rst:307 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:301 +#: ../../../library/mimetypes.rst:303 msgid "Load MIME type information from the Windows registry." msgstr "" -#: ../../../library/mimetypes.rst:303 +#: ../../../library/mimetypes.rst:305 msgid "Availability" msgstr "" -#: ../../../library/mimetypes.rst:313 +#: ../../../library/mimetypes.rst:315 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 " @@ -355,50 +358,50 @@ msgid "" "the extension will be added to the list of known extensions." msgstr "" -#: ../../../library/mimetypes.rst:333 +#: ../../../library/mimetypes.rst:335 msgid "Command-line usage" msgstr "" -#: ../../../library/mimetypes.rst:335 +#: ../../../library/mimetypes.rst:337 msgid "" "The :mod:`!mimetypes` module can be executed as a script from the command " "line." msgstr "" -#: ../../../library/mimetypes.rst:341 +#: ../../../library/mimetypes.rst:343 msgid "The following options are accepted:" msgstr "" -#: ../../../library/mimetypes.rst:348 +#: ../../../library/mimetypes.rst:350 msgid "Show the help message and exit." msgstr "" -#: ../../../library/mimetypes.rst:353 +#: ../../../library/mimetypes.rst:355 msgid "Guess extension instead of type." msgstr "" -#: ../../../library/mimetypes.rst:358 +#: ../../../library/mimetypes.rst:360 msgid "Additionally search for some common, but non-standard types." msgstr "" -#: ../../../library/mimetypes.rst:360 +#: ../../../library/mimetypes.rst:362 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:364 +#: ../../../library/mimetypes.rst:366 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:372 +#: ../../../library/mimetypes.rst:374 msgid "Command-line example" msgstr "" -#: ../../../library/mimetypes.rst:374 +#: ../../../library/mimetypes.rst:376 msgid "" "Here are some examples of typical usage of the :mod:`!mimetypes` command-" "line interface:" diff --git a/main/locale/pot/LC_MESSAGES/library/os.pot b/main/locale/pot/LC_MESSAGES/library/os.pot index 9c02b1666e7..987879d893f 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-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -342,7 +342,7 @@ msgstr "" #: ../../../library/os.rst:4441 ../../../library/os.rst:4495 #: ../../../library/os.rst:4504 ../../../library/os.rst:4513 #: ../../../library/os.rst:4521 ../../../library/os.rst:4530 -#: ../../../library/os.rst:4539 ../../../library/os.rst:4611 +#: ../../../library/os.rst:4539 ../../../library/os.rst:4612 #: ../../../library/os.rst:4674 ../../../library/os.rst:4684 #: ../../../library/os.rst:4702 ../../../library/os.rst:4711 #: ../../../library/os.rst:4721 ../../../library/os.rst:4731 @@ -4732,9 +4732,9 @@ msgstr "" #: ../../../library/os.rst:4579 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 " -"updated. To cancel timer when system clock is changed, see :const:" -"`TFD_TIMER_CANCEL_ON_SET`." +"time clock is used. If the system clock is changed, the timer setting needs " +"to be updated. To cancel the timer when the system clock is changed, see :" +"const:`TFD_TIMER_CANCEL_ON_SET`." msgstr "" #: ../../../library/os.rst:4584 @@ -4746,84 +4746,82 @@ msgstr "" #: ../../../library/os.rst:4588 msgid "" -"If *clockid* is :const:`time.CLOCK_BOOTTIME`, same as :const:`time." +"If *clockid* is :const:`time.CLOCK_BOOTTIME`, it is the same as :const:`time." "CLOCK_MONOTONIC` except it includes any time that the system is suspended." msgstr "" -#: ../../../library/os.rst:4591 +#: ../../../library/os.rst:4592 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:4595 +#: ../../../library/os.rst:4596 msgid ":const:`TFD_NONBLOCK`" msgstr "" -#: ../../../library/os.rst:4596 +#: ../../../library/os.rst:4597 msgid ":const:`TFD_CLOEXEC`" msgstr "" -#: ../../../library/os.rst:4598 +#: ../../../library/os.rst:4599 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 " +"timer expires. If it is set as a flag, :func:`read` doesn't block, but if " "there hasn't been an expiration since the last call to read, :func:`read` " -"raises :class:`OSError` with ``errno`` is set to :const:`errno.EAGAIN`." +"raises :class:`OSError` with ``errno`` set to :const:`errno.EAGAIN`." msgstr "" -#: ../../../library/os.rst:4604 +#: ../../../library/os.rst:4605 msgid ":const:`TFD_CLOEXEC` is always set by Python automatically." msgstr "" -#: ../../../library/os.rst:4606 +#: ../../../library/os.rst:4607 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:4609 +#: ../../../library/os.rst:4610 msgid "The :manpage:`timerfd_create(2)` man page." msgstr "" -#: ../../../library/os.rst:4618 +#: ../../../library/os.rst:4619 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:4621 +#: ../../../library/os.rst:4622 msgid "*fd* must be a valid timer file descriptor." msgstr "" -#: ../../../library/os.rst:4623 +#: ../../../library/os.rst:4624 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:4627 +#: ../../../library/os.rst:4628 msgid ":const:`TFD_TIMER_ABSTIME`" msgstr "" -#: ../../../library/os.rst:4628 +#: ../../../library/os.rst:4629 msgid ":const:`TFD_TIMER_CANCEL_ON_SET`" msgstr "" -#: ../../../library/os.rst:4630 +#: ../../../library/os.rst:4631 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 " -"than zero, it raises an :class:`OSError` exception with ``errno`` set to :" -"const:`errno.EINVAL`" +"greater than zero, the timer is enabled. If *initial* is less than zero, it " +"raises an :class:`OSError` exception with ``errno`` set to :const:`errno." +"EINVAL`." msgstr "" -#: ../../../library/os.rst:4635 -msgid "" -"By default the timer will fire when *initial* seconds have elapsed. (If " -"*initial* is zero, timer will fire immediately.)" +#: ../../../library/os.rst:4636 +msgid "By default the timer will fire when *initial* seconds have elapsed." msgstr "" #: ../../../library/os.rst:4638 @@ -4839,7 +4837,7 @@ msgid "" "zero, the timer only fires once, on the initial expiration. If *interval* is " "greater than zero, the timer fires every time *interval* seconds have " "elapsed since the previous expiration. If *interval* is less than zero, it " -"raises :class:`OSError` with ``errno`` set to :const:`errno.EINVAL`" +"raises :class:`OSError` with ``errno`` set to :const:`errno.EINVAL`." msgstr "" #: ../../../library/os.rst:4649 @@ -4847,8 +4845,8 @@ 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." "CLOCK_REALTIME`, the timer is marked as cancelable if the real-time clock is " -"changed discontinuously. Reading the descriptor is aborted with the error " -"ECANCELED." +"changed discontinuously. Reading the descriptor is aborted with the error :" +"const:`errno.ECANCELED`." msgstr "" #: ../../../library/os.rst:4655 diff --git a/main/locale/pot/LC_MESSAGES/library/pyexpat.pot b/main/locale/pot/LC_MESSAGES/library/pyexpat.pot index 4b1ff305bb1..1cbfbd681cd 100644 --- a/main/locale/pot/LC_MESSAGES/library/pyexpat.pot +++ b/main/locale/pot/LC_MESSAGES/library/pyexpat.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-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -45,7 +45,8 @@ msgid "" msgstr "" #: ../../../library/pyexpat.rst:38 -msgid "This module provides one exception and one type object:" +msgid "" +"This module provides the following exception, type object and data items:" msgstr "" #: ../../../library/pyexpat.rst:43 @@ -62,22 +63,44 @@ msgstr "" msgid "The type of the return values from the :func:`ParserCreate` function." msgstr "" -#: ../../../library/pyexpat.rst:56 +#: ../../../library/pyexpat.rst:59 +msgid "" +"The version string of the Expat library loaded by the interpreter, like " +"``'expat_2.8.4'``." +msgstr "" + +#: ../../../library/pyexpat.rst:65 +msgid "" +"The version of the Expat library loaded by the interpreter, as a tuple of " +"three integers: major, minor and micro version." +msgstr "" + +#: ../../../library/pyexpat.rst:71 +msgid "" +"The list of the features with which the loaded Expat library was compiled, " +"as ``(name, value)`` pairs. The value is only meaningful for features which " +"have one, like ``'XML_CONTEXT_BYTES'`` or the default protection limits " +"``'XML_BLAP_ACT_THRES'`` and ``'XML_AT_MAX_AMP'``; for other features, like " +"``'XML_DTD'`` and ``'XML_NS'``, the value is ``0`` and only the presence of " +"the name is significant." +msgstr "" + +#: ../../../library/pyexpat.rst:79 msgid "The :mod:`!xml.parsers.expat` module contains two functions:" msgstr "" -#: ../../../library/pyexpat.rst:61 +#: ../../../library/pyexpat.rst:84 msgid "Returns an explanatory string for a given error number *errno*." msgstr "" -#: ../../../library/pyexpat.rst:66 +#: ../../../library/pyexpat.rst:89 msgid "" "Creates and returns a new :class:`xmlparser` object. *encoding* [1]_, if " "specified, must be a string naming the encoding used by the XML data. If it " "is given it will override the implicit or explicit encoding of the document." msgstr "" -#: ../../../library/pyexpat.rst:74 +#: ../../../library/pyexpat.rst:97 msgid "" "Expat natively understands and processes UTF-8, UTF-16, UTF-16BE, UTF-16LE, " "ISO-8859-1, and US-ASCII. For other encodings (including aliases like Latin1 " @@ -88,11 +111,11 @@ msgid "" "apply if *encoding* is not given." msgstr "" -#: ../../../library/pyexpat.rst:84 +#: ../../../library/pyexpat.rst:107 msgid "Added support for multi-byte encodings." msgstr "" -#: ../../../library/pyexpat.rst:89 +#: ../../../library/pyexpat.rst:112 msgid "" "Parsers created through :func:`!ParserCreate` are called \"root\" parsers, " "in the sense that they do not have any parent parser attached. Non-root " @@ -100,7 +123,7 @@ msgid "" "ExternalEntityParserCreate>`." msgstr "" -#: ../../../library/pyexpat.rst:94 +#: ../../../library/pyexpat.rst:117 msgid "" "Expat can optionally do XML namespace processing for you, enabled by " "providing a value for *namespace_separator*. The value must be a one-" @@ -115,19 +138,26 @@ msgid "" "concatenated without any separator." msgstr "" -#: ../../../library/pyexpat.rst:106 +#: ../../../library/pyexpat.rst:129 msgid "" "For example, if *namespace_separator* is set to a space character (``' '``) " "and the following document is parsed:" msgstr "" -#: ../../../library/pyexpat.rst:118 +#: ../../../library/pyexpat.rst:141 msgid "" ":attr:`StartElementHandler` will receive the following strings for each " "element::" msgstr "" -#: ../../../library/pyexpat.rst:125 +#: ../../../library/pyexpat.rst:148 +msgid "" +"*intern*, if given, must be a dictionary. It is used to intern the names of " +"elements and attributes, and is available as the :attr:`~xmlparser.intern` " +"attribute. By default a new empty dictionary is created for every parser." +msgstr "" + +#: ../../../library/pyexpat.rst:153 msgid "" "Due to limitations in the ``Expat`` library used by :mod:`pyexpat`, the :" "class:`xmlparser` instance returned can only be used to parse a single XML " @@ -135,39 +165,42 @@ msgid "" "instances." msgstr "" -#: ../../../library/pyexpat.rst:132 +#: ../../../library/pyexpat.rst:160 msgid "`The Expat XML Parser `_" msgstr "" -#: ../../../library/pyexpat.rst:133 +#: ../../../library/pyexpat.rst:161 msgid "Home page of the Expat project." msgstr "" -#: ../../../library/pyexpat.rst:139 +#: ../../../library/pyexpat.rst:167 msgid "XMLParser Objects" msgstr "" -#: ../../../library/pyexpat.rst:141 +#: ../../../library/pyexpat.rst:169 msgid ":class:`xmlparser` objects have the following methods:" msgstr "" -#: ../../../library/pyexpat.rst:146 +#: ../../../library/pyexpat.rst:174 msgid "" -"Parses the contents of the string *data*, calling the appropriate handler " -"functions to process the parsed data. *isfinal* must be true on the final " -"call to this method; it allows the parsing of a single file in fragments, " -"not the submission of multiple files. *data* can be the empty string at any " -"time." +"Parses the contents of *data*, calling the appropriate handler functions to " +"process the parsed data. *data* can be a :term:`bytes-like object` or a " +"string. If it is a string, the encoding declaration in the XML data is " +"ignored, and the data is parsed as already decoded text. *isfinal* must be " +"true on the final call to this method; it allows the parsing of a single " +"file in fragments, not the submission of multiple files. *data* can be empty " +"at any time." msgstr "" -#: ../../../library/pyexpat.rst:155 +#: ../../../library/pyexpat.rst:187 msgid "" -"Parse XML data reading from the object *file*. *file* only needs to provide " -"the ``read(nbytes)`` method, returning the empty string when there's no more " -"data." +"Parse XML data reading from the object *file*. *file* only needs to provide " +"the ``read(nbytes)`` method, which returns bytes, and an empty bytes object " +"when there's no more data. Text files are not supported; use :meth:`Parse` " +"for data which is already decoded." msgstr "" -#: ../../../library/pyexpat.rst:162 +#: ../../../library/pyexpat.rst:196 msgid "" "Sets the base to be used for resolving relative URIs in system identifiers " "in declarations. Resolving relative identifiers is left to the application: " @@ -176,20 +209,33 @@ msgid "" "`UnparsedEntityDeclHandler` functions." msgstr "" -#: ../../../library/pyexpat.rst:171 +#: ../../../library/pyexpat.rst:205 msgid "" "Returns a string containing the base set by a previous call to :meth:" "`SetBase`, or ``None`` if :meth:`SetBase` hasn't been called." msgstr "" -#: ../../../library/pyexpat.rst:177 +#: ../../../library/pyexpat.rst:211 +msgid "" +"Return the index just past the attributes given in the start tag. Attributes " +"defaulted from the DTD follow the specified ones, so attributes at lower " +"indices in the list passed to :attr:`StartElementHandler` were given in the " +"start tag. Each attribute takes two items in that list, its name and its " +"value. Only meaningful inside a :attr:`StartElementHandler` call, and only " +"if :attr:`ordered_attributes` is true." +msgstr "" + +#: ../../../library/pyexpat.rst:225 msgid "" -"Returns the input data that generated the current event as a string. The " -"data is in the encoding of the entity which contains the text. When called " -"while an event handler is not active, the return value is ``None``." +"Returns the input data which generated the current event as a :class:`bytes` " +"object. The data is in the encoding of the entity which contains the text. " +"It extends to the end of the currently buffered input, therefore it can " +"contain also the data of the following events, and if the event was " +"generated by a large amount of text, not all of it may be available. When " +"called while an event handler is not active, the return value is ``None``." msgstr "" -#: ../../../library/pyexpat.rst:184 +#: ../../../library/pyexpat.rst:238 msgid "" "Create a \"child\" parser which can be used to parse an external parsed " "entity referred to by content parsed by the parent parser. The *context* " @@ -199,7 +245,7 @@ msgid "" "`specified_attributes` set to the values of this parser." msgstr "" -#: ../../../library/pyexpat.rst:193 +#: ../../../library/pyexpat.rst:247 msgid "" "Control parsing of parameter entities (including the external DTD subset). " "Possible *flag* values are :const:`XML_PARAM_ENTITY_PARSING_NEVER`, :const:" @@ -208,7 +254,7 @@ msgid "" "successful." msgstr "" -#: ../../../library/pyexpat.rst:201 +#: ../../../library/pyexpat.rst:255 msgid "" "Calling this with a true value for *flag* (the default) will cause Expat to " "call the :attr:`ExternalEntityRefHandler` with :const:`None` for all " @@ -218,13 +264,13 @@ msgid "" "`EndDoctypeDeclHandler` will not be called." msgstr "" -#: ../../../library/pyexpat.rst:208 +#: ../../../library/pyexpat.rst:262 msgid "" "Passing a false value for *flag* will cancel a previous call that passed a " "true value, but otherwise has no effect." msgstr "" -#: ../../../library/pyexpat.rst:211 +#: ../../../library/pyexpat.rst:265 msgid "" "This method can only be called before the :meth:`Parse` or :meth:`ParseFile` " "methods are called; calling it after either of those have been called " @@ -232,14 +278,14 @@ msgid "" "``errors.codes[errors.XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING]``." msgstr "" -#: ../../../library/pyexpat.rst:220 +#: ../../../library/pyexpat.rst:274 msgid "" "Calling ``SetReparseDeferralEnabled(False)`` has security implications, as " "detailed below; please make sure to understand these consequences prior to " "using the ``SetReparseDeferralEnabled`` method." msgstr "" -#: ../../../library/pyexpat.rst:224 +#: ../../../library/pyexpat.rst:278 msgid "" "Expat 2.6.0 introduced a security mechanism called \"reparse deferral\" " "where instead of causing denial of service through quadratic runtime from " @@ -254,51 +300,51 @@ msgid "" "``SetReparseDeferralEnabled(True)`` allows re-enabling reparse deferral." msgstr "" -#: ../../../library/pyexpat.rst:237 +#: ../../../library/pyexpat.rst:291 msgid "" ":meth:`!SetReparseDeferralEnabled` has been backported to some prior " "releases of CPython as a security fix. Check for availability using :func:" "`hasattr` if used in code running across a variety of Python versions." msgstr "" -#: ../../../library/pyexpat.rst:246 +#: ../../../library/pyexpat.rst:300 msgid "" "Returns whether reparse deferral is currently enabled for the given Expat " "parser instance." msgstr "" -#: ../../../library/pyexpat.rst:252 +#: ../../../library/pyexpat.rst:306 msgid "" ":class:`!xmlparser` objects have the following methods to tune protections " "against some common XML vulnerabilities." msgstr "" -#: ../../../library/pyexpat.rst:257 +#: ../../../library/pyexpat.rst:311 msgid "" "Sets the number of output bytes needed to activate protection against " "`billion laughs`_ attacks." msgstr "" -#: ../../../library/pyexpat.rst:260 +#: ../../../library/pyexpat.rst:314 msgid "" "The number of output bytes includes amplification from entity expansion and " "reading DTD files." msgstr "" -#: ../../../library/pyexpat.rst:263 +#: ../../../library/pyexpat.rst:317 msgid "" "Parser objects usually have a protection activation threshold of 8 MiB, but " "the actual default value depends on the underlying Expat library." msgstr "" -#: ../../../library/pyexpat.rst:266 ../../../library/pyexpat.rst:328 +#: ../../../library/pyexpat.rst:320 ../../../library/pyexpat.rst:382 msgid "" "An :exc:`ExpatError` is raised if this method is called on a |xml-non-root-" "parser| parser. The corresponding :attr:`~ExpatError.lineno` and :attr:" "`~ExpatError.offset` should not be used as they may have no special meaning." msgstr "" -#: ../../../library/pyexpat.rst:271 +#: ../../../library/pyexpat.rst:325 msgid "" ":meth:`!SetBillionLaughsAttackProtectionActivationThreshold` has been " "backported to some prior releases of CPython as a security fix. Check for " @@ -306,19 +352,19 @@ msgid "" "of Python versions." msgstr "" -#: ../../../library/pyexpat.rst:278 +#: ../../../library/pyexpat.rst:332 msgid "" "Activation thresholds below 4 MiB are known to break support for DITA 1.3 " "payload and are hence not recommended." msgstr "" -#: ../../../library/pyexpat.rst:285 +#: ../../../library/pyexpat.rst:339 msgid "" "Sets the maximum tolerated amplification factor for protection against " "`billion laughs`_ attacks." msgstr "" -#: ../../../library/pyexpat.rst:288 +#: ../../../library/pyexpat.rst:342 msgid "" "The amplification factor is calculated as ``(direct + indirect) / direct`` " "while parsing, where ``direct`` is the number of bytes read from the primary " @@ -326,7 +372,7 @@ msgid "" "expanding entities and reading of external DTD files." msgstr "" -#: ../../../library/pyexpat.rst:293 +#: ../../../library/pyexpat.rst:347 msgid "" "The *max_factor* value must be a non-NaN :class:`float` value greater than " "or equal to 1.0. Peak amplifications of factor 15,000 for the entire payload " @@ -335,13 +381,13 @@ msgid "" "carefully chosen to avoid false positives." msgstr "" -#: ../../../library/pyexpat.rst:299 ../../../library/pyexpat.rst:355 +#: ../../../library/pyexpat.rst:353 ../../../library/pyexpat.rst:409 msgid "" "Parser objects usually have a maximum amplification factor of 100, but the " "actual default value depends on the underlying Expat library." msgstr "" -#: ../../../library/pyexpat.rst:302 ../../../library/pyexpat.rst:358 +#: ../../../library/pyexpat.rst:356 ../../../library/pyexpat.rst:412 msgid "" "An :exc:`ExpatError` is raised if this method is called on a |xml-non-root-" "parser| parser or if *max_factor* is outside the valid range. The " @@ -349,7 +395,7 @@ msgid "" "should not be used as they may have no special meaning." msgstr "" -#: ../../../library/pyexpat.rst:307 +#: ../../../library/pyexpat.rst:361 msgid "" ":meth:`!SetBillionLaughsAttackProtectionMaximumAmplification` has been " "backported to some prior releases of CPython as a security fix. Check for " @@ -357,39 +403,39 @@ msgid "" "of Python versions." msgstr "" -#: ../../../library/pyexpat.rst:314 +#: ../../../library/pyexpat.rst:368 msgid "" "The maximum amplification factor is only considered if the threshold that " "can be adjusted by :meth:`." "SetBillionLaughsAttackProtectionActivationThreshold` is exceeded." msgstr "" -#: ../../../library/pyexpat.rst:322 +#: ../../../library/pyexpat.rst:376 msgid "" "Sets the number of allocated bytes of dynamic memory needed to activate " "protection against disproportionate use of RAM." msgstr "" -#: ../../../library/pyexpat.rst:325 +#: ../../../library/pyexpat.rst:379 msgid "" "Parser objects usually have an allocation activation threshold of 64 MiB, " "but the actual default value depends on the underlying Expat library." msgstr "" -#: ../../../library/pyexpat.rst:333 +#: ../../../library/pyexpat.rst:387 msgid "" ":meth:`!SetAllocTrackerActivationThreshold` has been backported to some " "prior releases of CPython as a security fix. Check for availability using :" "func:`hasattr` if used in code running across a variety of Python versions." msgstr "" -#: ../../../library/pyexpat.rst:342 +#: ../../../library/pyexpat.rst:396 msgid "" "Sets the maximum amplification factor between direct input and bytes of " "dynamic memory allocated." msgstr "" -#: ../../../library/pyexpat.rst:345 +#: ../../../library/pyexpat.rst:399 msgid "" "The amplification factor is calculated as ``allocated / direct`` while " "parsing, where ``direct`` is the number of bytes read from the primary " @@ -397,7 +443,7 @@ msgid "" "memory allocated in the parser hierarchy." msgstr "" -#: ../../../library/pyexpat.rst:350 +#: ../../../library/pyexpat.rst:404 msgid "" "The *max_factor* value must be a non-NaN :class:`float` value greater than " "or equal to 1.0. Amplification factors greater than 100.0 can be observed " @@ -405,31 +451,31 @@ msgid "" "the activation threshold should be carefully chosen to avoid false positives." msgstr "" -#: ../../../library/pyexpat.rst:363 +#: ../../../library/pyexpat.rst:417 msgid "" ":meth:`!SetAllocTrackerMaximumAmplification` has been backported to some " "prior releases of CPython as a security fix. Check for availability using :" "func:`hasattr` if used in code running across a variety of Python versions." msgstr "" -#: ../../../library/pyexpat.rst:370 +#: ../../../library/pyexpat.rst:424 msgid "" "The maximum amplification factor is only considered if the threshold that " "can be adjusted by :meth:`.SetAllocTrackerActivationThreshold` is exceeded." msgstr "" -#: ../../../library/pyexpat.rst:377 +#: ../../../library/pyexpat.rst:431 msgid ":class:`xmlparser` objects have the following attributes:" msgstr "" -#: ../../../library/pyexpat.rst:382 +#: ../../../library/pyexpat.rst:436 msgid "" "The size of the buffer used when :attr:`buffer_text` is true. A new buffer " "size can be set by assigning a new integer value to this attribute. When the " "size is changed, the buffer will be flushed." msgstr "" -#: ../../../library/pyexpat.rst:390 +#: ../../../library/pyexpat.rst:444 msgid "" "Setting this to true causes the :class:`xmlparser` object to buffer textual " "content returned by Expat to avoid multiple calls to the :meth:" @@ -440,14 +486,14 @@ msgid "" "newlines may be chunked too." msgstr "" -#: ../../../library/pyexpat.rst:401 +#: ../../../library/pyexpat.rst:455 msgid "" "If :attr:`buffer_text` is enabled, the number of bytes stored in the buffer. " "These bytes represent UTF-8 encoded text. This attribute has no meaningful " "interpretation when :attr:`buffer_text` is false." msgstr "" -#: ../../../library/pyexpat.rst:408 +#: ../../../library/pyexpat.rst:462 msgid "" "Setting this attribute to a non-zero integer causes the attributes to be " "reported as a list rather than a dictionary. The attributes are presented " @@ -457,7 +503,7 @@ msgid "" "is false; it may be changed at any time." msgstr "" -#: ../../../library/pyexpat.rst:418 +#: ../../../library/pyexpat.rst:472 msgid "" "If set to a non-zero integer, the parser will report only those attributes " "which were specified in the document instance and not those which were " @@ -468,7 +514,22 @@ msgid "" "time." msgstr "" -#: ../../../library/pyexpat.rst:426 +#: ../../../library/pyexpat.rst:482 +msgid "" +"The dictionary used to intern the names of elements and attributes. It is " +"either the dictionary passed as the *intern* argument of :func:" +"`ParserCreate`, or a new dictionary created for this parser." +msgstr "" + +#: ../../../library/pyexpat.rst:489 +msgid "" +"If set to a true value, and namespace processing is enabled, the namespace " +"prefix is reported as the third part of the expanded name, separated by the " +"namespace separator. Names which have no prefix are not affected. By " +"default, this attribute is false; it may be changed at any time." +msgstr "" + +#: ../../../library/pyexpat.rst:496 msgid "" "The following attributes contain values relating to the most recent error " "encountered by an :class:`xmlparser` object, and will only have correct " @@ -476,26 +537,26 @@ msgid "" "`xml.parsers.expat.ExpatError` exception." msgstr "" -#: ../../../library/pyexpat.rst:434 +#: ../../../library/pyexpat.rst:504 msgid "Byte index at which an error occurred." msgstr "" -#: ../../../library/pyexpat.rst:439 +#: ../../../library/pyexpat.rst:509 msgid "" "Numeric code specifying the problem. This value can be passed to the :func:" "`ErrorString` function, or compared to one of the constants defined in the " "``errors`` object." msgstr "" -#: ../../../library/pyexpat.rst:446 +#: ../../../library/pyexpat.rst:516 msgid "Column number at which an error occurred." msgstr "" -#: ../../../library/pyexpat.rst:451 +#: ../../../library/pyexpat.rst:521 msgid "Line number at which an error occurred." msgstr "" -#: ../../../library/pyexpat.rst:453 +#: ../../../library/pyexpat.rst:523 msgid "" "The following attributes contain values relating to the current parse " "location in an :class:`xmlparser` object. During a callback reporting a " @@ -505,19 +566,19 @@ msgid "" "whether there was an associated callback)." msgstr "" -#: ../../../library/pyexpat.rst:463 +#: ../../../library/pyexpat.rst:533 msgid "Current byte index in the parser input." msgstr "" -#: ../../../library/pyexpat.rst:468 +#: ../../../library/pyexpat.rst:538 msgid "Current column number in the parser input." msgstr "" -#: ../../../library/pyexpat.rst:473 +#: ../../../library/pyexpat.rst:543 msgid "Current line number in the parser input." msgstr "" -#: ../../../library/pyexpat.rst:475 +#: ../../../library/pyexpat.rst:545 msgid "" "Here is the list of handlers that can be set. To set a handler on an :class:" "`xmlparser` object *o*, use ``o.handlername = func``. *handlername* must be " @@ -526,55 +587,52 @@ msgid "" "unless otherwise stated." msgstr "" -#: ../../../library/pyexpat.rst:484 +#: ../../../library/pyexpat.rst:554 msgid "" "Called when the XML declaration is parsed. The XML declaration is the " "(optional) declaration of the applicable version of the XML recommendation, " "the encoding of the document text, and an optional \"standalone\" " "declaration. *version* and *encoding* will be strings, and *standalone* will " "be ``1`` if the document is declared standalone, ``0`` if it is declared not " -"to be standalone, or ``-1`` if the standalone clause was omitted. This is " -"only available with Expat version 1.95.0 or newer." +"to be standalone, or ``-1`` if the standalone clause was omitted." msgstr "" -#: ../../../library/pyexpat.rst:495 +#: ../../../library/pyexpat.rst:564 msgid "" "Called when Expat begins parsing the document type declaration (``'``." msgstr "" -#: ../../../library/pyexpat.rst:612 +#: ../../../library/pyexpat.rst:682 msgid "" "Called at the start of a CDATA section. This and :attr:" "`EndCdataSectionHandler` are needed to be able to identify the syntactical " "start and end for CDATA sections." msgstr "" -#: ../../../library/pyexpat.rst:619 +#: ../../../library/pyexpat.rst:689 msgid "Called at the end of a CDATA section." msgstr "" -#: ../../../library/pyexpat.rst:624 +#: ../../../library/pyexpat.rst:694 msgid "" "Called for any characters in the XML document for which no applicable " "handler has been specified. This means characters that are part of a " @@ -671,14 +728,14 @@ msgid "" "supplied." msgstr "" -#: ../../../library/pyexpat.rst:631 +#: ../../../library/pyexpat.rst:701 msgid "" -"This is the same as the :func:`DefaultHandler`, but doesn't inhibit " +"This is the same as the :attr:`DefaultHandler`, but doesn't inhibit " "expansion of internal entities. The entity reference will not be passed to " "the default handler." msgstr "" -#: ../../../library/pyexpat.rst:638 +#: ../../../library/pyexpat.rst:708 msgid "" "Called if the XML document hasn't been declared as being a standalone " "document. This happens when there is an external subset or a reference to a " @@ -688,7 +745,7 @@ msgid "" "set, no exception is raised by the parser for this condition." msgstr "" -#: ../../../library/pyexpat.rst:650 +#: ../../../library/pyexpat.rst:720 msgid "" "Implementing a handler that accesses local files and/or the network may " "create a vulnerability to `external entity attacks `_ before implementing this handler." msgstr "" -#: ../../../library/pyexpat.rst:657 +#: ../../../library/pyexpat.rst:727 msgid "" "Called for references to external entities. *base* is the current base, as " "set by a previous call to :meth:`SetBase`. The public and system " @@ -706,7 +763,7 @@ msgid "" "is opaque and should only be used as described below." msgstr "" -#: ../../../library/pyexpat.rst:663 +#: ../../../library/pyexpat.rst:733 msgid "" "For external entities to be parsed, this handler must be implemented. It is " "responsible for creating the sub-parser using " @@ -716,130 +773,149 @@ msgid "" "`XML_ERROR_EXTERNAL_ENTITY_HANDLING` error, otherwise parsing will continue." msgstr "" -#: ../../../library/pyexpat.rst:671 +#: ../../../library/pyexpat.rst:741 msgid "" "If this handler is not provided, external entities are reported by the :attr:" "`DefaultHandler` callback, if provided." msgstr "" -#: ../../../library/pyexpat.rst:678 +#: ../../../library/pyexpat.rst:747 +msgid "" +"Called for entity references which are not expanded, because the parser did " +"not read the declaration of the entity. This happens when the external DTD " +"subset or an external parameter entity is not parsed. *is_parameter_entity* " +"is true for a parameter entity and false for a general entity." +msgstr "" + +#: ../../../library/pyexpat.rst:758 msgid "ExpatError Exceptions" msgstr "" -#: ../../../library/pyexpat.rst:680 +#: ../../../library/pyexpat.rst:760 msgid ":exc:`ExpatError` exceptions have a number of interesting attributes:" msgstr "" -#: ../../../library/pyexpat.rst:685 +#: ../../../library/pyexpat.rst:765 msgid "" "Expat's internal error number for the specific error. The :data:`errors." "messages ` dictionary maps these error " "numbers to Expat's error messages. For example::" msgstr "" -#: ../../../library/pyexpat.rst:697 +#: ../../../library/pyexpat.rst:777 msgid "" "The :mod:`~xml.parsers.expat.errors` module also provides error message " "constants and a dictionary :data:`~xml.parsers.expat.errors.codes` mapping " "these messages back to the error codes, see below." msgstr "" -#: ../../../library/pyexpat.rst:704 +#: ../../../library/pyexpat.rst:784 msgid "" "Line number on which the error was detected. The first line is numbered " "``1``." msgstr "" -#: ../../../library/pyexpat.rst:709 +#: ../../../library/pyexpat.rst:789 msgid "" "Character offset into the line where the error occurred. The first column " "is numbered ``0``." msgstr "" -#: ../../../library/pyexpat.rst:716 +#: ../../../library/pyexpat.rst:796 msgid "Example" msgstr "" -#: ../../../library/pyexpat.rst:718 +#: ../../../library/pyexpat.rst:798 msgid "" "The following program defines three handlers that just print out their " "arguments. ::" msgstr "" -#: ../../../library/pyexpat.rst:742 +#: ../../../library/pyexpat.rst:822 msgid "The output from this program is::" msgstr "" -#: ../../../library/pyexpat.rst:759 +#: ../../../library/pyexpat.rst:839 msgid "Content Model Descriptions" msgstr "" -#: ../../../library/pyexpat.rst:763 +#: ../../../library/pyexpat.rst:843 msgid "" "Content models are described using nested tuples. Each tuple contains four " "values: the type, the quantifier, the name, and a tuple of children. " "Children are simply additional content model descriptions." msgstr "" -#: ../../../library/pyexpat.rst:767 +#: ../../../library/pyexpat.rst:847 msgid "" "The values of the first two fields are constants defined in the :mod:`!xml." "parsers.expat.model` module. These constants can be collected in two " "groups: the model type group and the quantifier group." msgstr "" -#: ../../../library/pyexpat.rst:771 +#: ../../../library/pyexpat.rst:851 msgid "The constants in the model type group are:" msgstr "" -#: ../../../library/pyexpat.rst:777 +#: ../../../library/pyexpat.rst:856 msgid "" "The element named by the model name was declared to have a content model of " "``ANY``." msgstr "" -#: ../../../library/pyexpat.rst:784 +#: ../../../library/pyexpat.rst:862 msgid "" "The named element allows a choice from a number of options; this is used for " "content models such as ``(A | B | C)``." msgstr "" -#: ../../../library/pyexpat.rst:791 +#: ../../../library/pyexpat.rst:868 msgid "Elements which are declared to be ``EMPTY`` have this model type." msgstr "" -#: ../../../library/pyexpat.rst:805 +#: ../../../library/pyexpat.rst:873 +msgid "" +"The named element allows character data, optionally interspersed with the " +"named children; this is used for content models such as ``(#PCDATA)`` and " +"``(#PCDATA | A | B)*``." +msgstr "" + +#: ../../../library/pyexpat.rst:880 +msgid "The model names a single element, as for ``A``." +msgstr "" + +#: ../../../library/pyexpat.rst:885 msgid "" "Models which represent a series of models which follow one after the other " "are indicated with this model type. This is used for models such as ``(A, " "B, C)``." msgstr "" -#: ../../../library/pyexpat.rst:808 +#: ../../../library/pyexpat.rst:888 msgid "The constants in the quantifier group are:" msgstr "" -#: ../../../library/pyexpat.rst:814 +#: ../../../library/pyexpat.rst:893 msgid "No modifier is given, so it can appear exactly once, as for ``A``." msgstr "" -#: ../../../library/pyexpat.rst:820 +#: ../../../library/pyexpat.rst:898 msgid "The model is optional: it can appear once or not at all, as for ``A?``." msgstr "" -#: ../../../library/pyexpat.rst:826 +#: ../../../library/pyexpat.rst:903 msgid "The model must occur one or more times (like ``A+``)." msgstr "" -#: ../../../library/pyexpat.rst:832 +#: ../../../library/pyexpat.rst:908 msgid "The model must occur zero or more times, as for ``A*``." msgstr "" -#: ../../../library/pyexpat.rst:838 +#: ../../../library/pyexpat.rst:914 msgid "Expat error constants" msgstr "" -#: ../../../library/pyexpat.rst:842 +#: ../../../library/pyexpat.rst:918 msgid "" "The following constants are provided in the :mod:`!xml.parsers.expat.errors` " "module. These constants are useful in interpreting some of the attributes " @@ -850,210 +926,210 @@ msgid "" "XML_ERROR_{CONSTANT_NAME}]`." msgstr "" -#: ../../../library/pyexpat.rst:850 +#: ../../../library/pyexpat.rst:926 msgid "The ``errors`` module has the following attributes:" msgstr "" -#: ../../../library/pyexpat.rst:854 +#: ../../../library/pyexpat.rst:930 msgid "A dictionary mapping string descriptions to their error codes." msgstr "" -#: ../../../library/pyexpat.rst:861 +#: ../../../library/pyexpat.rst:937 msgid "A dictionary mapping numeric error codes to their string descriptions." msgstr "" -#: ../../../library/pyexpat.rst:871 +#: ../../../library/pyexpat.rst:947 msgid "" "An entity reference in an attribute value referred to an external entity " "instead of an internal entity." msgstr "" -#: ../../../library/pyexpat.rst:877 +#: ../../../library/pyexpat.rst:953 msgid "" "A character reference referred to a character which is illegal in XML (for " "example, character ``0``, or '``�``')." msgstr "" -#: ../../../library/pyexpat.rst:883 +#: ../../../library/pyexpat.rst:959 msgid "" "An entity reference referred to an entity which was declared with a " "notation, so cannot be parsed." msgstr "" -#: ../../../library/pyexpat.rst:889 +#: ../../../library/pyexpat.rst:965 msgid "An attribute was used more than once in a start tag." msgstr "" -#: ../../../library/pyexpat.rst:897 +#: ../../../library/pyexpat.rst:973 msgid "" "Raised when an input byte could not properly be assigned to a character; for " "example, a NUL byte (value ``0``) in a UTF-8 input stream." msgstr "" -#: ../../../library/pyexpat.rst:903 +#: ../../../library/pyexpat.rst:979 msgid "Something other than whitespace occurred after the document element." msgstr "" -#: ../../../library/pyexpat.rst:908 +#: ../../../library/pyexpat.rst:984 msgid "" "An XML declaration was found somewhere other than the start of the input " "data." msgstr "" -#: ../../../library/pyexpat.rst:913 +#: ../../../library/pyexpat.rst:989 msgid "" "The document contains no elements (XML requires all documents to contain " -"exactly one top-level element).." +"exactly one top-level element)." msgstr "" -#: ../../../library/pyexpat.rst:919 +#: ../../../library/pyexpat.rst:995 msgid "Expat was not able to allocate memory internally." msgstr "" -#: ../../../library/pyexpat.rst:924 +#: ../../../library/pyexpat.rst:1000 msgid "A parameter entity reference was found where it was not allowed." msgstr "" -#: ../../../library/pyexpat.rst:929 +#: ../../../library/pyexpat.rst:1005 msgid "An incomplete character was found in the input." msgstr "" -#: ../../../library/pyexpat.rst:934 +#: ../../../library/pyexpat.rst:1010 msgid "" "An entity reference contained another reference to the same entity; possibly " "via a different name, and possibly indirectly." msgstr "" -#: ../../../library/pyexpat.rst:940 +#: ../../../library/pyexpat.rst:1016 msgid "Some unspecified syntax error was encountered." msgstr "" -#: ../../../library/pyexpat.rst:945 +#: ../../../library/pyexpat.rst:1021 msgid "An end tag did not match the innermost open start tag." msgstr "" -#: ../../../library/pyexpat.rst:950 +#: ../../../library/pyexpat.rst:1026 msgid "" "Some token (such as a start tag) was not closed before the end of the stream " "or the next token was encountered." msgstr "" -#: ../../../library/pyexpat.rst:956 +#: ../../../library/pyexpat.rst:1032 msgid "A reference was made to an entity which was not defined." msgstr "" -#: ../../../library/pyexpat.rst:961 +#: ../../../library/pyexpat.rst:1037 msgid "The document encoding is not supported by Expat." msgstr "" -#: ../../../library/pyexpat.rst:966 +#: ../../../library/pyexpat.rst:1042 msgid "A CDATA marked section was not closed." msgstr "" -#: ../../../library/pyexpat.rst:974 +#: ../../../library/pyexpat.rst:1050 msgid "" "The parser determined that the document was not \"standalone\" though it " "declared itself to be in the XML declaration, and the :attr:" "`NotStandaloneHandler` was set and returned ``0``." msgstr "" -#: ../../../library/pyexpat.rst:987 +#: ../../../library/pyexpat.rst:1063 msgid "" "An operation was requested that requires DTD support to be compiled in, but " "Expat was configured without DTD support. This should never be reported by " "a standard build of the :mod:`!xml.parsers.expat` module." msgstr "" -#: ../../../library/pyexpat.rst:994 +#: ../../../library/pyexpat.rst:1070 msgid "" "A behavioral change was requested after parsing started that can only be " "changed before parsing has started. This is (currently) only raised by :" "meth:`UseForeignDTD`." msgstr "" -#: ../../../library/pyexpat.rst:1001 +#: ../../../library/pyexpat.rst:1077 msgid "An undeclared prefix was found when namespace processing was enabled." msgstr "" -#: ../../../library/pyexpat.rst:1006 +#: ../../../library/pyexpat.rst:1082 msgid "" "The document attempted to remove the namespace declaration associated with a " "prefix." msgstr "" -#: ../../../library/pyexpat.rst:1012 +#: ../../../library/pyexpat.rst:1088 msgid "A parameter entity contained incomplete markup." msgstr "" -#: ../../../library/pyexpat.rst:1017 -msgid "The document contained no document element at all." +#: ../../../library/pyexpat.rst:1093 +msgid "There was an error parsing the XML declaration." msgstr "" -#: ../../../library/pyexpat.rst:1022 +#: ../../../library/pyexpat.rst:1098 msgid "There was an error parsing a text declaration in an external entity." msgstr "" -#: ../../../library/pyexpat.rst:1027 +#: ../../../library/pyexpat.rst:1103 msgid "Characters were found in the public id that are not allowed." msgstr "" -#: ../../../library/pyexpat.rst:1032 +#: ../../../library/pyexpat.rst:1108 msgid "" "The requested operation was made on a suspended parser, but isn't allowed. " "This includes attempts to provide additional input or to stop the parser." msgstr "" -#: ../../../library/pyexpat.rst:1038 +#: ../../../library/pyexpat.rst:1114 msgid "" "An attempt to resume the parser was made when the parser had not been " "suspended." msgstr "" -#: ../../../library/pyexpat.rst:1043 ../../../library/pyexpat.rst:1076 -#: ../../../library/pyexpat.rst:1081 +#: ../../../library/pyexpat.rst:1119 ../../../library/pyexpat.rst:1152 +#: ../../../library/pyexpat.rst:1157 msgid "This should not be reported to Python applications." msgstr "" -#: ../../../library/pyexpat.rst:1048 +#: ../../../library/pyexpat.rst:1124 msgid "" "The requested operation was made on a parser which was finished parsing " "input, but isn't allowed. This includes attempts to provide additional " "input or to stop the parser." msgstr "" -#: ../../../library/pyexpat.rst:1058 +#: ../../../library/pyexpat.rst:1134 msgid "" "An attempt was made to undeclare reserved namespace prefix ``xml`` or to " "bind it to another namespace URI." msgstr "" -#: ../../../library/pyexpat.rst:1065 +#: ../../../library/pyexpat.rst:1141 msgid "" "An attempt was made to declare or undeclare reserved namespace prefix " "``xmlns``." msgstr "" -#: ../../../library/pyexpat.rst:1070 +#: ../../../library/pyexpat.rst:1146 msgid "" "An attempt was made to bind the URI of one the reserved namespace prefixes " "``xml`` and ``xmlns`` to another namespace prefix." msgstr "" -#: ../../../library/pyexpat.rst:1086 +#: ../../../library/pyexpat.rst:1162 msgid "" "The limit on input amplification factor (from DTD and entities) has been " "breached." msgstr "" -#: ../../../library/pyexpat.rst:1092 +#: ../../../library/pyexpat.rst:1168 msgid "The parser was tried to be stopped or suspended before it started." msgstr "" -#: ../../../library/pyexpat.rst:1098 +#: ../../../library/pyexpat.rst:1174 msgid "Footnotes" msgstr "" -#: ../../../library/pyexpat.rst:1099 +#: ../../../library/pyexpat.rst:1175 msgid "" "The encoding string included in XML output should conform to the appropriate " "standards. For example, \"UTF-8\" is valid, but \"UTF8\" is not valid in an " diff --git a/main/locale/pot/LC_MESSAGES/library/site.pot b/main/locale/pot/LC_MESSAGES/library/site.pot index fbaf204bc7f..40ad01d4778 100644 --- a/main/locale/pot/LC_MESSAGES/library/site.pot +++ b/main/locale/pot/LC_MESSAGES/library/site.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -533,23 +533,24 @@ msgstr "" #: ../../../library/site.rst:456 msgid "" -"For each directory present in *prefixes* (or :data:`PREFIXES` if *prefixes* " -"is ``None``), this function will find its site-packages subdirectory " -"depending on the system environment, and will return a list of full paths." +"For each directory given in *prefixes* (or :data:`PREFIXES` if *prefixes* is " +"``None``), this function will compute its site-packages subdirectory " +"depending on the system environment, and will return a list of full paths, " +"which are not checked for existence." msgstr "" -#: ../../../library/site.rst:462 +#: ../../../library/site.rst:463 msgid "Added the optional *prefixes* parameter." msgstr "" -#: ../../../library/site.rst:468 +#: ../../../library/site.rst:469 msgid "" "Return the path of the user base directory, :data:`USER_BASE`. If it is not " "initialized yet, this function will also set it, respecting :envvar:" "`PYTHONUSERBASE`." msgstr "" -#: ../../../library/site.rst:477 +#: ../../../library/site.rst:478 msgid "" "Return the path of the user-specific site-packages directory, :data:" "`USER_SITE`. If it is not initialized yet, this function will also set it, " @@ -557,17 +558,17 @@ msgid "" "packages was added to ``sys.path`` :data:`ENABLE_USER_SITE` should be used." msgstr "" -#: ../../../library/site.rst:489 +#: ../../../library/site.rst:490 msgid "Command-line interface" msgstr "" -#: ../../../library/site.rst:493 +#: ../../../library/site.rst:494 msgid "" "The :mod:`!site` module also provides a way to get the user directories from " "the command line:" msgstr "" -#: ../../../library/site.rst:501 +#: ../../../library/site.rst:502 msgid "" "If it is called without arguments, it will print the contents of :data:`sys." "path` on the standard output, followed by the value of :data:`USER_BASE` and " @@ -575,21 +576,21 @@ msgid "" "finally the value of :data:`ENABLE_USER_SITE`." msgstr "" -#: ../../../library/site.rst:508 +#: ../../../library/site.rst:509 msgid "Print the path to the user base directory." msgstr "" -#: ../../../library/site.rst:512 +#: ../../../library/site.rst:513 msgid "Print the path to the user site-packages directory." msgstr "" -#: ../../../library/site.rst:514 +#: ../../../library/site.rst:515 msgid "" "If both options are given, user base and user site will be printed (always " "in this order), separated by :data:`os.pathsep`." msgstr "" -#: ../../../library/site.rst:517 +#: ../../../library/site.rst:518 msgid "" "If any option is given, the script will exit with one of these values: ``0`` " "if the user site-packages directory is enabled, ``1`` if it was disabled by " @@ -597,17 +598,17 @@ msgid "" "administrator, and a value greater than 2 if there is an error." msgstr "" -#: ../../../library/site.rst:524 +#: ../../../library/site.rst:525 msgid ":pep:`370` -- Per user site-packages directory" msgstr "" -#: ../../../library/site.rst:525 +#: ../../../library/site.rst:526 msgid "" ":pep:`829` -- Startup entry points and the deprecation of import lines in ``." "pth`` files" msgstr "" -#: ../../../library/site.rst:526 +#: ../../../library/site.rst:527 msgid ":ref:`sys-path-init` -- The initialization of :data:`sys.path`." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/stdtypes.pot b/main/locale/pot/LC_MESSAGES/library/stdtypes.pot index fe006badf09..3bf05dbcd99 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-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -103,21 +103,21 @@ msgstr "" #: ../../../library/stdtypes.rst:88 ../../../library/stdtypes.rst:146 #: ../../../library/stdtypes.rst:292 ../../../library/stdtypes.rst:382 -#: ../../../library/stdtypes.rst:432 ../../../library/stdtypes.rst:1015 -#: ../../../library/stdtypes.rst:1237 +#: ../../../library/stdtypes.rst:432 ../../../library/stdtypes.rst:1289 +#: ../../../library/stdtypes.rst:1513 msgid "Operation" msgstr "" #: ../../../library/stdtypes.rst:88 ../../../library/stdtypes.rst:292 #: ../../../library/stdtypes.rst:382 ../../../library/stdtypes.rst:432 -#: ../../../library/stdtypes.rst:1015 ../../../library/stdtypes.rst:1237 +#: ../../../library/stdtypes.rst:1289 ../../../library/stdtypes.rst:1513 msgid "Result" msgstr "" #: ../../../library/stdtypes.rst:88 ../../../library/stdtypes.rst:292 -#: ../../../library/stdtypes.rst:432 ../../../library/stdtypes.rst:1015 -#: ../../../library/stdtypes.rst:1237 ../../../library/stdtypes.rst:3208 -#: ../../../library/stdtypes.rst:4510 +#: ../../../library/stdtypes.rst:432 ../../../library/stdtypes.rst:1289 +#: ../../../library/stdtypes.rst:1513 ../../../library/stdtypes.rst:3484 +#: ../../../library/stdtypes.rst:4786 msgid "Notes" msgstr "" @@ -129,9 +129,9 @@ msgstr "" msgid "if *x* is true, then *x*, else *y*" msgstr "" -#: ../../../library/stdtypes.rst:90 ../../../library/stdtypes.rst:1017 -#: ../../../library/stdtypes.rst:1020 ../../../library/stdtypes.rst:1252 -#: ../../../library/stdtypes.rst:3214 ../../../library/stdtypes.rst:4516 +#: ../../../library/stdtypes.rst:90 ../../../library/stdtypes.rst:1291 +#: ../../../library/stdtypes.rst:1294 ../../../library/stdtypes.rst:1528 +#: ../../../library/stdtypes.rst:3490 ../../../library/stdtypes.rst:4792 msgid "\\(1)" msgstr "" @@ -144,9 +144,9 @@ msgid "if *x* is false, then *x*, else *y*" msgstr "" #: ../../../library/stdtypes.rst:93 ../../../library/stdtypes.rst:305 -#: ../../../library/stdtypes.rst:325 ../../../library/stdtypes.rst:1263 -#: ../../../library/stdtypes.rst:3218 ../../../library/stdtypes.rst:3220 -#: ../../../library/stdtypes.rst:4520 ../../../library/stdtypes.rst:4522 +#: ../../../library/stdtypes.rst:325 ../../../library/stdtypes.rst:1539 +#: ../../../library/stdtypes.rst:3494 ../../../library/stdtypes.rst:3496 +#: ../../../library/stdtypes.rst:4796 ../../../library/stdtypes.rst:4798 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:3222 -#: ../../../library/stdtypes.rst:3224 ../../../library/stdtypes.rst:3226 -#: ../../../library/stdtypes.rst:3228 ../../../library/stdtypes.rst:4524 -#: ../../../library/stdtypes.rst:4526 ../../../library/stdtypes.rst:4528 -#: ../../../library/stdtypes.rst:4530 +#: ../../../library/stdtypes.rst:96 ../../../library/stdtypes.rst:3498 +#: ../../../library/stdtypes.rst:3500 ../../../library/stdtypes.rst:3502 +#: ../../../library/stdtypes.rst:3504 ../../../library/stdtypes.rst:4800 +#: ../../../library/stdtypes.rst:4802 ../../../library/stdtypes.rst:4804 +#: ../../../library/stdtypes.rst:4806 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:3258 -#: ../../../library/stdtypes.rst:4560 +#: ../../../library/stdtypes.rst:450 ../../../library/stdtypes.rst:1333 +#: ../../../library/stdtypes.rst:1543 ../../../library/stdtypes.rst:3534 +#: ../../../library/stdtypes.rst:4836 msgid "Notes:" msgstr "" @@ -208,9 +208,9 @@ msgstr "" msgid "This table summarizes the comparison operations:" msgstr "" -#: ../../../library/stdtypes.rst:146 ../../../library/stdtypes.rst:3185 -#: ../../../library/stdtypes.rst:3208 ../../../library/stdtypes.rst:4487 -#: ../../../library/stdtypes.rst:4510 +#: ../../../library/stdtypes.rst:146 ../../../library/stdtypes.rst:3461 +#: ../../../library/stdtypes.rst:3484 ../../../library/stdtypes.rst:4763 +#: ../../../library/stdtypes.rst:4786 msgid "Meaning" msgstr "" @@ -519,8 +519,8 @@ msgid "" "zero." msgstr "" -#: ../../../library/stdtypes.rst:318 ../../../library/stdtypes.rst:3216 -#: ../../../library/stdtypes.rst:4547 +#: ../../../library/stdtypes.rst:318 ../../../library/stdtypes.rst:3492 +#: ../../../library/stdtypes.rst:4823 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:3241 ../../../library/stdtypes.rst:3244 -#: ../../../library/stdtypes.rst:3247 ../../../library/stdtypes.rst:4543 -#: ../../../library/stdtypes.rst:4550 +#: ../../../library/stdtypes.rst:3517 ../../../library/stdtypes.rst:3520 +#: ../../../library/stdtypes.rst:3523 ../../../library/stdtypes.rst:4819 +#: ../../../library/stdtypes.rst:4826 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:3230 -#: ../../../library/stdtypes.rst:3234 ../../../library/stdtypes.rst:4532 -#: ../../../library/stdtypes.rst:4536 +#: ../../../library/stdtypes.rst:440 ../../../library/stdtypes.rst:3506 +#: ../../../library/stdtypes.rst:3510 ../../../library/stdtypes.rst:4808 +#: ../../../library/stdtypes.rst:4812 msgid "\\(4)" msgstr "" @@ -1136,11 +1136,11 @@ msgid "" "using :func:`int` instead." msgstr "" -#: ../../../library/stdtypes.rst:897 -msgid "Iterator Types" +#: ../../../library/stdtypes.rst:899 +msgid "Iteration-related types" msgstr "" -#: ../../../library/stdtypes.rst:905 +#: ../../../library/stdtypes.rst:907 msgid "" "Python supports a concept of iteration over containers. This is implemented " "using two distinct methods; these are used to allow user-defined classes to " @@ -1148,13 +1148,17 @@ msgid "" "support the iteration methods." msgstr "" -#: ../../../library/stdtypes.rst:910 +#: ../../../library/stdtypes.rst:913 +msgid "Iterables" +msgstr "" + +#: ../../../library/stdtypes.rst:915 msgid "" "One method needs to be defined for container objects to provide :term:" "`iterable` support:" msgstr "" -#: ../../../library/stdtypes.rst:917 +#: ../../../library/stdtypes.rst:922 msgid "" "Return an :term:`iterator` object. The object is required to support the " "iterator protocol described below. If a container supports different types " @@ -1166,13 +1170,17 @@ msgid "" "in the Python/C API." msgstr "" -#: ../../../library/stdtypes.rst:926 +#: ../../../library/stdtypes.rst:934 +msgid "Iterators" +msgstr "" + +#: ../../../library/stdtypes.rst:936 msgid "" "The iterator objects themselves are required to support the following two " "methods, which together form the :dfn:`iterator protocol`:" msgstr "" -#: ../../../library/stdtypes.rst:932 +#: ../../../library/stdtypes.rst:941 msgid "" "Return the :term:`iterator` object itself. This is required to allow both " "containers and iterators to be used with the :keyword:`for` and :keyword:" @@ -1180,7 +1188,7 @@ msgid "" "tp_iter` slot of the type structure for Python objects in the Python/C API." msgstr "" -#: ../../../library/stdtypes.rst:941 +#: ../../../library/stdtypes.rst:950 msgid "" "Return the next item from the :term:`iterator`. If there are no further " "items, raise the :exc:`StopIteration` exception. This method corresponds to " @@ -1188,7 +1196,7 @@ msgid "" "Python objects in the Python/C API." msgstr "" -#: ../../../library/stdtypes.rst:946 +#: ../../../library/stdtypes.rst:955 msgid "" "Python defines several iterator objects to support iteration over general " "and specific sequence types, dictionaries, and other more specialized " @@ -1196,33 +1204,318 @@ msgid "" "the iterator protocol." msgstr "" -#: ../../../library/stdtypes.rst:951 +#: ../../../library/stdtypes.rst:960 msgid "" "Once an iterator's :meth:`~iterator.__next__` method raises :exc:" "`StopIteration`, it must continue to do so on subsequent calls. " "Implementations that do not obey this property are deemed broken." msgstr "" -#: ../../../library/stdtypes.rst:959 -msgid "Generator Types" +#: ../../../library/stdtypes.rst:968 +msgid "Generator types" msgstr "" -#: ../../../library/stdtypes.rst:961 +#: ../../../library/stdtypes.rst:970 +msgid "" +"Python's :term:`generators ` -- or more precisely, :term:" +"`generator functions ` and :term:`generator iterators " +"` -- provide a convenient way to implement the iterator " +"protocol." +msgstr "" + +#: ../../../library/stdtypes.rst:975 msgid "" -"Python's :term:`generator`\\s provide a convenient way to implement the " -"iterator protocol. If a container object's :meth:`~object.__iter__` method " -"is implemented as a generator, it will automatically return an iterator " -"object (technically, a generator object) supplying the :meth:`~iterator." -"__iter__` and :meth:`~generator.__next__` methods. More information about " -"generators can be found in :ref:`the documentation for the yield expression " -"`." +"A function that contains one or more :ref:`yield expressions ` is " +"a :term:`generator function`. For example::" msgstr "" -#: ../../../library/stdtypes.rst:973 +#: ../../../library/stdtypes.rst:985 +msgid "" +"Generator functions behave as regular :ref:`user-defined functions ` (for example, they have the same attributes), except that " +"calling a generator function returns a :ref:`generator iterator `::" +msgstr "" + +#: ../../../library/stdtypes.rst:993 +msgid "" +"Iterating a generator iterator executes code of the underlying generator " +"function, producing each :keyword:`yield`\\ed value in turn::" +msgstr "" + +#: ../../../library/stdtypes.rst:1006 +msgid "" +"One common use for generator functions is implementing the :meth:`~object." +"__iter__` method of custom iterable objects. For example::" +msgstr "" + +#: ../../../library/stdtypes.rst:1023 +msgid "Generator iterators" +msgstr "" + +#: ../../../library/stdtypes.rst:1025 +msgid "" +"Generator iterators implement the :ref:`iterator protocol `. Iterating them drives execution of the underlying generator " +"function." +msgstr "" + +#: ../../../library/stdtypes.rst:1033 +msgid "" +"Starts the execution of a generator function or resumes it at the :ref:" +"`yield expression ` where the function is currently suspended. " +"When a generator function is resumed with a :meth:`~generator.__next__` " +"method, the current yield expression always evaluates to :const:`None`. The " +"execution then continues to the next yield expression, where the generator " +"is suspended again, and the value of the expression after the :keyword:" +"`yield` keyword is returned to :meth:`~generator.__next__`'s caller. If the " +"generator exits without yielding another value, :meth:`~generator.__next__` " +"raises a :exc:`StopIteration` exception, signalling that iteration has " +"completed." +msgstr "" + +#: ../../../library/stdtypes.rst:1045 +msgid "" +"This method is normally called implicitly, for example by a :keyword:`for` " +"loop, or by the built-in :func:`next` function." +msgstr "" + +#: ../../../library/stdtypes.rst:1048 +msgid "" +"Generator iterators have a few more methods than generic iterators, which " +"can be used to control the execution of the underlying generator function:" +msgstr "" + +#: ../../../library/stdtypes.rst:1053 +msgid "" +"\"Sends\" a value into the generator function: the *value* argument becomes " +"the result of the current yield expression." +msgstr "" + +#: ../../../library/stdtypes.rst:1056 +msgid "" +"Otherwise, this method behaves like :meth:`~generator.__next__`: it resumes " +"the underlying function and either returns the next yielded value or raises :" +"exc:`StopIteration`." +msgstr "" + +#: ../../../library/stdtypes.rst:1060 +msgid "" +"When :meth:`send` is called to start the generator, it must be called with :" +"const:`None` as the argument, because there is no current yield expression " +"that could receive the value." +msgstr "" + +#: ../../../library/stdtypes.rst:1068 +msgid "" +"Raises an exception at the point where the generator is currently suspended." +msgstr "" + +#: ../../../library/stdtypes.rst:1070 +msgid "" +"Otherwise, this method behaves like :meth:`~generator.__next__`: it resumes " +"the underlying function and either returns the next yielded value or raises :" +"exc:`StopIteration`. If the generator function does not catch the passed-in " +"exception, or raises a different exception, then that exception propagates " +"to the caller." +msgstr "" + +#: ../../../library/stdtypes.rst:1076 +msgid "" +"When :meth:`throw` is called to start the generator, the generator " +"immediately exits (that is, subsequent calls to :meth:`~generator.__next__` " +"will raise :exc:`StopIteration`) and the thrown exception is propagated to :" +"meth:`throw`'s caller." +msgstr "" + +#: ../../../library/stdtypes.rst:1081 ../../../library/stdtypes.rst:1202 +msgid "" +"In typical use, this is called with a single argument, an exception " +"instance, similar to the way the :keyword:`raise` keyword is used." +msgstr "" + +#: ../../../library/stdtypes.rst:1084 +msgid "" +"For backwards compatibility, however, the second signature is supported, " +"following a convention from older versions of Python. The *type* argument " +"should be an exception class, and *value* should be an exception instance. " +"If the *value* is not provided, the *type* constructor is called to get an " +"instance. If *traceback* is provided, it is set on the exception, otherwise " +"any existing :attr:`~BaseException.__traceback__` attribute stored in " +"*value* may be cleared." +msgstr "" + +#: ../../../library/stdtypes.rst:1095 ../../../library/stdtypes.rst:1212 +msgid "" +"The second signature \\(type\\[, value\\[, traceback\\]\\]\\) is deprecated " +"and may be removed in a future version of Python." +msgstr "" + +#: ../../../library/stdtypes.rst:1102 +msgid "" +"Raises a :exc:`GeneratorExit` exception at the point where the generator " +"function is currently suspended (equivalent to calling " +"``throw(GeneratorExit)``)." +msgstr "" + +#: ../../../library/stdtypes.rst:1105 +msgid "" +"If the generator function has already exited (due to an exception or normal " +"return), or raises :exc:`GeneratorExit` (by not catching the exception), :" +"meth:`close` returns :const:`None`. If the generator yields a value, a :exc:" +"`RuntimeError` is raised. If the generator raises any other exception, it is " +"propagated to the caller. If a generator returns a value upon being closed, " +"that value is returned by :meth:`close`." +msgstr "" + +#: ../../../library/stdtypes.rst:1113 +msgid "" +"When a generator iterator is garbage collected before it has exited, :meth:" +"`~generator.close` is called automatically." +msgstr "" + +#: ../../../library/stdtypes.rst:1118 +msgid "" +"If a generator returns a value upon being closed, the value is returned by :" +"meth:`close`. Previously, it returned ``None``." +msgstr "" + +#: ../../../library/stdtypes.rst:1123 +msgid "" +"Calling any of the generator methods (:meth:`~generator.__next__`, :meth:" +"`~generator.send`, :meth:`~generator.throw`, :meth:`~generator.close`) while " +"one of these methods is already executing raises a :exc:`ValueError` " +"exception." +msgstr "" + +#: ../../../library/stdtypes.rst:1133 +msgid "Asynchronous generator iterators" +msgstr "" + +#: ../../../library/stdtypes.rst:1135 +msgid "" +"This subsection describes the methods of an asynchronous generator iterator, " +"which are used to control the execution of an asynchronous generator " +"function." +msgstr "" + +#: ../../../library/stdtypes.rst:1144 +msgid "" +"Returns an :term:`awaitable` which when run starts to execute the " +"asynchronous generator function or resumes it at the :ref:`yield expression " +"` where the function is currently suspended. When an asynchronous " +"generator function is resumed with an :meth:`~agen.__anext__` method, the " +"current yield expression always evaluates to :const:`None` in the returned " +"awaitable, which when run will continue to the next yield expression. The " +"value of the expression after the :keyword:`yield` keyword is the value of " +"the :exc:`StopIteration` exception raised by the completing coroutine. If " +"the asynchronous generator exits without yielding another value, the " +"awaitable instead raises a :exc:`StopAsyncIteration` exception, signalling " +"that the asynchronous iteration has completed." +msgstr "" + +#: ../../../library/stdtypes.rst:1157 +msgid "" +"This method is normally called implicitly by an :keyword:`async for` loop, " +"or by the built-in :func:`anext` function." +msgstr "" + +#: ../../../library/stdtypes.rst:1161 +msgid "" +"Asynchronous generator-iterators have a few more methods than generic " +"asynchronous iterators, which can be used to control the execution of the " +"underlying generator function:" +msgstr "" + +#: ../../../library/stdtypes.rst:1168 +msgid "" +"Returns an awaitable which, when run, \"sends\" a value into the underlying " +"asynchronous generator function: the *value* argument becomes the result of " +"the current yield expression." +msgstr "" + +#: ../../../library/stdtypes.rst:1172 +msgid "" +"Otherwise, this method behaves like :meth:`~agen.__anext__`: when the " +"returned awaitable runs, it resumes the underlying function and either " +"returns the next yielded value as the value of the raised :exc:" +"`StopIteration`, or raises :exc:`StopAsyncIteration`." +msgstr "" + +#: ../../../library/stdtypes.rst:1177 +msgid "" +"When :meth:`asend` is called to start the asynchronous generator, it must be " +"called with :const:`None` as the argument, because there is no yield " +"expression that could receive the value." +msgstr "" + +#: ../../../library/stdtypes.rst:1186 +msgid "" +"Returns an awaitable that, when run, raises an exception at the point where " +"the underlying asynchronous generator function is currently suspended." +msgstr "" + +#: ../../../library/stdtypes.rst:1189 +msgid "" +"Otherwise, this method behaves like :meth:`~agen.__anext__`: when the " +"returned awaitable runs, it resumes the underlying function (with an " +"exception raised) and either returns the next yielded value as the value of " +"the raised :exc:`StopIteration`, or raises :exc:`StopAsyncIteration`. If the " +"underlying function does not catch the passed-in exception, or raises a " +"different exception, then when the awaitable is run, that exception " +"propagates to the caller of the awaitable." +msgstr "" + +#: ../../../library/stdtypes.rst:1197 +msgid "" +"When :meth:`~agen.athrow` is called to start the generator, the generator " +"exits when the awaitable runs (that is, subsequent results from :meth:`~agen." +"__anext__` will raise :exc:`StopAsyncIteration` when run) and the thrown " +"exception is propagated to the awaitable's caller." +msgstr "" + +#: ../../../library/stdtypes.rst:1205 +msgid "" +"For backwards compatibility, however, the second signature is supported. An " +"exception instance is created from three arguments in the same way as in :" +"meth:`generator.throw`." +msgstr "" + +#: ../../../library/stdtypes.rst:1221 +msgid "" +"Returns an awaitable that when run will throw a :exc:`GeneratorExit` into " +"the underlying asynchronous generator function at the point where it is " +"currently suspended (equivalent to calling ``athrow(GeneratorExit)``)." +msgstr "" + +#: ../../../library/stdtypes.rst:1225 +msgid "" +"If the asynchronous generator function then exits gracefully, is already " +"closed, or raises :exc:`GeneratorExit` (by not catching the exception), then " +"the returned awaitable will raise a :exc:`StopIteration` exception. Any " +"further awaitables returned by subsequent calls to the asynchronous " +"generator will raise a :exc:`StopAsyncIteration` exception." +msgstr "" + +#: ../../../library/stdtypes.rst:1231 +msgid "" +"If the asynchronous generator yields a value, a :exc:`RuntimeError` is " +"raised by the awaitable. If the asynchronous generator raises any other " +"exception, that exception is propagated to the caller of the awaitable." +msgstr "" + +#: ../../../library/stdtypes.rst:1236 +msgid "" +"If the asynchronous generator has already exited due to an exception or " +"normal exit, then further calls to :meth:`aclose` will return an awaitable " +"that does nothing." +msgstr "" + +#: ../../../library/stdtypes.rst:1244 msgid "Sequence Types --- :class:`list`, :class:`tuple`, :class:`range`" msgstr "" -#: ../../../library/stdtypes.rst:975 +#: ../../../library/stdtypes.rst:1246 msgid "" "There are three basic sequence types: lists, tuples, and range objects. " "Additional sequence types tailored for processing of :ref:`binary data " @@ -1230,11 +1523,11 @@ msgid "" "sections." msgstr "" -#: ../../../library/stdtypes.rst:984 +#: ../../../library/stdtypes.rst:1255 msgid "Common Sequence Operations" msgstr "" -#: ../../../library/stdtypes.rst:988 +#: ../../../library/stdtypes.rst:1259 msgid "" "The operations in the following table are supported by most sequence types, " "both mutable and immutable. The :class:`collections.abc.Sequence` ABC is " @@ -1242,7 +1535,7 @@ msgid "" "sequence types." msgstr "" -#: ../../../library/stdtypes.rst:993 +#: ../../../library/stdtypes.rst:1264 msgid "" "This table lists the sequence operations sorted in ascending priority. In " "the table, *s* and *t* are sequences of the same type, *n*, *i*, *j* and *k* " @@ -1250,7 +1543,7 @@ msgid "" "restrictions imposed by *s*." msgstr "" -#: ../../../library/stdtypes.rst:998 +#: ../../../library/stdtypes.rst:1269 msgid "" "The ``in`` and ``not in`` operations have the same priorities as the " "comparison operations. The ``+`` (concatenation) and ``*`` (repetition) " @@ -1258,107 +1551,112 @@ msgid "" "[3]_" msgstr "" -#: ../../../library/stdtypes.rst:1017 +#: ../../../library/stdtypes.rst:1273 +msgid "" +"See :ref:`time-complexity` for the costs of the various sequence operations." +msgstr "" + +#: ../../../library/stdtypes.rst:1291 msgid "``x in s``" msgstr "" -#: ../../../library/stdtypes.rst:1017 +#: ../../../library/stdtypes.rst:1291 msgid "``True`` if an item of *s* is equal to *x*, else ``False``" msgstr "" -#: ../../../library/stdtypes.rst:1020 +#: ../../../library/stdtypes.rst:1294 msgid "``x not in s``" msgstr "" -#: ../../../library/stdtypes.rst:1020 +#: ../../../library/stdtypes.rst:1294 msgid "``False`` if an item of *s* is equal to *x*, else ``True``" msgstr "" -#: ../../../library/stdtypes.rst:1023 +#: ../../../library/stdtypes.rst:1297 msgid "``s + t``" msgstr "" -#: ../../../library/stdtypes.rst:1023 +#: ../../../library/stdtypes.rst:1297 msgid "the concatenation of *s* and *t*" msgstr "" -#: ../../../library/stdtypes.rst:1023 +#: ../../../library/stdtypes.rst:1297 msgid "(6)(7)" msgstr "" -#: ../../../library/stdtypes.rst:1026 +#: ../../../library/stdtypes.rst:1300 msgid "``s * n`` or ``n * s``" msgstr "" -#: ../../../library/stdtypes.rst:1026 +#: ../../../library/stdtypes.rst:1300 msgid "equivalent to adding *s* to itself *n* times" msgstr "" -#: ../../../library/stdtypes.rst:1026 +#: ../../../library/stdtypes.rst:1300 msgid "(2)(7)" msgstr "" -#: ../../../library/stdtypes.rst:1029 +#: ../../../library/stdtypes.rst:1303 msgid "``s[i]``" msgstr "" -#: ../../../library/stdtypes.rst:1029 +#: ../../../library/stdtypes.rst:1303 msgid "*i*\\ th item of *s*, origin 0" msgstr "" -#: ../../../library/stdtypes.rst:1029 +#: ../../../library/stdtypes.rst:1303 msgid "(3)(8)" msgstr "" -#: ../../../library/stdtypes.rst:1031 +#: ../../../library/stdtypes.rst:1305 msgid "``s[i:j]``" msgstr "" -#: ../../../library/stdtypes.rst:1031 +#: ../../../library/stdtypes.rst:1305 msgid "slice of *s* from *i* to *j*" msgstr "" -#: ../../../library/stdtypes.rst:1031 +#: ../../../library/stdtypes.rst:1305 msgid "(3)(4)" msgstr "" -#: ../../../library/stdtypes.rst:1033 +#: ../../../library/stdtypes.rst:1307 msgid "``s[i:j:k]``" msgstr "" -#: ../../../library/stdtypes.rst:1033 +#: ../../../library/stdtypes.rst:1307 msgid "slice of *s* from *i* to *j* with step *k*" msgstr "" -#: ../../../library/stdtypes.rst:1033 +#: ../../../library/stdtypes.rst:1307 msgid "(3)(5)" msgstr "" -#: ../../../library/stdtypes.rst:1036 +#: ../../../library/stdtypes.rst:1310 msgid "``len(s)``" msgstr "" -#: ../../../library/stdtypes.rst:1036 +#: ../../../library/stdtypes.rst:1310 msgid "length of *s*" msgstr "" -#: ../../../library/stdtypes.rst:1038 +#: ../../../library/stdtypes.rst:1312 msgid "``min(s)``" msgstr "" -#: ../../../library/stdtypes.rst:1038 +#: ../../../library/stdtypes.rst:1312 msgid "smallest item of *s*" msgstr "" -#: ../../../library/stdtypes.rst:1040 +#: ../../../library/stdtypes.rst:1314 msgid "``max(s)``" msgstr "" -#: ../../../library/stdtypes.rst:1040 +#: ../../../library/stdtypes.rst:1314 msgid "largest item of *s*" msgstr "" -#: ../../../library/stdtypes.rst:1043 +#: ../../../library/stdtypes.rst:1317 msgid "" "Sequences of the same type also support comparisons. In particular, tuples " "and lists are compared lexicographically by comparing corresponding " @@ -1367,7 +1665,7 @@ msgid "" "(For full details see :ref:`comparisons` in the language reference.)" msgstr "" -#: ../../../library/stdtypes.rst:1053 +#: ../../../library/stdtypes.rst:1327 msgid "" "Forward and reversed iterators over mutable sequences access values using an " "index. That index will continue to march forward (or backward) even if the " @@ -1376,7 +1674,7 @@ msgid "" "drops below zero)." msgstr "" -#: ../../../library/stdtypes.rst:1062 +#: ../../../library/stdtypes.rst:1336 msgid "" "While the ``in`` and ``not in`` operations are used only for simple " "containment testing in the general case, some specialised sequences (such " @@ -1384,7 +1682,7 @@ msgid "" "subsequence testing::" msgstr "" -#: ../../../library/stdtypes.rst:1071 +#: ../../../library/stdtypes.rst:1345 msgid "" "Values of *n* less than ``0`` are treated as ``0`` (which yields an empty " "sequence of the same type as *s*). Note that items in the sequence *s* are " @@ -1392,7 +1690,7 @@ msgid "" "Python programmers; consider::" msgstr "" -#: ../../../library/stdtypes.rst:1083 +#: ../../../library/stdtypes.rst:1357 msgid "" "What has happened is that ``[[]]`` is a one-element list containing an empty " "list, so all three elements of ``[[]] * 3`` are references to this single " @@ -1400,46 +1698,46 @@ msgid "" "list. You can create a list of different lists this way::" msgstr "" -#: ../../../library/stdtypes.rst:1095 +#: ../../../library/stdtypes.rst:1369 msgid "" "Further explanation is available in the FAQ entry :ref:`faq-multidimensional-" "list`." msgstr "" -#: ../../../library/stdtypes.rst:1099 +#: ../../../library/stdtypes.rst:1373 msgid "" "If *i* or *j* is negative, the index is relative to the end of sequence *s*: " "``len(s) + i`` or ``len(s) + j`` is substituted. But note that ``-0`` is " "still ``0``." msgstr "" -#: ../../../library/stdtypes.rst:1104 +#: ../../../library/stdtypes.rst:1378 msgid "" "The slice of *s* from *i* to *j* is defined as the sequence of items with " "index *k* such that ``i <= k < j``." msgstr "" -#: ../../../library/stdtypes.rst:1107 +#: ../../../library/stdtypes.rst:1381 msgid "If *i* is omitted or ``None``, use ``0``." msgstr "" -#: ../../../library/stdtypes.rst:1108 +#: ../../../library/stdtypes.rst:1382 msgid "If *j* is omitted or ``None``, use ``len(s)``." msgstr "" -#: ../../../library/stdtypes.rst:1109 +#: ../../../library/stdtypes.rst:1383 msgid "If *i* or *j* is less than ``-len(s)``, use ``0``." msgstr "" -#: ../../../library/stdtypes.rst:1110 +#: ../../../library/stdtypes.rst:1384 msgid "If *i* or *j* is greater than ``len(s)``, use ``len(s)``." msgstr "" -#: ../../../library/stdtypes.rst:1111 +#: ../../../library/stdtypes.rst:1385 msgid "If *i* is greater than or equal to *j*, the slice is empty." msgstr "" -#: ../../../library/stdtypes.rst:1114 +#: ../../../library/stdtypes.rst:1388 msgid "" "The slice of *s* from *i* to *j* with step *k* is defined as the sequence of " "items with index ``x = i + n*k`` such that ``0 <= n < (j-i)/k``. In other " @@ -1452,7 +1750,7 @@ msgid "" "``None``, it is treated like ``1``." msgstr "" -#: ../../../library/stdtypes.rst:1125 +#: ../../../library/stdtypes.rst:1401 msgid "" "Concatenating immutable sequences always results in a new object. This " "means that building up a sequence by repeated concatenation will have a " @@ -1460,14 +1758,14 @@ msgid "" "runtime cost, you must switch to one of the alternatives below:" msgstr "" -#: ../../../library/stdtypes.rst:1130 +#: ../../../library/stdtypes.rst:1406 msgid "" "if concatenating :class:`str` objects, you can build a list and use :meth:" "`str.join` at the end or else write to an :class:`io.StringIO` instance and " "retrieve its value when complete" msgstr "" -#: ../../../library/stdtypes.rst:1134 +#: ../../../library/stdtypes.rst:1410 msgid "" "if concatenating :class:`bytes` objects, you can similarly use :meth:`bytes." "join` or :class:`io.BytesIO`, or you can do in-place concatenation with a :" @@ -1475,46 +1773,46 @@ msgid "" "an efficient overallocation mechanism" msgstr "" -#: ../../../library/stdtypes.rst:1139 +#: ../../../library/stdtypes.rst:1415 msgid "if concatenating :class:`tuple` objects, extend a :class:`list` instead" msgstr "" -#: ../../../library/stdtypes.rst:1141 +#: ../../../library/stdtypes.rst:1417 msgid "for other types, investigate the relevant class documentation" msgstr "" -#: ../../../library/stdtypes.rst:1145 +#: ../../../library/stdtypes.rst:1421 msgid "" "Some sequence types (such as :class:`range`) only support item sequences " "that follow specific patterns, and hence don't support sequence " "concatenation or repetition." msgstr "" -#: ../../../library/stdtypes.rst:1150 +#: ../../../library/stdtypes.rst:1426 msgid "An :exc:`IndexError` is raised if *i* is outside the sequence range." msgstr "" -#: ../../../library/stdtypes.rst:1153 +#: ../../../library/stdtypes.rst:1429 msgid "Sequence Methods" msgstr "" -#: ../../../library/stdtypes.rst:1154 +#: ../../../library/stdtypes.rst:1430 msgid "Sequence types also support the following methods:" msgstr "" -#: ../../../library/stdtypes.rst:1164 +#: ../../../library/stdtypes.rst:1440 msgid "Return the total number of occurrences of *value* in *sequence*." msgstr "" -#: ../../../library/stdtypes.rst:1174 +#: ../../../library/stdtypes.rst:1450 msgid "Return the index of the first occurrence of *value* in *sequence*." msgstr "" -#: ../../../library/stdtypes.rst:1176 ../../../library/stdtypes.rst:1360 +#: ../../../library/stdtypes.rst:1452 ../../../library/stdtypes.rst:1636 msgid "Raises :exc:`ValueError` if *value* is not found in *sequence*." msgstr "" -#: ../../../library/stdtypes.rst:1178 +#: ../../../library/stdtypes.rst:1454 msgid "" "The *start* or *stop* arguments allow for efficient searching of subsections " "of the sequence, beginning at *start* and ending at *stop*. This is roughly " @@ -1522,47 +1820,47 @@ msgid "" "copying any data." msgstr "" -#: ../../../library/stdtypes.rst:1184 +#: ../../../library/stdtypes.rst:1460 msgid "" "Not all sequence types support passing the *start* and *stop* arguments." msgstr "" -#: ../../../library/stdtypes.rst:1190 +#: ../../../library/stdtypes.rst:1466 msgid "Immutable Sequence Types" msgstr "" -#: ../../../library/stdtypes.rst:1197 +#: ../../../library/stdtypes.rst:1473 msgid "" "The only operation that immutable sequence types generally implement that is " "not also implemented by mutable sequence types is support for the :func:" "`hash` built-in." msgstr "" -#: ../../../library/stdtypes.rst:1201 +#: ../../../library/stdtypes.rst:1477 msgid "" "This support allows immutable sequences, such as :class:`tuple` instances, " "to be used as :class:`dict` keys and stored in :class:`set` and :class:" "`frozenset` instances." msgstr "" -#: ../../../library/stdtypes.rst:1205 +#: ../../../library/stdtypes.rst:1481 msgid "" "Attempting to hash an immutable sequence that contains unhashable values " "will result in :exc:`TypeError`." msgstr "" -#: ../../../library/stdtypes.rst:1212 +#: ../../../library/stdtypes.rst:1488 msgid "Mutable Sequence Types" msgstr "" -#: ../../../library/stdtypes.rst:1219 +#: ../../../library/stdtypes.rst:1495 msgid "" "The operations in the following table are defined on mutable sequence types. " "The :class:`collections.abc.MutableSequence` ABC is provided to make it " "easier to correctly implement these operations on custom sequence types." msgstr "" -#: ../../../library/stdtypes.rst:1223 +#: ../../../library/stdtypes.rst:1499 msgid "" "In the table *s* is an instance of a mutable sequence type, *t* is any " "iterable object and *x* is an arbitrary object that meets any type and value " @@ -1570,81 +1868,81 @@ msgid "" "integers that meet the value restriction ``0 <= x <= 255``)." msgstr "" -#: ../../../library/stdtypes.rst:1239 +#: ../../../library/stdtypes.rst:1515 msgid "``s[i] = x``" msgstr "" -#: ../../../library/stdtypes.rst:1239 +#: ../../../library/stdtypes.rst:1515 msgid "item *i* of *s* is replaced by *x*" msgstr "" -#: ../../../library/stdtypes.rst:1242 +#: ../../../library/stdtypes.rst:1518 msgid "``del s[i]``" msgstr "" -#: ../../../library/stdtypes.rst:1242 +#: ../../../library/stdtypes.rst:1518 msgid "removes item *i* of *s*" msgstr "" -#: ../../../library/stdtypes.rst:1244 +#: ../../../library/stdtypes.rst:1520 msgid "``s[i:j] = t``" msgstr "" -#: ../../../library/stdtypes.rst:1244 +#: ../../../library/stdtypes.rst:1520 msgid "" "slice of *s* from *i* to *j* is replaced by the contents of the iterable *t*" msgstr "" -#: ../../../library/stdtypes.rst:1248 +#: ../../../library/stdtypes.rst:1524 msgid "``del s[i:j]``" msgstr "" -#: ../../../library/stdtypes.rst:1248 +#: ../../../library/stdtypes.rst:1524 msgid "" "removes the elements of ``s[i:j]`` from the list (same as ``s[i:j] = []``)" msgstr "" -#: ../../../library/stdtypes.rst:1252 +#: ../../../library/stdtypes.rst:1528 msgid "``s[i:j:k] = t``" msgstr "" -#: ../../../library/stdtypes.rst:1252 +#: ../../../library/stdtypes.rst:1528 msgid "the elements of ``s[i:j:k]`` are replaced by those of *t*" msgstr "" -#: ../../../library/stdtypes.rst:1255 +#: ../../../library/stdtypes.rst:1531 msgid "``del s[i:j:k]``" msgstr "" -#: ../../../library/stdtypes.rst:1255 +#: ../../../library/stdtypes.rst:1531 msgid "removes the elements of ``s[i:j:k]`` from the list" msgstr "" -#: ../../../library/stdtypes.rst:1258 +#: ../../../library/stdtypes.rst:1534 msgid "``s += t``" msgstr "" -#: ../../../library/stdtypes.rst:1258 +#: ../../../library/stdtypes.rst:1534 msgid "" "extends *s* with the contents of *t* (for the most part the same as " "``s[len(s):len(s)] = t``)" msgstr "" -#: ../../../library/stdtypes.rst:1263 +#: ../../../library/stdtypes.rst:1539 msgid "``s *= n``" msgstr "" -#: ../../../library/stdtypes.rst:1263 +#: ../../../library/stdtypes.rst:1539 msgid "updates *s* with its contents repeated *n* times" msgstr "" -#: ../../../library/stdtypes.rst:1270 +#: ../../../library/stdtypes.rst:1546 msgid "" "If *k* is not equal to ``1``, *t* must have the same length as the slice it " "is replacing." msgstr "" -#: ../../../library/stdtypes.rst:1273 +#: ../../../library/stdtypes.rst:1549 msgid "" "The value *n* is an integer, or an object implementing :meth:`~object." "__index__`. Zero and negative values of *n* clear the sequence. Items in " @@ -1652,101 +1950,101 @@ msgid "" "explained for ``s * n`` under :ref:`typesseq-common`." msgstr "" -#: ../../../library/stdtypes.rst:1279 +#: ../../../library/stdtypes.rst:1555 msgid "Mutable Sequence Methods" msgstr "" -#: ../../../library/stdtypes.rst:1280 +#: ../../../library/stdtypes.rst:1556 msgid "Mutable sequence types also support the following methods:" msgstr "" -#: ../../../library/stdtypes.rst:1289 +#: ../../../library/stdtypes.rst:1565 msgid "" "Append *value* to the end of the sequence. This is equivalent to writing " "``seq[len(seq):len(seq)] = [value]``." msgstr "" -#: ../../../library/stdtypes.rst:1301 +#: ../../../library/stdtypes.rst:1577 msgid "" "Remove all items from *sequence*. This is equivalent to writing ``del " "sequence[:]``." msgstr "" -#: ../../../library/stdtypes.rst:1313 +#: ../../../library/stdtypes.rst:1589 msgid "" "Create a shallow copy of *sequence*. This is equivalent to writing " "``sequence[:]``." msgstr "" -#: ../../../library/stdtypes.rst:1316 +#: ../../../library/stdtypes.rst:1592 msgid "" "The :meth:`!copy` method is not part of the :class:`~collections.abc." "MutableSequence` :class:`~abc.ABC`, but most concrete mutable sequence types " "provide it." msgstr "" -#: ../../../library/stdtypes.rst:1327 +#: ../../../library/stdtypes.rst:1603 msgid "" "Extend *sequence* with the contents of *iterable*. For the most part, this " "is the same as writing ``seq[len(seq):len(seq)] = iterable``." msgstr "" -#: ../../../library/stdtypes.rst:1338 +#: ../../../library/stdtypes.rst:1614 msgid "" "Insert *value* into *sequence* at the given *index*. This is equivalent to " "writing ``sequence[index:index] = [value]``." msgstr "" -#: ../../../library/stdtypes.rst:1348 +#: ../../../library/stdtypes.rst:1624 msgid "" "Retrieve the item at *index* and also remove it from *sequence*. By default, " "the last item in *sequence* is removed and returned." msgstr "" -#: ../../../library/stdtypes.rst:1358 +#: ../../../library/stdtypes.rst:1634 msgid "Remove the first item from *sequence* where ``sequence[i] == value``." msgstr "" -#: ../../../library/stdtypes.rst:1369 +#: ../../../library/stdtypes.rst:1645 msgid "" "Reverse the items of *sequence* in place. This method maintains economy of " "space when reversing a large sequence. To remind users that it operates by " "side-effect, it returns ``None``." msgstr "" -#: ../../../library/stdtypes.rst:1377 +#: ../../../library/stdtypes.rst:1653 msgid "Lists" msgstr "" -#: ../../../library/stdtypes.rst:1381 +#: ../../../library/stdtypes.rst:1657 msgid "" "Lists are mutable sequences, typically used to store collections of " "homogeneous items (where the precise degree of similarity will vary by " "application)." msgstr "" -#: ../../../library/stdtypes.rst:1387 +#: ../../../library/stdtypes.rst:1663 msgid "Lists may be constructed in several ways:" msgstr "" -#: ../../../library/stdtypes.rst:1389 +#: ../../../library/stdtypes.rst:1665 msgid "Using a pair of square brackets to denote the empty list: ``[]``" msgstr "" -#: ../../../library/stdtypes.rst:1390 +#: ../../../library/stdtypes.rst:1666 msgid "" "Using square brackets, separating items with commas: ``[a]``, ``[a, b, c]``" msgstr "" -#: ../../../library/stdtypes.rst:1391 +#: ../../../library/stdtypes.rst:1667 msgid "Using a list comprehension: ``[x for x in iterable]``" msgstr "" -#: ../../../library/stdtypes.rst:1392 +#: ../../../library/stdtypes.rst:1668 msgid "Using the type constructor: ``list()`` or ``list(iterable)``" msgstr "" -#: ../../../library/stdtypes.rst:1394 +#: ../../../library/stdtypes.rst:1670 msgid "" "The constructor builds a list whose items are the same and in the same order " "as *iterable*'s items. *iterable* may be either a sequence, a container " @@ -1757,24 +2055,24 @@ msgid "" "new empty list, ``[]``." msgstr "" -#: ../../../library/stdtypes.rst:1403 +#: ../../../library/stdtypes.rst:1679 msgid "" "Many other operations also produce lists, including the :func:`sorted` built-" "in." msgstr "" -#: ../../../library/stdtypes.rst:1406 +#: ../../../library/stdtypes.rst:1682 msgid "Lists are :ref:`generic ` over the types of their items." msgstr "" -#: ../../../library/stdtypes.rst:1408 +#: ../../../library/stdtypes.rst:1684 msgid "" "Lists implement all of the :ref:`common ` and :ref:`mutable " "` sequence operations. Lists also provide the following " "additional method:" msgstr "" -#: ../../../library/stdtypes.rst:1414 +#: ../../../library/stdtypes.rst:1690 msgid "" "This method sorts the list in place, using only ``<`` comparisons between " "items. Exceptions are not suppressed - if any comparison operations fail, " @@ -1782,13 +2080,13 @@ msgid "" "partially modified state)." msgstr "" -#: ../../../library/stdtypes.rst:1419 +#: ../../../library/stdtypes.rst:1695 msgid "" ":meth:`sort` accepts two arguments that can only be passed by keyword (:ref:" "`keyword-only arguments `):" msgstr "" -#: ../../../library/stdtypes.rst:1422 +#: ../../../library/stdtypes.rst:1698 msgid "" "*key* specifies a function of one argument that is used to extract a " "comparison key from each list element (for example, ``key=str.lower``). The " @@ -1797,19 +2095,19 @@ msgid "" "list items are sorted directly without calculating a separate key value." msgstr "" -#: ../../../library/stdtypes.rst:1429 +#: ../../../library/stdtypes.rst:1705 msgid "" "The :func:`functools.cmp_to_key` utility is available to convert a 2.x style " "*cmp* function to a *key* function." msgstr "" -#: ../../../library/stdtypes.rst:1432 +#: ../../../library/stdtypes.rst:1708 msgid "" "*reverse* is a boolean value. If set to ``True``, then the list elements " "are sorted as if each comparison were reversed." msgstr "" -#: ../../../library/stdtypes.rst:1435 +#: ../../../library/stdtypes.rst:1711 msgid "" "This method modifies the sequence in place for economy of space when sorting " "a large sequence. To remind users that it operates by side effect, it does " @@ -1817,7 +2115,7 @@ msgid "" "new sorted list instance)." msgstr "" -#: ../../../library/stdtypes.rst:1440 +#: ../../../library/stdtypes.rst:1716 msgid "" "The :meth:`sort` method is guaranteed to be stable. A sort is stable if it " "guarantees not to change the relative order of elements that compare equal " @@ -1825,12 +2123,12 @@ msgid "" "department, then by salary grade)." msgstr "" -#: ../../../library/stdtypes.rst:1445 +#: ../../../library/stdtypes.rst:1721 msgid "" "For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`." msgstr "" -#: ../../../library/stdtypes.rst:1449 +#: ../../../library/stdtypes.rst:1725 msgid "" "While a list is being sorted, the effect of attempting to mutate, or even " "inspect, the list is undefined. The C implementation of Python makes the " @@ -1838,17 +2136,17 @@ msgid "" "detect that the list has been mutated during a sort." msgstr "" -#: ../../../library/stdtypes.rst:1456 +#: ../../../library/stdtypes.rst:1732 msgid "" "For detailed information on thread-safety guarantees for :class:`list` " "objects, see :ref:`thread-safety-list`." msgstr "" -#: ../../../library/stdtypes.rst:1463 +#: ../../../library/stdtypes.rst:1739 msgid "Tuples" msgstr "" -#: ../../../library/stdtypes.rst:1467 +#: ../../../library/stdtypes.rst:1743 msgid "" "Tuples are immutable sequences, typically used to store collections of " "heterogeneous data (such as the 2-tuples produced by the :func:`enumerate` " @@ -1857,27 +2155,27 @@ msgid "" "class:`dict` instance)." msgstr "" -#: ../../../library/stdtypes.rst:1475 +#: ../../../library/stdtypes.rst:1751 msgid "Tuples may be constructed in a number of ways:" msgstr "" -#: ../../../library/stdtypes.rst:1477 +#: ../../../library/stdtypes.rst:1753 msgid "Using a pair of parentheses to denote the empty tuple: ``()``" msgstr "" -#: ../../../library/stdtypes.rst:1478 +#: ../../../library/stdtypes.rst:1754 msgid "Using a trailing comma for a singleton tuple: ``a,`` or ``(a,)``" msgstr "" -#: ../../../library/stdtypes.rst:1479 +#: ../../../library/stdtypes.rst:1755 msgid "Separating items with commas: ``a, b, c`` or ``(a, b, c)``" msgstr "" -#: ../../../library/stdtypes.rst:1480 +#: ../../../library/stdtypes.rst:1756 msgid "Using the :func:`tuple` built-in: ``tuple()`` or ``tuple(iterable)``" msgstr "" -#: ../../../library/stdtypes.rst:1482 +#: ../../../library/stdtypes.rst:1758 msgid "" "The constructor builds a tuple whose items are the same and in the same " "order as *iterable*'s items. *iterable* may be either a sequence, a " @@ -1888,7 +2186,7 @@ msgid "" "``()``." msgstr "" -#: ../../../library/stdtypes.rst:1490 +#: ../../../library/stdtypes.rst:1766 msgid "" "Note that it is actually the comma which makes a tuple, not the parentheses. " "The parentheses are optional, except in the empty tuple case, or when they " @@ -1897,37 +2195,37 @@ msgid "" "call with a 3-tuple as the sole argument." msgstr "" -#: ../../../library/stdtypes.rst:1496 +#: ../../../library/stdtypes.rst:1772 msgid "" "Tuples implement all of the :ref:`common ` sequence " "operations." msgstr "" -#: ../../../library/stdtypes.rst:1499 +#: ../../../library/stdtypes.rst:1775 msgid "" "Tuples are :ref:`generic ` over the types of their contents. For " "more information, refer to :ref:`the typing documentation on annotating " "tuples `." msgstr "" -#: ../../../library/stdtypes.rst:1503 +#: ../../../library/stdtypes.rst:1779 msgid "" "For heterogeneous collections of data where access by name is clearer than " "access by index, :func:`collections.namedtuple` may be a more appropriate " "choice than a simple tuple object." msgstr "" -#: ../../../library/stdtypes.rst:1511 +#: ../../../library/stdtypes.rst:1787 msgid "Ranges" msgstr "" -#: ../../../library/stdtypes.rst:1515 +#: ../../../library/stdtypes.rst:1791 msgid "" "The :class:`range` type represents an immutable sequence of numbers and is " "commonly used for looping a specific number of times in :keyword:`for` loops." msgstr "" -#: ../../../library/stdtypes.rst:1522 +#: ../../../library/stdtypes.rst:1798 msgid "" "The arguments to the range constructor must be integers (either built-in :" "class:`int` or any object that implements the :meth:`~object.__index__` " @@ -1936,38 +2234,38 @@ msgid "" "zero, :exc:`ValueError` is raised." msgstr "" -#: ../../../library/stdtypes.rst:1528 +#: ../../../library/stdtypes.rst:1804 msgid "" "For a positive *step*, the contents of a range ``r`` are determined by the " "formula ``r[i] = start + step*i`` where ``i >= 0`` and ``r[i] < stop``." msgstr "" -#: ../../../library/stdtypes.rst:1532 +#: ../../../library/stdtypes.rst:1808 msgid "" "For a negative *step*, the contents of the range are still determined by the " "formula ``r[i] = start + step*i``, but the constraints are ``i >= 0`` and " "``r[i] > stop``." msgstr "" -#: ../../../library/stdtypes.rst:1536 +#: ../../../library/stdtypes.rst:1812 msgid "" "A range object will be empty if ``r[0]`` does not meet the value constraint. " "Ranges do support negative indices, but these are interpreted as indexing " "from the end of the sequence determined by the positive indices." msgstr "" -#: ../../../library/stdtypes.rst:1541 +#: ../../../library/stdtypes.rst:1817 msgid "" "Ranges containing absolute values larger than :data:`sys.maxsize` are " "permitted but some features (such as :func:`len`) may raise :exc:" "`OverflowError`." msgstr "" -#: ../../../library/stdtypes.rst:1545 +#: ../../../library/stdtypes.rst:1821 msgid "Range examples::" msgstr "" -#: ../../../library/stdtypes.rst:1562 +#: ../../../library/stdtypes.rst:1838 msgid "" "Ranges implement all of the :ref:`common ` sequence " "operations except concatenation and repetition (due to the fact that range " @@ -1975,23 +2273,23 @@ msgid "" "repetition and concatenation will usually violate that pattern)." msgstr "" -#: ../../../library/stdtypes.rst:1569 +#: ../../../library/stdtypes.rst:1845 msgid "" "The value of the *start* parameter (or ``0`` if the parameter was not " "supplied)" msgstr "" -#: ../../../library/stdtypes.rst:1574 +#: ../../../library/stdtypes.rst:1850 msgid "The value of the *stop* parameter" msgstr "" -#: ../../../library/stdtypes.rst:1578 +#: ../../../library/stdtypes.rst:1854 msgid "" "The value of the *step* parameter (or ``1`` if the parameter was not " "supplied)" msgstr "" -#: ../../../library/stdtypes.rst:1581 +#: ../../../library/stdtypes.rst:1857 msgid "" "The advantage of the :class:`range` type over a regular :class:`list` or :" "class:`tuple` is that a :class:`range` object will always take the same " @@ -2000,14 +2298,14 @@ msgid "" "individual items and subranges as needed)." msgstr "" -#: ../../../library/stdtypes.rst:1587 +#: ../../../library/stdtypes.rst:1863 msgid "" "Range objects implement the :class:`collections.abc.Sequence` ABC, and " "provide features such as containment tests, element index lookup, slicing " "and support for negative indices (see :ref:`typesseq`):" msgstr "" -#: ../../../library/stdtypes.rst:1607 +#: ../../../library/stdtypes.rst:1883 msgid "" "Testing range objects for equality with ``==`` and ``!=`` compares them as " "sequences. That is, two range objects are considered equal if they " @@ -2017,505 +2315,505 @@ msgid "" "3)`` or ``range(0, 3, 2) == range(0, 4, 2)``.)" msgstr "" -#: ../../../library/stdtypes.rst:1614 +#: ../../../library/stdtypes.rst:1890 msgid "" "Implement the Sequence ABC. Support slicing and negative indices. Test :" "class:`int` objects for membership in constant time instead of iterating " "through all items." msgstr "" -#: ../../../library/stdtypes.rst:1620 +#: ../../../library/stdtypes.rst:1896 msgid "" "Define '==' and '!=' to compare range objects based on the sequence of " "values they define (instead of comparing based on object identity)." msgstr "" -#: ../../../library/stdtypes.rst:1625 +#: ../../../library/stdtypes.rst:1901 msgid "" "Added the :attr:`~range.start`, :attr:`~range.stop` and :attr:`~range.step` " "attributes." msgstr "" -#: ../../../library/stdtypes.rst:1630 +#: ../../../library/stdtypes.rst:1906 msgid "" "The `linspace recipe `_ shows how to implement a lazy version of range " "suitable for floating-point applications." msgstr "" -#: ../../../library/stdtypes.rst:1642 +#: ../../../library/stdtypes.rst:1918 msgid "Text and Binary Sequence Type Methods Summary" msgstr "" -#: ../../../library/stdtypes.rst:1643 +#: ../../../library/stdtypes.rst:1919 msgid "" "The following table summarizes the text and binary sequence types methods by " "category." msgstr "" -#: ../../../library/stdtypes.rst:1648 +#: ../../../library/stdtypes.rst:1924 msgid "Category" msgstr "" -#: ../../../library/stdtypes.rst:1648 +#: ../../../library/stdtypes.rst:1924 msgid ":class:`str` methods" msgstr "" -#: ../../../library/stdtypes.rst:1648 +#: ../../../library/stdtypes.rst:1924 msgid ":class:`bytes` and :class:`bytearray` methods" msgstr "" -#: ../../../library/stdtypes.rst:1650 +#: ../../../library/stdtypes.rst:1926 msgid "Formatting" msgstr "" -#: ../../../library/stdtypes.rst:1650 +#: ../../../library/stdtypes.rst:1926 msgid ":meth:`str.format`" msgstr "" -#: ../../../library/stdtypes.rst:1652 +#: ../../../library/stdtypes.rst:1928 msgid ":meth:`str.format_map`" msgstr "" -#: ../../../library/stdtypes.rst:1654 +#: ../../../library/stdtypes.rst:1930 msgid ":ref:`f-strings`" msgstr "" -#: ../../../library/stdtypes.rst:1656 +#: ../../../library/stdtypes.rst:1932 msgid ":ref:`old-string-formatting`" msgstr "" -#: ../../../library/stdtypes.rst:1656 +#: ../../../library/stdtypes.rst:1932 msgid ":ref:`bytes-formatting`" msgstr "" -#: ../../../library/stdtypes.rst:1658 +#: ../../../library/stdtypes.rst:1934 msgid "Searching and Replacing" msgstr "" -#: ../../../library/stdtypes.rst:1658 +#: ../../../library/stdtypes.rst:1934 msgid ":meth:`str.find`" msgstr "" -#: ../../../library/stdtypes.rst:1658 +#: ../../../library/stdtypes.rst:1934 msgid ":meth:`str.rfind`" msgstr "" -#: ../../../library/stdtypes.rst:1658 +#: ../../../library/stdtypes.rst:1934 msgid ":meth:`bytes.find`" msgstr "" -#: ../../../library/stdtypes.rst:1658 +#: ../../../library/stdtypes.rst:1934 msgid ":meth:`bytes.rfind`" msgstr "" -#: ../../../library/stdtypes.rst:1660 +#: ../../../library/stdtypes.rst:1936 msgid ":meth:`str.index`" msgstr "" -#: ../../../library/stdtypes.rst:1660 +#: ../../../library/stdtypes.rst:1936 msgid ":meth:`str.rindex`" msgstr "" -#: ../../../library/stdtypes.rst:1660 +#: ../../../library/stdtypes.rst:1936 msgid ":meth:`bytes.index`" msgstr "" -#: ../../../library/stdtypes.rst:1660 +#: ../../../library/stdtypes.rst:1936 msgid ":meth:`bytes.rindex`" msgstr "" -#: ../../../library/stdtypes.rst:1662 +#: ../../../library/stdtypes.rst:1938 msgid ":meth:`str.startswith`" msgstr "" -#: ../../../library/stdtypes.rst:1662 +#: ../../../library/stdtypes.rst:1938 msgid ":meth:`bytes.startswith`" msgstr "" -#: ../../../library/stdtypes.rst:1664 +#: ../../../library/stdtypes.rst:1940 msgid ":meth:`str.endswith`" msgstr "" -#: ../../../library/stdtypes.rst:1664 +#: ../../../library/stdtypes.rst:1940 msgid ":meth:`bytes.endswith`" msgstr "" -#: ../../../library/stdtypes.rst:1666 +#: ../../../library/stdtypes.rst:1942 msgid ":meth:`str.count`" msgstr "" -#: ../../../library/stdtypes.rst:1666 +#: ../../../library/stdtypes.rst:1942 msgid ":meth:`bytes.count`" msgstr "" -#: ../../../library/stdtypes.rst:1668 +#: ../../../library/stdtypes.rst:1944 msgid ":meth:`str.replace`" msgstr "" -#: ../../../library/stdtypes.rst:1668 +#: ../../../library/stdtypes.rst:1944 msgid ":meth:`bytes.replace`" msgstr "" -#: ../../../library/stdtypes.rst:1670 +#: ../../../library/stdtypes.rst:1946 msgid "Splitting and Joining" msgstr "" -#: ../../../library/stdtypes.rst:1670 +#: ../../../library/stdtypes.rst:1946 msgid ":meth:`str.split`" msgstr "" -#: ../../../library/stdtypes.rst:1670 +#: ../../../library/stdtypes.rst:1946 msgid ":meth:`str.rsplit`" msgstr "" -#: ../../../library/stdtypes.rst:1670 +#: ../../../library/stdtypes.rst:1946 msgid ":meth:`bytes.split`" msgstr "" -#: ../../../library/stdtypes.rst:1670 +#: ../../../library/stdtypes.rst:1946 msgid ":meth:`bytes.rsplit`" msgstr "" -#: ../../../library/stdtypes.rst:1672 +#: ../../../library/stdtypes.rst:1948 msgid ":meth:`str.splitlines`" msgstr "" -#: ../../../library/stdtypes.rst:1672 +#: ../../../library/stdtypes.rst:1948 msgid ":meth:`bytes.splitlines`" msgstr "" -#: ../../../library/stdtypes.rst:1674 +#: ../../../library/stdtypes.rst:1950 msgid ":meth:`str.partition`" msgstr "" -#: ../../../library/stdtypes.rst:1674 +#: ../../../library/stdtypes.rst:1950 msgid ":meth:`bytes.partition`" msgstr "" -#: ../../../library/stdtypes.rst:1676 +#: ../../../library/stdtypes.rst:1952 msgid ":meth:`str.rpartition`" msgstr "" -#: ../../../library/stdtypes.rst:1676 +#: ../../../library/stdtypes.rst:1952 msgid ":meth:`bytes.rpartition`" msgstr "" -#: ../../../library/stdtypes.rst:1678 +#: ../../../library/stdtypes.rst:1954 msgid ":meth:`str.join`" msgstr "" -#: ../../../library/stdtypes.rst:1678 +#: ../../../library/stdtypes.rst:1954 msgid ":meth:`bytes.join`" msgstr "" -#: ../../../library/stdtypes.rst:1680 +#: ../../../library/stdtypes.rst:1956 msgid "String Classification" msgstr "" -#: ../../../library/stdtypes.rst:1680 +#: ../../../library/stdtypes.rst:1956 msgid ":meth:`str.isalpha`" msgstr "" -#: ../../../library/stdtypes.rst:1680 +#: ../../../library/stdtypes.rst:1956 msgid ":meth:`bytes.isalpha`" msgstr "" -#: ../../../library/stdtypes.rst:1682 +#: ../../../library/stdtypes.rst:1958 msgid ":meth:`str.isdecimal`" msgstr "" -#: ../../../library/stdtypes.rst:1684 +#: ../../../library/stdtypes.rst:1960 msgid ":meth:`str.isdigit`" msgstr "" -#: ../../../library/stdtypes.rst:1684 +#: ../../../library/stdtypes.rst:1960 msgid ":meth:`bytes.isdigit`" msgstr "" -#: ../../../library/stdtypes.rst:1686 +#: ../../../library/stdtypes.rst:1962 msgid ":meth:`str.isnumeric`" msgstr "" -#: ../../../library/stdtypes.rst:1688 +#: ../../../library/stdtypes.rst:1964 msgid ":meth:`str.isalnum`" msgstr "" -#: ../../../library/stdtypes.rst:1688 +#: ../../../library/stdtypes.rst:1964 msgid ":meth:`bytes.isalnum`" msgstr "" -#: ../../../library/stdtypes.rst:1690 +#: ../../../library/stdtypes.rst:1966 msgid ":meth:`str.isidentifier`" msgstr "" -#: ../../../library/stdtypes.rst:1692 +#: ../../../library/stdtypes.rst:1968 msgid ":meth:`str.islower`" msgstr "" -#: ../../../library/stdtypes.rst:1692 +#: ../../../library/stdtypes.rst:1968 msgid ":meth:`bytes.islower`" msgstr "" -#: ../../../library/stdtypes.rst:1694 +#: ../../../library/stdtypes.rst:1970 msgid ":meth:`str.isupper`" msgstr "" -#: ../../../library/stdtypes.rst:1694 +#: ../../../library/stdtypes.rst:1970 msgid ":meth:`bytes.isupper`" msgstr "" -#: ../../../library/stdtypes.rst:1696 +#: ../../../library/stdtypes.rst:1972 msgid ":meth:`str.istitle`" msgstr "" -#: ../../../library/stdtypes.rst:1696 +#: ../../../library/stdtypes.rst:1972 msgid ":meth:`bytes.istitle`" msgstr "" -#: ../../../library/stdtypes.rst:1698 +#: ../../../library/stdtypes.rst:1974 msgid ":meth:`str.isspace`" msgstr "" -#: ../../../library/stdtypes.rst:1698 +#: ../../../library/stdtypes.rst:1974 msgid ":meth:`bytes.isspace`" msgstr "" -#: ../../../library/stdtypes.rst:1700 +#: ../../../library/stdtypes.rst:1976 msgid ":meth:`str.isprintable`" msgstr "" -#: ../../../library/stdtypes.rst:1702 +#: ../../../library/stdtypes.rst:1978 msgid "Case Manipulation" msgstr "" -#: ../../../library/stdtypes.rst:1702 +#: ../../../library/stdtypes.rst:1978 msgid ":meth:`str.lower`" msgstr "" -#: ../../../library/stdtypes.rst:1702 +#: ../../../library/stdtypes.rst:1978 msgid ":meth:`bytes.lower`" msgstr "" -#: ../../../library/stdtypes.rst:1704 +#: ../../../library/stdtypes.rst:1980 msgid ":meth:`str.upper`" msgstr "" -#: ../../../library/stdtypes.rst:1704 +#: ../../../library/stdtypes.rst:1980 msgid ":meth:`bytes.upper`" msgstr "" -#: ../../../library/stdtypes.rst:1706 +#: ../../../library/stdtypes.rst:1982 msgid ":meth:`str.casefold`" msgstr "" -#: ../../../library/stdtypes.rst:1708 +#: ../../../library/stdtypes.rst:1984 msgid ":meth:`str.capitalize`" msgstr "" -#: ../../../library/stdtypes.rst:1708 +#: ../../../library/stdtypes.rst:1984 msgid ":meth:`bytes.capitalize`" msgstr "" -#: ../../../library/stdtypes.rst:1710 +#: ../../../library/stdtypes.rst:1986 msgid ":meth:`str.title`" msgstr "" -#: ../../../library/stdtypes.rst:1710 +#: ../../../library/stdtypes.rst:1986 msgid ":meth:`bytes.title`" msgstr "" -#: ../../../library/stdtypes.rst:1712 +#: ../../../library/stdtypes.rst:1988 msgid ":meth:`str.swapcase`" msgstr "" -#: ../../../library/stdtypes.rst:1712 +#: ../../../library/stdtypes.rst:1988 msgid ":meth:`bytes.swapcase`" msgstr "" -#: ../../../library/stdtypes.rst:1714 +#: ../../../library/stdtypes.rst:1990 msgid "Padding and Stripping" msgstr "" -#: ../../../library/stdtypes.rst:1714 +#: ../../../library/stdtypes.rst:1990 msgid ":meth:`str.ljust`" msgstr "" -#: ../../../library/stdtypes.rst:1714 +#: ../../../library/stdtypes.rst:1990 msgid ":meth:`str.rjust`" msgstr "" -#: ../../../library/stdtypes.rst:1714 +#: ../../../library/stdtypes.rst:1990 msgid ":meth:`bytes.ljust`" msgstr "" -#: ../../../library/stdtypes.rst:1714 +#: ../../../library/stdtypes.rst:1990 msgid ":meth:`bytes.rjust`" msgstr "" -#: ../../../library/stdtypes.rst:1716 +#: ../../../library/stdtypes.rst:1992 msgid ":meth:`str.center`" msgstr "" -#: ../../../library/stdtypes.rst:1716 +#: ../../../library/stdtypes.rst:1992 msgid ":meth:`bytes.center`" msgstr "" -#: ../../../library/stdtypes.rst:1718 +#: ../../../library/stdtypes.rst:1994 msgid ":meth:`str.expandtabs`" msgstr "" -#: ../../../library/stdtypes.rst:1718 +#: ../../../library/stdtypes.rst:1994 msgid ":meth:`bytes.expandtabs`" msgstr "" -#: ../../../library/stdtypes.rst:1720 +#: ../../../library/stdtypes.rst:1996 msgid ":meth:`str.strip`" msgstr "" -#: ../../../library/stdtypes.rst:1720 +#: ../../../library/stdtypes.rst:1996 msgid ":meth:`bytes.strip`" msgstr "" -#: ../../../library/stdtypes.rst:1722 +#: ../../../library/stdtypes.rst:1998 msgid ":meth:`str.lstrip`" msgstr "" -#: ../../../library/stdtypes.rst:1722 +#: ../../../library/stdtypes.rst:1998 msgid ":meth:`str.rstrip`" msgstr "" -#: ../../../library/stdtypes.rst:1722 +#: ../../../library/stdtypes.rst:1998 msgid ":meth:`bytes.lstrip`" msgstr "" -#: ../../../library/stdtypes.rst:1722 +#: ../../../library/stdtypes.rst:1998 msgid ":meth:`bytes.rstrip`" msgstr "" -#: ../../../library/stdtypes.rst:1724 +#: ../../../library/stdtypes.rst:2000 msgid ":meth:`str.removeprefix`" msgstr "" -#: ../../../library/stdtypes.rst:1724 +#: ../../../library/stdtypes.rst:2000 msgid ":meth:`bytes.removeprefix`" msgstr "" -#: ../../../library/stdtypes.rst:1726 +#: ../../../library/stdtypes.rst:2002 msgid ":meth:`str.removesuffix`" msgstr "" -#: ../../../library/stdtypes.rst:1726 +#: ../../../library/stdtypes.rst:2002 msgid ":meth:`bytes.removesuffix`" msgstr "" -#: ../../../library/stdtypes.rst:1728 +#: ../../../library/stdtypes.rst:2004 msgid "Translation and Encoding" msgstr "" -#: ../../../library/stdtypes.rst:1728 +#: ../../../library/stdtypes.rst:2004 msgid ":meth:`str.translate`" msgstr "" -#: ../../../library/stdtypes.rst:1728 +#: ../../../library/stdtypes.rst:2004 msgid ":meth:`bytes.translate`" msgstr "" -#: ../../../library/stdtypes.rst:1730 +#: ../../../library/stdtypes.rst:2006 msgid ":meth:`str.maketrans`" msgstr "" -#: ../../../library/stdtypes.rst:1730 +#: ../../../library/stdtypes.rst:2006 msgid ":meth:`bytes.maketrans`" msgstr "" -#: ../../../library/stdtypes.rst:1732 +#: ../../../library/stdtypes.rst:2008 msgid ":meth:`str.encode`" msgstr "" -#: ../../../library/stdtypes.rst:1734 +#: ../../../library/stdtypes.rst:2010 msgid ":meth:`bytes.decode`" msgstr "" -#: ../../../library/stdtypes.rst:1740 +#: ../../../library/stdtypes.rst:2016 msgid "Text Sequence Type --- :class:`str`" msgstr "" -#: ../../../library/stdtypes.rst:1742 +#: ../../../library/stdtypes.rst:2018 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:1747 +#: ../../../library/stdtypes.rst:2023 msgid "Single quotes: ``'allows embedded \"double\" quotes'``" msgstr "" -#: ../../../library/stdtypes.rst:1748 +#: ../../../library/stdtypes.rst:2024 msgid "Double quotes: ``\"allows embedded 'single' quotes\"``" msgstr "" -#: ../../../library/stdtypes.rst:1749 +#: ../../../library/stdtypes.rst:2025 msgid "" "Triple quoted: ``'''Three single quotes'''``, ``\"\"\"Three double " "quotes\"\"\"``" msgstr "" -#: ../../../library/stdtypes.rst:1751 +#: ../../../library/stdtypes.rst:2027 msgid "" "Triple quoted strings may span multiple lines - all associated whitespace " "will be included in the string literal." msgstr "" -#: ../../../library/stdtypes.rst:1754 +#: ../../../library/stdtypes.rst:2030 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:1758 +#: ../../../library/stdtypes.rst:2034 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:1762 +#: ../../../library/stdtypes.rst:2038 msgid "" "Strings may also be created from other objects using the :class:`str` " "constructor." msgstr "" -#: ../../../library/stdtypes.rst:1765 +#: ../../../library/stdtypes.rst:2041 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:1771 +#: ../../../library/stdtypes.rst:2047 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:1775 +#: ../../../library/stdtypes.rst:2051 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:1789 +#: ../../../library/stdtypes.rst:2065 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:1793 +#: ../../../library/stdtypes.rst:2069 msgid "" "If neither *encoding* nor *errors* is given, ``str(object)`` returns :meth:" "`type(object).__str__(object) `, which is the \"informal\" " @@ -2525,7 +2823,7 @@ msgid "" "`repr(object) `." msgstr "" -#: ../../../library/stdtypes.rst:1805 +#: ../../../library/stdtypes.rst:2081 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 " @@ -2537,7 +2835,7 @@ msgid "" "buffer objects." msgstr "" -#: ../../../library/stdtypes.rst:1814 +#: ../../../library/stdtypes.rst:2090 msgid "" "Passing a :class:`bytes` object to :func:`str` without the *encoding* or " "*errors* arguments falls under the first case of returning the informal " @@ -2545,7 +2843,7 @@ msgid "" "Python). For example::" msgstr "" -#: ../../../library/stdtypes.rst:1822 +#: ../../../library/stdtypes.rst:2098 msgid "" "For more information on the ``str`` class and its methods, see :ref:" "`textseq` and the :ref:`string-methods` section below. To output formatted " @@ -2553,17 +2851,17 @@ msgid "" "addition, see the :ref:`stringservices` section." msgstr "" -#: ../../../library/stdtypes.rst:1834 +#: ../../../library/stdtypes.rst:2110 msgid "String Methods" msgstr "" -#: ../../../library/stdtypes.rst:1839 +#: ../../../library/stdtypes.rst:2115 msgid "" "Strings implement all of the :ref:`common ` sequence " "operations, along with the additional methods described below." msgstr "" -#: ../../../library/stdtypes.rst:1842 +#: ../../../library/stdtypes.rst:2118 msgid "" "Strings also support two styles of string formatting, one providing a large " "degree of flexibility and customization (see :meth:`str.format`, :ref:" @@ -2573,33 +2871,33 @@ msgid "" "handle (:ref:`old-string-formatting`)." msgstr "" -#: ../../../library/stdtypes.rst:1849 +#: ../../../library/stdtypes.rst:2125 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:1855 +#: ../../../library/stdtypes.rst:2131 msgid "" "Return a copy of the string with its first character capitalized and the " "rest lowercased." msgstr "" -#: ../../../library/stdtypes.rst:1858 +#: ../../../library/stdtypes.rst:2134 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:1865 +#: ../../../library/stdtypes.rst:2141 msgid "" "Return a casefolded copy of the string. Casefolded strings may be used for " "caseless matching." msgstr "" -#: ../../../library/stdtypes.rst:1868 +#: ../../../library/stdtypes.rst:2144 msgid "" "Casefolding is similar to lowercasing but more aggressive because it is " "intended to remove all case distinctions in a string. For example, the " @@ -2608,44 +2906,44 @@ msgid "" "`casefold` converts it to ``\"ss\"``. For example:" msgstr "" -#: ../../../library/stdtypes.rst:1882 +#: ../../../library/stdtypes.rst:2158 msgid "" "The casefolding algorithm is `described in section 3.13.3 'Default Case " "Folding' of the Unicode Standard `__." msgstr "" -#: ../../../library/stdtypes.rst:1891 +#: ../../../library/stdtypes.rst:2167 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:1905 +#: ../../../library/stdtypes.rst:2181 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:1909 +#: ../../../library/stdtypes.rst:2185 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:1925 +#: ../../../library/stdtypes.rst:2201 msgid "Return the string encoded to :class:`bytes`." msgstr "" -#: ../../../library/stdtypes.rst:1927 ../../../library/stdtypes.rst:3677 +#: ../../../library/stdtypes.rst:2203 ../../../library/stdtypes.rst:3953 msgid "" "*encoding* defaults to ``'utf-8'``; see :ref:`standard-encodings` for " "possible values." msgstr "" -#: ../../../library/stdtypes.rst:1930 +#: ../../../library/stdtypes.rst:2206 msgid "" "*errors* controls how encoding errors are handled. If ``'strict'`` (the " "default), a :exc:`UnicodeError` exception is raised. Other possible values " @@ -2654,24 +2952,24 @@ msgid "" "register_error`. See :ref:`error-handlers` for details." msgstr "" -#: ../../../library/stdtypes.rst:1937 +#: ../../../library/stdtypes.rst:2213 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:1950 ../../../library/stdtypes.rst:3696 +#: ../../../library/stdtypes.rst:2226 ../../../library/stdtypes.rst:3972 msgid "Added support for keyword arguments." msgstr "" -#: ../../../library/stdtypes.rst:1953 ../../../library/stdtypes.rst:3699 +#: ../../../library/stdtypes.rst:2229 ../../../library/stdtypes.rst:3975 msgid "" "The value of the *errors* argument is now checked in :ref:`devmode` and in :" "ref:`debug mode `." msgstr "" -#: ../../../library/stdtypes.rst:1960 +#: ../../../library/stdtypes.rst:2236 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. " @@ -2680,11 +2978,11 @@ msgid "" "equivalent to ``str[start:end].endswith(suffix)``. For example::" msgstr "" -#: ../../../library/stdtypes.rst:1975 +#: ../../../library/stdtypes.rst:2251 msgid "See also :meth:`startswith` and :meth:`removesuffix`." msgstr "" -#: ../../../library/stdtypes.rst:1980 +#: ../../../library/stdtypes.rst:2256 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 " @@ -2700,7 +2998,7 @@ msgid "" "printed. For example::" msgstr "" -#: ../../../library/stdtypes.rst:2004 +#: ../../../library/stdtypes.rst:2280 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 " @@ -2708,18 +3006,18 @@ msgid "" "example::" msgstr "" -#: ../../../library/stdtypes.rst:2014 +#: ../../../library/stdtypes.rst:2290 msgid "See also :meth:`rfind` and :meth:`index`." msgstr "" -#: ../../../library/stdtypes.rst:2018 +#: ../../../library/stdtypes.rst:2294 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:2028 +#: ../../../library/stdtypes.rst:2304 msgid "" "Perform a string formatting operation. The string on which this method is " "called can contain literal text or replacement fields delimited by braces " @@ -2729,13 +3027,13 @@ msgid "" "the corresponding argument. For example:" msgstr "" -#: ../../../library/stdtypes.rst:2044 +#: ../../../library/stdtypes.rst:2320 msgid "" "See :ref:`formatstrings` for a description of the various formatting options " "that can be specified in format strings." msgstr "" -#: ../../../library/stdtypes.rst:2048 +#: ../../../library/stdtypes.rst:2324 msgid "" "When formatting a number (:class:`int`, :class:`float`, :class:`complex`, :" "class:`decimal.Decimal` and subclasses) with the ``n`` type (ex: ``'{:n}'." @@ -2746,30 +3044,30 @@ msgid "" "This temporary change affects other threads." msgstr "" -#: ../../../library/stdtypes.rst:2057 +#: ../../../library/stdtypes.rst:2333 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:2065 +#: ../../../library/stdtypes.rst:2341 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:2081 +#: ../../../library/stdtypes.rst:2357 msgid "" "Like :meth:`~str.find`, but raise :exc:`ValueError` when the substring is " "not found. For example:" msgstr "" -#: ../../../library/stdtypes.rst:2095 +#: ../../../library/stdtypes.rst:2371 msgid "See also :meth:`rindex`." msgstr "" -#: ../../../library/stdtypes.rst:2100 +#: ../../../library/stdtypes.rst:2376 msgid "" "Return ``True`` if all characters in the string are alphanumeric and there " "is at least one character, ``False`` otherwise. A character ``c`` is " @@ -2777,7 +3075,7 @@ msgid "" "isdecimal()``, ``c.isdigit()``, or ``c.isnumeric()``. For example:" msgstr "" -#: ../../../library/stdtypes.rst:2119 +#: ../../../library/stdtypes.rst:2395 msgid "" "Return ``True`` if all characters in the string are alphabetic and there is " "at least one character, ``False`` otherwise. Alphabetic characters are " @@ -2789,18 +3087,18 @@ msgid "" "spec/chapter-4/#G91002>`__. For example:" msgstr "" -#: ../../../library/stdtypes.rst:2137 +#: ../../../library/stdtypes.rst:2413 msgid "See :ref:`unicode-properties`." msgstr "" -#: ../../../library/stdtypes.rst:2142 +#: ../../../library/stdtypes.rst:2418 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:2158 +#: ../../../library/stdtypes.rst:2434 msgid "" "Return ``True`` if all characters in the string are decimal characters and " "there is at least one character, ``False`` otherwise. Decimal characters are " @@ -2809,7 +3107,7 @@ msgid "" "Unicode General Category \"Nd\". For example:" msgstr "" -#: ../../../library/stdtypes.rst:2177 +#: ../../../library/stdtypes.rst:2453 msgid "" "Return ``True`` if all characters in the string are digits and there is at " "least one character, ``False`` otherwise. Digits include decimal characters " @@ -2820,44 +3118,44 @@ msgid "" "property value Numeric_Type=Digit or Numeric_Type=Decimal." msgstr "" -#: ../../../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:2641 ../../../library/stdtypes.rst:2662 -#: ../../../library/stdtypes.rst:2676 ../../../library/stdtypes.rst:2763 -#: ../../../library/stdtypes.rst:2785 ../../../library/stdtypes.rst:2799 -#: ../../../library/stdtypes.rst:2914 +#: ../../../library/stdtypes.rst:2461 ../../../library/stdtypes.rst:2542 +#: ../../../library/stdtypes.rst:2559 ../../../library/stdtypes.rst:2586 +#: ../../../library/stdtypes.rst:2641 ../../../library/stdtypes.rst:2719 +#: ../../../library/stdtypes.rst:2830 ../../../library/stdtypes.rst:2851 +#: ../../../library/stdtypes.rst:2917 ../../../library/stdtypes.rst:2938 +#: ../../../library/stdtypes.rst:2952 ../../../library/stdtypes.rst:3039 +#: ../../../library/stdtypes.rst:3061 ../../../library/stdtypes.rst:3075 +#: ../../../library/stdtypes.rst:3190 msgid "For example:" msgstr "" -#: ../../../library/stdtypes.rst:2198 +#: ../../../library/stdtypes.rst:2474 msgid "See also :meth:`isdecimal` and :meth:`isnumeric`." msgstr "" -#: ../../../library/stdtypes.rst:2203 +#: ../../../library/stdtypes.rst:2479 msgid "" "Return ``True`` if the string is a valid identifier according to the " "language definition, section :ref:`identifiers`." msgstr "" -#: ../../../library/stdtypes.rst:2206 +#: ../../../library/stdtypes.rst:2482 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:2209 +#: ../../../library/stdtypes.rst:2485 msgid "Example: ::" msgstr "" -#: ../../../library/stdtypes.rst:2222 +#: ../../../library/stdtypes.rst:2498 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:2228 +#: ../../../library/stdtypes.rst:2504 msgid "" "Return ``True`` if all characters in the string are numeric characters, and " "there is at least one character, ``False`` otherwise. Numeric characters " @@ -2867,17 +3165,17 @@ msgid "" "Numeric_Type=Decimal or Numeric_Type=Numeric. For example:" msgstr "" -#: ../../../library/stdtypes.rst:2247 +#: ../../../library/stdtypes.rst:2523 msgid "See also :meth:`isdecimal` and :meth:`isdigit`." msgstr "" -#: ../../../library/stdtypes.rst:2252 +#: ../../../library/stdtypes.rst:2528 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:2255 +#: ../../../library/stdtypes.rst:2531 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 " @@ -2885,7 +3183,7 @@ msgid "" "written to :data:`sys.stdout` or :data:`sys.stderr`." msgstr "" -#: ../../../library/stdtypes.rst:2260 +#: ../../../library/stdtypes.rst:2536 msgid "" "The printable characters are those which in the Unicode character database " "(see :mod:`unicodedata`) have a general category in group Letter, Mark, " @@ -2894,28 +3192,28 @@ msgid "" "C), except the ASCII space." msgstr "" -#: ../../../library/stdtypes.rst:2275 +#: ../../../library/stdtypes.rst:2551 msgid "See also :meth:`isspace`." msgstr "" -#: ../../../library/stdtypes.rst:2280 +#: ../../../library/stdtypes.rst:2556 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:2296 +#: ../../../library/stdtypes.rst:2572 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:2301 +#: ../../../library/stdtypes.rst:2577 msgid "See also :meth:`isprintable`." msgstr "" -#: ../../../library/stdtypes.rst:2306 +#: ../../../library/stdtypes.rst:2582 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 " @@ -2923,17 +3221,17 @@ msgid "" "otherwise." msgstr "" -#: ../../../library/stdtypes.rst:2321 +#: ../../../library/stdtypes.rst:2597 msgid "See also :meth:`title`." msgstr "" -#: ../../../library/stdtypes.rst:2326 +#: ../../../library/stdtypes.rst:2602 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:2344 +#: ../../../library/stdtypes.rst:2620 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 " @@ -2941,35 +3239,35 @@ msgid "" "elements is the string providing this method. For example:" msgstr "" -#: ../../../library/stdtypes.rst:2356 +#: ../../../library/stdtypes.rst:2632 msgid "See also :meth:`split`." msgstr "" -#: ../../../library/stdtypes.rst:2361 +#: ../../../library/stdtypes.rst:2637 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:2376 ../../../library/stdtypes.rst:2923 +#: ../../../library/stdtypes.rst:2652 ../../../library/stdtypes.rst:3199 msgid "See also :meth:`rjust`." msgstr "" -#: ../../../library/stdtypes.rst:2381 +#: ../../../library/stdtypes.rst:2657 msgid "" "Return a copy of the string with all the cased characters [4]_ converted to " "lowercase. For example:" msgstr "" -#: ../../../library/stdtypes.rst:2389 +#: ../../../library/stdtypes.rst:2665 msgid "" "The lowercasing algorithm used is `described in section 3.13.2 'Default Case " "Conversion' of the Unicode Standard `__." msgstr "" -#: ../../../library/stdtypes.rst:2396 +#: ../../../library/stdtypes.rst:2672 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 " @@ -2979,19 +3277,19 @@ msgid "" "stripped::" msgstr "" -#: ../../../library/stdtypes.rst:2407 +#: ../../../library/stdtypes.rst:2683 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:2419 +#: ../../../library/stdtypes.rst:2695 msgid "" "This static method returns a translation table usable for :meth:`str." "translate`." msgstr "" -#: ../../../library/stdtypes.rst:2421 +#: ../../../library/stdtypes.rst:2697 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, " @@ -2999,7 +3297,7 @@ msgid "" "converted to ordinals." msgstr "" -#: ../../../library/stdtypes.rst:2426 +#: ../../../library/stdtypes.rst:2702 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 " @@ -3007,11 +3305,11 @@ msgid "" "must be a string, whose characters will be mapped to ``None`` in the result." msgstr "" -#: ../../../library/stdtypes.rst:2433 +#: ../../../library/stdtypes.rst:2709 msgid "*dict* can now be a :class:`frozendict`." msgstr "" -#: ../../../library/stdtypes.rst:2438 +#: ../../../library/stdtypes.rst:2714 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 " @@ -3019,32 +3317,32 @@ msgid "" "containing the string itself, followed by two empty strings." msgstr "" -#: ../../../library/stdtypes.rst:2454 +#: ../../../library/stdtypes.rst:2730 msgid "See also :meth:`rpartition`." msgstr "" -#: ../../../library/stdtypes.rst:2459 +#: ../../../library/stdtypes.rst:2735 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:2472 +#: ../../../library/stdtypes.rst:2748 msgid "See also :meth:`removesuffix` and :meth:`startswith`." msgstr "" -#: ../../../library/stdtypes.rst:2477 +#: ../../../library/stdtypes.rst:2753 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:2490 +#: ../../../library/stdtypes.rst:2766 msgid "See also :meth:`removeprefix` and :meth:`endswith`." msgstr "" -#: ../../../library/stdtypes.rst:2495 +#: ../../../library/stdtypes.rst:2771 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 " @@ -3052,11 +3350,11 @@ msgid "" "replaced. For example:" msgstr "" -#: ../../../library/stdtypes.rst:2507 ../../../library/stdtypes.rst:3803 +#: ../../../library/stdtypes.rst:2783 ../../../library/stdtypes.rst:4079 msgid "*count* is now supported as a keyword argument." msgstr "" -#: ../../../library/stdtypes.rst:2513 +#: ../../../library/stdtypes.rst:2789 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* " @@ -3064,32 +3362,32 @@ msgid "" "For example:" msgstr "" -#: ../../../library/stdtypes.rst:2525 +#: ../../../library/stdtypes.rst:2801 msgid "See also :meth:`find` and :meth:`rindex`." msgstr "" -#: ../../../library/stdtypes.rst:2530 +#: ../../../library/stdtypes.rst:2806 msgid "" "Like :meth:`rfind` but raises :exc:`ValueError` when the substring *sub* is " "not found. For example:" msgstr "" -#: ../../../library/stdtypes.rst:2545 +#: ../../../library/stdtypes.rst:2821 msgid "See also :meth:`index` and :meth:`find`." msgstr "" -#: ../../../library/stdtypes.rst:2550 +#: ../../../library/stdtypes.rst:2826 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:2565 +#: ../../../library/stdtypes.rst:2841 msgid "See also :meth:`ljust` and :meth:`zfill`." msgstr "" -#: ../../../library/stdtypes.rst:2570 +#: ../../../library/stdtypes.rst:2846 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 " @@ -3097,11 +3395,11 @@ msgid "" "containing two empty strings, followed by the string itself." msgstr "" -#: ../../../library/stdtypes.rst:2586 +#: ../../../library/stdtypes.rst:2862 msgid "See also :meth:`partition`." msgstr "" -#: ../../../library/stdtypes.rst:2591 +#: ../../../library/stdtypes.rst:2867 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 " @@ -3111,7 +3409,7 @@ msgid "" "detail below." msgstr "" -#: ../../../library/stdtypes.rst:2601 +#: ../../../library/stdtypes.rst:2877 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 " @@ -3121,17 +3419,17 @@ msgid "" "stripped. For example:" msgstr "" -#: ../../../library/stdtypes.rst:2615 +#: ../../../library/stdtypes.rst:2891 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:2623 +#: ../../../library/stdtypes.rst:2899 msgid "See also :meth:`strip`." msgstr "" -#: ../../../library/stdtypes.rst:2628 +#: ../../../library/stdtypes.rst:2904 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, " @@ -3140,7 +3438,7 @@ msgid "" "possible splits are made)." msgstr "" -#: ../../../library/stdtypes.rst:2634 +#: ../../../library/stdtypes.rst:2910 msgid "" "If *sep* is given, consecutive delimiters are not grouped together and are " "deemed to delimit empty strings (for example, ``'1,,2'.split(',')`` returns " @@ -3150,7 +3448,7 @@ msgid "" "``['']``." msgstr "" -#: ../../../library/stdtypes.rst:2654 +#: ../../../library/stdtypes.rst:2930 msgid "" "If *sep* is not specified or is ``None``, a different splitting algorithm is " "applied: runs of consecutive :meth:`whitespace ` are regarded " @@ -3160,153 +3458,153 @@ msgid "" "whitespace with a ``None`` separator returns ``[]``." msgstr "" -#: ../../../library/stdtypes.rst:2673 +#: ../../../library/stdtypes.rst:2949 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:2687 +#: ../../../library/stdtypes.rst:2963 msgid "See also :meth:`join` and :meth:`rsplit`." msgstr "" -#: ../../../library/stdtypes.rst:2695 +#: ../../../library/stdtypes.rst:2971 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:2699 +#: ../../../library/stdtypes.rst:2975 msgid "" "This method splits on the following line boundaries. In particular, the " "boundaries are a superset of :term:`universal newlines`." msgstr "" -#: ../../../library/stdtypes.rst:2703 +#: ../../../library/stdtypes.rst:2979 msgid "Representation" msgstr "" -#: ../../../library/stdtypes.rst:2703 +#: ../../../library/stdtypes.rst:2979 msgid "Description" msgstr "" -#: ../../../library/stdtypes.rst:2705 +#: ../../../library/stdtypes.rst:2981 msgid "``\\n``" msgstr "" -#: ../../../library/stdtypes.rst:2705 +#: ../../../library/stdtypes.rst:2981 msgid "Line Feed" msgstr "" -#: ../../../library/stdtypes.rst:2707 +#: ../../../library/stdtypes.rst:2983 msgid "``\\r``" msgstr "" -#: ../../../library/stdtypes.rst:2707 +#: ../../../library/stdtypes.rst:2983 msgid "Carriage Return" msgstr "" -#: ../../../library/stdtypes.rst:2709 +#: ../../../library/stdtypes.rst:2985 msgid "``\\r\\n``" msgstr "" -#: ../../../library/stdtypes.rst:2709 +#: ../../../library/stdtypes.rst:2985 msgid "Carriage Return + Line Feed" msgstr "" -#: ../../../library/stdtypes.rst:2711 +#: ../../../library/stdtypes.rst:2987 msgid "``\\v`` or ``\\x0b``" msgstr "" -#: ../../../library/stdtypes.rst:2711 +#: ../../../library/stdtypes.rst:2987 msgid "Line Tabulation" msgstr "" -#: ../../../library/stdtypes.rst:2713 +#: ../../../library/stdtypes.rst:2989 msgid "``\\f`` or ``\\x0c``" msgstr "" -#: ../../../library/stdtypes.rst:2713 +#: ../../../library/stdtypes.rst:2989 msgid "Form Feed" msgstr "" -#: ../../../library/stdtypes.rst:2715 +#: ../../../library/stdtypes.rst:2991 msgid "``\\x1c``" msgstr "" -#: ../../../library/stdtypes.rst:2715 +#: ../../../library/stdtypes.rst:2991 msgid "File Separator" msgstr "" -#: ../../../library/stdtypes.rst:2717 +#: ../../../library/stdtypes.rst:2993 msgid "``\\x1d``" msgstr "" -#: ../../../library/stdtypes.rst:2717 +#: ../../../library/stdtypes.rst:2993 msgid "Group Separator" msgstr "" -#: ../../../library/stdtypes.rst:2719 +#: ../../../library/stdtypes.rst:2995 msgid "``\\x1e``" msgstr "" -#: ../../../library/stdtypes.rst:2719 +#: ../../../library/stdtypes.rst:2995 msgid "Record Separator" msgstr "" -#: ../../../library/stdtypes.rst:2721 +#: ../../../library/stdtypes.rst:2997 msgid "``\\x85``" msgstr "" -#: ../../../library/stdtypes.rst:2721 +#: ../../../library/stdtypes.rst:2997 msgid "Next Line (C1 Control Code)" msgstr "" -#: ../../../library/stdtypes.rst:2723 +#: ../../../library/stdtypes.rst:2999 msgid "``\\u2028``" msgstr "" -#: ../../../library/stdtypes.rst:2723 +#: ../../../library/stdtypes.rst:2999 msgid "Line Separator" msgstr "" -#: ../../../library/stdtypes.rst:2725 +#: ../../../library/stdtypes.rst:3001 msgid "``\\u2029``" msgstr "" -#: ../../../library/stdtypes.rst:2725 +#: ../../../library/stdtypes.rst:3001 msgid "Paragraph Separator" msgstr "" -#: ../../../library/stdtypes.rst:2730 +#: ../../../library/stdtypes.rst:3006 msgid "``\\v`` and ``\\f`` added to list of line boundaries." msgstr "" -#: ../../../library/stdtypes.rst:2732 ../../../library/stdtypes.rst:2836 -#: ../../../library/stdtypes.rst:3013 ../../../library/stdtypes.rst:4019 -#: ../../../library/stdtypes.rst:4038 ../../../library/stdtypes.rst:4129 -#: ../../../library/stdtypes.rst:4145 ../../../library/stdtypes.rst:4170 -#: ../../../library/stdtypes.rst:4184 ../../../library/stdtypes.rst:4212 -#: ../../../library/stdtypes.rst:4226 ../../../library/stdtypes.rst:4244 -#: ../../../library/stdtypes.rst:4271 ../../../library/stdtypes.rst:4294 -#: ../../../library/stdtypes.rst:4321 ../../../library/stdtypes.rst:4363 -#: ../../../library/stdtypes.rst:4387 +#: ../../../library/stdtypes.rst:3008 ../../../library/stdtypes.rst:3112 +#: ../../../library/stdtypes.rst:3289 ../../../library/stdtypes.rst:4295 +#: ../../../library/stdtypes.rst:4314 ../../../library/stdtypes.rst:4405 +#: ../../../library/stdtypes.rst:4421 ../../../library/stdtypes.rst:4446 +#: ../../../library/stdtypes.rst:4460 ../../../library/stdtypes.rst:4488 +#: ../../../library/stdtypes.rst:4502 ../../../library/stdtypes.rst:4520 +#: ../../../library/stdtypes.rst:4547 ../../../library/stdtypes.rst:4570 +#: ../../../library/stdtypes.rst:4597 ../../../library/stdtypes.rst:4639 +#: ../../../library/stdtypes.rst:4663 msgid "For example::" msgstr "" -#: ../../../library/stdtypes.rst:2739 +#: ../../../library/stdtypes.rst:3015 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:2748 +#: ../../../library/stdtypes.rst:3024 msgid "For comparison, ``split('\\n')`` gives::" msgstr "" -#: ../../../library/stdtypes.rst:2758 +#: ../../../library/stdtypes.rst:3034 msgid "" "Return ``True`` if string starts with the *prefix*, otherwise return " "``False``. *prefix* can also be a tuple of prefixes to look for. With " @@ -3314,11 +3612,11 @@ msgid "" "*end*, stop comparing string at that position." msgstr "" -#: ../../../library/stdtypes.rst:2774 +#: ../../../library/stdtypes.rst:3050 msgid "See also :meth:`endswith` and :meth:`removeprefix`." msgstr "" -#: ../../../library/stdtypes.rst:2779 +#: ../../../library/stdtypes.rst:3055 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 " @@ -3328,7 +3626,7 @@ msgid "" "combinations of its values are stripped." msgstr "" -#: ../../../library/stdtypes.rst:2794 +#: ../../../library/stdtypes.rst:3070 msgid "" "The outermost leading and trailing *chars* argument values are stripped from " "the string. Characters are removed from the leading end until reaching a " @@ -3336,33 +3634,33 @@ msgid "" "A similar action takes place on the trailing end." msgstr "" -#: ../../../library/stdtypes.rst:2807 +#: ../../../library/stdtypes.rst:3083 msgid "See also :meth:`rstrip`." msgstr "" -#: ../../../library/stdtypes.rst:2812 +#: ../../../library/stdtypes.rst:3088 msgid "" "Return a copy of the string with uppercase characters converted to lowercase " "and vice versa. For example:" msgstr "" -#: ../../../library/stdtypes.rst:2820 +#: ../../../library/stdtypes.rst:3096 msgid "" "Note that it is not necessarily true that ``s.swapcase().swapcase() == s``. " "For example:" msgstr "" -#: ../../../library/stdtypes.rst:2828 +#: ../../../library/stdtypes.rst:3104 msgid "See also :meth:`str.lower` and :meth:`str.upper`." msgstr "" -#: ../../../library/stdtypes.rst:2833 +#: ../../../library/stdtypes.rst:3109 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:2841 ../../../library/stdtypes.rst:4331 +#: ../../../library/stdtypes.rst:3117 ../../../library/stdtypes.rst:4607 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 " @@ -3370,23 +3668,23 @@ msgid "" "which may not be the desired result::" msgstr "" -#: ../../../library/stdtypes.rst:2849 +#: ../../../library/stdtypes.rst:3125 msgid "" "The :func:`string.capwords` function does not have this problem, as it " "splits words on spaces only." msgstr "" -#: ../../../library/stdtypes.rst:2852 +#: ../../../library/stdtypes.rst:3128 msgid "" "Alternatively, a workaround for apostrophes can be constructed using regular " "expressions::" msgstr "" -#: ../../../library/stdtypes.rst:2864 +#: ../../../library/stdtypes.rst:3140 msgid "See also :meth:`istitle`." msgstr "" -#: ../../../library/stdtypes.rst:2869 +#: ../../../library/stdtypes.rst:3145 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 " @@ -3398,25 +3696,25 @@ msgid "" "exception, to map the character to itself." msgstr "" -#: ../../../library/stdtypes.rst:2878 +#: ../../../library/stdtypes.rst:3154 msgid "" "You can use :meth:`str.maketrans` to create a translation map from character-" "to-character mappings in different formats." msgstr "" -#: ../../../library/stdtypes.rst:2881 +#: ../../../library/stdtypes.rst:3157 msgid "" "The following example uses a mapping to replace ``'a'`` with ``'X'``, " "``'b'`` with ``'Y'``, and delete ``'c'``:" msgstr "" -#: ../../../library/stdtypes.rst:2889 +#: ../../../library/stdtypes.rst:3165 msgid "" "See also the :mod:`codecs` module for a more flexible approach to custom " "character mappings." msgstr "" -#: ../../../library/stdtypes.rst:2895 +#: ../../../library/stdtypes.rst:3171 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`` " @@ -3425,14 +3723,14 @@ msgid "" "titlecase)." msgstr "" -#: ../../../library/stdtypes.rst:2901 +#: ../../../library/stdtypes.rst:3177 msgid "" "The uppercasing algorithm used is `described in section 3.13.2 'Default Case " "Conversion' of the Unicode Standard `__." msgstr "" -#: ../../../library/stdtypes.rst:2908 +#: ../../../library/stdtypes.rst:3184 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 " @@ -3440,27 +3738,27 @@ msgid "" "original string is returned if *width* is less than or equal to ``len(s)``." msgstr "" -#: ../../../library/stdtypes.rst:2943 +#: ../../../library/stdtypes.rst:3219 msgid "Formatted String Literals (f-strings)" msgstr "" -#: ../../../library/stdtypes.rst:2946 +#: ../../../library/stdtypes.rst:3222 msgid "" "The :keyword:`await` and :keyword:`async for` can be used in expressions " "within f-strings." msgstr "" -#: ../../../library/stdtypes.rst:2949 +#: ../../../library/stdtypes.rst:3225 msgid "Added the debug specifier (``=``)" msgstr "" -#: ../../../library/stdtypes.rst:2951 +#: ../../../library/stdtypes.rst:3227 msgid "" "Many restrictions on expressions within f-strings have been removed. " "Notably, nested strings, comments, and backslashes are now permitted." msgstr "" -#: ../../../library/stdtypes.rst:2955 +#: ../../../library/stdtypes.rst:3231 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 " @@ -3469,29 +3767,29 @@ msgid "" "replacement field must contain an expression, optionally followed by:" msgstr "" -#: ../../../library/stdtypes.rst:2962 +#: ../../../library/stdtypes.rst:3238 msgid "a *debug specifier* -- an equal sign (``=``);" msgstr "" -#: ../../../library/stdtypes.rst:2963 +#: ../../../library/stdtypes.rst:3239 msgid "a *conversion specifier* -- ``!s``, ``!r`` or ``!a``; and/or" msgstr "" -#: ../../../library/stdtypes.rst:2964 +#: ../../../library/stdtypes.rst:3240 msgid "a *format specifier* prefixed with a colon (``:``)." msgstr "" -#: ../../../library/stdtypes.rst:2966 +#: ../../../library/stdtypes.rst:3242 msgid "" "See the :ref:`Lexical Analysis section on f-strings ` for details " "on the syntax of these fields." msgstr "" -#: ../../../library/stdtypes.rst:2970 +#: ../../../library/stdtypes.rst:3246 msgid "Debug specifier" msgstr "" -#: ../../../library/stdtypes.rst:2974 +#: ../../../library/stdtypes.rst:3250 msgid "" "If a debug specifier -- an equal sign (``=``) -- appears after the " "replacement field expression, the resulting f-string will contain the " @@ -3499,50 +3797,50 @@ msgid "" "is often useful for debugging::" msgstr "" -#: ../../../library/stdtypes.rst:2983 +#: ../../../library/stdtypes.rst:3259 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:2991 +#: ../../../library/stdtypes.rst:3267 msgid "Conversion specifier" msgstr "" -#: ../../../library/stdtypes.rst:2993 +#: ../../../library/stdtypes.rst:3269 msgid "" "By default, the value of a replacement field expression is converted to a " "string using :func:`str`::" msgstr "" -#: ../../../library/stdtypes.rst:3001 +#: ../../../library/stdtypes.rst:3277 msgid "" "When a debug specifier but no format specifier is used, the default " "conversion instead uses :func:`repr`::" msgstr "" -#: ../../../library/stdtypes.rst:3007 +#: ../../../library/stdtypes.rst:3283 msgid "" "The conversion can be specified explicitly using one of these specifiers:" msgstr "" -#: ../../../library/stdtypes.rst:3009 +#: ../../../library/stdtypes.rst:3285 msgid "``!s`` for :func:`str`" msgstr "" -#: ../../../library/stdtypes.rst:3010 +#: ../../../library/stdtypes.rst:3286 msgid "``!r`` for :func:`repr`" msgstr "" -#: ../../../library/stdtypes.rst:3011 +#: ../../../library/stdtypes.rst:3287 msgid "``!a`` for :func:`ascii`" msgstr "" -#: ../../../library/stdtypes.rst:3032 +#: ../../../library/stdtypes.rst:3308 msgid "Format specifier" msgstr "" -#: ../../../library/stdtypes.rst:3034 +#: ../../../library/stdtypes.rst:3310 msgid "" "After the expression has been evaluated, and possibly converted using an " "explicit conversion specifier, it is formatted using the :func:`format` " @@ -3552,29 +3850,29 @@ msgid "" "the replacement field. For example::" msgstr "" -#: ../../../library/stdtypes.rst:3055 +#: ../../../library/stdtypes.rst:3331 msgid "Template String Literals (t-strings)" msgstr "" -#: ../../../library/stdtypes.rst:3057 +#: ../../../library/stdtypes.rst:3333 msgid "" "A :dfn:`t-string` (formally a :dfn:`template string literal`) is a string " "literal that is prefixed with ``t`` or ``T``." msgstr "" -#: ../../../library/stdtypes.rst:3060 +#: ../../../library/stdtypes.rst:3336 msgid "" "These strings follow the same syntax and evaluation rules as :ref:`formatted " "string literals `, with the following differences:" msgstr "" -#: ../../../library/stdtypes.rst:3064 +#: ../../../library/stdtypes.rst:3340 msgid "" "Rather than evaluating to a ``str`` object, template string literals " "evaluate to a :class:`string.templatelib.Template` object." msgstr "" -#: ../../../library/stdtypes.rst:3067 +#: ../../../library/stdtypes.rst:3343 msgid "" "The :func:`format` protocol is not used. Instead, the format specifier and " "conversions (if any) are passed to a new :class:`~string.templatelib." @@ -3583,7 +3881,7 @@ msgid "" "Template` object to decide how to handle format specifiers and conversions." msgstr "" -#: ../../../library/stdtypes.rst:3074 +#: ../../../library/stdtypes.rst:3350 msgid "" "Format specifiers containing nested replacement fields are evaluated " "eagerly, prior to being passed to the :class:`~string.templatelib." @@ -3593,7 +3891,7 @@ msgid "" "to be ``2``, the resulting format specifier would be ``'.2f'``." msgstr "" -#: ../../../library/stdtypes.rst:3082 +#: ../../../library/stdtypes.rst:3358 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 " @@ -3605,18 +3903,18 @@ msgid "" "behaviour." msgstr "" -#: ../../../library/stdtypes.rst:3096 +#: ../../../library/stdtypes.rst:3372 msgid "``printf``-style String Formatting" msgstr "" -#: ../../../library/stdtypes.rst:3109 +#: ../../../library/stdtypes.rst:3385 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:3113 +#: ../../../library/stdtypes.rst:3389 msgid "" "Using :ref:`formatted string literals `, the :meth:`str.format` " "interface, or :class:`string.Template` may help avoid these errors. Each of " @@ -3624,7 +3922,7 @@ msgid "" "flexibility, and/or extensibility." msgstr "" -#: ../../../library/stdtypes.rst:3118 +#: ../../../library/stdtypes.rst:3394 msgid "" "String objects have one unique built-in operation: the ``%`` operator " "(modulo). This is also known as the string *formatting* or *interpolation* " @@ -3634,7 +3932,7 @@ msgid "" "function in the C language. For example:" msgstr "" -#: ../../../library/stdtypes.rst:3130 +#: ../../../library/stdtypes.rst:3406 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 " @@ -3642,36 +3940,36 @@ msgid "" "example, a dictionary)." msgstr "" -#: ../../../library/stdtypes.rst:3140 ../../../library/stdtypes.rst:4442 +#: ../../../library/stdtypes.rst:3416 ../../../library/stdtypes.rst:4718 msgid "" "A conversion specifier contains two or more characters and has the following " "components, which must occur in this order:" msgstr "" -#: ../../../library/stdtypes.rst:3143 ../../../library/stdtypes.rst:4445 +#: ../../../library/stdtypes.rst:3419 ../../../library/stdtypes.rst:4721 msgid "The ``'%'`` character, which marks the start of the specifier." msgstr "" -#: ../../../library/stdtypes.rst:3145 ../../../library/stdtypes.rst:4447 +#: ../../../library/stdtypes.rst:3421 ../../../library/stdtypes.rst:4723 msgid "" "Mapping key (optional), consisting of a parenthesised sequence of characters " "(for example, ``(somename)``)." msgstr "" -#: ../../../library/stdtypes.rst:3148 ../../../library/stdtypes.rst:4450 +#: ../../../library/stdtypes.rst:3424 ../../../library/stdtypes.rst:4726 msgid "" "Conversion flags (optional), which affect the result of some conversion " "types." msgstr "" -#: ../../../library/stdtypes.rst:3151 ../../../library/stdtypes.rst:4453 +#: ../../../library/stdtypes.rst:3427 ../../../library/stdtypes.rst:4729 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:3155 ../../../library/stdtypes.rst:4457 +#: ../../../library/stdtypes.rst:3431 ../../../library/stdtypes.rst:4733 msgid "" "Precision (optional), given as a ``'.'`` (dot) followed by the precision. " "If specified as ``'*'`` (an asterisk), the actual precision is read from the " @@ -3679,15 +3977,15 @@ msgid "" "the precision." msgstr "" -#: ../../../library/stdtypes.rst:3160 ../../../library/stdtypes.rst:4462 +#: ../../../library/stdtypes.rst:3436 ../../../library/stdtypes.rst:4738 msgid "Length modifier (optional)." msgstr "" -#: ../../../library/stdtypes.rst:3162 ../../../library/stdtypes.rst:4464 +#: ../../../library/stdtypes.rst:3438 ../../../library/stdtypes.rst:4740 msgid "Conversion type." msgstr "" -#: ../../../library/stdtypes.rst:3164 +#: ../../../library/stdtypes.rst:3440 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 " @@ -3695,286 +3993,286 @@ msgid "" "selects the value to be formatted from the mapping. For example:" msgstr "" -#: ../../../library/stdtypes.rst:3173 ../../../library/stdtypes.rst:4475 +#: ../../../library/stdtypes.rst:3449 ../../../library/stdtypes.rst:4751 msgid "" "In this case no ``*`` specifiers may occur in a format (since they require a " "sequential parameter list)." msgstr "" -#: ../../../library/stdtypes.rst:3176 ../../../library/stdtypes.rst:4478 +#: ../../../library/stdtypes.rst:3452 ../../../library/stdtypes.rst:4754 msgid "The conversion flag characters are:" msgstr "" -#: ../../../library/stdtypes.rst:3185 ../../../library/stdtypes.rst:4487 +#: ../../../library/stdtypes.rst:3461 ../../../library/stdtypes.rst:4763 msgid "Flag" msgstr "" -#: ../../../library/stdtypes.rst:3187 ../../../library/stdtypes.rst:4489 +#: ../../../library/stdtypes.rst:3463 ../../../library/stdtypes.rst:4765 msgid "``'#'``" msgstr "" -#: ../../../library/stdtypes.rst:3187 ../../../library/stdtypes.rst:4489 +#: ../../../library/stdtypes.rst:3463 ../../../library/stdtypes.rst:4765 msgid "" "The value conversion will use the \"alternate form\" (where defined below)." msgstr "" -#: ../../../library/stdtypes.rst:3190 ../../../library/stdtypes.rst:4492 +#: ../../../library/stdtypes.rst:3466 ../../../library/stdtypes.rst:4768 msgid "``'0'``" msgstr "" -#: ../../../library/stdtypes.rst:3190 ../../../library/stdtypes.rst:4492 +#: ../../../library/stdtypes.rst:3466 ../../../library/stdtypes.rst:4768 msgid "The conversion will be zero padded for numeric values." msgstr "" -#: ../../../library/stdtypes.rst:3192 ../../../library/stdtypes.rst:4494 +#: ../../../library/stdtypes.rst:3468 ../../../library/stdtypes.rst:4770 msgid "``'-'``" msgstr "" -#: ../../../library/stdtypes.rst:3192 ../../../library/stdtypes.rst:4494 +#: ../../../library/stdtypes.rst:3468 ../../../library/stdtypes.rst:4770 msgid "" "The converted value is left adjusted (overrides the ``'0'`` conversion if " "both are given)." msgstr "" -#: ../../../library/stdtypes.rst:3195 ../../../library/stdtypes.rst:4497 +#: ../../../library/stdtypes.rst:3471 ../../../library/stdtypes.rst:4773 msgid "``' '``" msgstr "" -#: ../../../library/stdtypes.rst:3195 ../../../library/stdtypes.rst:4497 +#: ../../../library/stdtypes.rst:3471 ../../../library/stdtypes.rst:4773 msgid "" "(a space) A blank should be left before a positive number (or empty string) " "produced by a signed conversion." msgstr "" -#: ../../../library/stdtypes.rst:3198 ../../../library/stdtypes.rst:4500 +#: ../../../library/stdtypes.rst:3474 ../../../library/stdtypes.rst:4776 msgid "``'+'``" msgstr "" -#: ../../../library/stdtypes.rst:3198 ../../../library/stdtypes.rst:4500 +#: ../../../library/stdtypes.rst:3474 ../../../library/stdtypes.rst:4776 msgid "" "A sign character (``'+'`` or ``'-'``) will precede the conversion (overrides " "a \"space\" flag)." msgstr "" -#: ../../../library/stdtypes.rst:3202 ../../../library/stdtypes.rst:4504 +#: ../../../library/stdtypes.rst:3478 ../../../library/stdtypes.rst:4780 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:3205 ../../../library/stdtypes.rst:4507 +#: ../../../library/stdtypes.rst:3481 ../../../library/stdtypes.rst:4783 msgid "The conversion types are:" msgstr "" -#: ../../../library/stdtypes.rst:3208 ../../../library/stdtypes.rst:4510 +#: ../../../library/stdtypes.rst:3484 ../../../library/stdtypes.rst:4786 msgid "Conversion" msgstr "" -#: ../../../library/stdtypes.rst:3210 ../../../library/stdtypes.rst:4512 +#: ../../../library/stdtypes.rst:3486 ../../../library/stdtypes.rst:4788 msgid "``'d'``" msgstr "" -#: ../../../library/stdtypes.rst:3210 ../../../library/stdtypes.rst:3212 -#: ../../../library/stdtypes.rst:4512 ../../../library/stdtypes.rst:4514 +#: ../../../library/stdtypes.rst:3486 ../../../library/stdtypes.rst:3488 +#: ../../../library/stdtypes.rst:4788 ../../../library/stdtypes.rst:4790 msgid "Signed integer decimal." msgstr "" -#: ../../../library/stdtypes.rst:3212 ../../../library/stdtypes.rst:4514 +#: ../../../library/stdtypes.rst:3488 ../../../library/stdtypes.rst:4790 msgid "``'i'``" msgstr "" -#: ../../../library/stdtypes.rst:3214 ../../../library/stdtypes.rst:4516 +#: ../../../library/stdtypes.rst:3490 ../../../library/stdtypes.rst:4792 msgid "``'o'``" msgstr "" -#: ../../../library/stdtypes.rst:3214 ../../../library/stdtypes.rst:4516 +#: ../../../library/stdtypes.rst:3490 ../../../library/stdtypes.rst:4792 msgid "Signed octal value." msgstr "" -#: ../../../library/stdtypes.rst:3216 ../../../library/stdtypes.rst:4518 +#: ../../../library/stdtypes.rst:3492 ../../../library/stdtypes.rst:4794 msgid "``'u'``" msgstr "" -#: ../../../library/stdtypes.rst:3216 ../../../library/stdtypes.rst:4518 +#: ../../../library/stdtypes.rst:3492 ../../../library/stdtypes.rst:4794 msgid "Obsolete type -- it is identical to ``'d'``." msgstr "" -#: ../../../library/stdtypes.rst:3218 ../../../library/stdtypes.rst:4520 +#: ../../../library/stdtypes.rst:3494 ../../../library/stdtypes.rst:4796 msgid "``'x'``" msgstr "" -#: ../../../library/stdtypes.rst:3218 ../../../library/stdtypes.rst:4520 +#: ../../../library/stdtypes.rst:3494 ../../../library/stdtypes.rst:4796 msgid "Signed hexadecimal (lowercase)." msgstr "" -#: ../../../library/stdtypes.rst:3220 ../../../library/stdtypes.rst:4522 +#: ../../../library/stdtypes.rst:3496 ../../../library/stdtypes.rst:4798 msgid "``'X'``" msgstr "" -#: ../../../library/stdtypes.rst:3220 ../../../library/stdtypes.rst:4522 +#: ../../../library/stdtypes.rst:3496 ../../../library/stdtypes.rst:4798 msgid "Signed hexadecimal (uppercase)." msgstr "" -#: ../../../library/stdtypes.rst:3222 ../../../library/stdtypes.rst:4524 +#: ../../../library/stdtypes.rst:3498 ../../../library/stdtypes.rst:4800 msgid "``'e'``" msgstr "" -#: ../../../library/stdtypes.rst:3222 ../../../library/stdtypes.rst:4524 +#: ../../../library/stdtypes.rst:3498 ../../../library/stdtypes.rst:4800 msgid "Floating-point exponential format (lowercase)." msgstr "" -#: ../../../library/stdtypes.rst:3224 ../../../library/stdtypes.rst:4526 +#: ../../../library/stdtypes.rst:3500 ../../../library/stdtypes.rst:4802 msgid "``'E'``" msgstr "" -#: ../../../library/stdtypes.rst:3224 ../../../library/stdtypes.rst:4526 +#: ../../../library/stdtypes.rst:3500 ../../../library/stdtypes.rst:4802 msgid "Floating-point exponential format (uppercase)." msgstr "" -#: ../../../library/stdtypes.rst:3226 ../../../library/stdtypes.rst:4528 +#: ../../../library/stdtypes.rst:3502 ../../../library/stdtypes.rst:4804 msgid "``'f'``" msgstr "" -#: ../../../library/stdtypes.rst:3226 ../../../library/stdtypes.rst:3228 -#: ../../../library/stdtypes.rst:4528 ../../../library/stdtypes.rst:4530 +#: ../../../library/stdtypes.rst:3502 ../../../library/stdtypes.rst:3504 +#: ../../../library/stdtypes.rst:4804 ../../../library/stdtypes.rst:4806 msgid "Floating-point decimal format." msgstr "" -#: ../../../library/stdtypes.rst:3228 ../../../library/stdtypes.rst:4530 +#: ../../../library/stdtypes.rst:3504 ../../../library/stdtypes.rst:4806 msgid "``'F'``" msgstr "" -#: ../../../library/stdtypes.rst:3230 ../../../library/stdtypes.rst:4532 +#: ../../../library/stdtypes.rst:3506 ../../../library/stdtypes.rst:4808 msgid "``'g'``" msgstr "" -#: ../../../library/stdtypes.rst:3230 ../../../library/stdtypes.rst:4532 +#: ../../../library/stdtypes.rst:3506 ../../../library/stdtypes.rst:4808 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:3234 ../../../library/stdtypes.rst:4536 +#: ../../../library/stdtypes.rst:3510 ../../../library/stdtypes.rst:4812 msgid "``'G'``" msgstr "" -#: ../../../library/stdtypes.rst:3234 ../../../library/stdtypes.rst:4536 +#: ../../../library/stdtypes.rst:3510 ../../../library/stdtypes.rst:4812 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:3238 ../../../library/stdtypes.rst:4540 +#: ../../../library/stdtypes.rst:3514 ../../../library/stdtypes.rst:4816 msgid "``'c'``" msgstr "" -#: ../../../library/stdtypes.rst:3238 +#: ../../../library/stdtypes.rst:3514 msgid "Single character (accepts integer or single character string)." msgstr "" -#: ../../../library/stdtypes.rst:3241 ../../../library/stdtypes.rst:4553 +#: ../../../library/stdtypes.rst:3517 ../../../library/stdtypes.rst:4829 msgid "``'r'``" msgstr "" -#: ../../../library/stdtypes.rst:3241 +#: ../../../library/stdtypes.rst:3517 msgid "String (converts any Python object using :func:`repr`)." msgstr "" -#: ../../../library/stdtypes.rst:3244 ../../../library/stdtypes.rst:4547 +#: ../../../library/stdtypes.rst:3520 ../../../library/stdtypes.rst:4823 msgid "``'s'``" msgstr "" -#: ../../../library/stdtypes.rst:3244 +#: ../../../library/stdtypes.rst:3520 msgid "String (converts any Python object using :func:`str`)." msgstr "" -#: ../../../library/stdtypes.rst:3247 ../../../library/stdtypes.rst:4550 +#: ../../../library/stdtypes.rst:3523 ../../../library/stdtypes.rst:4826 msgid "``'a'``" msgstr "" -#: ../../../library/stdtypes.rst:3247 +#: ../../../library/stdtypes.rst:3523 msgid "String (converts any Python object using :func:`ascii`)." msgstr "" -#: ../../../library/stdtypes.rst:3250 ../../../library/stdtypes.rst:4556 +#: ../../../library/stdtypes.rst:3526 ../../../library/stdtypes.rst:4832 msgid "``'%'``" msgstr "" -#: ../../../library/stdtypes.rst:3250 ../../../library/stdtypes.rst:4556 +#: ../../../library/stdtypes.rst:3526 ../../../library/stdtypes.rst:4832 msgid "No argument is converted, results in a ``'%'`` character in the result." msgstr "" -#: ../../../library/stdtypes.rst:3254 +#: ../../../library/stdtypes.rst:3530 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:3261 ../../../library/stdtypes.rst:4563 +#: ../../../library/stdtypes.rst:3537 ../../../library/stdtypes.rst:4839 msgid "" "The alternate form causes a leading octal specifier (``'0o'``) to be " "inserted before the first digit." msgstr "" -#: ../../../library/stdtypes.rst:3265 ../../../library/stdtypes.rst:4567 +#: ../../../library/stdtypes.rst:3541 ../../../library/stdtypes.rst:4843 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:3269 ../../../library/stdtypes.rst:4571 +#: ../../../library/stdtypes.rst:3545 ../../../library/stdtypes.rst:4847 msgid "" "The alternate form causes the result to always contain a decimal point, even " "if no digits follow it." msgstr "" -#: ../../../library/stdtypes.rst:3272 ../../../library/stdtypes.rst:4574 +#: ../../../library/stdtypes.rst:3548 ../../../library/stdtypes.rst:4850 msgid "" "The precision determines the number of digits after the decimal point and " "defaults to 6." msgstr "" -#: ../../../library/stdtypes.rst:3276 ../../../library/stdtypes.rst:4578 +#: ../../../library/stdtypes.rst:3552 ../../../library/stdtypes.rst:4854 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:3279 ../../../library/stdtypes.rst:4581 +#: ../../../library/stdtypes.rst:3555 ../../../library/stdtypes.rst:4857 msgid "" "The precision determines the number of significant digits before and after " "the decimal point and defaults to 6." msgstr "" -#: ../../../library/stdtypes.rst:3283 ../../../library/stdtypes.rst:4585 +#: ../../../library/stdtypes.rst:3559 ../../../library/stdtypes.rst:4861 msgid "If precision is ``N``, the output is truncated to ``N`` characters." msgstr "" -#: ../../../library/stdtypes.rst:3286 ../../../library/stdtypes.rst:4594 +#: ../../../library/stdtypes.rst:3562 ../../../library/stdtypes.rst:4870 msgid "See :pep:`237`." msgstr "" -#: ../../../library/stdtypes.rst:3288 +#: ../../../library/stdtypes.rst:3564 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:3293 +#: ../../../library/stdtypes.rst:3569 msgid "" "``%f`` conversions for numbers whose absolute value is over 1e50 are no " "longer replaced by ``%g`` conversions." msgstr "" -#: ../../../library/stdtypes.rst:3304 +#: ../../../library/stdtypes.rst:3580 msgid "" "Binary Sequence Types --- :class:`bytes`, :class:`bytearray`, :class:" "`memoryview`" msgstr "" -#: ../../../library/stdtypes.rst:3312 +#: ../../../library/stdtypes.rst:3588 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 :" @@ -3982,17 +4280,17 @@ msgid "" "objects without needing to make a copy." msgstr "" -#: ../../../library/stdtypes.rst:3317 +#: ../../../library/stdtypes.rst:3593 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:3323 +#: ../../../library/stdtypes.rst:3599 msgid "Bytes Objects" msgstr "" -#: ../../../library/stdtypes.rst:3327 +#: ../../../library/stdtypes.rst:3603 msgid "" "Bytes objects are immutable sequences of single bytes. Since many major " "binary protocols are based on the ASCII text encoding, bytes objects offer " @@ -4000,40 +4298,40 @@ msgid "" "and are closely related to string objects in a variety of other ways." msgstr "" -#: ../../../library/stdtypes.rst:3335 +#: ../../../library/stdtypes.rst:3611 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:3338 +#: ../../../library/stdtypes.rst:3614 msgid "Single quotes: ``b'still allows embedded \"double\" quotes'``" msgstr "" -#: ../../../library/stdtypes.rst:3339 +#: ../../../library/stdtypes.rst:3615 msgid "Double quotes: ``b\"still allows embedded 'single' quotes\"``" msgstr "" -#: ../../../library/stdtypes.rst:3340 +#: ../../../library/stdtypes.rst:3616 msgid "" "Triple quoted: ``b'''3 single quotes'''``, ``b\"\"\"3 double quotes\"\"\"``" msgstr "" -#: ../../../library/stdtypes.rst:3342 +#: ../../../library/stdtypes.rst:3618 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:3346 +#: ../../../library/stdtypes.rst:3622 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:3350 +#: ../../../library/stdtypes.rst:3626 msgid "" "While bytes literals and representations are based on ASCII text, bytes " "objects actually behave like immutable sequences of integers, with each " @@ -4046,29 +4344,29 @@ msgid "" "compatible will usually lead to data corruption)." msgstr "" -#: ../../../library/stdtypes.rst:3360 +#: ../../../library/stdtypes.rst:3636 msgid "" "In addition to the literal forms, bytes objects can be created in a number " "of other ways:" msgstr "" -#: ../../../library/stdtypes.rst:3363 +#: ../../../library/stdtypes.rst:3639 msgid "A zero-filled bytes object of a specified length: ``bytes(10)``" msgstr "" -#: ../../../library/stdtypes.rst:3364 +#: ../../../library/stdtypes.rst:3640 msgid "From an iterable of integers: ``bytes(range(20))``" msgstr "" -#: ../../../library/stdtypes.rst:3365 +#: ../../../library/stdtypes.rst:3641 msgid "Copying existing binary data via the buffer protocol: ``bytes(obj)``" msgstr "" -#: ../../../library/stdtypes.rst:3367 +#: ../../../library/stdtypes.rst:3643 msgid "Also see the :ref:`bytes ` built-in." msgstr "" -#: ../../../library/stdtypes.rst:3369 +#: ../../../library/stdtypes.rst:3645 msgid "" "Since 2 hexadecimal digits correspond precisely to a single byte, " "hexadecimal numbers are a commonly used format for describing binary data. " @@ -4076,38 +4374,38 @@ msgid "" "that format:" msgstr "" -#: ../../../library/stdtypes.rst:3375 +#: ../../../library/stdtypes.rst:3651 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:3382 +#: ../../../library/stdtypes.rst:3658 msgid "" ":meth:`bytes.fromhex` now skips all ASCII whitespace in the string, not just " "spaces." msgstr "" -#: ../../../library/stdtypes.rst:3386 +#: ../../../library/stdtypes.rst:3662 msgid "" ":meth:`bytes.fromhex` now accepts ASCII :class:`bytes` and :term:`bytes-like " "objects ` as input." msgstr "" -#: ../../../library/stdtypes.rst:3390 +#: ../../../library/stdtypes.rst:3666 msgid "" "A reverse conversion function exists to transform a bytes object into its " "hexadecimal representation." msgstr "" -#: ../../../library/stdtypes.rst:3396 ../../../library/stdtypes.rst:3487 +#: ../../../library/stdtypes.rst:3672 ../../../library/stdtypes.rst:3763 msgid "" "Return a string object containing two hexadecimal digits for each byte in " "the instance." msgstr "" -#: ../../../library/stdtypes.rst:3402 +#: ../../../library/stdtypes.rst:3678 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, " @@ -4116,13 +4414,13 @@ msgid "" "the separator position from the right, negative values from the left." msgstr "" -#: ../../../library/stdtypes.rst:3419 +#: ../../../library/stdtypes.rst:3695 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:3423 +#: ../../../library/stdtypes.rst:3699 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 " @@ -4130,58 +4428,58 @@ msgid "" "and slicing will produce a string of length 1)" msgstr "" -#: ../../../library/stdtypes.rst:3428 +#: ../../../library/stdtypes.rst:3704 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:3436 +#: ../../../library/stdtypes.rst:3712 msgid "Bytearray Objects" msgstr "" -#: ../../../library/stdtypes.rst:3440 +#: ../../../library/stdtypes.rst:3716 msgid "" ":class:`bytearray` objects are a mutable counterpart to :class:`bytes` " "objects." msgstr "" -#: ../../../library/stdtypes.rst:3446 +#: ../../../library/stdtypes.rst:3722 msgid "" "There is no dedicated literal syntax for bytearray objects, instead they are " "always created by calling the constructor:" msgstr "" -#: ../../../library/stdtypes.rst:3449 +#: ../../../library/stdtypes.rst:3725 msgid "Creating an empty instance: ``bytearray()``" msgstr "" -#: ../../../library/stdtypes.rst:3450 +#: ../../../library/stdtypes.rst:3726 msgid "Creating a zero-filled instance with a given length: ``bytearray(10)``" msgstr "" -#: ../../../library/stdtypes.rst:3451 +#: ../../../library/stdtypes.rst:3727 msgid "From an iterable of integers: ``bytearray(range(20))``" msgstr "" -#: ../../../library/stdtypes.rst:3452 +#: ../../../library/stdtypes.rst:3728 msgid "" "Copying existing binary data via the buffer protocol: ``bytearray(b'Hi!')``" msgstr "" -#: ../../../library/stdtypes.rst:3454 +#: ../../../library/stdtypes.rst:3730 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:3458 +#: ../../../library/stdtypes.rst:3734 msgid "Also see the :ref:`bytearray ` built-in." msgstr "" -#: ../../../library/stdtypes.rst:3460 +#: ../../../library/stdtypes.rst:3736 msgid "" "Since 2 hexadecimal digits correspond precisely to a single byte, " "hexadecimal numbers are a commonly used format for describing binary data. " @@ -4189,77 +4487,77 @@ msgid "" "in that format:" msgstr "" -#: ../../../library/stdtypes.rst:3466 +#: ../../../library/stdtypes.rst:3742 msgid "" "This :class:`bytearray` class method returns a 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:3473 +#: ../../../library/stdtypes.rst:3749 msgid "" ":meth:`bytearray.fromhex` now skips all ASCII whitespace in the string, not " "just spaces." msgstr "" -#: ../../../library/stdtypes.rst:3477 +#: ../../../library/stdtypes.rst:3753 msgid "" ":meth:`bytearray.fromhex` now accepts ASCII :class:`bytes` and :term:`bytes-" "like objects ` as input." msgstr "" -#: ../../../library/stdtypes.rst:3481 +#: ../../../library/stdtypes.rst:3757 msgid "" "A reverse conversion function exists to transform a bytearray object into " "its hexadecimal representation." msgstr "" -#: ../../../library/stdtypes.rst:3495 +#: ../../../library/stdtypes.rst:3771 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:3502 +#: ../../../library/stdtypes.rst:3778 msgid "" "Resize the :class:`bytearray` to contain *size* bytes. *size* must be " "greater than or equal to 0." msgstr "" -#: ../../../library/stdtypes.rst:3505 +#: ../../../library/stdtypes.rst:3781 msgid "" "If the :class:`bytearray` needs to shrink, bytes beyond *size* are truncated." msgstr "" -#: ../../../library/stdtypes.rst:3507 +#: ../../../library/stdtypes.rst:3783 msgid "" "If the :class:`bytearray` needs to grow, all new bytes, those beyond *size*, " "will be set to null bytes." msgstr "" -#: ../../../library/stdtypes.rst:3511 +#: ../../../library/stdtypes.rst:3787 msgid "This is equivalent to:" msgstr "" -#: ../../../library/stdtypes.rst:3519 +#: ../../../library/stdtypes.rst:3795 msgid "Examples:" msgstr "" -#: ../../../library/stdtypes.rst:3534 +#: ../../../library/stdtypes.rst:3810 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:3538 +#: ../../../library/stdtypes.rst:3814 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:3541 +#: ../../../library/stdtypes.rst:3817 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 " @@ -4267,18 +4565,18 @@ msgid "" "func:`~bytearray.take_bytes` without a size." msgstr "" -#: ../../../library/stdtypes.rst:3548 +#: ../../../library/stdtypes.rst:3824 msgid "Taking all bytes is a zero-copy operation." msgstr "" -#: ../../../library/stdtypes.rst:3552 +#: ../../../library/stdtypes.rst:3828 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:3556 +#: ../../../library/stdtypes.rst:3832 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 " @@ -4286,7 +4584,7 @@ msgid "" "both indexing and slicing will produce a string of length 1)" msgstr "" -#: ../../../library/stdtypes.rst:3561 +#: ../../../library/stdtypes.rst:3837 msgid "" "The representation of bytearray objects uses the bytes literal format " "(``bytearray(b'...')``) since it is often more useful than e.g. " @@ -4294,17 +4592,17 @@ msgid "" "a list of integers using ``list(b)``." msgstr "" -#: ../../../library/stdtypes.rst:3568 +#: ../../../library/stdtypes.rst:3844 msgid "" "For detailed information on thread-safety guarantees for :class:`bytearray` " "objects, see :ref:`thread-safety-bytearray`." msgstr "" -#: ../../../library/stdtypes.rst:3575 +#: ../../../library/stdtypes.rst:3851 msgid "Bytes and Bytearray Operations" msgstr "" -#: ../../../library/stdtypes.rst:3580 +#: ../../../library/stdtypes.rst:3856 msgid "" "Both bytes and bytearray objects support the :ref:`common ` " "sequence operations. They interoperate not just with operands of the same " @@ -4313,104 +4611,104 @@ msgid "" "return type of the result may depend on the order of operands." msgstr "" -#: ../../../library/stdtypes.rst:3588 +#: ../../../library/stdtypes.rst:3864 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:3595 +#: ../../../library/stdtypes.rst:3871 msgid "and::" msgstr "" -#: ../../../library/stdtypes.rst:3600 +#: ../../../library/stdtypes.rst:3876 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:3605 +#: ../../../library/stdtypes.rst:3881 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:3608 +#: ../../../library/stdtypes.rst:3884 msgid "" "The following methods on bytes and bytearray objects can be used with " "arbitrary binary data." msgstr "" -#: ../../../library/stdtypes.rst:3614 +#: ../../../library/stdtypes.rst:3890 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:3618 ../../../library/stdtypes.rst:3723 -#: ../../../library/stdtypes.rst:3745 ../../../library/stdtypes.rst:3815 -#: ../../../library/stdtypes.rst:3828 +#: ../../../library/stdtypes.rst:3894 ../../../library/stdtypes.rst:3999 +#: ../../../library/stdtypes.rst:4021 ../../../library/stdtypes.rst:4091 +#: ../../../library/stdtypes.rst:4104 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:3621 +#: ../../../library/stdtypes.rst:3897 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:3624 ../../../library/stdtypes.rst:3735 -#: ../../../library/stdtypes.rst:3748 ../../../library/stdtypes.rst:3818 -#: ../../../library/stdtypes.rst:3831 +#: ../../../library/stdtypes.rst:3900 ../../../library/stdtypes.rst:4011 +#: ../../../library/stdtypes.rst:4024 ../../../library/stdtypes.rst:4094 +#: ../../../library/stdtypes.rst:4107 msgid "Also accept an integer in the range 0 to 255 as the subsequence." msgstr "" -#: ../../../library/stdtypes.rst:3631 +#: ../../../library/stdtypes.rst:3907 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:3640 +#: ../../../library/stdtypes.rst:3916 msgid "The *prefix* may be any :term:`bytes-like object`." msgstr "" -#: ../../../library/stdtypes.rst:3644 ../../../library/stdtypes.rst:3666 -#: ../../../library/stdtypes.rst:3800 ../../../library/stdtypes.rst:3896 -#: ../../../library/stdtypes.rst:3910 ../../../library/stdtypes.rst:3941 -#: ../../../library/stdtypes.rst:3955 ../../../library/stdtypes.rst:3998 -#: ../../../library/stdtypes.rst:4070 ../../../library/stdtypes.rst:4088 -#: ../../../library/stdtypes.rst:4116 ../../../library/stdtypes.rst:4255 -#: ../../../library/stdtypes.rst:4310 ../../../library/stdtypes.rst:4353 -#: ../../../library/stdtypes.rst:4374 ../../../library/stdtypes.rst:4396 -#: ../../../library/stdtypes.rst:4598 +#: ../../../library/stdtypes.rst:3920 ../../../library/stdtypes.rst:3942 +#: ../../../library/stdtypes.rst:4076 ../../../library/stdtypes.rst:4172 +#: ../../../library/stdtypes.rst:4186 ../../../library/stdtypes.rst:4217 +#: ../../../library/stdtypes.rst:4231 ../../../library/stdtypes.rst:4274 +#: ../../../library/stdtypes.rst:4346 ../../../library/stdtypes.rst:4364 +#: ../../../library/stdtypes.rst:4392 ../../../library/stdtypes.rst:4531 +#: ../../../library/stdtypes.rst:4586 ../../../library/stdtypes.rst:4629 +#: ../../../library/stdtypes.rst:4650 ../../../library/stdtypes.rst:4672 +#: ../../../library/stdtypes.rst:4874 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:3653 +#: ../../../library/stdtypes.rst:3929 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:3662 +#: ../../../library/stdtypes.rst:3938 msgid "The *suffix* may be any :term:`bytes-like object`." msgstr "" -#: ../../../library/stdtypes.rst:3675 +#: ../../../library/stdtypes.rst:3951 msgid "Return the bytes decoded to a :class:`str`." msgstr "" -#: ../../../library/stdtypes.rst:3680 +#: ../../../library/stdtypes.rst:3956 msgid "" "*errors* controls how decoding errors are handled. If ``'strict'`` (the " "default), a :exc:`UnicodeError` exception is raised. Other possible values " @@ -4418,21 +4716,21 @@ msgid "" "`codecs.register_error`. See :ref:`error-handlers` for details." msgstr "" -#: ../../../library/stdtypes.rst:3686 +#: ../../../library/stdtypes.rst:3962 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:3692 +#: ../../../library/stdtypes.rst:3968 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:3707 +#: ../../../library/stdtypes.rst:3983 msgid "" "Return ``True`` if the binary data ends with the specified *suffix*, " "otherwise return ``False``. *suffix* can also be a tuple of suffixes to " @@ -4440,11 +4738,11 @@ msgid "" "optional *end*, stop comparing at that position." msgstr "" -#: ../../../library/stdtypes.rst:3712 +#: ../../../library/stdtypes.rst:3988 msgid "The suffix(es) to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../../library/stdtypes.rst:3718 +#: ../../../library/stdtypes.rst:3994 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 " @@ -4452,20 +4750,20 @@ msgid "" "``-1`` if *sub* is not found." msgstr "" -#: ../../../library/stdtypes.rst:3728 +#: ../../../library/stdtypes.rst:4004 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:3742 +#: ../../../library/stdtypes.rst:4018 msgid "" "Like :meth:`~bytes.find`, but raise :exc:`ValueError` when the subsequence " "is not found." msgstr "" -#: ../../../library/stdtypes.rst:3755 +#: ../../../library/stdtypes.rst:4031 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 " @@ -4475,7 +4773,7 @@ msgid "" "method." msgstr "" -#: ../../../library/stdtypes.rst:3766 +#: ../../../library/stdtypes.rst:4042 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 " @@ -4483,7 +4781,7 @@ msgid "" "objects ` and have the same length." msgstr "" -#: ../../../library/stdtypes.rst:3777 +#: ../../../library/stdtypes.rst:4053 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 " @@ -4492,11 +4790,11 @@ msgid "" "by two empty bytes or bytearray objects." msgstr "" -#: ../../../library/stdtypes.rst:3784 ../../../library/stdtypes.rst:3845 +#: ../../../library/stdtypes.rst:4060 ../../../library/stdtypes.rst:4121 msgid "The separator to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../../library/stdtypes.rst:3790 +#: ../../../library/stdtypes.rst:4066 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 " @@ -4504,13 +4802,13 @@ msgid "" "are replaced." msgstr "" -#: ../../../library/stdtypes.rst:3795 +#: ../../../library/stdtypes.rst:4071 msgid "" "The subsequence to search for and its replacement may be any :term:`bytes-" "like object`." msgstr "" -#: ../../../library/stdtypes.rst:3810 +#: ../../../library/stdtypes.rst:4086 msgid "" "Return the highest index in the sequence where the subsequence *sub* is " "found, such that *sub* is contained within ``s[start:end]``. Optional " @@ -4518,13 +4816,13 @@ msgid "" "``-1`` on failure." msgstr "" -#: ../../../library/stdtypes.rst:3825 +#: ../../../library/stdtypes.rst:4101 msgid "" "Like :meth:`~bytes.rfind` but raises :exc:`ValueError` when the subsequence " "*sub* is not found." msgstr "" -#: ../../../library/stdtypes.rst:3838 +#: ../../../library/stdtypes.rst:4114 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 " @@ -4533,7 +4831,7 @@ msgid "" "followed by a copy of the original sequence." msgstr "" -#: ../../../library/stdtypes.rst:3851 +#: ../../../library/stdtypes.rst:4127 msgid "" "Return ``True`` if the binary data starts with the specified *prefix*, " "otherwise return ``False``. *prefix* can also be a tuple of prefixes to " @@ -4541,11 +4839,11 @@ msgid "" "optional *end*, stop comparing at that position." msgstr "" -#: ../../../library/stdtypes.rst:3856 +#: ../../../library/stdtypes.rst:4132 msgid "The prefix(es) to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../../library/stdtypes.rst:3862 +#: ../../../library/stdtypes.rst:4138 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 " @@ -4553,22 +4851,22 @@ msgid "" "object of length 256." msgstr "" -#: ../../../library/stdtypes.rst:3867 +#: ../../../library/stdtypes.rst:4143 msgid "" "You can use the :func:`bytes.maketrans` method to create a translation table." msgstr "" -#: ../../../library/stdtypes.rst:3870 +#: ../../../library/stdtypes.rst:4146 msgid "" "Set the *table* argument to ``None`` for translations that only delete " "characters::" msgstr "" -#: ../../../library/stdtypes.rst:3876 +#: ../../../library/stdtypes.rst:4152 msgid "*delete* is now supported as a keyword argument." msgstr "" -#: ../../../library/stdtypes.rst:3880 +#: ../../../library/stdtypes.rst:4156 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 " @@ -4577,7 +4875,7 @@ msgid "" "instead produce new objects." msgstr "" -#: ../../../library/stdtypes.rst:3889 +#: ../../../library/stdtypes.rst:4165 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). " @@ -4585,7 +4883,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../../library/stdtypes.rst:3903 +#: ../../../library/stdtypes.rst:4179 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). " @@ -4593,7 +4891,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../../library/stdtypes.rst:3917 +#: ../../../library/stdtypes.rst:4193 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 " @@ -4602,14 +4900,14 @@ msgid "" "not a prefix; rather, all combinations of its values are stripped::" msgstr "" -#: ../../../library/stdtypes.rst:3929 +#: ../../../library/stdtypes.rst:4205 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:3948 +#: ../../../library/stdtypes.rst:4224 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). " @@ -4617,7 +4915,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../../library/stdtypes.rst:3962 +#: ../../../library/stdtypes.rst:4238 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 " @@ -4627,7 +4925,7 @@ msgid "" "like :meth:`split` which is described in detail below." msgstr "" -#: ../../../library/stdtypes.rst:3974 +#: ../../../library/stdtypes.rst:4250 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 " @@ -4636,14 +4934,14 @@ msgid "" "not a suffix; rather, all combinations of its values are stripped::" msgstr "" -#: ../../../library/stdtypes.rst:3986 +#: ../../../library/stdtypes.rst:4262 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:4005 +#: ../../../library/stdtypes.rst:4281 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 " @@ -4652,7 +4950,7 @@ msgid "" "limit on the number of splits (all possible splits are made)." msgstr "" -#: ../../../library/stdtypes.rst:4011 +#: ../../../library/stdtypes.rst:4287 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',')`` " @@ -4663,7 +4961,7 @@ msgid "" "like object`." msgstr "" -#: ../../../library/stdtypes.rst:4030 +#: ../../../library/stdtypes.rst:4306 msgid "" "If *sep* is not specified or is ``None``, a different splitting algorithm is " "applied: runs of consecutive :meth:`ASCII whitespace ` are " @@ -4673,7 +4971,7 @@ msgid "" "ASCII whitespace without a specified separator returns ``[]``." msgstr "" -#: ../../../library/stdtypes.rst:4052 +#: ../../../library/stdtypes.rst:4328 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 " @@ -4683,13 +4981,13 @@ msgid "" "are stripped::" msgstr "" -#: ../../../library/stdtypes.rst:4065 +#: ../../../library/stdtypes.rst:4341 msgid "" "The binary sequence of byte values to remove may be any :term:`bytes-like " "object`." msgstr "" -#: ../../../library/stdtypes.rst:4074 +#: ../../../library/stdtypes.rst:4350 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 " @@ -4697,14 +4995,14 @@ msgid "" "operate in place, and instead produce new objects." msgstr "" -#: ../../../library/stdtypes.rst:4082 +#: ../../../library/stdtypes.rst:4358 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:4095 +#: ../../../library/stdtypes.rst:4371 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 " @@ -4720,7 +5018,7 @@ msgid "" "by one regardless of how the byte value is represented when printed::" msgstr "" -#: ../../../library/stdtypes.rst:4123 +#: ../../../library/stdtypes.rst:4399 msgid "" "Return ``True`` if all bytes in the sequence are alphabetical ASCII " "characters or ASCII decimal digits and the sequence is not empty, ``False`` " @@ -4729,7 +5027,7 @@ msgid "" "digits are those byte values in the sequence ``b'0123456789'``." msgstr "" -#: ../../../library/stdtypes.rst:4140 +#: ../../../library/stdtypes.rst:4416 msgid "" "Return ``True`` if all bytes in the sequence are alphabetic ASCII characters " "and the sequence is not empty, ``False`` otherwise. Alphabetic ASCII " @@ -4737,35 +5035,35 @@ msgid "" "``b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'``." msgstr "" -#: ../../../library/stdtypes.rst:4156 +#: ../../../library/stdtypes.rst:4432 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:4166 +#: ../../../library/stdtypes.rst:4442 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:4181 +#: ../../../library/stdtypes.rst:4457 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:4191 ../../../library/stdtypes.rst:4233 -#: ../../../library/stdtypes.rst:4249 ../../../library/stdtypes.rst:4299 -#: ../../../library/stdtypes.rst:4368 +#: ../../../library/stdtypes.rst:4467 ../../../library/stdtypes.rst:4509 +#: ../../../library/stdtypes.rst:4525 ../../../library/stdtypes.rst:4575 +#: ../../../library/stdtypes.rst:4644 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:4199 +#: ../../../library/stdtypes.rst:4475 msgid "" "Return ``True`` if all bytes in the sequence are ASCII whitespace and the " "sequence is not empty, ``False`` otherwise. ASCII whitespace characters are " @@ -4773,27 +5071,27 @@ msgid "" "newline, carriage return, vertical tab, form feed)." msgstr "" -#: ../../../library/stdtypes.rst:4208 +#: ../../../library/stdtypes.rst:4484 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:4223 +#: ../../../library/stdtypes.rst:4499 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:4241 +#: ../../../library/stdtypes.rst:4517 msgid "" "Return a copy of the sequence with all the uppercase ASCII characters " "converted to their corresponding lowercase counterpart." msgstr "" -#: ../../../library/stdtypes.rst:4266 +#: ../../../library/stdtypes.rst:4542 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 " @@ -4801,20 +5099,20 @@ msgid "" "*keepends* is given and true." msgstr "" -#: ../../../library/stdtypes.rst:4278 +#: ../../../library/stdtypes.rst:4554 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:4291 +#: ../../../library/stdtypes.rst:4567 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:4303 +#: ../../../library/stdtypes.rst:4579 msgid "" "Unlike :func:`str.swapcase`, it is always the case that ``bin.swapcase()." "swapcase() == bin`` for the binary versions. Case conversions are " @@ -4822,14 +5120,14 @@ msgid "" "Unicode code points." msgstr "" -#: ../../../library/stdtypes.rst:4317 +#: ../../../library/stdtypes.rst:4593 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:4326 +#: ../../../library/stdtypes.rst:4602 msgid "" "Lowercase ASCII characters are those byte values in the sequence " "``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte " @@ -4837,18 +5135,18 @@ msgid "" "values are uncased." msgstr "" -#: ../../../library/stdtypes.rst:4339 +#: ../../../library/stdtypes.rst:4615 msgid "" "A workaround for apostrophes can be constructed using regular expressions::" msgstr "" -#: ../../../library/stdtypes.rst:4360 +#: ../../../library/stdtypes.rst:4636 msgid "" "Return a copy of the sequence with all the lowercase ASCII characters " "converted to their corresponding uppercase counterpart." msgstr "" -#: ../../../library/stdtypes.rst:4381 +#: ../../../library/stdtypes.rst:4657 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 " @@ -4857,11 +5155,11 @@ msgid "" "*width* is less than or equal to ``len(seq)``." msgstr "" -#: ../../../library/stdtypes.rst:4403 +#: ../../../library/stdtypes.rst:4679 msgid "``printf``-style Bytes Formatting" msgstr "" -#: ../../../library/stdtypes.rst:4420 +#: ../../../library/stdtypes.rst:4696 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 " @@ -4869,7 +5167,7 @@ msgid "" "dictionary, wrap it in a tuple." msgstr "" -#: ../../../library/stdtypes.rst:4425 +#: ../../../library/stdtypes.rst:4701 msgid "" "Bytes objects (``bytes``/``bytearray``) have one unique built-in operation: " "the ``%`` operator (modulo). This is also known as the bytes *formatting* or " @@ -4879,7 +5177,7 @@ msgid "" "func:`sprintf` function in the C language." msgstr "" -#: ../../../library/stdtypes.rst:4432 +#: ../../../library/stdtypes.rst:4708 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 " @@ -4887,7 +5185,7 @@ msgid "" "example, a dictionary)." msgstr "" -#: ../../../library/stdtypes.rst:4466 +#: ../../../library/stdtypes.rst:4742 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 " @@ -4895,77 +5193,77 @@ msgid "" "mapping key selects the value to be formatted from the mapping. For example:" msgstr "" -#: ../../../library/stdtypes.rst:4518 +#: ../../../library/stdtypes.rst:4794 msgid "\\(8)" msgstr "" -#: ../../../library/stdtypes.rst:4540 +#: ../../../library/stdtypes.rst:4816 msgid "Single byte (accepts integer or single byte objects)." msgstr "" -#: ../../../library/stdtypes.rst:4543 +#: ../../../library/stdtypes.rst:4819 msgid "``'b'``" msgstr "" -#: ../../../library/stdtypes.rst:4543 +#: ../../../library/stdtypes.rst:4819 msgid "" "Bytes (any object that follows the :ref:`buffer protocol ` or " "has :meth:`~object.__bytes__`)." msgstr "" -#: ../../../library/stdtypes.rst:4547 +#: ../../../library/stdtypes.rst:4823 msgid "" "``'s'`` is an alias for ``'b'`` and should only be used for Python2/3 code " "bases." msgstr "" -#: ../../../library/stdtypes.rst:4550 +#: ../../../library/stdtypes.rst:4826 msgid "" "Bytes (converts any Python object using ``repr(obj).encode('ascii', " "'backslashreplace')``)." msgstr "" -#: ../../../library/stdtypes.rst:4553 +#: ../../../library/stdtypes.rst:4829 msgid "" "``'r'`` is an alias for ``'a'`` and should only be used for Python2/3 code " "bases." msgstr "" -#: ../../../library/stdtypes.rst:4553 +#: ../../../library/stdtypes.rst:4829 msgid "\\(7)" msgstr "" -#: ../../../library/stdtypes.rst:4588 +#: ../../../library/stdtypes.rst:4864 msgid "``b'%s'`` is deprecated, but will not be removed during the 3.x series." msgstr "" -#: ../../../library/stdtypes.rst:4591 +#: ../../../library/stdtypes.rst:4867 msgid "``b'%r'`` is deprecated, but will not be removed during the 3.x series." msgstr "" -#: ../../../library/stdtypes.rst:4603 +#: ../../../library/stdtypes.rst:4879 msgid ":pep:`461` - Adding % formatting to bytes and bytearray" msgstr "" -#: ../../../library/stdtypes.rst:4610 +#: ../../../library/stdtypes.rst:4886 msgid "Memory Views" msgstr "" -#: ../../../library/stdtypes.rst:4612 +#: ../../../library/stdtypes.rst:4888 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:4618 +#: ../../../library/stdtypes.rst:4894 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:4622 +#: ../../../library/stdtypes.rst:4898 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 " @@ -4973,38 +5271,38 @@ msgid "" "other types such as :class:`array.array` may have bigger elements." msgstr "" -#: ../../../library/stdtypes.rst:4627 +#: ../../../library/stdtypes.rst:4903 msgid "" ":class:`!memoryview`\\s are :ref:`generic ` over the type of their " "underlying data." msgstr "" -#: ../../../library/stdtypes.rst:4630 +#: ../../../library/stdtypes.rst:4906 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:4634 +#: ../../../library/stdtypes.rst:4910 msgid "" "If ``view.ndim == 0``, ``len(view)`` now raises :exc:`TypeError` instead of " "returning 1." msgstr "" -#: ../../../library/stdtypes.rst:4637 +#: ../../../library/stdtypes.rst:4913 msgid "" "The :class:`~memoryview.itemsize` attribute will give you the number of " "bytes in a single element." msgstr "" -#: ../../../library/stdtypes.rst:4640 +#: ../../../library/stdtypes.rst:4916 msgid "" "A :class:`memoryview` supports slicing and indexing to expose its data. One-" "dimensional slicing will result in a subview::" msgstr "" -#: ../../../library/stdtypes.rst:4653 +#: ../../../library/stdtypes.rst:4929 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 " @@ -5015,86 +5313,86 @@ msgid "" "memoryviews can be indexed with the empty tuple." msgstr "" -#: ../../../library/stdtypes.rst:4662 +#: ../../../library/stdtypes.rst:4938 msgid "Here is an example with a non-byte format::" msgstr "" -#: ../../../library/stdtypes.rst:4674 +#: ../../../library/stdtypes.rst:4950 msgid "" "If the underlying object is writable, the memoryview supports one-" "dimensional slice assignment. Resizing is not allowed::" msgstr "" -#: ../../../library/stdtypes.rst:4695 +#: ../../../library/stdtypes.rst:4971 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:4707 +#: ../../../library/stdtypes.rst:4983 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:4711 +#: ../../../library/stdtypes.rst:4987 msgid "" "memoryview is now registered automatically with :class:`collections.abc." "Sequence`" msgstr "" -#: ../../../library/stdtypes.rst:4715 +#: ../../../library/stdtypes.rst:4991 msgid "memoryviews can now be indexed with a tuple of integers." msgstr "" -#: ../../../library/stdtypes.rst:4718 +#: ../../../library/stdtypes.rst:4994 msgid "memoryview is now a :term:`generic type`." msgstr "" -#: ../../../library/stdtypes.rst:4721 +#: ../../../library/stdtypes.rst:4997 msgid ":class:`memoryview` has several methods:" msgstr "" -#: ../../../library/stdtypes.rst:4725 +#: ../../../library/stdtypes.rst:5001 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:4729 +#: ../../../library/stdtypes.rst:5005 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:4748 +#: ../../../library/stdtypes.rst:5024 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:4764 +#: ../../../library/stdtypes.rst:5040 msgid "" "Note that, as with floating-point numbers, ``v is w`` does *not* imply ``v " "== w`` for memoryview objects." msgstr "" -#: ../../../library/stdtypes.rst:4767 +#: ../../../library/stdtypes.rst:5043 msgid "" "Previous versions compared the raw memory disregarding the item format and " "the logical array structure." msgstr "" -#: ../../../library/stdtypes.rst:4773 +#: ../../../library/stdtypes.rst:5049 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:4782 +#: ../../../library/stdtypes.rst:5058 msgid "" "For non-contiguous arrays the result is equal to the flattened list " "representation with all elements converted to bytes. :meth:`tobytes` " @@ -5102,7 +5400,7 @@ msgid "" "module syntax." msgstr "" -#: ../../../library/stdtypes.rst:4787 +#: ../../../library/stdtypes.rst:5063 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' " @@ -5111,36 +5409,36 @@ msgid "" "to C first. *order=None* is the same as *order='C'*." msgstr "" -#: ../../../library/stdtypes.rst:4797 +#: ../../../library/stdtypes.rst:5073 msgid "" "Return a string object containing two hexadecimal digits for each byte in " "the buffer. ::" msgstr "" -#: ../../../library/stdtypes.rst:4806 +#: ../../../library/stdtypes.rst:5082 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:4813 +#: ../../../library/stdtypes.rst:5089 msgid "Return the data in the buffer as a list of elements. ::" msgstr "" -#: ../../../library/stdtypes.rst:4823 +#: ../../../library/stdtypes.rst:5099 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:4830 +#: ../../../library/stdtypes.rst:5106 msgid "" "Return a readonly version of the memoryview object. The original memoryview " "object is unchanged. ::" msgstr "" -#: ../../../library/stdtypes.rst:4849 +#: ../../../library/stdtypes.rst:5125 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 :" @@ -5149,20 +5447,20 @@ msgid "" "resources) as soon as possible." msgstr "" -#: ../../../library/stdtypes.rst:4855 +#: ../../../library/stdtypes.rst:5131 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:4866 +#: ../../../library/stdtypes.rst:5142 msgid "" "The context management protocol can be used for a similar effect, using the " "``with`` statement::" msgstr "" -#: ../../../library/stdtypes.rst:4883 +#: ../../../library/stdtypes.rst:5159 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 " @@ -5171,7 +5469,7 @@ msgid "" "> 1D, and F-contiguous -> 1D." msgstr "" -#: ../../../library/stdtypes.rst:4890 +#: ../../../library/stdtypes.rst:5166 msgid "" "With a multidimensional *shape*, *order* selects the memory layout of the " "result: ``'C'`` for C-contiguous (row-major, the default) or ``'F'`` for " @@ -5179,7 +5477,7 @@ msgid "" "``order='F'`` gives a zero-copy view over a buffer holding column-major data." msgstr "" -#: ../../../library/stdtypes.rst:4896 +#: ../../../library/stdtypes.rst:5172 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 " @@ -5187,78 +5485,78 @@ msgid "" "Note that all byte lengths may depend on the operating system." msgstr "" -#: ../../../library/stdtypes.rst:4902 +#: ../../../library/stdtypes.rst:5178 msgid "Cast 1D/long to 1D/unsigned bytes::" msgstr "" -#: ../../../library/stdtypes.rst:4925 +#: ../../../library/stdtypes.rst:5201 msgid "Cast 1D/unsigned bytes to 1D/char::" msgstr "" -#: ../../../library/stdtypes.rst:4938 +#: ../../../library/stdtypes.rst:5214 msgid "Cast 1D/bytes to 3D/ints to 1D/signed char::" msgstr "" -#: ../../../library/stdtypes.rst:4964 +#: ../../../library/stdtypes.rst:5240 msgid "Cast 1D/unsigned long to 2D/unsigned long::" msgstr "" -#: ../../../library/stdtypes.rst:4978 +#: ../../../library/stdtypes.rst:5254 msgid "The source format is no longer restricted when casting to a byte view." msgstr "" -#: ../../../library/stdtypes.rst:4981 +#: ../../../library/stdtypes.rst:5257 msgid "" "Casting a multi-dimensional F-contiguous view to a one-dimensional view is " "now supported." msgstr "" -#: ../../../library/stdtypes.rst:4987 +#: ../../../library/stdtypes.rst:5263 msgid "Count the number of occurrences of *value*." msgstr "" -#: ../../../library/stdtypes.rst:4993 +#: ../../../library/stdtypes.rst:5269 msgid "" "Return the index of the first occurrence of *value* (at or after index " "*start* and before index *stop*)." msgstr "" -#: ../../../library/stdtypes.rst:4996 +#: ../../../library/stdtypes.rst:5272 msgid "Raises a :exc:`ValueError` if *value* cannot be found." msgstr "" -#: ../../../library/stdtypes.rst:5000 +#: ../../../library/stdtypes.rst:5276 msgid "There are also several readonly attributes available:" msgstr "" -#: ../../../library/stdtypes.rst:5004 +#: ../../../library/stdtypes.rst:5280 msgid "The underlying object of the memoryview::" msgstr "" -#: ../../../library/stdtypes.rst:5015 +#: ../../../library/stdtypes.rst:5291 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:5034 +#: ../../../library/stdtypes.rst:5310 msgid "Multi-dimensional arrays::" msgstr "" -#: ../../../library/stdtypes.rst:5047 +#: ../../../library/stdtypes.rst:5323 msgid "Interpret a flat buffer as a Fortran-contiguous (column-major) array::" msgstr "" -#: ../../../library/stdtypes.rst:5058 +#: ../../../library/stdtypes.rst:5334 msgid "Added the *order* parameter." msgstr "" -#: ../../../library/stdtypes.rst:5063 +#: ../../../library/stdtypes.rst:5339 msgid "A bool indicating whether the memory is read only." msgstr "" -#: ../../../library/stdtypes.rst:5067 +#: ../../../library/stdtypes.rst:5343 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 " @@ -5266,75 +5564,76 @@ msgid "" "restricted to native single element formats." msgstr "" -#: ../../../library/stdtypes.rst:5072 +#: ../../../library/stdtypes.rst:5348 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:5078 +#: ../../../library/stdtypes.rst:5354 msgid "The size in bytes of each element of the memoryview::" msgstr "" -#: ../../../library/stdtypes.rst:5091 +#: ../../../library/stdtypes.rst:5367 msgid "" "An integer indicating how many dimensions of a multi-dimensional array the " "memory represents." msgstr "" -#: ../../../library/stdtypes.rst:5096 +#: ../../../library/stdtypes.rst:5372 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:5099 ../../../library/stdtypes.rst:5107 +#: ../../../library/stdtypes.rst:5375 ../../../library/stdtypes.rst:5383 msgid "An empty tuple instead of ``None`` when ndim = 0." msgstr "" -#: ../../../library/stdtypes.rst:5104 +#: ../../../library/stdtypes.rst:5380 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:5112 +#: ../../../library/stdtypes.rst:5388 msgid "Used internally for PIL-style arrays. The value is informational only." msgstr "" -#: ../../../library/stdtypes.rst:5116 +#: ../../../library/stdtypes.rst:5392 msgid "A bool indicating whether the memory is C-:term:`contiguous`." msgstr "" -#: ../../../library/stdtypes.rst:5122 +#: ../../../library/stdtypes.rst:5398 msgid "A bool indicating whether the memory is Fortran :term:`contiguous`." msgstr "" -#: ../../../library/stdtypes.rst:5128 +#: ../../../library/stdtypes.rst:5404 msgid "A bool indicating whether the memory is :term:`contiguous`." msgstr "" -#: ../../../library/stdtypes.rst:5132 +#: ../../../library/stdtypes.rst:5408 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:5139 +#: ../../../library/stdtypes.rst:5415 msgid "Set Types --- :class:`set`, :class:`frozenset`" msgstr "" -#: ../../../library/stdtypes.rst:5143 +#: ../../../library/stdtypes.rst:5419 msgid "" "A :dfn:`set` object is an unordered collection of distinct :term:`hashable` " "objects. Common uses include membership testing, removing duplicates from a " "sequence, and computing mathematical operations such as intersection, union, " "difference, and symmetric difference. (For other containers see the built-" "in :class:`dict`, :class:`list`, and :class:`tuple` classes, and the :mod:" -"`collections` module.)" +"`collections` module.) See :ref:`time-complexity` for the costs of the " +"various set operations." msgstr "" -#: ../../../library/stdtypes.rst:5150 +#: ../../../library/stdtypes.rst:5427 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 " @@ -5342,7 +5641,7 @@ msgid "" "slicing, or other sequence-like behavior." msgstr "" -#: ../../../library/stdtypes.rst:5155 +#: ../../../library/stdtypes.rst:5432 msgid "" "There are currently two built-in set types, :class:`set` and :class:" "`frozenset`. The :class:`set` type is mutable --- the contents can be " @@ -5354,18 +5653,18 @@ msgid "" "of another set." msgstr "" -#: ../../../library/stdtypes.rst:5164 +#: ../../../library/stdtypes.rst:5441 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:5168 +#: ../../../library/stdtypes.rst:5445 msgid "The constructors for both classes work the same:" msgstr "" -#: ../../../library/stdtypes.rst:5173 +#: ../../../library/stdtypes.rst:5450 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 " @@ -5373,92 +5672,92 @@ msgid "" "*iterable* is not specified, a new empty set is returned." msgstr "" -#: ../../../library/stdtypes.rst:5179 +#: ../../../library/stdtypes.rst:5456 msgid "Sets can be created by several means:" msgstr "" -#: ../../../library/stdtypes.rst:5181 +#: ../../../library/stdtypes.rst:5458 msgid "" "Use a comma-separated list of elements within braces: ``{'jack', 'sjoerd'}``" msgstr "" -#: ../../../library/stdtypes.rst:5182 +#: ../../../library/stdtypes.rst:5459 msgid "" "Use a set comprehension: ``{c for c in 'abracadabra' if c not in 'abc'}``" msgstr "" -#: ../../../library/stdtypes.rst:5183 +#: ../../../library/stdtypes.rst:5460 msgid "" "Use the type constructor: ``set()``, ``set('foobar')``, ``set(['a', 'b', " "'foo'])``" msgstr "" -#: ../../../library/stdtypes.rst:5185 +#: ../../../library/stdtypes.rst:5462 msgid "" "Instances of :class:`set` and :class:`frozenset` provide the following " "operations:" msgstr "" -#: ../../../library/stdtypes.rst:5190 +#: ../../../library/stdtypes.rst:5467 msgid "Return the number of elements in set *s* (cardinality of *s*)." msgstr "" -#: ../../../library/stdtypes.rst:5194 +#: ../../../library/stdtypes.rst:5471 msgid "Test *x* for membership in *s*." msgstr "" -#: ../../../library/stdtypes.rst:5198 +#: ../../../library/stdtypes.rst:5475 msgid "Test *x* for non-membership in *s*." msgstr "" -#: ../../../library/stdtypes.rst:5203 +#: ../../../library/stdtypes.rst:5480 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:5210 +#: ../../../library/stdtypes.rst:5487 msgid "Test whether every element in the set is in *other*." msgstr "" -#: ../../../library/stdtypes.rst:5214 +#: ../../../library/stdtypes.rst:5491 msgid "" "Test whether the set is a proper subset of *other*, that is, ``set <= other " "and set != other``." msgstr "" -#: ../../../library/stdtypes.rst:5221 +#: ../../../library/stdtypes.rst:5498 msgid "Test whether every element in *other* is in the set." msgstr "" -#: ../../../library/stdtypes.rst:5225 +#: ../../../library/stdtypes.rst:5502 msgid "" "Test whether the set is a proper superset of *other*, that is, ``set >= " "other and set != other``." msgstr "" -#: ../../../library/stdtypes.rst:5232 +#: ../../../library/stdtypes.rst:5509 msgid "Return a new set with elements from the set and all others." msgstr "" -#: ../../../library/stdtypes.rst:5238 +#: ../../../library/stdtypes.rst:5515 msgid "Return a new set with elements common to the set and all others." msgstr "" -#: ../../../library/stdtypes.rst:5244 +#: ../../../library/stdtypes.rst:5521 msgid "Return a new set with elements in the set that are not in the others." msgstr "" -#: ../../../library/stdtypes.rst:5250 +#: ../../../library/stdtypes.rst:5527 msgid "" "Return a new set with elements in either the set or *other* but not both." msgstr "" -#: ../../../library/stdtypes.rst:5255 +#: ../../../library/stdtypes.rst:5532 msgid "Return a shallow copy of the set." msgstr "" -#: ../../../library/stdtypes.rst:5258 +#: ../../../library/stdtypes.rst:5535 msgid "" "Note, the non-operator versions of :meth:`~frozenset.union`, :meth:" "`~frozenset.intersection`, :meth:`~frozenset.difference`, :meth:`~frozenset." @@ -5469,7 +5768,7 @@ msgid "" "the more readable ``set('abc').intersection('cbs')``." msgstr "" -#: ../../../library/stdtypes.rst:5265 +#: ../../../library/stdtypes.rst:5542 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 " @@ -5479,14 +5778,14 @@ msgid "" "set is a proper superset of the second set (is a superset, but is not equal)." msgstr "" -#: ../../../library/stdtypes.rst:5272 +#: ../../../library/stdtypes.rst:5549 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:5276 +#: ../../../library/stdtypes.rst:5553 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 " @@ -5494,78 +5793,78 @@ msgid "" "``ab``." msgstr "" -#: ../../../library/stdtypes.rst:5281 +#: ../../../library/stdtypes.rst:5558 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:5284 +#: ../../../library/stdtypes.rst:5561 msgid "Set elements, like dictionary keys, must be :term:`hashable`." msgstr "" -#: ../../../library/stdtypes.rst:5286 +#: ../../../library/stdtypes.rst:5563 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:5290 +#: ../../../library/stdtypes.rst:5567 msgid "" "The following table lists operations available for :class:`set` that do not " "apply to immutable instances of :class:`frozenset`:" msgstr "" -#: ../../../library/stdtypes.rst:5296 +#: ../../../library/stdtypes.rst:5573 msgid "Update the set, adding elements from all others." msgstr "" -#: ../../../library/stdtypes.rst:5301 +#: ../../../library/stdtypes.rst:5578 msgid "Update the set, keeping only elements found in it and all others." msgstr "" -#: ../../../library/stdtypes.rst:5306 +#: ../../../library/stdtypes.rst:5583 msgid "Update the set, removing elements found in others." msgstr "" -#: ../../../library/stdtypes.rst:5311 +#: ../../../library/stdtypes.rst:5588 msgid "" "Update the set, keeping only elements found in either set, but not in both." msgstr "" -#: ../../../library/stdtypes.rst:5315 +#: ../../../library/stdtypes.rst:5592 msgid "Add element *elem* to the set." msgstr "" -#: ../../../library/stdtypes.rst:5319 +#: ../../../library/stdtypes.rst:5596 msgid "" "Remove element *elem* from the set. Raises :exc:`KeyError` if *elem* is not " "contained in the set." msgstr "" -#: ../../../library/stdtypes.rst:5324 +#: ../../../library/stdtypes.rst:5601 msgid "Remove element *elem* from the set if it is present." msgstr "" -#: ../../../library/stdtypes.rst:5328 +#: ../../../library/stdtypes.rst:5605 msgid "" "Remove and return an arbitrary element from the set. Raises :exc:`KeyError` " "if the set is empty." msgstr "" -#: ../../../library/stdtypes.rst:5333 +#: ../../../library/stdtypes.rst:5610 msgid "Remove all elements from the set." msgstr "" -#: ../../../library/stdtypes.rst:5336 +#: ../../../library/stdtypes.rst:5613 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:5341 +#: ../../../library/stdtypes.rst:5618 msgid "" "Note, the *elem* argument to the :meth:`~object.__contains__`, :meth:`~set." "remove`, and :meth:`~set.discard` methods may be a set. To support " @@ -5573,31 +5872,33 @@ msgid "" "*elem*." msgstr "" -#: ../../../library/stdtypes.rst:5346 +#: ../../../library/stdtypes.rst:5623 msgid "" "Sets and frozensets are :ref:`generic ` over the type of their " "elements." msgstr "" -#: ../../../library/stdtypes.rst:5350 +#: ../../../library/stdtypes.rst:5627 msgid "" "For detailed information on thread-safety guarantees for :class:`set` " "objects, see :ref:`thread-safety-set`." msgstr "" -#: ../../../library/stdtypes.rst:5357 +#: ../../../library/stdtypes.rst:5634 msgid "Mapping types --- :class:`!dict`, :class:`!frozendict`" msgstr "" -#: ../../../library/stdtypes.rst:5367 +#: ../../../library/stdtypes.rst:5644 msgid "" "A :term:`mapping` object maps :term:`hashable` values to arbitrary objects. " "There are currently two standard mapping types, the :dfn:`dictionary` and :" "class:`frozendict`. (For other containers see the built-in :class:`list`, :" -"class:`set`, and :class:`tuple` classes, and the :mod:`collections` module.)" +"class:`set`, and :class:`tuple` classes, and the :mod:`collections` module.) " +"See :ref:`time-complexity` for the costs of the various dictionary " +"operations." msgstr "" -#: ../../../library/stdtypes.rst:5374 +#: ../../../library/stdtypes.rst:5653 msgid "" "A dictionary's keys are *almost* arbitrary values. Values that are not :" "term:`hashable`, that is, values containing lists, dictionaries or other " @@ -5606,33 +5907,33 @@ msgid "" "and ``True``) can be used interchangeably to index the same dictionary entry." msgstr "" -#: ../../../library/stdtypes.rst:5385 +#: ../../../library/stdtypes.rst:5664 msgid "" "Return a new dictionary initialized from an optional positional argument and " "a possibly empty set of keyword arguments." msgstr "" -#: ../../../library/stdtypes.rst:5388 +#: ../../../library/stdtypes.rst:5667 msgid "Dictionaries can be created by several means:" msgstr "" -#: ../../../library/stdtypes.rst:5390 +#: ../../../library/stdtypes.rst:5669 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:5392 +#: ../../../library/stdtypes.rst:5671 msgid "Use a dict comprehension: ``{}``, ``{x: x ** 2 for x in range(10)}``" msgstr "" -#: ../../../library/stdtypes.rst:5393 +#: ../../../library/stdtypes.rst:5672 msgid "" "Use the type constructor: ``dict()``, ``dict([('foo', 100), ('bar', " "200)])``, ``dict(foo=100, bar=200)``" msgstr "" -#: ../../../library/stdtypes.rst:5396 +#: ../../../library/stdtypes.rst:5675 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 " @@ -5645,7 +5946,7 @@ msgid "" "that key becomes the corresponding value in the new dictionary." msgstr "" -#: ../../../library/stdtypes.rst:5406 +#: ../../../library/stdtypes.rst:5685 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 " @@ -5653,7 +5954,7 @@ msgid "" "the value from the positional argument." msgstr "" -#: ../../../library/stdtypes.rst:5411 +#: ../../../library/stdtypes.rst:5690 msgid "" "Dictionaries compare equal if and only if they have the same ``(key, " "value)`` pairs (regardless of ordering). Order comparisons ('<', '<=', '>=', " @@ -5662,51 +5963,51 @@ msgid "" "``{\"one\": 1, \"two\": 2, \"three\": 3}``::" msgstr "" -#: ../../../library/stdtypes.rst:5426 +#: ../../../library/stdtypes.rst:5705 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:5429 +#: ../../../library/stdtypes.rst:5708 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:5447 +#: ../../../library/stdtypes.rst:5726 msgid "" "Dictionary order is guaranteed to be insertion order. This behavior was an " "implementation detail of CPython from 3.6." msgstr "" -#: ../../../library/stdtypes.rst:5451 +#: ../../../library/stdtypes.rst:5730 msgid "" "Dictionaries are :ref:`generic ` over two types, signifying " "(respectively) the types of the dictionary's keys and values." msgstr "" -#: ../../../library/stdtypes.rst:5454 +#: ../../../library/stdtypes.rst:5733 msgid "" "These are the operations that dictionaries support (and therefore, custom " "mapping types should support too):" msgstr "" -#: ../../../library/stdtypes.rst:5459 +#: ../../../library/stdtypes.rst:5738 msgid "Return a list of all the keys used in the dictionary *d*." msgstr "" -#: ../../../library/stdtypes.rst:5463 +#: ../../../library/stdtypes.rst:5742 msgid "Return the number of items in the dictionary *d*." msgstr "" -#: ../../../library/stdtypes.rst:5467 +#: ../../../library/stdtypes.rst:5746 msgid "" "Return the item of *d* with key *key*. Raises a :exc:`KeyError` if *key* is " "not in the map." msgstr "" -#: ../../../library/stdtypes.rst:5472 +#: ../../../library/stdtypes.rst:5751 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 " @@ -5717,51 +6018,51 @@ msgid "" "__missing__` must be a method; it cannot be an instance variable::" msgstr "" -#: ../../../library/stdtypes.rst:5491 +#: ../../../library/stdtypes.rst:5770 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:5498 +#: ../../../library/stdtypes.rst:5777 msgid "Set ``d[key]`` to *value*." msgstr "" -#: ../../../library/stdtypes.rst:5502 +#: ../../../library/stdtypes.rst:5781 msgid "" "Remove ``d[key]`` from *d*. Raises a :exc:`KeyError` if *key* is not in the " "map." msgstr "" -#: ../../../library/stdtypes.rst:5507 +#: ../../../library/stdtypes.rst:5786 msgid "Return ``True`` if *d* has a key *key*, else ``False``." msgstr "" -#: ../../../library/stdtypes.rst:5511 +#: ../../../library/stdtypes.rst:5790 msgid "Equivalent to ``not key in d``." msgstr "" -#: ../../../library/stdtypes.rst:5515 +#: ../../../library/stdtypes.rst:5794 msgid "" "Return an iterator over the keys of the dictionary. This is a shortcut for " "``iter(d.keys())``." msgstr "" -#: ../../../library/stdtypes.rst:5520 +#: ../../../library/stdtypes.rst:5799 msgid "Remove all items from the dictionary." msgstr "" -#: ../../../library/stdtypes.rst:5524 +#: ../../../library/stdtypes.rst:5803 msgid "Return a shallow copy of the dictionary." msgstr "" -#: ../../../library/stdtypes.rst:5528 +#: ../../../library/stdtypes.rst:5807 msgid "" "Create a new dictionary with keys from *iterable* and values set to *value*." msgstr "" -#: ../../../library/stdtypes.rst:5530 +#: ../../../library/stdtypes.rst:5809 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 " @@ -5770,70 +6071,70 @@ msgid "" "` instead." msgstr "" -#: ../../../library/stdtypes.rst:5538 +#: ../../../library/stdtypes.rst:5817 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:5544 +#: ../../../library/stdtypes.rst:5823 msgid "" "Return a new view of the dictionary's items (``(key, value)`` pairs). See " "the :ref:`documentation of view objects `." msgstr "" -#: ../../../library/stdtypes.rst:5549 +#: ../../../library/stdtypes.rst:5828 msgid "" "Return a new view of the dictionary's keys. See the :ref:`documentation of " "view objects `." msgstr "" -#: ../../../library/stdtypes.rst:5555 +#: ../../../library/stdtypes.rst:5834 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:5561 +#: ../../../library/stdtypes.rst:5840 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:5564 +#: ../../../library/stdtypes.rst:5843 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:5568 +#: ../../../library/stdtypes.rst:5847 msgid "" "LIFO order is now guaranteed. In prior versions, :meth:`popitem` would " "return an arbitrary key/value pair." msgstr "" -#: ../../../library/stdtypes.rst:5574 +#: ../../../library/stdtypes.rst:5853 msgid "" "Return a reverse iterator over the keys of the dictionary. This is a " "shortcut for ``reversed(d.keys())``." msgstr "" -#: ../../../library/stdtypes.rst:5581 +#: ../../../library/stdtypes.rst:5860 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:5589 +#: ../../../library/stdtypes.rst:5868 msgid "" "Update the dictionary with the key/value pairs from *mapping* or *iterable* " "and *kwargs*, overwriting existing keys. Return ``None``." msgstr "" -#: ../../../library/stdtypes.rst:5592 +#: ../../../library/stdtypes.rst:5871 msgid "" ":meth:`update` accepts either another object with a ``keys()`` method (in " "which case :meth:`~object.__getitem__` is called with every key returned " @@ -5842,58 +6143,58 @@ msgid "" "is then updated with those key/value pairs: ``d.update(red=1, blue=2)``." msgstr "" -#: ../../../library/stdtypes.rst:5600 +#: ../../../library/stdtypes.rst:5879 msgid "" "Return a new view of the dictionary's values. See the :ref:`documentation " "of view objects `." msgstr "" -#: ../../../library/stdtypes.rst:5603 +#: ../../../library/stdtypes.rst:5882 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:5613 +#: ../../../library/stdtypes.rst:5892 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:5621 +#: ../../../library/stdtypes.rst:5900 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:5627 +#: ../../../library/stdtypes.rst:5906 msgid "Dictionaries and dictionary views are reversible. ::" msgstr "" -#: ../../../library/stdtypes.rst:5639 +#: ../../../library/stdtypes.rst:5918 msgid "Dictionaries are now reversible." msgstr "" -#: ../../../library/stdtypes.rst:5644 +#: ../../../library/stdtypes.rst:5923 msgid "" ":class:`frozendict` and :class:`types.MappingProxyType` can be used to " "create a read-only view of a :class:`dict`." msgstr "" -#: ../../../library/stdtypes.rst:5649 +#: ../../../library/stdtypes.rst:5928 msgid "" "For detailed information on thread-safety guarantees for :class:`dict` " "objects, see :ref:`thread-safety-dict`." msgstr "" -#: ../../../library/stdtypes.rst:5656 +#: ../../../library/stdtypes.rst:5935 msgid "Dictionary view objects" msgstr "" -#: ../../../library/stdtypes.rst:5658 +#: ../../../library/stdtypes.rst:5937 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 " @@ -5901,23 +6202,23 @@ msgid "" "reflects these changes." msgstr "" -#: ../../../library/stdtypes.rst:5663 +#: ../../../library/stdtypes.rst:5942 msgid "" "Dictionary views can be iterated over to yield their respective data, and " "support membership tests:" msgstr "" -#: ../../../library/stdtypes.rst:5668 +#: ../../../library/stdtypes.rst:5947 msgid "Return the number of entries in the dictionary." msgstr "" -#: ../../../library/stdtypes.rst:5672 +#: ../../../library/stdtypes.rst:5951 msgid "" "Return an iterator over the keys, values or items (represented as tuples of " "``(key, value)``) in the dictionary." msgstr "" -#: ../../../library/stdtypes.rst:5675 +#: ../../../library/stdtypes.rst:5954 msgid "" "Keys and values are iterated over in insertion order. This allows the " "creation of ``(value, key)`` pairs using :func:`zip`: ``pairs = zip(d." @@ -5925,39 +6226,39 @@ msgid "" "[(v, k) for (k, v) in d.items()]``." msgstr "" -#: ../../../library/stdtypes.rst:5680 +#: ../../../library/stdtypes.rst:5959 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:5683 +#: ../../../library/stdtypes.rst:5962 msgid "Dictionary order is guaranteed to be insertion order." msgstr "" -#: ../../../library/stdtypes.rst:5688 +#: ../../../library/stdtypes.rst:5967 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:5693 +#: ../../../library/stdtypes.rst:5972 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:5696 +#: ../../../library/stdtypes.rst:5975 msgid "Dictionary views are now reversible." msgstr "" -#: ../../../library/stdtypes.rst:5701 +#: ../../../library/stdtypes.rst:5980 msgid "" "Return a :class:`types.MappingProxyType` that wraps the original dictionary " "to which the view refers." msgstr "" -#: ../../../library/stdtypes.rst:5706 +#: ../../../library/stdtypes.rst:5985 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 " @@ -5971,94 +6272,94 @@ msgid "" "input." msgstr "" -#: ../../../library/stdtypes.rst:5718 +#: ../../../library/stdtypes.rst:5997 msgid "An example of dictionary view usage::" msgstr "" -#: ../../../library/stdtypes.rst:5760 +#: ../../../library/stdtypes.rst:6039 msgid "Frozen dictionaries" msgstr "" -#: ../../../library/stdtypes.rst:5766 +#: ../../../library/stdtypes.rst:6045 msgid "" "Return a new frozen dictionary initialized from an optional positional " "argument and a possibly empty set of keyword arguments." msgstr "" -#: ../../../library/stdtypes.rst:5769 +#: ../../../library/stdtypes.rst:6048 msgid "" "A :class:`!frozendict` has a similar API to the :class:`dict` API, with the " "following differences:" msgstr "" -#: ../../../library/stdtypes.rst:5772 +#: ../../../library/stdtypes.rst:6051 msgid ":class:`!dict` has more methods than :class:`!frozendict`:" msgstr "" -#: ../../../library/stdtypes.rst:5774 +#: ../../../library/stdtypes.rst:6053 msgid ":meth:`!__delitem__`" msgstr "" -#: ../../../library/stdtypes.rst:5775 +#: ../../../library/stdtypes.rst:6054 msgid ":meth:`!__setitem__`" msgstr "" -#: ../../../library/stdtypes.rst:5776 +#: ../../../library/stdtypes.rst:6055 msgid ":meth:`~dict.clear`" msgstr "" -#: ../../../library/stdtypes.rst:5777 +#: ../../../library/stdtypes.rst:6056 msgid ":meth:`~dict.pop`" msgstr "" -#: ../../../library/stdtypes.rst:5778 +#: ../../../library/stdtypes.rst:6057 msgid ":meth:`~dict.popitem`" msgstr "" -#: ../../../library/stdtypes.rst:5779 +#: ../../../library/stdtypes.rst:6058 msgid ":meth:`~dict.setdefault`" msgstr "" -#: ../../../library/stdtypes.rst:5780 +#: ../../../library/stdtypes.rst:6059 msgid ":meth:`~dict.update`" msgstr "" -#: ../../../library/stdtypes.rst:5782 +#: ../../../library/stdtypes.rst:6061 msgid "" "A :class:`!frozendict` can be hashed with ``hash(frozendict)`` if all keys " "and values can be hashed." msgstr "" -#: ../../../library/stdtypes.rst:5785 +#: ../../../library/stdtypes.rst:6064 msgid "" "``frozendict |= other`` does not modify the :class:`!frozendict` in-place " "but creates a new frozen dictionary." msgstr "" -#: ../../../library/stdtypes.rst:5788 +#: ../../../library/stdtypes.rst:6067 msgid "" ":class:`!frozendict` is not a :class:`!dict` subclass but inherits directly " "from ``object``." msgstr "" -#: ../../../library/stdtypes.rst:5791 +#: ../../../library/stdtypes.rst:6070 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:5796 +#: ../../../library/stdtypes.rst:6075 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:5807 +#: ../../../library/stdtypes.rst:6086 msgid "Context Manager Types" msgstr "" -#: ../../../library/stdtypes.rst:5814 +#: ../../../library/stdtypes.rst:6093 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 " @@ -6066,7 +6367,7 @@ msgid "" "before the statement body is executed and exited when the statement ends:" msgstr "" -#: ../../../library/stdtypes.rst:5822 +#: ../../../library/stdtypes.rst:6101 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 " @@ -6074,14 +6375,14 @@ msgid "" "using this context manager." msgstr "" -#: ../../../library/stdtypes.rst:5827 +#: ../../../library/stdtypes.rst:6106 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:5831 +#: ../../../library/stdtypes.rst:6110 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 " @@ -6091,7 +6392,7 @@ msgid "" "the :keyword:`!with` statement." msgstr "" -#: ../../../library/stdtypes.rst:5841 +#: ../../../library/stdtypes.rst:6120 msgid "" "Exit the runtime context and return a Boolean flag indicating if any " "exception that occurred should be suppressed. If an exception occurred while " @@ -6100,7 +6401,7 @@ msgid "" "arguments are ``None``." msgstr "" -#: ../../../library/stdtypes.rst:5846 +#: ../../../library/stdtypes.rst:6125 msgid "" "Returning a true value from this method will cause the :keyword:`with` " "statement to suppress the exception and continue execution with the " @@ -6108,14 +6409,14 @@ msgid "" "the exception continues propagating after this method has finished executing." msgstr "" -#: ../../../library/stdtypes.rst:5851 +#: ../../../library/stdtypes.rst:6130 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:5855 +#: ../../../library/stdtypes.rst:6134 msgid "" "The exception passed in should never be reraised explicitly - instead, this " "method should return a false value to indicate that the method completed " @@ -6124,7 +6425,7 @@ msgid "" "__exit__` method has actually failed." msgstr "" -#: ../../../library/stdtypes.rst:5861 +#: ../../../library/stdtypes.rst:6140 msgid "" "Python defines several context managers to support easy thread " "synchronisation, prompt closure of files or other objects, and simpler " @@ -6133,7 +6434,7 @@ msgid "" "management protocol. See the :mod:`contextlib` module for some examples." msgstr "" -#: ../../../library/stdtypes.rst:5867 +#: ../../../library/stdtypes.rst:6146 msgid "" "Python's :term:`generator`\\s and the :class:`contextlib.contextmanager` " "decorator provide a convenient way to implement these protocols. If a " @@ -6143,7 +6444,7 @@ msgid "" "rather than the iterator produced by an undecorated generator function." msgstr "" -#: ../../../library/stdtypes.rst:5874 +#: ../../../library/stdtypes.rst:6153 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 " @@ -6152,23 +6453,23 @@ msgid "" "a single class dictionary lookup is negligible." msgstr "" -#: ../../../library/stdtypes.rst:5882 +#: ../../../library/stdtypes.rst:6161 msgid "" "Type Annotation Types --- :ref:`Generic Alias `, :ref:" "`Union `" msgstr "" -#: ../../../library/stdtypes.rst:5887 +#: ../../../library/stdtypes.rst:6166 msgid "" "The core built-in types for :term:`type annotations ` are :ref:" "`Generic Alias ` and :ref:`Union `." msgstr "" -#: ../../../library/stdtypes.rst:5894 +#: ../../../library/stdtypes.rst:6173 msgid "Generic Alias Type" msgstr "" -#: ../../../library/stdtypes.rst:5900 +#: ../../../library/stdtypes.rst:6179 msgid "" "``GenericAlias`` objects are generally created by :ref:`subscripting " "` a class. They are most often used with :ref:`container " @@ -6178,19 +6479,19 @@ msgid "" "are intended primarily for use with :term:`type annotations `." msgstr "" -#: ../../../library/stdtypes.rst:5910 +#: ../../../library/stdtypes.rst:6189 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:5913 +#: ../../../library/stdtypes.rst:6192 msgid "" "A ``GenericAlias`` object acts as a proxy for a :term:`generic type`, " "implementing *parameterized generics*." msgstr "" -#: ../../../library/stdtypes.rst:5916 +#: ../../../library/stdtypes.rst:6195 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 " @@ -6199,7 +6500,7 @@ msgid "" "`bytes`." msgstr "" -#: ../../../library/stdtypes.rst:5922 +#: ../../../library/stdtypes.rst:6201 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 " @@ -6208,7 +6509,7 @@ msgid "" "the :class:`str` data type and the :class:`bytes` data type:" msgstr "" -#: ../../../library/stdtypes.rst:5928 +#: ../../../library/stdtypes.rst:6207 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 " @@ -6216,7 +6517,7 @@ msgid "" "annotations with the ``GenericAlias`` ``re.Match[str]``." msgstr "" -#: ../../../library/stdtypes.rst:5934 +#: ../../../library/stdtypes.rst:6213 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." @@ -6225,7 +6526,7 @@ msgid "" "objects>` objects with ``re.Match[bytes]``." msgstr "" -#: ../../../library/stdtypes.rst:5940 +#: ../../../library/stdtypes.rst:6219 msgid "" "``GenericAlias`` objects are instances of the class :class:`types." "GenericAlias`, which can also be used to create ``GenericAlias`` objects " @@ -6234,14 +6535,14 @@ msgid "" "provide similar functionality." msgstr "" -#: ../../../library/stdtypes.rst:5947 +#: ../../../library/stdtypes.rst:6226 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:5955 +#: ../../../library/stdtypes.rst:6234 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 " @@ -6249,13 +6550,13 @@ msgid "" "of type :class:`str` and values of type :class:`int`::" msgstr "" -#: ../../../library/stdtypes.rst:5963 +#: ../../../library/stdtypes.rst:6242 msgid "" "The builtin functions :func:`isinstance` and :func:`issubclass` do not " "accept ``GenericAlias`` types for their second argument::" msgstr "" -#: ../../../library/stdtypes.rst:5971 +#: ../../../library/stdtypes.rst:6250 msgid "" "The Python runtime does not enforce :term:`type annotations `. " "This extends to generic types and their type parameters. When creating a " @@ -6264,354 +6565,354 @@ msgid "" "discouraged, but will run without errors::" msgstr "" -#: ../../../library/stdtypes.rst:5981 +#: ../../../library/stdtypes.rst:6260 msgid "" "Furthermore, parameterized generics erase type parameters during object " "creation::" msgstr "" -#: ../../../library/stdtypes.rst:5993 +#: ../../../library/stdtypes.rst:6272 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:5999 +#: ../../../library/stdtypes.rst:6278 msgid "" "This is true for :ref:`user-defined generics ` also." msgstr "" -#: ../../../library/stdtypes.rst:6001 +#: ../../../library/stdtypes.rst:6280 msgid "" "Calling :func:`repr` or :func:`str` on a generic shows the parameterized " "type::" msgstr "" -#: ../../../library/stdtypes.rst:6009 +#: ../../../library/stdtypes.rst:6288 msgid "" "The :meth:`~object.__getitem__` method of generic containers will raise an " "exception to disallow mistakes like ``dict[str][str]``::" msgstr "" -#: ../../../library/stdtypes.rst:6017 +#: ../../../library/stdtypes.rst:6296 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:6028 +#: ../../../library/stdtypes.rst:6307 msgid "Standard Generic Classes" msgstr "" -#: ../../../library/stdtypes.rst:6030 +#: ../../../library/stdtypes.rst:6309 msgid "" "The following standard library classes support parameterized generics. This " "list is non-exhaustive." msgstr "" -#: ../../../library/stdtypes.rst:6033 +#: ../../../library/stdtypes.rst:6312 msgid ":class:`tuple`" msgstr "" -#: ../../../library/stdtypes.rst:6034 +#: ../../../library/stdtypes.rst:6313 msgid ":class:`list`" msgstr "" -#: ../../../library/stdtypes.rst:6035 +#: ../../../library/stdtypes.rst:6314 msgid ":class:`dict`" msgstr "" -#: ../../../library/stdtypes.rst:6036 +#: ../../../library/stdtypes.rst:6315 msgid ":class:`set`" msgstr "" -#: ../../../library/stdtypes.rst:6037 +#: ../../../library/stdtypes.rst:6316 msgid ":class:`frozendict`" msgstr "" -#: ../../../library/stdtypes.rst:6038 +#: ../../../library/stdtypes.rst:6317 msgid ":class:`frozenset`" msgstr "" -#: ../../../library/stdtypes.rst:6039 +#: ../../../library/stdtypes.rst:6318 msgid ":class:`type`" msgstr "" -#: ../../../library/stdtypes.rst:6040 +#: ../../../library/stdtypes.rst:6319 msgid ":class:`asyncio.Future`" msgstr "" -#: ../../../library/stdtypes.rst:6041 +#: ../../../library/stdtypes.rst:6320 msgid ":class:`asyncio.Task`" msgstr "" -#: ../../../library/stdtypes.rst:6042 +#: ../../../library/stdtypes.rst:6321 msgid ":class:`collections.deque`" msgstr "" -#: ../../../library/stdtypes.rst:6043 +#: ../../../library/stdtypes.rst:6322 msgid ":class:`collections.defaultdict`" msgstr "" -#: ../../../library/stdtypes.rst:6044 +#: ../../../library/stdtypes.rst:6323 msgid ":class:`collections.OrderedDict`" msgstr "" -#: ../../../library/stdtypes.rst:6045 +#: ../../../library/stdtypes.rst:6324 msgid ":class:`collections.Counter`" msgstr "" -#: ../../../library/stdtypes.rst:6046 +#: ../../../library/stdtypes.rst:6325 msgid ":class:`collections.ChainMap`" msgstr "" -#: ../../../library/stdtypes.rst:6047 +#: ../../../library/stdtypes.rst:6326 msgid ":class:`collections.abc.Awaitable`" msgstr "" -#: ../../../library/stdtypes.rst:6048 +#: ../../../library/stdtypes.rst:6327 msgid ":class:`collections.abc.Coroutine`" msgstr "" -#: ../../../library/stdtypes.rst:6049 +#: ../../../library/stdtypes.rst:6328 msgid ":class:`collections.abc.AsyncIterable`" msgstr "" -#: ../../../library/stdtypes.rst:6050 +#: ../../../library/stdtypes.rst:6329 msgid ":class:`collections.abc.AsyncIterator`" msgstr "" -#: ../../../library/stdtypes.rst:6051 +#: ../../../library/stdtypes.rst:6330 msgid ":class:`collections.abc.AsyncGenerator`" msgstr "" -#: ../../../library/stdtypes.rst:6052 +#: ../../../library/stdtypes.rst:6331 msgid ":class:`collections.abc.Iterable`" msgstr "" -#: ../../../library/stdtypes.rst:6053 +#: ../../../library/stdtypes.rst:6332 msgid ":class:`collections.abc.Iterator`" msgstr "" -#: ../../../library/stdtypes.rst:6054 +#: ../../../library/stdtypes.rst:6333 msgid ":class:`collections.abc.Generator`" msgstr "" -#: ../../../library/stdtypes.rst:6055 +#: ../../../library/stdtypes.rst:6334 msgid ":class:`collections.abc.Reversible`" msgstr "" -#: ../../../library/stdtypes.rst:6056 +#: ../../../library/stdtypes.rst:6335 msgid ":class:`collections.abc.Container`" msgstr "" -#: ../../../library/stdtypes.rst:6057 +#: ../../../library/stdtypes.rst:6336 msgid ":class:`collections.abc.Collection`" msgstr "" -#: ../../../library/stdtypes.rst:6058 +#: ../../../library/stdtypes.rst:6337 msgid ":class:`collections.abc.Callable`" msgstr "" -#: ../../../library/stdtypes.rst:6059 +#: ../../../library/stdtypes.rst:6338 msgid ":class:`collections.abc.Set`" msgstr "" -#: ../../../library/stdtypes.rst:6060 +#: ../../../library/stdtypes.rst:6339 msgid ":class:`collections.abc.MutableSet`" msgstr "" -#: ../../../library/stdtypes.rst:6061 +#: ../../../library/stdtypes.rst:6340 msgid ":class:`collections.abc.Mapping`" msgstr "" -#: ../../../library/stdtypes.rst:6062 +#: ../../../library/stdtypes.rst:6341 msgid ":class:`collections.abc.MutableMapping`" msgstr "" -#: ../../../library/stdtypes.rst:6063 +#: ../../../library/stdtypes.rst:6342 msgid ":class:`collections.abc.Sequence`" msgstr "" -#: ../../../library/stdtypes.rst:6064 +#: ../../../library/stdtypes.rst:6343 msgid ":class:`collections.abc.MutableSequence`" msgstr "" -#: ../../../library/stdtypes.rst:6065 +#: ../../../library/stdtypes.rst:6344 msgid ":class:`collections.abc.ByteString`" msgstr "" -#: ../../../library/stdtypes.rst:6066 +#: ../../../library/stdtypes.rst:6345 msgid ":class:`collections.abc.MappingView`" msgstr "" -#: ../../../library/stdtypes.rst:6067 +#: ../../../library/stdtypes.rst:6346 msgid ":class:`collections.abc.KeysView`" msgstr "" -#: ../../../library/stdtypes.rst:6068 +#: ../../../library/stdtypes.rst:6347 msgid ":class:`collections.abc.ItemsView`" msgstr "" -#: ../../../library/stdtypes.rst:6069 +#: ../../../library/stdtypes.rst:6348 msgid ":class:`collections.abc.ValuesView`" msgstr "" -#: ../../../library/stdtypes.rst:6070 +#: ../../../library/stdtypes.rst:6349 msgid ":class:`contextlib.AbstractContextManager`" msgstr "" -#: ../../../library/stdtypes.rst:6071 +#: ../../../library/stdtypes.rst:6350 msgid ":class:`contextlib.AbstractAsyncContextManager`" msgstr "" -#: ../../../library/stdtypes.rst:6072 +#: ../../../library/stdtypes.rst:6351 msgid ":class:`dataclasses.Field`" msgstr "" -#: ../../../library/stdtypes.rst:6073 +#: ../../../library/stdtypes.rst:6352 msgid ":class:`functools.cached_property`" msgstr "" -#: ../../../library/stdtypes.rst:6074 +#: ../../../library/stdtypes.rst:6353 msgid ":class:`functools.partialmethod`" msgstr "" -#: ../../../library/stdtypes.rst:6075 +#: ../../../library/stdtypes.rst:6354 msgid ":class:`os.PathLike`" msgstr "" -#: ../../../library/stdtypes.rst:6076 +#: ../../../library/stdtypes.rst:6355 msgid ":class:`queue.LifoQueue`" msgstr "" -#: ../../../library/stdtypes.rst:6077 +#: ../../../library/stdtypes.rst:6356 msgid ":class:`queue.Queue`" msgstr "" -#: ../../../library/stdtypes.rst:6078 +#: ../../../library/stdtypes.rst:6357 msgid ":class:`queue.PriorityQueue`" msgstr "" -#: ../../../library/stdtypes.rst:6079 +#: ../../../library/stdtypes.rst:6358 msgid ":class:`queue.SimpleQueue`" msgstr "" -#: ../../../library/stdtypes.rst:6080 +#: ../../../library/stdtypes.rst:6359 msgid ":ref:`re.Pattern `" msgstr "" -#: ../../../library/stdtypes.rst:6081 +#: ../../../library/stdtypes.rst:6360 msgid ":ref:`re.Match `" msgstr "" -#: ../../../library/stdtypes.rst:6082 +#: ../../../library/stdtypes.rst:6361 msgid ":class:`shelve.BsdDbShelf`" msgstr "" -#: ../../../library/stdtypes.rst:6083 +#: ../../../library/stdtypes.rst:6362 msgid ":class:`shelve.DbfilenameShelf`" msgstr "" -#: ../../../library/stdtypes.rst:6084 +#: ../../../library/stdtypes.rst:6363 msgid ":class:`shelve.Shelf`" msgstr "" -#: ../../../library/stdtypes.rst:6085 +#: ../../../library/stdtypes.rst:6364 msgid ":class:`types.MappingProxyType`" msgstr "" -#: ../../../library/stdtypes.rst:6086 +#: ../../../library/stdtypes.rst:6365 msgid ":class:`weakref.WeakKeyDictionary`" msgstr "" -#: ../../../library/stdtypes.rst:6087 +#: ../../../library/stdtypes.rst:6366 msgid ":class:`weakref.WeakMethod`" msgstr "" -#: ../../../library/stdtypes.rst:6088 +#: ../../../library/stdtypes.rst:6367 msgid ":class:`weakref.WeakSet`" msgstr "" -#: ../../../library/stdtypes.rst:6089 +#: ../../../library/stdtypes.rst:6368 msgid ":class:`weakref.WeakValueDictionary`" msgstr "" -#: ../../../library/stdtypes.rst:6094 +#: ../../../library/stdtypes.rst:6373 msgid "Special Attributes of ``GenericAlias`` objects" msgstr "" -#: ../../../library/stdtypes.rst:6096 +#: ../../../library/stdtypes.rst:6375 msgid "All parameterized generics implement special read-only attributes." msgstr "" -#: ../../../library/stdtypes.rst:6100 +#: ../../../library/stdtypes.rst:6379 msgid "This attribute points at the non-parameterized generic class::" msgstr "" -#: ../../../library/stdtypes.rst:6108 +#: ../../../library/stdtypes.rst:6387 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:6118 +#: ../../../library/stdtypes.rst:6397 msgid "" "This attribute is a lazily computed tuple (possibly empty) of unique type " "variables found in ``__args__``::" msgstr "" -#: ../../../library/stdtypes.rst:6129 +#: ../../../library/stdtypes.rst:6408 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:6136 +#: ../../../library/stdtypes.rst:6415 msgid "" "A boolean that is true if the alias has been unpacked using the ``*`` " "operator (see :data:`~typing.TypeVarTuple`)." msgstr "" -#: ../../../library/stdtypes.rst:6144 +#: ../../../library/stdtypes.rst:6423 msgid ":pep:`484` - Type Hints" msgstr "" -#: ../../../library/stdtypes.rst:6145 +#: ../../../library/stdtypes.rst:6424 msgid "Introducing Python's framework for type annotations." msgstr "" -#: ../../../library/stdtypes.rst:6147 +#: ../../../library/stdtypes.rst:6426 msgid ":pep:`585` - Type Hinting Generics In Standard Collections" msgstr "" -#: ../../../library/stdtypes.rst:6148 +#: ../../../library/stdtypes.rst:6427 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:6152 +#: ../../../library/stdtypes.rst:6431 msgid "" ":ref:`Generics`, :ref:`user-defined generics ` and :" "class:`typing.Generic`" msgstr "" -#: ../../../library/stdtypes.rst:6153 +#: ../../../library/stdtypes.rst:6432 msgid "" "Documentation on how to implement generic classes that can be parameterized " "at runtime and understood by static type-checkers." msgstr "" -#: ../../../library/stdtypes.rst:6162 +#: ../../../library/stdtypes.rst:6441 msgid "Union Type" msgstr "" -#: ../../../library/stdtypes.rst:6168 +#: ../../../library/stdtypes.rst:6447 msgid "" "A union object holds the value of the ``|`` (bitwise or) operation on " "multiple :ref:`type objects `. These types are intended " @@ -6620,7 +6921,7 @@ msgid "" "class:`typing.Union`." msgstr "" -#: ../../../library/stdtypes.rst:6175 +#: ../../../library/stdtypes.rst:6454 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 " @@ -6628,7 +6929,7 @@ msgid "" "class:`float`::" msgstr "" -#: ../../../library/stdtypes.rst:6185 +#: ../../../library/stdtypes.rst:6464 msgid "" "The ``|`` operator cannot be used at runtime to define unions where one or " "more members is a forward reference. For example, ``int | \"Foo\"``, where " @@ -6637,82 +6938,82 @@ msgid "" "a string, e.g. ``\"int | Foo\"``." msgstr "" -#: ../../../library/stdtypes.rst:6193 +#: ../../../library/stdtypes.rst:6472 msgid "" "Union objects can be tested for equality with other union objects. Details:" msgstr "" -#: ../../../library/stdtypes.rst:6195 +#: ../../../library/stdtypes.rst:6474 msgid "Unions of unions are flattened::" msgstr "" -#: ../../../library/stdtypes.rst:6199 +#: ../../../library/stdtypes.rst:6478 msgid "Redundant types are removed::" msgstr "" -#: ../../../library/stdtypes.rst:6203 +#: ../../../library/stdtypes.rst:6482 msgid "When comparing unions, the order is ignored::" msgstr "" -#: ../../../library/stdtypes.rst:6207 +#: ../../../library/stdtypes.rst:6486 msgid "It creates instances of :class:`typing.Union`::" msgstr "" -#: ../../../library/stdtypes.rst:6212 +#: ../../../library/stdtypes.rst:6491 msgid "Optional types can be spelled as a union with ``None``::" msgstr "" -#: ../../../library/stdtypes.rst:6219 +#: ../../../library/stdtypes.rst:6498 msgid "" "Calls to :func:`isinstance` and :func:`issubclass` are also supported with a " "union object::" msgstr "" -#: ../../../library/stdtypes.rst:6225 +#: ../../../library/stdtypes.rst:6504 msgid "" "However, :ref:`parameterized generics ` in union objects " "cannot be checked::" msgstr "" -#: ../../../library/stdtypes.rst:6235 +#: ../../../library/stdtypes.rst:6514 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:6247 +#: ../../../library/stdtypes.rst:6526 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:6267 +#: ../../../library/stdtypes.rst:6546 msgid ":pep:`604` -- PEP proposing the ``X | Y`` syntax and the Union type." msgstr "" -#: ../../../library/stdtypes.rst:6273 +#: ../../../library/stdtypes.rst:6552 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:6280 +#: ../../../library/stdtypes.rst:6559 msgid "Other Built-in Types" msgstr "" -#: ../../../library/stdtypes.rst:6282 +#: ../../../library/stdtypes.rst:6561 msgid "" "The interpreter supports several other kinds of objects. Most of these " "support only one or two operations." msgstr "" -#: ../../../library/stdtypes.rst:6289 +#: ../../../library/stdtypes.rst:6568 msgid "Modules" msgstr "" -#: ../../../library/stdtypes.rst:6291 +#: ../../../library/stdtypes.rst:6570 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 " @@ -6723,7 +7024,7 @@ msgid "" "*foo* somewhere.)" msgstr "" -#: ../../../library/stdtypes.rst:6298 +#: ../../../library/stdtypes.rst:6577 msgid "" "A special attribute of every module is :attr:`~object.__dict__`. This is the " "dictionary containing the module's symbol table. Modifying this dictionary " @@ -6734,32 +7035,32 @@ msgid "" "recommended." msgstr "" -#: ../../../library/stdtypes.rst:6306 +#: ../../../library/stdtypes.rst:6585 msgid "" "Modules built into the interpreter are written like this: ````. If loaded from a file, they are written as ````." msgstr "" -#: ../../../library/stdtypes.rst:6314 +#: ../../../library/stdtypes.rst:6593 msgid "Classes and Class Instances" msgstr "" -#: ../../../library/stdtypes.rst:6316 +#: ../../../library/stdtypes.rst:6595 msgid "See :ref:`objects` and :ref:`class` for these." msgstr "" -#: ../../../library/stdtypes.rst:6322 +#: ../../../library/stdtypes.rst:6601 msgid "Functions" msgstr "" -#: ../../../library/stdtypes.rst:6324 +#: ../../../library/stdtypes.rst:6603 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:6327 +#: ../../../library/stdtypes.rst:6606 msgid "" "There are really two flavors of function objects: built-in functions and " "user-defined functions. Both support the same operation (to call the " @@ -6767,15 +7068,15 @@ msgid "" "types." msgstr "" -#: ../../../library/stdtypes.rst:6331 +#: ../../../library/stdtypes.rst:6610 msgid "See :ref:`function` for more information." msgstr "" -#: ../../../library/stdtypes.rst:6337 +#: ../../../library/stdtypes.rst:6616 msgid "Methods" msgstr "" -#: ../../../library/stdtypes.rst:6341 +#: ../../../library/stdtypes.rst:6620 msgid "" "Methods are functions that are called using the attribute notation. There " "are two flavors: :ref:`built-in methods ` (such as :meth:" @@ -6783,7 +7084,7 @@ msgid "" "methods>`. Built-in methods are described with the types that support them." msgstr "" -#: ../../../library/stdtypes.rst:6347 +#: ../../../library/stdtypes.rst:6626 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:" @@ -6796,7 +7097,7 @@ msgid "" "arg-2, ..., arg-n)``." msgstr "" -#: ../../../library/stdtypes.rst:6358 +#: ../../../library/stdtypes.rst:6637 msgid "" "Like :ref:`function objects `, bound method objects " "support getting arbitrary attributes. However, since method attributes are " @@ -6807,15 +7108,15 @@ msgid "" "underlying function object:" msgstr "" -#: ../../../library/stdtypes.rst:6381 +#: ../../../library/stdtypes.rst:6660 msgid "See :ref:`instance-methods` for more information." msgstr "" -#: ../../../library/stdtypes.rst:6389 +#: ../../../library/stdtypes.rst:6668 msgid "Code Objects" msgstr "" -#: ../../../library/stdtypes.rst:6395 +#: ../../../library/stdtypes.rst:6674 msgid "" "Code objects are used by the implementation to represent \"pseudo-compiled\" " "executable Python code such as a function body. They differ from function " @@ -6825,28 +7126,28 @@ msgid "" "`~function.__code__` attribute. See also the :mod:`code` module." msgstr "" -#: ../../../library/stdtypes.rst:6402 +#: ../../../library/stdtypes.rst:6681 msgid "" "Accessing :attr:`~function.__code__` raises an :ref:`auditing event " "` ``object.__getattr__`` with arguments ``obj`` and " "``\"__code__\"``." msgstr "" -#: ../../../library/stdtypes.rst:6409 +#: ../../../library/stdtypes.rst:6688 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:6412 +#: ../../../library/stdtypes.rst:6691 msgid "See :ref:`types` for more information." msgstr "" -#: ../../../library/stdtypes.rst:6418 +#: ../../../library/stdtypes.rst:6697 msgid "Type Objects" msgstr "" -#: ../../../library/stdtypes.rst:6424 +#: ../../../library/stdtypes.rst:6703 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 " @@ -6854,30 +7155,30 @@ msgid "" "standard built-in types." msgstr "" -#: ../../../library/stdtypes.rst:6429 +#: ../../../library/stdtypes.rst:6708 msgid "Types are written like this: ````." msgstr "" -#: ../../../library/stdtypes.rst:6435 +#: ../../../library/stdtypes.rst:6714 msgid "The Null Object" msgstr "" -#: ../../../library/stdtypes.rst:6437 +#: ../../../library/stdtypes.rst:6716 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:6441 +#: ../../../library/stdtypes.rst:6720 msgid "It is written as ``None``." msgstr "" -#: ../../../library/stdtypes.rst:6448 +#: ../../../library/stdtypes.rst:6727 msgid "The Ellipsis Object" msgstr "" -#: ../../../library/stdtypes.rst:6450 +#: ../../../library/stdtypes.rst:6729 msgid "" "This object is commonly used to indicate that something is omitted. It " "supports no special operations. There is exactly one ellipsis object, " @@ -6885,63 +7186,63 @@ msgid "" "the :const:`Ellipsis` singleton." msgstr "" -#: ../../../library/stdtypes.rst:6455 +#: ../../../library/stdtypes.rst:6734 msgid "It is written as ``Ellipsis`` or ``...``." msgstr "" -#: ../../../library/stdtypes.rst:6457 +#: ../../../library/stdtypes.rst:6736 msgid "" "In typical use, ``...`` as the ``Ellipsis`` object appears in a few " "different places, for instance:" msgstr "" -#: ../../../library/stdtypes.rst:6460 +#: ../../../library/stdtypes.rst:6739 msgid "" "In type annotations, such as :ref:`callable arguments ` or :ref:`tuple elements `." msgstr "" -#: ../../../library/stdtypes.rst:6463 +#: ../../../library/stdtypes.rst:6742 msgid "" "As the body of a function instead of a :ref:`pass statement `." msgstr "" -#: ../../../library/stdtypes.rst:6465 +#: ../../../library/stdtypes.rst:6744 msgid "" "In third-party libraries, such as `Numpy's slicing and striding `_." msgstr "" -#: ../../../library/stdtypes.rst:6468 +#: ../../../library/stdtypes.rst:6747 msgid "" "Python also uses three dots in ways that are not ``Ellipsis`` objects, for " "instance:" msgstr "" -#: ../../../library/stdtypes.rst:6470 +#: ../../../library/stdtypes.rst:6749 msgid "" "Doctest's :const:`ELLIPSIS `, as a pattern for missing " "content." msgstr "" -#: ../../../library/stdtypes.rst:6472 +#: ../../../library/stdtypes.rst:6751 msgid "" "The default Python prompt of the :term:`interactive` shell when partial " "input is incomplete." msgstr "" -#: ../../../library/stdtypes.rst:6474 +#: ../../../library/stdtypes.rst:6753 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:6482 +#: ../../../library/stdtypes.rst:6761 msgid "The NotImplemented Object" msgstr "" -#: ../../../library/stdtypes.rst:6484 +#: ../../../library/stdtypes.rst:6763 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 " @@ -6949,64 +7250,64 @@ msgid "" "`type(NotImplemented)()` produces the singleton instance." msgstr "" -#: ../../../library/stdtypes.rst:6489 +#: ../../../library/stdtypes.rst:6768 msgid "It is written as :code:`NotImplemented`." msgstr "" -#: ../../../library/stdtypes.rst:6495 +#: ../../../library/stdtypes.rst:6774 msgid "Internal Objects" msgstr "" -#: ../../../library/stdtypes.rst:6497 +#: ../../../library/stdtypes.rst:6776 msgid "" "See :ref:`types` for this information. It describes :ref:`stack frame " "objects `, :ref:`traceback objects `, and " "slice objects." msgstr "" -#: ../../../library/stdtypes.rst:6505 +#: ../../../library/stdtypes.rst:6784 msgid "Special Attributes" msgstr "" -#: ../../../library/stdtypes.rst:6507 +#: ../../../library/stdtypes.rst:6786 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:6514 +#: ../../../library/stdtypes.rst:6793 msgid "" "The name of the class, function, method, descriptor, or generator instance." msgstr "" -#: ../../../library/stdtypes.rst:6520 +#: ../../../library/stdtypes.rst:6799 msgid "" "The :term:`qualified name` of the class, function, method, descriptor, or " "generator instance." msgstr "" -#: ../../../library/stdtypes.rst:6528 +#: ../../../library/stdtypes.rst:6807 msgid "The name of the module in which a class or function was defined." msgstr "" -#: ../../../library/stdtypes.rst:6533 +#: ../../../library/stdtypes.rst:6812 msgid "" "The documentation string of a class or function, or ``None`` if undefined." msgstr "" -#: ../../../library/stdtypes.rst:6538 +#: ../../../library/stdtypes.rst:6817 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:6548 +#: ../../../library/stdtypes.rst:6827 msgid "Integer string conversion length limitation" msgstr "" -#: ../../../library/stdtypes.rst:6550 +#: ../../../library/stdtypes.rst:6829 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 " @@ -7014,7 +7315,7 @@ msgid "" "binary conversions are unlimited. The limit can be configured." msgstr "" -#: ../../../library/stdtypes.rst:6555 +#: ../../../library/stdtypes.rst:6834 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 " @@ -7024,24 +7325,24 @@ msgid "" "value such as ``int('1' * 500_000)`` can take over a second on a fast CPU." msgstr "" -#: ../../../library/stdtypes.rst:6562 +#: ../../../library/stdtypes.rst:6841 msgid "" "Limiting conversion size offers a practical way to avoid :cve:`2020-10735`." msgstr "" -#: ../../../library/stdtypes.rst:6564 +#: ../../../library/stdtypes.rst:6843 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:6568 +#: ../../../library/stdtypes.rst:6847 msgid "" "When an operation would exceed the limit, a :exc:`ValueError` is raised:" msgstr "" -#: ../../../library/stdtypes.rst:6590 +#: ../../../library/stdtypes.rst:6869 msgid "" "The default limit is 4300 digits as provided in :data:`sys.int_info." "default_max_str_digits `. The lowest limit that can be " @@ -7049,94 +7350,94 @@ msgid "" "str_digits_check_threshold `." msgstr "" -#: ../../../library/stdtypes.rst:6595 +#: ../../../library/stdtypes.rst:6874 msgid "Verification:" msgstr "" -#: ../../../library/stdtypes.rst:6610 +#: ../../../library/stdtypes.rst:6889 msgid "Affected APIs" msgstr "" -#: ../../../library/stdtypes.rst:6612 +#: ../../../library/stdtypes.rst:6891 msgid "" "The limitation only applies to potentially slow conversions between :class:" "`int` and :class:`str` or :class:`bytes`:" msgstr "" -#: ../../../library/stdtypes.rst:6615 +#: ../../../library/stdtypes.rst:6894 msgid "``int(string)`` with default base 10." msgstr "" -#: ../../../library/stdtypes.rst:6616 +#: ../../../library/stdtypes.rst:6895 msgid "``int(string, base)`` for all bases that are not a power of 2." msgstr "" -#: ../../../library/stdtypes.rst:6617 +#: ../../../library/stdtypes.rst:6896 msgid "``str(integer)``." msgstr "" -#: ../../../library/stdtypes.rst:6618 +#: ../../../library/stdtypes.rst:6897 msgid "``repr(integer)``." msgstr "" -#: ../../../library/stdtypes.rst:6619 +#: ../../../library/stdtypes.rst:6898 msgid "" "any other string conversion to base 10, for example ``f\"{integer}\"``, " "``\"{}\".format(integer)``, or ``b\"%d\" % integer``." msgstr "" -#: ../../../library/stdtypes.rst:6622 +#: ../../../library/stdtypes.rst:6901 msgid "The limitations do not apply to functions with a linear algorithm:" msgstr "" -#: ../../../library/stdtypes.rst:6624 +#: ../../../library/stdtypes.rst:6903 msgid "``int(string, base)`` with base 2, 4, 8, 16, or 32." msgstr "" -#: ../../../library/stdtypes.rst:6625 +#: ../../../library/stdtypes.rst:6904 msgid ":func:`int.from_bytes` and :func:`int.to_bytes`." msgstr "" -#: ../../../library/stdtypes.rst:6626 +#: ../../../library/stdtypes.rst:6905 msgid ":func:`hex`, :func:`oct`, :func:`bin`." msgstr "" -#: ../../../library/stdtypes.rst:6627 +#: ../../../library/stdtypes.rst:6906 msgid ":ref:`formatspec` for hex, octal, and binary numbers." msgstr "" -#: ../../../library/stdtypes.rst:6628 +#: ../../../library/stdtypes.rst:6907 msgid ":class:`str` to :class:`float`." msgstr "" -#: ../../../library/stdtypes.rst:6629 +#: ../../../library/stdtypes.rst:6908 msgid ":class:`str` to :class:`decimal.Decimal`." msgstr "" -#: ../../../library/stdtypes.rst:6632 +#: ../../../library/stdtypes.rst:6911 msgid "Configuring the limit" msgstr "" -#: ../../../library/stdtypes.rst:6634 +#: ../../../library/stdtypes.rst:6913 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:6637 +#: ../../../library/stdtypes.rst:6916 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:6640 +#: ../../../library/stdtypes.rst:6919 msgid "" ":option:`-X int_max_str_digits <-X>`, e.g. ``python3 -X " "int_max_str_digits=640``" msgstr "" -#: ../../../library/stdtypes.rst:6642 +#: ../../../library/stdtypes.rst:6921 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 " @@ -7145,38 +7446,38 @@ msgid "" "int_info.default_max_str_digits` was used during initialization." msgstr "" -#: ../../../library/stdtypes.rst:6648 +#: ../../../library/stdtypes.rst:6927 msgid "" "From code, you can inspect the current limit and set a new one using these :" "mod:`sys` APIs:" msgstr "" -#: ../../../library/stdtypes.rst:6651 +#: ../../../library/stdtypes.rst:6930 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:6655 +#: ../../../library/stdtypes.rst:6934 msgid "" "Information about the default and minimum can be found in :data:`sys." "int_info`:" msgstr "" -#: ../../../library/stdtypes.rst:6657 +#: ../../../library/stdtypes.rst:6936 msgid "" ":data:`sys.int_info.default_max_str_digits ` is the compiled-" "in default limit." msgstr "" -#: ../../../library/stdtypes.rst:6659 +#: ../../../library/stdtypes.rst:6938 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:6666 +#: ../../../library/stdtypes.rst:6945 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 " @@ -7188,7 +7489,7 @@ msgid "" "constants is to convert them to ``0x`` hexadecimal form as it has no limit." msgstr "" -#: ../../../library/stdtypes.rst:6675 +#: ../../../library/stdtypes.rst:6954 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 " @@ -7196,11 +7497,11 @@ msgid "" "to precompile ``.py`` sources to ``.pyc`` files." msgstr "" -#: ../../../library/stdtypes.rst:6681 +#: ../../../library/stdtypes.rst:6960 msgid "Recommended configuration" msgstr "" -#: ../../../library/stdtypes.rst:6683 +#: ../../../library/stdtypes.rst:6962 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 " @@ -7208,42 +7509,42 @@ msgid "" "as these APIs were added in security patch releases in versions before 3.12." msgstr "" -#: ../../../library/stdtypes.rst:6688 +#: ../../../library/stdtypes.rst:6967 msgid "Example::" msgstr "" -#: ../../../library/stdtypes.rst:6700 +#: ../../../library/stdtypes.rst:6979 msgid "If you need to disable it entirely, set it to ``0``." msgstr "" -#: ../../../library/stdtypes.rst:6704 +#: ../../../library/stdtypes.rst:6983 msgid "Footnotes" msgstr "" -#: ../../../library/stdtypes.rst:6705 +#: ../../../library/stdtypes.rst:6984 msgid "" "Additional information on these special methods may be found in the Python " "Reference Manual (:ref:`customization`)." msgstr "" -#: ../../../library/stdtypes.rst:6708 +#: ../../../library/stdtypes.rst:6987 msgid "" "As a consequence, the list ``[1, 2]`` is considered equal to ``[1.0, 2.0]``, " "and similarly for tuples." msgstr "" -#: ../../../library/stdtypes.rst:6711 +#: ../../../library/stdtypes.rst:6990 msgid "They must have since the parser can't tell the type of the operands." msgstr "" -#: ../../../library/stdtypes.rst:6713 +#: ../../../library/stdtypes.rst:6992 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:6716 +#: ../../../library/stdtypes.rst:6995 msgid "" "To format only a tuple you should therefore provide a singleton tuple whose " "only element is the tuple to be formatted." @@ -7254,15 +7555,15 @@ msgid "built-in" 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:5359 -#: ../../../library/stdtypes.rst:6420 +#: ../../../library/stdtypes.rst:409 ../../../library/stdtypes.rst:1276 +#: ../../../library/stdtypes.rst:1468 ../../../library/stdtypes.rst:1490 +#: ../../../library/stdtypes.rst:1505 ../../../library/stdtypes.rst:5636 +#: ../../../library/stdtypes.rst:6699 msgid "types" msgstr "" -#: ../../../library/stdtypes.rst:34 ../../../library/stdtypes.rst:1229 -#: ../../../library/stdtypes.rst:5359 +#: ../../../library/stdtypes.rst:34 ../../../library/stdtypes.rst:1505 +#: ../../../library/stdtypes.rst:5636 msgid "statement" msgstr "" @@ -7311,7 +7612,7 @@ msgstr "" #: ../../../library/stdtypes.rst:66 ../../../library/stdtypes.rst:100 #: ../../../library/stdtypes.rst:125 ../../../library/stdtypes.rst:197 #: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:409 -#: ../../../library/stdtypes.rst:1002 +#: ../../../library/stdtypes.rst:1276 msgid "operator" msgstr "" @@ -7380,15 +7681,16 @@ msgid "is not" msgstr "" #: ../../../library/stdtypes.rst:165 ../../../library/stdtypes.rst:210 -#: ../../../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:1768 -#: ../../../library/stdtypes.rst:3306 ../../../library/stdtypes.rst:3325 -#: ../../../library/stdtypes.rst:3438 ../../../library/stdtypes.rst:5141 -#: ../../../library/stdtypes.rst:5359 ../../../library/stdtypes.rst:5896 -#: ../../../library/stdtypes.rst:6164 ../../../library/stdtypes.rst:6339 -#: ../../../library/stdtypes.rst:6384 +#: ../../../library/stdtypes.rst:1019 ../../../library/stdtypes.rst:1129 +#: ../../../library/stdtypes.rst:1257 ../../../library/stdtypes.rst:1468 +#: ../../../library/stdtypes.rst:1490 ../../../library/stdtypes.rst:1655 +#: ../../../library/stdtypes.rst:1741 ../../../library/stdtypes.rst:1789 +#: ../../../library/stdtypes.rst:1910 ../../../library/stdtypes.rst:2044 +#: ../../../library/stdtypes.rst:3582 ../../../library/stdtypes.rst:3601 +#: ../../../library/stdtypes.rst:3714 ../../../library/stdtypes.rst:5417 +#: ../../../library/stdtypes.rst:5636 ../../../library/stdtypes.rst:6175 +#: ../../../library/stdtypes.rst:6443 ../../../library/stdtypes.rst:6618 +#: ../../../library/stdtypes.rst:6663 msgid "object" msgstr "" @@ -7430,11 +7732,11 @@ msgstr "" msgid "__ge__() (instance method)" msgstr "" -#: ../../../library/stdtypes.rst:197 ../../../library/stdtypes.rst:1002 +#: ../../../library/stdtypes.rst:197 ../../../library/stdtypes.rst:1276 msgid "in" msgstr "" -#: ../../../library/stdtypes.rst:197 ../../../library/stdtypes.rst:1002 +#: ../../../library/stdtypes.rst:197 ../../../library/stdtypes.rst:1276 msgid "not in" msgstr "" @@ -7479,10 +7781,10 @@ msgstr "" msgid "arithmetic" msgstr "" -#: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:1002 -#: ../../../library/stdtypes.rst:1192 ../../../library/stdtypes.rst:5359 -#: ../../../library/stdtypes.rst:6391 ../../../library/stdtypes.rst:6405 -#: ../../../library/stdtypes.rst:6420 +#: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:1276 +#: ../../../library/stdtypes.rst:1468 ../../../library/stdtypes.rst:5636 +#: ../../../library/stdtypes.rst:6670 ../../../library/stdtypes.rst:6684 +#: ../../../library/stdtypes.rst:6699 msgid "built-in function" msgstr "" @@ -7498,8 +7800,8 @@ msgstr "" msgid "complex" msgstr "" -#: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:3178 -#: ../../../library/stdtypes.rst:4480 +#: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:3454 +#: ../../../library/stdtypes.rst:4756 msgid "+ (plus)" msgstr "" @@ -7511,13 +7813,13 @@ msgstr "" msgid "binary operator" msgstr "" -#: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:3178 -#: ../../../library/stdtypes.rst:4480 +#: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:3454 +#: ../../../library/stdtypes.rst:4756 msgid "- (minus)" msgstr "" -#: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:3135 -#: ../../../library/stdtypes.rst:4437 +#: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:3411 +#: ../../../library/stdtypes.rst:4713 msgid "* (asterisk)" msgstr "" @@ -7529,8 +7831,8 @@ msgstr "" msgid "//" msgstr "" -#: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:3098 -#: ../../../library/stdtypes.rst:4405 +#: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:3374 +#: ../../../library/stdtypes.rst:4681 msgid "% (percent)" msgstr "" @@ -7539,8 +7841,8 @@ msgid "**" msgstr "" #: ../../../library/stdtypes.rst:332 ../../../library/stdtypes.rst:409 -#: ../../../library/stdtypes.rst:1002 ../../../library/stdtypes.rst:1229 -#: ../../../library/stdtypes.rst:5359 +#: ../../../library/stdtypes.rst:1276 ../../../library/stdtypes.rst:1505 +#: ../../../library/stdtypes.rst:5636 msgid "operations on" msgstr "" @@ -7548,8 +7850,8 @@ msgstr "" msgid "conjugate() (complex number method)" msgstr "" -#: ../../../library/stdtypes.rst:351 ../../../library/stdtypes.rst:1836 -#: ../../../library/stdtypes.rst:3306 ../../../library/stdtypes.rst:6420 +#: ../../../library/stdtypes.rst:351 ../../../library/stdtypes.rst:2112 +#: ../../../library/stdtypes.rst:3582 ../../../library/stdtypes.rst:6699 msgid "module" msgstr "" @@ -7613,402 +7915,427 @@ msgstr "" msgid "values" msgstr "" -#: ../../../library/stdtypes.rst:899 +#: ../../../library/stdtypes.rst:901 msgid "iterator protocol" msgstr "" -#: ../../../library/stdtypes.rst:899 ../../../library/stdtypes.rst:5809 +#: ../../../library/stdtypes.rst:901 ../../../library/stdtypes.rst:6088 msgid "protocol" msgstr "" -#: ../../../library/stdtypes.rst:899 +#: ../../../library/stdtypes.rst:901 msgid "iterator" msgstr "" -#: ../../../library/stdtypes.rst:899 ../../../library/stdtypes.rst:986 -#: ../../../library/stdtypes.rst:1002 ../../../library/stdtypes.rst:1192 -#: ../../../library/stdtypes.rst:1214 ../../../library/stdtypes.rst:1229 +#: ../../../library/stdtypes.rst:901 ../../../library/stdtypes.rst:1257 +#: ../../../library/stdtypes.rst:1276 ../../../library/stdtypes.rst:1468 +#: ../../../library/stdtypes.rst:1490 ../../../library/stdtypes.rst:1505 msgid "sequence" msgstr "" -#: ../../../library/stdtypes.rst:899 +#: ../../../library/stdtypes.rst:901 msgid "iteration" msgstr "" -#: ../../../library/stdtypes.rst:899 +#: ../../../library/stdtypes.rst:901 msgid "container" msgstr "" -#: ../../../library/stdtypes.rst:899 +#: ../../../library/stdtypes.rst:901 msgid "iteration over" msgstr "" -#: ../../../library/stdtypes.rst:1002 ../../../library/stdtypes.rst:5359 +#: ../../../library/stdtypes.rst:1019 +msgid "generator" +msgstr "" + +#: ../../../library/stdtypes.rst:1029 ../../../library/stdtypes.rst:1098 +#: ../../../library/stdtypes.rst:1139 ../../../library/stdtypes.rst:1216 +msgid "exception" +msgstr "" + +#: ../../../library/stdtypes.rst:1029 +msgid "StopIteration" +msgstr "" + +#: ../../../library/stdtypes.rst:1098 ../../../library/stdtypes.rst:1216 +msgid "GeneratorExit" +msgstr "" + +#: ../../../library/stdtypes.rst:1129 +msgid "asynchronous-generator" +msgstr "" + +#: ../../../library/stdtypes.rst:1139 +msgid "StopAsyncIteration" +msgstr "" + +#: ../../../library/stdtypes.rst:1276 ../../../library/stdtypes.rst:5636 msgid "len" msgstr "" -#: ../../../library/stdtypes.rst:1002 +#: ../../../library/stdtypes.rst:1276 msgid "min" msgstr "" -#: ../../../library/stdtypes.rst:1002 +#: ../../../library/stdtypes.rst:1276 msgid "max" msgstr "" -#: ../../../library/stdtypes.rst:1002 +#: ../../../library/stdtypes.rst:1276 msgid "concatenation" msgstr "" -#: ../../../library/stdtypes.rst:1002 +#: ../../../library/stdtypes.rst:1276 msgid "operation" msgstr "" -#: ../../../library/stdtypes.rst:1002 +#: ../../../library/stdtypes.rst:1276 msgid "repetition" msgstr "" -#: ../../../library/stdtypes.rst:1002 ../../../library/stdtypes.rst:1229 +#: ../../../library/stdtypes.rst:1276 ../../../library/stdtypes.rst:1505 msgid "subscript" msgstr "" -#: ../../../library/stdtypes.rst:1002 ../../../library/stdtypes.rst:1229 +#: ../../../library/stdtypes.rst:1276 ../../../library/stdtypes.rst:1505 msgid "slice" msgstr "" -#: ../../../library/stdtypes.rst:1049 +#: ../../../library/stdtypes.rst:1323 msgid "loop" msgstr "" -#: ../../../library/stdtypes.rst:1049 +#: ../../../library/stdtypes.rst:1323 msgid "over mutable sequence" msgstr "" -#: ../../../library/stdtypes.rst:1049 +#: ../../../library/stdtypes.rst:1323 msgid "mutable sequence" msgstr "" -#: ../../../library/stdtypes.rst:1049 +#: ../../../library/stdtypes.rst:1323 msgid "loop over" msgstr "" -#: ../../../library/stdtypes.rst:1192 +#: ../../../library/stdtypes.rst:1468 msgid "immutable" msgstr "" -#: ../../../library/stdtypes.rst:1192 ../../../library/stdtypes.rst:1465 +#: ../../../library/stdtypes.rst:1468 ../../../library/stdtypes.rst:1741 msgid "tuple" msgstr "" -#: ../../../library/stdtypes.rst:1192 +#: ../../../library/stdtypes.rst:1468 msgid "hash" msgstr "" -#: ../../../library/stdtypes.rst:1214 +#: ../../../library/stdtypes.rst:1490 msgid "mutable" msgstr "" -#: ../../../library/stdtypes.rst:1214 ../../../library/stdtypes.rst:1229 -#: ../../../library/stdtypes.rst:1379 +#: ../../../library/stdtypes.rst:1490 ../../../library/stdtypes.rst:1505 +#: ../../../library/stdtypes.rst:1655 msgid "list" msgstr "" -#: ../../../library/stdtypes.rst:1214 ../../../library/stdtypes.rst:3306 -#: ../../../library/stdtypes.rst:3438 ../../../library/stdtypes.rst:3577 -#: ../../../library/stdtypes.rst:4405 +#: ../../../library/stdtypes.rst:1490 ../../../library/stdtypes.rst:3582 +#: ../../../library/stdtypes.rst:3714 ../../../library/stdtypes.rst:3853 +#: ../../../library/stdtypes.rst:4681 msgid "bytearray" msgstr "" -#: ../../../library/stdtypes.rst:1229 ../../../library/stdtypes.rst:5359 -#: ../../../library/stdtypes.rst:6164 ../../../library/stdtypes.rst:6420 +#: ../../../library/stdtypes.rst:1505 ../../../library/stdtypes.rst:5636 +#: ../../../library/stdtypes.rst:6443 ../../../library/stdtypes.rst:6699 msgid "type" msgstr "" -#: ../../../library/stdtypes.rst:1229 +#: ../../../library/stdtypes.rst:1505 msgid "assignment" msgstr "" -#: ../../../library/stdtypes.rst:1229 ../../../library/stdtypes.rst:5359 +#: ../../../library/stdtypes.rst:1505 ../../../library/stdtypes.rst:5636 msgid "del" msgstr "" -#: ../../../library/stdtypes.rst:1513 +#: ../../../library/stdtypes.rst:1789 msgid "range" msgstr "" -#: ../../../library/stdtypes.rst:1634 ../../../library/stdtypes.rst:1781 -#: ../../../library/stdtypes.rst:1828 ../../../library/stdtypes.rst:2926 -#: ../../../library/stdtypes.rst:3098 +#: ../../../library/stdtypes.rst:1910 ../../../library/stdtypes.rst:2057 +#: ../../../library/stdtypes.rst:2104 ../../../library/stdtypes.rst:3202 +#: ../../../library/stdtypes.rst:3374 msgid "string" msgstr "" -#: ../../../library/stdtypes.rst:1634 +#: ../../../library/stdtypes.rst:1910 msgid "text sequence type" msgstr "" -#: ../../../library/stdtypes.rst:1634 ../../../library/stdtypes.rst:1781 -#: ../../../library/stdtypes.rst:1801 +#: ../../../library/stdtypes.rst:1910 ../../../library/stdtypes.rst:2057 +#: ../../../library/stdtypes.rst:2077 msgid "str (built-in class)" msgstr "" -#: ../../../library/stdtypes.rst:1634 +#: ../../../library/stdtypes.rst:1910 msgid "(see also string)" msgstr "" -#: ../../../library/stdtypes.rst:1768 +#: ../../../library/stdtypes.rst:2044 msgid "io.StringIO" msgstr "" -#: ../../../library/stdtypes.rst:1801 ../../../library/stdtypes.rst:3298 +#: ../../../library/stdtypes.rst:2077 ../../../library/stdtypes.rst:3574 msgid "buffer protocol" msgstr "" -#: ../../../library/stdtypes.rst:1801 ../../../library/stdtypes.rst:3306 -#: ../../../library/stdtypes.rst:3325 ../../../library/stdtypes.rst:3577 -#: ../../../library/stdtypes.rst:4405 +#: ../../../library/stdtypes.rst:2077 ../../../library/stdtypes.rst:3582 +#: ../../../library/stdtypes.rst:3601 ../../../library/stdtypes.rst:3853 +#: ../../../library/stdtypes.rst:4681 msgid "bytes" msgstr "" -#: ../../../library/stdtypes.rst:1828 ../../../library/stdtypes.rst:3577 +#: ../../../library/stdtypes.rst:2104 ../../../library/stdtypes.rst:3853 msgid "methods" msgstr "" -#: ../../../library/stdtypes.rst:1836 +#: ../../../library/stdtypes.rst:2112 msgid "re" msgstr "" -#: ../../../library/stdtypes.rst:2690 ../../../library/stdtypes.rst:4259 +#: ../../../library/stdtypes.rst:2966 ../../../library/stdtypes.rst:4535 msgid "universal newlines" msgstr "" -#: ../../../library/stdtypes.rst:2690 +#: ../../../library/stdtypes.rst:2966 msgid "str.splitlines method" msgstr "" -#: ../../../library/stdtypes.rst:2926 +#: ../../../library/stdtypes.rst:3202 msgid "! formatted string literal" msgstr "" -#: ../../../library/stdtypes.rst:2926 +#: ../../../library/stdtypes.rst:3202 msgid "formatted string literals" msgstr "" -#: ../../../library/stdtypes.rst:2926 +#: ../../../library/stdtypes.rst:3202 msgid "! f-string" msgstr "" -#: ../../../library/stdtypes.rst:2926 +#: ../../../library/stdtypes.rst:3202 msgid "f-strings" msgstr "" -#: ../../../library/stdtypes.rst:2926 +#: ../../../library/stdtypes.rst:3202 msgid "fstring" msgstr "" -#: ../../../library/stdtypes.rst:2926 +#: ../../../library/stdtypes.rst:3202 msgid "interpolated string literal" msgstr "" -#: ../../../library/stdtypes.rst:2926 +#: ../../../library/stdtypes.rst:3202 msgid "formatted literal" msgstr "" -#: ../../../library/stdtypes.rst:2926 +#: ../../../library/stdtypes.rst:3202 msgid "interpolated literal" msgstr "" -#: ../../../library/stdtypes.rst:2926 +#: ../../../library/stdtypes.rst:3202 msgid "{} (curly brackets)" msgstr "" -#: ../../../library/stdtypes.rst:2926 +#: ../../../library/stdtypes.rst:3202 msgid "in formatted string literal" msgstr "" -#: ../../../library/stdtypes.rst:2926 +#: ../../../library/stdtypes.rst:3202 msgid "! (exclamation mark)" msgstr "" -#: ../../../library/stdtypes.rst:2926 +#: ../../../library/stdtypes.rst:3202 msgid ": (colon)" msgstr "" -#: ../../../library/stdtypes.rst:2926 +#: ../../../library/stdtypes.rst:3202 msgid "= (equals)" msgstr "" -#: ../../../library/stdtypes.rst:2926 +#: ../../../library/stdtypes.rst:3202 msgid "for help in debugging using string literals" msgstr "" -#: ../../../library/stdtypes.rst:3098 +#: ../../../library/stdtypes.rst:3374 msgid "formatting, string (%)" msgstr "" -#: ../../../library/stdtypes.rst:3098 +#: ../../../library/stdtypes.rst:3374 msgid "interpolation, string (%)" msgstr "" -#: ../../../library/stdtypes.rst:3098 +#: ../../../library/stdtypes.rst:3374 msgid "formatting, printf" msgstr "" -#: ../../../library/stdtypes.rst:3098 +#: ../../../library/stdtypes.rst:3374 msgid "interpolation, printf" msgstr "" -#: ../../../library/stdtypes.rst:3098 ../../../library/stdtypes.rst:4405 +#: ../../../library/stdtypes.rst:3374 ../../../library/stdtypes.rst:4681 msgid "printf-style formatting" msgstr "" -#: ../../../library/stdtypes.rst:3098 ../../../library/stdtypes.rst:4405 +#: ../../../library/stdtypes.rst:3374 ../../../library/stdtypes.rst:4681 msgid "sprintf-style formatting" msgstr "" -#: ../../../library/stdtypes.rst:3135 ../../../library/stdtypes.rst:4437 +#: ../../../library/stdtypes.rst:3411 ../../../library/stdtypes.rst:4713 msgid "() (parentheses)" msgstr "" -#: ../../../library/stdtypes.rst:3135 ../../../library/stdtypes.rst:3178 -#: ../../../library/stdtypes.rst:4437 ../../../library/stdtypes.rst:4480 +#: ../../../library/stdtypes.rst:3411 ../../../library/stdtypes.rst:3454 +#: ../../../library/stdtypes.rst:4713 ../../../library/stdtypes.rst:4756 msgid "in printf-style formatting" msgstr "" -#: ../../../library/stdtypes.rst:3135 ../../../library/stdtypes.rst:4437 +#: ../../../library/stdtypes.rst:3411 ../../../library/stdtypes.rst:4713 msgid ". (dot)" msgstr "" -#: ../../../library/stdtypes.rst:3178 ../../../library/stdtypes.rst:4480 +#: ../../../library/stdtypes.rst:3454 ../../../library/stdtypes.rst:4756 msgid "# (hash)" msgstr "" -#: ../../../library/stdtypes.rst:3178 ../../../library/stdtypes.rst:4480 +#: ../../../library/stdtypes.rst:3454 ../../../library/stdtypes.rst:4756 msgid "space" msgstr "" -#: ../../../library/stdtypes.rst:3298 +#: ../../../library/stdtypes.rst:3574 msgid "binary sequence types" msgstr "" -#: ../../../library/stdtypes.rst:3306 +#: ../../../library/stdtypes.rst:3582 msgid "memoryview" msgstr "" -#: ../../../library/stdtypes.rst:3306 +#: ../../../library/stdtypes.rst:3582 msgid "array" msgstr "" -#: ../../../library/stdtypes.rst:4259 +#: ../../../library/stdtypes.rst:4535 msgid "bytes.splitlines method" msgstr "" -#: ../../../library/stdtypes.rst:4259 +#: ../../../library/stdtypes.rst:4535 msgid "bytearray.splitlines method" msgstr "" -#: ../../../library/stdtypes.rst:4405 +#: ../../../library/stdtypes.rst:4681 msgid "formatting" msgstr "" -#: ../../../library/stdtypes.rst:4405 +#: ../../../library/stdtypes.rst:4681 msgid "bytes (%)" msgstr "" -#: ../../../library/stdtypes.rst:4405 +#: ../../../library/stdtypes.rst:4681 msgid "bytearray (%)" msgstr "" -#: ../../../library/stdtypes.rst:4405 +#: ../../../library/stdtypes.rst:4681 msgid "interpolation" msgstr "" -#: ../../../library/stdtypes.rst:5141 +#: ../../../library/stdtypes.rst:5417 msgid "set" msgstr "" -#: ../../../library/stdtypes.rst:5359 +#: ../../../library/stdtypes.rst:5636 msgid "mapping" msgstr "" -#: ../../../library/stdtypes.rst:5359 +#: ../../../library/stdtypes.rst:5636 msgid "dictionary" msgstr "" -#: ../../../library/stdtypes.rst:5470 +#: ../../../library/stdtypes.rst:5749 msgid "__missing__()" msgstr "" -#: ../../../library/stdtypes.rst:5809 +#: ../../../library/stdtypes.rst:6088 msgid "context manager" msgstr "" -#: ../../../library/stdtypes.rst:5809 +#: ../../../library/stdtypes.rst:6088 msgid "context management protocol" msgstr "" -#: ../../../library/stdtypes.rst:5809 +#: ../../../library/stdtypes.rst:6088 msgid "context management" msgstr "" -#: ../../../library/stdtypes.rst:5884 +#: ../../../library/stdtypes.rst:6163 msgid "annotation" msgstr "" -#: ../../../library/stdtypes.rst:5884 +#: ../../../library/stdtypes.rst:6163 msgid "type annotation; type hint" msgstr "" -#: ../../../library/stdtypes.rst:5896 +#: ../../../library/stdtypes.rst:6175 msgid "GenericAlias" msgstr "" -#: ../../../library/stdtypes.rst:5896 +#: ../../../library/stdtypes.rst:6175 msgid "Generic" msgstr "" -#: ../../../library/stdtypes.rst:5896 +#: ../../../library/stdtypes.rst:6175 msgid "Alias" msgstr "" -#: ../../../library/stdtypes.rst:6164 +#: ../../../library/stdtypes.rst:6443 msgid "Union" msgstr "" -#: ../../../library/stdtypes.rst:6164 +#: ../../../library/stdtypes.rst:6443 msgid "union" msgstr "" -#: ../../../library/stdtypes.rst:6339 +#: ../../../library/stdtypes.rst:6618 msgid "method" msgstr "" -#: ../../../library/stdtypes.rst:6384 +#: ../../../library/stdtypes.rst:6663 msgid "code" msgstr "" -#: ../../../library/stdtypes.rst:6384 +#: ../../../library/stdtypes.rst:6663 msgid "code object" msgstr "" -#: ../../../library/stdtypes.rst:6391 +#: ../../../library/stdtypes.rst:6670 msgid "compile" msgstr "" -#: ../../../library/stdtypes.rst:6391 +#: ../../../library/stdtypes.rst:6670 msgid "__code__ (function object attribute)" msgstr "" -#: ../../../library/stdtypes.rst:6405 +#: ../../../library/stdtypes.rst:6684 msgid "exec" msgstr "" -#: ../../../library/stdtypes.rst:6405 +#: ../../../library/stdtypes.rst:6684 msgid "eval" msgstr "" -#: ../../../library/stdtypes.rst:6444 +#: ../../../library/stdtypes.rst:6723 msgid "..." msgstr "" -#: ../../../library/stdtypes.rst:6444 +#: ../../../library/stdtypes.rst:6723 msgid "ellipsis literal" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/sys.pot b/main/locale/pot/LC_MESSAGES/library/sys.pot index 0283e42207e..21cb7c310f7 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-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -88,9 +88,9 @@ msgstr "" #: ../../../library/sys.rst:70 ../../../library/sys.rst:346 #: ../../../library/sys.rst:416 ../../../library/sys.rst:838 #: ../../../library/sys.rst:856 ../../../library/sys.rst:1132 -#: ../../../library/sys.rst:1757 ../../../library/sys.rst:2055 -#: ../../../library/sys.rst:2070 ../../../library/sys.rst:2078 -#: ../../../library/sys.rst:2119 ../../../library/sys.rst:2364 +#: ../../../library/sys.rst:1770 ../../../library/sys.rst:2068 +#: ../../../library/sys.rst:2083 ../../../library/sys.rst:2091 +#: ../../../library/sys.rst:2132 ../../../library/sys.rst:2377 msgid "Availability" msgstr "" @@ -621,7 +621,7 @@ msgid "" "Refer to :ref:`sys-path-init-virtual-environments` for more information." msgstr "" -#: ../../../library/sys.rst:540 ../../../library/sys.rst:1722 +#: ../../../library/sys.rst:540 ../../../library/sys.rst:1735 msgid "" "When running under a :ref:`virtual environment `, :data:`prefix` " "and :data:`exec_prefix` are now set to the virtual environment prefix by " @@ -1111,7 +1111,7 @@ msgstr "" msgid "Returns the current lazy imports mode as a string." msgstr "" -#: ../../../library/sys.rst:922 ../../../library/sys.rst:1773 +#: ../../../library/sys.rst:922 ../../../library/sys.rst:1786 msgid "" "``\"normal\"``: Only imports explicitly marked with the ``lazy`` keyword are " "lazy" @@ -1121,7 +1121,7 @@ msgstr "" msgid "``\"all\"``: All top-level imports are potentially lazy" msgstr "" -#: ../../../library/sys.rst:926 ../../../library/sys.rst:1497 +#: ../../../library/sys.rst:926 ../../../library/sys.rst:1510 msgid "See also :func:`set_lazy_imports` and :pep:`810`." msgstr "" @@ -1397,7 +1397,7 @@ msgstr "" msgid "See :pep:`525` for more details." msgstr "" -#: ../../../library/sys.rst:1155 ../../../library/sys.rst:2024 +#: ../../../library/sys.rst:1155 ../../../library/sys.rst:2037 msgid "" "This function has been added on a provisional basis (see :pep:`411` for " "details.)" @@ -1409,7 +1409,7 @@ msgid "" "`set_coroutine_origin_tracking_depth`." msgstr "" -#: ../../../library/sys.rst:1167 ../../../library/sys.rst:2045 +#: ../../../library/sys.rst:1167 ../../../library/sys.rst:2058 msgid "" "This function has been added on a provisional basis (see :pep:`411` for " "details.) Use it only for debugging purposes." @@ -1729,36 +1729,58 @@ msgstr "" #: ../../../library/sys.rst:1490 msgid "" "A :class:`set` of fully qualified module name strings that have been lazily " -"imported in the current interpreter but not yet loaded. When a lazily " -"imported module is accessed for the first time, its name is removed from " -"this set." +"imported in the current interpreter but not yet loaded. When a lazily " +"imported module is accessed for the first time, its name is typically " +"removed from this set." msgstr "" #: ../../../library/sys.rst:1495 -msgid "This attribute is intended for debugging and introspection." +msgid "" +"The set may contain some additional strings. It is intended for debugging " +"and introspection, and consumers are expected to verify each entry's status." +msgstr "" + +#: ../../../library/sys.rst:1501 +msgid "Currently, :data:`!lazy_modules` may also contain:" +msgstr "" + +#: ../../../library/sys.rst:1503 +msgid "" +"names of *attributes* (non-modules), such as ``\"pathlib.Path\"`` after " +"running ``lazy from pathlib import Path``, and" +msgstr "" + +#: ../../../library/sys.rst:1505 +msgid "names of items than have already been accessed." +msgstr "" + +#: ../../../library/sys.rst:1507 +msgid "" +"In future versions of Python, these may be removed, and/or additional extras " +"may be added." msgstr "" -#: ../../../library/sys.rst:1504 +#: ../../../library/sys.rst:1517 msgid "" "An integer giving the maximum value a variable of type :c:type:`Py_ssize_t` " "can take. It's usually ``2**31 - 1`` on a 32-bit platform and ``2**63 - 1`` " "on a 64-bit platform." msgstr "" -#: ../../../library/sys.rst:1511 +#: ../../../library/sys.rst:1524 msgid "" "An integer giving the value of the largest Unicode code point, i.e. " "``1114111`` (``0x10FFFF`` in hexadecimal)." msgstr "" -#: ../../../library/sys.rst:1514 +#: ../../../library/sys.rst:1527 msgid "" "Before :pep:`393`, ``sys.maxunicode`` used to be either ``0xFFFF`` or " "``0x10FFFF``, depending on the configuration option that specified whether " "Unicode characters were stored as UCS-2 or UCS-4." msgstr "" -#: ../../../library/sys.rst:1522 +#: ../../../library/sys.rst:1535 msgid "" "A list of :term:`meta path finder` objects that have their :meth:`~importlib." "abc.MetaPathFinder.find_spec` methods called to see if one of the objects " @@ -1771,40 +1793,40 @@ msgid "" "``None`` if the module cannot be found." msgstr "" -#: ../../../library/sys.rst:1535 +#: ../../../library/sys.rst:1548 msgid ":class:`importlib.abc.MetaPathFinder`" msgstr "" -#: ../../../library/sys.rst:1536 +#: ../../../library/sys.rst:1549 msgid "" "The abstract base class defining the interface of finder objects on :data:" "`meta_path`." msgstr "" -#: ../../../library/sys.rst:1538 +#: ../../../library/sys.rst:1551 msgid ":class:`importlib.machinery.ModuleSpec`" msgstr "" -#: ../../../library/sys.rst:1539 +#: ../../../library/sys.rst:1552 msgid "" "The concrete class which :meth:`~importlib.abc.MetaPathFinder.find_spec` " "should return instances of." msgstr "" -#: ../../../library/sys.rst:1545 +#: ../../../library/sys.rst:1558 msgid "" ":term:`Module specs ` were introduced in Python 3.4, by :pep:" "`451`." msgstr "" -#: ../../../library/sys.rst:1550 +#: ../../../library/sys.rst:1563 msgid "" "Removed the fallback that looked for a :meth:`!find_module` method if a :" "data:`meta_path` entry didn't have a :meth:`~importlib.abc.MetaPathFinder." "find_spec` method." msgstr "" -#: ../../../library/sys.rst:1556 +#: ../../../library/sys.rst:1569 msgid "" "This is a dictionary that maps module names to modules which have already " "been loaded. This can be manipulated to force reloading of modules and " @@ -1816,13 +1838,13 @@ msgid "" "other threads." msgstr "" -#: ../../../library/sys.rst:1568 +#: ../../../library/sys.rst:1581 msgid "" "The list of the original command line arguments passed to the Python " "executable." msgstr "" -#: ../../../library/sys.rst:1571 +#: ../../../library/sys.rst:1584 msgid "" "The elements of :data:`sys.orig_argv` are the arguments to the Python " "interpreter, while the elements of :data:`sys.argv` are the arguments to the " @@ -1830,68 +1852,68 @@ msgid "" "in :data:`sys.orig_argv` and missing from :data:`sys.argv`." msgstr "" -#: ../../../library/sys.rst:1583 +#: ../../../library/sys.rst:1596 msgid "" "A list of strings that specifies the search path for modules. Initialized " "from the environment variable :envvar:`PYTHONPATH`, plus an installation-" "dependent default." msgstr "" -#: ../../../library/sys.rst:1587 +#: ../../../library/sys.rst:1600 msgid "" "By default, as initialized upon program startup, a potentially unsafe path " "is prepended to :data:`sys.path` (*before* the entries inserted as a result " "of :envvar:`PYTHONPATH`):" msgstr "" -#: ../../../library/sys.rst:1591 +#: ../../../library/sys.rst:1604 msgid "" "``python -m module`` command line: prepend the current working directory." msgstr "" -#: ../../../library/sys.rst:1593 +#: ../../../library/sys.rst:1606 msgid "" "``python script.py`` command line: prepend the script's directory. If it's a " "symbolic link, resolve symbolic links." msgstr "" -#: ../../../library/sys.rst:1595 +#: ../../../library/sys.rst:1608 msgid "" "``python -c code`` and ``python`` (REPL) command lines: prepend an empty " "string, which means the current working directory." msgstr "" -#: ../../../library/sys.rst:1598 +#: ../../../library/sys.rst:1611 msgid "" "To not prepend this potentially unsafe path, use the :option:`-P` command " "line option or the :envvar:`PYTHONSAFEPATH` environment variable." msgstr "" -#: ../../../library/sys.rst:1601 +#: ../../../library/sys.rst:1614 msgid "" "A program is free to modify this list for its own purposes. Only strings " "should be added to :data:`sys.path`; all other data types are ignored during " "import." msgstr "" -#: ../../../library/sys.rst:1607 +#: ../../../library/sys.rst:1620 msgid "" "Module :mod:`site` This describes how to use .pth files to extend :data:`sys." "path`." msgstr "" -#: ../../../library/sys.rst:1612 +#: ../../../library/sys.rst:1625 msgid "" "A list of callables that take a path argument to try to create a :term:" "`finder` for the path. If a finder can be created, it is to be returned by " "the callable, else raise :exc:`ImportError`." msgstr "" -#: ../../../library/sys.rst:1616 ../../../library/sys.rst:1627 +#: ../../../library/sys.rst:1629 ../../../library/sys.rst:1640 msgid "Originally specified in :pep:`302`." msgstr "" -#: ../../../library/sys.rst:1621 +#: ../../../library/sys.rst:1634 msgid "" "A dictionary acting as a cache for :term:`finder` objects. The keys are " "paths that have been passed to :data:`sys.path_hooks` and the values are the " @@ -1899,99 +1921,99 @@ msgid "" "is found on :data:`sys.path_hooks` then ``None`` is stored." msgstr "" -#: ../../../library/sys.rst:1632 +#: ../../../library/sys.rst:1645 msgid "A string containing a platform identifier. Known values are:" msgstr "" -#: ../../../library/sys.rst:1635 +#: ../../../library/sys.rst:1648 msgid "System" msgstr "" -#: ../../../library/sys.rst:1635 +#: ../../../library/sys.rst:1648 msgid "``platform`` value" msgstr "" -#: ../../../library/sys.rst:1637 +#: ../../../library/sys.rst:1650 msgid "AIX" msgstr "" -#: ../../../library/sys.rst:1637 +#: ../../../library/sys.rst:1650 msgid "``'aix'``" msgstr "" -#: ../../../library/sys.rst:1638 +#: ../../../library/sys.rst:1651 msgid "Android" msgstr "" -#: ../../../library/sys.rst:1638 +#: ../../../library/sys.rst:1651 msgid "``'android'``" msgstr "" -#: ../../../library/sys.rst:1639 +#: ../../../library/sys.rst:1652 msgid "Emscripten" msgstr "" -#: ../../../library/sys.rst:1639 +#: ../../../library/sys.rst:1652 msgid "``'emscripten'``" msgstr "" -#: ../../../library/sys.rst:1640 +#: ../../../library/sys.rst:1653 msgid "FreeBSD" msgstr "" -#: ../../../library/sys.rst:1640 +#: ../../../library/sys.rst:1653 msgid "``'freebsd'``" msgstr "" -#: ../../../library/sys.rst:1641 +#: ../../../library/sys.rst:1654 msgid "iOS" msgstr "" -#: ../../../library/sys.rst:1641 +#: ../../../library/sys.rst:1654 msgid "``'ios'``" msgstr "" -#: ../../../library/sys.rst:1642 +#: ../../../library/sys.rst:1655 msgid "Linux" msgstr "" -#: ../../../library/sys.rst:1642 +#: ../../../library/sys.rst:1655 msgid "``'linux'``" msgstr "" -#: ../../../library/sys.rst:1643 +#: ../../../library/sys.rst:1656 msgid "macOS" msgstr "" -#: ../../../library/sys.rst:1643 +#: ../../../library/sys.rst:1656 msgid "``'darwin'``" msgstr "" -#: ../../../library/sys.rst:1644 +#: ../../../library/sys.rst:1657 msgid "Windows" msgstr "" -#: ../../../library/sys.rst:1644 +#: ../../../library/sys.rst:1657 msgid "``'win32'``" msgstr "" -#: ../../../library/sys.rst:1645 +#: ../../../library/sys.rst:1658 msgid "Windows/Cygwin" msgstr "" -#: ../../../library/sys.rst:1645 +#: ../../../library/sys.rst:1658 msgid "``'cygwin'``" msgstr "" -#: ../../../library/sys.rst:1646 +#: ../../../library/sys.rst:1659 msgid "WASI" msgstr "" -#: ../../../library/sys.rst:1646 +#: ../../../library/sys.rst:1659 msgid "``'wasi'``" msgstr "" -#: ../../../library/sys.rst:1649 +#: ../../../library/sys.rst:1662 msgid "" "On Unix systems not listed in the table, the value is the lowercased OS name " "as returned by ``uname -s``, with the first part of the version as returned " @@ -2000,81 +2022,81 @@ msgid "" "therefore recommended to use the following idiom::" msgstr "" -#: ../../../library/sys.rst:1658 +#: ../../../library/sys.rst:1671 msgid "" "On Linux, :data:`sys.platform` doesn't contain the major version anymore. It " "is always ``'linux'``, instead of ``'linux2'`` or ``'linux3'``." msgstr "" -#: ../../../library/sys.rst:1662 +#: ../../../library/sys.rst:1675 msgid "" "On AIX, :data:`sys.platform` doesn't contain the major version anymore. It " "is always ``'aix'``, instead of ``'aix5'`` or ``'aix7'``." msgstr "" -#: ../../../library/sys.rst:1666 +#: ../../../library/sys.rst:1679 msgid "" "On Android, :data:`sys.platform` now returns ``'android'`` rather than " "``'linux'``." msgstr "" -#: ../../../library/sys.rst:1670 +#: ../../../library/sys.rst:1683 msgid "" "On FreeBSD, :data:`sys.platform` doesn't contain the major version anymore. " "It is always ``'freebsd'``, instead of ``'freebsd13'`` or ``'freebsd14'``." msgstr "" -#: ../../../library/sys.rst:1676 +#: ../../../library/sys.rst:1689 msgid "" ":data:`os.name` has a coarser granularity. :func:`os.uname` gives system-" "dependent version information." msgstr "" -#: ../../../library/sys.rst:1679 +#: ../../../library/sys.rst:1692 msgid "" "The :mod:`platform` module provides detailed checks for the system's " "identity." msgstr "" -#: ../../../library/sys.rst:1685 +#: ../../../library/sys.rst:1698 msgid "" "Name of the platform-specific library directory. It is used to build the " "path of standard library and the paths of installed extension modules." msgstr "" -#: ../../../library/sys.rst:1688 +#: ../../../library/sys.rst:1701 msgid "" "It is equal to ``\"lib\"`` on most platforms. On Fedora and SuSE, it is " "equal to ``\"lib64\"`` on 64-bit platforms which gives the following ``sys." "path`` paths (where ``X.Y`` is the Python ``major.minor`` version):" msgstr "" -#: ../../../library/sys.rst:1692 +#: ../../../library/sys.rst:1705 msgid "" "``/usr/lib64/pythonX.Y/``: Standard library (like ``os.py`` of the :mod:`os` " "module)" msgstr "" -#: ../../../library/sys.rst:1694 +#: ../../../library/sys.rst:1707 msgid "" "``/usr/lib64/pythonX.Y/lib-dynload/``: C extension modules of the standard " "library (like the :mod:`errno` module, the exact filename is platform " "specific)" msgstr "" -#: ../../../library/sys.rst:1697 +#: ../../../library/sys.rst:1710 msgid "" "``/usr/lib/pythonX.Y/site-packages/`` (always use ``lib``, not :data:`sys." "platlibdir`): Third-party modules" msgstr "" -#: ../../../library/sys.rst:1699 +#: ../../../library/sys.rst:1712 msgid "" "``/usr/lib64/pythonX.Y/site-packages/``: C extension modules of third-party " "packages" msgstr "" -#: ../../../library/sys.rst:1707 +#: ../../../library/sys.rst:1720 msgid "" "A string giving the site-specific directory prefix where the platform " "independent Python files are installed; on Unix, the default is :file:`/usr/" @@ -2083,7 +2105,7 @@ msgid "" "derived paths." msgstr "" -#: ../../../library/sys.rst:1715 +#: ../../../library/sys.rst:1728 msgid "" "If a :ref:`virtual environment ` is in effect, this :data:`prefix` " "will point to the virtual environment. The value for the Python installation " @@ -2091,7 +2113,7 @@ msgid "" "init-virtual-environments` for more information." msgstr "" -#: ../../../library/sys.rst:1739 +#: ../../../library/sys.rst:1752 msgid "" "Strings specifying the primary and secondary prompt of the interpreter. " "These are only defined if the interpreter is in interactive mode. Their " @@ -2101,7 +2123,7 @@ msgid "" "used to implement a dynamic prompt." msgstr "" -#: ../../../library/sys.rst:1749 +#: ../../../library/sys.rst:1762 msgid "" "Set the flags used by the interpreter for :c:func:`dlopen` calls, such as " "when the interpreter loads extension modules. Among other things, this will " @@ -2112,89 +2134,89 @@ msgid "" "g. :const:`os.RTLD_LAZY`)." msgstr "" -#: ../../../library/sys.rst:1761 +#: ../../../library/sys.rst:1774 msgid "" "Set the :ref:`integer string conversion length limitation " "` used by this interpreter. See also :func:" "`get_int_max_str_digits`." msgstr "" -#: ../../../library/sys.rst:1770 +#: ../../../library/sys.rst:1783 msgid "" "Sets the global lazy imports mode. The *mode* parameter must be one of the " "following strings:" msgstr "" -#: ../../../library/sys.rst:1775 +#: ../../../library/sys.rst:1788 msgid "``\"all\"``: All top-level imports become potentially lazy" msgstr "" -#: ../../../library/sys.rst:1777 +#: ../../../library/sys.rst:1790 msgid "" "This function is intended for advanced users who need to control lazy " "imports across their entire application. Library developers should generally " "not use this function as it affects the runtime execution of applications." msgstr "" -#: ../../../library/sys.rst:1782 +#: ../../../library/sys.rst:1795 msgid "" "In addition to the mode, lazy imports can be controlled via the filter " "provided by :func:`set_lazy_imports_filter`." msgstr "" -#: ../../../library/sys.rst:1785 +#: ../../../library/sys.rst:1798 msgid "See also :func:`get_lazy_imports` and :pep:`810`." msgstr "" -#: ../../../library/sys.rst:1792 +#: ../../../library/sys.rst:1805 msgid "" "Sets the lazy imports filter callback. The *filter* parameter must be a " "callable or ``None`` to clear the filter." msgstr "" -#: ../../../library/sys.rst:1795 +#: ../../../library/sys.rst:1808 msgid "" "The filter function is called for every potentially lazy import to determine " "whether it should actually be lazy. It should have the following signature::" msgstr "" -#: ../../../library/sys.rst:1802 +#: ../../../library/sys.rst:1815 msgid "The function is called with three positional arguments:" msgstr "" -#: ../../../library/sys.rst:1804 +#: ../../../library/sys.rst:1817 msgid "*importing_module* is the name of the module doing the import" msgstr "" -#: ../../../library/sys.rst:1805 +#: ../../../library/sys.rst:1818 msgid "" "*imported_module* is the resolved name of the module being imported (for " "example, ``lazy from .spam import eggs`` passes ``package.spam``)" msgstr "" -#: ../../../library/sys.rst:1808 +#: ../../../library/sys.rst:1821 msgid "" "*fromlist* is the tuple of names being imported (for ``from ... import`` " "statements), or ``None`` for regular imports" msgstr "" -#: ../../../library/sys.rst:1811 +#: ../../../library/sys.rst:1824 msgid "" "The filter should return ``True`` to allow the import to be lazy, or " "``False`` to force an eager import." msgstr "" -#: ../../../library/sys.rst:1814 +#: ../../../library/sys.rst:1827 msgid "" "This is an advanced feature intended for specialized users who need fine-" "grained control over lazy import behavior." msgstr "" -#: ../../../library/sys.rst:1817 +#: ../../../library/sys.rst:1830 msgid "See also :func:`get_lazy_imports_filter` and :pep:`810`." msgstr "" -#: ../../../library/sys.rst:1828 +#: ../../../library/sys.rst:1841 msgid "" "Set the system's profile function, which allows you to implement a Python " "source code profiler in Python. See chapter :ref:`profile` for more " @@ -2209,14 +2231,14 @@ msgid "" "in the profile function will cause itself unset." msgstr "" -#: ../../../library/sys.rst:1840 +#: ../../../library/sys.rst:1853 msgid "" "The same tracing mechanism is used for :func:`!setprofile` as :func:" "`settrace`. To trace calls with :func:`!setprofile` inside a tracing " "function (e.g. in a debugger breakpoint), see :func:`call_tracing`." msgstr "" -#: ../../../library/sys.rst:1844 +#: ../../../library/sys.rst:1857 msgid "" "Profile functions should have three arguments: *frame*, *event*, and *arg*. " "*frame* is the current stack frame. *event* is a string: ``'call'``, " @@ -2224,71 +2246,71 @@ msgid "" "depends on the event type." msgstr "" -#: ../../../library/sys.rst:1849 ../../../library/sys.rst:1936 +#: ../../../library/sys.rst:1862 ../../../library/sys.rst:1949 msgid "The events have the following meaning:" msgstr "" -#: ../../../library/sys.rst:1851 ../../../library/sys.rst:1938 +#: ../../../library/sys.rst:1864 ../../../library/sys.rst:1951 msgid "``'call'``" msgstr "" -#: ../../../library/sys.rst:1852 +#: ../../../library/sys.rst:1865 msgid "" "A function is called (or some other code block entered). The profile " "function is called; *arg* is ``None``." msgstr "" -#: ../../../library/sys.rst:1855 ../../../library/sys.rst:1953 +#: ../../../library/sys.rst:1868 ../../../library/sys.rst:1966 msgid "``'return'``" msgstr "" -#: ../../../library/sys.rst:1856 +#: ../../../library/sys.rst:1869 msgid "" "A function (or other code block) is about to return. The profile function " "is called; *arg* is the value that will be returned, or ``None`` if the " "event is caused by an exception being raised." msgstr "" -#: ../../../library/sys.rst:1860 +#: ../../../library/sys.rst:1873 msgid "``'c_call'``" msgstr "" -#: ../../../library/sys.rst:1861 +#: ../../../library/sys.rst:1874 msgid "" "A C function is about to be called. This may be an extension function or a " "built-in. *arg* is the C function object." msgstr "" -#: ../../../library/sys.rst:1864 +#: ../../../library/sys.rst:1877 msgid "``'c_return'``" msgstr "" -#: ../../../library/sys.rst:1865 +#: ../../../library/sys.rst:1878 msgid "A C function has returned. *arg* is the C function object." msgstr "" -#: ../../../library/sys.rst:1867 +#: ../../../library/sys.rst:1880 msgid "``'c_exception'``" msgstr "" -#: ../../../library/sys.rst:1868 +#: ../../../library/sys.rst:1881 msgid "A C function has raised an exception. *arg* is the C function object." msgstr "" -#: ../../../library/sys.rst:1870 +#: ../../../library/sys.rst:1883 msgid "" "Raises an :ref:`auditing event ` ``sys.setprofile`` with no " "arguments." msgstr "" -#: ../../../library/sys.rst:1875 +#: ../../../library/sys.rst:1888 msgid "" "Set the maximum depth of the Python interpreter stack to *limit*. This " "limit prevents infinite recursion from causing an overflow of the C stack " "and crashing Python." msgstr "" -#: ../../../library/sys.rst:1879 +#: ../../../library/sys.rst:1892 msgid "" "The highest possible limit is platform-dependent. A user may need to set " "the limit higher when they have a program that requires deep recursion and a " @@ -2296,19 +2318,19 @@ msgid "" "because a too-high limit can lead to a crash." msgstr "" -#: ../../../library/sys.rst:1884 +#: ../../../library/sys.rst:1897 msgid "" "If the new limit is too low at the current recursion depth, a :exc:" "`RecursionError` exception is raised." msgstr "" -#: ../../../library/sys.rst:1887 +#: ../../../library/sys.rst:1900 msgid "" "A :exc:`RecursionError` exception is now raised if the new limit is too low " "at the current recursion depth." msgstr "" -#: ../../../library/sys.rst:1894 +#: ../../../library/sys.rst:1907 msgid "" "Set the interpreter's thread switch interval (in seconds). This floating-" "point value determines the ideal duration of the \"timeslices\" allocated to " @@ -2319,7 +2341,7 @@ msgid "" "scheduler." msgstr "" -#: ../../../library/sys.rst:1911 +#: ../../../library/sys.rst:1924 msgid "" "Set the system's trace function, which allows you to implement a Python " "source code debugger in Python. The function is thread-specific; for a " @@ -2328,7 +2350,7 @@ msgid "" "`threading.settrace`." msgstr "" -#: ../../../library/sys.rst:1916 +#: ../../../library/sys.rst:1929 msgid "" "Trace functions should have three arguments: *frame*, *event*, and *arg*. " "*frame* is the :ref:`current stack frame `. *event* is a " @@ -2336,7 +2358,7 @@ msgid "" "``'opcode'``. *arg* depends on the event type." msgstr "" -#: ../../../library/sys.rst:1921 +#: ../../../library/sys.rst:1934 msgid "" "The trace function is invoked (with *event* set to ``'call'``) whenever a " "new local scope is entered; it should return a reference to a local trace " @@ -2344,36 +2366,36 @@ msgid "" "traced." msgstr "" -#: ../../../library/sys.rst:1926 +#: ../../../library/sys.rst:1939 msgid "" "The local trace function should return a reference to itself, or to another " "function which would then be used as the local trace function for the scope." msgstr "" -#: ../../../library/sys.rst:1929 +#: ../../../library/sys.rst:1942 msgid "" "If there is any error occurred in the trace function, it will be unset, just " "like ``settrace(None)`` is called." msgstr "" -#: ../../../library/sys.rst:1933 +#: ../../../library/sys.rst:1946 msgid "" "Tracing is disabled while calling the trace function (e.g. a function set " "by :func:`!settrace`). For recursive tracing see :func:`call_tracing`." msgstr "" -#: ../../../library/sys.rst:1939 +#: ../../../library/sys.rst:1952 msgid "" "A function is called (or some other code block entered). The global trace " "function is called; *arg* is ``None``; the return value specifies the local " "trace function." msgstr "" -#: ../../../library/sys.rst:1943 +#: ../../../library/sys.rst:1956 msgid "``'line'``" msgstr "" -#: ../../../library/sys.rst:1944 +#: ../../../library/sys.rst:1957 msgid "" "The interpreter is about to execute a new line of code or re-execute the " "condition of a loop. The local trace function is called; *arg* is ``None``; " @@ -2383,7 +2405,7 @@ msgid "" "f_trace_lines` to :const:`False` on that :ref:`frame `." msgstr "" -#: ../../../library/sys.rst:1954 +#: ../../../library/sys.rst:1967 msgid "" "A function (or other code block) is about to return. The local trace " "function is called; *arg* is the value that will be returned, or ``None`` if " @@ -2391,22 +2413,22 @@ msgid "" "return value is ignored." msgstr "" -#: ../../../library/sys.rst:1959 +#: ../../../library/sys.rst:1972 msgid "``'exception'``" msgstr "" -#: ../../../library/sys.rst:1960 +#: ../../../library/sys.rst:1973 msgid "" "An exception has occurred. The local trace function is called; *arg* is a " "tuple ``(exception, value, traceback)``; the return value specifies the new " "local trace function." msgstr "" -#: ../../../library/sys.rst:1964 +#: ../../../library/sys.rst:1977 msgid "``'opcode'``" msgstr "" -#: ../../../library/sys.rst:1965 +#: ../../../library/sys.rst:1978 msgid "" "The interpreter is about to execute a new opcode (see :mod:`dis` for opcode " "details). The local trace function is called; *arg* is ``None``; the return " @@ -2416,13 +2438,13 @@ msgid "" "objects>`." msgstr "" -#: ../../../library/sys.rst:1972 +#: ../../../library/sys.rst:1985 msgid "" "Note that as an exception is propagated down the chain of callers, an " "``'exception'`` event is generated at each level." msgstr "" -#: ../../../library/sys.rst:1975 +#: ../../../library/sys.rst:1988 msgid "" "For more fine-grained usage, it's possible to set a trace function by " "assigning ``frame.f_trace = tracefunc`` explicitly, rather than relying on " @@ -2436,17 +2458,17 @@ msgid "" "on each frame)." msgstr "" -#: ../../../library/sys.rst:1986 +#: ../../../library/sys.rst:1999 msgid "For more information on code and frame objects, refer to :ref:`types`." msgstr "" -#: ../../../library/sys.rst:1988 +#: ../../../library/sys.rst:2001 msgid "" "Raises an :ref:`auditing event ` ``sys.settrace`` with no " "arguments." msgstr "" -#: ../../../library/sys.rst:1992 +#: ../../../library/sys.rst:2005 msgid "" "The :func:`settrace` function is intended only for implementing debuggers, " "profilers, coverage tools and the like. Its behavior is part of the " @@ -2454,13 +2476,13 @@ msgid "" "thus may not be available in all Python implementations." msgstr "" -#: ../../../library/sys.rst:1999 +#: ../../../library/sys.rst:2012 msgid "" "``'opcode'`` event type added; :attr:`~frame.f_trace_lines` and :attr:" "`~frame.f_trace_opcodes` attributes added to frames" msgstr "" -#: ../../../library/sys.rst:2004 +#: ../../../library/sys.rst:2017 msgid "" "Accepts two optional keyword arguments which are callables that accept an :" "term:`asynchronous generator iterator` as an argument. The *firstiter* " @@ -2469,32 +2491,32 @@ msgid "" "about to be garbage collected." msgstr "" -#: ../../../library/sys.rst:2010 +#: ../../../library/sys.rst:2023 msgid "" "Raises an :ref:`auditing event ` ``sys." "set_asyncgen_hooks_firstiter`` with no arguments." msgstr "" -#: ../../../library/sys.rst:2012 +#: ../../../library/sys.rst:2025 msgid "" "Raises an :ref:`auditing event ` ``sys." "set_asyncgen_hooks_finalizer`` with no arguments." msgstr "" -#: ../../../library/sys.rst:2014 +#: ../../../library/sys.rst:2027 msgid "" "Two auditing events are raised because the underlying API consists of two " "calls, each of which must raise its own event." msgstr "" -#: ../../../library/sys.rst:2017 +#: ../../../library/sys.rst:2030 msgid "" "See :pep:`525` for more details, and for a reference example of a " "*finalizer* method see the implementation of ``asyncio.Loop." "shutdown_asyncgens`` in :source:`Lib/asyncio/base_events.py`" msgstr "" -#: ../../../library/sys.rst:2029 +#: ../../../library/sys.rst:2042 msgid "" "Allows enabling or disabling coroutine origin tracking. When enabled, the " "``cr_origin`` attribute on coroutine objects will contain a tuple of " @@ -2503,53 +2525,53 @@ msgid "" "disabled, ``cr_origin`` will be ``None``." msgstr "" -#: ../../../library/sys.rst:2036 +#: ../../../library/sys.rst:2049 msgid "" "To enable, pass a *depth* value greater than zero; this sets the number of " "frames whose information will be captured. To disable, set *depth* to zero." msgstr "" -#: ../../../library/sys.rst:2040 +#: ../../../library/sys.rst:2053 msgid "This setting is thread-specific." msgstr "" -#: ../../../library/sys.rst:2050 +#: ../../../library/sys.rst:2063 msgid "" "Activate the stack profiler trampoline *backend*. The only supported backend " "is ``\"perf\"``." msgstr "" -#: ../../../library/sys.rst:2053 +#: ../../../library/sys.rst:2066 msgid "Stack trampolines cannot be activated if the JIT is active." msgstr "" -#: ../../../library/sys.rst:2061 +#: ../../../library/sys.rst:2074 msgid ":ref:`perf_profiling`" msgstr "" -#: ../../../library/sys.rst:2062 +#: ../../../library/sys.rst:2075 msgid "https://perf.wiki.kernel.org" msgstr "" -#: ../../../library/sys.rst:2066 +#: ../../../library/sys.rst:2079 msgid "Deactivate the current stack profiler trampoline backend." msgstr "" -#: ../../../library/sys.rst:2068 +#: ../../../library/sys.rst:2081 msgid "If no stack profiler is activated, this function has no effect." msgstr "" -#: ../../../library/sys.rst:2076 +#: ../../../library/sys.rst:2089 msgid "Return ``True`` if a stack profiler trampoline is active." msgstr "" -#: ../../../library/sys.rst:2085 +#: ../../../library/sys.rst:2098 msgid "" "Executes *script*, a file containing Python code in the remote process with " "the given *pid*." msgstr "" -#: ../../../library/sys.rst:2088 +#: ../../../library/sys.rst:2101 msgid "" "This function returns immediately, and the code will be executed by the " "target process's main thread at the next available opportunity, similarly to " @@ -2559,7 +2581,7 @@ msgid "" "been overwritten." msgstr "" -#: ../../../library/sys.rst:2095 +#: ../../../library/sys.rst:2108 msgid "" "The remote process must be running a CPython interpreter of the same major " "and minor version as the local process. If either the local or remote " @@ -2567,13 +2589,13 @@ msgid "" "local and remote interpreters must be the same exact version." msgstr "" -#: ../../../library/sys.rst:2100 +#: ../../../library/sys.rst:2113 msgid "" "See :ref:`remote-debugging` for more information about the remote debugging " "mechanism." msgstr "" -#: ../../../library/sys.rst:2103 ../../../library/sys.rst:2105 +#: ../../../library/sys.rst:2116 ../../../library/sys.rst:2118 msgid "" "When the code is executed in the remote process, an :ref:`auditing event " "` ``sys.remote_exec`` is raised with the *pid* and the path to the " @@ -2581,7 +2603,7 @@ msgid "" "remote_exec`." msgstr "" -#: ../../../library/sys.rst:2110 ../../../library/sys.rst:2112 +#: ../../../library/sys.rst:2123 ../../../library/sys.rst:2125 msgid "" "When the script is executed in the remote process, an :ref:`auditing event " "` ``cpython.remote_debugger_script`` is raised with the path in " @@ -2589,45 +2611,45 @@ msgid "" "that called :func:`sys.remote_exec`." msgstr "" -#: ../../../library/sys.rst:2120 +#: ../../../library/sys.rst:2133 msgid "See :pep:`768` for more details." msgstr "" -#: ../../../library/sys.rst:2128 +#: ../../../library/sys.rst:2141 msgid "" ":term:`File objects ` used by the interpreter for standard " "input, output and errors:" msgstr "" -#: ../../../library/sys.rst:2131 +#: ../../../library/sys.rst:2144 msgid "" "``stdin`` is used for all interactive input (including calls to :func:" "`input`);" msgstr "" -#: ../../../library/sys.rst:2133 +#: ../../../library/sys.rst:2146 msgid "" "``stdout`` is used for the output of :func:`print` and :term:`expression` " "statements and for the prompts of :func:`input`;" msgstr "" -#: ../../../library/sys.rst:2135 +#: ../../../library/sys.rst:2148 msgid "The interpreter's own prompts and its error messages go to ``stderr``." msgstr "" -#: ../../../library/sys.rst:2137 +#: ../../../library/sys.rst:2150 msgid "" "These streams are regular :term:`text files ` like those returned " "by the :func:`open` function. Their parameters are chosen as follows:" msgstr "" -#: ../../../library/sys.rst:2141 +#: ../../../library/sys.rst:2154 msgid "" "The encoding and error handling are initialized from :c:member:`PyConfig." "stdio_encoding` and :c:member:`PyConfig.stdio_errors`." msgstr "" -#: ../../../library/sys.rst:2144 +#: ../../../library/sys.rst:2157 msgid "" "On Windows, UTF-8 is used for the console device. Non-character devices " "such as disk files and pipes use the system locale encoding (i.e. the ANSI " @@ -2638,14 +2660,14 @@ msgid "" "initially attached to a console." msgstr "" -#: ../../../library/sys.rst:2153 +#: ../../../library/sys.rst:2166 msgid "" "The special behaviour of the console can be overridden by setting the " "environment variable PYTHONLEGACYWINDOWSSTDIO before starting Python. In " "that case, the console codepages are used as for any other character device." msgstr "" -#: ../../../library/sys.rst:2158 +#: ../../../library/sys.rst:2171 msgid "" "Under all platforms, you can override the character encoding by setting the :" "envvar:`PYTHONIOENCODING` environment variable before starting Python or by " @@ -2654,7 +2676,7 @@ msgid "" "only applies when :envvar:`PYTHONLEGACYWINDOWSSTDIO` is also set." msgstr "" -#: ../../../library/sys.rst:2165 +#: ../../../library/sys.rst:2178 msgid "" "When interactive, the ``stdout`` stream is line-buffered. Otherwise, it is " "block-buffered like regular text files. The ``stderr`` stream is line-" @@ -2663,19 +2685,19 @@ msgid "" "`PYTHONUNBUFFERED` environment variable." msgstr "" -#: ../../../library/sys.rst:2171 +#: ../../../library/sys.rst:2184 msgid "" "Non-interactive ``stderr`` is now line-buffered instead of fully buffered." msgstr "" -#: ../../../library/sys.rst:2177 +#: ../../../library/sys.rst:2190 msgid "" "To write or read binary data from/to the standard streams, use the " "underlying binary :data:`~io.TextIOBase.buffer` object. For example, to " "write bytes to :data:`stdout`, use ``sys.stdout.buffer.write(b'abc')``." msgstr "" -#: ../../../library/sys.rst:2181 +#: ../../../library/sys.rst:2194 msgid "" "However, if you are writing a library (and do not control in which context " "its code will be executed), be aware that the standard streams may be " @@ -2683,7 +2705,7 @@ msgid "" "support the :attr:`!buffer` attribute." msgstr "" -#: ../../../library/sys.rst:2191 +#: ../../../library/sys.rst:2204 msgid "" "These objects contain the original values of ``stdin``, ``stderr`` and " "``stdout`` at the start of the program. They are used during finalization, " @@ -2691,7 +2713,7 @@ msgid "" "``sys.std*`` object has been redirected." msgstr "" -#: ../../../library/sys.rst:2196 +#: ../../../library/sys.rst:2209 msgid "" "It can also be used to restore the actual files to known working file " "objects in case they have been overwritten with a broken object. However, " @@ -2699,7 +2721,7 @@ msgid "" "before replacing it, and restore the saved object." msgstr "" -#: ../../../library/sys.rst:2202 +#: ../../../library/sys.rst:2215 msgid "" "Under some conditions ``stdin``, ``stdout`` and ``stderr`` as well as the " "original values ``__stdin__``, ``__stdout__`` and ``__stderr__`` can be " @@ -2707,12 +2729,12 @@ msgid "" "to a console and Python apps started with :program:`pythonw`." msgstr "" -#: ../../../library/sys.rst:2210 +#: ../../../library/sys.rst:2223 msgid "" "A frozenset of strings containing the names of standard library modules." msgstr "" -#: ../../../library/sys.rst:2212 +#: ../../../library/sys.rst:2225 msgid "" "It is the same on all platforms. Modules which are not available on some " "platforms and modules disabled at Python build are also listed. All module " @@ -2720,7 +2742,7 @@ msgid "" "modules are excluded." msgstr "" -#: ../../../library/sys.rst:2217 +#: ../../../library/sys.rst:2230 msgid "" "For packages, only the main package is listed: sub-packages and sub-modules " "are not listed. For example, the ``email`` package is listed, but the " @@ -2728,68 +2750,68 @@ msgid "" "listed." msgstr "" -#: ../../../library/sys.rst:2222 +#: ../../../library/sys.rst:2235 msgid "See also the :data:`sys.builtin_module_names` list." msgstr "" -#: ../../../library/sys.rst:2229 +#: ../../../library/sys.rst:2242 msgid "" "A :term:`named tuple` holding information about the thread implementation." msgstr "" -#: ../../../library/sys.rst:2234 +#: ../../../library/sys.rst:2247 msgid "The name of the thread implementation:" msgstr "" -#: ../../../library/sys.rst:2236 +#: ../../../library/sys.rst:2249 msgid "``\"nt\"``: Windows threads" msgstr "" -#: ../../../library/sys.rst:2237 +#: ../../../library/sys.rst:2250 msgid "``\"pthread\"``: POSIX threads" msgstr "" -#: ../../../library/sys.rst:2238 +#: ../../../library/sys.rst:2251 msgid "" "``\"pthread-stubs\"``: stub POSIX threads (on WebAssembly platforms without " "threading support)" msgstr "" -#: ../../../library/sys.rst:2240 +#: ../../../library/sys.rst:2253 msgid "``\"solaris\"``: Solaris threads" msgstr "" -#: ../../../library/sys.rst:2244 +#: ../../../library/sys.rst:2257 msgid "The name of the lock implementation:" msgstr "" -#: ../../../library/sys.rst:2246 +#: ../../../library/sys.rst:2259 msgid "``\"semaphore\"``: a lock uses a semaphore (Python 3.14 and older)" msgstr "" -#: ../../../library/sys.rst:2247 +#: ../../../library/sys.rst:2260 msgid "" "``\"mutex+cond\"``: a lock uses a mutex and a condition variable (Python " "3.14 and older)" msgstr "" -#: ../../../library/sys.rst:2248 +#: ../../../library/sys.rst:2261 msgid "" "``\"pymutex\"``: a lock uses the :c:type:`PyMutex` implementation (Python " "3.15 and newer)" msgstr "" -#: ../../../library/sys.rst:2249 +#: ../../../library/sys.rst:2262 msgid "``None`` if this information is unknown" msgstr "" -#: ../../../library/sys.rst:2253 +#: ../../../library/sys.rst:2266 msgid "" "The name and version of the thread library. It is a string, or ``None`` if " "this information is unknown." msgstr "" -#: ../../../library/sys.rst:2261 +#: ../../../library/sys.rst:2274 msgid "" "When this variable is set to an integer value, it determines the maximum " "number of levels of traceback information printed when an unhandled " @@ -2798,42 +2820,42 @@ msgid "" "are printed." msgstr "" -#: ../../../library/sys.rst:2269 +#: ../../../library/sys.rst:2282 msgid "Handle an unraisable exception." msgstr "" -#: ../../../library/sys.rst:2271 +#: ../../../library/sys.rst:2284 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:2275 +#: ../../../library/sys.rst:2288 msgid "The *unraisable* argument has the following attributes:" msgstr "" -#: ../../../library/sys.rst:2277 +#: ../../../library/sys.rst:2290 msgid ":attr:`!exc_type`: Exception type." msgstr "" -#: ../../../library/sys.rst:2278 +#: ../../../library/sys.rst:2291 msgid ":attr:`!exc_value`: Exception value, can be ``None``." msgstr "" -#: ../../../library/sys.rst:2279 +#: ../../../library/sys.rst:2292 msgid ":attr:`!exc_traceback`: Exception traceback, can be ``None``." msgstr "" -#: ../../../library/sys.rst:2280 +#: ../../../library/sys.rst:2293 msgid ":attr:`!err_msg`: Error message, can be ``None``." msgstr "" -#: ../../../library/sys.rst:2281 +#: ../../../library/sys.rst:2294 msgid ":attr:`!object`: Object causing the exception, can be ``None``." msgstr "" -#: ../../../library/sys.rst:2283 +#: ../../../library/sys.rst:2296 msgid "" "The default hook formats :attr:`!err_msg` and :attr:`!object` as: " "``f'{err_msg}: {object!r}'``; use \"Exception ignored in\" error message if :" @@ -2842,35 +2864,35 @@ msgid "" "`environment variables `." msgstr "" -#: ../../../library/sys.rst:2289 +#: ../../../library/sys.rst:2302 msgid "" ":func:`sys.unraisablehook` can be overridden to control how unraisable " "exceptions are handled." msgstr "" -#: ../../../library/sys.rst:2292 +#: ../../../library/sys.rst:2305 msgid "Exceptions are now printed with colorful text." msgstr "" -#: ../../../library/sys.rst:2297 +#: ../../../library/sys.rst:2310 msgid ":func:`excepthook` which handles uncaught exceptions." msgstr "" -#: ../../../library/sys.rst:2301 +#: ../../../library/sys.rst:2314 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:2305 +#: ../../../library/sys.rst:2318 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:2309 ../../../library/sys.rst:2311 +#: ../../../library/sys.rst:2322 ../../../library/sys.rst:2324 msgid "" "Raise an auditing event ``sys.unraisablehook`` with arguments *hook*, " "*unraisable* when an exception that cannot be handled occurs. The " @@ -2878,7 +2900,7 @@ msgid "" "hook has been set, *hook* may be ``None``." msgstr "" -#: ../../../library/sys.rst:2320 +#: ../../../library/sys.rst:2333 msgid "" "A string containing the version number of the Python interpreter plus " "additional information on the build number and compiler used. This string " @@ -2887,19 +2909,19 @@ msgid "" "functions provided by the :mod:`platform` module." msgstr "" -#: ../../../library/sys.rst:2329 +#: ../../../library/sys.rst:2342 msgid "" "The C API version, equivalent to the C macro :c:macro:`PYTHON_API_VERSION`. " "Defined for backwards compatibility." msgstr "" -#: ../../../library/sys.rst:2332 +#: ../../../library/sys.rst:2345 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:2338 +#: ../../../library/sys.rst:2351 msgid "" "A tuple containing the five components of the version number: *major*, " "*minor*, *micro*, *releaselevel*, and *serial*. All values except " @@ -2910,18 +2932,18 @@ msgid "" "version_info.major`` and so on." msgstr "" -#: ../../../library/sys.rst:2346 +#: ../../../library/sys.rst:2359 msgid "Added named component attributes." msgstr "" -#: ../../../library/sys.rst:2351 +#: ../../../library/sys.rst:2364 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:2358 +#: ../../../library/sys.rst:2371 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 " @@ -2930,31 +2952,31 @@ msgid "" "has no effect on the registry keys used by Python." msgstr "" -#: ../../../library/sys.rst:2370 +#: ../../../library/sys.rst:2383 msgid "" "Namespace containing functions and constants for register callbacks and " "controlling monitoring events. See :mod:`sys.monitoring` for details." msgstr "" -#: ../../../library/sys.rst:2376 +#: ../../../library/sys.rst:2389 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:2392 +#: ../../../library/sys.rst:2405 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:2400 +#: ../../../library/sys.rst:2413 msgid "Citations" msgstr "" -#: ../../../library/sys.rst:2401 +#: ../../../library/sys.rst:2414 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/" @@ -2973,50 +2995,50 @@ msgstr "" msgid "traceback" msgstr "" -#: ../../../library/sys.rst:1066 ../../../library/sys.rst:1824 +#: ../../../library/sys.rst:1066 ../../../library/sys.rst:1837 msgid "profile function" msgstr "" -#: ../../../library/sys.rst:1066 ../../../library/sys.rst:1824 +#: ../../../library/sys.rst:1066 ../../../library/sys.rst:1837 msgid "profiler" msgstr "" -#: ../../../library/sys.rst:1075 ../../../library/sys.rst:1907 +#: ../../../library/sys.rst:1075 ../../../library/sys.rst:1920 msgid "trace function" msgstr "" -#: ../../../library/sys.rst:1075 ../../../library/sys.rst:1907 +#: ../../../library/sys.rst:1075 ../../../library/sys.rst:1920 msgid "debugger" msgstr "" -#: ../../../library/sys.rst:1581 +#: ../../../library/sys.rst:1594 msgid "module" msgstr "" -#: ../../../library/sys.rst:1581 +#: ../../../library/sys.rst:1594 msgid "search" msgstr "" -#: ../../../library/sys.rst:1581 +#: ../../../library/sys.rst:1594 msgid "path" msgstr "" -#: ../../../library/sys.rst:1733 +#: ../../../library/sys.rst:1746 msgid "interpreter prompts" msgstr "" -#: ../../../library/sys.rst:1733 +#: ../../../library/sys.rst:1746 msgid "prompts, interpreter" msgstr "" -#: ../../../library/sys.rst:1733 +#: ../../../library/sys.rst:1746 msgid ">>>" msgstr "" -#: ../../../library/sys.rst:1733 +#: ../../../library/sys.rst:1746 msgid "interpreter prompt" msgstr "" -#: ../../../library/sys.rst:1733 +#: ../../../library/sys.rst:1746 msgid "..." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/test.pot b/main/locale/pot/LC_MESSAGES/library/test.pot index 0ee7f44c06b..9d1ce016c08 100644 --- a/main/locale/pot/LC_MESSAGES/library/test.pot +++ b/main/locale/pot/LC_MESSAGES/library/test.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -265,119 +265,120 @@ msgstr "" #: ../../../library/test.rst:235 msgid "" -"``True`` when verbose output is enabled. Should be checked when more " -"detailed information is desired about a running test. *verbose* is set by :" -"mod:`test.regrtest`." +"How verbose the output is: the number of :option:`!-v` options which :mod:" +"`test.regrtest` was run with, and therefore ``0`` when verbose output is not " +"enabled. Should be checked when more detailed information is desired about " +"a running test." msgstr "" -#: ../../../library/test.rst:242 +#: ../../../library/test.rst:243 msgid "``True`` if the running interpreter is Jython." msgstr "" -#: ../../../library/test.rst:247 +#: ../../../library/test.rst:248 msgid "``True`` if ``sys.platform`` is ``android``." msgstr "" -#: ../../../library/test.rst:252 +#: ../../../library/test.rst:253 msgid "``True`` if ``sys.platform`` is ``emscripten``." msgstr "" -#: ../../../library/test.rst:257 +#: ../../../library/test.rst:258 msgid "``True`` if ``sys.platform`` is ``wasi``." msgstr "" -#: ../../../library/test.rst:262 +#: ../../../library/test.rst:263 msgid "``True`` if ``sys.platform`` is ``ios``, ``tvos``, or ``watchos``." msgstr "" -#: ../../../library/test.rst:267 +#: ../../../library/test.rst:268 msgid "" "``True`` if ``sys.platform`` is ``darwin`` or ``is_apple_mobile`` is " "``True``." msgstr "" -#: ../../../library/test.rst:272 +#: ../../../library/test.rst:273 msgid "Path for shell if not on Windows; otherwise ``None``." msgstr "" -#: ../../../library/test.rst:277 +#: ../../../library/test.rst:278 msgid "" "Timeout in seconds for tests using a network server listening on the network " "local loopback interface like ``127.0.0.1``." msgstr "" -#: ../../../library/test.rst:280 +#: ../../../library/test.rst:281 msgid "" "The timeout is long enough to prevent test failure: it takes into account " "that the client and the server can run in different threads or even " "different processes." msgstr "" -#: ../../../library/test.rst:284 +#: ../../../library/test.rst:285 msgid "" "The timeout should be long enough for :meth:`~socket.socket.connect`, :meth:" "`~socket.socket.recv` and :meth:`~socket.socket.send` methods of :class:" "`socket.socket`." msgstr "" -#: ../../../library/test.rst:288 +#: ../../../library/test.rst:289 msgid "Its default value is 10 seconds." msgstr "" -#: ../../../library/test.rst:290 +#: ../../../library/test.rst:291 msgid "See also :data:`INTERNET_TIMEOUT`." msgstr "" -#: ../../../library/test.rst:295 +#: ../../../library/test.rst:296 msgid "Timeout in seconds for network requests going to the internet." msgstr "" -#: ../../../library/test.rst:297 +#: ../../../library/test.rst:298 msgid "" "The timeout is short enough to prevent a test to wait for too long if the " "internet request is blocked for whatever reason." msgstr "" -#: ../../../library/test.rst:300 +#: ../../../library/test.rst:301 msgid "" "Usually, a timeout using :data:`INTERNET_TIMEOUT` should not mark a test as " "failed, but skip the test instead: see :func:`~test.support.socket_helper." "transient_internet`." msgstr "" -#: ../../../library/test.rst:304 +#: ../../../library/test.rst:305 msgid "Its default value is 1 minute." msgstr "" -#: ../../../library/test.rst:306 +#: ../../../library/test.rst:307 msgid "See also :data:`LOOPBACK_TIMEOUT`." msgstr "" -#: ../../../library/test.rst:311 +#: ../../../library/test.rst:312 msgid "" "Timeout in seconds to mark a test as failed if the test takes \"too long\"." msgstr "" -#: ../../../library/test.rst:313 +#: ../../../library/test.rst:314 msgid "" "The timeout value depends on the regrtest ``--timeout`` command line option." msgstr "" -#: ../../../library/test.rst:315 +#: ../../../library/test.rst:316 msgid "" "If a test using :data:`SHORT_TIMEOUT` starts to fail randomly on slow " "buildbots, use :data:`LONG_TIMEOUT` instead." msgstr "" -#: ../../../library/test.rst:318 +#: ../../../library/test.rst:319 msgid "Its default value is 30 seconds." msgstr "" -#: ../../../library/test.rst:323 +#: ../../../library/test.rst:324 msgid "Timeout in seconds to detect when a test hangs." msgstr "" -#: ../../../library/test.rst:325 +#: ../../../library/test.rst:326 msgid "" "It is long enough to reduce the risk of test failure on the slowest Python " "buildbots. It should not be used to mark a test as failed if the test takes " @@ -385,177 +386,177 @@ msgid "" "command line option." msgstr "" -#: ../../../library/test.rst:330 +#: ../../../library/test.rst:331 msgid "Its default value is 5 minutes." msgstr "" -#: ../../../library/test.rst:332 +#: ../../../library/test.rst:333 msgid "" "See also :data:`LOOPBACK_TIMEOUT`, :data:`INTERNET_TIMEOUT` and :data:" "`SHORT_TIMEOUT`." msgstr "" -#: ../../../library/test.rst:338 +#: ../../../library/test.rst:339 msgid "Set when tests can be skipped when they are not useful for PGO." msgstr "" -#: ../../../library/test.rst:343 +#: ../../../library/test.rst:344 msgid "" "A constant that is likely larger than the underlying OS pipe buffer size, to " "make writes blocking." msgstr "" -#: ../../../library/test.rst:349 +#: ../../../library/test.rst:350 msgid "" "``True`` if Python was built with the :c:macro:`Py_DEBUG` macro defined, " "that is, if Python was :ref:`built in debug mode `." msgstr "" -#: ../../../library/test.rst:358 +#: ../../../library/test.rst:359 msgid "" "A constant that is likely larger than the underlying OS socket buffer size, " "to make writes blocking." msgstr "" -#: ../../../library/test.rst:364 +#: ../../../library/test.rst:365 msgid "Set to the top level directory that contains :mod:`!test.support`." msgstr "" -#: ../../../library/test.rst:369 +#: ../../../library/test.rst:370 msgid "Set to the top level directory for the test package." msgstr "" -#: ../../../library/test.rst:374 +#: ../../../library/test.rst:375 msgid "Set to the ``data`` directory within the test package." msgstr "" -#: ../../../library/test.rst:379 +#: ../../../library/test.rst:380 msgid "Set to :data:`sys.maxsize` for big memory tests." msgstr "" -#: ../../../library/test.rst:384 +#: ../../../library/test.rst:385 msgid "" "Set by :func:`set_memlimit` as the memory limit for big memory tests. " "Limited by :data:`MAX_Py_ssize_t`." msgstr "" -#: ../../../library/test.rst:390 +#: ../../../library/test.rst:391 msgid "" "Set by :func:`set_memlimit` as the memory limit for big memory tests. Not " "limited by :data:`MAX_Py_ssize_t`." msgstr "" -#: ../../../library/test.rst:396 +#: ../../../library/test.rst:397 msgid "" "Set to ``True`` if Python is built without docstrings (the :c:macro:" "`WITH_DOC_STRINGS` macro is not defined). See the :option:`configure --" "without-doc-strings <--without-doc-strings>` option." msgstr "" -#: ../../../library/test.rst:400 +#: ../../../library/test.rst:401 msgid "See also the :data:`HAVE_DOCSTRINGS` variable." msgstr "" -#: ../../../library/test.rst:405 +#: ../../../library/test.rst:406 msgid "" "Set to ``True`` if function docstrings are available. See the :option:" "`python -OO <-O>` option, which strips docstrings of functions implemented " "in Python." msgstr "" -#: ../../../library/test.rst:408 +#: ../../../library/test.rst:409 msgid "See also the :data:`MISSING_C_DOCSTRINGS` variable." msgstr "" -#: ../../../library/test.rst:413 +#: ../../../library/test.rst:414 msgid "Define the URL of a dedicated HTTP server for the network tests." msgstr "" -#: ../../../library/test.rst:418 +#: ../../../library/test.rst:419 msgid "Object that is equal to anything. Used to test mixed type comparison." msgstr "" -#: ../../../library/test.rst:423 +#: ../../../library/test.rst:424 msgid "" "Object that is not equal to anything (even to :data:`ALWAYS_EQ`). Used to " "test mixed type comparison." msgstr "" -#: ../../../library/test.rst:429 +#: ../../../library/test.rst:430 msgid "" "Object that is greater than anything (except itself). Used to test mixed " "type comparison." msgstr "" -#: ../../../library/test.rst:435 +#: ../../../library/test.rst:436 msgid "" "Object that is less than anything (except itself). Used to test mixed type " "comparison." msgstr "" -#: ../../../library/test.rst:439 +#: ../../../library/test.rst:440 msgid "The :mod:`!test.support` module defines the following functions:" msgstr "" -#: ../../../library/test.rst:443 +#: ../../../library/test.rst:444 msgid "Run the loop body until ``break`` stops the loop." msgstr "" -#: ../../../library/test.rst:445 +#: ../../../library/test.rst:446 msgid "" "After *timeout* seconds, raise an :exc:`AssertionError` if *error* is true, " "or just stop the loop if *error* is false." msgstr "" -#: ../../../library/test.rst:448 +#: ../../../library/test.rst:449 msgid "Example::" msgstr "" -#: ../../../library/test.rst:454 ../../../library/test.rst:478 +#: ../../../library/test.rst:455 ../../../library/test.rst:479 msgid "Example of error=False usage::" msgstr "" -#: ../../../library/test.rst:464 +#: ../../../library/test.rst:465 msgid "Wait strategy that applies exponential backoff." msgstr "" -#: ../../../library/test.rst:466 +#: ../../../library/test.rst:467 msgid "" "Run the loop body until ``break`` stops the loop. Sleep at each loop " "iteration, but not at the first iteration. The sleep delay is doubled at " "each iteration (up to *max_delay* seconds)." msgstr "" -#: ../../../library/test.rst:470 +#: ../../../library/test.rst:471 msgid "See :func:`busy_retry` documentation for the parameters usage." msgstr "" -#: ../../../library/test.rst:472 +#: ../../../library/test.rst:473 msgid "Example raising an exception after SHORT_TIMEOUT seconds::" msgstr "" -#: ../../../library/test.rst:488 +#: ../../../library/test.rst:489 msgid "" "Return ``True`` if *resource* is enabled and available. The list of " "available resources is only set when :mod:`test.regrtest` is executing the " "tests." msgstr "" -#: ../../../library/test.rst:495 +#: ../../../library/test.rst:496 msgid "" "Return the value specified for *resource* (as :samp:`-u {resource}={value}" "`). Return ``None`` if *resource* is disabled or no value is specified." msgstr "" -#: ../../../library/test.rst:501 +#: ../../../library/test.rst:502 msgid "Return ``True`` if Python was not built with ``-O0`` or ``-Og``." msgstr "" -#: ../../../library/test.rst:506 +#: ../../../library/test.rst:507 msgid "Return :const:`_testcapi.WITH_PYMALLOC`." msgstr "" -#: ../../../library/test.rst:511 +#: ../../../library/test.rst:512 msgid "" "Raise :exc:`ResourceDenied` if *resource* is not available. *msg* is the " "argument to :exc:`ResourceDenied` if it is raised. Always returns ``True`` " @@ -563,89 +564,89 @@ msgid "" "tests are executed by :mod:`test.regrtest`." msgstr "" -#: ../../../library/test.rst:519 +#: ../../../library/test.rst:520 msgid "Return a repr of *dict* with keys sorted." msgstr "" -#: ../../../library/test.rst:524 +#: ../../../library/test.rst:525 msgid "" "Return the path to the file named *filename*. If no match is found " "*filename* is returned. This does not equal a failure since it could be the " "path to the file." msgstr "" -#: ../../../library/test.rst:528 +#: ../../../library/test.rst:529 msgid "" "Setting *subdir* indicates a relative path to use to find the file rather " "than looking directly in the path directories." msgstr "" -#: ../../../library/test.rst:534 +#: ../../../library/test.rst:535 msgid "Get size of a page in bytes." msgstr "" -#: ../../../library/test.rst:541 +#: ../../../library/test.rst:542 msgid "" "Set the :func:`sys.setswitchinterval` to the given *interval*. Defines a " "minimum interval for Android systems to prevent the system from hanging." msgstr "" -#: ../../../library/test.rst:547 +#: ../../../library/test.rst:548 msgid "" "Use this check to guard CPython's implementation-specific tests or to run " "them only on the implementations guarded by the arguments. This function " "returns ``True`` or ``False`` depending on the host platform. Example usage::" msgstr "" -#: ../../../library/test.rst:559 +#: ../../../library/test.rst:560 msgid "" "Set the values for :data:`max_memuse` and :data:`real_max_memuse` for big " "memory tests." msgstr "" -#: ../../../library/test.rst:565 +#: ../../../library/test.rst:566 msgid "" "Store the value from *stdout*. It is meant to hold the stdout at the time " "the regrtest began." msgstr "" -#: ../../../library/test.rst:571 +#: ../../../library/test.rst:572 msgid "" "Return the original stdout set by :func:`record_original_stdout` or ``sys." "stdout`` if it's not set." msgstr "" -#: ../../../library/test.rst:577 +#: ../../../library/test.rst:578 msgid "" "Return a list of command line arguments reproducing the current settings in " "``sys.flags`` and ``sys.warnoptions``." msgstr "" -#: ../../../library/test.rst:583 +#: ../../../library/test.rst:584 msgid "" "Return a list of command line arguments reproducing the current optimization " "settings in ``sys.flags``." msgstr "" -#: ../../../library/test.rst:591 +#: ../../../library/test.rst:592 msgid "" "A context managers that temporarily replaces the named stream with :class:" "`io.StringIO` object." msgstr "" -#: ../../../library/test.rst:594 +#: ../../../library/test.rst:595 msgid "Example use with output streams::" msgstr "" -#: ../../../library/test.rst:602 +#: ../../../library/test.rst:603 msgid "Example use with input stream::" msgstr "" -#: ../../../library/test.rst:614 +#: ../../../library/test.rst:615 msgid "A context manager that temporary disables :mod:`faulthandler`." msgstr "" -#: ../../../library/test.rst:619 +#: ../../../library/test.rst:620 msgid "" "Force as many objects as possible to be collected. This is needed because " "timely deallocation is not guaranteed by the garbage collector. This means " @@ -653,112 +654,112 @@ msgid "" "remain alive for longer than expected." msgstr "" -#: ../../../library/test.rst:627 +#: ../../../library/test.rst:628 msgid "" "A context manager that disables the garbage collector on entry. On exit, the " "garbage collector is restored to its prior state." msgstr "" -#: ../../../library/test.rst:633 +#: ../../../library/test.rst:634 msgid "Context manager to swap out an attribute with a new object." msgstr "" -#: ../../../library/test.rst:635 ../../../library/test.rst:653 -#: ../../../library/test.rst:908 ../../../library/test.rst:1440 +#: ../../../library/test.rst:636 ../../../library/test.rst:654 +#: ../../../library/test.rst:909 ../../../library/test.rst:1441 msgid "Usage::" msgstr "" -#: ../../../library/test.rst:640 +#: ../../../library/test.rst:641 msgid "" "This will set ``obj.attr`` to 5 for the duration of the ``with`` block, " "restoring the old value at the end of the block. If ``attr`` doesn't exist " "on ``obj``, it will be created and then deleted at the end of the block." msgstr "" -#: ../../../library/test.rst:645 ../../../library/test.rst:663 +#: ../../../library/test.rst:646 ../../../library/test.rst:664 msgid "" "The old value (or ``None`` if it doesn't exist) will be assigned to the " "target of the \"as\" clause, if there is one." msgstr "" -#: ../../../library/test.rst:651 +#: ../../../library/test.rst:652 msgid "Context manager to swap out an item with a new object." msgstr "" -#: ../../../library/test.rst:658 +#: ../../../library/test.rst:659 msgid "" "This will set ``obj[\"item\"]`` to 5 for the duration of the ``with`` block, " "restoring the old value at the end of the block. If ``item`` doesn't exist " "on ``obj``, it will be created and then deleted at the end of the block." msgstr "" -#: ../../../library/test.rst:669 +#: ../../../library/test.rst:670 msgid "" "Call the ``flush()`` method on :data:`sys.stdout` and then on :data:`sys." "stderr`. It can be used to make sure that the logs order is consistent " "before writing into stderr." msgstr "" -#: ../../../library/test.rst:678 +#: ../../../library/test.rst:679 msgid "" "Print a warning into :data:`sys.__stderr__`. Format the message as: " "``f\"Warning -- {msg}\"``. If *msg* is made of multiple lines, add " "``\"Warning -- \"`` prefix to each line." msgstr "" -#: ../../../library/test.rst:687 +#: ../../../library/test.rst:688 msgid "" "Wait until process *pid* completes and check that the process exit code is " "*exitcode*." msgstr "" -#: ../../../library/test.rst:690 +#: ../../../library/test.rst:691 msgid "" "Raise an :exc:`AssertionError` if the process exit code is not equal to " "*exitcode*." msgstr "" -#: ../../../library/test.rst:693 +#: ../../../library/test.rst:694 msgid "" "If the process runs longer than *timeout* seconds (:data:`SHORT_TIMEOUT` by " "default), kill the process and raise an :exc:`AssertionError`. The timeout " "feature is not available on Windows." msgstr "" -#: ../../../library/test.rst:702 +#: ../../../library/test.rst:703 msgid "" "Return the size of the :c:type:`PyObject` whose structure members are " "defined by *fmt*. The returned value includes the size of the Python object " "header and alignment." msgstr "" -#: ../../../library/test.rst:708 +#: ../../../library/test.rst:709 msgid "" "Return the size of the :c:type:`PyVarObject` whose structure members are " "defined by *fmt*. The returned value includes the size of the Python object " "header and alignment." msgstr "" -#: ../../../library/test.rst:714 +#: ../../../library/test.rst:715 msgid "" "For testcase *test*, assert that the ``sys.getsizeof`` for *o* plus the GC " "header size equals *size*." msgstr "" -#: ../../../library/test.rst:720 +#: ../../../library/test.rst:721 msgid "" "A decorator to conditionally mark tests with :deco:`unittest." "expectedFailure`. Any use of this decorator should have an associated " "comment identifying the relevant tracker issue." msgstr "" -#: ../../../library/test.rst:727 +#: ../../../library/test.rst:728 msgid "" "A decorator that skips the decorated test on TLS certification validation " "failures." msgstr "" -#: ../../../library/test.rst:732 +#: ../../../library/test.rst:733 msgid "" "A decorator for running a function in a different locale, correctly " "resetting it after it has finished. *catstr* is the locale category as a " @@ -766,91 +767,91 @@ msgid "" "sequentially, and the first valid locale will be used." msgstr "" -#: ../../../library/test.rst:740 +#: ../../../library/test.rst:741 msgid "" "A decorator for running a function in a specific timezone, correctly " "resetting it after it has finished." msgstr "" -#: ../../../library/test.rst:746 +#: ../../../library/test.rst:747 msgid "" "Decorator for the minimum version when running test on FreeBSD. If the " "FreeBSD version is less than the minimum, the test is skipped." msgstr "" -#: ../../../library/test.rst:752 +#: ../../../library/test.rst:753 msgid "" "Decorator for the minimum version when running test on Linux. If the Linux " "version is less than the minimum, the test is skipped." msgstr "" -#: ../../../library/test.rst:758 +#: ../../../library/test.rst:759 msgid "" "Decorator for the minimum version when running test on macOS. If the macOS " "version is less than the minimum, the test is skipped." msgstr "" -#: ../../../library/test.rst:764 +#: ../../../library/test.rst:765 msgid "" "Decorator for skipping tests on the free-threaded build. If the :term:`GIL` " "is disabled, the test is skipped." msgstr "" -#: ../../../library/test.rst:770 +#: ../../../library/test.rst:771 msgid "Decorator for skipping tests on non-IEEE 754 platforms." msgstr "" -#: ../../../library/test.rst:775 +#: ../../../library/test.rst:776 msgid "Decorator for skipping tests if :mod:`zlib` doesn't exist." msgstr "" -#: ../../../library/test.rst:780 +#: ../../../library/test.rst:781 msgid "Decorator for skipping tests if :mod:`gzip` doesn't exist." msgstr "" -#: ../../../library/test.rst:785 +#: ../../../library/test.rst:786 msgid "Decorator for skipping tests if :mod:`bz2` doesn't exist." msgstr "" -#: ../../../library/test.rst:790 +#: ../../../library/test.rst:791 msgid "Decorator for skipping tests if :mod:`lzma` doesn't exist." msgstr "" -#: ../../../library/test.rst:795 +#: ../../../library/test.rst:796 msgid "Decorator for skipping tests if *resource* is not available." msgstr "" -#: ../../../library/test.rst:800 +#: ../../../library/test.rst:801 msgid "Decorator for only running the test if :data:`HAVE_DOCSTRINGS`." msgstr "" -#: ../../../library/test.rst:805 +#: ../../../library/test.rst:806 msgid "" "Decorator for only running the test if :ref:`Limited C API ` " "is available." msgstr "" -#: ../../../library/test.rst:811 +#: ../../../library/test.rst:812 msgid "Decorator for tests only applicable to CPython." msgstr "" -#: ../../../library/test.rst:816 +#: ../../../library/test.rst:817 msgid "" "Decorator for invoking :func:`check_impl_detail` on *guards*. If that " "returns ``False``, then uses *msg* as the reason for skipping the test." msgstr "" -#: ../../../library/test.rst:821 +#: ../../../library/test.rst:822 msgid "" "Decorator for marking tests as thread-unsafe. This test always runs in one " "thread even when invoked with ``--parallel-threads``." msgstr "" -#: ../../../library/test.rst:827 +#: ../../../library/test.rst:828 msgid "Decorator to temporarily turn off tracing for the duration of the test." msgstr "" -#: ../../../library/test.rst:832 +#: ../../../library/test.rst:833 msgid "" "Decorator for tests which involve reference counting. The decorator does " "not run the test if it is not run by CPython. Any trace function is unset " @@ -858,11 +859,11 @@ msgid "" "trace function." msgstr "" -#: ../../../library/test.rst:840 +#: ../../../library/test.rst:841 msgid "Decorator for bigmem tests." msgstr "" -#: ../../../library/test.rst:842 +#: ../../../library/test.rst:843 msgid "" "*size* is a requested size for the test (in arbitrary, test-interpreted " "units.) *memuse* is the number of bytes per unit for the test, or a good " @@ -870,7 +871,7 @@ msgid "" "each, could be decorated with ``@bigmemtest(size=_4G, memuse=2)``." msgstr "" -#: ../../../library/test.rst:847 +#: ../../../library/test.rst:848 msgid "" "The *size* argument is normally passed to the decorated test method as an " "extra argument. If *dry_run* is ``True``, the value passed to the test " @@ -878,11 +879,11 @@ msgid "" "means the test doesn't support dummy runs when ``-M`` is not specified." msgstr "" -#: ../../../library/test.rst:855 +#: ../../../library/test.rst:856 msgid "Decorator for tests that fill the address space." msgstr "" -#: ../../../library/test.rst:860 +#: ../../../library/test.rst:861 msgid "" "Return ``False`` if there is no evidence the interpreter was compiled with " "``musl``, otherwise return a version triple, either ``(0, 0, 0)`` if the " @@ -891,7 +892,7 @@ msgid "" "compiled with ``musl``; otherwise ``platform.libc_ver`` is checked." msgstr "" -#: ../../../library/test.rst:869 +#: ../../../library/test.rst:870 msgid "" "Test for syntax errors in *statement* by attempting to compile *statement*. " "*testcase* is the :mod:`unittest` instance for the test. *errtext* is the " @@ -901,44 +902,44 @@ msgid "" "of the exception." msgstr "" -#: ../../../library/test.rst:879 +#: ../../../library/test.rst:880 msgid "Open *url*. If open fails, raises :exc:`TestFailed`." msgstr "" -#: ../../../library/test.rst:884 +#: ../../../library/test.rst:885 msgid "" "Use this at the end of ``test_main`` whenever sub-processes are started. " "This will help ensure that no extra children (zombies) stick around to hog " "resources and create problems when looking for refleaks." msgstr "" -#: ../../../library/test.rst:891 +#: ../../../library/test.rst:892 msgid "" "Get an attribute, raising :exc:`unittest.SkipTest` if :exc:`AttributeError` " "is raised." msgstr "" -#: ../../../library/test.rst:897 +#: ../../../library/test.rst:898 msgid "" "Context manager catching unraisable exception using :func:`sys." "unraisablehook`." msgstr "" -#: ../../../library/test.rst:900 +#: ../../../library/test.rst:901 msgid "" "Storing the exception value (``cm.unraisable.exc_value``) creates a " "reference cycle. The reference cycle is broken explicitly when the context " "manager exits." msgstr "" -#: ../../../library/test.rst:904 +#: ../../../library/test.rst:905 msgid "" "Storing the object (``cm.unraisable.object``) can resurrect it if it is set " "to an object which is being finalized. Exiting the context manager clears " "the stored object." msgstr "" -#: ../../../library/test.rst:925 +#: ../../../library/test.rst:926 msgid "" "Generic implementation of the :mod:`unittest` ``load_tests`` protocol for " "use in test packages. *pkg_dir* is the root directory of the package; " @@ -947,33 +948,33 @@ msgid "" "the following::" msgstr "" -#: ../../../library/test.rst:940 +#: ../../../library/test.rst:941 msgid "" "Returns the set of attributes, functions or methods of *ref_api* not found " "on *other_api*, except for a defined list of items to be ignored in this " "check specified in *ignore*." msgstr "" -#: ../../../library/test.rst:944 +#: ../../../library/test.rst:945 msgid "" "By default this skips private attributes beginning with '_' but includes all " "magic methods, i.e. those starting and ending in '__'." msgstr "" -#: ../../../library/test.rst:952 +#: ../../../library/test.rst:953 msgid "" "Override *object_to_patch.attr_name* with *new_value*. Also add cleanup " "procedure to *test_instance* to restore *object_to_patch* for *attr_name*. " "The *attr_name* should be a valid attribute for *object_to_patch*." msgstr "" -#: ../../../library/test.rst:960 +#: ../../../library/test.rst:961 msgid "" "Run *code* in subinterpreter. Raise :exc:`unittest.SkipTest` if :mod:" "`tracemalloc` is enabled." msgstr "" -#: ../../../library/test.rst:968 +#: ../../../library/test.rst:969 msgid "" "Decorator that runs the decorated test in a fresh interpreter subprocess, in " "isolation, so that it does not share global or interpreter state with the " @@ -986,7 +987,7 @@ msgid "" "exception." msgstr "" -#: ../../../library/test.rst:978 +#: ../../../library/test.rst:979 msgid "" "When a **method** is decorated, only that method runs in a subprocess; all " "fixtures (:meth:`~unittest.TestCase.setUp` / :meth:`~unittest.TestCase." @@ -995,7 +996,7 @@ msgid "" "parent process (as usual) and in the subprocess around the method." msgstr "" -#: ../../../library/test.rst:984 +#: ../../../library/test.rst:985 msgid "" "When a **class** is decorated, the whole class runs in a single subprocess, " "and :meth:`~unittest.TestCase.setUpClass`, :meth:`~unittest.TestCase." @@ -1007,7 +1008,7 @@ msgid "" "too; test it with :data:`runningInSubprocess` if needed." msgstr "" -#: ../../../library/test.rst:994 +#: ../../../library/test.rst:995 msgid "" "The subprocess inherits the enabled resources (``-u``), memory limit (``-" "M``) and verbosity (``-v``) of the parent test run, so that :func:`~test." @@ -1015,7 +1016,7 @@ msgid "" "support.bigmemtest` and the like behave consistently in both processes." msgstr "" -#: ../../../library/test.rst:1000 +#: ../../../library/test.rst:1001 msgid "" "*options* is a sequence of interpreter command line options to run the " "subprocess with, and *env* is a mapping of environment variables to set in " @@ -1024,18 +1025,18 @@ msgid "" "ignore the ``PYTHON*`` environment variables, including :envvar:`PYTHONPATH`." msgstr "" -#: ../../../library/test.rst:1008 +#: ../../../library/test.rst:1009 msgid "" "*timeout* is the number of seconds to wait for the subprocess; the test is " "reported as an error if it does not complete in time. By default there is no " "timeout, and a hung test is left to the timeout of the test runner." msgstr "" -#: ../../../library/test.rst:1013 +#: ../../../library/test.rst:1014 msgid "The test is skipped on platforms without subprocess support." msgstr "" -#: ../../../library/test.rst:1018 +#: ../../../library/test.rst:1019 msgid "" "``True`` while the code runs in the isolated subprocess spawned by :func:" "`runInSubprocess`, and ``False`` otherwise (including in the parent process " @@ -1046,29 +1047,29 @@ msgid "" "to run in the subprocess." msgstr "" -#: ../../../library/test.rst:1032 +#: ../../../library/test.rst:1033 msgid "Assert instances of *cls* are deallocated after iterating." msgstr "" -#: ../../../library/test.rst:1037 +#: ../../../library/test.rst:1038 msgid "" "Check for the existence of the compiler executables whose names are listed " "in *cmd_names* or all the compiler executables when *cmd_names* is empty and " "return the first missing executable or ``None`` when none is found missing." msgstr "" -#: ../../../library/test.rst:1045 +#: ../../../library/test.rst:1046 msgid "" "Assert that the ``__all__`` variable of *module* contains all public names." msgstr "" -#: ../../../library/test.rst:1047 +#: ../../../library/test.rst:1048 msgid "" "The module's public names (its API) are detected automatically based on " "whether they match the public name convention and were defined in *module*." msgstr "" -#: ../../../library/test.rst:1051 +#: ../../../library/test.rst:1052 msgid "" "The *name_of_module* argument can specify (as a string or tuple thereof) " "what module(s) an API could be defined in order to be detected as a public " @@ -1076,7 +1077,7 @@ msgid "" "other modules, possibly a C backend (like ``csv`` and its ``_csv``)." msgstr "" -#: ../../../library/test.rst:1056 +#: ../../../library/test.rst:1057 msgid "" "The *extra* argument can be a set of names that wouldn't otherwise be " "automatically detected as \"public\", like objects without a proper :attr:" @@ -1084,28 +1085,28 @@ msgid "" "automatically detected ones." msgstr "" -#: ../../../library/test.rst:1060 +#: ../../../library/test.rst:1061 msgid "" "The *not_exported* argument can be a set of names that must not be treated " "as part of the public API even though their names indicate otherwise." msgstr "" -#: ../../../library/test.rst:1063 ../../../library/test.rst:1726 +#: ../../../library/test.rst:1064 ../../../library/test.rst:1727 msgid "Example use::" msgstr "" -#: ../../../library/test.rst:1086 +#: ../../../library/test.rst:1087 msgid "" "Skip tests if the :mod:`multiprocessing.synchronize` module is missing, if " "there is no available semaphore implementation, or if creating a lock raises " "an :exc:`OSError`." msgstr "" -#: ../../../library/test.rst:1095 +#: ../../../library/test.rst:1096 msgid "Assert that type *tp* cannot be instantiated using *args* and *kwds*." msgstr "" -#: ../../../library/test.rst:1102 +#: ../../../library/test.rst:1103 msgid "" "This function returns a context manager that will change the global :func:" "`sys.set_int_max_str_digits` setting for the duration of the context to " @@ -1113,73 +1114,73 @@ msgid "" "digits when converting between an integer and string." msgstr "" -#: ../../../library/test.rst:1110 +#: ../../../library/test.rst:1111 msgid "The :mod:`!test.support` module defines the following classes:" msgstr "" -#: ../../../library/test.rst:1115 +#: ../../../library/test.rst:1116 msgid "" "A context manager used to try to prevent crash dialog popups on tests that " "are expected to crash a subprocess." msgstr "" -#: ../../../library/test.rst:1118 +#: ../../../library/test.rst:1119 msgid "" "On Windows, it disables Windows Error Reporting dialogs using `SetErrorMode " "`_." msgstr "" -#: ../../../library/test.rst:1121 +#: ../../../library/test.rst:1122 msgid "" "On UNIX, :func:`resource.setrlimit` is used to set :const:`resource." "RLIMIT_CORE`'s soft limit to 0 to prevent coredump file creation." msgstr "" -#: ../../../library/test.rst:1125 +#: ../../../library/test.rst:1126 msgid "" "On both platforms, the old value is restored by :meth:`~object.__exit__`." msgstr "" -#: ../../../library/test.rst:1130 +#: ../../../library/test.rst:1131 msgid "" "Class to save and restore signal handlers registered by the Python signal " "handler." msgstr "" -#: ../../../library/test.rst:1135 +#: ../../../library/test.rst:1136 msgid "" "Save the signal handlers to a dictionary mapping signal numbers to the " "current signal handler." msgstr "" -#: ../../../library/test.rst:1140 +#: ../../../library/test.rst:1141 msgid "" "Set the signal numbers from the :meth:`save` dictionary to the saved handler." msgstr "" -#: ../../../library/test.rst:1148 +#: ../../../library/test.rst:1149 msgid "Try to match a single dict with the supplied arguments." msgstr "" -#: ../../../library/test.rst:1153 +#: ../../../library/test.rst:1154 msgid "Try to match a single stored value (*dv*) with a supplied value (*v*)." msgstr "" -#: ../../../library/test.rst:1157 +#: ../../../library/test.rst:1158 msgid ":mod:`!test.support.socket_helper` --- Utilities for socket tests" msgstr "" -#: ../../../library/test.rst:1163 +#: ../../../library/test.rst:1164 msgid "" "The :mod:`!test.support.socket_helper` module provides support for socket " "tests." msgstr "" -#: ../../../library/test.rst:1170 +#: ../../../library/test.rst:1171 msgid "Set to ``True`` if IPv6 is enabled on this host, ``False`` otherwise." msgstr "" -#: ../../../library/test.rst:1175 +#: ../../../library/test.rst:1176 msgid "" "Returns an unused port that should be suitable for binding. This is " "achieved by creating a temporary socket with the same family and type as the " @@ -1190,7 +1191,7 @@ msgid "" "port is returned." msgstr "" -#: ../../../library/test.rst:1184 +#: ../../../library/test.rst:1185 msgid "" "Either this method or :func:`bind_port` should be used for any tests where a " "server socket needs to be bound to a particular port for the duration of the " @@ -1203,7 +1204,7 @@ msgid "" "simultaneously, which is a problem for buildbots." msgstr "" -#: ../../../library/test.rst:1198 +#: ../../../library/test.rst:1199 msgid "" "Bind the socket to a free port and return the port number. Relies on " "ephemeral ports in order to ensure we are using an unbound port. This is " @@ -1216,7 +1217,7 @@ msgid "" "testing multicasting via multiple UDP sockets." msgstr "" -#: ../../../library/test.rst:1209 +#: ../../../library/test.rst:1210 msgid "" "Additionally, if the :const:`~socket.SO_EXCLUSIVEADDRUSE` socket option is " "available (i.e. on Windows), it will be set on the socket. This will " @@ -1224,58 +1225,58 @@ msgid "" "test." msgstr "" -#: ../../../library/test.rst:1217 +#: ../../../library/test.rst:1218 msgid "" "Bind a Unix socket, raising :exc:`unittest.SkipTest` if :exc:" "`PermissionError` is raised." msgstr "" -#: ../../../library/test.rst:1223 +#: ../../../library/test.rst:1224 msgid "" "A decorator for running tests that require a functional ``bind()`` for Unix " "sockets." msgstr "" -#: ../../../library/test.rst:1229 +#: ../../../library/test.rst:1230 msgid "" "A context manager that raises :exc:`~test.support.ResourceDenied` when " "various issues with the internet connection manifest themselves as " "exceptions." msgstr "" -#: ../../../library/test.rst:1235 +#: ../../../library/test.rst:1236 msgid "" ":mod:`!test.support.script_helper` --- Utilities for the Python execution " "tests" msgstr "" -#: ../../../library/test.rst:1241 +#: ../../../library/test.rst:1242 msgid "" "The :mod:`!test.support.script_helper` module provides support for Python's " "script execution tests." msgstr "" -#: ../../../library/test.rst:1246 +#: ../../../library/test.rst:1247 msgid "" "Return ``True`` if ``sys.executable interpreter`` requires environment " "variables in order to be able to run at all." msgstr "" -#: ../../../library/test.rst:1249 +#: ../../../library/test.rst:1250 msgid "" "This is designed to be used with ``@unittest.skipIf()`` to annotate tests " "that need to use an ``assert_python*()`` function to launch an isolated mode " "(``-I``) or no environment mode (``-E``) sub-interpreter process." msgstr "" -#: ../../../library/test.rst:1253 +#: ../../../library/test.rst:1254 msgid "" "A normal build & test does not run into this situation but it can happen " "when trying to run the standard library test suite from an interpreter that " "doesn't have an obvious home with Python's current home finding logic." msgstr "" -#: ../../../library/test.rst:1257 +#: ../../../library/test.rst:1258 msgid "" "Setting :envvar:`PYTHONHOME` is one way to get most of the testsuite to run " "in that situation. :envvar:`PYTHONPATH` or :envvar:`PYTHONUSERSITE` are " @@ -1283,85 +1284,85 @@ msgid "" "interpreter can start." msgstr "" -#: ../../../library/test.rst:1265 +#: ../../../library/test.rst:1266 msgid "" "Set up the environment based on *env_vars* for running the interpreter in a " "subprocess. The values can include ``__isolated``, ``__cleanenv``, " "``__cwd``, and ``TERM``." msgstr "" -#: ../../../library/test.rst:1269 ../../../library/test.rst:1285 -#: ../../../library/test.rst:1297 +#: ../../../library/test.rst:1270 ../../../library/test.rst:1286 +#: ../../../library/test.rst:1298 msgid "The function no longer strips whitespaces from *stderr*." msgstr "" -#: ../../../library/test.rst:1275 +#: ../../../library/test.rst:1276 msgid "" "Assert that running the interpreter with *args* and optional environment " "variables *env_vars* succeeds (``rc == 0``) and return a ``(return code, " "stdout, stderr)`` tuple." msgstr "" -#: ../../../library/test.rst:1279 +#: ../../../library/test.rst:1280 msgid "" "If the *__cleanenv* keyword-only parameter is set, *env_vars* is used as a " "fresh environment." msgstr "" -#: ../../../library/test.rst:1282 +#: ../../../library/test.rst:1283 msgid "" "Python is started in isolated mode (command line option ``-I``), except if " "the *__isolated* keyword-only parameter is set to ``False``." msgstr "" -#: ../../../library/test.rst:1291 +#: ../../../library/test.rst:1292 msgid "" "Assert that running the interpreter with *args* and optional environment " "variables *env_vars* fails (``rc != 0``) and return a ``(return code, " "stdout, stderr)`` tuple." msgstr "" -#: ../../../library/test.rst:1295 +#: ../../../library/test.rst:1296 msgid "See :func:`assert_python_ok` for more options." msgstr "" -#: ../../../library/test.rst:1303 +#: ../../../library/test.rst:1304 msgid "Run a Python subprocess with the given arguments." msgstr "" -#: ../../../library/test.rst:1305 +#: ../../../library/test.rst:1306 msgid "" "*kw* is extra keyword args to pass to :func:`subprocess.Popen`. Returns a :" "class:`subprocess.Popen` object." msgstr "" -#: ../../../library/test.rst:1311 +#: ../../../library/test.rst:1312 msgid "" "Run the given :class:`subprocess.Popen` process until completion and return " "stdout." msgstr "" -#: ../../../library/test.rst:1317 +#: ../../../library/test.rst:1318 msgid "" "Create script containing *source* in path *script_dir* and " "*script_basename*. If *omit_suffix* is ``False``, append ``.py`` to the " "name. Return the full script path." msgstr "" -#: ../../../library/test.rst:1324 +#: ../../../library/test.rst:1325 msgid "" "Create zip file at *zip_dir* and *zip_basename* with extension ``zip`` which " "contains the files in *script_name*. *name_in_zip* is the archive name. " "Return a tuple containing ``(full path, full path of archive name)``." msgstr "" -#: ../../../library/test.rst:1331 +#: ../../../library/test.rst:1332 msgid "" "Create a directory named *pkg_dir* containing an ``__init__`` file with " "*init_source* as its contents." msgstr "" -#: ../../../library/test.rst:1338 +#: ../../../library/test.rst:1339 msgid "" "Create a zip package directory with a path of *zip_dir* and *zip_basename* " "containing an empty ``__init__`` file and a file *script_basename* " @@ -1370,60 +1371,60 @@ msgid "" "path and the archive name for the zip file." msgstr "" -#: ../../../library/test.rst:1346 +#: ../../../library/test.rst:1347 msgid "" ":mod:`!test.support.bytecode_helper` --- Support tools for testing correct " "bytecode generation" msgstr "" -#: ../../../library/test.rst:1351 +#: ../../../library/test.rst:1352 msgid "" "The :mod:`!test.support.bytecode_helper` module provides support for testing " "and inspecting bytecode generation." msgstr "" -#: ../../../library/test.rst:1356 +#: ../../../library/test.rst:1357 msgid "The module defines the following class:" msgstr "" -#: ../../../library/test.rst:1360 +#: ../../../library/test.rst:1361 msgid "This class has custom assertion methods for inspecting bytecode." msgstr "" -#: ../../../library/test.rst:1364 +#: ../../../library/test.rst:1365 msgid "Return the disassembly of *co* as string." msgstr "" -#: ../../../library/test.rst:1369 +#: ../../../library/test.rst:1370 msgid "" "Return instr if *opname* is found, otherwise throws :exc:`AssertionError`." msgstr "" -#: ../../../library/test.rst:1374 +#: ../../../library/test.rst:1375 msgid "Throws :exc:`AssertionError` if *opname* is found." msgstr "" -#: ../../../library/test.rst:1378 +#: ../../../library/test.rst:1379 msgid ":mod:`!test.support.threading_helper` --- Utilities for threading tests" msgstr "" -#: ../../../library/test.rst:1383 +#: ../../../library/test.rst:1384 msgid "" "The :mod:`!test.support.threading_helper` module provides support for " "threading tests." msgstr "" -#: ../../../library/test.rst:1390 +#: ../../../library/test.rst:1391 msgid "" "Join a *thread* within *timeout*. Raise an :exc:`AssertionError` if thread " "is still alive after *timeout* seconds." msgstr "" -#: ../../../library/test.rst:1396 +#: ../../../library/test.rst:1397 msgid "Decorator to ensure the threads are cleaned up even if the test fails." msgstr "" -#: ../../../library/test.rst:1401 +#: ../../../library/test.rst:1402 msgid "" "Context manager to start *threads*, which is a sequence of threads. *unlock* " "is a function called after the threads are started, even if an exception was " @@ -1431,86 +1432,86 @@ msgid "" "will attempt to join the started threads upon exit." msgstr "" -#: ../../../library/test.rst:1409 +#: ../../../library/test.rst:1410 msgid "" "Cleanup up threads not specified in *original_values*. Designed to emit a " "warning if a test leaves running threads in the background." msgstr "" -#: ../../../library/test.rst:1415 +#: ../../../library/test.rst:1416 msgid "Return current thread count and copy of dangling threads." msgstr "" -#: ../../../library/test.rst:1420 +#: ../../../library/test.rst:1421 msgid "" "Context manager to wait until all threads created in the ``with`` statement " "exit." msgstr "" -#: ../../../library/test.rst:1426 +#: ../../../library/test.rst:1427 msgid "" "Context manager catching :class:`threading.Thread` exception using :func:" "`threading.excepthook`." msgstr "" -#: ../../../library/test.rst:1429 +#: ../../../library/test.rst:1430 msgid "Attributes set when an exception is caught:" msgstr "" -#: ../../../library/test.rst:1431 +#: ../../../library/test.rst:1432 msgid "``exc_type``" msgstr "" -#: ../../../library/test.rst:1432 +#: ../../../library/test.rst:1433 msgid "``exc_value``" msgstr "" -#: ../../../library/test.rst:1433 +#: ../../../library/test.rst:1434 msgid "``exc_traceback``" msgstr "" -#: ../../../library/test.rst:1434 +#: ../../../library/test.rst:1435 msgid "``thread``" msgstr "" -#: ../../../library/test.rst:1436 +#: ../../../library/test.rst:1437 msgid "See :func:`threading.excepthook` documentation." msgstr "" -#: ../../../library/test.rst:1438 +#: ../../../library/test.rst:1439 msgid "These attributes are deleted at the context manager exit." msgstr "" -#: ../../../library/test.rst:1459 +#: ../../../library/test.rst:1460 msgid "" "Run the worker function concurrently in multiple threads. Re-raises an " "exception if any thread raises one, after all threads have finished." msgstr "" -#: ../../../library/test.rst:1465 +#: ../../../library/test.rst:1466 msgid ":mod:`!test.support.os_helper` --- Utilities for os tests" msgstr "" -#: ../../../library/test.rst:1470 +#: ../../../library/test.rst:1471 msgid "" "The :mod:`!test.support.os_helper` module provides support for os tests." msgstr "" -#: ../../../library/test.rst:1477 +#: ../../../library/test.rst:1478 msgid "A non-ASCII character encodable by :func:`os.fsencode`." msgstr "" -#: ../../../library/test.rst:1482 +#: ../../../library/test.rst:1483 msgid "Set to :func:`os.getcwd`." msgstr "" -#: ../../../library/test.rst:1487 +#: ../../../library/test.rst:1488 msgid "" "Set to a name that is safe to use as the name of a temporary file. Any " "temporary file that is created should be closed and unlinked (removed)." msgstr "" -#: ../../../library/test.rst:1493 +#: ../../../library/test.rst:1494 msgid "" "Set to a filename containing the :data:`FS_NONASCII` character, if it " "exists. This guarantees that if the filename exists, it can be encoded and " @@ -1518,25 +1519,25 @@ msgid "" "a non-ASCII filename to be easily skipped on platforms where they can't work." msgstr "" -#: ../../../library/test.rst:1501 +#: ../../../library/test.rst:1502 msgid "" "Set to a filename (str type) that should not be able to be encoded by file " "system encoding in strict mode. It may be ``None`` if it's not possible to " "generate such a filename." msgstr "" -#: ../../../library/test.rst:1508 +#: ../../../library/test.rst:1509 msgid "" "Set to a filename (bytes type) that should not be able to be decoded by file " "system encoding in strict mode. It may be ``None`` if it's not possible to " "generate such a filename." msgstr "" -#: ../../../library/test.rst:1515 +#: ../../../library/test.rst:1516 msgid "Set to a non-ASCII name for a temporary file." msgstr "" -#: ../../../library/test.rst:1520 +#: ../../../library/test.rst:1521 msgid "" "Class used to temporarily set or unset environment variables. Instances can " "be used as a context manager and have a complete dictionary interface for " @@ -1545,79 +1546,79 @@ msgid "" "instance will be rolled back." msgstr "" -#: ../../../library/test.rst:1526 +#: ../../../library/test.rst:1527 msgid "Added dictionary interface." msgstr "" -#: ../../../library/test.rst:1532 +#: ../../../library/test.rst:1533 msgid "" "Simple :term:`path-like object`. It implements the :meth:`~os.PathLike." "__fspath__` method which just returns the *path* argument. If *path* is an " "exception, it will be raised in :meth:`!__fspath__`." msgstr "" -#: ../../../library/test.rst:1540 +#: ../../../library/test.rst:1541 msgid "" "Temporarily set the environment variable ``envvar`` to the value of " "``value``." msgstr "" -#: ../../../library/test.rst:1546 +#: ../../../library/test.rst:1547 msgid "Temporarily unset one or more environment variables." msgstr "" -#: ../../../library/test.rst:1548 +#: ../../../library/test.rst:1549 msgid "More than one environment variable can be unset." msgstr "" -#: ../../../library/test.rst:1554 +#: ../../../library/test.rst:1555 msgid "Return ``True`` if the OS supports symbolic links, ``False`` otherwise." msgstr "" -#: ../../../library/test.rst:1560 +#: ../../../library/test.rst:1561 msgid "Return ``True`` if the OS supports xattr, ``False`` otherwise." msgstr "" -#: ../../../library/test.rst:1566 +#: ../../../library/test.rst:1567 msgid "" "A context manager that temporarily changes the current working directory to " "*path* and yields the directory." msgstr "" -#: ../../../library/test.rst:1569 +#: ../../../library/test.rst:1570 msgid "" "If *quiet* is ``False``, the context manager raises an exception on error. " "Otherwise, it issues only a warning and keeps the current working directory " "the same." msgstr "" -#: ../../../library/test.rst:1576 +#: ../../../library/test.rst:1577 msgid "" "Create an empty file with *filename*. If it already exists, truncate it." msgstr "" -#: ../../../library/test.rst:1581 +#: ../../../library/test.rst:1582 msgid "Count the number of open file descriptors." msgstr "" -#: ../../../library/test.rst:1586 +#: ../../../library/test.rst:1587 msgid "Return ``True`` if the file system for *directory* is case-insensitive." msgstr "" -#: ../../../library/test.rst:1591 +#: ../../../library/test.rst:1592 msgid "" "Create an invalid file descriptor by opening and closing a temporary file, " "and returning its descriptor." msgstr "" -#: ../../../library/test.rst:1597 +#: ../../../library/test.rst:1598 msgid "" "Call :func:`os.rmdir` on *filename*. On Windows platforms, this is wrapped " "with a wait loop that checks for the existence of the file, which is needed " "due to antivirus programs that can hold files open and prevent deletion." msgstr "" -#: ../../../library/test.rst:1605 +#: ../../../library/test.rst:1606 msgid "" "Call :func:`shutil.rmtree` on *path* or call :func:`os.lstat` and :func:`os." "rmdir` to remove a path and its contents. As with :func:`rmdir`, on Windows " @@ -1625,21 +1626,21 @@ msgid "" "the files." msgstr "" -#: ../../../library/test.rst:1613 +#: ../../../library/test.rst:1614 msgid "A decorator for running tests that require support for symbolic links." msgstr "" -#: ../../../library/test.rst:1618 +#: ../../../library/test.rst:1619 msgid "A decorator for running tests that require support for xattr." msgstr "" -#: ../../../library/test.rst:1623 +#: ../../../library/test.rst:1624 msgid "" "A context manager that temporarily creates a new directory and changes the " "current working directory (CWD)." msgstr "" -#: ../../../library/test.rst:1626 +#: ../../../library/test.rst:1627 msgid "" "The context manager creates a temporary directory in the current directory " "with name *name* before temporarily changing the current working directory. " @@ -1647,20 +1648,20 @@ msgid "" "`tempfile.mkdtemp`." msgstr "" -#: ../../../library/test.rst:1631 +#: ../../../library/test.rst:1632 msgid "" "If *quiet* is ``False`` and it is not possible to create or change the CWD, " "an error is raised. Otherwise, only a warning is raised and the original " "CWD is used." msgstr "" -#: ../../../library/test.rst:1638 +#: ../../../library/test.rst:1639 msgid "" "A context manager that creates a temporary directory at *path* and yields " "the directory." msgstr "" -#: ../../../library/test.rst:1641 +#: ../../../library/test.rst:1642 msgid "" "If *path* is ``None``, the temporary directory is created using :func:" "`tempfile.mkdtemp`. If *quiet* is ``False``, the context manager raises an " @@ -1668,53 +1669,53 @@ msgid "" "created, only a warning is issued." msgstr "" -#: ../../../library/test.rst:1649 +#: ../../../library/test.rst:1650 msgid "A context manager that temporarily sets the process umask." msgstr "" -#: ../../../library/test.rst:1654 +#: ../../../library/test.rst:1655 msgid "" "Call :func:`os.unlink` on *filename*. As with :func:`rmdir`, on Windows " "platforms, this is wrapped with a wait loop that checks for the existence of " "the file." msgstr "" -#: ../../../library/test.rst:1661 +#: ../../../library/test.rst:1662 msgid "" "A decorator for running tests with the :envvar:`SOURCE_DATE_EPOCH` " "environment variable set to *epoch*." msgstr "" -#: ../../../library/test.rst:1667 +#: ../../../library/test.rst:1668 msgid "" "A decorator for running tests with the :envvar:`SOURCE_DATE_EPOCH` " "environment variable unset." msgstr "" -#: ../../../library/test.rst:1673 +#: ../../../library/test.rst:1674 msgid "" "Metaclass wrapping all test methods of the class with :func:" "`with_source_date_epoch` if the *source_date_epoch* keyword class argument " "is true, or with :func:`without_source_date_epoch` otherwise. For example::" msgstr "" -#: ../../../library/test.rst:1686 +#: ../../../library/test.rst:1687 msgid ":mod:`!test.support.import_helper` --- Utilities for import tests" msgstr "" -#: ../../../library/test.rst:1691 +#: ../../../library/test.rst:1692 msgid "" "The :mod:`!test.support.import_helper` module provides support for import " "tests." msgstr "" -#: ../../../library/test.rst:1698 +#: ../../../library/test.rst:1699 msgid "" "Remove the module named *module_name* from ``sys.modules`` and delete any " "byte-compiled files of the module." msgstr "" -#: ../../../library/test.rst:1704 +#: ../../../library/test.rst:1705 msgid "" "This function imports and returns a fresh copy of the named Python module by " "removing the named module from ``sys.modules`` before doing the import. Note " @@ -1722,46 +1723,46 @@ msgid "" "operation." msgstr "" -#: ../../../library/test.rst:1709 +#: ../../../library/test.rst:1710 msgid "" "*fresh* is an iterable of additional module names that are also removed from " "the ``sys.modules`` cache before doing the import." msgstr "" -#: ../../../library/test.rst:1712 +#: ../../../library/test.rst:1713 msgid "" "*blocked* is an iterable of module names that are replaced with ``None`` in " "the module cache during the import to ensure that attempts to import them " "raise :exc:`ImportError`." msgstr "" -#: ../../../library/test.rst:1716 +#: ../../../library/test.rst:1717 msgid "" "The named module and any modules named in the *fresh* and *blocked* " "parameters are saved before starting the import and then reinserted into " "``sys.modules`` when the fresh import is complete." msgstr "" -#: ../../../library/test.rst:1720 +#: ../../../library/test.rst:1721 msgid "" "Module and package deprecation messages are suppressed during this import if " "*deprecated* is ``True``." msgstr "" -#: ../../../library/test.rst:1723 +#: ../../../library/test.rst:1724 msgid "" "This function will raise :exc:`ImportError` if the named module cannot be " "imported." msgstr "" -#: ../../../library/test.rst:1740 +#: ../../../library/test.rst:1741 msgid "" "This function imports and returns the named module. Unlike a normal import, " "this function raises :exc:`unittest.SkipTest` if the module cannot be " "imported." msgstr "" -#: ../../../library/test.rst:1744 +#: ../../../library/test.rst:1745 msgid "" "Module and package deprecation messages are suppressed during this import if " "*deprecated* is ``True``. If a module is required on a platform but " @@ -1769,21 +1770,21 @@ msgid "" "which will be compared against :data:`sys.platform`." msgstr "" -#: ../../../library/test.rst:1754 +#: ../../../library/test.rst:1755 msgid "Return a copy of :data:`sys.modules`." msgstr "" -#: ../../../library/test.rst:1759 +#: ../../../library/test.rst:1760 msgid "" "Remove modules except for *oldmodules* and ``encodings`` in order to " "preserve internal cache." msgstr "" -#: ../../../library/test.rst:1765 +#: ../../../library/test.rst:1766 msgid "Delete *name* from ``sys.modules``." msgstr "" -#: ../../../library/test.rst:1770 +#: ../../../library/test.rst:1771 msgid "" "Move a :pep:`3147`/:pep:`488` pyc file to its legacy pyc location and return " "the file system path to the legacy pyc file. The *source* value is the file " @@ -1791,42 +1792,42 @@ msgid "" "3147/488 pyc file must exist." msgstr "" -#: ../../../library/test.rst:1778 +#: ../../../library/test.rst:1779 msgid "" "A context manager to force import to return a new module reference. This is " "useful for testing module-level behaviors, such as the emission of a :exc:" "`DeprecationWarning` on import. Example usage::" msgstr "" -#: ../../../library/test.rst:1788 +#: ../../../library/test.rst:1789 msgid "A context manager to temporarily add directories to :data:`sys.path`." msgstr "" -#: ../../../library/test.rst:1790 +#: ../../../library/test.rst:1791 msgid "" "This makes a copy of :data:`sys.path`, appends any directories given as " "positional arguments, then reverts :data:`sys.path` to the copied settings " "when the context ends." msgstr "" -#: ../../../library/test.rst:1794 +#: ../../../library/test.rst:1795 msgid "" "Note that *all* :data:`sys.path` modifications in the body of the context " "manager, including replacement of the object, will be reverted at the end of " "the block." msgstr "" -#: ../../../library/test.rst:1800 +#: ../../../library/test.rst:1801 msgid ":mod:`!test.support.warnings_helper` --- Utilities for warnings tests" msgstr "" -#: ../../../library/test.rst:1805 +#: ../../../library/test.rst:1806 msgid "" "The :mod:`!test.support.warnings_helper` module provides support for " "warnings tests." msgstr "" -#: ../../../library/test.rst:1812 +#: ../../../library/test.rst:1813 msgid "" "Suppress warnings that are instances of *category*, which must be :exc:" "`Warning` or a subclass. Roughly equivalent to :func:`warnings." @@ -1834,14 +1835,14 @@ msgid "" "category=category) `. For example::" msgstr "" -#: ../../../library/test.rst:1827 +#: ../../../library/test.rst:1828 msgid "" "Context manager to check that no :exc:`ResourceWarning` was raised. You " "must remove the object which may emit :exc:`ResourceWarning` before the end " "of the context manager." msgstr "" -#: ../../../library/test.rst:1834 +#: ../../../library/test.rst:1835 msgid "" "Test for syntax warning in *statement* by attempting to compile *statement*. " "Test also that the :exc:`SyntaxWarning` is emitted only once, and that it " @@ -1853,7 +1854,7 @@ msgid "" "``None``, compares to the offset of the exception." msgstr "" -#: ../../../library/test.rst:1848 +#: ../../../library/test.rst:1849 msgid "" "A convenience wrapper for :func:`warnings.catch_warnings` that makes it " "easier to test that a warning was correctly raised. It is approximately " @@ -1862,7 +1863,7 @@ msgid "" "automatically validate the results that are recorded." msgstr "" -#: ../../../library/test.rst:1854 +#: ../../../library/test.rst:1855 msgid "" "``check_warnings`` accepts 2-tuples of the form ``(\"message regexp\", " "WarningCategory)`` as positional arguments. If one or more *filters* are " @@ -1874,15 +1875,15 @@ msgid "" "*quiet* to ``True``." msgstr "" -#: ../../../library/test.rst:1863 +#: ../../../library/test.rst:1864 msgid "If no arguments are specified, it defaults to::" msgstr "" -#: ../../../library/test.rst:1867 +#: ../../../library/test.rst:1868 msgid "In this case all warnings are caught and no errors are raised." msgstr "" -#: ../../../library/test.rst:1869 +#: ../../../library/test.rst:1870 msgid "" "On entry to the context manager, a :class:`WarningRecorder` instance is " "returned. The underlying warnings list from :func:`~warnings.catch_warnings` " @@ -1894,39 +1895,39 @@ msgid "" "return ``None``." msgstr "" -#: ../../../library/test.rst:1878 +#: ../../../library/test.rst:1879 msgid "" "The recorder object also has a :meth:`reset` method, which clears the " "warnings list." msgstr "" -#: ../../../library/test.rst:1881 +#: ../../../library/test.rst:1882 msgid "The context manager is designed to be used like this::" msgstr "" -#: ../../../library/test.rst:1888 +#: ../../../library/test.rst:1889 msgid "" "In this case if either warning was not raised, or some other warning was " "raised, :func:`check_warnings` would raise an error." msgstr "" -#: ../../../library/test.rst:1891 +#: ../../../library/test.rst:1892 msgid "" "When a test needs to look more deeply into the warnings, rather than just " "checking whether or not they occurred, code like this can be used::" msgstr "" -#: ../../../library/test.rst:1905 +#: ../../../library/test.rst:1906 msgid "" "Here all warnings will be caught, and the test code tests the captured " "warnings directly." msgstr "" -#: ../../../library/test.rst:1908 +#: ../../../library/test.rst:1909 msgid "New optional arguments *filters* and *quiet*." msgstr "" -#: ../../../library/test.rst:1914 +#: ../../../library/test.rst:1915 msgid "" "Class used to record warnings for unit tests. See documentation of :func:" "`check_warnings` above for more details." diff --git a/main/locale/pot/LC_MESSAGES/library/time-complexity.pot b/main/locale/pot/LC_MESSAGES/library/time-complexity.pot new file mode 100644 index 00000000000..9dd7ada2252 --- /dev/null +++ b/main/locale/pot/LC_MESSAGES/library/time-complexity.pot @@ -0,0 +1,664 @@ +# 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-09-07 15:03+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/time-complexity.rst:5 +msgid "Time complexity of operations on built-in types" +msgstr "" + +#: ../../../library/time-complexity.rst:7 +msgid "" +"This page documents the time complexity of various operations on built-in " +"types in CPython. Other Python implementations may have different " +"performance characteristics. Additionally, the listed costs assume exact " +"built-in types, as instances of subclasses may have different costs." +msgstr "" + +#: ../../../library/time-complexity.rst:12 +msgid "" +"We use |big O notation|_ to describe how the running time of an operation " +"grows with the size of its inputs. Unless stated otherwise, *n* denotes the " +"number of elements currently in the container, and *k* is the value of a " +"numeric parameter, such as an index or a repeat count." +msgstr "" + +#: ../../../library/time-complexity.rst:22 +msgid ":class:`!list`" +msgstr "" + +#: ../../../library/time-complexity.rst:24 +msgid "" +"Lists are mutable sequences; for more detail on the implementation see :ref:" +"`how-are-lists-implemented`. The largest costs come from growing beyond the " +"current allocation size (because everything must move), or from inserting or " +"deleting somewhere near the beginning (because everything after that must " +"move). If you need to add or remove at both ends, consider using a :class:" +"`collections.deque` instead." +msgstr "" + +#: ../../../library/time-complexity.rst:34 +#: ../../../library/time-complexity.rst:85 +#: ../../../library/time-complexity.rst:124 +#: ../../../library/time-complexity.rst:159 +#: ../../../library/time-complexity.rst:202 +#: ../../../library/time-complexity.rst:235 +#: ../../../library/time-complexity.rst:262 +msgid "Operation" +msgstr "" + +#: ../../../library/time-complexity.rst:35 +#: ../../../library/time-complexity.rst:86 +#: ../../../library/time-complexity.rst:125 +#: ../../../library/time-complexity.rst:160 +#: ../../../library/time-complexity.rst:203 +#: ../../../library/time-complexity.rst:236 +#: ../../../library/time-complexity.rst:263 +msgid "Complexity" +msgstr "" + +#: ../../../library/time-complexity.rst:36 +msgid "Copy (``l.copy()``)" +msgstr "" + +#: ../../../library/time-complexity.rst:37 +#: ../../../library/time-complexity.rst:51 +#: ../../../library/time-complexity.rst:68 +#: ../../../library/time-complexity.rst:70 +#: ../../../library/time-complexity.rst:98 +#: ../../../library/time-complexity.rst:100 +#: ../../../library/time-complexity.rst:102 +#: ../../../library/time-complexity.rst:129 +#: ../../../library/time-complexity.rst:139 +#: ../../../library/time-complexity.rst:164 +#: ../../../library/time-complexity.rst:213 +#: ../../../library/time-complexity.rst:217 +#: ../../../library/time-complexity.rst:219 +#: ../../../library/time-complexity.rst:244 +#: ../../../library/time-complexity.rst:246 +#: ../../../library/time-complexity.rst:248 +#: ../../../library/time-complexity.rst:273 +#: ../../../library/time-complexity.rst:275 +msgid "*O*\\ (*n*)" +msgstr "" + +#: ../../../library/time-complexity.rst:38 +msgid "Append (``l.append(x)``) [1]_" +msgstr "" + +#: ../../../library/time-complexity.rst:39 +#: ../../../library/time-complexity.rst:45 +#: ../../../library/time-complexity.rst:47 +#: ../../../library/time-complexity.rst:72 +#: ../../../library/time-complexity.rst:88 +#: ../../../library/time-complexity.rst:90 +#: ../../../library/time-complexity.rst:104 +#: ../../../library/time-complexity.rst:127 +#: ../../../library/time-complexity.rst:131 +#: ../../../library/time-complexity.rst:133 +#: ../../../library/time-complexity.rst:135 +#: ../../../library/time-complexity.rst:141 +#: ../../../library/time-complexity.rst:162 +#: ../../../library/time-complexity.rst:166 +#: ../../../library/time-complexity.rst:168 +#: ../../../library/time-complexity.rst:186 +#: ../../../library/time-complexity.rst:205 +#: ../../../library/time-complexity.rst:221 +#: ../../../library/time-complexity.rst:238 +#: ../../../library/time-complexity.rst:240 +#: ../../../library/time-complexity.rst:242 +#: ../../../library/time-complexity.rst:250 +#: ../../../library/time-complexity.rst:265 +#: ../../../library/time-complexity.rst:267 +#: ../../../library/time-complexity.rst:269 +#: ../../../library/time-complexity.rst:271 +#: ../../../library/time-complexity.rst:277 +msgid "*O*\\ (1)" +msgstr "" + +#: ../../../library/time-complexity.rst:40 +msgid "Pop (``l.pop(k)``) [1]_ [2]_" +msgstr "" + +#: ../../../library/time-complexity.rst:41 +#: ../../../library/time-complexity.rst:43 +#: ../../../library/time-complexity.rst:49 +msgid "*O*\\ (*n* - *k*)" +msgstr "" + +#: ../../../library/time-complexity.rst:42 +msgid "Insert (``l.insert(k, x)``) [1]_ [2]_" +msgstr "" + +#: ../../../library/time-complexity.rst:44 +msgid "Get item (``l[k]``)" +msgstr "" + +#: ../../../library/time-complexity.rst:46 +msgid "Set item (``l[k] = x``)" +msgstr "" + +#: ../../../library/time-complexity.rst:48 +msgid "Delete item (``del l[k]``) [2]_" +msgstr "" + +#: ../../../library/time-complexity.rst:50 +#: ../../../library/time-complexity.rst:97 +#: ../../../library/time-complexity.rst:218 +#: ../../../library/time-complexity.rst:272 +msgid "Iteration" +msgstr "" + +#: ../../../library/time-complexity.rst:52 +msgid "Get slice (``l[i:j]``)" +msgstr "" + +#: ../../../library/time-complexity.rst:53 +#: ../../../library/time-complexity.rst:92 +#: ../../../library/time-complexity.rst:207 +msgid "*O*\\ (*j* - *i*)" +msgstr "" + +#: ../../../library/time-complexity.rst:54 +msgid "Set slice (``l[i:j] = t``) [1]_" +msgstr "" + +#: ../../../library/time-complexity.rst:55 +msgid "" +"*O*\\ (*j* - *i*) if len(*t*) == *j* - *i*, otherwise *O*\\ (*n* - *i* + " +"len(*t*))" +msgstr "" + +#: ../../../library/time-complexity.rst:57 +msgid "Delete slice (``del l[i:j]``)" +msgstr "" + +#: ../../../library/time-complexity.rst:58 +msgid "*O*\\ (*n* - *i*)" +msgstr "" + +#: ../../../library/time-complexity.rst:59 +msgid "Extend (``l.extend(t)``) [1]_ [3]_" +msgstr "" + +#: ../../../library/time-complexity.rst:60 +#: ../../../library/time-complexity.rst:137 +msgid "*O*\\ (len(*t*))" +msgstr "" + +#: ../../../library/time-complexity.rst:61 +msgid "Sort (``l.sort()``) [4]_" +msgstr "" + +#: ../../../library/time-complexity.rst:62 +msgid "*O*\\ (*n* log *n*)" +msgstr "" + +#: ../../../library/time-complexity.rst:63 +msgid "Concatenate (``l1 + l2``)" +msgstr "" + +#: ../../../library/time-complexity.rst:64 +msgid "*O*\\ (len(*l1*) + len(*l2*))" +msgstr "" + +#: ../../../library/time-complexity.rst:65 +msgid "Multiply (``l * k``)" +msgstr "" + +#: ../../../library/time-complexity.rst:66 +#: ../../../library/time-complexity.rst:96 +#: ../../../library/time-complexity.rst:211 +msgid "*O*\\ (*nk*)" +msgstr "" + +#: ../../../library/time-complexity.rst:67 +msgid "``x in l``" +msgstr "" + +#: ../../../library/time-complexity.rst:69 +msgid "``min(l)``, ``max(l)``" +msgstr "" + +#: ../../../library/time-complexity.rst:71 +msgid "Get length (``len(l)``) [5]_" +msgstr "" + +#: ../../../library/time-complexity.rst:76 +msgid ":class:`!tuple`" +msgstr "" + +#: ../../../library/time-complexity.rst:78 +msgid "" +"A :class:`tuple` is an :term:`immutable` sequence. Because a tuple can never " +"change, there are no insertion or deletion costs, and making a copy simply " +"returns the same object, so is constant time (*O*\\ (1))." +msgstr "" + +#: ../../../library/time-complexity.rst:87 +msgid "Copy (``tuple(t)``)" +msgstr "" + +#: ../../../library/time-complexity.rst:89 +msgid "Get item (``t[k]``)" +msgstr "" + +#: ../../../library/time-complexity.rst:91 +msgid "Get slice (``t[i:j]``)" +msgstr "" + +#: ../../../library/time-complexity.rst:93 +msgid "Concatenate (``t1 + t2``)" +msgstr "" + +#: ../../../library/time-complexity.rst:94 +msgid "*O*\\ (len(*t1*) + len(*t2*))" +msgstr "" + +#: ../../../library/time-complexity.rst:95 +msgid "Multiply (``t * k``)" +msgstr "" + +#: ../../../library/time-complexity.rst:99 +msgid "``x in t``" +msgstr "" + +#: ../../../library/time-complexity.rst:101 +msgid "``min(t)``, ``max(t)``" +msgstr "" + +#: ../../../library/time-complexity.rst:103 +msgid "Get length (``len(t)``) [5]_" +msgstr "" + +#: ../../../library/time-complexity.rst:108 +msgid ":class:`!dict`, :class:`!frozendict`" +msgstr "" + +#: ../../../library/time-complexity.rst:110 +msgid "" +"The times listed for dict objects are average-case times, as they assume the " +"hash function for the objects is sufficiently robust to make collisions " +"uncommon. They also assume the keys are well-distributed among the set of " +"possible keys. In the worst case, when every key hashes to the same value, " +"each of the *O*\\ (1) operations below instead takes *O*\\ (*n*) time. They " +"also assume that hashing and comparing a key is *O*\\ (1). For more detail " +"on the implementation, see :ref:`how-are-dictionaries-implemented`." +msgstr "" + +#: ../../../library/time-complexity.rst:118 +msgid "" +"A :class:`frozendict` is immutable, so it does not support setting, " +"deleting, or updating items. The other operations below apply to it at the " +"same costs." +msgstr "" + +#: ../../../library/time-complexity.rst:126 +msgid "``key in d``" +msgstr "" + +#: ../../../library/time-complexity.rst:128 +msgid "Copy (``d.copy()``) [6]_ [7]_" +msgstr "" + +#: ../../../library/time-complexity.rst:130 +msgid "Get item (``d[key]``, ``d.get(key)``)" +msgstr "" + +#: ../../../library/time-complexity.rst:132 +msgid "Set item (``d[key] = value``) [1]_" +msgstr "" + +#: ../../../library/time-complexity.rst:134 +msgid "Delete item (``del d[key]``, ``d.pop(key)``)" +msgstr "" + +#: ../../../library/time-complexity.rst:136 +msgid "Update (``d.update(t)``, ``d |= t``) [1]_ [3]_ [7]_" +msgstr "" + +#: ../../../library/time-complexity.rst:138 +msgid "Iteration [7]_" +msgstr "" + +#: ../../../library/time-complexity.rst:140 +msgid "Get length (``len(d)``) [5]_" +msgstr "" + +#: ../../../library/time-complexity.rst:145 +msgid ":class:`!set`, :class:`!frozenset`" +msgstr "" + +#: ../../../library/time-complexity.rst:147 +msgid "" +"See :class:`dict` as the :class:`set` and :class:`frozenset` implementations " +"are similar, and the same caveats apply. In the worst case, *O*\\ (1) " +"operations instead take *O*\\ (*n*) time, and operations that look up every " +"element degrade accordingly." +msgstr "" + +#: ../../../library/time-complexity.rst:152 +msgid "" +"A :class:`frozenset` is :term:`immutable`, so it does not support adding, " +"discarding, or the in-place update operations. The others below apply to it " +"at the same costs." +msgstr "" + +#: ../../../library/time-complexity.rst:161 +msgid "``x in s``" +msgstr "" + +#: ../../../library/time-complexity.rst:163 +msgid "Copy (``s.copy()``) [6]_ [7]_" +msgstr "" + +#: ../../../library/time-complexity.rst:165 +msgid "Add (``s.add(x)``) [1]_" +msgstr "" + +#: ../../../library/time-complexity.rst:167 +msgid "Discard (``s.discard(x)``, ``s.remove(x)``)" +msgstr "" + +#: ../../../library/time-complexity.rst:169 +msgid "Union (``s1 | s2``, ``s1.union(s2)``) [7]_" +msgstr "" + +#: ../../../library/time-complexity.rst:170 +#: ../../../library/time-complexity.rst:182 +msgid "*O*\\ (len(*s1*) + len(*s2*))" +msgstr "" + +#: ../../../library/time-complexity.rst:171 +msgid "Update (``s1 |= s2``, ``s1.update(s2)``) [1]_ [7]_" +msgstr "" + +#: ../../../library/time-complexity.rst:172 +#: ../../../library/time-complexity.rst:184 +msgid "*O*\\ (len(*s2*))" +msgstr "" + +#: ../../../library/time-complexity.rst:173 +msgid "Intersection (``s1 & s2``, ``s1.intersection(s2)``) [7]_ [8]_" +msgstr "" + +#: ../../../library/time-complexity.rst:174 +#: ../../../library/time-complexity.rst:176 +#: ../../../library/time-complexity.rst:180 +msgid "*O*\\ (min(len(*s1*), len(*s2*)))" +msgstr "" + +#: ../../../library/time-complexity.rst:175 +msgid "" +"Intersection update (``s1 &= s2``, ``s1.intersection_update(s2)``) [1]_ [7]_ " +"[8]_" +msgstr "" + +#: ../../../library/time-complexity.rst:177 +msgid "Difference (``s1 - s2``, ``s1.difference(s2)``) [7]_ [9]_" +msgstr "" + +#: ../../../library/time-complexity.rst:178 +msgid "*O*\\ (len(*s1*))" +msgstr "" + +#: ../../../library/time-complexity.rst:179 +msgid "" +"Difference update (``s1 -= s2``, ``s1.difference_update(s2)``) [1]_ [7]_ [8]_" +msgstr "" + +#: ../../../library/time-complexity.rst:181 +msgid "" +"Symmetric difference (``s1 ^ s2``, ``s1.symmetric_difference(s2)``) [7]_" +msgstr "" + +#: ../../../library/time-complexity.rst:183 +msgid "" +"Symmetric difference update (``s1 ^= s2``, ``s1." +"symmetric_difference_update(s2)``) [1]_ [7]_" +msgstr "" + +#: ../../../library/time-complexity.rst:185 +#: ../../../library/time-complexity.rst:220 +msgid "Get length (``len(s)``) [5]_" +msgstr "" + +#: ../../../library/time-complexity.rst:190 +msgid ":class:`!str`, :class:`!bytes`, :class:`!bytearray`" +msgstr "" + +#: ../../../library/time-complexity.rst:192 +msgid "" +":class:`str` and :class:`bytes` objects are immutable sequences of " +"characters and bytes, respectively. As with tuples, copying one returns the " +"original object. A :class:`bytearray` is mutable, and additionally supports " +"the mutating operations of :class:`list` (except :meth:`!sort`), at the same " +"costs. However, deleting at the front with ``del`` (``del b[0]``, ``del b[:" +"k]``) only advances the start of the buffer instead of moving the remaining " +"bytes, and is amortized *O*\\ (1)." +msgstr "" + +#: ../../../library/time-complexity.rst:204 +msgid "Get item (``s[k]``)" +msgstr "" + +#: ../../../library/time-complexity.rst:206 +msgid "Get slice (``s[i:j]``)" +msgstr "" + +#: ../../../library/time-complexity.rst:208 +msgid "Concatenate (``s + t``) [10]_" +msgstr "" + +#: ../../../library/time-complexity.rst:209 +msgid "*O*\\ (len(*s*) + len(*t*))" +msgstr "" + +#: ../../../library/time-complexity.rst:210 +msgid "Multiply (``s * k``)" +msgstr "" + +#: ../../../library/time-complexity.rst:212 +msgid "Substring search (``x in s``, ``s.find(x)``, ``s.index(x)``) [11]_" +msgstr "" + +#: ../../../library/time-complexity.rst:214 +msgid "Reverse substring search (``s.rfind(x)``, ``s.rindex(x)``) [11]_ [12]_" +msgstr "" + +#: ../../../library/time-complexity.rst:215 +msgid "*O*\\ (*n* × len(*x*))" +msgstr "" + +#: ../../../library/time-complexity.rst:216 +msgid "Encode or decode [13]_" +msgstr "" + +#: ../../../library/time-complexity.rst:225 +msgid ":class:`!memoryview`" +msgstr "" + +#: ../../../library/time-complexity.rst:227 +msgid "" +":class:`memoryview` objects allow Python code to access the internal data of " +"an object that supports the :ref:`buffer protocol ` without " +"copying. In particular, slicing a memory view returns a new view onto the " +"same buffer." +msgstr "" + +#: ../../../library/time-complexity.rst:237 +msgid "Create (``memoryview(obj)``)" +msgstr "" + +#: ../../../library/time-complexity.rst:239 +msgid "Get item (``v[k]``)" +msgstr "" + +#: ../../../library/time-complexity.rst:241 +msgid "Get slice (``v[i:j]``)" +msgstr "" + +#: ../../../library/time-complexity.rst:243 +msgid "Index (``v.index(x)``) [11]_ [14]_" +msgstr "" + +#: ../../../library/time-complexity.rst:245 +msgid "Count (``v.count(x)``) [14]_" +msgstr "" + +#: ../../../library/time-complexity.rst:247 +msgid "Convert to bytes (``v.tobytes()``, ``bytes(v)``)" +msgstr "" + +#: ../../../library/time-complexity.rst:249 +msgid "Get length (``len(v)``) [5]_" +msgstr "" + +#: ../../../library/time-complexity.rst:254 +msgid ":class:`!range`" +msgstr "" + +#: ../../../library/time-complexity.rst:256 +msgid "" +"A :class:`range` object computes its items on demand from its *start*, " +"*stop* and *step* values, so most operations do not depend on the length of " +"the range." +msgstr "" + +#: ../../../library/time-complexity.rst:264 +msgid "Get item (``r[k]``)" +msgstr "" + +#: ../../../library/time-complexity.rst:266 +msgid "Get slice (``r[i:j]``)" +msgstr "" + +#: ../../../library/time-complexity.rst:268 +msgid "``x in r`` [15]_" +msgstr "" + +#: ../../../library/time-complexity.rst:270 +msgid "Index and count (``r.index(x)``, ``r.count(x)``) [15]_" +msgstr "" + +#: ../../../library/time-complexity.rst:274 +msgid "``min(r)``, ``max(r)``" +msgstr "" + +#: ../../../library/time-complexity.rst:276 +msgid "Get length (``len(r)``) [5]_" +msgstr "" + +#: ../../../library/time-complexity.rst:281 +msgid "Notes" +msgstr "" + +#: ../../../library/time-complexity.rst:283 +msgid "" +"Amortized. An individual operation may occasionally be *O*\\ (*n*) when the " +"underlying storage is resized, but this cost is spread over many operations, " +"depending on the history of the container." +msgstr "" + +#: ../../../library/time-complexity.rst:287 +msgid "" +"Popping or deleting the element at index *k* of a list of size *n* shifts " +"all elements after *k* one slot to the left, moving *n* - *k* - 1 elements; " +"inserting at index *k* shifts the elements from *k* onwards one slot to the " +"right, moving *n* - *k* elements. The worst case is index 0, where the whole " +"rest of the list has to be moved; the average case, an index in the middle " +"of the list, takes *O*\\ (*n*/2) = *O*\\ (*n*) operations; and operating at " +"the end of the list moves nothing and is *O*\\ (1)." +msgstr "" + +#: ../../../library/time-complexity.rst:296 +msgid "" +"Plus the cost of iterating over *t*, which may be expensive for an arbitrary " +"iterable." +msgstr "" + +#: ../../../library/time-complexity.rst:299 +msgid "" +"This is the worst case scenario. Sorting is adaptive and input that is " +"already sorted or reverse-sorted takes only *O*\\ (*n*) comparisons. See :" +"source:`Objects/listsort.txt` for more information." +msgstr "" + +#: ../../../library/time-complexity.rst:303 +msgid "" +"The number of elements is stored in the object, so ``len()`` does not need " +"to count them." +msgstr "" + +#: ../../../library/time-complexity.rst:306 +msgid "" +"Copying a :class:`frozendict` or a :class:`frozenset` is *O*\\ (1) as it " +"returns the original object." +msgstr "" + +#: ../../../library/time-complexity.rst:309 +msgid "" +"These operations scan the container's internal hash table, which is not " +"shrunk when elements are removed. After removing most elements, they still " +"take time proportional to the container's former size, until a later " +"insertion triggers a resize." +msgstr "" + +#: ../../../library/time-complexity.rst:314 +msgid "*O*\\ (len(*t*)) if *t* is not a set." +msgstr "" + +#: ../../../library/time-complexity.rst:316 +msgid "*O*\\ (len(*s*) + len(*t*)) if *t* is not a set." +msgstr "" + +#: ../../../library/time-complexity.rst:318 +msgid "" +"Each concatenation builds a new object, so building a string by " +"concatenating many pieces in a loop is quadratic in the total length. See " +"the :ref:`note on concatenating immutable sequences ` for alternatives." +msgstr "" + +#: ../../../library/time-complexity.rst:323 +msgid "" +"With *start* and *end* arguments, *n* is the length of the region searched " +"rather than of *s*, and unlike slicing nothing is copied." +msgstr "" + +#: ../../../library/time-complexity.rst:326 +msgid "" +"This is the worst case. Reverse searches are *O*\\ (*n*) on typical input. " +"Forward searches instead use a more elaborate algorithm with a linear worst " +"case, described in :source:`Objects/stringlib/stringlib_find_two_way_notes." +"txt`." +msgstr "" + +#: ../../../library/time-complexity.rst:331 +msgid "This assumes a codec that does a constant amount of work per character." +msgstr "" + +#: ../../../library/time-complexity.rst:333 +msgid "" +"These unpack and compare each element individually, so they are much slower " +"than the equivalent :class:`bytes` methods." +msgstr "" + +#: ../../../library/time-complexity.rst:336 +msgid "" +"Assuming :class:`int` or :class:`bool` arguments. For other types, the range " +"is searched like any other sequence in *O*\\ (*n*) time." +msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/tkinter.fontchooser.pot b/main/locale/pot/LC_MESSAGES/library/tkinter.fontchooser.pot index 656ba398f98..fe7c50f51c2 100644 --- a/main/locale/pot/LC_MESSAGES/library/tkinter.fontchooser.pot +++ b/main/locale/pot/LC_MESSAGES/library/tkinter.fontchooser.pot @@ -8,10 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/main/locale/pot/LC_MESSAGES/library/tkinter.systray.pot b/main/locale/pot/LC_MESSAGES/library/tkinter.systray.pot index d088a45f3b6..fccb56a8db3 100644 --- a/main/locale/pot/LC_MESSAGES/library/tkinter.systray.pot +++ b/main/locale/pot/LC_MESSAGES/library/tkinter.systray.pot @@ -8,10 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/main/locale/pot/LC_MESSAGES/library/tomllib.pot b/main/locale/pot/LC_MESSAGES/library/tomllib.pot index 68079a9d81e..31f73c70a06 100644 --- a/main/locale/pot/LC_MESSAGES/library/tomllib.pot +++ b/main/locale/pot/LC_MESSAGES/library/tomllib.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-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -254,3 +254,87 @@ msgstr "" #: ../../../library/tomllib.rst:158 msgid "list of dicts" msgstr "" + +#: ../../../library/tomllib.rst:162 +msgid "Limits and interoperability considerations" +msgstr "" + +#: ../../../library/tomllib.rst:164 +msgid "" +":mod:`!tomllib` places some limits on the documents it can handle, and it " +"preserves details that other TOML parsers are allowed to ignore. When " +"writing portable TOML files, only use features that are guaranteed or " +"recommended by the standard." +msgstr "" + +#: ../../../library/tomllib.rst:169 +msgid "" +"The implementation details listed here may change in future versions of " +"Python." +msgstr "" + +#: ../../../library/tomllib.rst:171 +msgid "Tables/dicts" +msgstr "" + +#: ../../../library/tomllib.rst:172 +msgid "" +"The TOML spec does not guarantee key/value pairs in TOML documents and " +"tables to be in any specific order." +msgstr "" + +#: ../../../library/tomllib.rst:176 +msgid "" +":mod:`!tomllib` loads dictionary entries in the order they appear in the " +"source." +msgstr "" + +#: ../../../library/tomllib.rst:179 +msgid "Integers" +msgstr "" + +#: ../../../library/tomllib.rst:180 +msgid "TOML recommends supporting integers in ``range(−2**63, 2**63)``." +msgstr "" + +#: ../../../library/tomllib.rst:183 +msgid "" +":mod:`!tomllib` uses :ref:`Python's limit on integer string conversion " +"` (4300 digits by default)." +msgstr "" + +#: ../../../library/tomllib.rst:186 +msgid "Floats" +msgstr "" + +#: ../../../library/tomllib.rst:187 +msgid "" +"TOML recommends supporting at least IEEE 754 binary64 values, which means " +"that numbers with more than 15 significant decimal digits are likely to be " +"rounded." +msgstr "" + +#: ../../../library/tomllib.rst:192 +msgid "" +":mod:`!tomllib` uses Python :class:`float` by default; on many common " +"platforms this is the recommended binary64. See :data:`sys.float_info` for " +"details." +msgstr "" + +#: ../../../library/tomllib.rst:196 +msgid "Nesting limit" +msgstr "" + +#: ../../../library/tomllib.rst:197 +msgid "" +"TOML 1.1.0 does not recommend a limit on how deeply arrays and tables may be " +"nested inside one another. (A limit of 100 has been proposed for a future " +"version of TOML.)" +msgstr "" + +#: ../../../library/tomllib.rst:202 +msgid "" +"In :mod:`!tomllib`, the nesting level is mainly limited by Python's :func:" +"`recursion limit `. Note that code that calls :mod:`!" +"tomllib` may contribute to the limit." +msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/turtle.pot b/main/locale/pot/LC_MESSAGES/library/turtle.pot index 5f416b9a0c3..6f69458db17 100644 --- a/main/locale/pot/LC_MESSAGES/library/turtle.pot +++ b/main/locale/pot/LC_MESSAGES/library/turtle.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -25,11 +25,11 @@ msgstr "" msgid "**Source code:** :source:`Lib/turtle.py`" msgstr "" -#: ../../../library/turtle.rst:26 +#: ../../../library/turtle.rst:28 msgid "Introduction" msgstr "" -#: ../../../library/turtle.rst:28 +#: ../../../library/turtle.rst:30 msgid "" "Turtle graphics is an implementation of `the popular geometric drawing tools " "introduced in Logo `_, " @@ -44,11 +44,11 @@ msgid "" "module-requirements`." msgstr "" -#: ../../../library/turtle.rst:37 +#: ../../../library/turtle.rst:39 msgid "Get started" msgstr "" -#: ../../../library/turtle.rst:39 +#: ../../../library/turtle.rst:41 msgid "" "Imagine a robotic turtle starting at (0, 0) in the x-y plane. After an " "``import turtle``, give it the command ``turtle.forward(15)``, and it moves " @@ -57,26 +57,26 @@ msgid "" "degrees clockwise." msgstr "" -#: ../../../library/turtle.rst:46 +#: ../../../library/turtle.rst:48 msgid "" "Turtle can draw intricate shapes using programs that repeat simple moves." msgstr "" -#: ../../../library/turtle.rst:52 +#: ../../../library/turtle.rst:54 msgid "" "In Python, turtle graphics provides a representation of a physical " "\"turtle\" (a little robot with a pen) that draws on a sheet of paper on the " "floor." msgstr "" -#: ../../../library/turtle.rst:55 +#: ../../../library/turtle.rst:57 msgid "" "It's an effective and well-proven way for learners to encounter programming " "concepts and interaction with software, as it provides instant, visible " "feedback. It also provides convenient access to graphical output in general." msgstr "" -#: ../../../library/turtle.rst:60 +#: ../../../library/turtle.rst:62 msgid "" "Turtle drawing was originally created as an educational tool, to be used by " "teachers in the classroom. For the programmer who needs to produce some " @@ -84,161 +84,161 @@ msgid "" "introducing more complex or external libraries into their work." msgstr "" -#: ../../../library/turtle.rst:69 +#: ../../../library/turtle.rst:71 msgid "Tutorial" msgstr "" -#: ../../../library/turtle.rst:71 +#: ../../../library/turtle.rst:73 msgid "" "New users should start here. In this tutorial we'll explore some of the " "basics of turtle drawing." msgstr "" -#: ../../../library/turtle.rst:76 +#: ../../../library/turtle.rst:78 msgid "Starting a turtle environment" msgstr "" -#: ../../../library/turtle.rst:78 +#: ../../../library/turtle.rst:80 msgid "In a Python shell, import all the objects of the ``turtle`` module::" msgstr "" -#: ../../../library/turtle.rst:82 +#: ../../../library/turtle.rst:84 msgid "" "If you run into a ``Standard library module '_tkinter' was not found`` " "error, you'll have to install the :mod:`Tk interface package ` on " "your system." msgstr "" -#: ../../../library/turtle.rst:87 +#: ../../../library/turtle.rst:89 msgid "Basic drawing" msgstr "" -#: ../../../library/turtle.rst:89 +#: ../../../library/turtle.rst:91 msgid "Send the turtle forward 100 steps::" msgstr "" -#: ../../../library/turtle.rst:93 +#: ../../../library/turtle.rst:95 msgid "" "You should see (most likely, in a new window on your display) a line drawn " "by the turtle, heading East. Change the direction of the turtle, so that it " "turns 120 degrees left (anti-clockwise)::" msgstr "" -#: ../../../library/turtle.rst:99 +#: ../../../library/turtle.rst:101 msgid "Let's continue by drawing a triangle::" msgstr "" -#: ../../../library/turtle.rst:105 +#: ../../../library/turtle.rst:107 msgid "" "Notice how the turtle, represented by an arrow, points in different " "directions as you steer it." msgstr "" -#: ../../../library/turtle.rst:108 +#: ../../../library/turtle.rst:110 msgid "" "Experiment with those commands, and also with ``backward()`` and ``right()``." msgstr "" -#: ../../../library/turtle.rst:113 ../../../library/turtle.rst:369 -#: ../../../library/turtle.rst:1067 +#: ../../../library/turtle.rst:115 ../../../library/turtle.rst:371 +#: ../../../library/turtle.rst:1071 msgid "Pen control" msgstr "" -#: ../../../library/turtle.rst:115 +#: ../../../library/turtle.rst:117 msgid "" "Try changing the color - for example, ``color('blue')`` - and width of the " "line - for example, ``width(3)`` - and then drawing again." msgstr "" -#: ../../../library/turtle.rst:118 +#: ../../../library/turtle.rst:120 msgid "" "You can also move the turtle around without drawing, by lifting up the pen: " "``up()`` before moving. To start drawing again, use ``down()``." msgstr "" -#: ../../../library/turtle.rst:123 +#: ../../../library/turtle.rst:125 msgid "The turtle's position" msgstr "" -#: ../../../library/turtle.rst:125 +#: ../../../library/turtle.rst:127 msgid "" "Send your turtle back to its starting-point (useful if it has disappeared " "off-screen)::" msgstr "" -#: ../../../library/turtle.rst:130 +#: ../../../library/turtle.rst:132 msgid "" "The home position is at the center of the turtle's screen. If you ever need " "to know them, get the turtle's x-y coordinates with::" msgstr "" -#: ../../../library/turtle.rst:135 +#: ../../../library/turtle.rst:137 msgid "Home is at ``(0, 0)``." msgstr "" -#: ../../../library/turtle.rst:137 +#: ../../../library/turtle.rst:139 msgid "" "And after a while, it will probably help to clear the window so we can start " "anew::" msgstr "" -#: ../../../library/turtle.rst:144 +#: ../../../library/turtle.rst:146 msgid "Making algorithmic patterns" msgstr "" -#: ../../../library/turtle.rst:146 +#: ../../../library/turtle.rst:148 msgid "Using loops, it's possible to build up geometric patterns::" msgstr "" -#: ../../../library/turtle.rst:155 +#: ../../../library/turtle.rst:157 msgid "\\ - which of course, are limited only by the imagination!" msgstr "" -#: ../../../library/turtle.rst:157 +#: ../../../library/turtle.rst:159 msgid "" "Let's draw the star shape at the top of this page. We want red lines, filled " "in with yellow::" msgstr "" -#: ../../../library/turtle.rst:163 +#: ../../../library/turtle.rst:165 msgid "" "Just as ``up()`` and ``down()`` determine whether lines will be drawn, " "filling can be turned on and off::" msgstr "" -#: ../../../library/turtle.rst:168 +#: ../../../library/turtle.rst:170 msgid "Next we'll create a loop::" msgstr "" -#: ../../../library/turtle.rst:178 +#: ../../../library/turtle.rst:180 msgid "" "``distance(start) < 1`` is a good way to know when the turtle is back at its " "start position." msgstr "" -#: ../../../library/turtle.rst:181 +#: ../../../library/turtle.rst:183 msgid "Finally, complete the filling::" msgstr "" -#: ../../../library/turtle.rst:185 +#: ../../../library/turtle.rst:187 msgid "" "(Note that filling only actually takes place when you give the " "``end_fill()`` command.)" msgstr "" -#: ../../../library/turtle.rst:192 +#: ../../../library/turtle.rst:194 msgid "How to..." msgstr "" -#: ../../../library/turtle.rst:194 +#: ../../../library/turtle.rst:196 msgid "This section covers some typical turtle use-cases and approaches." msgstr "" -#: ../../../library/turtle.rst:198 +#: ../../../library/turtle.rst:200 msgid "Get started as quickly as possible" msgstr "" -#: ../../../library/turtle.rst:200 +#: ../../../library/turtle.rst:202 msgid "" "One of the joys of turtle graphics is the immediate, visual feedback that's " "available from simple commands - it's an excellent way to introduce children " @@ -246,21 +246,21 @@ msgid "" "course)." msgstr "" -#: ../../../library/turtle.rst:205 +#: ../../../library/turtle.rst:207 msgid "" "The turtle module makes this possible by exposing all its basic " "functionality as functions, available with ``from turtle import *``. The :" "ref:`turtle graphics tutorial ` covers this approach." msgstr "" -#: ../../../library/turtle.rst:209 +#: ../../../library/turtle.rst:211 msgid "" "It's worth noting that many of the turtle commands also have even more terse " "equivalents, such as ``fd()`` for :func:`forward`. These are especially " "useful when working with learners for whom typing is not a skill." msgstr "" -#: ../../../library/turtle.rst:215 +#: ../../../library/turtle.rst:217 msgid "" "You'll need to have the :mod:`Tk interface package ` installed on " "your system for turtle graphics to work. Be warned that this is not always " @@ -268,26 +268,26 @@ msgid "" "graphics with a learner." msgstr "" -#: ../../../library/turtle.rst:222 +#: ../../../library/turtle.rst:224 msgid "Automatically begin and end filling" msgstr "" -#: ../../../library/turtle.rst:224 +#: ../../../library/turtle.rst:226 msgid "" "Starting with Python 3.14, you can use the :func:`fill` :term:`context " "manager` instead of :func:`begin_fill` and :func:`end_fill` to automatically " "begin and end fill. Here is an example::" msgstr "" -#: ../../../library/turtle.rst:235 +#: ../../../library/turtle.rst:237 msgid "The code above is equivalent to::" msgstr "" -#: ../../../library/turtle.rst:247 +#: ../../../library/turtle.rst:249 msgid "Use the ``turtle`` module namespace" msgstr "" -#: ../../../library/turtle.rst:249 +#: ../../../library/turtle.rst:251 msgid "" "Using ``from turtle import *`` is convenient - but be warned that it imports " "a rather large collection of objects, and if you're doing anything but " @@ -296,7 +296,7 @@ msgid "" "might be imported)." msgstr "" -#: ../../../library/turtle.rst:255 +#: ../../../library/turtle.rst:257 msgid "" "The solution is to use ``import turtle`` - ``fd()`` becomes ``turtle.fd()``, " "``width()`` becomes ``turtle.width()`` and so on. (If typing \"turtle\" over " @@ -304,39 +304,39 @@ msgid "" "instead.)" msgstr "" -#: ../../../library/turtle.rst:262 +#: ../../../library/turtle.rst:264 msgid "Use turtle graphics in a script" msgstr "" -#: ../../../library/turtle.rst:264 +#: ../../../library/turtle.rst:266 msgid "" "It's recommended to use the ``turtle`` module namespace as described " "immediately above, for example::" msgstr "" -#: ../../../library/turtle.rst:276 +#: ../../../library/turtle.rst:278 msgid "" "Another step is also required though - as soon as the script ends, Python " "will also close the turtle's window. Add::" msgstr "" -#: ../../../library/turtle.rst:281 +#: ../../../library/turtle.rst:283 msgid "" "to the end of the script. The script will now wait to be dismissed and will " "not exit until it is terminated, for example by closing the turtle graphics " "window." msgstr "" -#: ../../../library/turtle.rst:287 +#: ../../../library/turtle.rst:289 msgid "Use object-oriented turtle graphics" msgstr "" -#: ../../../library/turtle.rst:289 +#: ../../../library/turtle.rst:291 msgid "" ":ref:`Explanation of the object-oriented interface `" msgstr "" -#: ../../../library/turtle.rst:291 +#: ../../../library/turtle.rst:293 msgid "" "Other than for very basic introductory purposes, or for trying things out as " "quickly as possible, it's more usual and much more powerful to use the " @@ -344,48 +344,48 @@ msgid "" "multiple turtles on screen at once." msgstr "" -#: ../../../library/turtle.rst:296 +#: ../../../library/turtle.rst:298 msgid "" "In this approach, the various turtle commands are methods of objects (mostly " "of ``Turtle`` objects). You *can* use the object-oriented approach in the " "shell, but it would be more typical in a Python script." msgstr "" -#: ../../../library/turtle.rst:300 +#: ../../../library/turtle.rst:302 msgid "The example above then becomes::" msgstr "" -#: ../../../library/turtle.rst:314 +#: ../../../library/turtle.rst:316 msgid "" "Note the last line. ``t.screen`` is an instance of the :class:`Screen` that " "a Turtle instance exists on; it's created automatically along with the " "turtle." msgstr "" -#: ../../../library/turtle.rst:318 +#: ../../../library/turtle.rst:320 msgid "The turtle's screen can be customised, for example::" msgstr "" -#: ../../../library/turtle.rst:325 +#: ../../../library/turtle.rst:327 msgid "Turtle graphics reference" msgstr "" -#: ../../../library/turtle.rst:329 +#: ../../../library/turtle.rst:331 msgid "" "In the following documentation the argument list for functions is given. " "Methods, of course, have the additional first argument *self* which is " "omitted here." msgstr "" -#: ../../../library/turtle.rst:335 +#: ../../../library/turtle.rst:337 msgid "Turtle methods" msgstr "" -#: ../../../library/turtle.rst:337 ../../../library/turtle.rst:480 +#: ../../../library/turtle.rst:339 ../../../library/turtle.rst:482 msgid "Turtle motion" msgstr "" -#: ../../../library/turtle.rst:338 +#: ../../../library/turtle.rst:340 msgid "Move and draw" msgstr "" @@ -429,7 +429,7 @@ msgstr "" msgid ":func:`home`" msgstr "" -#: ../../../library/turtle.rst:0 ../../../library/turtle.rst:2867 +#: ../../../library/turtle.rst:0 ../../../library/turtle.rst:2880 msgid ":func:`circle`" msgstr "" @@ -437,7 +437,7 @@ msgstr "" msgid ":func:`dot`" msgstr "" -#: ../../../library/turtle.rst:0 ../../../library/turtle.rst:2845 +#: ../../../library/turtle.rst:0 ../../../library/turtle.rst:2858 msgid ":func:`stamp`" msgstr "" @@ -457,7 +457,7 @@ msgstr "" msgid ":func:`speed`" msgstr "" -#: ../../../library/turtle.rst:357 ../../../library/turtle.rst:916 +#: ../../../library/turtle.rst:359 ../../../library/turtle.rst:920 msgid "Tell Turtle's state" msgstr "" @@ -485,7 +485,7 @@ msgstr "" msgid ":func:`distance`" msgstr "" -#: ../../../library/turtle.rst:365 +#: ../../../library/turtle.rst:367 msgid "Setting and measurement" msgstr "" @@ -497,7 +497,7 @@ msgstr "" msgid ":func:`radians`" msgstr "" -#: ../../../library/turtle.rst:370 ../../../library/turtle.rst:1070 +#: ../../../library/turtle.rst:372 ../../../library/turtle.rst:1074 msgid "Drawing state" msgstr "" @@ -521,7 +521,7 @@ msgstr "" msgid ":func:`isdown`" msgstr "" -#: ../../../library/turtle.rst:377 ../../../library/turtle.rst:1162 +#: ../../../library/turtle.rst:379 ../../../library/turtle.rst:1166 msgid "Color control" msgstr "" @@ -537,7 +537,7 @@ msgstr "" msgid ":func:`fillcolor`" msgstr "" -#: ../../../library/turtle.rst:382 ../../../library/turtle.rst:1301 +#: ../../../library/turtle.rst:384 ../../../library/turtle.rst:1305 msgid "Filling" msgstr "" @@ -557,7 +557,7 @@ msgstr "" msgid ":func:`end_fill`" msgstr "" -#: ../../../library/turtle.rst:388 ../../../library/turtle.rst:1371 +#: ../../../library/turtle.rst:390 ../../../library/turtle.rst:1375 msgid "More drawing control" msgstr "" @@ -573,11 +573,11 @@ msgstr "" msgid ":func:`write`" msgstr "" -#: ../../../library/turtle.rst:393 ../../../library/turtle.rst:1417 +#: ../../../library/turtle.rst:395 ../../../library/turtle.rst:1424 msgid "Turtle state" msgstr "" -#: ../../../library/turtle.rst:394 ../../../library/turtle.rst:1420 +#: ../../../library/turtle.rst:396 ../../../library/turtle.rst:1427 msgid "Visibility" msgstr "" @@ -593,7 +593,7 @@ msgstr "" msgid ":func:`isvisible`" msgstr "" -#: ../../../library/turtle.rst:399 ../../../library/turtle.rst:1459 +#: ../../../library/turtle.rst:401 ../../../library/turtle.rst:1469 msgid "Appearance" msgstr "" @@ -629,11 +629,11 @@ msgstr "" msgid ":func:`get_shapepoly`" msgstr "" -#: ../../../library/turtle.rst:409 ../../../library/turtle.rst:1642 +#: ../../../library/turtle.rst:411 ../../../library/turtle.rst:1652 msgid "Using events" msgstr "" -#: ../../../library/turtle.rst:0 ../../../library/turtle.rst:2839 +#: ../../../library/turtle.rst:0 ../../../library/turtle.rst:2852 msgid ":func:`onclick`" msgstr "" @@ -641,11 +641,11 @@ msgstr "" msgid ":func:`onrelease`" msgstr "" -#: ../../../library/turtle.rst:0 ../../../library/turtle.rst:2822 +#: ../../../library/turtle.rst:0 ../../../library/turtle.rst:2835 msgid ":func:`ondrag`" msgstr "" -#: ../../../library/turtle.rst:414 ../../../library/turtle.rst:1716 +#: ../../../library/turtle.rst:416 ../../../library/turtle.rst:1726 msgid "Special Turtle methods" msgstr "" @@ -665,7 +665,7 @@ msgstr "" msgid ":func:`get_poly`" msgstr "" -#: ../../../library/turtle.rst:0 ../../../library/turtle.rst:2861 +#: ../../../library/turtle.rst:0 ../../../library/turtle.rst:2874 msgid ":func:`clone`" msgstr "" @@ -685,11 +685,11 @@ msgstr "" msgid ":func:`undobufferentries`" msgstr "" -#: ../../../library/turtle.rst:427 +#: ../../../library/turtle.rst:429 msgid "Methods of TurtleScreen/Screen" msgstr "" -#: ../../../library/turtle.rst:429 ../../../library/turtle.rst:1887 +#: ../../../library/turtle.rst:431 ../../../library/turtle.rst:1897 msgid "Window control" msgstr "" @@ -717,7 +717,7 @@ msgstr "" msgid ":func:`setworldcoordinates`" msgstr "" -#: ../../../library/turtle.rst:437 ../../../library/turtle.rst:2030 +#: ../../../library/turtle.rst:439 ../../../library/turtle.rst:2043 msgid "Animation control" msgstr "" @@ -737,7 +737,7 @@ msgstr "" msgid ":func:`update`" msgstr "" -#: ../../../library/turtle.rst:443 ../../../library/turtle.rst:2100 +#: ../../../library/turtle.rst:445 ../../../library/turtle.rst:2113 msgid "Using screen events" msgstr "" @@ -765,7 +765,7 @@ msgstr "" msgid ":func:`mainloop` | :func:`done`" msgstr "" -#: ../../../library/turtle.rst:451 ../../../library/turtle.rst:2245 +#: ../../../library/turtle.rst:453 ../../../library/turtle.rst:2258 msgid "Settings and special methods" msgstr "" @@ -801,7 +801,7 @@ msgstr "" msgid ":func:`window_width`" msgstr "" -#: ../../../library/turtle.rst:461 ../../../library/turtle.rst:2209 +#: ../../../library/turtle.rst:463 ../../../library/turtle.rst:2222 msgid "Input methods" msgstr "" @@ -813,7 +813,7 @@ msgstr "" msgid ":func:`numinput`" msgstr "" -#: ../../../library/turtle.rst:465 +#: ../../../library/turtle.rst:467 msgid "Methods specific to Screen" msgstr "" @@ -837,11 +837,11 @@ msgstr "" msgid ":func:`title`" msgstr "" -#: ../../../library/turtle.rst:474 +#: ../../../library/turtle.rst:476 msgid "Methods of RawTurtle/Turtle and corresponding functions" msgstr "" -#: ../../../library/turtle.rst:476 +#: ../../../library/turtle.rst:478 msgid "" "Most of the examples in this section refer to a Turtle instance called " "``turtle``." @@ -851,69 +851,69 @@ msgstr "" msgid "Parameters" msgstr "" -#: ../../../library/turtle.rst:485 ../../../library/turtle.rst:530 -#: ../../../library/turtle.rst:555 ../../../library/turtle.rst:653 -#: ../../../library/turtle.rst:676 ../../../library/turtle.rst:699 +#: ../../../library/turtle.rst:487 ../../../library/turtle.rst:533 +#: ../../../library/turtle.rst:558 ../../../library/turtle.rst:656 +#: ../../../library/turtle.rst:679 ../../../library/turtle.rst:702 msgid "a number (integer or float)" msgstr "" -#: ../../../library/turtle.rst:487 +#: ../../../library/turtle.rst:489 msgid "" "Move the turtle forward by the specified *distance*, in the direction the " "turtle is headed." msgstr "" -#: ../../../library/turtle.rst:507 ../../../library/turtle.rst:749 -#: ../../../library/turtle.rst:1020 ../../../library/turtle.rst:1558 +#: ../../../library/turtle.rst:509 ../../../library/turtle.rst:752 +#: ../../../library/turtle.rst:1024 ../../../library/turtle.rst:1568 msgid "a number" msgstr "" -#: ../../../library/turtle.rst:509 +#: ../../../library/turtle.rst:511 msgid "" "Move the turtle backward by *distance*, opposite to the direction the turtle " "is headed. Do not change the turtle's heading." msgstr "" -#: ../../../library/turtle.rst:532 +#: ../../../library/turtle.rst:535 msgid "" "Turn turtle right by *angle* units. (Units are by default degrees, but can " "be set via the :func:`degrees` and :func:`radians` functions.) Angle " "orientation depends on the turtle mode, see :func:`mode`." msgstr "" -#: ../../../library/turtle.rst:557 +#: ../../../library/turtle.rst:560 msgid "" "Turn turtle left by *angle* units. (Units are by default degrees, but can " "be set via the :func:`degrees` and :func:`radians` functions.) Angle " "orientation depends on the turtle mode, see :func:`mode`." msgstr "" -#: ../../../library/turtle.rst:581 +#: ../../../library/turtle.rst:584 msgid "a number or a pair/vector of numbers" msgstr "" -#: ../../../library/turtle.rst:582 ../../../library/turtle.rst:615 -#: ../../../library/turtle.rst:616 +#: ../../../library/turtle.rst:585 ../../../library/turtle.rst:618 +#: ../../../library/turtle.rst:619 msgid "a number or ``None``" msgstr "" -#: ../../../library/turtle.rst:584 +#: ../../../library/turtle.rst:587 msgid "" "If *y* is ``None``, *x* must be a pair of coordinates or a :class:`Vec2D` (e." "g. as returned by :func:`pos`)." msgstr "" -#: ../../../library/turtle.rst:587 +#: ../../../library/turtle.rst:590 msgid "" "Move turtle to an absolute position. If the pen is down, draw line. Do not " "change the turtle's orientation." msgstr "" -#: ../../../library/turtle.rst:617 +#: ../../../library/turtle.rst:620 msgid "a boolean" msgstr "" -#: ../../../library/turtle.rst:619 +#: ../../../library/turtle.rst:622 msgid "" "Move turtle to an absolute position. Unlike goto(x, y), a line will not be " "drawn. The turtle's orientation does not change. If currently filling, the " @@ -923,77 +923,77 @@ msgid "" "barrier like in goto(x, y)." msgstr "" -#: ../../../library/turtle.rst:655 +#: ../../../library/turtle.rst:658 msgid "" "Set the turtle's first coordinate to *x*, leave second coordinate unchanged." msgstr "" -#: ../../../library/turtle.rst:678 +#: ../../../library/turtle.rst:681 msgid "" "Set the turtle's second coordinate to *y*, leave first coordinate unchanged." msgstr "" -#: ../../../library/turtle.rst:701 +#: ../../../library/turtle.rst:704 msgid "" "Set the orientation of the turtle to *to_angle*. Here are some common " "directions in degrees:" msgstr "" -#: ../../../library/turtle.rst:705 +#: ../../../library/turtle.rst:708 msgid "standard mode" msgstr "" -#: ../../../library/turtle.rst:705 +#: ../../../library/turtle.rst:708 msgid "logo mode" msgstr "" -#: ../../../library/turtle.rst:707 +#: ../../../library/turtle.rst:710 msgid "0 - east" msgstr "" -#: ../../../library/turtle.rst:707 +#: ../../../library/turtle.rst:710 msgid "0 - north" msgstr "" -#: ../../../library/turtle.rst:708 +#: ../../../library/turtle.rst:711 msgid "90 - north" msgstr "" -#: ../../../library/turtle.rst:708 +#: ../../../library/turtle.rst:711 msgid "90 - east" msgstr "" -#: ../../../library/turtle.rst:709 +#: ../../../library/turtle.rst:712 msgid "180 - west" msgstr "" -#: ../../../library/turtle.rst:709 +#: ../../../library/turtle.rst:712 msgid "180 - south" msgstr "" -#: ../../../library/turtle.rst:710 +#: ../../../library/turtle.rst:713 msgid "270 - south" msgstr "" -#: ../../../library/turtle.rst:710 +#: ../../../library/turtle.rst:713 msgid "270 - west" msgstr "" -#: ../../../library/turtle.rst:723 +#: ../../../library/turtle.rst:726 msgid "" "Move turtle to the origin -- coordinates (0,0) -- and set its heading to its " "start-orientation (which depends on the mode, see :func:`mode`)." msgstr "" -#: ../../../library/turtle.rst:750 +#: ../../../library/turtle.rst:753 msgid "a number (or ``None``)" msgstr "" -#: ../../../library/turtle.rst:751 ../../../library/turtle.rst:848 +#: ../../../library/turtle.rst:754 ../../../library/turtle.rst:851 msgid "an integer (or ``None``)" msgstr "" -#: ../../../library/turtle.rst:753 +#: ../../../library/turtle.rst:756 msgid "" "Draw a circle with given *radius*. The center is *radius* units left of the " "turtle; *extent* -- an angle -- determines which part of the circle is " @@ -1004,117 +1004,117 @@ msgid "" "changed by the amount of *extent*." msgstr "" -#: ../../../library/turtle.rst:761 +#: ../../../library/turtle.rst:764 msgid "" "As the circle is approximated by an inscribed regular polygon, *steps* " "determines the number of steps to use. If not given, it will be calculated " "automatically. May be used to draw regular polygons." msgstr "" -#: ../../../library/turtle.rst:791 +#: ../../../library/turtle.rst:794 msgid "an integer >= 1 (if given)" msgstr "" -#: ../../../library/turtle.rst:792 +#: ../../../library/turtle.rst:795 msgid "a colorstring or a numeric color tuple" msgstr "" -#: ../../../library/turtle.rst:794 +#: ../../../library/turtle.rst:797 msgid "" "Draw a circular dot with diameter *size*, using *color*. If *size* is not " "given, the maximum of ``pensize+4`` and ``2*pensize`` is used." msgstr "" -#: ../../../library/turtle.rst:812 +#: ../../../library/turtle.rst:815 msgid "" "Stamp a copy of the turtle shape onto the canvas at the current turtle " "position. Return a stamp_id for that stamp, which can be used to delete it " "by calling ``clearstamp(stamp_id)``." msgstr "" -#: ../../../library/turtle.rst:826 +#: ../../../library/turtle.rst:829 msgid "an integer, must be return value of previous :func:`stamp` call" msgstr "" -#: ../../../library/turtle.rst:829 +#: ../../../library/turtle.rst:832 msgid "Delete stamp with given *stampid*." msgstr "" -#: ../../../library/turtle.rst:850 +#: ../../../library/turtle.rst:853 msgid "" "Delete all or first/last *n* of turtle's stamps. If *n* is ``None``, delete " "all stamps, if *n* > 0 delete first *n* stamps, else if *n* < 0 delete last " "*n* stamps." msgstr "" -#: ../../../library/turtle.rst:866 +#: ../../../library/turtle.rst:870 msgid "" "Undo (repeatedly) the last turtle action(s). Number of available undo " "actions is determined by the size of the undobuffer." msgstr "" -#: ../../../library/turtle.rst:881 +#: ../../../library/turtle.rst:885 msgid "an integer in the range 0..10 or a speedstring (see below)" msgstr "" -#: ../../../library/turtle.rst:883 +#: ../../../library/turtle.rst:887 msgid "" "Set the turtle's speed to an integer value in the range 0..10. If no " "argument is given, return current speed." msgstr "" -#: ../../../library/turtle.rst:886 +#: ../../../library/turtle.rst:890 msgid "" "If input is a number greater than 10 or smaller than 0.5, speed is set to " "0. Speedstrings are mapped to speedvalues as follows:" msgstr "" -#: ../../../library/turtle.rst:889 +#: ../../../library/turtle.rst:893 msgid "\"fastest\": 0" msgstr "" -#: ../../../library/turtle.rst:890 +#: ../../../library/turtle.rst:894 msgid "\"fast\": 10" msgstr "" -#: ../../../library/turtle.rst:891 +#: ../../../library/turtle.rst:895 msgid "\"normal\": 6" msgstr "" -#: ../../../library/turtle.rst:892 +#: ../../../library/turtle.rst:896 msgid "\"slow\": 3" msgstr "" -#: ../../../library/turtle.rst:893 +#: ../../../library/turtle.rst:897 msgid "\"slowest\": 1" msgstr "" -#: ../../../library/turtle.rst:895 +#: ../../../library/turtle.rst:899 msgid "" "Speeds from 1 to 10 enforce increasingly faster animation of line drawing " "and turtle turning." msgstr "" -#: ../../../library/turtle.rst:898 +#: ../../../library/turtle.rst:902 msgid "" "Attention: *speed* = 0 means that *no* animation takes place. forward/back " "makes turtle jump and likewise left/right make the turtle turn instantly." msgstr "" -#: ../../../library/turtle.rst:921 +#: ../../../library/turtle.rst:925 msgid "" "Return the turtle's current location (x,y) (as a :class:`Vec2D` vector)." msgstr "" -#: ../../../library/turtle.rst:932 ../../../library/turtle.rst:995 +#: ../../../library/turtle.rst:936 ../../../library/turtle.rst:999 msgid "a number or a pair/vector of numbers or a turtle instance" msgstr "" -#: ../../../library/turtle.rst:933 ../../../library/turtle.rst:996 +#: ../../../library/turtle.rst:937 ../../../library/turtle.rst:1000 msgid "a number if *x* is a number, else ``None``" msgstr "" -#: ../../../library/turtle.rst:935 +#: ../../../library/turtle.rst:939 msgid "" "Return the angle between the line from turtle position to position specified " "by (x,y), the vector or the other turtle. This depends on the turtle's " @@ -1122,116 +1122,116 @@ msgid "" "\"logo\"." msgstr "" -#: ../../../library/turtle.rst:949 +#: ../../../library/turtle.rst:953 msgid "Return the turtle's x coordinate." msgstr "" -#: ../../../library/turtle.rst:965 +#: ../../../library/turtle.rst:969 msgid "Return the turtle's y coordinate." msgstr "" -#: ../../../library/turtle.rst:981 +#: ../../../library/turtle.rst:985 msgid "" "Return the turtle's current heading (value depends on the turtle mode, see :" "func:`mode`)." msgstr "" -#: ../../../library/turtle.rst:998 +#: ../../../library/turtle.rst:1002 msgid "" "Return the distance from the turtle to (x,y), the given vector, or the given " "other turtle, in turtle step units." msgstr "" -#: ../../../library/turtle.rst:1016 +#: ../../../library/turtle.rst:1020 msgid "Settings for measurement" msgstr "" -#: ../../../library/turtle.rst:1022 +#: ../../../library/turtle.rst:1026 msgid "" "Set angle measurement units, i.e. set number of \"degrees\" for a full " "circle. Default value is 360 degrees." msgstr "" -#: ../../../library/turtle.rst:1045 +#: ../../../library/turtle.rst:1049 msgid "" "Set the angle measurement units to radians. Equivalent to ``degrees(2*math." "pi)``." msgstr "" -#: ../../../library/turtle.rst:1076 +#: ../../../library/turtle.rst:1080 msgid "Pull the pen down -- drawing when moving." msgstr "" -#: ../../../library/turtle.rst:1083 +#: ../../../library/turtle.rst:1087 msgid "Pull the pen up -- no drawing when moving." msgstr "" -#: ../../../library/turtle.rst:1089 +#: ../../../library/turtle.rst:1093 msgid "a positive number" msgstr "" -#: ../../../library/turtle.rst:1091 +#: ../../../library/turtle.rst:1095 msgid "" "Set the line thickness to *width* or return it. If resizemode is set to " "\"auto\" and turtleshape is a polygon, that polygon is drawn with the same " "line thickness. If no argument is given, the current pensize is returned." msgstr "" -#: ../../../library/turtle.rst:1105 +#: ../../../library/turtle.rst:1109 msgid "a dictionary with some or all of the below listed keys" msgstr "" -#: ../../../library/turtle.rst:1106 +#: ../../../library/turtle.rst:1110 msgid "one or more keyword-arguments with the below listed keys as keywords" msgstr "" -#: ../../../library/turtle.rst:1108 +#: ../../../library/turtle.rst:1112 msgid "" "Return or set the pen's attributes in a \"pen-dictionary\" with the " "following key/value pairs:" msgstr "" -#: ../../../library/turtle.rst:1111 +#: ../../../library/turtle.rst:1115 msgid "\"shown\": True/False" msgstr "" -#: ../../../library/turtle.rst:1112 +#: ../../../library/turtle.rst:1116 msgid "\"pendown\": True/False" msgstr "" -#: ../../../library/turtle.rst:1113 +#: ../../../library/turtle.rst:1117 msgid "\"pencolor\": color-string or color-tuple" msgstr "" -#: ../../../library/turtle.rst:1114 +#: ../../../library/turtle.rst:1118 msgid "\"fillcolor\": color-string or color-tuple" msgstr "" -#: ../../../library/turtle.rst:1115 +#: ../../../library/turtle.rst:1119 msgid "\"pensize\": positive number" msgstr "" -#: ../../../library/turtle.rst:1116 +#: ../../../library/turtle.rst:1120 msgid "\"speed\": number in range 0..10" msgstr "" -#: ../../../library/turtle.rst:1117 +#: ../../../library/turtle.rst:1121 msgid "\"resizemode\": \"auto\" or \"user\" or \"noresize\"" msgstr "" -#: ../../../library/turtle.rst:1118 +#: ../../../library/turtle.rst:1122 msgid "\"stretchfactor\": (positive number, positive number)" msgstr "" -#: ../../../library/turtle.rst:1119 +#: ../../../library/turtle.rst:1123 msgid "\"outline\": positive number" msgstr "" -#: ../../../library/turtle.rst:1120 +#: ../../../library/turtle.rst:1124 msgid "\"tilt\": number" msgstr "" -#: ../../../library/turtle.rst:1122 +#: ../../../library/turtle.rst:1126 msgid "" "This dictionary can be used as argument for a subsequent call to :func:`pen` " "to restore the former pen-state. Moreover one or more of these attributes " @@ -1239,193 +1239,193 @@ msgid "" "attributes in one statement." msgstr "" -#: ../../../library/turtle.rst:1148 +#: ../../../library/turtle.rst:1152 msgid "Return ``True`` if pen is down, ``False`` if it's up." msgstr "" -#: ../../../library/turtle.rst:1168 +#: ../../../library/turtle.rst:1172 msgid "Return or set the pencolor." msgstr "" -#: ../../../library/turtle.rst:1170 ../../../library/turtle.rst:1221 -#: ../../../library/turtle.rst:1895 +#: ../../../library/turtle.rst:1174 ../../../library/turtle.rst:1225 +#: ../../../library/turtle.rst:1905 msgid "Four input formats are allowed:" msgstr "" -#: ../../../library/turtle.rst:1172 +#: ../../../library/turtle.rst:1176 msgid "``pencolor()``" msgstr "" -#: ../../../library/turtle.rst:1173 +#: ../../../library/turtle.rst:1177 msgid "" "Return the current pencolor as color specification string or as a tuple (see " "example). May be used as input to another color/pencolor/fillcolor/bgcolor " "call." msgstr "" -#: ../../../library/turtle.rst:1177 +#: ../../../library/turtle.rst:1181 msgid "``pencolor(colorstring)``" msgstr "" -#: ../../../library/turtle.rst:1178 +#: ../../../library/turtle.rst:1182 msgid "" "Set pencolor to *colorstring*, which is a Tk color specification string, " "such as ``\"red\"``, ``\"yellow\"``, or ``\"#33cc8c\"``." msgstr "" -#: ../../../library/turtle.rst:1181 +#: ../../../library/turtle.rst:1185 msgid "``pencolor((r, g, b))``" msgstr "" -#: ../../../library/turtle.rst:1182 +#: ../../../library/turtle.rst:1186 msgid "" "Set pencolor to the RGB color represented by the tuple of *r*, *g*, and " "*b*. Each of *r*, *g*, and *b* must be in the range 0..colormode, where " "colormode is either 1.0 or 255 (see :func:`colormode`)." msgstr "" -#: ../../../library/turtle.rst:1186 +#: ../../../library/turtle.rst:1190 msgid "``pencolor(r, g, b)``" msgstr "" -#: ../../../library/turtle.rst:1187 +#: ../../../library/turtle.rst:1191 msgid "" "Set pencolor to the RGB color represented by *r*, *g*, and *b*. Each of " "*r*, *g*, and *b* must be in the range 0..colormode." msgstr "" -#: ../../../library/turtle.rst:1190 +#: ../../../library/turtle.rst:1194 msgid "" "If turtleshape is a polygon, the outline of that polygon is drawn with the " "newly set pencolor." msgstr "" -#: ../../../library/turtle.rst:1219 +#: ../../../library/turtle.rst:1223 msgid "Return or set the fillcolor." msgstr "" -#: ../../../library/turtle.rst:1223 +#: ../../../library/turtle.rst:1227 msgid "``fillcolor()``" msgstr "" -#: ../../../library/turtle.rst:1224 +#: ../../../library/turtle.rst:1228 msgid "" "Return the current fillcolor as color specification string, possibly in " "tuple format (see example). May be used as input to another color/pencolor/" "fillcolor/bgcolor call." msgstr "" -#: ../../../library/turtle.rst:1228 +#: ../../../library/turtle.rst:1232 msgid "``fillcolor(colorstring)``" msgstr "" -#: ../../../library/turtle.rst:1229 +#: ../../../library/turtle.rst:1233 msgid "" "Set fillcolor to *colorstring*, which is a Tk color specification string, " "such as ``\"red\"``, ``\"yellow\"``, or ``\"#33cc8c\"``." msgstr "" -#: ../../../library/turtle.rst:1232 +#: ../../../library/turtle.rst:1236 msgid "``fillcolor((r, g, b))``" msgstr "" -#: ../../../library/turtle.rst:1233 +#: ../../../library/turtle.rst:1237 msgid "" "Set fillcolor to the RGB color represented by the tuple of *r*, *g*, and " "*b*. Each of *r*, *g*, and *b* must be in the range 0..colormode, where " "colormode is either 1.0 or 255 (see :func:`colormode`)." msgstr "" -#: ../../../library/turtle.rst:1237 +#: ../../../library/turtle.rst:1241 msgid "``fillcolor(r, g, b)``" msgstr "" -#: ../../../library/turtle.rst:1238 +#: ../../../library/turtle.rst:1242 msgid "" "Set fillcolor to the RGB color represented by *r*, *g*, and *b*. Each of " "*r*, *g*, and *b* must be in the range 0..colormode." msgstr "" -#: ../../../library/turtle.rst:1241 +#: ../../../library/turtle.rst:1245 msgid "" "If turtleshape is a polygon, the interior of that polygon is drawn with the " "newly set fillcolor." msgstr "" -#: ../../../library/turtle.rst:1265 +#: ../../../library/turtle.rst:1269 msgid "Return or set pencolor and fillcolor." msgstr "" -#: ../../../library/turtle.rst:1267 +#: ../../../library/turtle.rst:1271 msgid "" "Several input formats are allowed. They use 0 to 3 arguments as follows:" msgstr "" -#: ../../../library/turtle.rst:1270 +#: ../../../library/turtle.rst:1274 msgid "``color()``" msgstr "" -#: ../../../library/turtle.rst:1271 +#: ../../../library/turtle.rst:1275 msgid "" "Return the current pencolor and the current fillcolor as a pair of color " "specification strings or tuples as returned by :func:`pencolor` and :func:" "`fillcolor`." msgstr "" -#: ../../../library/turtle.rst:1275 +#: ../../../library/turtle.rst:1279 msgid "``color(colorstring)``, ``color((r,g,b))``, ``color(r,g,b)``" msgstr "" -#: ../../../library/turtle.rst:1276 +#: ../../../library/turtle.rst:1280 msgid "" "Inputs as in :func:`pencolor`, set both, fillcolor and pencolor, to the " "given value." msgstr "" -#: ../../../library/turtle.rst:1279 +#: ../../../library/turtle.rst:1283 msgid "" "``color(colorstring1, colorstring2)``, ``color((r1,g1,b1), (r2,g2,b2))``" msgstr "" -#: ../../../library/turtle.rst:1280 +#: ../../../library/turtle.rst:1284 msgid "" "Equivalent to ``pencolor(colorstring1)`` and ``fillcolor(colorstring2)`` and " "analogously if the other input format is used." msgstr "" -#: ../../../library/turtle.rst:1283 +#: ../../../library/turtle.rst:1287 msgid "" "If turtleshape is a polygon, outline and interior of that polygon is drawn " "with the newly set colors." msgstr "" -#: ../../../library/turtle.rst:1297 +#: ../../../library/turtle.rst:1301 msgid "See also: Screen method :func:`colormode`." msgstr "" -#: ../../../library/turtle.rst:1311 +#: ../../../library/turtle.rst:1315 msgid "Return fillstate (``True`` if filling, ``False`` else)." msgstr "" -#: ../../../library/turtle.rst:1324 +#: ../../../library/turtle.rst:1328 msgid "Fill the shape drawn in the ``with turtle.fill():`` block." msgstr "" -#: ../../../library/turtle.rst:1333 +#: ../../../library/turtle.rst:1337 msgid "" "Using :func:`!fill` is equivalent to adding the :func:`begin_fill` before " "the fill-block and :func:`end_fill` after the fill-block:" msgstr "" -#: ../../../library/turtle.rst:1349 +#: ../../../library/turtle.rst:1353 msgid "To be called just before drawing a shape to be filled." msgstr "" -#: ../../../library/turtle.rst:1354 +#: ../../../library/turtle.rst:1358 msgid "Fill the shape drawn after the last call to :func:`begin_fill`." msgstr "" -#: ../../../library/turtle.rst:1356 +#: ../../../library/turtle.rst:1360 msgid "" "Whether or not overlap regions for self-intersecting polygons or multiple " "shapes are filled depends on the operating system graphics, type of overlap, " @@ -1433,36 +1433,36 @@ msgid "" "all yellow or have some white regions." msgstr "" -#: ../../../library/turtle.rst:1375 +#: ../../../library/turtle.rst:1379 msgid "" "Delete the turtle's drawings from the screen, re-center the turtle and set " "variables to the default values." msgstr "" -#: ../../../library/turtle.rst:1396 +#: ../../../library/turtle.rst:1400 msgid "" "Delete the turtle's drawings from the screen. Do not move turtle. State " "and position of the turtle as well as drawings of other turtles are not " "affected." msgstr "" -#: ../../../library/turtle.rst:1402 +#: ../../../library/turtle.rst:1406 msgid "object to be written to the TurtleScreen" msgstr "" -#: ../../../library/turtle.rst:1403 +#: ../../../library/turtle.rst:1407 msgid "True/False" msgstr "" -#: ../../../library/turtle.rst:1404 +#: ../../../library/turtle.rst:1408 msgid "one of the strings \"left\", \"center\" or right\"" msgstr "" -#: ../../../library/turtle.rst:1405 +#: ../../../library/turtle.rst:1409 msgid "a triple (fontname, fontsize, fonttype)" msgstr "" -#: ../../../library/turtle.rst:1407 +#: ../../../library/turtle.rst:1411 msgid "" "Write text - the string representation of *arg* - at the current turtle " "position according to *align* (\"left\", \"center\" or \"right\") and with " @@ -1470,26 +1470,26 @@ msgid "" "corner of the text. By default, *move* is ``False``." msgstr "" -#: ../../../library/turtle.rst:1425 +#: ../../../library/turtle.rst:1432 msgid "" "Make the turtle invisible. It's a good idea to do this while you're in the " "middle of doing some complex drawing, because hiding the turtle speeds up " "the drawing observably." msgstr "" -#: ../../../library/turtle.rst:1438 +#: ../../../library/turtle.rst:1445 msgid "Make the turtle visible." msgstr "" -#: ../../../library/turtle.rst:1448 +#: ../../../library/turtle.rst:1455 msgid "Return ``True`` if the Turtle is shown, ``False`` if it's hidden." msgstr "" -#: ../../../library/turtle.rst:1463 +#: ../../../library/turtle.rst:1473 msgid "a string which is a valid shapename" msgstr "" -#: ../../../library/turtle.rst:1465 +#: ../../../library/turtle.rst:1475 msgid "" "Set turtle shape to shape with given *name* or, if name is not given, return " "name of current shape. Shape with *name* must exist in the TurtleScreen's " @@ -1499,45 +1499,45 @@ msgid "" "`register_shape`." msgstr "" -#: ../../../library/turtle.rst:1483 +#: ../../../library/turtle.rst:1493 msgid "one of the strings \"auto\", \"user\", \"noresize\"" msgstr "" -#: ../../../library/turtle.rst:1485 +#: ../../../library/turtle.rst:1495 msgid "" "Set resizemode to one of the values: \"auto\", \"user\", \"noresize\". If " "*rmode* is not given, return current resizemode. Different resizemodes have " "the following effects:" msgstr "" -#: ../../../library/turtle.rst:1489 +#: ../../../library/turtle.rst:1499 msgid "" "\"auto\": adapts the appearance of the turtle corresponding to the value of " "pensize." msgstr "" -#: ../../../library/turtle.rst:1490 +#: ../../../library/turtle.rst:1500 msgid "" "\"user\": adapts the appearance of the turtle according to the values of " "stretchfactor and outlinewidth (outline), which are set by :func:`shapesize`." msgstr "" -#: ../../../library/turtle.rst:1493 +#: ../../../library/turtle.rst:1503 msgid "\"noresize\": no adaption of the turtle's appearance takes place." msgstr "" -#: ../../../library/turtle.rst:1495 +#: ../../../library/turtle.rst:1505 msgid "" "``resizemode(\"user\")`` is called by :func:`shapesize` when used with " "arguments." msgstr "" -#: ../../../library/turtle.rst:1510 ../../../library/turtle.rst:1511 -#: ../../../library/turtle.rst:1512 +#: ../../../library/turtle.rst:1520 ../../../library/turtle.rst:1521 +#: ../../../library/turtle.rst:1522 msgid "positive number" msgstr "" -#: ../../../library/turtle.rst:1514 +#: ../../../library/turtle.rst:1524 msgid "" "Return or set the pen's attributes x/y-stretchfactors and/or outline. Set " "resizemode to \"user\". If and only if resizemode is set to \"user\", the " @@ -1547,12 +1547,12 @@ msgid "" "determines the width of the shape's outline." msgstr "" -#: ../../../library/turtle.rst:1537 ../../../library/turtle.rst:2228 -#: ../../../library/turtle.rst:2229 ../../../library/turtle.rst:2230 +#: ../../../library/turtle.rst:1547 ../../../library/turtle.rst:2241 +#: ../../../library/turtle.rst:2242 ../../../library/turtle.rst:2243 msgid "number (optional)" msgstr "" -#: ../../../library/turtle.rst:1539 +#: ../../../library/turtle.rst:1549 msgid "" "Set or return the current shearfactor. Shear the turtleshape according to " "the given shearfactor shear, which is the tangent of the shear angle. Do " @@ -1561,19 +1561,19 @@ msgid "" "by which lines parallel to the heading of the turtle are sheared." msgstr "" -#: ../../../library/turtle.rst:1560 +#: ../../../library/turtle.rst:1570 msgid "" "Rotate the turtleshape by *angle* from its current tilt-angle, but do *not* " "change the turtle's heading (direction of movement)." msgstr "" -#: ../../../library/turtle.rst:1577 ../../../library/turtle.rst:1600 -#: ../../../library/turtle.rst:1601 ../../../library/turtle.rst:1602 -#: ../../../library/turtle.rst:1603 +#: ../../../library/turtle.rst:1587 ../../../library/turtle.rst:1610 +#: ../../../library/turtle.rst:1611 ../../../library/turtle.rst:1612 +#: ../../../library/turtle.rst:1613 msgid "a number (optional)" msgstr "" -#: ../../../library/turtle.rst:1579 +#: ../../../library/turtle.rst:1589 msgid "" "Set or return the current tilt-angle. If angle is given, rotate the " "turtleshape to point in the direction specified by angle, regardless of its " @@ -1583,11 +1583,11 @@ msgid "" "turtle (its direction of movement)." msgstr "" -#: ../../../library/turtle.rst:1605 +#: ../../../library/turtle.rst:1615 msgid "Set or return the current transformation matrix of the turtle shape." msgstr "" -#: ../../../library/turtle.rst:1607 +#: ../../../library/turtle.rst:1617 msgid "" "If none of the matrix elements are given, return the transformation matrix " "as a tuple of 4 elements. Otherwise set the given elements and transform the " @@ -1597,107 +1597,107 @@ msgid "" "tiltangle according to the given matrix." msgstr "" -#: ../../../library/turtle.rst:1629 +#: ../../../library/turtle.rst:1639 msgid "" "Return the current shape polygon as tuple of coordinate pairs. This can be " "used to define a new shape or components of a compound shape." msgstr "" -#: ../../../library/turtle.rst:1647 ../../../library/turtle.rst:1669 -#: ../../../library/turtle.rst:1694 ../../../library/turtle.rst:2152 +#: ../../../library/turtle.rst:1657 ../../../library/turtle.rst:1679 +#: ../../../library/turtle.rst:1704 ../../../library/turtle.rst:2165 msgid "" "a function with two arguments which will be called with the coordinates of " "the clicked point on the canvas" msgstr "" -#: ../../../library/turtle.rst:1649 ../../../library/turtle.rst:1671 -#: ../../../library/turtle.rst:1696 ../../../library/turtle.rst:2154 +#: ../../../library/turtle.rst:1659 ../../../library/turtle.rst:1681 +#: ../../../library/turtle.rst:1706 ../../../library/turtle.rst:2167 msgid "number of the mouse-button, defaults to 1 (left mouse button)" msgstr "" -#: ../../../library/turtle.rst:1650 ../../../library/turtle.rst:1672 -#: ../../../library/turtle.rst:1697 ../../../library/turtle.rst:2155 +#: ../../../library/turtle.rst:1660 ../../../library/turtle.rst:1682 +#: ../../../library/turtle.rst:1707 ../../../library/turtle.rst:2168 msgid "" "``True`` or ``False`` -- if ``True``, a new binding will be added, otherwise " "it will replace a former binding" msgstr "" -#: ../../../library/turtle.rst:1653 +#: ../../../library/turtle.rst:1663 msgid "" "Bind *fun* to mouse-click events on this turtle. If *fun* is ``None``, " "existing bindings are removed. Example for the anonymous turtle, i.e. the " "procedural way:" msgstr "" -#: ../../../library/turtle.rst:1675 +#: ../../../library/turtle.rst:1685 msgid "" "Bind *fun* to mouse-button-release events on this turtle. If *fun* is " "``None``, existing bindings are removed." msgstr "" -#: ../../../library/turtle.rst:1700 +#: ../../../library/turtle.rst:1710 msgid "" "Bind *fun* to mouse-move events on this turtle. If *fun* is ``None``, " "existing bindings are removed." msgstr "" -#: ../../../library/turtle.rst:1703 +#: ../../../library/turtle.rst:1713 msgid "" "Remark: Every sequence of mouse-move-events on a turtle is preceded by a " "mouse-click event on that turtle." msgstr "" -#: ../../../library/turtle.rst:1711 +#: ../../../library/turtle.rst:1721 msgid "" "Subsequently, clicking and dragging the Turtle will move it across the " "screen thereby producing handdrawings (if pen is down)." msgstr "" -#: ../../../library/turtle.rst:1721 +#: ../../../library/turtle.rst:1731 msgid "" "Record the vertices of a polygon drawn in the ``with turtle.poly():`` block. " "The first and last vertices will be connected." msgstr "" -#: ../../../library/turtle.rst:1737 +#: ../../../library/turtle.rst:1747 msgid "" "Start recording the vertices of a polygon. Current turtle position is first " "vertex of polygon." msgstr "" -#: ../../../library/turtle.rst:1743 +#: ../../../library/turtle.rst:1753 msgid "" "Stop recording the vertices of a polygon. Current turtle position is last " "vertex of polygon. This will be connected with the first vertex." msgstr "" -#: ../../../library/turtle.rst:1749 +#: ../../../library/turtle.rst:1759 msgid "Return the last recorded polygon." msgstr "" -#: ../../../library/turtle.rst:1768 +#: ../../../library/turtle.rst:1778 msgid "" "Create and return a clone of the turtle with same position, heading and " "turtle properties." msgstr "" -#: ../../../library/turtle.rst:1781 +#: ../../../library/turtle.rst:1791 msgid "" "Return the Turtle object itself. Only reasonable use: as a function to " "return the \"anonymous turtle\":" msgstr "" -#: ../../../library/turtle.rst:1795 +#: ../../../library/turtle.rst:1805 msgid "" "Return the :class:`TurtleScreen` object the turtle is drawing on. " "TurtleScreen methods can then be called for that object." msgstr "" -#: ../../../library/turtle.rst:1809 +#: ../../../library/turtle.rst:1819 msgid "an integer or ``None``" msgstr "" -#: ../../../library/turtle.rst:1811 +#: ../../../library/turtle.rst:1821 msgid "" "Set or disable undobuffer. If *size* is an integer, an empty undobuffer of " "given size is installed. *size* gives the maximum number of turtle actions " @@ -1705,109 +1705,109 @@ msgid "" "``None``, the undobuffer is disabled." msgstr "" -#: ../../../library/turtle.rst:1824 +#: ../../../library/turtle.rst:1834 msgid "Return number of entries in the undobuffer." msgstr "" -#: ../../../library/turtle.rst:1837 +#: ../../../library/turtle.rst:1847 msgid "Compound shapes" msgstr "" -#: ../../../library/turtle.rst:1839 +#: ../../../library/turtle.rst:1849 msgid "" "To use compound turtle shapes, which consist of several polygons of " "different color, you must use the helper class :class:`Shape` explicitly as " "described below:" msgstr "" -#: ../../../library/turtle.rst:1843 +#: ../../../library/turtle.rst:1853 msgid "Create an empty Shape object of type \"compound\"." msgstr "" -#: ../../../library/turtle.rst:1844 +#: ../../../library/turtle.rst:1854 msgid "" "Add as many components to this object as desired, using the :meth:`~Shape." "addcomponent` method." msgstr "" -#: ../../../library/turtle.rst:1847 +#: ../../../library/turtle.rst:1857 msgid "For example:" msgstr "" -#: ../../../library/turtle.rst:1858 +#: ../../../library/turtle.rst:1868 msgid "Now add the Shape to the Screen's shapelist and use it:" msgstr "" -#: ../../../library/turtle.rst:1869 +#: ../../../library/turtle.rst:1879 msgid "" "The :class:`Shape` class is used internally by the :func:`register_shape` " "method in different ways. The application programmer has to deal with the " "Shape class *only* when using compound shapes like shown above!" msgstr "" -#: ../../../library/turtle.rst:1875 +#: ../../../library/turtle.rst:1885 msgid "Methods of TurtleScreen/Screen and corresponding functions" msgstr "" -#: ../../../library/turtle.rst:1877 +#: ../../../library/turtle.rst:1887 msgid "" "Most of the examples in this section refer to a TurtleScreen instance called " "``screen``." msgstr "" -#: ../../../library/turtle.rst:1893 +#: ../../../library/turtle.rst:1903 msgid "Return or set the background color of the TurtleScreen." msgstr "" -#: ../../../library/turtle.rst:1897 +#: ../../../library/turtle.rst:1907 msgid "``bgcolor()``" msgstr "" -#: ../../../library/turtle.rst:1898 +#: ../../../library/turtle.rst:1908 msgid "" "Return the current background color as color specification string or as a " "tuple (see example). May be used as input to another color/pencolor/" "fillcolor/bgcolor call." msgstr "" -#: ../../../library/turtle.rst:1902 +#: ../../../library/turtle.rst:1912 msgid "``bgcolor(colorstring)``" msgstr "" -#: ../../../library/turtle.rst:1903 +#: ../../../library/turtle.rst:1913 msgid "" "Set the background color to *colorstring*, which is a Tk color specification " "string, such as ``\"red\"``, ``\"yellow\"``, or ``\"#33cc8c\"``." msgstr "" -#: ../../../library/turtle.rst:1906 +#: ../../../library/turtle.rst:1916 msgid "``bgcolor((r, g, b))``" msgstr "" -#: ../../../library/turtle.rst:1907 +#: ../../../library/turtle.rst:1917 msgid "" "Set the background color to the RGB color represented by the tuple of *r*, " "*g*, and *b*. Each of *r*, *g*, and *b* must be in the range 0..colormode, " "where colormode is either 1.0 or 255 (see :func:`colormode`)." msgstr "" -#: ../../../library/turtle.rst:1912 +#: ../../../library/turtle.rst:1922 msgid "``bgcolor(r, g, b)``" msgstr "" -#: ../../../library/turtle.rst:1913 +#: ../../../library/turtle.rst:1923 msgid "" "Set the background color to the RGB color represented by *r*, *g*, and *b*. " "Each of *r*, *g*, and *b* must be in the range 0..colormode." msgstr "" -#: ../../../library/turtle.rst:1929 +#: ../../../library/turtle.rst:1939 msgid "" "a string, name of an image file (PNG, GIF, PGM, and PPM) or ``\"nopic\"``, " "or ``None``" msgstr "" -#: ../../../library/turtle.rst:1932 +#: ../../../library/turtle.rst:1942 msgid "" "Set background image or return name of current backgroundimage. If " "*picname* is a filename, set the corresponding image as background. If " @@ -1815,44 +1815,44 @@ msgid "" "*picname* is ``None``, return the filename of the current backgroundimage. ::" msgstr "" -#: ../../../library/turtle.rst:1948 +#: ../../../library/turtle.rst:1958 msgid "" "This TurtleScreen method is available as a global function only under the " "name ``clearscreen``. The global function ``clear`` is a different one " "derived from the Turtle method ``clear``." msgstr "" -#: ../../../library/turtle.rst:1955 +#: ../../../library/turtle.rst:1965 msgid "" "Delete all drawings and all turtles from the TurtleScreen. Reset the now " "empty TurtleScreen to its initial state: white background, no background " "image, no event bindings and tracing on." msgstr "" -#: ../../../library/turtle.rst:1964 +#: ../../../library/turtle.rst:1974 msgid "" "This TurtleScreen method is available as a global function only under the " "name ``resetscreen``. The global function ``reset`` is another one derived " "from the Turtle method ``reset``." msgstr "" -#: ../../../library/turtle.rst:1971 +#: ../../../library/turtle.rst:1981 msgid "Reset all Turtles on the Screen to their initial state." msgstr "" -#: ../../../library/turtle.rst:1976 +#: ../../../library/turtle.rst:1986 msgid "positive integer, new width of canvas in pixels" msgstr "" -#: ../../../library/turtle.rst:1977 +#: ../../../library/turtle.rst:1987 msgid "positive integer, new height of canvas in pixels" msgstr "" -#: ../../../library/turtle.rst:1978 +#: ../../../library/turtle.rst:1988 msgid "colorstring or color-tuple, new background color" msgstr "" -#: ../../../library/turtle.rst:1980 +#: ../../../library/turtle.rst:1990 msgid "" "If no arguments are given, return current (canvaswidth, canvasheight). Else " "resize the canvas the turtles are drawing on. Do not alter the drawing " @@ -1861,66 +1861,66 @@ msgid "" "outside the canvas before." msgstr "" -#: ../../../library/turtle.rst:1992 +#: ../../../library/turtle.rst:2005 msgid "e.g. to search for an erroneously escaped turtle ;-)" msgstr "" -#: ../../../library/turtle.rst:1997 +#: ../../../library/turtle.rst:2010 msgid "a number, x-coordinate of lower left corner of canvas" msgstr "" -#: ../../../library/turtle.rst:1998 +#: ../../../library/turtle.rst:2011 msgid "a number, y-coordinate of lower left corner of canvas" msgstr "" -#: ../../../library/turtle.rst:1999 +#: ../../../library/turtle.rst:2012 msgid "a number, x-coordinate of upper right corner of canvas" msgstr "" -#: ../../../library/turtle.rst:2000 +#: ../../../library/turtle.rst:2013 msgid "a number, y-coordinate of upper right corner of canvas" msgstr "" -#: ../../../library/turtle.rst:2002 +#: ../../../library/turtle.rst:2015 msgid "" "Set up user-defined coordinate system and switch to mode \"world\" if " "necessary. This performs a ``screen.reset()``. If mode \"world\" is " "already active, all drawings are redrawn according to the new coordinates." msgstr "" -#: ../../../library/turtle.rst:2006 +#: ../../../library/turtle.rst:2019 msgid "" "**ATTENTION**: in user-defined coordinate systems angles may appear " "distorted." msgstr "" -#: ../../../library/turtle.rst:2034 +#: ../../../library/turtle.rst:2047 msgid "" "Temporarily disable turtle animation. The code written inside the " "``no_animation`` block will not be animated; once the code block is exited, " "the drawing will appear." msgstr "" -#: ../../../library/turtle.rst:2051 +#: ../../../library/turtle.rst:2064 msgid "positive integer" msgstr "" -#: ../../../library/turtle.rst:2053 +#: ../../../library/turtle.rst:2066 msgid "" "Set or return the drawing *delay* in milliseconds. (This is approximately " "the time interval between two consecutive canvas updates.) The longer the " "drawing delay, the slower the animation." msgstr "" -#: ../../../library/turtle.rst:2057 +#: ../../../library/turtle.rst:2070 msgid "Optional argument:" msgstr "" -#: ../../../library/turtle.rst:2071 ../../../library/turtle.rst:2072 +#: ../../../library/turtle.rst:2084 ../../../library/turtle.rst:2085 msgid "nonnegative integer" msgstr "" -#: ../../../library/turtle.rst:2074 +#: ../../../library/turtle.rst:2087 msgid "" "Turn turtle animation on/off and set delay for update drawings. If *n* is " "given, only each n-th regular screen update is really performed. (Can be " @@ -1929,75 +1929,75 @@ msgid "" "delay value (see :func:`delay`)." msgstr "" -#: ../../../library/turtle.rst:2094 +#: ../../../library/turtle.rst:2107 msgid "Perform a TurtleScreen update. To be used when tracer is turned off." msgstr "" -#: ../../../library/turtle.rst:2096 +#: ../../../library/turtle.rst:2109 msgid "See also the RawTurtle/Turtle method :func:`speed`." msgstr "" -#: ../../../library/turtle.rst:2104 +#: ../../../library/turtle.rst:2117 msgid "" "Set focus on TurtleScreen (in order to collect key-events). Dummy arguments " "are provided in order to be able to pass :func:`listen` to the onclick " "method." msgstr "" -#: ../../../library/turtle.rst:2111 ../../../library/turtle.rst:2131 +#: ../../../library/turtle.rst:2124 ../../../library/turtle.rst:2144 msgid "a function with no arguments or ``None``" msgstr "" -#: ../../../library/turtle.rst:2112 ../../../library/turtle.rst:2132 +#: ../../../library/turtle.rst:2125 ../../../library/turtle.rst:2145 msgid "a string: key (e.g. \"a\") or key-symbol (e.g. \"space\")" msgstr "" -#: ../../../library/turtle.rst:2114 +#: ../../../library/turtle.rst:2127 msgid "" "Bind *fun* to key-release event of key. If *fun* is ``None``, event " "bindings are removed. Remark: in order to be able to register key-events, " "TurtleScreen must have the focus. (See method :func:`listen`.)" msgstr "" -#: ../../../library/turtle.rst:2134 +#: ../../../library/turtle.rst:2147 msgid "" "Bind *fun* to key-press event of key if key is given, or to any key-press-" "event if no key is given. Remark: in order to be able to register key-" "events, TurtleScreen must have focus. (See method :func:`listen`.)" msgstr "" -#: ../../../library/turtle.rst:2158 +#: ../../../library/turtle.rst:2171 msgid "" "Bind *fun* to mouse-click events on this screen. If *fun* is ``None``, " "existing bindings are removed." msgstr "" -#: ../../../library/turtle.rst:2161 +#: ../../../library/turtle.rst:2174 msgid "" "Example for a TurtleScreen instance named ``screen`` and a Turtle instance " "named ``turtle``:" msgstr "" -#: ../../../library/turtle.rst:2172 +#: ../../../library/turtle.rst:2185 msgid "" "This TurtleScreen method is available as a global function only under the " "name ``onscreenclick``. The global function ``onclick`` is another one " "derived from the Turtle method ``onclick``." msgstr "" -#: ../../../library/turtle.rst:2179 +#: ../../../library/turtle.rst:2192 msgid "a function with no arguments" msgstr "" -#: ../../../library/turtle.rst:2180 +#: ../../../library/turtle.rst:2193 msgid "a number >= 0" msgstr "" -#: ../../../library/turtle.rst:2182 +#: ../../../library/turtle.rst:2195 msgid "Install a timer that calls *fun* after *t* milliseconds." msgstr "" -#: ../../../library/turtle.rst:2200 +#: ../../../library/turtle.rst:2213 msgid "" "Starts event loop - calling Tkinter's mainloop function. Must be the last " "statement in a turtle graphics program. Must *not* be used if a script is " @@ -2005,12 +2005,12 @@ msgid "" "turtle graphics. ::" msgstr "" -#: ../../../library/turtle.rst:2213 ../../../library/turtle.rst:2214 #: ../../../library/turtle.rst:2226 ../../../library/turtle.rst:2227 +#: ../../../library/turtle.rst:2239 ../../../library/turtle.rst:2240 msgid "string" msgstr "" -#: ../../../library/turtle.rst:2216 +#: ../../../library/turtle.rst:2229 msgid "" "Pop up a dialog window for input of a string. Parameter title is the title " "of the dialog window, prompt is a text mostly describing what information to " @@ -2018,7 +2018,7 @@ msgid "" "``None``. ::" msgstr "" -#: ../../../library/turtle.rst:2232 +#: ../../../library/turtle.rst:2245 msgid "" "Pop up a dialog window for input of a number. title is the title of the " "dialog window, prompt is a text mostly describing what numerical information " @@ -2029,17 +2029,17 @@ msgid "" "return ``None``. ::" msgstr "" -#: ../../../library/turtle.rst:2249 +#: ../../../library/turtle.rst:2262 msgid "one of the strings \"standard\", \"logo\" or \"world\"" msgstr "" -#: ../../../library/turtle.rst:2251 +#: ../../../library/turtle.rst:2264 msgid "" "Set turtle mode (\"standard\", \"logo\" or \"world\") and perform reset. If " "mode is not given, current mode is returned." msgstr "" -#: ../../../library/turtle.rst:2254 +#: ../../../library/turtle.rst:2267 msgid "" "Mode \"standard\" is compatible with old :mod:`!turtle`. Mode \"logo\" is " "compatible with most Logo turtle graphics. Mode \"world\" uses user-defined " @@ -2047,133 +2047,133 @@ msgid "" "if ``x/y`` unit-ratio doesn't equal 1." msgstr "" -#: ../../../library/turtle.rst:2260 +#: ../../../library/turtle.rst:2273 msgid "Mode" msgstr "" -#: ../../../library/turtle.rst:2260 +#: ../../../library/turtle.rst:2273 msgid "Initial turtle heading" msgstr "" -#: ../../../library/turtle.rst:2260 +#: ../../../library/turtle.rst:2273 msgid "positive angles" msgstr "" -#: ../../../library/turtle.rst:2262 +#: ../../../library/turtle.rst:2275 msgid "\"standard\"" msgstr "" -#: ../../../library/turtle.rst:2262 +#: ../../../library/turtle.rst:2275 msgid "to the right (east)" msgstr "" -#: ../../../library/turtle.rst:2262 +#: ../../../library/turtle.rst:2275 msgid "counterclockwise" msgstr "" -#: ../../../library/turtle.rst:2263 +#: ../../../library/turtle.rst:2276 msgid "\"logo\"" msgstr "" -#: ../../../library/turtle.rst:2263 +#: ../../../library/turtle.rst:2276 msgid "upward (north)" msgstr "" -#: ../../../library/turtle.rst:2263 +#: ../../../library/turtle.rst:2276 msgid "clockwise" msgstr "" -#: ../../../library/turtle.rst:2276 +#: ../../../library/turtle.rst:2289 msgid "one of the values 1.0 or 255" msgstr "" -#: ../../../library/turtle.rst:2278 +#: ../../../library/turtle.rst:2291 msgid "" "Return the colormode or set it to 1.0 or 255. Subsequently *r*, *g*, *b* " "values of color triples have to be in the range 0..*cmode*." msgstr "" -#: ../../../library/turtle.rst:2299 +#: ../../../library/turtle.rst:2312 msgid "" "Return the Canvas of this TurtleScreen. Useful for insiders who know what " "to do with a Tkinter Canvas." msgstr "" -#: ../../../library/turtle.rst:2312 +#: ../../../library/turtle.rst:2325 msgid "Return a list of names of all currently available turtle shapes." msgstr "" -#: ../../../library/turtle.rst:2324 +#: ../../../library/turtle.rst:2337 msgid "There are four different ways to call this function:" msgstr "" -#: ../../../library/turtle.rst:2326 +#: ../../../library/turtle.rst:2339 msgid "" "*name* is the name of an image file (PNG, GIF, PGM, and PPM) and *shape* is " "``None``: Install the corresponding image shape. ::" msgstr "" -#: ../../../library/turtle.rst:2332 ../../../library/turtle.rst:2341 +#: ../../../library/turtle.rst:2345 ../../../library/turtle.rst:2354 msgid "" "Image shapes *do not* rotate when turning the turtle, so they do not display " "the heading of the turtle!" msgstr "" -#: ../../../library/turtle.rst:2335 +#: ../../../library/turtle.rst:2348 msgid "" "*name* is an arbitrary string and *shape* is the name of an image file (PNG, " "GIF, PGM, and PPM): Install the corresponding image shape. ::" msgstr "" -#: ../../../library/turtle.rst:2344 +#: ../../../library/turtle.rst:2357 msgid "" "*name* is an arbitrary string and *shape* is a tuple of pairs of " "coordinates: Install the corresponding polygon shape." msgstr "" -#: ../../../library/turtle.rst:2352 +#: ../../../library/turtle.rst:2365 msgid "" "*name* is an arbitrary string and *shape* is a (compound) :class:`Shape` " "object: Install the corresponding compound shape." msgstr "" -#: ../../../library/turtle.rst:2355 +#: ../../../library/turtle.rst:2368 msgid "" "Add a turtle shape to TurtleScreen's shapelist. Only thusly registered " "shapes can be used by issuing the command ``shape(shapename)``." msgstr "" -#: ../../../library/turtle.rst:2358 +#: ../../../library/turtle.rst:2371 msgid "" "Added support for PNG, PGM, and PPM image formats. Both a shape name and an " "image file name can be specified." msgstr "" -#: ../../../library/turtle.rst:2365 +#: ../../../library/turtle.rst:2378 msgid "Return the list of turtles on the screen." msgstr "" -#: ../../../library/turtle.rst:2376 +#: ../../../library/turtle.rst:2389 msgid "Return the height of the turtle window. ::" msgstr "" -#: ../../../library/turtle.rst:2384 +#: ../../../library/turtle.rst:2397 msgid "Return the width of the turtle window. ::" msgstr "" -#: ../../../library/turtle.rst:2393 +#: ../../../library/turtle.rst:2406 msgid "Methods specific to Screen, not inherited from TurtleScreen" msgstr "" -#: ../../../library/turtle.rst:2397 +#: ../../../library/turtle.rst:2410 msgid "Shut the turtlegraphics window." msgstr "" -#: ../../../library/turtle.rst:2402 +#: ../../../library/turtle.rst:2415 msgid "Bind ``bye()`` method to mouse clicks on the Screen." msgstr "" -#: ../../../library/turtle.rst:2405 +#: ../../../library/turtle.rst:2418 msgid "" "If the value \"using_IDLE\" in the configuration dictionary is ``False`` " "(default value), also enter mainloop. Remark: If IDLE with the ``-n`` " @@ -2182,226 +2182,226 @@ msgid "" "client script." msgstr "" -#: ../../../library/turtle.rst:2414 +#: ../../../library/turtle.rst:2427 msgid "Save the current turtle drawing (and turtles) as a PostScript file." msgstr "" -#: ../../../library/turtle.rst:2416 +#: ../../../library/turtle.rst:2429 msgid "the path of the saved PostScript file" msgstr "" -#: ../../../library/turtle.rst:2417 +#: ../../../library/turtle.rst:2430 msgid "" "if ``False`` and there already exists a file with the given filename, then " "the function will raise a ``FileExistsError``. If it is ``True``, the file " "will be overwritten." msgstr "" -#: ../../../library/turtle.rst:2432 +#: ../../../library/turtle.rst:2445 msgid "" "Set the size and position of the main window. Default values of arguments " "are stored in the configuration dictionary and can be changed via a :file:" "`turtle.cfg` file." msgstr "" -#: ../../../library/turtle.rst:2436 +#: ../../../library/turtle.rst:2449 msgid "" "if an integer, a size in pixels, if a float, a fraction of the screen; " "default is 50% of screen" msgstr "" -#: ../../../library/turtle.rst:2438 +#: ../../../library/turtle.rst:2451 msgid "" "if an integer, the height in pixels, if a float, a fraction of the screen; " "default is 75% of screen" msgstr "" -#: ../../../library/turtle.rst:2440 +#: ../../../library/turtle.rst:2453 msgid "" "if positive, starting position in pixels from the left edge of the screen, " "if negative from the right edge, if ``None``, center window horizontally" msgstr "" -#: ../../../library/turtle.rst:2443 +#: ../../../library/turtle.rst:2456 msgid "" "if positive, starting position in pixels from the top edge of the screen, if " "negative from the bottom edge, if ``None``, center window vertically" msgstr "" -#: ../../../library/turtle.rst:2458 +#: ../../../library/turtle.rst:2471 msgid "a string that is shown in the titlebar of the turtle graphics window" msgstr "" -#: ../../../library/turtle.rst:2461 +#: ../../../library/turtle.rst:2474 msgid "Set title of turtle window to *titlestring*." msgstr "" -#: ../../../library/turtle.rst:2470 +#: ../../../library/turtle.rst:2483 msgid "Public classes" msgstr "" -#: ../../../library/turtle.rst:2476 +#: ../../../library/turtle.rst:2489 msgid "" "a :class:`!tkinter.Canvas`, a :class:`ScrolledCanvas` or a :class:" "`TurtleScreen`" msgstr "" -#: ../../../library/turtle.rst:2479 +#: ../../../library/turtle.rst:2492 msgid "" "Create a turtle. The turtle has all methods described above as \"methods of " "Turtle/RawTurtle\"." msgstr "" -#: ../../../library/turtle.rst:2485 +#: ../../../library/turtle.rst:2498 msgid "" "Subclass of RawTurtle, has the same interface but draws on a default :class:" "`Screen` object created automatically when needed for the first time." msgstr "" -#: ../../../library/turtle.rst:2491 +#: ../../../library/turtle.rst:2504 msgid "a :class:`!tkinter.Canvas`" msgstr "" -#: ../../../library/turtle.rst:2493 +#: ../../../library/turtle.rst:2506 msgid "" "Provides screen oriented methods like :func:`bgcolor` etc. that are " "described above." msgstr "" -#: ../../../library/turtle.rst:2498 +#: ../../../library/turtle.rst:2511 msgid "" "Subclass of TurtleScreen, with :ref:`four methods added `." msgstr "" -#: ../../../library/turtle.rst:2503 +#: ../../../library/turtle.rst:2516 msgid "" "some Tkinter widget to contain the ScrolledCanvas, i.e. a Tkinter-canvas " "with scrollbars added" msgstr "" -#: ../../../library/turtle.rst:2506 +#: ../../../library/turtle.rst:2519 msgid "" "Used by class Screen, which thus automatically provides a ScrolledCanvas as " "playground for the turtles." msgstr "" -#: ../../../library/turtle.rst:2511 +#: ../../../library/turtle.rst:2524 msgid "one of the strings \"polygon\", \"image\", \"compound\"" msgstr "" -#: ../../../library/turtle.rst:2513 +#: ../../../library/turtle.rst:2526 msgid "" "Data structure modeling shapes. The pair ``(type_, data)`` must follow this " "specification:" msgstr "" -#: ../../../library/turtle.rst:2518 +#: ../../../library/turtle.rst:2531 msgid "*type_*" msgstr "" -#: ../../../library/turtle.rst:2518 +#: ../../../library/turtle.rst:2531 msgid "*data*" msgstr "" -#: ../../../library/turtle.rst:2520 +#: ../../../library/turtle.rst:2533 msgid "\"polygon\"" msgstr "" -#: ../../../library/turtle.rst:2520 +#: ../../../library/turtle.rst:2533 msgid "a polygon-tuple, i.e. a tuple of pairs of coordinates" msgstr "" -#: ../../../library/turtle.rst:2521 +#: ../../../library/turtle.rst:2534 msgid "\"image\"" msgstr "" -#: ../../../library/turtle.rst:2521 +#: ../../../library/turtle.rst:2534 msgid "an image (in this form only used internally!)" msgstr "" -#: ../../../library/turtle.rst:2522 +#: ../../../library/turtle.rst:2535 msgid "\"compound\"" msgstr "" -#: ../../../library/turtle.rst:2522 +#: ../../../library/turtle.rst:2535 msgid "" "``None`` (a compound shape has to be constructed using the :meth:" "`addcomponent` method)" msgstr "" -#: ../../../library/turtle.rst:2528 +#: ../../../library/turtle.rst:2541 msgid "a polygon, i.e. a tuple of pairs of numbers" msgstr "" -#: ../../../library/turtle.rst:2529 +#: ../../../library/turtle.rst:2542 msgid "a color the *poly* will be filled with" msgstr "" -#: ../../../library/turtle.rst:2530 +#: ../../../library/turtle.rst:2543 msgid "a color for the poly's outline (if given)" msgstr "" -#: ../../../library/turtle.rst:2532 +#: ../../../library/turtle.rst:2545 msgid "Example:" msgstr "" -#: ../../../library/turtle.rst:2542 +#: ../../../library/turtle.rst:2555 msgid "See :ref:`compoundshapes`." msgstr "" -#: ../../../library/turtle.rst:2547 +#: ../../../library/turtle.rst:2560 msgid "" "A two-dimensional vector class, used as a helper class for implementing " "turtle graphics. May be useful for turtle graphics programs too. Derived " "from tuple, so a vector is a tuple!" msgstr "" -#: ../../../library/turtle.rst:2551 +#: ../../../library/turtle.rst:2564 msgid "Provides (for *a*, *b* vectors, *k* number):" msgstr "" -#: ../../../library/turtle.rst:2553 +#: ../../../library/turtle.rst:2566 msgid "``a + b`` vector addition" msgstr "" -#: ../../../library/turtle.rst:2554 +#: ../../../library/turtle.rst:2567 msgid "``a - b`` vector subtraction" msgstr "" -#: ../../../library/turtle.rst:2555 +#: ../../../library/turtle.rst:2568 msgid "``a * b`` inner product" msgstr "" -#: ../../../library/turtle.rst:2556 +#: ../../../library/turtle.rst:2569 msgid "``k * a`` and ``a * k`` multiplication with scalar" msgstr "" -#: ../../../library/turtle.rst:2557 +#: ../../../library/turtle.rst:2570 msgid "``abs(a)`` absolute value of a" msgstr "" -#: ../../../library/turtle.rst:2558 +#: ../../../library/turtle.rst:2571 msgid "``a.rotate(angle)`` rotation" msgstr "" -#: ../../../library/turtle.rst:2564 +#: ../../../library/turtle.rst:2577 msgid "Explanation" msgstr "" -#: ../../../library/turtle.rst:2566 +#: ../../../library/turtle.rst:2579 msgid "" "A turtle object draws on a screen object, and there a number of key classes " "in the turtle object-oriented interface that can be used to create them and " "relate them to each other." msgstr "" -#: ../../../library/turtle.rst:2570 +#: ../../../library/turtle.rst:2583 msgid "" "A :class:`Turtle` instance will automatically create a :class:`Screen` " "instance if one is not already present." msgstr "" -#: ../../../library/turtle.rst:2573 +#: ../../../library/turtle.rst:2586 msgid "" "``Turtle`` is a subclass of :class:`RawTurtle`, which *doesn't* " "automatically create a drawing surface - a *canvas* will need to be provided " @@ -2409,7 +2409,7 @@ msgid "" "`ScrolledCanvas` or :class:`TurtleScreen`." msgstr "" -#: ../../../library/turtle.rst:2579 +#: ../../../library/turtle.rst:2592 msgid "" ":class:`TurtleScreen` is the basic drawing surface for a turtle. :class:" "`Screen` is a subclass of ``TurtleScreen``, and includes :ref:`some " @@ -2418,7 +2418,7 @@ msgid "" "`!tkinter.Canvas` or a :class:`ScrolledCanvas` as an argument." msgstr "" -#: ../../../library/turtle.rst:2586 +#: ../../../library/turtle.rst:2599 msgid "" "The functional interface for turtle graphics uses the various methods of " "``Turtle`` and ``TurtleScreen``/``Screen``. Behind the scenes, a screen " @@ -2427,65 +2427,65 @@ msgid "" "created whenever any of the functions derived from a Turtle method is called." msgstr "" -#: ../../../library/turtle.rst:2592 +#: ../../../library/turtle.rst:2605 msgid "" "To use multiple turtles on a screen, the object-oriented interface must be " "used." msgstr "" -#: ../../../library/turtle.rst:2597 +#: ../../../library/turtle.rst:2610 msgid "Help and configuration" msgstr "" -#: ../../../library/turtle.rst:2600 +#: ../../../library/turtle.rst:2613 msgid "How to use help" msgstr "" -#: ../../../library/turtle.rst:2602 +#: ../../../library/turtle.rst:2615 msgid "" "The public methods of the Screen and Turtle classes are documented " "extensively via docstrings. So these can be used as online-help via the " "Python help facilities:" msgstr "" -#: ../../../library/turtle.rst:2606 +#: ../../../library/turtle.rst:2619 msgid "" "When using IDLE, tooltips show the signatures and first lines of the " "docstrings of typed in function-/method calls." msgstr "" -#: ../../../library/turtle.rst:2609 +#: ../../../library/turtle.rst:2622 msgid "Calling :func:`help` on methods or functions displays the docstrings::" msgstr "" -#: ../../../library/turtle.rst:2640 +#: ../../../library/turtle.rst:2653 msgid "" "The docstrings of the functions which are derived from methods have a " "modified form::" msgstr "" -#: ../../../library/turtle.rst:2674 +#: ../../../library/turtle.rst:2687 msgid "" "These modified docstrings are created automatically together with the " "function definitions that are derived from the methods at import time." msgstr "" -#: ../../../library/turtle.rst:2679 +#: ../../../library/turtle.rst:2692 msgid "Translation of docstrings into different languages" msgstr "" -#: ../../../library/turtle.rst:2681 +#: ../../../library/turtle.rst:2694 msgid "" "There is a utility to create a dictionary the keys of which are the method " "names and the values of which are the docstrings of the public methods of " "the classes Screen and Turtle." msgstr "" -#: ../../../library/turtle.rst:2687 +#: ../../../library/turtle.rst:2700 msgid "a string, used as filename" msgstr "" -#: ../../../library/turtle.rst:2689 +#: ../../../library/turtle.rst:2702 msgid "" "Create and write docstring-dictionary to a Python script with the given " "filename. This function has to be called explicitly (it is not used by the " @@ -2494,37 +2494,37 @@ msgid "" "for translation of the docstrings into different languages." msgstr "" -#: ../../../library/turtle.rst:2695 +#: ../../../library/turtle.rst:2708 msgid "" "If you (or your students) want to use :mod:`!turtle` with online help in " "your native language, you have to translate the docstrings and save the " "resulting file as e.g. :file:`turtle_docstringdict_german.py`." msgstr "" -#: ../../../library/turtle.rst:2699 +#: ../../../library/turtle.rst:2712 msgid "" "If you have an appropriate entry in your :file:`turtle.cfg` file this " "dictionary will be read in at import time and will replace the original " "English docstrings." msgstr "" -#: ../../../library/turtle.rst:2702 +#: ../../../library/turtle.rst:2715 msgid "" "At the time of this writing there are docstring dictionaries in German and " "in Italian. (Requests please to glingl@aon.at.)" msgstr "" -#: ../../../library/turtle.rst:2708 +#: ../../../library/turtle.rst:2721 msgid "How to configure Screen and Turtles" msgstr "" -#: ../../../library/turtle.rst:2710 +#: ../../../library/turtle.rst:2723 msgid "" "The built-in default configuration mimics the appearance and behaviour of " "the old turtle module in order to retain best possible compatibility with it." msgstr "" -#: ../../../library/turtle.rst:2713 +#: ../../../library/turtle.rst:2726 msgid "" "If you want to use a different configuration which better reflects the " "features of this module or which better fits to your needs, e.g. for use in " @@ -2533,54 +2533,54 @@ msgid "" "settings." msgstr "" -#: ../../../library/turtle.rst:2718 +#: ../../../library/turtle.rst:2731 msgid "" "The built in configuration would correspond to the following ``turtle.cfg``:" msgstr "" -#: ../../../library/turtle.rst:2743 +#: ../../../library/turtle.rst:2756 msgid "Short explanation of selected entries:" msgstr "" -#: ../../../library/turtle.rst:2745 +#: ../../../library/turtle.rst:2758 msgid "" "The first four lines correspond to the arguments of the :func:`Screen.setup " "` method." msgstr "" -#: ../../../library/turtle.rst:2747 +#: ../../../library/turtle.rst:2760 msgid "" "Line 5 and 6 correspond to the arguments of the method :func:`Screen." "screensize `." msgstr "" -#: ../../../library/turtle.rst:2749 +#: ../../../library/turtle.rst:2762 msgid "" "*shape* can be any of the built-in shapes, e.g: arrow, turtle, etc. For " "more info try ``help(shape)``." msgstr "" -#: ../../../library/turtle.rst:2751 +#: ../../../library/turtle.rst:2764 msgid "" "If you want to use no fill color (i.e. make the turtle transparent), you " "have to write ``fillcolor = \"\"`` (but all nonempty strings must not have " "quotes in the cfg file)." msgstr "" -#: ../../../library/turtle.rst:2754 +#: ../../../library/turtle.rst:2767 msgid "" "If you want to reflect the turtle its state, you have to use ``resizemode = " "auto``." msgstr "" -#: ../../../library/turtle.rst:2756 +#: ../../../library/turtle.rst:2769 msgid "" "If you set e.g. ``language = italian`` the docstringdict :file:" "`turtle_docstringdict_italian.py` will be loaded at import time (if present " "on the import path, e.g. in the same directory as :mod:`!turtle`)." msgstr "" -#: ../../../library/turtle.rst:2759 +#: ../../../library/turtle.rst:2772 msgid "" "The entries *exampleturtle* and *examplescreen* define the names of these " "objects as they occur in the docstrings. The transformation of method-" @@ -2588,303 +2588,303 @@ msgid "" "docstrings." msgstr "" -#: ../../../library/turtle.rst:2763 +#: ../../../library/turtle.rst:2776 msgid "" "*using_IDLE*: Set this to ``True`` if you regularly work with IDLE and its " "``-n`` switch (\"no subprocess\"). This will prevent :func:`exitonclick` to " "enter the mainloop." msgstr "" -#: ../../../library/turtle.rst:2767 +#: ../../../library/turtle.rst:2780 msgid "" "There can be a :file:`turtle.cfg` file in the directory where :mod:`!turtle` " "is stored and an additional one in the current working directory. The " "latter will override the settings of the first one." msgstr "" -#: ../../../library/turtle.rst:2771 +#: ../../../library/turtle.rst:2784 msgid "" "The :file:`Lib/turtledemo` directory contains a :file:`turtle.cfg` file. " "You can study it as an example and see its effects when running the demos " "(preferably not from within the demo-viewer)." msgstr "" -#: ../../../library/turtle.rst:2777 +#: ../../../library/turtle.rst:2790 msgid ":mod:`!turtledemo` --- Demo scripts" msgstr "" -#: ../../../library/turtle.rst:2782 +#: ../../../library/turtle.rst:2795 msgid "" "The :mod:`!turtledemo` package includes a set of demo scripts. These " "scripts can be run and viewed using the supplied demo viewer as follows::" msgstr "" -#: ../../../library/turtle.rst:2787 +#: ../../../library/turtle.rst:2800 msgid "" "Alternatively, you can run the demo scripts individually. For example, ::" msgstr "" -#: ../../../library/turtle.rst:2791 +#: ../../../library/turtle.rst:2804 msgid "The :mod:`!turtledemo` package directory contains:" msgstr "" -#: ../../../library/turtle.rst:2793 +#: ../../../library/turtle.rst:2806 msgid "" "A demo viewer :file:`__main__.py` which can be used to view the sourcecode " "of the scripts and run them at the same time." msgstr "" -#: ../../../library/turtle.rst:2795 +#: ../../../library/turtle.rst:2808 msgid "" "Multiple scripts demonstrating different features of the :mod:`!turtle` " "module. Examples can be accessed via the Examples menu. They can also be " "run standalone." msgstr "" -#: ../../../library/turtle.rst:2798 +#: ../../../library/turtle.rst:2811 msgid "" "A :file:`turtle.cfg` file which serves as an example of how to write and use " "such files." msgstr "" -#: ../../../library/turtle.rst:2801 +#: ../../../library/turtle.rst:2814 msgid "The demo scripts are:" msgstr "" -#: ../../../library/turtle.rst:2808 +#: ../../../library/turtle.rst:2821 msgid "Name" msgstr "" -#: ../../../library/turtle.rst:2808 +#: ../../../library/turtle.rst:2821 msgid "Description" msgstr "" -#: ../../../library/turtle.rst:2808 +#: ../../../library/turtle.rst:2821 msgid "Features" msgstr "" -#: ../../../library/turtle.rst:2810 +#: ../../../library/turtle.rst:2823 msgid "``bytedesign``" msgstr "" -#: ../../../library/turtle.rst:2810 +#: ../../../library/turtle.rst:2823 msgid "complex classical turtle graphics pattern" msgstr "" -#: ../../../library/turtle.rst:2810 +#: ../../../library/turtle.rst:2823 msgid ":func:`tracer`, :func:`delay`, :func:`update`" msgstr "" -#: ../../../library/turtle.rst:2813 +#: ../../../library/turtle.rst:2826 msgid "``chaos``" msgstr "" -#: ../../../library/turtle.rst:2813 +#: ../../../library/turtle.rst:2826 msgid "" "graphs Verhulst dynamics, shows that computer's computations can generate " "results sometimes against the common sense expectations" msgstr "" -#: ../../../library/turtle.rst:2813 +#: ../../../library/turtle.rst:2826 msgid "world coordinates" msgstr "" -#: ../../../library/turtle.rst:2819 +#: ../../../library/turtle.rst:2832 msgid "``clock``" msgstr "" -#: ../../../library/turtle.rst:2819 +#: ../../../library/turtle.rst:2832 msgid "analog clock showing time of your computer" msgstr "" -#: ../../../library/turtle.rst:2819 +#: ../../../library/turtle.rst:2832 msgid "turtles as clock's hands, :func:`ontimer`" msgstr "" -#: ../../../library/turtle.rst:2822 +#: ../../../library/turtle.rst:2835 msgid "``colormixer``" msgstr "" -#: ../../../library/turtle.rst:2822 +#: ../../../library/turtle.rst:2835 msgid "experiment with r, g, b" msgstr "" -#: ../../../library/turtle.rst:2824 +#: ../../../library/turtle.rst:2837 msgid "``forest``" msgstr "" -#: ../../../library/turtle.rst:2824 +#: ../../../library/turtle.rst:2837 msgid "3 breadth-first trees" msgstr "" -#: ../../../library/turtle.rst:2824 +#: ../../../library/turtle.rst:2837 msgid "randomization" msgstr "" -#: ../../../library/turtle.rst:2826 +#: ../../../library/turtle.rst:2839 msgid "``fractalcurves``" msgstr "" -#: ../../../library/turtle.rst:2826 +#: ../../../library/turtle.rst:2839 msgid "Hilbert & Koch curves" msgstr "" -#: ../../../library/turtle.rst:2826 +#: ../../../library/turtle.rst:2839 msgid "recursion" msgstr "" -#: ../../../library/turtle.rst:2828 +#: ../../../library/turtle.rst:2841 msgid "``lindenmayer``" msgstr "" -#: ../../../library/turtle.rst:2828 +#: ../../../library/turtle.rst:2841 msgid "ethnomathematics (indian kolams)" msgstr "" -#: ../../../library/turtle.rst:2828 +#: ../../../library/turtle.rst:2841 msgid "L-System" msgstr "" -#: ../../../library/turtle.rst:2831 +#: ../../../library/turtle.rst:2844 msgid "``minimal_hanoi``" msgstr "" -#: ../../../library/turtle.rst:2831 +#: ../../../library/turtle.rst:2844 msgid "Towers of Hanoi" msgstr "" -#: ../../../library/turtle.rst:2831 +#: ../../../library/turtle.rst:2844 msgid "Rectangular Turtles as Hanoi discs (:func:`shape`, :func:`shapesize`)" msgstr "" -#: ../../../library/turtle.rst:2835 +#: ../../../library/turtle.rst:2848 msgid "``nim``" msgstr "" -#: ../../../library/turtle.rst:2835 +#: ../../../library/turtle.rst:2848 msgid "" "play the classical nim game with three heaps of sticks against the computer." msgstr "" -#: ../../../library/turtle.rst:2835 +#: ../../../library/turtle.rst:2848 msgid "turtles as nimsticks, event driven (mouse, keyboard)" msgstr "" -#: ../../../library/turtle.rst:2839 +#: ../../../library/turtle.rst:2852 msgid "``paint``" msgstr "" -#: ../../../library/turtle.rst:2839 +#: ../../../library/turtle.rst:2852 msgid "super minimalistic drawing program" msgstr "" -#: ../../../library/turtle.rst:2842 +#: ../../../library/turtle.rst:2855 msgid "``peace``" msgstr "" -#: ../../../library/turtle.rst:2842 +#: ../../../library/turtle.rst:2855 msgid "elementary" msgstr "" -#: ../../../library/turtle.rst:2842 +#: ../../../library/turtle.rst:2855 msgid "turtle: appearance and animation" msgstr "" -#: ../../../library/turtle.rst:2845 +#: ../../../library/turtle.rst:2858 msgid "``penrose``" msgstr "" -#: ../../../library/turtle.rst:2845 +#: ../../../library/turtle.rst:2858 msgid "aperiodic tiling with kites and darts" msgstr "" -#: ../../../library/turtle.rst:2848 +#: ../../../library/turtle.rst:2861 msgid "``planet_and_moon``" msgstr "" -#: ../../../library/turtle.rst:2848 +#: ../../../library/turtle.rst:2861 msgid "simulation of gravitational system" msgstr "" -#: ../../../library/turtle.rst:2848 +#: ../../../library/turtle.rst:2861 msgid "compound shapes, :class:`Vec2D`" msgstr "" -#: ../../../library/turtle.rst:2851 +#: ../../../library/turtle.rst:2864 msgid "``rosette``" msgstr "" -#: ../../../library/turtle.rst:2851 +#: ../../../library/turtle.rst:2864 msgid "a pattern from the wikipedia article on turtle graphics" msgstr "" -#: ../../../library/turtle.rst:2851 +#: ../../../library/turtle.rst:2864 msgid ":func:`clone`, :func:`undo`" msgstr "" -#: ../../../library/turtle.rst:2854 +#: ../../../library/turtle.rst:2867 msgid "``round_dance``" msgstr "" -#: ../../../library/turtle.rst:2854 +#: ../../../library/turtle.rst:2867 msgid "dancing turtles rotating pairwise in opposite direction" msgstr "" -#: ../../../library/turtle.rst:2854 +#: ../../../library/turtle.rst:2867 msgid "" "compound shapes, :func:`clone` :func:`shapesize`, :func:`tilt`, :func:" "`get_shapepoly`, :func:`update`" msgstr "" -#: ../../../library/turtle.rst:2858 +#: ../../../library/turtle.rst:2871 msgid "``sorting_animate``" msgstr "" -#: ../../../library/turtle.rst:2858 +#: ../../../library/turtle.rst:2871 msgid "visual demonstration of different sorting methods" msgstr "" -#: ../../../library/turtle.rst:2858 +#: ../../../library/turtle.rst:2871 msgid "simple alignment, randomization" msgstr "" -#: ../../../library/turtle.rst:2861 +#: ../../../library/turtle.rst:2874 msgid "``tree``" msgstr "" -#: ../../../library/turtle.rst:2861 +#: ../../../library/turtle.rst:2874 msgid "a (graphical) breadth first tree (using generators)" msgstr "" -#: ../../../library/turtle.rst:2864 +#: ../../../library/turtle.rst:2877 msgid "``two_canvases``" msgstr "" -#: ../../../library/turtle.rst:2864 +#: ../../../library/turtle.rst:2877 msgid "simple design" msgstr "" -#: ../../../library/turtle.rst:2864 +#: ../../../library/turtle.rst:2877 msgid "turtles on two canvases" msgstr "" -#: ../../../library/turtle.rst:2867 +#: ../../../library/turtle.rst:2880 msgid "``yinyang``" msgstr "" -#: ../../../library/turtle.rst:2867 +#: ../../../library/turtle.rst:2880 msgid "another elementary example" msgstr "" -#: ../../../library/turtle.rst:2870 +#: ../../../library/turtle.rst:2883 msgid "Have fun!" msgstr "" -#: ../../../library/turtle.rst:2874 +#: ../../../library/turtle.rst:2887 msgid "Changes since Python 2.6" msgstr "" -#: ../../../library/turtle.rst:2876 +#: ../../../library/turtle.rst:2889 msgid "" "The methods :func:`Turtle.tracer `, :func:`Turtle.window_width " "` and :func:`Turtle.window_height ` have been " @@ -2895,14 +2895,14 @@ msgid "" "methods.)" msgstr "" -#: ../../../library/turtle.rst:2884 +#: ../../../library/turtle.rst:2897 msgid "" "The method :func:`!Turtle.fill` has been eliminated. The behaviour of :func:" "`begin_fill` and :func:`end_fill` have changed slightly: now every filling " "process must be completed with an ``end_fill()`` call." msgstr "" -#: ../../../library/turtle.rst:2889 +#: ../../../library/turtle.rst:2902 msgid "" "A method :func:`Turtle.filling ` has been added. It returns a " "boolean value: ``True`` if a filling process is under way, ``False`` " @@ -2910,11 +2910,11 @@ msgid "" "in Python 2.6." msgstr "" -#: ../../../library/turtle.rst:2895 +#: ../../../library/turtle.rst:2908 msgid "Changes since Python 3.0" msgstr "" -#: ../../../library/turtle.rst:2897 +#: ../../../library/turtle.rst:2910 msgid "" "The :class:`Turtle` methods :func:`shearfactor`, :func:`shapetransform` and :" "func:`get_shapepoly` have been added. Thus the full range of regular linear " @@ -2923,21 +2923,21 @@ msgid "" "set the tilt angle." msgstr "" -#: ../../../library/turtle.rst:2903 +#: ../../../library/turtle.rst:2916 msgid "" "The :class:`Screen` method :func:`onkeypress` has been added as a complement " "to :func:`onkey`. As the latter binds actions to the key release event, an " "alias: :func:`onkeyrelease` was also added for it." msgstr "" -#: ../../../library/turtle.rst:2907 +#: ../../../library/turtle.rst:2920 msgid "" "The method :func:`Screen.mainloop ` has been added, so there is no " "longer a need to use the standalone :func:`mainloop` function when working " "with :class:`Screen` and :class:`Turtle` objects." msgstr "" -#: ../../../library/turtle.rst:2911 +#: ../../../library/turtle.rst:2924 msgid "" "Two input methods have been added: :func:`Screen.textinput ` and :" "func:`Screen.numinput `. These pop up input dialogs and return " diff --git a/main/locale/pot/LC_MESSAGES/library/unittest.pot b/main/locale/pot/LC_MESSAGES/library/unittest.pot index 4094e158a74..eb9aa897fdd 100644 --- a/main/locale/pot/LC_MESSAGES/library/unittest.pot +++ b/main/locale/pot/LC_MESSAGES/library/unittest.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-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -261,118 +261,124 @@ msgstr "" #: ../../../library/unittest.rst:183 msgid "" +"Repeat it for even more detail: ``-vv`` reports also the individual examples " +"of a :mod:`doctest`." +msgstr "" + +#: ../../../library/unittest.rst:186 +msgid "" "When executed without arguments :ref:`unittest-test-discovery` is started::" msgstr "" -#: ../../../library/unittest.rst:187 +#: ../../../library/unittest.rst:190 msgid "For a list of all the command-line options::" msgstr "" -#: ../../../library/unittest.rst:191 +#: ../../../library/unittest.rst:194 msgid "" "In earlier versions it was only possible to run individual test methods and " "not modules or classes." msgstr "" -#: ../../../library/unittest.rst:195 +#: ../../../library/unittest.rst:198 msgid "" "Output is colorized by default and can be :ref:`controlled using environment " "variables `." msgstr "" -#: ../../../library/unittest.rst:200 +#: ../../../library/unittest.rst:203 msgid "Command-line options" msgstr "" -#: ../../../library/unittest.rst:202 +#: ../../../library/unittest.rst:205 msgid ":program:`unittest` supports these command-line options:" msgstr "" -#: ../../../library/unittest.rst:208 +#: ../../../library/unittest.rst:211 msgid "" "The standard output and standard error streams are buffered during the test " "run. Output during a passing test is discarded. Output is echoed normally on " "test fail or error and is added to the failure messages." msgstr "" -#: ../../../library/unittest.rst:214 +#: ../../../library/unittest.rst:217 msgid "" ":kbd:`Control-C` during the test run waits for the current test to end and " "then reports all the results so far. A second :kbd:`Control-C` raises the " "normal :exc:`KeyboardInterrupt` exception." msgstr "" -#: ../../../library/unittest.rst:218 +#: ../../../library/unittest.rst:221 msgid "" "See `Signal Handling`_ for the functions that provide this functionality." msgstr "" -#: ../../../library/unittest.rst:222 +#: ../../../library/unittest.rst:225 msgid "Stop the test run on the first error or failure." msgstr "" -#: ../../../library/unittest.rst:226 +#: ../../../library/unittest.rst:229 msgid "" "Only run test methods and classes that match the pattern or substring. This " "option may be used multiple times, in which case all test cases that match " "any of the given patterns are included." msgstr "" -#: ../../../library/unittest.rst:230 +#: ../../../library/unittest.rst:233 msgid "" "Patterns that contain a wildcard character (``*``) are matched against the " "test name using :meth:`fnmatch.fnmatchcase`; otherwise simple case-sensitive " "substring matching is used." msgstr "" -#: ../../../library/unittest.rst:234 +#: ../../../library/unittest.rst:237 msgid "" "Patterns are matched against the fully qualified test method name as " "imported by the test loader." msgstr "" -#: ../../../library/unittest.rst:237 +#: ../../../library/unittest.rst:240 msgid "" "For example, ``-k foo`` matches ``foo_tests.SomeTest.test_something``, " "``bar_tests.SomeTest.test_foo``, but not ``bar_tests.FooTest." "test_something``." msgstr "" -#: ../../../library/unittest.rst:242 +#: ../../../library/unittest.rst:245 msgid "Show local variables in tracebacks." msgstr "" -#: ../../../library/unittest.rst:246 +#: ../../../library/unittest.rst:249 msgid "Show the N slowest test cases (N=0 for all)." msgstr "" -#: ../../../library/unittest.rst:248 +#: ../../../library/unittest.rst:251 msgid "The command-line options ``-b``, ``-c`` and ``-f`` were added." msgstr "" -#: ../../../library/unittest.rst:251 +#: ../../../library/unittest.rst:254 msgid "The command-line option ``--locals``." msgstr "" -#: ../../../library/unittest.rst:254 +#: ../../../library/unittest.rst:257 msgid "The command-line option ``-k``." msgstr "" -#: ../../../library/unittest.rst:257 +#: ../../../library/unittest.rst:260 msgid "The command-line option ``--durations``." msgstr "" -#: ../../../library/unittest.rst:260 +#: ../../../library/unittest.rst:263 msgid "" "The command line can also be used for test discovery, for running all of the " "tests in a project or just a subset." msgstr "" -#: ../../../library/unittest.rst:266 +#: ../../../library/unittest.rst:269 msgid "Test Discovery" msgstr "" -#: ../../../library/unittest.rst:270 +#: ../../../library/unittest.rst:273 msgid "" "Unittest supports simple test discovery. In order to be compatible with test " "discovery, all of the test files must be :ref:`modules ` or :" @@ -381,47 +387,53 @@ msgid "" "`)." msgstr "" -#: ../../../library/unittest.rst:276 +#: ../../../library/unittest.rst:279 msgid "" "Test discovery is implemented in :meth:`TestLoader.discover`, but can also " "be used from the command line. The basic command-line usage is::" msgstr "" -#: ../../../library/unittest.rst:284 +#: ../../../library/unittest.rst:287 msgid "" "As a shortcut, ``python -m unittest`` is the equivalent of ``python -m " "unittest discover``. If you want to pass arguments to test discovery the " "``discover`` sub-command must be used explicitly." msgstr "" -#: ../../../library/unittest.rst:288 +#: ../../../library/unittest.rst:291 msgid "The ``discover`` sub-command has the following options:" msgstr "" -#: ../../../library/unittest.rst:294 -msgid "Verbose output" +#: ../../../library/unittest.rst:297 +msgid "" +"Verbose output. May be repeated: ``-vv`` reports also the individual " +"examples of a :mod:`doctest`." msgstr "" -#: ../../../library/unittest.rst:298 +#: ../../../library/unittest.rst:300 +msgid "The option can be repeated." +msgstr "" + +#: ../../../library/unittest.rst:305 msgid "Directory to start discovery (``.`` default)" msgstr "" -#: ../../../library/unittest.rst:302 +#: ../../../library/unittest.rst:309 msgid "Pattern to match test files (``test*.py`` default)" msgstr "" -#: ../../../library/unittest.rst:306 +#: ../../../library/unittest.rst:313 msgid "Top level directory of project (defaults to start directory)" msgstr "" -#: ../../../library/unittest.rst:308 +#: ../../../library/unittest.rst:315 msgid "" "The :option:`-s`, :option:`-p`, and :option:`-t` options can be passed in as " "positional arguments in that order. The following two command lines are " "equivalent::" msgstr "" -#: ../../../library/unittest.rst:315 +#: ../../../library/unittest.rst:322 msgid "" "As well as being a path it is possible to pass a package name, for example " "``myproject.subpackage.test``, as the start directory. The package name you " @@ -429,7 +441,7 @@ msgid "" "as the start directory." msgstr "" -#: ../../../library/unittest.rst:322 +#: ../../../library/unittest.rst:329 msgid "" "Test discovery loads tests by importing them. Once test discovery has found " "all the test files from the start directory you specify it turns the paths " @@ -437,31 +449,31 @@ msgid "" "imported as ``foo.bar.baz``." msgstr "" -#: ../../../library/unittest.rst:327 +#: ../../../library/unittest.rst:334 msgid "" "If you have a package installed globally and attempt test discovery on a " "different copy of the package then the import *could* happen from the wrong " "place. If this happens test discovery will warn you and exit." msgstr "" -#: ../../../library/unittest.rst:331 +#: ../../../library/unittest.rst:338 msgid "" "If you supply the start directory as a package name rather than a path to a " "directory then discover assumes that whichever location it imports from is " "the location you intended, so you will not get the warning." msgstr "" -#: ../../../library/unittest.rst:336 +#: ../../../library/unittest.rst:343 msgid "" "Test modules and packages can customize test loading and discovery by " "through the `load_tests protocol`_." msgstr "" -#: ../../../library/unittest.rst:339 +#: ../../../library/unittest.rst:346 msgid "Test discovery supports :term:`namespace packages `." msgstr "" -#: ../../../library/unittest.rst:342 +#: ../../../library/unittest.rst:349 msgid "" "Test discovery dropped the :term:`namespace packages ` " "support. It has been broken since Python 3.7. Start directory and its " @@ -469,24 +481,24 @@ msgid "" "py`` file." msgstr "" -#: ../../../library/unittest.rst:348 +#: ../../../library/unittest.rst:355 msgid "" "If the start directory is the dotted name of the package, the ancestor " "packages can be namespace packages." msgstr "" -#: ../../../library/unittest.rst:351 +#: ../../../library/unittest.rst:358 msgid "" "Test discovery supports :term:`namespace package` as start directory again. " "To avoid scanning directories unrelated to Python, tests are not searched in " "subdirectories that do not contain ``__init__.py``." msgstr "" -#: ../../../library/unittest.rst:360 +#: ../../../library/unittest.rst:367 msgid "Organizing test code" msgstr "" -#: ../../../library/unittest.rst:362 +#: ../../../library/unittest.rst:369 msgid "" "The basic building blocks of unit testing are :dfn:`test cases` --- single " "scenarios that must be set up and checked for correctness. In :mod:`!" @@ -495,21 +507,21 @@ msgid "" "`TestCase` or use :class:`FunctionTestCase`." msgstr "" -#: ../../../library/unittest.rst:368 +#: ../../../library/unittest.rst:375 msgid "" "The testing code of a :class:`TestCase` instance should be entirely self " "contained, such that it can be run either in isolation or in arbitrary " "combination with any number of other test cases." msgstr "" -#: ../../../library/unittest.rst:372 +#: ../../../library/unittest.rst:379 msgid "" "The simplest :class:`TestCase` subclass will simply implement a test method " "(i.e. a method whose name starts with ``test``) in order to perform specific " "testing code::" msgstr "" -#: ../../../library/unittest.rst:383 +#: ../../../library/unittest.rst:390 msgid "" "Note that in order to test something, we use one of the :ref:`assert\\* " "methods ` provided by the :class:`TestCase` base class. If " @@ -518,7 +530,7 @@ msgid "" "other exceptions will be treated as :dfn:`errors`." msgstr "" -#: ../../../library/unittest.rst:389 +#: ../../../library/unittest.rst:396 msgid "" "Tests can be numerous, and their set-up can be repetitive. Luckily, we can " "factor out set-up code by implementing a method called :meth:`~TestCase." @@ -526,32 +538,32 @@ msgid "" "test we run::" msgstr "" -#: ../../../library/unittest.rst:410 +#: ../../../library/unittest.rst:417 msgid "" "The order in which the various tests will be run is determined by sorting " "the test method names with respect to the built-in ordering for strings." msgstr "" -#: ../../../library/unittest.rst:414 +#: ../../../library/unittest.rst:421 msgid "" "If the :meth:`~TestCase.setUp` method raises an exception while the test is " "running, the framework will consider the test to have suffered an error, and " "the test method will not be executed." msgstr "" -#: ../../../library/unittest.rst:418 +#: ../../../library/unittest.rst:425 msgid "" "Similarly, we can provide a :meth:`~TestCase.tearDown` method that tidies up " "after the test method has been run::" msgstr "" -#: ../../../library/unittest.rst:430 +#: ../../../library/unittest.rst:437 msgid "" "If :meth:`~TestCase.setUp` succeeded, :meth:`~TestCase.tearDown` will be run " "whether the test method succeeded or not." msgstr "" -#: ../../../library/unittest.rst:433 +#: ../../../library/unittest.rst:440 msgid "" "Such a working environment for the testing code is called a :dfn:`test " "fixture`. A new TestCase instance is created as a unique test fixture used " @@ -560,7 +572,7 @@ msgid "" "test." msgstr "" -#: ../../../library/unittest.rst:439 +#: ../../../library/unittest.rst:446 msgid "" "It is recommended that you use TestCase implementations to group tests " "together according to the features they test. :mod:`!unittest` provides a " @@ -570,13 +582,13 @@ msgid "" "cases for you and execute them." msgstr "" -#: ../../../library/unittest.rst:446 +#: ../../../library/unittest.rst:453 msgid "" "However, should you want to customize the building of your test suite, you " "can do it yourself::" msgstr "" -#: ../../../library/unittest.rst:459 +#: ../../../library/unittest.rst:466 msgid "" "You can place the definitions of test cases and test suites in the same " "modules as the code they are to test (such as :file:`widget.py`), but there " @@ -584,69 +596,69 @@ msgid "" "as :file:`test_widget.py`:" msgstr "" -#: ../../../library/unittest.rst:464 +#: ../../../library/unittest.rst:471 msgid "The test module can be run standalone from the command line." msgstr "" -#: ../../../library/unittest.rst:466 +#: ../../../library/unittest.rst:473 msgid "The test code can more easily be separated from shipped code." msgstr "" -#: ../../../library/unittest.rst:468 +#: ../../../library/unittest.rst:475 msgid "" "There is less temptation to change test code to fit the code it tests " "without a good reason." msgstr "" -#: ../../../library/unittest.rst:471 +#: ../../../library/unittest.rst:478 msgid "" "Test code should be modified much less frequently than the code it tests." msgstr "" -#: ../../../library/unittest.rst:473 +#: ../../../library/unittest.rst:480 msgid "Tested code can be refactored more easily." msgstr "" -#: ../../../library/unittest.rst:475 +#: ../../../library/unittest.rst:482 msgid "" "Tests for modules written in C must be in separate modules anyway, so why " "not be consistent?" msgstr "" -#: ../../../library/unittest.rst:478 +#: ../../../library/unittest.rst:485 msgid "" "If the testing strategy changes, there is no need to change the source code." msgstr "" -#: ../../../library/unittest.rst:484 +#: ../../../library/unittest.rst:491 msgid "Re-using old test code" msgstr "" -#: ../../../library/unittest.rst:486 +#: ../../../library/unittest.rst:493 msgid "" "Some users will find that they have existing test code that they would like " "to run from :mod:`!unittest`, without converting every old test function to " "a :class:`TestCase` subclass." msgstr "" -#: ../../../library/unittest.rst:490 +#: ../../../library/unittest.rst:497 msgid "" "For this reason, :mod:`!unittest` provides a :class:`FunctionTestCase` " "class. This subclass of :class:`TestCase` can be used to wrap an existing " "test function. Set-up and tear-down functions can also be provided." msgstr "" -#: ../../../library/unittest.rst:494 +#: ../../../library/unittest.rst:501 msgid "Given the following test function::" msgstr "" -#: ../../../library/unittest.rst:501 +#: ../../../library/unittest.rst:508 msgid "" "one can create an equivalent test case instance as follows, with optional " "set-up and tear-down methods::" msgstr "" -#: ../../../library/unittest.rst:510 +#: ../../../library/unittest.rst:517 msgid "" "Even though :class:`FunctionTestCase` can be used to quickly convert an " "existing test base over to a :mod:`!unittest`\\ -based system, this approach " @@ -654,7 +666,7 @@ msgid "" "subclasses will make future test refactorings infinitely easier." msgstr "" -#: ../../../library/unittest.rst:515 +#: ../../../library/unittest.rst:522 msgid "" "In some cases, the existing tests may have been written using the :mod:" "`doctest` module. If so, :mod:`doctest` provides a :class:`~doctest." @@ -662,11 +674,11 @@ msgid "" "instances from the existing :mod:`doctest`\\ -based tests." msgstr "" -#: ../../../library/unittest.rst:524 +#: ../../../library/unittest.rst:531 msgid "Skipping tests and expected failures" msgstr "" -#: ../../../library/unittest.rst:528 +#: ../../../library/unittest.rst:535 msgid "" "Unittest supports skipping individual test methods and even whole classes of " "tests. In addition, it supports marking a test as an \"expected failure,\" " @@ -674,7 +686,7 @@ msgid "" "on a :class:`TestResult`." msgstr "" -#: ../../../library/unittest.rst:533 +#: ../../../library/unittest.rst:540 msgid "" "Skipping a test is simply a matter of using the :deco:`skip` :term:" "`decorator` or one of its conditional variants, calling :meth:`TestCase." @@ -682,56 +694,56 @@ msgid "" "`SkipTest` directly." msgstr "" -#: ../../../library/unittest.rst:537 +#: ../../../library/unittest.rst:544 msgid "Basic skipping looks like this::" msgstr "" -#: ../../../library/unittest.rst:562 +#: ../../../library/unittest.rst:569 msgid "This is the output of running the example above in verbose mode::" msgstr "" -#: ../../../library/unittest.rst:574 +#: ../../../library/unittest.rst:581 msgid "Classes can be skipped just like methods::" msgstr "" -#: ../../../library/unittest.rst:581 +#: ../../../library/unittest.rst:588 msgid "" ":meth:`TestCase.setUp` can also skip the test. This is useful when a " "resource that needs to be set up is not available." msgstr "" -#: ../../../library/unittest.rst:584 +#: ../../../library/unittest.rst:591 msgid "Expected failures use the :deco:`expectedFailure` decorator. ::" msgstr "" -#: ../../../library/unittest.rst:591 +#: ../../../library/unittest.rst:598 msgid "" "It's easy to roll your own skipping decorators by making a decorator that " "calls :func:`skip` on the test when it wants it to be skipped. This " "decorator skips the test unless the passed object has a certain attribute::" msgstr "" -#: ../../../library/unittest.rst:600 +#: ../../../library/unittest.rst:607 msgid "" "The following decorators and exception implement test skipping and expected " "failures:" msgstr "" -#: ../../../library/unittest.rst:604 +#: ../../../library/unittest.rst:611 msgid "" "Unconditionally skip the decorated test. *reason* should describe why the " "test is being skipped." msgstr "" -#: ../../../library/unittest.rst:609 +#: ../../../library/unittest.rst:616 msgid "Skip the decorated test if *condition* is true." msgstr "" -#: ../../../library/unittest.rst:613 +#: ../../../library/unittest.rst:620 msgid "Skip the decorated test unless *condition* is true." msgstr "" -#: ../../../library/unittest.rst:617 +#: ../../../library/unittest.rst:624 msgid "" "Mark the test as an expected failure or error. If the test fails or errors " "in the test function itself (rather than in one of the :dfn:`test fixture` " @@ -739,17 +751,17 @@ msgid "" "be considered a failure." msgstr "" -#: ../../../library/unittest.rst:624 +#: ../../../library/unittest.rst:631 msgid "This exception is raised to skip a test." msgstr "" -#: ../../../library/unittest.rst:626 +#: ../../../library/unittest.rst:633 msgid "" "Usually you can use :meth:`TestCase.skipTest` or one of the skipping " "decorators instead of raising this directly." msgstr "" -#: ../../../library/unittest.rst:629 +#: ../../../library/unittest.rst:636 msgid "" "Skipped tests will not have :meth:`~TestCase.setUp` or :meth:`~TestCase." "tearDown` run around them. Skipped classes will not have :meth:`~TestCase." @@ -757,45 +769,45 @@ msgid "" "have :func:`setUpModule` or :func:`tearDownModule` run." msgstr "" -#: ../../../library/unittest.rst:637 +#: ../../../library/unittest.rst:644 msgid "Distinguishing test iterations using subtests" msgstr "" -#: ../../../library/unittest.rst:641 +#: ../../../library/unittest.rst:648 msgid "" "When there are very small differences among your tests, for instance some " "parameters, unittest allows you to distinguish them inside the body of a " "test method using the :meth:`~TestCase.subTest` context manager." msgstr "" -#: ../../../library/unittest.rst:645 +#: ../../../library/unittest.rst:652 msgid "For example, the following test::" msgstr "" -#: ../../../library/unittest.rst:657 +#: ../../../library/unittest.rst:664 msgid "will produce the following output::" msgstr "" -#: ../../../library/unittest.rst:689 +#: ../../../library/unittest.rst:696 msgid "" "Without using a subtest, execution would stop after the first failure, and " "the error would be less easy to diagnose because the value of ``i`` wouldn't " "be displayed::" msgstr "" -#: ../../../library/unittest.rst:705 +#: ../../../library/unittest.rst:712 msgid "Classes and functions" msgstr "" -#: ../../../library/unittest.rst:707 +#: ../../../library/unittest.rst:714 msgid "This section describes in depth the API of :mod:`!unittest`." msgstr "" -#: ../../../library/unittest.rst:713 +#: ../../../library/unittest.rst:720 msgid "Test cases" msgstr "" -#: ../../../library/unittest.rst:717 +#: ../../../library/unittest.rst:724 msgid "" "Instances of the :class:`TestCase` class represent the logical test units in " "the :mod:`!unittest` universe. This class is intended to be used as a base " @@ -805,21 +817,21 @@ msgid "" "report various kinds of failure." msgstr "" -#: ../../../library/unittest.rst:724 +#: ../../../library/unittest.rst:731 msgid "" "Each instance of :class:`TestCase` will run a single base method: the method " "named *methodName*. In most uses of :class:`TestCase`, you will neither " "change the *methodName* nor reimplement the default ``runTest()`` method." msgstr "" -#: ../../../library/unittest.rst:729 +#: ../../../library/unittest.rst:736 msgid "" ":class:`TestCase` can be instantiated successfully without providing a " "*methodName*. This makes it easier to experiment with :class:`TestCase` from " "the interactive interpreter." msgstr "" -#: ../../../library/unittest.rst:734 +#: ../../../library/unittest.rst:741 msgid "" ":class:`TestCase` instances provide three groups of methods: one group used " "to run the test, another used by the test implementation to check conditions " @@ -827,11 +839,11 @@ msgid "" "test itself to be gathered." msgstr "" -#: ../../../library/unittest.rst:739 +#: ../../../library/unittest.rst:746 msgid "Methods in the first group (running the test) are:" msgstr "" -#: ../../../library/unittest.rst:743 +#: ../../../library/unittest.rst:750 msgid "" "Method called to prepare the test fixture. This is called immediately " "before calling the test method; other than :exc:`AssertionError` or :exc:" @@ -839,7 +851,7 @@ msgid "" "rather than a test failure. The default implementation does nothing." msgstr "" -#: ../../../library/unittest.rst:751 +#: ../../../library/unittest.rst:758 msgid "" "Method called immediately after the test method has been called and the " "result recorded. This is called even if the test method raised an " @@ -852,25 +864,25 @@ msgid "" "The default implementation does nothing." msgstr "" -#: ../../../library/unittest.rst:764 +#: ../../../library/unittest.rst:771 msgid "" "A class method called before tests in an individual class are run. " "``setUpClass`` is called with the class as the only argument and must be " "decorated as a :deco:`classmethod`::" msgstr "" -#: ../../../library/unittest.rst:772 ../../../library/unittest.rst:787 +#: ../../../library/unittest.rst:779 ../../../library/unittest.rst:794 msgid "See `Class and Module Fixtures`_ for more details." msgstr "" -#: ../../../library/unittest.rst:779 +#: ../../../library/unittest.rst:786 msgid "" "A class method called after tests in an individual class have run. " "``tearDownClass`` is called with the class as the only argument and must be " "decorated as a :deco:`classmethod`::" msgstr "" -#: ../../../library/unittest.rst:794 +#: ../../../library/unittest.rst:801 msgid "" "Run the test, collecting the result into the :class:`TestResult` object " "passed as *result*. If *result* is omitted or ``None``, a temporary result " @@ -878,207 +890,207 @@ msgid "" "used. The result object is returned to :meth:`run`'s caller." msgstr "" -#: ../../../library/unittest.rst:800 +#: ../../../library/unittest.rst:807 msgid "" "The same effect may be had by simply calling the :class:`TestCase` instance." msgstr "" -#: ../../../library/unittest.rst:803 +#: ../../../library/unittest.rst:810 msgid "" "Previous versions of ``run`` did not return the result. Neither did calling " "an instance." msgstr "" -#: ../../../library/unittest.rst:809 +#: ../../../library/unittest.rst:816 msgid "" "Calling this during a test method or :meth:`setUp` skips the current test. " "See :ref:`unittest-skipping` for more information." msgstr "" -#: ../../../library/unittest.rst:817 +#: ../../../library/unittest.rst:824 msgid "" "Return a context manager which executes the enclosed code block as a " "subtest. *msg* and *params* are optional, arbitrary values which are " "displayed whenever a subtest fails, allowing you to identify them clearly." msgstr "" -#: ../../../library/unittest.rst:822 +#: ../../../library/unittest.rst:829 msgid "" "A test case can contain any number of subtest declarations, and they can be " "arbitrarily nested." msgstr "" -#: ../../../library/unittest.rst:825 +#: ../../../library/unittest.rst:832 msgid "See :ref:`subtests` for more information." msgstr "" -#: ../../../library/unittest.rst:832 +#: ../../../library/unittest.rst:839 msgid "" "Run the test without collecting the result. This allows exceptions raised " "by the test to be propagated to the caller, and can be used to support " "running tests under a debugger." msgstr "" -#: ../../../library/unittest.rst:838 +#: ../../../library/unittest.rst:845 msgid "" "The :class:`TestCase` class provides several assert methods to check for and " "report failures. The following table lists the most commonly used methods " "(see the tables below for more assert methods):" msgstr "" -#: ../../../library/unittest.rst:843 ../../../library/unittest.rst:979 -#: ../../../library/unittest.rst:1223 ../../../library/unittest.rst:1393 +#: ../../../library/unittest.rst:850 ../../../library/unittest.rst:986 +#: ../../../library/unittest.rst:1230 ../../../library/unittest.rst:1400 msgid "Method" msgstr "" -#: ../../../library/unittest.rst:843 ../../../library/unittest.rst:979 -#: ../../../library/unittest.rst:1223 +#: ../../../library/unittest.rst:850 ../../../library/unittest.rst:986 +#: ../../../library/unittest.rst:1230 msgid "Checks that" msgstr "" -#: ../../../library/unittest.rst:843 ../../../library/unittest.rst:979 -#: ../../../library/unittest.rst:1223 ../../../library/unittest.rst:1393 +#: ../../../library/unittest.rst:850 ../../../library/unittest.rst:986 +#: ../../../library/unittest.rst:1230 ../../../library/unittest.rst:1400 msgid "New in" msgstr "" -#: ../../../library/unittest.rst:845 +#: ../../../library/unittest.rst:852 msgid ":meth:`assertEqual(a, b) `" msgstr "" -#: ../../../library/unittest.rst:845 +#: ../../../library/unittest.rst:852 msgid "``a == b``" msgstr "" -#: ../../../library/unittest.rst:848 +#: ../../../library/unittest.rst:855 msgid ":meth:`assertNotEqual(a, b) `" msgstr "" -#: ../../../library/unittest.rst:848 +#: ../../../library/unittest.rst:855 msgid "``a != b``" msgstr "" -#: ../../../library/unittest.rst:851 +#: ../../../library/unittest.rst:858 msgid ":meth:`assertTrue(x) `" msgstr "" -#: ../../../library/unittest.rst:851 +#: ../../../library/unittest.rst:858 msgid "``bool(x) is True``" msgstr "" -#: ../../../library/unittest.rst:854 +#: ../../../library/unittest.rst:861 msgid ":meth:`assertFalse(x) `" msgstr "" -#: ../../../library/unittest.rst:854 +#: ../../../library/unittest.rst:861 msgid "``bool(x) is False``" msgstr "" -#: ../../../library/unittest.rst:857 +#: ../../../library/unittest.rst:864 msgid ":meth:`assertIs(a, b) `" msgstr "" -#: ../../../library/unittest.rst:857 +#: ../../../library/unittest.rst:864 msgid "``a is b``" msgstr "" -#: ../../../library/unittest.rst:857 ../../../library/unittest.rst:860 -#: ../../../library/unittest.rst:863 ../../../library/unittest.rst:866 -#: ../../../library/unittest.rst:869 ../../../library/unittest.rst:872 -#: ../../../library/unittest.rst:984 ../../../library/unittest.rst:1231 -#: ../../../library/unittest.rst:1234 ../../../library/unittest.rst:1237 -#: ../../../library/unittest.rst:1240 ../../../library/unittest.rst:1243 -#: ../../../library/unittest.rst:1395 ../../../library/unittest.rst:1398 -#: ../../../library/unittest.rst:1401 ../../../library/unittest.rst:1404 -#: ../../../library/unittest.rst:1407 ../../../library/unittest.rst:1410 +#: ../../../library/unittest.rst:864 ../../../library/unittest.rst:867 +#: ../../../library/unittest.rst:870 ../../../library/unittest.rst:873 +#: ../../../library/unittest.rst:876 ../../../library/unittest.rst:879 +#: ../../../library/unittest.rst:991 ../../../library/unittest.rst:1238 +#: ../../../library/unittest.rst:1241 ../../../library/unittest.rst:1244 +#: ../../../library/unittest.rst:1247 ../../../library/unittest.rst:1250 +#: ../../../library/unittest.rst:1402 ../../../library/unittest.rst:1405 +#: ../../../library/unittest.rst:1408 ../../../library/unittest.rst:1411 +#: ../../../library/unittest.rst:1414 ../../../library/unittest.rst:1417 msgid "3.1" msgstr "" -#: ../../../library/unittest.rst:860 +#: ../../../library/unittest.rst:867 msgid ":meth:`assertIsNot(a, b) `" msgstr "" -#: ../../../library/unittest.rst:860 +#: ../../../library/unittest.rst:867 msgid "``a is not b``" msgstr "" -#: ../../../library/unittest.rst:863 +#: ../../../library/unittest.rst:870 msgid ":meth:`assertIsNone(x) `" msgstr "" -#: ../../../library/unittest.rst:863 +#: ../../../library/unittest.rst:870 msgid "``x is None``" msgstr "" -#: ../../../library/unittest.rst:866 +#: ../../../library/unittest.rst:873 msgid ":meth:`assertIsNotNone(x) `" msgstr "" -#: ../../../library/unittest.rst:866 +#: ../../../library/unittest.rst:873 msgid "``x is not None``" msgstr "" -#: ../../../library/unittest.rst:869 +#: ../../../library/unittest.rst:876 msgid ":meth:`assertIn(a, b) `" msgstr "" -#: ../../../library/unittest.rst:869 +#: ../../../library/unittest.rst:876 msgid "``a in b``" msgstr "" -#: ../../../library/unittest.rst:872 +#: ../../../library/unittest.rst:879 msgid ":meth:`assertNotIn(a, b) `" msgstr "" -#: ../../../library/unittest.rst:872 +#: ../../../library/unittest.rst:879 msgid "``a not in b``" msgstr "" -#: ../../../library/unittest.rst:875 +#: ../../../library/unittest.rst:882 msgid ":meth:`assertIsInstance(a, b) `" msgstr "" -#: ../../../library/unittest.rst:875 +#: ../../../library/unittest.rst:882 msgid "``isinstance(a, b)``" msgstr "" -#: ../../../library/unittest.rst:875 ../../../library/unittest.rst:878 -#: ../../../library/unittest.rst:987 ../../../library/unittest.rst:990 -#: ../../../library/unittest.rst:1246 ../../../library/unittest.rst:1249 +#: ../../../library/unittest.rst:882 ../../../library/unittest.rst:885 +#: ../../../library/unittest.rst:994 ../../../library/unittest.rst:997 +#: ../../../library/unittest.rst:1253 ../../../library/unittest.rst:1256 msgid "3.2" msgstr "" -#: ../../../library/unittest.rst:878 +#: ../../../library/unittest.rst:885 msgid ":meth:`assertNotIsInstance(a, b) `" msgstr "" -#: ../../../library/unittest.rst:878 +#: ../../../library/unittest.rst:885 msgid "``not isinstance(a, b)``" msgstr "" -#: ../../../library/unittest.rst:881 +#: ../../../library/unittest.rst:888 msgid ":meth:`assertIsSubclass(a, b) `" msgstr "" -#: ../../../library/unittest.rst:881 +#: ../../../library/unittest.rst:888 msgid "``issubclass(a, b)``" msgstr "" -#: ../../../library/unittest.rst:881 ../../../library/unittest.rst:884 -#: ../../../library/unittest.rst:1253 ../../../library/unittest.rst:1256 -#: ../../../library/unittest.rst:1259 ../../../library/unittest.rst:1262 -#: ../../../library/unittest.rst:1265 ../../../library/unittest.rst:1268 +#: ../../../library/unittest.rst:888 ../../../library/unittest.rst:891 +#: ../../../library/unittest.rst:1260 ../../../library/unittest.rst:1263 +#: ../../../library/unittest.rst:1266 ../../../library/unittest.rst:1269 +#: ../../../library/unittest.rst:1272 ../../../library/unittest.rst:1275 msgid "3.14" msgstr "" -#: ../../../library/unittest.rst:884 +#: ../../../library/unittest.rst:891 msgid ":meth:`assertNotIsSubclass(a, b) `" msgstr "" -#: ../../../library/unittest.rst:884 +#: ../../../library/unittest.rst:891 msgid "``not issubclass(a, b)``" msgstr "" -#: ../../../library/unittest.rst:888 +#: ../../../library/unittest.rst:895 msgid "" "All the assert methods accept a *msg* argument that, if specified, is used " "as the error message on failure (see also :data:`longMessage`). Note that " @@ -1087,13 +1099,13 @@ msgid "" "they are used as a context manager." msgstr "" -#: ../../../library/unittest.rst:896 +#: ../../../library/unittest.rst:903 msgid "" "Test that *first* and *second* are equal. If the values do not compare " "equal, the test will fail." msgstr "" -#: ../../../library/unittest.rst:899 +#: ../../../library/unittest.rst:906 msgid "" "In addition, if *first* and *second* are the exact same type and one of " "list, tuple, dict, set, frozenset or str or any type that a subclass " @@ -1103,27 +1115,27 @@ msgid "" "methods>`)." msgstr "" -#: ../../../library/unittest.rst:906 +#: ../../../library/unittest.rst:913 msgid "Added the automatic calling of type-specific equality function." msgstr "" -#: ../../../library/unittest.rst:909 +#: ../../../library/unittest.rst:916 msgid "" ":meth:`assertMultiLineEqual` added as the default type equality function for " "comparing strings." msgstr "" -#: ../../../library/unittest.rst:916 +#: ../../../library/unittest.rst:923 msgid "" "Test that *first* and *second* are not equal. If the values do compare " "equal, the test will fail." msgstr "" -#: ../../../library/unittest.rst:922 +#: ../../../library/unittest.rst:929 msgid "Test that *expr* is true (or false)." msgstr "" -#: ../../../library/unittest.rst:924 +#: ../../../library/unittest.rst:931 msgid "" "Note that this is equivalent to ``bool(expr) is True`` and not to ``expr is " "True`` (use ``assertIs(expr, True)`` for the latter). This method should " @@ -1132,103 +1144,103 @@ msgid "" "provide a better error message in case of failure." msgstr "" -#: ../../../library/unittest.rst:934 +#: ../../../library/unittest.rst:941 msgid "Test that *first* and *second* are (or are not) the same object." msgstr "" -#: ../../../library/unittest.rst:942 +#: ../../../library/unittest.rst:949 msgid "Test that *expr* is (or is not) ``None``." msgstr "" -#: ../../../library/unittest.rst:950 +#: ../../../library/unittest.rst:957 msgid "Test that *member* is (or is not) in *container*." msgstr "" -#: ../../../library/unittest.rst:958 +#: ../../../library/unittest.rst:965 msgid "" "Test that *obj* is (or is not) an instance of *cls* (which can be a class or " "a tuple of classes, as supported by :func:`isinstance`). To check for the " "exact type, use :func:`assertIs(type(obj), cls) `." msgstr "" -#: ../../../library/unittest.rst:968 +#: ../../../library/unittest.rst:975 msgid "" "Test that *cls* is (or is not) a subclass of *superclass* (which can be a " "class or a tuple of classes, as supported by :func:`issubclass`). To check " "for the exact type, use :func:`assertIs(cls, superclass) `." msgstr "" -#: ../../../library/unittest.rst:975 +#: ../../../library/unittest.rst:982 msgid "" "It is also possible to check the production of exceptions, warnings, and log " "messages using the following methods:" msgstr "" -#: ../../../library/unittest.rst:981 +#: ../../../library/unittest.rst:988 msgid ":meth:`assertRaises(exc, fun, *args, **kwds) `" msgstr "" -#: ../../../library/unittest.rst:981 +#: ../../../library/unittest.rst:988 msgid "``fun(*args, **kwds)`` raises *exc*" msgstr "" -#: ../../../library/unittest.rst:984 +#: ../../../library/unittest.rst:991 msgid "" ":meth:`assertRaisesRegex(exc, r, fun, *args, **kwds) `" msgstr "" -#: ../../../library/unittest.rst:984 +#: ../../../library/unittest.rst:991 msgid "``fun(*args, **kwds)`` raises *exc* and the message matches regex *r*" msgstr "" -#: ../../../library/unittest.rst:987 +#: ../../../library/unittest.rst:994 msgid ":meth:`assertWarns(warn, fun, *args, **kwds) `" msgstr "" -#: ../../../library/unittest.rst:987 +#: ../../../library/unittest.rst:994 msgid "``fun(*args, **kwds)`` raises *warn*" msgstr "" -#: ../../../library/unittest.rst:990 +#: ../../../library/unittest.rst:997 msgid "" ":meth:`assertWarnsRegex(warn, r, fun, *args, **kwds) `" msgstr "" -#: ../../../library/unittest.rst:990 +#: ../../../library/unittest.rst:997 msgid "``fun(*args, **kwds)`` raises *warn* and the message matches regex *r*" msgstr "" -#: ../../../library/unittest.rst:993 +#: ../../../library/unittest.rst:1000 msgid ":meth:`assertLogs(logger, level) `" msgstr "" -#: ../../../library/unittest.rst:993 +#: ../../../library/unittest.rst:1000 msgid "The ``with`` block logs on *logger* with minimum *level*" msgstr "" -#: ../../../library/unittest.rst:993 +#: ../../../library/unittest.rst:1000 msgid "3.4" msgstr "" -#: ../../../library/unittest.rst:996 +#: ../../../library/unittest.rst:1003 msgid ":meth:`assertNoLogs(logger, level) `" msgstr "" -#: ../../../library/unittest.rst:996 +#: ../../../library/unittest.rst:1003 msgid "The ``with`` block does not log on" msgstr "" -#: ../../../library/unittest.rst:997 +#: ../../../library/unittest.rst:1004 msgid "*logger* with minimum *level*" msgstr "" -#: ../../../library/unittest.rst:996 +#: ../../../library/unittest.rst:1003 msgid "3.10" msgstr "" -#: ../../../library/unittest.rst:1003 +#: ../../../library/unittest.rst:1010 msgid "" "Test that an exception is raised when *callable* is called with any " "positional or keyword arguments that are also passed to :meth:" @@ -1238,40 +1250,40 @@ msgid "" "be passed as *exception*." msgstr "" -#: ../../../library/unittest.rst:1010 +#: ../../../library/unittest.rst:1017 msgid "" "If only the *exception* and possibly the *msg* arguments are given, return a " "context manager so that the code under test can be written inline rather " "than as a function::" msgstr "" -#: ../../../library/unittest.rst:1017 +#: ../../../library/unittest.rst:1024 msgid "" "When used as a context manager, :meth:`assertRaises` accepts the additional " "keyword argument *msg*." msgstr "" -#: ../../../library/unittest.rst:1020 +#: ../../../library/unittest.rst:1027 msgid "" "The context manager will store the caught exception object in its :attr:`!" "exception` attribute. This can be useful if the intention is to perform " "additional checks on the exception raised::" msgstr "" -#: ../../../library/unittest.rst:1030 +#: ../../../library/unittest.rst:1037 msgid "Added the ability to use :meth:`assertRaises` as a context manager." msgstr "" -#: ../../../library/unittest.rst:1033 +#: ../../../library/unittest.rst:1040 msgid "Added the :attr:`!exception` attribute." msgstr "" -#: ../../../library/unittest.rst:1036 ../../../library/unittest.rst:1062 -#: ../../../library/unittest.rst:1110 ../../../library/unittest.rst:1144 +#: ../../../library/unittest.rst:1043 ../../../library/unittest.rst:1069 +#: ../../../library/unittest.rst:1117 ../../../library/unittest.rst:1151 msgid "Added the *msg* keyword argument when used as a context manager." msgstr "" -#: ../../../library/unittest.rst:1043 +#: ../../../library/unittest.rst:1050 msgid "" "Like :meth:`assertRaises` but also tests that *regex* matches on the string " "representation of the raised exception. *regex* may be a regular expression " @@ -1279,19 +1291,19 @@ msgid "" "`re.search`. Examples::" msgstr "" -#: ../../../library/unittest.rst:1051 ../../../library/unittest.rst:1130 +#: ../../../library/unittest.rst:1058 ../../../library/unittest.rst:1137 msgid "or::" msgstr "" -#: ../../../library/unittest.rst:1056 +#: ../../../library/unittest.rst:1063 msgid "Added under the name ``assertRaisesRegexp``." msgstr "" -#: ../../../library/unittest.rst:1059 +#: ../../../library/unittest.rst:1066 msgid "Renamed to :meth:`assertRaisesRegex`." msgstr "" -#: ../../../library/unittest.rst:1069 +#: ../../../library/unittest.rst:1076 msgid "" "Test that a warning is triggered when *callable* is called with any " "positional or keyword arguments that are also passed to :meth:" @@ -1300,20 +1312,20 @@ msgid "" "tuple containing the warning classes may be passed as *warnings*." msgstr "" -#: ../../../library/unittest.rst:1076 +#: ../../../library/unittest.rst:1083 msgid "" "If only the *warning* and possibly the *msg* arguments are given, return a " "context manager so that the code under test can be written inline rather " "than as a function::" msgstr "" -#: ../../../library/unittest.rst:1083 +#: ../../../library/unittest.rst:1090 msgid "" "When used as a context manager, :meth:`assertWarns` accepts the additional " "keyword argument *msg*." msgstr "" -#: ../../../library/unittest.rst:1086 +#: ../../../library/unittest.rst:1093 msgid "" "The context manager will store the caught warning object in its :attr:`!" "warning` attribute, and the source line which triggered the warnings in the :" @@ -1321,25 +1333,25 @@ msgid "" "intention is to perform additional checks on the warning caught::" msgstr "" -#: ../../../library/unittest.rst:1098 ../../../library/unittest.rst:1135 +#: ../../../library/unittest.rst:1105 ../../../library/unittest.rst:1142 msgid "" "The context managers can be nested to test that multiple different warnings " "are emitted::" msgstr "" -#: ../../../library/unittest.rst:1105 +#: ../../../library/unittest.rst:1112 msgid "" "This method works regardless of the warning filters in place when it is " "called." msgstr "" -#: ../../../library/unittest.rst:1113 +#: ../../../library/unittest.rst:1120 msgid "" "Warnings that do not match the specified category are no longer swallowed. " "Nested context managers are now supported." msgstr "" -#: ../../../library/unittest.rst:1121 +#: ../../../library/unittest.rst:1128 msgid "" "Like :meth:`assertWarns` but also tests that *regex* matches on the message " "of the triggered warning. *regex* may be a regular expression object or a " @@ -1347,19 +1359,19 @@ msgid "" "search`. Example::" msgstr "" -#: ../../../library/unittest.rst:1147 +#: ../../../library/unittest.rst:1154 msgid "" "Warnings that do not match the specified category or regex are no longer " "swallowed. Nested context managers are now supported." msgstr "" -#: ../../../library/unittest.rst:1154 +#: ../../../library/unittest.rst:1161 msgid "" "A context manager to test that at least one message is logged on the " "*logger* or one of its children, with at least the given *level*." msgstr "" -#: ../../../library/unittest.rst:1158 +#: ../../../library/unittest.rst:1165 msgid "" "If given, *logger* should be a :class:`logging.Logger` object or a :class:" "`str` giving the name of a logger. The default is the root logger, which " @@ -1367,195 +1379,195 @@ msgid "" "descendent logger." msgstr "" -#: ../../../library/unittest.rst:1163 ../../../library/unittest.rst:1211 +#: ../../../library/unittest.rst:1170 ../../../library/unittest.rst:1218 msgid "" "If given, *level* should be either a numeric logging level or its string " "equivalent (for example either ``\"ERROR\"`` or :const:`logging.ERROR`). " "The default is :const:`logging.INFO`." msgstr "" -#: ../../../library/unittest.rst:1167 +#: ../../../library/unittest.rst:1174 msgid "" "If given, *formatter* should be a :class:`logging.Formatter` object. The " "default is a formatter with format string ``\"%(levelname)s:%(name)s:" "%(message)s\"``" msgstr "" -#: ../../../library/unittest.rst:1171 +#: ../../../library/unittest.rst:1178 msgid "" "The test passes if at least one message emitted inside the ``with`` block " "matches the *logger* and *level* conditions, otherwise it fails." msgstr "" -#: ../../../library/unittest.rst:1174 +#: ../../../library/unittest.rst:1181 msgid "" "The object returned by the context manager is a recording helper which keeps " "tracks of the matching log messages. It has two attributes:" msgstr "" -#: ../../../library/unittest.rst:1180 +#: ../../../library/unittest.rst:1187 msgid "" "A list of :class:`logging.LogRecord` objects of the matching log messages." msgstr "" -#: ../../../library/unittest.rst:1185 +#: ../../../library/unittest.rst:1192 msgid "" "A list of :class:`str` objects with the formatted output of matching " "messages." msgstr "" -#: ../../../library/unittest.rst:1188 +#: ../../../library/unittest.rst:1195 msgid "Example::" msgstr "" -#: ../../../library/unittest.rst:1198 +#: ../../../library/unittest.rst:1205 msgid "Now accepts a *formatter* to control how messages are formatted." msgstr "" -#: ../../../library/unittest.rst:1203 +#: ../../../library/unittest.rst:1210 msgid "" "A context manager to test that no messages are logged on the *logger* or one " "of its children, with at least the given *level*." msgstr "" -#: ../../../library/unittest.rst:1207 +#: ../../../library/unittest.rst:1214 msgid "" "If given, *logger* should be a :class:`logging.Logger` object or a :class:" "`str` giving the name of a logger. The default is the root logger, which " "will catch all messages." msgstr "" -#: ../../../library/unittest.rst:1215 +#: ../../../library/unittest.rst:1222 msgid "" "Unlike :meth:`assertLogs`, nothing will be returned by the context manager." msgstr "" -#: ../../../library/unittest.rst:1220 +#: ../../../library/unittest.rst:1227 msgid "" "There are also other methods used to perform more specific checks, such as:" msgstr "" -#: ../../../library/unittest.rst:1225 +#: ../../../library/unittest.rst:1232 msgid ":meth:`assertAlmostEqual(a, b) `" msgstr "" -#: ../../../library/unittest.rst:1225 +#: ../../../library/unittest.rst:1232 msgid "``round(a-b, 7) == 0``" msgstr "" -#: ../../../library/unittest.rst:1228 +#: ../../../library/unittest.rst:1235 msgid ":meth:`assertNotAlmostEqual(a, b) `" msgstr "" -#: ../../../library/unittest.rst:1228 +#: ../../../library/unittest.rst:1235 msgid "``round(a-b, 7) != 0``" msgstr "" -#: ../../../library/unittest.rst:1231 +#: ../../../library/unittest.rst:1238 msgid ":meth:`assertGreater(a, b) `" msgstr "" -#: ../../../library/unittest.rst:1231 +#: ../../../library/unittest.rst:1238 msgid "``a > b``" msgstr "" -#: ../../../library/unittest.rst:1234 +#: ../../../library/unittest.rst:1241 msgid ":meth:`assertGreaterEqual(a, b) `" msgstr "" -#: ../../../library/unittest.rst:1234 +#: ../../../library/unittest.rst:1241 msgid "``a >= b``" msgstr "" -#: ../../../library/unittest.rst:1237 +#: ../../../library/unittest.rst:1244 msgid ":meth:`assertLess(a, b) `" msgstr "" -#: ../../../library/unittest.rst:1237 +#: ../../../library/unittest.rst:1244 msgid "``a < b``" msgstr "" -#: ../../../library/unittest.rst:1240 +#: ../../../library/unittest.rst:1247 msgid ":meth:`assertLessEqual(a, b) `" msgstr "" -#: ../../../library/unittest.rst:1240 +#: ../../../library/unittest.rst:1247 msgid "``a <= b``" msgstr "" -#: ../../../library/unittest.rst:1243 +#: ../../../library/unittest.rst:1250 msgid ":meth:`assertRegex(s, r) `" msgstr "" -#: ../../../library/unittest.rst:1243 +#: ../../../library/unittest.rst:1250 msgid "``r.search(s)``" msgstr "" -#: ../../../library/unittest.rst:1246 +#: ../../../library/unittest.rst:1253 msgid ":meth:`assertNotRegex(s, r) `" msgstr "" -#: ../../../library/unittest.rst:1246 +#: ../../../library/unittest.rst:1253 msgid "``not r.search(s)``" msgstr "" -#: ../../../library/unittest.rst:1249 +#: ../../../library/unittest.rst:1256 msgid ":meth:`assertCountEqual(a, b) `" msgstr "" -#: ../../../library/unittest.rst:1249 +#: ../../../library/unittest.rst:1256 msgid "*a* contains the same elements as *b*, regardless of their order." msgstr "" -#: ../../../library/unittest.rst:1253 +#: ../../../library/unittest.rst:1260 msgid ":meth:`assertStartsWith(a, b) `" msgstr "" -#: ../../../library/unittest.rst:1253 +#: ../../../library/unittest.rst:1260 msgid "``a.startswith(b)``" msgstr "" -#: ../../../library/unittest.rst:1256 +#: ../../../library/unittest.rst:1263 msgid ":meth:`assertNotStartsWith(a, b) `" msgstr "" -#: ../../../library/unittest.rst:1256 +#: ../../../library/unittest.rst:1263 msgid "``not a.startswith(b)``" msgstr "" -#: ../../../library/unittest.rst:1259 +#: ../../../library/unittest.rst:1266 msgid ":meth:`assertEndsWith(a, b) `" msgstr "" -#: ../../../library/unittest.rst:1259 +#: ../../../library/unittest.rst:1266 msgid "``a.endswith(b)``" msgstr "" -#: ../../../library/unittest.rst:1262 +#: ../../../library/unittest.rst:1269 msgid ":meth:`assertNotEndsWith(a, b) `" msgstr "" -#: ../../../library/unittest.rst:1262 +#: ../../../library/unittest.rst:1269 msgid "``not a.endswith(b)``" msgstr "" -#: ../../../library/unittest.rst:1265 +#: ../../../library/unittest.rst:1272 msgid ":meth:`assertHasAttr(a, b) `" msgstr "" -#: ../../../library/unittest.rst:1265 +#: ../../../library/unittest.rst:1272 msgid "``hasattr(a, b)``" msgstr "" -#: ../../../library/unittest.rst:1268 +#: ../../../library/unittest.rst:1275 msgid ":meth:`assertNotHasAttr(a, b) `" msgstr "" -#: ../../../library/unittest.rst:1268 +#: ../../../library/unittest.rst:1275 msgid "``not hasattr(a, b)``" msgstr "" -#: ../../../library/unittest.rst:1276 +#: ../../../library/unittest.rst:1283 msgid "" "Test that *first* and *second* are approximately (or not approximately) " "equal by computing the difference, rounding to the given number of decimal " @@ -1564,30 +1576,30 @@ msgid "" "`round` function) and not *significant digits*." msgstr "" -#: ../../../library/unittest.rst:1282 +#: ../../../library/unittest.rst:1289 msgid "" "If *delta* is supplied instead of *places* then the difference between " "*first* and *second* must be less or equal to (or greater than) *delta*." msgstr "" -#: ../../../library/unittest.rst:1285 +#: ../../../library/unittest.rst:1292 msgid "Supplying both *delta* and *places* raises a :exc:`TypeError`." msgstr "" -#: ../../../library/unittest.rst:1287 +#: ../../../library/unittest.rst:1294 msgid "" ":meth:`assertAlmostEqual` automatically considers almost equal objects that " "compare equal. :meth:`assertNotAlmostEqual` automatically fails if the " "objects compare equal. Added the *delta* keyword argument." msgstr "" -#: ../../../library/unittest.rst:1298 +#: ../../../library/unittest.rst:1305 msgid "" "Test that *first* is respectively >, >=, < or <= than *second* depending on " "the method name. If not, the test will fail::" msgstr "" -#: ../../../library/unittest.rst:1310 +#: ../../../library/unittest.rst:1317 msgid "" "Test that a *regex* search matches (or does not match) *text*. In case of " "failure, the error message will include the pattern and the *text* (or the " @@ -1596,28 +1608,28 @@ msgid "" "suitable for use by :func:`re.search`." msgstr "" -#: ../../../library/unittest.rst:1316 +#: ../../../library/unittest.rst:1323 msgid "Added under the name ``assertRegexpMatches``." msgstr "" -#: ../../../library/unittest.rst:1318 +#: ../../../library/unittest.rst:1325 msgid "" "The method ``assertRegexpMatches()`` has been renamed to :meth:`." "assertRegex`." msgstr "" -#: ../../../library/unittest.rst:1321 +#: ../../../library/unittest.rst:1328 msgid ":meth:`.assertNotRegex`." msgstr "" -#: ../../../library/unittest.rst:1327 +#: ../../../library/unittest.rst:1334 msgid "" "Test that sequence *first* contains the same elements as *second*, " "regardless of their order. When they don't, an error message listing the " "differences between the sequences will be generated." msgstr "" -#: ../../../library/unittest.rst:1331 +#: ../../../library/unittest.rst:1338 msgid "" "Duplicate elements are *not* ignored when comparing *first* and *second*. It " "verifies whether each element has the same count in both sequences. " @@ -1625,23 +1637,23 @@ msgid "" "but works with sequences of unhashable objects as well." msgstr "" -#: ../../../library/unittest.rst:1343 +#: ../../../library/unittest.rst:1350 msgid "" "Test that the Unicode or byte string *s* starts (or does not start) with a " "*prefix*. *prefix* can also be a tuple of strings to try." msgstr "" -#: ../../../library/unittest.rst:1353 +#: ../../../library/unittest.rst:1360 msgid "" "Test that the Unicode or byte string *s* ends (or does not end) with a " "*suffix*. *suffix* can also be a tuple of strings to try." msgstr "" -#: ../../../library/unittest.rst:1363 +#: ../../../library/unittest.rst:1370 msgid "Test that the object *obj* has (or has not) an attribute *name*." msgstr "" -#: ../../../library/unittest.rst:1370 +#: ../../../library/unittest.rst:1377 msgid "" "The :meth:`assertEqual` method dispatches the equality check for objects of " "the same type to different type-specific methods. These methods are already " @@ -1649,7 +1661,7 @@ msgid "" "register new methods using :meth:`addTypeEqualityFunc`:" msgstr "" -#: ../../../library/unittest.rst:1377 +#: ../../../library/unittest.rst:1384 msgid "" "Registers a type-specific method called by :meth:`assertEqual` to check if " "two objects of exactly the same *typeobj* (not subclasses) compare equal. " @@ -1660,66 +1672,66 @@ msgid "" "explaining the inequalities in details in the error message." msgstr "" -#: ../../../library/unittest.rst:1388 +#: ../../../library/unittest.rst:1395 msgid "" "The list of type-specific methods automatically used by :meth:`~TestCase." "assertEqual` are summarized in the following table. Note that it's usually " "not necessary to invoke these methods directly." msgstr "" -#: ../../../library/unittest.rst:1393 +#: ../../../library/unittest.rst:1400 msgid "Used to compare" msgstr "" -#: ../../../library/unittest.rst:1395 +#: ../../../library/unittest.rst:1402 msgid ":meth:`assertMultiLineEqual(a, b) `" msgstr "" -#: ../../../library/unittest.rst:1395 +#: ../../../library/unittest.rst:1402 msgid "strings" msgstr "" -#: ../../../library/unittest.rst:1398 +#: ../../../library/unittest.rst:1405 msgid ":meth:`assertSequenceEqual(a, b) `" msgstr "" -#: ../../../library/unittest.rst:1398 +#: ../../../library/unittest.rst:1405 msgid "sequences" msgstr "" -#: ../../../library/unittest.rst:1401 +#: ../../../library/unittest.rst:1408 msgid ":meth:`assertListEqual(a, b) `" msgstr "" -#: ../../../library/unittest.rst:1401 +#: ../../../library/unittest.rst:1408 msgid "lists" msgstr "" -#: ../../../library/unittest.rst:1404 +#: ../../../library/unittest.rst:1411 msgid ":meth:`assertTupleEqual(a, b) `" msgstr "" -#: ../../../library/unittest.rst:1404 +#: ../../../library/unittest.rst:1411 msgid "tuples" msgstr "" -#: ../../../library/unittest.rst:1407 +#: ../../../library/unittest.rst:1414 msgid ":meth:`assertSetEqual(a, b) `" msgstr "" -#: ../../../library/unittest.rst:1407 +#: ../../../library/unittest.rst:1414 msgid "sets or frozensets" msgstr "" -#: ../../../library/unittest.rst:1410 +#: ../../../library/unittest.rst:1417 msgid ":meth:`assertDictEqual(a, b) `" msgstr "" -#: ../../../library/unittest.rst:1410 +#: ../../../library/unittest.rst:1417 msgid "dicts" msgstr "" -#: ../../../library/unittest.rst:1418 +#: ../../../library/unittest.rst:1425 msgid "" "Test that the multiline string *first* is equal to the string *second*. When " "not equal a diff of the two strings highlighting the differences will be " @@ -1727,7 +1739,7 @@ msgid "" "strings with :meth:`assertEqual`." msgstr "" -#: ../../../library/unittest.rst:1428 +#: ../../../library/unittest.rst:1435 msgid "" "Tests that two sequences are equal. If a *seq_type* is supplied, both " "*first* and *second* must be instances of *seq_type* or a failure will be " @@ -1735,13 +1747,13 @@ msgid "" "shows the difference between the two." msgstr "" -#: ../../../library/unittest.rst:1433 +#: ../../../library/unittest.rst:1440 msgid "" "This method is not called directly by :meth:`assertEqual`, but it's used to " "implement :meth:`assertListEqual` and :meth:`assertTupleEqual`." msgstr "" -#: ../../../library/unittest.rst:1443 +#: ../../../library/unittest.rst:1450 msgid "" "Tests that two lists or tuples are equal. If not, an error message is " "constructed that shows only the differences between the two. An error is " @@ -1749,38 +1761,38 @@ msgid "" "are used by default when comparing lists or tuples with :meth:`assertEqual`." msgstr "" -#: ../../../library/unittest.rst:1454 +#: ../../../library/unittest.rst:1461 msgid "" "Tests that two sets are equal. If not, an error message is constructed that " "lists the differences between the sets. This method is used by default when " "comparing sets or frozensets with :meth:`assertEqual`." msgstr "" -#: ../../../library/unittest.rst:1458 +#: ../../../library/unittest.rst:1465 msgid "" "Fails if either of *first* or *second* does not have a :meth:`~frozenset." "difference` method." msgstr "" -#: ../../../library/unittest.rst:1466 +#: ../../../library/unittest.rst:1473 msgid "" "Test that two dictionaries are equal. If not, an error message is " "constructed that shows the differences in the dictionaries. This method will " "be used by default to compare dictionaries in calls to :meth:`assertEqual`." msgstr "" -#: ../../../library/unittest.rst:1477 +#: ../../../library/unittest.rst:1484 msgid "" "Finally the :class:`TestCase` provides the following methods and attributes:" msgstr "" -#: ../../../library/unittest.rst:1482 +#: ../../../library/unittest.rst:1489 msgid "" "Signals a test failure unconditionally, with *msg* or ``None`` for the error " "message." msgstr "" -#: ../../../library/unittest.rst:1488 +#: ../../../library/unittest.rst:1495 msgid "" "This class attribute gives the exception raised by the test method. If a " "test framework needs to use a specialized exception, possibly to carry " @@ -1789,7 +1801,7 @@ msgid "" "`AssertionError`." msgstr "" -#: ../../../library/unittest.rst:1497 +#: ../../../library/unittest.rst:1504 msgid "" "This class attribute determines what happens when a custom failure message " "is passed as the msg argument to an assertXYY call that fails. ``True`` is " @@ -1798,18 +1810,18 @@ msgid "" "replaces the standard message." msgstr "" -#: ../../../library/unittest.rst:1503 +#: ../../../library/unittest.rst:1510 msgid "" "The class setting can be overridden in individual test methods by assigning " "an instance attribute, self.longMessage, to ``True`` or ``False`` before " "calling the assert methods." msgstr "" -#: ../../../library/unittest.rst:1507 +#: ../../../library/unittest.rst:1514 msgid "The class setting gets reset before each test call." msgstr "" -#: ../../../library/unittest.rst:1514 +#: ../../../library/unittest.rst:1521 msgid "" "This attribute controls the maximum length of diffs output by assert methods " "that report diffs on failure. It defaults to 80*8 characters. Assert methods " @@ -1818,52 +1830,52 @@ msgid "" "`assertDictEqual` and :meth:`assertMultiLineEqual`." msgstr "" -#: ../../../library/unittest.rst:1521 +#: ../../../library/unittest.rst:1528 msgid "" "Setting ``maxDiff`` to ``None`` means that there is no maximum length of " "diffs." msgstr "" -#: ../../../library/unittest.rst:1527 +#: ../../../library/unittest.rst:1534 msgid "" "Testing frameworks can use the following methods to collect information on " "the test:" msgstr "" -#: ../../../library/unittest.rst:1533 +#: ../../../library/unittest.rst:1540 msgid "" "Return the number of tests represented by this test object. For :class:" "`TestCase` instances, this will always be ``1``." msgstr "" -#: ../../../library/unittest.rst:1539 +#: ../../../library/unittest.rst:1546 msgid "" "Return an instance of the test result class that should be used for this " "test case class (if no other result instance is provided to the :meth:`run` " "method)." msgstr "" -#: ../../../library/unittest.rst:1543 +#: ../../../library/unittest.rst:1550 msgid "" "For :class:`TestCase` instances, this will always be an instance of :class:" "`TestResult`; subclasses of :class:`TestCase` should override this as " "necessary." msgstr "" -#: ../../../library/unittest.rst:1550 +#: ../../../library/unittest.rst:1557 msgid "" "Return a string identifying the specific test case. This is usually the " "full name of the test method, including the module and class name." msgstr "" -#: ../../../library/unittest.rst:1556 +#: ../../../library/unittest.rst:1563 msgid "" "Returns a description of the test, or ``None`` if no description has been " "provided. The default implementation of this method returns the first line " "of the test method's docstring, if available, or ``None``." msgstr "" -#: ../../../library/unittest.rst:1561 +#: ../../../library/unittest.rst:1568 msgid "" "In 3.1 this was changed to add the test name to the short description even " "in the presence of a docstring. This caused compatibility issues with " @@ -1871,7 +1883,7 @@ msgid "" "`TextTestResult` in Python 3.2." msgstr "" -#: ../../../library/unittest.rst:1570 +#: ../../../library/unittest.rst:1577 msgid "" "Add a function to be called after :meth:`tearDown` to cleanup resources used " "during the test. Functions will be called in reverse order to the order they " @@ -1880,39 +1892,39 @@ msgid "" "added." msgstr "" -#: ../../../library/unittest.rst:1576 +#: ../../../library/unittest.rst:1583 msgid "" "If :meth:`setUp` fails, meaning that :meth:`tearDown` is not called, then " "any cleanup functions added will still be called." msgstr "" -#: ../../../library/unittest.rst:1584 +#: ../../../library/unittest.rst:1591 msgid "" "Enter the supplied :term:`context manager`. If successful, also add its :" "meth:`~object.__exit__` method as a cleanup function by :meth:`addCleanup` " "and return the result of the :meth:`~object.__enter__` method." msgstr "" -#: ../../../library/unittest.rst:1594 +#: ../../../library/unittest.rst:1601 msgid "" "This method is called unconditionally after :meth:`tearDown`, or after :meth:" "`setUp` if :meth:`setUp` raises an exception." msgstr "" -#: ../../../library/unittest.rst:1597 +#: ../../../library/unittest.rst:1604 msgid "" "It is responsible for calling all the cleanup functions added by :meth:" "`addCleanup`. If you need cleanup functions to be called *prior* to :meth:" "`tearDown` then you can call :meth:`doCleanups` yourself." msgstr "" -#: ../../../library/unittest.rst:1602 +#: ../../../library/unittest.rst:1609 msgid "" ":meth:`doCleanups` pops methods off the stack of cleanup functions one at a " "time, so it can be called at any time." msgstr "" -#: ../../../library/unittest.rst:1610 +#: ../../../library/unittest.rst:1617 msgid "" "Add a function to be called after :meth:`tearDownClass` to cleanup resources " "used during the test class. Functions will be called in reverse order to the " @@ -1921,13 +1933,13 @@ msgid "" "when they are added." msgstr "" -#: ../../../library/unittest.rst:1616 +#: ../../../library/unittest.rst:1623 msgid "" "If :meth:`setUpClass` fails, meaning that :meth:`tearDownClass` is not " "called, then any cleanup functions added will still be called." msgstr "" -#: ../../../library/unittest.rst:1624 +#: ../../../library/unittest.rst:1631 msgid "" "Enter the supplied :term:`context manager`. If successful, also add its :" "meth:`~object.__exit__` method as a cleanup function by :meth:" @@ -1935,38 +1947,38 @@ msgid "" "method." msgstr "" -#: ../../../library/unittest.rst:1634 +#: ../../../library/unittest.rst:1641 msgid "" "This method is called unconditionally after :meth:`tearDownClass`, or after :" "meth:`setUpClass` if :meth:`setUpClass` raises an exception." msgstr "" -#: ../../../library/unittest.rst:1637 +#: ../../../library/unittest.rst:1644 msgid "" "It is responsible for calling all the cleanup functions added by :meth:" "`addClassCleanup`. If you need cleanup functions to be called *prior* to :" "meth:`tearDownClass` then you can call :meth:`doClassCleanups` yourself." msgstr "" -#: ../../../library/unittest.rst:1642 +#: ../../../library/unittest.rst:1649 msgid "" ":meth:`doClassCleanups` pops methods off the stack of cleanup functions one " "at a time, so it can be called at any time." msgstr "" -#: ../../../library/unittest.rst:1650 +#: ../../../library/unittest.rst:1657 msgid "" "This class provides an API similar to :class:`TestCase` and also accepts " "coroutines as test functions." msgstr "" -#: ../../../library/unittest.rst:1657 +#: ../../../library/unittest.rst:1664 msgid "" "The *loop_factory* passed to :class:`asyncio.Runner`. Override in subclasses " "with :class:`asyncio.EventLoop` to avoid using the asyncio policy system." msgstr "" -#: ../../../library/unittest.rst:1666 +#: ../../../library/unittest.rst:1673 msgid "" "Method called to prepare the test fixture. This is called after :meth:" "`TestCase.setUp`. This is called immediately before calling the test method; " @@ -1975,7 +1987,7 @@ msgid "" "default implementation does nothing." msgstr "" -#: ../../../library/unittest.rst:1675 +#: ../../../library/unittest.rst:1682 msgid "" "Method called immediately after the test method has been called and the " "result recorded. This is called before :meth:`~TestCase.tearDown`. This is " @@ -1988,11 +2000,11 @@ msgid "" "the outcome of the test method. The default implementation does nothing." msgstr "" -#: ../../../library/unittest.rst:1687 +#: ../../../library/unittest.rst:1694 msgid "This method accepts a coroutine that can be used as a cleanup function." msgstr "" -#: ../../../library/unittest.rst:1692 +#: ../../../library/unittest.rst:1699 msgid "" "Enter the supplied :term:`asynchronous context manager`. If successful, " "also add its :meth:`~object.__aexit__` method as a cleanup function by :meth:" @@ -2000,7 +2012,7 @@ msgid "" "method." msgstr "" -#: ../../../library/unittest.rst:1702 +#: ../../../library/unittest.rst:1709 msgid "" "Sets up a new event loop to run the test, collecting the result into the :" "class:`TestResult` object passed as *result*. If *result* is omitted or " @@ -2010,18 +2022,18 @@ msgid "" "the event loop are cancelled." msgstr "" -#: ../../../library/unittest.rst:1710 +#: ../../../library/unittest.rst:1717 msgid "An example illustrating the order::" msgstr "" -#: ../../../library/unittest.rst:1746 +#: ../../../library/unittest.rst:1753 msgid "" "After running the test, ``events`` would contain ``[\"setUp\", " "\"asyncSetUp\", \"test_response\", \"asyncTearDown\", \"tearDown\", " "\"cleanup\"]``." msgstr "" -#: ../../../library/unittest.rst:1751 +#: ../../../library/unittest.rst:1758 msgid "" "This class implements the portion of the :class:`TestCase` interface which " "allows the test runner to drive the test, but does not provide the methods " @@ -2030,11 +2042,11 @@ msgid "" "`!unittest`-based test framework." msgstr "" -#: ../../../library/unittest.rst:1761 +#: ../../../library/unittest.rst:1768 msgid "Grouping tests" msgstr "" -#: ../../../library/unittest.rst:1765 +#: ../../../library/unittest.rst:1772 msgid "" "This class represents an aggregation of individual test cases and test " "suites. The class presents the interface needed by the test runner to allow " @@ -2042,14 +2054,14 @@ msgid "" "is the same as iterating over the suite, running each test individually." msgstr "" -#: ../../../library/unittest.rst:1770 +#: ../../../library/unittest.rst:1777 msgid "" "If *tests* is given, it must be an iterable of individual test cases or " "other test suites that will be used to build the suite initially. Additional " "methods are provided to add test cases and suites to the collection later on." msgstr "" -#: ../../../library/unittest.rst:1774 +#: ../../../library/unittest.rst:1781 msgid "" ":class:`TestSuite` objects behave much like :class:`TestCase` objects, " "except they do not actually implement a test. Instead, they are used to " @@ -2058,47 +2070,47 @@ msgid "" "instances:" msgstr "" -#: ../../../library/unittest.rst:1782 +#: ../../../library/unittest.rst:1789 msgid "Add a :class:`TestCase` or :class:`TestSuite` to the suite." msgstr "" -#: ../../../library/unittest.rst:1787 +#: ../../../library/unittest.rst:1794 msgid "" "Add all the tests from an iterable of :class:`TestCase` and :class:" "`TestSuite` instances to this test suite." msgstr "" -#: ../../../library/unittest.rst:1790 +#: ../../../library/unittest.rst:1797 msgid "" "This is equivalent to iterating over *tests*, calling :meth:`addTest` for " "each element." msgstr "" -#: ../../../library/unittest.rst:1793 +#: ../../../library/unittest.rst:1800 msgid ":class:`TestSuite` shares the following methods with :class:`TestCase`:" msgstr "" -#: ../../../library/unittest.rst:1798 +#: ../../../library/unittest.rst:1805 msgid "" "Run the tests associated with this suite, collecting the result into the " "test result object passed as *result*. Note that unlike :meth:`TestCase." "run`, :meth:`TestSuite.run` requires the result object to be passed in." msgstr "" -#: ../../../library/unittest.rst:1806 +#: ../../../library/unittest.rst:1813 msgid "" "Run the tests associated with this suite without collecting the result. This " "allows exceptions raised by the test to be propagated to the caller and can " "be used to support running tests under a debugger." msgstr "" -#: ../../../library/unittest.rst:1813 +#: ../../../library/unittest.rst:1820 msgid "" "Return the number of tests represented by this test object, including all " "individual tests and sub-suites." msgstr "" -#: ../../../library/unittest.rst:1819 +#: ../../../library/unittest.rst:1826 msgid "" "Tests grouped by a :class:`TestSuite` are always accessed by iteration. " "Subclasses can lazily provide tests by overriding :meth:`!__iter__`. Note " @@ -2110,32 +2122,32 @@ msgid "" "overrides :meth:`!TestSuite._removeTestAtIndex` to preserve test references." msgstr "" -#: ../../../library/unittest.rst:1829 +#: ../../../library/unittest.rst:1836 msgid "" "In earlier versions the :class:`TestSuite` accessed tests directly rather " "than through iteration, so overriding :meth:`!__iter__` wasn't sufficient " "for providing tests." msgstr "" -#: ../../../library/unittest.rst:1834 +#: ../../../library/unittest.rst:1841 msgid "" "In earlier versions the :class:`TestSuite` held references to each :class:" "`TestCase` after :meth:`TestSuite.run`. Subclasses can restore that behavior " "by overriding :meth:`!TestSuite._removeTestAtIndex`." msgstr "" -#: ../../../library/unittest.rst:1839 +#: ../../../library/unittest.rst:1846 msgid "" "In the typical usage of a :class:`TestSuite` object, the :meth:`run` method " "is invoked by a :class:`!TestRunner` rather than by the end-user test " "harness." msgstr "" -#: ../../../library/unittest.rst:1844 +#: ../../../library/unittest.rst:1851 msgid "Loading and running tests" msgstr "" -#: ../../../library/unittest.rst:1848 +#: ../../../library/unittest.rst:1855 msgid "" "The :class:`TestLoader` class is used to create test suites from classes and " "modules. Normally, there is no need to create an instance of this class; " @@ -2144,11 +2156,11 @@ msgid "" "customization of some configurable properties." msgstr "" -#: ../../../library/unittest.rst:1854 +#: ../../../library/unittest.rst:1861 msgid ":class:`TestLoader` objects have the following attributes:" msgstr "" -#: ../../../library/unittest.rst:1859 +#: ../../../library/unittest.rst:1866 msgid "" "A list of the non-fatal errors encountered while loading tests. Not reset by " "the loader at any point. Fatal errors are signalled by the relevant method " @@ -2156,17 +2168,17 @@ msgid "" "synthetic test that will raise the original error when run." msgstr "" -#: ../../../library/unittest.rst:1868 +#: ../../../library/unittest.rst:1875 msgid ":class:`TestLoader` objects have the following methods:" msgstr "" -#: ../../../library/unittest.rst:1873 +#: ../../../library/unittest.rst:1880 msgid "" "Return a suite of all test cases contained in the :class:`TestCase`\\ -" "derived :class:`!testCaseClass`." msgstr "" -#: ../../../library/unittest.rst:1876 +#: ../../../library/unittest.rst:1883 msgid "" "A test case instance is created for each method named by :meth:" "`getTestCaseNames`. By default these are the method names beginning with " @@ -2175,14 +2187,14 @@ msgid "" "method instead." msgstr "" -#: ../../../library/unittest.rst:1885 +#: ../../../library/unittest.rst:1892 msgid "" "Return a suite of all test cases contained in the given module. This method " "searches *module* for classes derived from :class:`TestCase` and creates an " "instance of the class for each test method defined for the class." msgstr "" -#: ../../../library/unittest.rst:1892 +#: ../../../library/unittest.rst:1899 msgid "" "While using a hierarchy of :class:`TestCase`\\ -derived classes can be " "convenient in sharing fixtures and helper functions, defining test methods " @@ -2191,7 +2203,7 @@ msgid "" "fixtures are different and defined in subclasses." msgstr "" -#: ../../../library/unittest.rst:1898 +#: ../../../library/unittest.rst:1905 msgid "" "If a module provides a ``load_tests`` function it will be called to load the " "tests. This allows modules to customize test loading. This is the " @@ -2199,24 +2211,24 @@ msgid "" "argument to ``load_tests``." msgstr "" -#: ../../../library/unittest.rst:1903 +#: ../../../library/unittest.rst:1910 msgid "Support for ``load_tests`` added." msgstr "" -#: ../../../library/unittest.rst:1906 +#: ../../../library/unittest.rst:1913 msgid "Support for a keyword-only argument *pattern* has been added." msgstr "" -#: ../../../library/unittest.rst:1909 +#: ../../../library/unittest.rst:1916 msgid "" "The undocumented and unofficial *use_load_tests* parameter has been removed." msgstr "" -#: ../../../library/unittest.rst:1916 +#: ../../../library/unittest.rst:1923 msgid "Return a suite of all test cases given a string specifier." msgstr "" -#: ../../../library/unittest.rst:1918 +#: ../../../library/unittest.rst:1925 msgid "" "The specifier *name* is a \"dotted name\" that may resolve either to a " "module, a test case class, a test method within a test case class, a :class:" @@ -2227,7 +2239,7 @@ msgid "" "object\"." msgstr "" -#: ../../../library/unittest.rst:1926 +#: ../../../library/unittest.rst:1933 msgid "" "For example, if you have a module :mod:`!SampleTests` containing a :class:" "`TestCase`\\ -derived class :class:`!SampleTestCase` with three test methods " @@ -2240,31 +2252,31 @@ msgid "" "imported as a side-effect." msgstr "" -#: ../../../library/unittest.rst:1936 +#: ../../../library/unittest.rst:1943 msgid "The method optionally resolves *name* relative to the given *module*." msgstr "" -#: ../../../library/unittest.rst:1938 +#: ../../../library/unittest.rst:1945 msgid "" "If an :exc:`ImportError` or :exc:`AttributeError` occurs while traversing " "*name* then a synthetic test that raises that error when run will be " "returned. These errors are included in the errors accumulated by self.errors." msgstr "" -#: ../../../library/unittest.rst:1947 +#: ../../../library/unittest.rst:1954 msgid "" "Similar to :meth:`loadTestsFromName`, but takes a sequence of names rather " "than a single name. The return value is a test suite which supports all the " "tests defined for each name." msgstr "" -#: ../../../library/unittest.rst:1954 +#: ../../../library/unittest.rst:1961 msgid "" "Return a sorted sequence of method names found within *testCaseClass*; this " "should be a subclass of :class:`TestCase`." msgstr "" -#: ../../../library/unittest.rst:1960 +#: ../../../library/unittest.rst:1967 msgid "" "Find all the test modules by recursing into subdirectories from the " "specified start directory, and return a TestSuite object containing them. " @@ -2273,14 +2285,14 @@ msgid "" "Python identifiers) will be loaded." msgstr "" -#: ../../../library/unittest.rst:1966 +#: ../../../library/unittest.rst:1973 msgid "" "All test modules must be importable from the top level of the project. If " "the start directory is not the top level directory then *top_level_dir* must " "be specified separately." msgstr "" -#: ../../../library/unittest.rst:1970 +#: ../../../library/unittest.rst:1977 msgid "" "If importing a module fails, for example due to a syntax error, then this " "will be recorded as a single error and discovery will continue. If the " @@ -2288,7 +2300,7 @@ msgid "" "as a skip instead of an error." msgstr "" -#: ../../../library/unittest.rst:1975 +#: ../../../library/unittest.rst:1982 msgid "" "If a package (a directory containing a file named :file:`__init__.py`) is " "found, the package will be checked for a ``load_tests`` function. If this " @@ -2298,107 +2310,107 @@ msgid "" "itself calls ``loader.discover``." msgstr "" -#: ../../../library/unittest.rst:1983 +#: ../../../library/unittest.rst:1990 msgid "" "If ``load_tests`` exists then discovery does *not* recurse into the package, " "``load_tests`` is responsible for loading all tests in the package." msgstr "" -#: ../../../library/unittest.rst:1987 +#: ../../../library/unittest.rst:1994 msgid "" "The pattern is deliberately not stored as a loader attribute so that " "packages can continue discovery themselves." msgstr "" -#: ../../../library/unittest.rst:1990 +#: ../../../library/unittest.rst:1997 msgid "" "*top_level_dir* is stored internally, and used as a default to any nested " "calls to ``discover()``. That is, if a package's ``load_tests`` calls " "``loader.discover()``, it does not need to pass this argument." msgstr "" -#: ../../../library/unittest.rst:1994 +#: ../../../library/unittest.rst:2001 msgid "*start_dir* can be a dotted module name as well as a directory." msgstr "" -#: ../../../library/unittest.rst:1998 +#: ../../../library/unittest.rst:2005 msgid "" "Modules that raise :exc:`SkipTest` on import are recorded as skips, not " "errors." msgstr "" -#: ../../../library/unittest.rst:2002 +#: ../../../library/unittest.rst:2009 msgid "*start_dir* can be a :term:`namespace packages `." msgstr "" -#: ../../../library/unittest.rst:2004 +#: ../../../library/unittest.rst:2011 msgid "" "Paths are sorted before being imported so that execution order is the same " "even if the underlying file system's ordering is not dependent on file name." msgstr "" -#: ../../../library/unittest.rst:2008 +#: ../../../library/unittest.rst:2015 msgid "" "Found packages are now checked for ``load_tests`` regardless of whether " "their path matches *pattern*, because it is impossible for a package name to " "match the default pattern." msgstr "" -#: ../../../library/unittest.rst:2013 +#: ../../../library/unittest.rst:2020 msgid "" "*start_dir* can not be a :term:`namespace packages `. It " "has been broken since Python 3.7, and Python 3.11 officially removes it." msgstr "" -#: ../../../library/unittest.rst:2017 +#: ../../../library/unittest.rst:2024 msgid "*top_level_dir* is only stored for the duration of *discover* call." msgstr "" -#: ../../../library/unittest.rst:2020 +#: ../../../library/unittest.rst:2027 msgid "*start_dir* can once again be a :term:`namespace package`." msgstr "" -#: ../../../library/unittest.rst:2023 +#: ../../../library/unittest.rst:2030 msgid "" "The following attributes of a :class:`TestLoader` can be configured either " "by subclassing or assignment on an instance:" msgstr "" -#: ../../../library/unittest.rst:2029 +#: ../../../library/unittest.rst:2036 msgid "" "String giving the prefix of method names which will be interpreted as test " "methods. The default value is ``'test'``." msgstr "" -#: ../../../library/unittest.rst:2032 +#: ../../../library/unittest.rst:2039 msgid "" "This affects :meth:`getTestCaseNames` and all the ``loadTestsFrom*`` methods." msgstr "" -#: ../../../library/unittest.rst:2038 +#: ../../../library/unittest.rst:2045 msgid "" "Function to be used to compare method names when sorting them in :meth:" "`getTestCaseNames` and all the ``loadTestsFrom*`` methods." msgstr "" -#: ../../../library/unittest.rst:2044 +#: ../../../library/unittest.rst:2051 msgid "" "Callable object that constructs a test suite from a list of tests. No " "methods on the resulting object are needed. The default value is the :class:" "`TestSuite` class." msgstr "" -#: ../../../library/unittest.rst:2048 ../../../library/unittest.rst:2061 +#: ../../../library/unittest.rst:2055 ../../../library/unittest.rst:2068 msgid "This affects all the ``loadTestsFrom*`` methods." msgstr "" -#: ../../../library/unittest.rst:2052 +#: ../../../library/unittest.rst:2059 msgid "" "List of Unix shell-style wildcard test name patterns that test methods have " "to match to be included in test suites (see ``-k`` option)." msgstr "" -#: ../../../library/unittest.rst:2055 +#: ../../../library/unittest.rst:2062 msgid "" "If this attribute is not ``None`` (the default), all test methods to be " "included in test suites must match one of the patterns in this list. Note " @@ -2407,13 +2419,13 @@ msgid "" "have to be converted using ``*`` wildcards." msgstr "" -#: ../../../library/unittest.rst:2068 +#: ../../../library/unittest.rst:2075 msgid "" "This class is used to compile information about which tests have succeeded " "and which have failed." msgstr "" -#: ../../../library/unittest.rst:2071 +#: ../../../library/unittest.rst:2078 msgid "" "A :class:`TestResult` object stores the results of a set of tests. The :" "class:`TestCase` and :class:`TestSuite` classes ensure that results are " @@ -2421,7 +2433,7 @@ msgid "" "outcome of tests." msgstr "" -#: ../../../library/unittest.rst:2076 +#: ../../../library/unittest.rst:2083 msgid "" "Testing frameworks built on top of :mod:`!unittest` may want access to the :" "class:`TestResult` object generated by running a set of tests for reporting " @@ -2429,61 +2441,61 @@ msgid "" "TestRunner.run` method for this purpose." msgstr "" -#: ../../../library/unittest.rst:2081 +#: ../../../library/unittest.rst:2088 msgid "" ":class:`TestResult` instances have the following attributes that will be of " "interest when inspecting the results of running a set of tests:" msgstr "" -#: ../../../library/unittest.rst:2087 +#: ../../../library/unittest.rst:2094 msgid "" "A list containing 2-tuples of :class:`TestCase` instances and strings " "holding formatted tracebacks. Each tuple represents a test which raised an " "unexpected exception." msgstr "" -#: ../../../library/unittest.rst:2093 +#: ../../../library/unittest.rst:2100 msgid "" "A list containing 2-tuples of :class:`TestCase` instances and strings " "holding formatted tracebacks. Each tuple represents a test where a failure " "was explicitly signalled using the :ref:`assert\\* methods `." msgstr "" -#: ../../../library/unittest.rst:2099 +#: ../../../library/unittest.rst:2106 msgid "" "A list containing 2-tuples of :class:`TestCase` instances and strings " "holding the reason for skipping the test." msgstr "" -#: ../../../library/unittest.rst:2106 +#: ../../../library/unittest.rst:2113 msgid "" "A list containing 2-tuples of :class:`TestCase` instances and strings " "holding formatted tracebacks. Each tuple represents an expected failure or " "error of the test case." msgstr "" -#: ../../../library/unittest.rst:2112 +#: ../../../library/unittest.rst:2119 msgid "" "A list containing :class:`TestCase` instances that were marked as expected " "failures, but succeeded." msgstr "" -#: ../../../library/unittest.rst:2117 +#: ../../../library/unittest.rst:2124 msgid "" "A list containing 2-tuples of test case names and floats representing the " "elapsed time of each test which was run." msgstr "" -#: ../../../library/unittest.rst:2124 +#: ../../../library/unittest.rst:2131 msgid "" "Set to ``True`` when the execution of tests should stop by :meth:`stop`." msgstr "" -#: ../../../library/unittest.rst:2128 +#: ../../../library/unittest.rst:2135 msgid "The total number of tests run so far." msgstr "" -#: ../../../library/unittest.rst:2132 +#: ../../../library/unittest.rst:2139 msgid "" "If set to true, ``sys.stdout`` and ``sys.stderr`` will be buffered in " "between :meth:`startTest` and :meth:`stopTest` being called. Collected " @@ -2492,29 +2504,36 @@ msgid "" "error message." msgstr "" -#: ../../../library/unittest.rst:2141 +#: ../../../library/unittest.rst:2148 msgid "" "If set to true :meth:`stop` will be called on the first failure or error, " "halting the test run." msgstr "" -#: ../../../library/unittest.rst:2148 +#: ../../../library/unittest.rst:2155 msgid "If set to true then local variables will be shown in tracebacks." msgstr "" -#: ../../../library/unittest.rst:2154 +#: ../../../library/unittest.rst:2161 +msgid "" +"The level of details which the test runner reports: ``0`` -- quiet, ``1`` -- " +"progress dots, ``2`` -- test names, ``3`` -- also the individual examples of " +"a :mod:`doctest`. A test runner is expected to set it to its own verbosity." +msgstr "" + +#: ../../../library/unittest.rst:2170 msgid "" "Return ``True`` if all tests run so far have passed, otherwise returns " "``False``." msgstr "" -#: ../../../library/unittest.rst:2157 +#: ../../../library/unittest.rst:2173 msgid "" "Returns ``False`` if there were any :attr:`unexpectedSuccesses` from tests " "marked with the :deco:`expectedFailure` decorator." msgstr "" -#: ../../../library/unittest.rst:2163 +#: ../../../library/unittest.rst:2179 msgid "" "This method can be called to signal that the set of tests being run should " "be aborted by setting the :attr:`shouldStop` attribute to ``True``. :class:`!" @@ -2522,7 +2541,7 @@ msgid "" "additional tests." msgstr "" -#: ../../../library/unittest.rst:2168 +#: ../../../library/unittest.rst:2184 msgid "" "For example, this feature is used by the :class:`TextTestRunner` class to " "stop the test framework when the user signals an interrupt from the " @@ -2530,7 +2549,7 @@ msgid "" "implementations can use this in a similar manner." msgstr "" -#: ../../../library/unittest.rst:2173 +#: ../../../library/unittest.rst:2189 msgid "" "The following methods of the :class:`TestResult` class are used to maintain " "the internal data structures, and may be extended in subclasses to support " @@ -2538,141 +2557,141 @@ msgid "" "tools which support interactive reporting while tests are being run." msgstr "" -#: ../../../library/unittest.rst:2181 +#: ../../../library/unittest.rst:2197 msgid "Called when the test case *test* is about to be run." msgstr "" -#: ../../../library/unittest.rst:2185 +#: ../../../library/unittest.rst:2201 msgid "" "Called after the test case *test* has been executed, regardless of the " "outcome." msgstr "" -#: ../../../library/unittest.rst:2190 +#: ../../../library/unittest.rst:2206 msgid "Called once before any tests are executed." msgstr "" -#: ../../../library/unittest.rst:2197 +#: ../../../library/unittest.rst:2213 msgid "Called once after all tests are executed." msgstr "" -#: ../../../library/unittest.rst:2204 +#: ../../../library/unittest.rst:2220 msgid "" "Called when the test case *test* raises an unexpected exception. *err* is a " "tuple of the form returned by :func:`sys.exc_info`: ``(type, value, " "traceback)``." msgstr "" -#: ../../../library/unittest.rst:2208 +#: ../../../library/unittest.rst:2224 msgid "" "The default implementation appends a tuple ``(test, formatted_err)`` to the " "instance's :attr:`errors` attribute, where *formatted_err* is a formatted " "traceback derived from *err*." msgstr "" -#: ../../../library/unittest.rst:2215 +#: ../../../library/unittest.rst:2231 msgid "" "Called when the test case *test* signals a failure. *err* is a tuple of the " "form returned by :func:`sys.exc_info`: ``(type, value, traceback)``." msgstr "" -#: ../../../library/unittest.rst:2218 +#: ../../../library/unittest.rst:2234 msgid "" "The default implementation appends a tuple ``(test, formatted_err)`` to the " "instance's :attr:`failures` attribute, where *formatted_err* is a formatted " "traceback derived from *err*." msgstr "" -#: ../../../library/unittest.rst:2225 +#: ../../../library/unittest.rst:2241 msgid "Called when the test case *test* succeeds." msgstr "" -#: ../../../library/unittest.rst:2227 +#: ../../../library/unittest.rst:2243 msgid "The default implementation does nothing." msgstr "" -#: ../../../library/unittest.rst:2232 +#: ../../../library/unittest.rst:2248 msgid "" "Called when the test case *test* is skipped. *reason* is the reason the " "test gave for skipping." msgstr "" -#: ../../../library/unittest.rst:2235 +#: ../../../library/unittest.rst:2251 msgid "" "The default implementation appends a tuple ``(test, reason)`` to the " "instance's :attr:`skipped` attribute." msgstr "" -#: ../../../library/unittest.rst:2241 +#: ../../../library/unittest.rst:2257 msgid "" "Called when the test case *test* fails or errors, but was marked with the :" "deco:`expectedFailure` decorator." msgstr "" -#: ../../../library/unittest.rst:2244 +#: ../../../library/unittest.rst:2260 msgid "" "The default implementation appends a tuple ``(test, formatted_err)`` to the " "instance's :attr:`expectedFailures` attribute, where *formatted_err* is a " "formatted traceback derived from *err*." msgstr "" -#: ../../../library/unittest.rst:2251 +#: ../../../library/unittest.rst:2267 msgid "" "Called when the test case *test* was marked with the :deco:`expectedFailure` " "decorator, but succeeded." msgstr "" -#: ../../../library/unittest.rst:2254 +#: ../../../library/unittest.rst:2270 msgid "" "The default implementation appends the test to the instance's :attr:" "`unexpectedSuccesses` attribute." msgstr "" -#: ../../../library/unittest.rst:2260 +#: ../../../library/unittest.rst:2276 msgid "" "Called when a subtest finishes. *test* is the test case corresponding to " "the test method. *subtest* is a custom :class:`TestCase` instance " "describing the subtest." msgstr "" -#: ../../../library/unittest.rst:2264 +#: ../../../library/unittest.rst:2280 msgid "" "If *outcome* is :const:`None`, the subtest succeeded. Otherwise, it failed " "with an exception where *outcome* is a tuple of the form returned by :func:" "`sys.exc_info`: ``(type, value, traceback)``." msgstr "" -#: ../../../library/unittest.rst:2268 +#: ../../../library/unittest.rst:2284 msgid "" "The default implementation does nothing when the outcome is a success, and " "records subtest failures as normal failures." msgstr "" -#: ../../../library/unittest.rst:2275 +#: ../../../library/unittest.rst:2291 msgid "" "Called when the test case finishes. *elapsed* is the time represented in " "seconds, and it includes the execution of cleanup functions." msgstr "" -#: ../../../library/unittest.rst:2282 +#: ../../../library/unittest.rst:2298 msgid "" "A concrete implementation of :class:`TestResult` used by the :class:" "`TextTestRunner`. Subclasses should accept ``**kwargs`` to ensure " "compatibility as the interface changes." msgstr "" -#: ../../../library/unittest.rst:2288 +#: ../../../library/unittest.rst:2304 msgid "Added the *durations* keyword parameter." msgstr "" -#: ../../../library/unittest.rst:2293 +#: ../../../library/unittest.rst:2309 msgid "" "Instance of the :class:`TestLoader` class intended to be shared. If no " "customization of the :class:`TestLoader` is needed, this instance can be " "used instead of repeatedly creating new instances." msgstr "" -#: ../../../library/unittest.rst:2302 +#: ../../../library/unittest.rst:2318 msgid "" "A basic test runner implementation that outputs results to a stream. If " "*stream* is ``None``, the default, :data:`sys.stderr` is used as the output " @@ -2683,7 +2702,7 @@ msgid "" "unittest." msgstr "" -#: ../../../library/unittest.rst:2309 +#: ../../../library/unittest.rst:2325 msgid "" "By default this runner shows :exc:`DeprecationWarning`, :exc:" "`PendingDeprecationWarning`, :exc:`ResourceWarning` and :exc:`ImportWarning` " @@ -2693,32 +2712,32 @@ msgid "" "``None``." msgstr "" -#: ../../../library/unittest.rst:2317 +#: ../../../library/unittest.rst:2333 msgid "Added the *warnings* parameter." msgstr "" -#: ../../../library/unittest.rst:2320 +#: ../../../library/unittest.rst:2336 msgid "" "The default stream is set to :data:`sys.stderr` at instantiation time rather " "than import time." msgstr "" -#: ../../../library/unittest.rst:2324 +#: ../../../library/unittest.rst:2340 msgid "Added the *tb_locals* parameter." msgstr "" -#: ../../../library/unittest.rst:2327 +#: ../../../library/unittest.rst:2343 msgid "Added the *durations* parameter." msgstr "" -#: ../../../library/unittest.rst:2332 +#: ../../../library/unittest.rst:2348 msgid "" "This method returns the instance of ``TestResult`` used by :meth:`run`. It " "is not intended to be called directly, but can be overridden in subclasses " "to provide a custom ``TestResult``." msgstr "" -#: ../../../library/unittest.rst:2336 +#: ../../../library/unittest.rst:2352 msgid "" "``_makeResult()`` instantiates the class or callable passed in the " "``TextTestRunner`` constructor as the ``resultclass`` argument. It defaults " @@ -2726,7 +2745,7 @@ msgid "" "class is instantiated with the following arguments::" msgstr "" -#: ../../../library/unittest.rst:2345 +#: ../../../library/unittest.rst:2361 msgid "" "This method is the main public interface to the ``TextTestRunner``. This " "method takes a :class:`TestSuite` or :class:`TestCase` instance. A :class:" @@ -2734,7 +2753,7 @@ msgid "" "run and the results printed to stdout." msgstr "" -#: ../../../library/unittest.rst:2356 +#: ../../../library/unittest.rst:2372 msgid "" "A command-line program that loads a set of tests from *module* and runs " "them; this is primarily for making test modules conveniently executable. The " @@ -2742,13 +2761,13 @@ msgid "" "of a test script::" msgstr "" -#: ../../../library/unittest.rst:2364 +#: ../../../library/unittest.rst:2380 msgid "" "You can run tests with more detailed information by passing in the verbosity " "argument::" msgstr "" -#: ../../../library/unittest.rst:2370 +#: ../../../library/unittest.rst:2386 msgid "" "The *defaultTest* argument is either the name of a single test or an " "iterable of test names to run if no test names are specified via *argv*. If " @@ -2756,14 +2775,14 @@ msgid "" "tests found in *module* are run." msgstr "" -#: ../../../library/unittest.rst:2375 +#: ../../../library/unittest.rst:2391 msgid "" "The *argv* argument can be a list of options passed to the program, with the " "first element being the program name. If not specified or ``None``, the " "values of :data:`sys.argv` are used." msgstr "" -#: ../../../library/unittest.rst:2379 +#: ../../../library/unittest.rst:2395 msgid "" "The *testRunner* argument can either be a test runner class or an already " "created instance of it. By default ``main`` calls :func:`sys.exit` with an " @@ -2771,26 +2790,26 @@ msgid "" "code of 5 indicates that no tests were run or skipped." msgstr "" -#: ../../../library/unittest.rst:2384 +#: ../../../library/unittest.rst:2400 msgid "" "The *testLoader* argument has to be a :class:`TestLoader` instance, and " "defaults to :data:`defaultTestLoader`." msgstr "" -#: ../../../library/unittest.rst:2387 +#: ../../../library/unittest.rst:2403 msgid "" "``main`` supports being used from the interactive interpreter by passing in " "the argument ``exit=False``. This displays the result on standard output " "without calling :func:`sys.exit`::" msgstr "" -#: ../../../library/unittest.rst:2394 +#: ../../../library/unittest.rst:2410 msgid "" "The *failfast*, *catchbreak* and *buffer* parameters have the same effect as " "the same-name `command-line options`_." msgstr "" -#: ../../../library/unittest.rst:2397 +#: ../../../library/unittest.rst:2413 msgid "" "The *warnings* argument specifies the :ref:`warning filter ` " "that should be used while running the tests. If it's not specified, it will " @@ -2799,56 +2818,56 @@ msgid "" "to ``'default'``." msgstr "" -#: ../../../library/unittest.rst:2403 +#: ../../../library/unittest.rst:2419 msgid "" "Calling ``main`` returns an object with the ``result`` attribute that " "contains the result of the tests run as a :class:`unittest.TestResult`." msgstr "" -#: ../../../library/unittest.rst:2406 +#: ../../../library/unittest.rst:2422 msgid "The *exit* parameter was added." msgstr "" -#: ../../../library/unittest.rst:2409 +#: ../../../library/unittest.rst:2425 msgid "" "The *verbosity*, *failfast*, *catchbreak*, *buffer* and *warnings* " "parameters were added." msgstr "" -#: ../../../library/unittest.rst:2413 +#: ../../../library/unittest.rst:2429 msgid "" "The *defaultTest* parameter was changed to also accept an iterable of test " "names." msgstr "" -#: ../../../library/unittest.rst:2421 +#: ../../../library/unittest.rst:2437 msgid "load_tests Protocol" msgstr "" -#: ../../../library/unittest.rst:2425 +#: ../../../library/unittest.rst:2441 msgid "" "Modules or packages can customize how tests are loaded from them during " "normal test runs or test discovery by implementing a function called " "``load_tests``." msgstr "" -#: ../../../library/unittest.rst:2428 +#: ../../../library/unittest.rst:2444 msgid "" "If a test module defines ``load_tests`` it will be called by :meth:" "`TestLoader.loadTestsFromModule` with the following arguments::" msgstr "" -#: ../../../library/unittest.rst:2433 +#: ../../../library/unittest.rst:2449 msgid "" "where *pattern* is passed straight through from ``loadTestsFromModule``. It " "defaults to ``None``." msgstr "" -#: ../../../library/unittest.rst:2436 +#: ../../../library/unittest.rst:2452 msgid "It should return a :class:`TestSuite`." msgstr "" -#: ../../../library/unittest.rst:2438 +#: ../../../library/unittest.rst:2454 msgid "" "*loader* is the instance of :class:`TestLoader` doing the loading. " "*standard_tests* are the tests that would be loaded by default from the " @@ -2857,13 +2876,13 @@ msgid "" "packages as part of test discovery." msgstr "" -#: ../../../library/unittest.rst:2444 +#: ../../../library/unittest.rst:2460 msgid "" "A typical ``load_tests`` function that loads tests from a specific set of :" "class:`TestCase` classes may look like::" msgstr "" -#: ../../../library/unittest.rst:2456 +#: ../../../library/unittest.rst:2472 msgid "" "If discovery is started in a directory containing a package, either from the " "command line or by calling :meth:`TestLoader.discover`, then the package :" @@ -2873,31 +2892,31 @@ msgid "" "left up to ``load_tests`` which is called with the following arguments::" msgstr "" -#: ../../../library/unittest.rst:2465 +#: ../../../library/unittest.rst:2481 msgid "" "This should return a :class:`TestSuite` representing all the tests from the " "package. (``standard_tests`` will only contain tests collected from :file:" "`__init__.py`.)" msgstr "" -#: ../../../library/unittest.rst:2469 +#: ../../../library/unittest.rst:2485 msgid "" "Because the pattern is passed into ``load_tests`` the package is free to " "continue (and potentially modify) test discovery. A 'do nothing' " "``load_tests`` function for a test package would look like::" msgstr "" -#: ../../../library/unittest.rst:2480 +#: ../../../library/unittest.rst:2496 msgid "" "Discovery no longer checks package names for matching *pattern* due to the " "impossibility of package names matching the default pattern." msgstr "" -#: ../../../library/unittest.rst:2487 +#: ../../../library/unittest.rst:2503 msgid "Class and Module Fixtures" msgstr "" -#: ../../../library/unittest.rst:2489 +#: ../../../library/unittest.rst:2505 msgid "" "Class and module level fixtures are implemented in :class:`TestSuite`. When " "the test suite encounters a test from a new class then :meth:`~TestCase." @@ -2905,27 +2924,27 @@ msgid "" "by :meth:`~TestCase.setUpClass` from the new class." msgstr "" -#: ../../../library/unittest.rst:2494 +#: ../../../library/unittest.rst:2510 msgid "" "Similarly if a test is from a different module from the previous test then " "``tearDownModule`` from the previous module is run, followed by " "``setUpModule`` from the new module." msgstr "" -#: ../../../library/unittest.rst:2498 +#: ../../../library/unittest.rst:2514 msgid "" "After all the tests have run the final ``tearDownClass`` and " "``tearDownModule`` are run." msgstr "" -#: ../../../library/unittest.rst:2501 +#: ../../../library/unittest.rst:2517 msgid "" "Note that shared fixtures do not play well with [potential] features like " "test parallelization and they break test isolation. They should be used with " "care." msgstr "" -#: ../../../library/unittest.rst:2504 +#: ../../../library/unittest.rst:2520 msgid "" "The default ordering of tests created by the unittest test loaders is to " "group all tests from the same modules and classes together. This will lead " @@ -2935,14 +2954,14 @@ msgid "" "functions may be called multiple times in a single test run." msgstr "" -#: ../../../library/unittest.rst:2511 +#: ../../../library/unittest.rst:2527 msgid "" "Shared fixtures are not intended to work with suites with non-standard " "ordering. A ``BaseTestSuite`` still exists for frameworks that don't want to " "support shared fixtures." msgstr "" -#: ../../../library/unittest.rst:2515 +#: ../../../library/unittest.rst:2531 msgid "" "If there are any exceptions raised during one of the shared fixture " "functions the test is reported as an error. Because there is no " @@ -2952,22 +2971,22 @@ msgid "" "matter, but if you are a framework author it may be relevant." msgstr "" -#: ../../../library/unittest.rst:2524 +#: ../../../library/unittest.rst:2540 msgid "setUpClass and tearDownClass" msgstr "" -#: ../../../library/unittest.rst:2526 +#: ../../../library/unittest.rst:2542 msgid "These must be implemented as class methods::" msgstr "" -#: ../../../library/unittest.rst:2539 +#: ../../../library/unittest.rst:2555 msgid "" "If you want the ``setUpClass`` and ``tearDownClass`` on base classes called " "then you must call up to them yourself. The implementations in :class:" "`TestCase` are empty." msgstr "" -#: ../../../library/unittest.rst:2543 +#: ../../../library/unittest.rst:2559 msgid "" "If an exception is raised during a ``setUpClass`` then the tests in the " "class are not run and the ``tearDownClass`` is not run. Skipped classes will " @@ -2976,15 +2995,15 @@ msgid "" "instead of as an error." msgstr "" -#: ../../../library/unittest.rst:2551 +#: ../../../library/unittest.rst:2567 msgid "setUpModule and tearDownModule" msgstr "" -#: ../../../library/unittest.rst:2557 +#: ../../../library/unittest.rst:2573 msgid "These should be implemented as functions::" msgstr "" -#: ../../../library/unittest.rst:2565 +#: ../../../library/unittest.rst:2581 msgid "" "If an exception is raised in a ``setUpModule`` then none of the tests in the " "module will be run and the ``tearDownModule`` will not be run. If the " @@ -2992,13 +3011,13 @@ msgid "" "having been skipped instead of as an error." msgstr "" -#: ../../../library/unittest.rst:2570 +#: ../../../library/unittest.rst:2586 msgid "" "To add cleanup code that must be run even in the case of an exception, use " "``addModuleCleanup``:" msgstr "" -#: ../../../library/unittest.rst:2576 +#: ../../../library/unittest.rst:2592 msgid "" "Add a function to be called after :func:`tearDownModule` to cleanup " "resources used during the test class. Functions will be called in reverse " @@ -3007,13 +3026,13 @@ msgid "" "`addModuleCleanup` when they are added." msgstr "" -#: ../../../library/unittest.rst:2582 +#: ../../../library/unittest.rst:2598 msgid "" "If :meth:`setUpModule` fails, meaning that :func:`tearDownModule` is not " "called, then any cleanup functions added will still be called." msgstr "" -#: ../../../library/unittest.rst:2590 +#: ../../../library/unittest.rst:2606 msgid "" "Enter the supplied :term:`context manager`. If successful, also add its :" "meth:`~object.__exit__` method as a cleanup function by :func:" @@ -3021,30 +3040,30 @@ msgid "" "method." msgstr "" -#: ../../../library/unittest.rst:2600 +#: ../../../library/unittest.rst:2616 msgid "" "This function is called unconditionally after :func:`tearDownModule`, or " "after :func:`setUpModule` if :func:`setUpModule` raises an exception." msgstr "" -#: ../../../library/unittest.rst:2603 +#: ../../../library/unittest.rst:2619 msgid "" "It is responsible for calling all the cleanup functions added by :func:" "`addModuleCleanup`. If you need cleanup functions to be called *prior* to :" "func:`tearDownModule` then you can call :func:`doModuleCleanups` yourself." msgstr "" -#: ../../../library/unittest.rst:2608 +#: ../../../library/unittest.rst:2624 msgid "" ":func:`doModuleCleanups` pops methods off the stack of cleanup functions one " "at a time, so it can be called at any time." msgstr "" -#: ../../../library/unittest.rst:2615 +#: ../../../library/unittest.rst:2631 msgid "Signal Handling" msgstr "" -#: ../../../library/unittest.rst:2619 +#: ../../../library/unittest.rst:2635 msgid "" "The :option:`-c/--catch ` command-line option to unittest, " "along with the ``catchbreak`` parameter to :func:`unittest.main`, provide " @@ -3054,7 +3073,7 @@ msgid "" "A second control-c will raise a :exc:`KeyboardInterrupt` in the usual way." msgstr "" -#: ../../../library/unittest.rst:2626 +#: ../../../library/unittest.rst:2642 msgid "" "The control-c handling signal handler attempts to remain compatible with " "code or tests that install their own :const:`signal.SIGINT` handler. If the " @@ -3066,41 +3085,41 @@ msgid "" "disabled the :func:`removeHandler` decorator can be used." msgstr "" -#: ../../../library/unittest.rst:2635 +#: ../../../library/unittest.rst:2651 msgid "" "There are a few utility functions for framework authors to enable control-c " "handling functionality within test frameworks." msgstr "" -#: ../../../library/unittest.rst:2640 +#: ../../../library/unittest.rst:2656 msgid "" "Install the control-c handler. When a :const:`signal.SIGINT` is received " "(usually in response to the user pressing control-c) all registered results " "have :meth:`~TestResult.stop` called." msgstr "" -#: ../../../library/unittest.rst:2647 +#: ../../../library/unittest.rst:2663 msgid "" "Register a :class:`TestResult` object for control-c handling. Registering a " "result stores a weak reference to it, so it doesn't prevent the result from " "being garbage collected." msgstr "" -#: ../../../library/unittest.rst:2651 +#: ../../../library/unittest.rst:2667 msgid "" "Registering a :class:`TestResult` object has no side-effects if control-c " "handling is not enabled, so test frameworks can unconditionally register all " "results they create independently of whether or not handling is enabled." msgstr "" -#: ../../../library/unittest.rst:2658 +#: ../../../library/unittest.rst:2674 msgid "" "Remove a registered result. Once a result has been removed then :meth:" "`~TestResult.stop` will no longer be called on that result object in " "response to a control-c." msgstr "" -#: ../../../library/unittest.rst:2665 +#: ../../../library/unittest.rst:2681 msgid "" "When called without arguments this function removes the control-c handler if " "it has been installed. This function can also be used as a test decorator to " diff --git a/main/locale/pot/LC_MESSAGES/library/urllib.request.pot b/main/locale/pot/LC_MESSAGES/library/urllib.request.pot index 09d66fa1d70..70058105297 100644 --- a/main/locale/pot/LC_MESSAGES/library/urllib.request.pot +++ b/main/locale/pot/LC_MESSAGES/library/urllib.request.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -616,7 +616,7 @@ msgid "A catch-all class to handle unknown URLs." msgstr "" #: ../../../library/urllib.request.rst:512 -#: ../../../library/urllib.request.rst:1227 +#: ../../../library/urllib.request.rst:1234 msgid "Process HTTP error responses." msgstr "" @@ -1255,32 +1255,39 @@ msgstr "" #: ../../../library/urllib.request.rst:1059 msgid "" +"*headers* must be a mapping-like object with case-insensitive lookup that " +"implements the ``get_all()`` method, such as :class:`email.message.Message` " +"or :class:`wsgiref.headers.Headers`." +msgstr "" + +#: ../../../library/urllib.request.rst:1063 +msgid "" "*host* is either an authority (e.g. ``\"python.org\"``) or a URL containing " "an authority component (e.g. ``\"https://python.org/\"``). In either case, " "the authority must not contain a userinfo component (so, ``\"python.org\"`` " "and ``\"python.org:80\"`` are fine, ``\"joe:password@python.org\"`` is not)." msgstr "" -#: ../../../library/urllib.request.rst:1068 +#: ../../../library/urllib.request.rst:1072 msgid "HTTPBasicAuthHandler Objects" msgstr "" -#: ../../../library/urllib.request.rst:1073 -#: ../../../library/urllib.request.rst:1084 -#: ../../../library/urllib.request.rst:1109 -#: ../../../library/urllib.request.rst:1120 +#: ../../../library/urllib.request.rst:1077 +#: ../../../library/urllib.request.rst:1088 +#: ../../../library/urllib.request.rst:1116 +#: ../../../library/urllib.request.rst:1127 msgid "Retry the request with authentication information, if available." msgstr "" -#: ../../../library/urllib.request.rst:1079 +#: ../../../library/urllib.request.rst:1083 msgid "ProxyBasicAuthHandler Objects" msgstr "" -#: ../../../library/urllib.request.rst:1090 +#: ../../../library/urllib.request.rst:1094 msgid "AbstractDigestAuthHandler Objects" msgstr "" -#: ../../../library/urllib.request.rst:1095 +#: ../../../library/urllib.request.rst:1099 msgid "" "*authreq* should be the name of the header where the information about the " "realm is included in the request, *host* should be the host to authenticate " @@ -1289,54 +1296,60 @@ msgid "" msgstr "" #: ../../../library/urllib.request.rst:1104 +msgid "" +"*headers* must be a mapping-like object with case-insensitive lookup, such " +"as :class:`email.message.Message` or :class:`wsgiref.headers.Headers`." +msgstr "" + +#: ../../../library/urllib.request.rst:1111 msgid "HTTPDigestAuthHandler Objects" msgstr "" -#: ../../../library/urllib.request.rst:1115 +#: ../../../library/urllib.request.rst:1122 msgid "ProxyDigestAuthHandler Objects" msgstr "" -#: ../../../library/urllib.request.rst:1126 +#: ../../../library/urllib.request.rst:1133 msgid "HTTPHandler Objects" msgstr "" -#: ../../../library/urllib.request.rst:1131 +#: ../../../library/urllib.request.rst:1138 msgid "" "Send an HTTP request, which can be either GET or POST, depending on ``req." "data``." msgstr "" -#: ../../../library/urllib.request.rst:1138 +#: ../../../library/urllib.request.rst:1145 msgid "HTTPSHandler Objects" msgstr "" -#: ../../../library/urllib.request.rst:1143 +#: ../../../library/urllib.request.rst:1150 msgid "" "Send an HTTPS request, which can be either GET or POST, depending on ``req." "data``." msgstr "" -#: ../../../library/urllib.request.rst:1150 +#: ../../../library/urllib.request.rst:1157 msgid "FileHandler Objects" msgstr "" -#: ../../../library/urllib.request.rst:1155 +#: ../../../library/urllib.request.rst:1162 msgid "" "Open the file locally, if there is no host name, or the host name is " "``'localhost'``." msgstr "" -#: ../../../library/urllib.request.rst:1158 +#: ../../../library/urllib.request.rst:1165 msgid "" "This method is applicable only for local hostnames. When a remote hostname " "is given, a :exc:`~urllib.error.URLError` is raised." msgstr "" -#: ../../../library/urllib.request.rst:1166 +#: ../../../library/urllib.request.rst:1173 msgid "DataHandler Objects" msgstr "" -#: ../../../library/urllib.request.rst:1170 +#: ../../../library/urllib.request.rst:1177 msgid "" "Read a data URL. This kind of URL contains the content encoded in the URL " "itself. The data URL syntax is specified in :rfc:`2397`. This implementation " @@ -1346,51 +1359,51 @@ msgid "" "implementation will raise a :exc:`ValueError` in that case." msgstr "" -#: ../../../library/urllib.request.rst:1181 +#: ../../../library/urllib.request.rst:1188 msgid "FTPHandler Objects" msgstr "" -#: ../../../library/urllib.request.rst:1186 +#: ../../../library/urllib.request.rst:1193 msgid "" "Open the FTP file indicated by *req*. The login is always done with empty " "username and password." msgstr "" -#: ../../../library/urllib.request.rst:1193 +#: ../../../library/urllib.request.rst:1200 msgid "CacheFTPHandler Objects" msgstr "" -#: ../../../library/urllib.request.rst:1195 +#: ../../../library/urllib.request.rst:1202 msgid "" ":class:`CacheFTPHandler` objects are :class:`FTPHandler` objects with the " "following additional methods:" msgstr "" -#: ../../../library/urllib.request.rst:1201 +#: ../../../library/urllib.request.rst:1208 msgid "Set timeout of connections to *t* seconds." msgstr "" -#: ../../../library/urllib.request.rst:1206 +#: ../../../library/urllib.request.rst:1213 msgid "Set maximum number of cached connections to *m*." msgstr "" -#: ../../../library/urllib.request.rst:1212 +#: ../../../library/urllib.request.rst:1219 msgid "UnknownHandler Objects" msgstr "" -#: ../../../library/urllib.request.rst:1217 +#: ../../../library/urllib.request.rst:1224 msgid "Raise a :exc:`~urllib.error.URLError` exception." msgstr "" -#: ../../../library/urllib.request.rst:1223 +#: ../../../library/urllib.request.rst:1230 msgid "HTTPErrorProcessor Objects" msgstr "" -#: ../../../library/urllib.request.rst:1229 +#: ../../../library/urllib.request.rst:1236 msgid "For 200 error codes, the response object is returned immediately." msgstr "" -#: ../../../library/urllib.request.rst:1231 +#: ../../../library/urllib.request.rst:1238 msgid "" "For non-200 error codes, this simply passes the job on to the :meth:`!" "http_error_\\` handler methods, via :meth:`OpenerDirector.error`. " @@ -1398,31 +1411,31 @@ msgid "" "error.HTTPError` if no other handler handles the error." msgstr "" -#: ../../../library/urllib.request.rst:1239 +#: ../../../library/urllib.request.rst:1246 msgid "Process HTTPS error responses." msgstr "" -#: ../../../library/urllib.request.rst:1241 +#: ../../../library/urllib.request.rst:1248 msgid "The behavior is same as :meth:`http_response`." msgstr "" -#: ../../../library/urllib.request.rst:1247 +#: ../../../library/urllib.request.rst:1254 msgid "Examples" msgstr "" -#: ../../../library/urllib.request.rst:1249 +#: ../../../library/urllib.request.rst:1256 msgid "" "In addition to the examples below, more examples are given in :ref:`urllib-" "howto`." msgstr "" -#: ../../../library/urllib.request.rst:1252 +#: ../../../library/urllib.request.rst:1259 msgid "" "This example gets the python.org main page and displays the first 300 bytes " "of it::" msgstr "" -#: ../../../library/urllib.request.rst:1265 +#: ../../../library/urllib.request.rst:1272 msgid "" "Note that urlopen returns a bytes object. This is because there is no way " "for urlopen to automatically determine the encoding of the byte stream it " @@ -1431,51 +1444,51 @@ msgid "" "appropriate encoding." msgstr "" -#: ../../../library/urllib.request.rst:1271 +#: ../../../library/urllib.request.rst:1278 msgid "" "The following HTML spec document, https://html.spec.whatwg.org/#charset, " "lists the various ways in which an HTML or an XML document could have " "specified its encoding information." msgstr "" -#: ../../../library/urllib.request.rst:1275 +#: ../../../library/urllib.request.rst:1282 msgid "" "For additional information, see the W3C document: https://www.w3.org/" "International/questions/qa-html-encoding-declarations." msgstr "" -#: ../../../library/urllib.request.rst:1277 +#: ../../../library/urllib.request.rst:1284 msgid "" "As the python.org website uses *utf-8* encoding as specified in its meta " "tag, we will use the same for decoding the bytes object::" msgstr "" -#: ../../../library/urllib.request.rst:1290 +#: ../../../library/urllib.request.rst:1297 msgid "" "It is also possible to achieve the same result without using the :term:" "`context manager` approach::" msgstr "" -#: ../../../library/urllib.request.rst:1305 +#: ../../../library/urllib.request.rst:1312 msgid "" "In the following example, we are sending a data-stream to the stdin of a CGI " "and reading the data it returns to us. Note that this example will only work " "when the Python installation supports SSL. ::" msgstr "" -#: ../../../library/urllib.request.rst:1317 +#: ../../../library/urllib.request.rst:1324 msgid "The code for the sample CGI used in the above example is::" msgstr "" -#: ../../../library/urllib.request.rst:1324 +#: ../../../library/urllib.request.rst:1331 msgid "Here is an example of doing a ``PUT`` request using :class:`Request`::" msgstr "" -#: ../../../library/urllib.request.rst:1334 +#: ../../../library/urllib.request.rst:1341 msgid "Use of Basic HTTP Authentication::" msgstr "" -#: ../../../library/urllib.request.rst:1349 +#: ../../../library/urllib.request.rst:1356 msgid "" ":func:`build_opener` provides many handlers by default, including a :class:" "`ProxyHandler`. By default, :class:`ProxyHandler` uses the environment " @@ -1484,71 +1497,71 @@ msgid "" "read to obtain the HTTP proxy's URL." msgstr "" -#: ../../../library/urllib.request.rst:1355 +#: ../../../library/urllib.request.rst:1362 msgid "" "This example replaces the default :class:`ProxyHandler` with one that uses " "programmatically supplied proxy URLs, and adds proxy authorization support " "with :class:`ProxyBasicAuthHandler`. ::" msgstr "" -#: ../../../library/urllib.request.rst:1368 +#: ../../../library/urllib.request.rst:1375 msgid "Adding HTTP headers:" msgstr "" -#: ../../../library/urllib.request.rst:1370 +#: ../../../library/urllib.request.rst:1377 msgid "Use the *headers* argument to the :class:`Request` constructor, or::" msgstr "" -#: ../../../library/urllib.request.rst:1381 +#: ../../../library/urllib.request.rst:1388 msgid "" ":class:`OpenerDirector` automatically adds a :mailheader:`User-Agent` header " "to every :class:`Request`. To change this::" msgstr "" -#: ../../../library/urllib.request.rst:1390 +#: ../../../library/urllib.request.rst:1397 msgid "" "Also, remember that a few standard headers (:mailheader:`Content-Length`, :" "mailheader:`Content-Type` and :mailheader:`Host`) are added when the :class:" "`Request` is passed to :func:`urlopen` (or :meth:`OpenerDirector.open`)." msgstr "" -#: ../../../library/urllib.request.rst:1397 +#: ../../../library/urllib.request.rst:1404 msgid "" "Here is an example session that uses the ``GET`` method to retrieve a URL " "containing parameters::" msgstr "" -#: ../../../library/urllib.request.rst:1408 +#: ../../../library/urllib.request.rst:1415 msgid "" "The following example uses the ``POST`` method instead. Note that params " "output from urlencode is encoded to bytes before it is sent to urlopen as " "data::" msgstr "" -#: ../../../library/urllib.request.rst:1419 +#: ../../../library/urllib.request.rst:1426 msgid "" "The following example uses an explicitly specified HTTP proxy, overriding " "environment settings::" msgstr "" -#: ../../../library/urllib.request.rst:1429 +#: ../../../library/urllib.request.rst:1436 msgid "" "The following example uses no proxies at all, overriding environment " "settings::" msgstr "" -#: ../../../library/urllib.request.rst:1439 +#: ../../../library/urllib.request.rst:1446 msgid "Legacy interface" msgstr "" -#: ../../../library/urllib.request.rst:1441 +#: ../../../library/urllib.request.rst:1448 msgid "" "The following functions and classes are ported from the Python 2 module " "``urllib`` (as opposed to ``urllib2``). They might become deprecated at " "some point in the future." msgstr "" -#: ../../../library/urllib.request.rst:1447 +#: ../../../library/urllib.request.rst:1454 msgid "" "Copy a network object denoted by a URL to a local file. If the URL points to " "a local file, the object will not be copied unless filename is supplied. " @@ -1558,7 +1571,7 @@ msgid "" "a remote object). Exceptions are the same as for :func:`urlopen`." msgstr "" -#: ../../../library/urllib.request.rst:1454 +#: ../../../library/urllib.request.rst:1461 msgid "" "The second argument, if present, specifies the file location to copy to (if " "absent, the location will be a tempfile with a generated name). The third " @@ -1570,11 +1583,11 @@ msgid "" "file size in response to a retrieval request." msgstr "" -#: ../../../library/urllib.request.rst:1463 +#: ../../../library/urllib.request.rst:1470 msgid "The following example illustrates the most common usage scenario::" msgstr "" -#: ../../../library/urllib.request.rst:1470 +#: ../../../library/urllib.request.rst:1477 msgid "" "If the *url* uses the :file:`http:` scheme identifier, the optional *data* " "argument may be given to specify a ``POST`` request (normally the request " @@ -1583,7 +1596,7 @@ msgid "" "parse.urlencode` function." msgstr "" -#: ../../../library/urllib.request.rst:1476 +#: ../../../library/urllib.request.rst:1483 msgid "" ":func:`urlretrieve` will raise :exc:`~urllib.error.ContentTooShortError` " "when it detects that the amount of data available was less than the " @@ -1591,66 +1604,66 @@ msgid "" "This can occur, for example, when the download is interrupted." msgstr "" -#: ../../../library/urllib.request.rst:1481 +#: ../../../library/urllib.request.rst:1488 msgid "" "The *Content-Length* is treated as a lower bound: if there's more data to " "read, urlretrieve reads more data, but if less data is available, it raises " "the exception." msgstr "" -#: ../../../library/urllib.request.rst:1485 +#: ../../../library/urllib.request.rst:1492 msgid "" "You can still retrieve the downloaded data in this case, it is stored in " "the :attr:`!content` attribute of the exception instance." msgstr "" -#: ../../../library/urllib.request.rst:1488 +#: ../../../library/urllib.request.rst:1495 msgid "" "If no *Content-Length* header was supplied, urlretrieve can not check the " "size of the data it has downloaded, and just returns it. In this case you " "just have to assume that the download was successful." msgstr "" -#: ../../../library/urllib.request.rst:1494 +#: ../../../library/urllib.request.rst:1501 msgid "" "Cleans up temporary files that may have been left behind by previous calls " "to :func:`urlretrieve`. It also resets the default global opener installed " "by :func:`install_opener`." msgstr "" -#: ../../../library/urllib.request.rst:1500 +#: ../../../library/urllib.request.rst:1507 msgid ":mod:`!urllib.request` Restrictions" msgstr "" -#: ../../../library/urllib.request.rst:1506 +#: ../../../library/urllib.request.rst:1513 msgid "" "Currently, only the following protocols are supported: HTTP (versions 0.9 " "and 1.0), FTP, local files, and data URLs." msgstr "" -#: ../../../library/urllib.request.rst:1509 +#: ../../../library/urllib.request.rst:1516 msgid "Added support for data URLs." msgstr "" -#: ../../../library/urllib.request.rst:1511 +#: ../../../library/urllib.request.rst:1518 msgid "" "The caching feature of :func:`urlretrieve` has been disabled until someone " "finds the time to hack proper processing of Expiration time headers." msgstr "" -#: ../../../library/urllib.request.rst:1514 +#: ../../../library/urllib.request.rst:1521 msgid "" "There should be a function to query whether a particular URL is in the cache." msgstr "" -#: ../../../library/urllib.request.rst:1516 +#: ../../../library/urllib.request.rst:1523 msgid "" "For backward compatibility, if a URL appears to point to a local file but " "the file can't be opened, the URL is re-interpreted using the FTP protocol. " "This can sometimes cause confusing error messages." msgstr "" -#: ../../../library/urllib.request.rst:1520 +#: ../../../library/urllib.request.rst:1527 msgid "" "The :func:`urlopen` and :func:`urlretrieve` functions can cause arbitrarily " "long delays while waiting for a network connection to be set up. This means " @@ -1658,7 +1671,7 @@ msgid "" "functions without using threads." msgstr "" -#: ../../../library/urllib.request.rst:1529 +#: ../../../library/urllib.request.rst:1536 msgid "" "The data returned by :func:`urlopen` or :func:`urlretrieve` is the raw data " "returned by the server. This may be binary data (such as an image), plain " @@ -1668,7 +1681,7 @@ msgid "" "module :mod:`html.parser` to parse it." msgstr "" -#: ../../../library/urllib.request.rst:1538 +#: ../../../library/urllib.request.rst:1545 msgid "" "The code handling the FTP protocol cannot differentiate between a file and a " "directory. This can lead to unexpected behavior when attempting to read a " @@ -1685,11 +1698,11 @@ msgid "" "module." msgstr "" -#: ../../../library/urllib.request.rst:1554 +#: ../../../library/urllib.request.rst:1561 msgid ":mod:`!urllib.response` --- Response classes used by urllib" msgstr "" -#: ../../../library/urllib.request.rst:1559 +#: ../../../library/urllib.request.rst:1566 msgid "" "The :mod:`!urllib.response` module defines functions and classes which " "define a minimal file-like interface, including ``read()`` and " @@ -1698,50 +1711,50 @@ msgid "" "`urllib.response.addinfourl` instance:" msgstr "" -#: ../../../library/urllib.request.rst:1568 +#: ../../../library/urllib.request.rst:1575 msgid "" "URL of the resource retrieved, commonly used to determine if a redirect was " "followed." msgstr "" -#: ../../../library/urllib.request.rst:1572 +#: ../../../library/urllib.request.rst:1579 msgid "" "Returns the headers of the response in the form of an :class:`~email.message." "EmailMessage` instance." msgstr "" -#: ../../../library/urllib.request.rst:1578 +#: ../../../library/urllib.request.rst:1585 msgid "Status code returned by server." msgstr "" -#: ../../../library/urllib.request.rst:1582 +#: ../../../library/urllib.request.rst:1589 msgid "Deprecated in favor of :attr:`~addinfourl.url`." msgstr "" -#: ../../../library/urllib.request.rst:1587 +#: ../../../library/urllib.request.rst:1594 msgid "Deprecated in favor of :attr:`~addinfourl.headers`." msgstr "" -#: ../../../library/urllib.request.rst:1592 -#: ../../../library/urllib.request.rst:1597 +#: ../../../library/urllib.request.rst:1599 +#: ../../../library/urllib.request.rst:1604 msgid "Deprecated in favor of :attr:`~addinfourl.status`." msgstr "" -#: ../../../library/urllib.request.rst:1502 -#: ../../../library/urllib.request.rst:1525 +#: ../../../library/urllib.request.rst:1509 +#: ../../../library/urllib.request.rst:1532 msgid "HTTP" msgstr "" -#: ../../../library/urllib.request.rst:1502 -#: ../../../library/urllib.request.rst:1525 +#: ../../../library/urllib.request.rst:1509 +#: ../../../library/urllib.request.rst:1532 msgid "protocol" msgstr "" -#: ../../../library/urllib.request.rst:1502 -#: ../../../library/urllib.request.rst:1536 +#: ../../../library/urllib.request.rst:1509 +#: ../../../library/urllib.request.rst:1543 msgid "FTP" msgstr "" -#: ../../../library/urllib.request.rst:1525 +#: ../../../library/urllib.request.rst:1532 msgid "HTML" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/venv.pot b/main/locale/pot/LC_MESSAGES/library/venv.pot index c6404d9fa22..c6b0b755e82 100644 --- a/main/locale/pot/LC_MESSAGES/library/venv.pot +++ b/main/locale/pot/LC_MESSAGES/library/venv.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -513,7 +513,7 @@ msgstr "" msgid "Added the ``scm_ignore_files`` parameter" msgstr "" -#: ../../../library/venv.rst:355 ../../../library/venv.rst:548 +#: ../../../library/venv.rst:355 ../../../library/venv.rst:554 msgid "The default value of *symlinks* is now platform-dependent." msgstr "" @@ -645,41 +645,49 @@ msgid "" "Creates a copy or symlink to the Python executable in the environment. On " "POSIX systems, if a specific executable ``python3.x`` was used, symlinks to " "``python`` and ``python3`` will be created pointing to that executable, " -"unless files with those names already exist." +"unless files with those names already exist. On POSIX systems, a broken " +"symlink at a destination path is removed before the copy or symlink is " +"created." msgstr "" #: ../../../library/venv.rst:458 msgid "" +"A broken symlink at a destination path is now removed and replaced. " +"Previously it was left in place, or it made the copy fail." +msgstr "" + +#: ../../../library/venv.rst:464 +msgid "" "Installs activation scripts appropriate to the platform into the virtual " "environment." msgstr "" -#: ../../../library/venv.rst:463 +#: ../../../library/venv.rst:469 msgid "" "Upgrades the core venv dependency packages (currently :pypi:`pip`) in the " "environment. This is done by shelling out to the ``pip`` executable in the " "environment." msgstr "" -#: ../../../library/venv.rst:470 +#: ../../../library/venv.rst:476 msgid ":pypi:`setuptools` is no longer a core venv dependency." msgstr "" -#: ../../../library/venv.rst:474 +#: ../../../library/venv.rst:480 msgid "" "A placeholder method which can be overridden in third party implementations " "to pre-install packages in the virtual environment or perform other post-" "creation steps." msgstr "" -#: ../../../library/venv.rst:480 +#: ../../../library/venv.rst:486 msgid "" "This method can be called from :meth:`setup_scripts` or :meth:`post_setup` " "in subclasses to assist in installing custom scripts into the virtual " "environment." msgstr "" -#: ../../../library/venv.rst:484 +#: ../../../library/venv.rst:490 msgid "" "*path* is the path to a directory that should contain subdirectories " "``common``, ``posix``, ``nt``; each containing scripts destined for the " @@ -688,100 +696,100 @@ msgid "" "replacement of placeholders:" msgstr "" -#: ../../../library/venv.rst:490 +#: ../../../library/venv.rst:496 msgid "" "``__VENV_DIR__`` is replaced with the absolute path of the environment " "directory." msgstr "" -#: ../../../library/venv.rst:493 +#: ../../../library/venv.rst:499 msgid "" "``__VENV_NAME__`` is replaced with the environment name (final path segment " "of environment directory)." msgstr "" -#: ../../../library/venv.rst:496 +#: ../../../library/venv.rst:502 msgid "" "``__VENV_PROMPT__`` is replaced with the prompt (the environment name " "surrounded by parentheses and with a following space)" msgstr "" -#: ../../../library/venv.rst:499 +#: ../../../library/venv.rst:505 msgid "" "``__VENV_BIN_NAME__`` is replaced with the name of the bin directory (either " "``bin`` or ``Scripts``)." msgstr "" -#: ../../../library/venv.rst:502 +#: ../../../library/venv.rst:508 msgid "" "``__VENV_PYTHON__`` is replaced with the absolute path of the environment's " "executable." msgstr "" -#: ../../../library/venv.rst:505 +#: ../../../library/venv.rst:511 msgid "" "The directories are allowed to exist (for when an existing environment is " "being upgraded)." msgstr "" -#: ../../../library/venv.rst:510 +#: ../../../library/venv.rst:516 msgid "" "Creates a ``.gitignore`` file within the virtual environment that causes the " "entire directory to be ignored by the Git source control manager." msgstr "" -#: ../../../library/venv.rst:515 +#: ../../../library/venv.rst:521 msgid "" "Windows now uses redirector scripts for ``python[w].exe`` instead of copying " "the actual binaries. In 3.7.2 only :meth:`setup_python` does nothing unless " "running from a build in the source tree." msgstr "" -#: ../../../library/venv.rst:520 +#: ../../../library/venv.rst:526 msgid "" "Windows copies the redirector scripts as part of :meth:`setup_python` " "instead of :meth:`setup_scripts`. This was not the case in 3.7.2. When using " "symlinks, the original executables will be linked." msgstr "" -#: ../../../library/venv.rst:525 +#: ../../../library/venv.rst:531 msgid "There is also a module-level convenience function:" msgstr "" -#: ../../../library/venv.rst:531 +#: ../../../library/venv.rst:537 msgid "" "Create an :class:`EnvBuilder` with the given keyword arguments, and call " "its :meth:`~EnvBuilder.create` method with the *env_dir* argument." msgstr "" -#: ../../../library/venv.rst:536 +#: ../../../library/venv.rst:542 msgid "Added the *with_pip* parameter" msgstr "" -#: ../../../library/venv.rst:539 +#: ../../../library/venv.rst:545 msgid "Added the *prompt* parameter" msgstr "" -#: ../../../library/venv.rst:542 +#: ../../../library/venv.rst:548 msgid "Added the *upgrade_deps* parameter" msgstr "" -#: ../../../library/venv.rst:545 +#: ../../../library/venv.rst:551 msgid "Added the *scm_ignore_files* parameter" msgstr "" -#: ../../../library/venv.rst:552 +#: ../../../library/venv.rst:558 msgid "An example of extending ``EnvBuilder``" msgstr "" -#: ../../../library/venv.rst:554 +#: ../../../library/venv.rst:560 msgid "" "The following script shows how to extend :class:`EnvBuilder` by implementing " "a subclass which installs setuptools and pip into a created virtual " "environment::" msgstr "" -#: ../../../library/venv.rst:765 +#: ../../../library/venv.rst:771 msgid "" "This script is also available for download `online `_." diff --git a/main/locale/pot/LC_MESSAGES/library/weakref.pot b/main/locale/pot/LC_MESSAGES/library/weakref.pot index 5d3e31014a1..7e68880dfa6 100644 --- a/main/locale/pot/LC_MESSAGES/library/weakref.pot +++ b/main/locale/pot/LC_MESSAGES/library/weakref.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -347,48 +347,48 @@ msgstr "" #: ../../../library/weakref.rst:293 msgid "" -"When the program exits, each remaining live finalizer is called unless its :" -"attr:`atexit` attribute has been set to false. They are called in reverse " -"order of creation." +"When the program exits (or more generally, at :term:`interpreter shutdown`), " +"each remaining live finalizer is called unless its :attr:`atexit` attribute " +"has been set to false. They are called in reverse order of creation." msgstr "" -#: ../../../library/weakref.rst:297 +#: ../../../library/weakref.rst:298 msgid "" "A finalizer will never invoke its callback during the later part of the :" "term:`interpreter shutdown` when module globals are liable to have been " "replaced by :const:`None`." msgstr "" -#: ../../../library/weakref.rst:303 +#: ../../../library/weakref.rst:304 msgid "" "If *self* is alive then mark it as dead and return the result of calling " "``func(*args, **kwargs)``. If *self* is dead then return :const:`None`." msgstr "" -#: ../../../library/weakref.rst:309 +#: ../../../library/weakref.rst:310 msgid "" "If *self* is alive then mark it as dead and return the tuple ``(obj, func, " "args, kwargs)``. If *self* is dead then return :const:`None`." msgstr "" -#: ../../../library/weakref.rst:315 +#: ../../../library/weakref.rst:316 msgid "" "If *self* is alive then return the tuple ``(obj, func, args, kwargs)``. If " "*self* is dead then return :const:`None`." msgstr "" -#: ../../../library/weakref.rst:320 +#: ../../../library/weakref.rst:321 msgid "Property which is true if the finalizer is alive, false otherwise." msgstr "" -#: ../../../library/weakref.rst:324 +#: ../../../library/weakref.rst:325 msgid "" -"A writable boolean property which by default is true. When the program " -"exits, it calls all remaining live finalizers for which :attr:`.atexit` is " -"true. They are called in reverse order of creation." +"A writable boolean property which by default is true. At :term:`interpreter " +"shutdown`, all remaining live finalizers for which :attr:`.atexit` is true " +"are called in reverse order of creation." msgstr "" -#: ../../../library/weakref.rst:331 +#: ../../../library/weakref.rst:332 msgid "" "It is important to ensure that *func*, *args* and *kwargs* do not own any " "references to *obj*, either directly or indirectly, since otherwise *obj* " @@ -396,60 +396,60 @@ msgid "" "bound method of *obj*." msgstr "" -#: ../../../library/weakref.rst:341 +#: ../../../library/weakref.rst:342 msgid "The type object for weak references objects." msgstr "" -#: ../../../library/weakref.rst:346 +#: ../../../library/weakref.rst:347 msgid "The type object for proxies of objects which are not callable." msgstr "" -#: ../../../library/weakref.rst:351 +#: ../../../library/weakref.rst:352 msgid "The type object for proxies of callable objects." msgstr "" -#: ../../../library/weakref.rst:356 +#: ../../../library/weakref.rst:357 msgid "" "Sequence containing all the type objects for proxies. This can make it " "simpler to test if an object is a proxy without being dependent on naming " "both proxy types." msgstr "" -#: ../../../library/weakref.rst:363 +#: ../../../library/weakref.rst:364 msgid ":pep:`205` - Weak References" msgstr "" -#: ../../../library/weakref.rst:364 +#: ../../../library/weakref.rst:365 msgid "" "The proposal and rationale for this feature, including links to earlier " "implementations and information about similar features in other languages." msgstr "" -#: ../../../library/weakref.rst:371 +#: ../../../library/weakref.rst:372 msgid "Weak Reference Objects" msgstr "" -#: ../../../library/weakref.rst:373 +#: ../../../library/weakref.rst:374 msgid "" "Weak reference objects have no methods and no attributes besides :attr:`ref." "__callback__`. A weak reference object allows the referent to be obtained, " "if it still exists, by calling it:" msgstr "" -#: ../../../library/weakref.rst:387 +#: ../../../library/weakref.rst:388 msgid "" "If the referent no longer exists, calling the reference object returns :" "const:`None`:" msgstr "" -#: ../../../library/weakref.rst:394 +#: ../../../library/weakref.rst:395 msgid "" "Testing that a weak reference object is still live should be done using the " "expression ``ref() is not None``. Normally, application code that needs to " "use a reference object should follow this pattern::" msgstr "" -#: ../../../library/weakref.rst:407 +#: ../../../library/weakref.rst:408 msgid "" "Using a separate test for \"liveness\" creates race conditions in threaded " "applications; another thread can cause a weak reference to become " @@ -457,7 +457,7 @@ msgid "" "safe in threaded applications as well as single-threaded applications." msgstr "" -#: ../../../library/weakref.rst:412 +#: ../../../library/weakref.rst:413 msgid "" "Specialized versions of :class:`ref` objects can be created through " "subclassing. This is used in the implementation of the :class:" @@ -467,18 +467,18 @@ msgid "" "to retrieve the referent." msgstr "" -#: ../../../library/weakref.rst:418 +#: ../../../library/weakref.rst:419 msgid "" "This example shows how a subclass of :class:`ref` can be used to store " "additional information about an object and affect the value that's returned " "when the referent is accessed::" msgstr "" -#: ../../../library/weakref.rst:445 +#: ../../../library/weakref.rst:446 msgid "Example" msgstr "" -#: ../../../library/weakref.rst:447 +#: ../../../library/weakref.rst:448 msgid "" "This simple example shows how an application can use object IDs to retrieve " "objects that it has seen before. The IDs of the objects can then be used in " @@ -486,67 +486,67 @@ msgid "" "objects can still be retrieved by ID if they do." msgstr "" -#: ../../../library/weakref.rst:472 +#: ../../../library/weakref.rst:473 msgid "Finalizer Objects" msgstr "" -#: ../../../library/weakref.rst:474 +#: ../../../library/weakref.rst:475 msgid "" "The main benefit of using :class:`finalize` is that it makes it simple to " "register a callback without needing to preserve the returned finalizer " "object. For instance" msgstr "" -#: ../../../library/weakref.rst:488 +#: ../../../library/weakref.rst:489 msgid "" "The finalizer can be called directly as well. However the finalizer will " "invoke the callback at most once." msgstr "" -#: ../../../library/weakref.rst:504 +#: ../../../library/weakref.rst:505 msgid "" "You can unregister a finalizer using its :meth:`~finalize.detach` method. " "This kills the finalizer and returns the arguments passed to the constructor " "when it was created." msgstr "" -#: ../../../library/weakref.rst:518 +#: ../../../library/weakref.rst:519 msgid "" "Unless you set the :attr:`~finalize.atexit` attribute to :const:`False`, a " "finalizer will be called when the program exits if it is still alive. For " "instance" msgstr "" -#: ../../../library/weakref.rst:533 +#: ../../../library/weakref.rst:534 msgid "Comparing finalizers with :meth:`~object.__del__` methods" msgstr "" -#: ../../../library/weakref.rst:535 +#: ../../../library/weakref.rst:536 msgid "" "Suppose we want to create a class whose instances represent temporary " "directories. The directories should be deleted with their contents when the " "first of the following events occurs:" msgstr "" -#: ../../../library/weakref.rst:539 +#: ../../../library/weakref.rst:540 msgid "the object is garbage collected," msgstr "" -#: ../../../library/weakref.rst:540 +#: ../../../library/weakref.rst:541 msgid "the object's :meth:`!remove` method is called, or" msgstr "" -#: ../../../library/weakref.rst:541 +#: ../../../library/weakref.rst:542 msgid "the program exits." msgstr "" -#: ../../../library/weakref.rst:543 +#: ../../../library/weakref.rst:544 msgid "" "We might try to implement the class using a :meth:`~object.__del__` method " "as follows::" msgstr "" -#: ../../../library/weakref.rst:562 +#: ../../../library/weakref.rst:563 msgid "" "Starting with Python 3.4, :meth:`~object.__del__` methods no longer prevent " "reference cycles from being garbage collected, and module globals are no " @@ -554,35 +554,35 @@ msgid "" "code should work without any issues on CPython." msgstr "" -#: ../../../library/weakref.rst:567 +#: ../../../library/weakref.rst:568 msgid "" "However, handling of :meth:`~object.__del__` methods is notoriously " "implementation specific, since it depends on internal details of the " "interpreter's garbage collector implementation." msgstr "" -#: ../../../library/weakref.rst:571 +#: ../../../library/weakref.rst:572 msgid "" "A more robust alternative can be to define a finalizer which only references " "the specific functions and objects that it needs, rather than having access " "to the full state of the object::" msgstr "" -#: ../../../library/weakref.rst:587 +#: ../../../library/weakref.rst:588 msgid "" "Defined like this, our finalizer only receives a reference to the details it " "needs to clean up the directory appropriately. If the object never gets " "garbage collected the finalizer will still be called at exit." msgstr "" -#: ../../../library/weakref.rst:591 +#: ../../../library/weakref.rst:592 msgid "" "The other advantage of weakref based finalizers is that they can be used to " "register finalizers for classes where the definition is controlled by a " "third party, such as running code when a module is unloaded::" msgstr "" -#: ../../../library/weakref.rst:603 +#: ../../../library/weakref.rst:604 msgid "" "If you create a finalizer object in a daemonic thread just as the program " "exits then there is the possibility that the finalizer does not get called " diff --git a/main/locale/pot/LC_MESSAGES/library/xml.dom.minidom.pot b/main/locale/pot/LC_MESSAGES/library/xml.dom.minidom.pot index 3c0cc1c849f..3a0ed3ef241 100644 --- a/main/locale/pot/LC_MESSAGES/library/xml.dom.minidom.pot +++ b/main/locale/pot/LC_MESSAGES/library/xml.dom.minidom.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-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -320,37 +320,77 @@ msgstr "" #: ../../../library/xml.dom.minidom.rst:248 msgid "" -":class:`NodeList` objects are implemented using Python's built-in list type. " -"These objects provide the interface defined in the DOM specification, but " -"with earlier versions of Python they do not support the official API. They " -"are, however, much more \"Pythonic\" than the interface defined in the W3C " -"recommendations." +"Each of the :class:`~xml.dom.NodeList` and :class:`~xml.dom.NamedNodeMap` " +"interfaces has two implementations, which provide additional methods and " +"operations." msgstr "" -#: ../../../library/xml.dom.minidom.rst:254 +#: ../../../library/xml.dom.minidom.rst:252 msgid "" -"The following interfaces have no implementation in :mod:`!xml.dom.minidom`:" +":attr:`~xml.dom.Node.childNodes` is a subclass of :class:`list`, or, for " +"nodes which cannot have children, a subclass of :class:`tuple`. It supports " +"iteration, concatenation, indexing and slicing." msgstr "" #: ../../../library/xml.dom.minidom.rst:256 +msgid "" +":attr:`~xml.dom.Node.attributes` supports ``len()``, the :keyword:`in` " +"operator, subscription by a name or by a ``(namespaceURI, localName)`` " +"tuple, assignment and deletion, and the methods :meth:`!get`, :meth:`!" +"keys`, :meth:`!keysNS`, :meth:`!values`, :meth:`!items` and :meth:`!" +"itemsNS`. :attr:`~xml.dom.DocumentType.entities` and :attr:`~xml.dom." +"DocumentType.notations` are read-only and support only ``len()`` and " +"subscription by a name." +msgstr "" + +#: ../../../library/xml.dom.minidom.rst:264 +msgid ":attr:`~xml.dom.Document.strictErrorChecking` is always ``False``." +msgstr "" + +#: ../../../library/xml.dom.minidom.rst:266 +msgid "Previously, :attr:`~xml.dom.Attr.specified` was always ``False``." +msgstr "" + +#: ../../../library/xml.dom.minidom.rst:269 +msgid "" +"The constraints of the DOM are now enforced, and the corresponding " +"exceptions are raised." +msgstr "" + +#: ../../../library/xml.dom.minidom.rst:272 +msgid "" +"Previously, many invalid operations silently succeeded and produced an " +"invalid document, but removing an absent attribute raised :exc:`~xml.dom." +"NotFoundErr`." +msgstr "" + +#: ../../../library/xml.dom.minidom.rst:277 +msgid "" +"The following interfaces have no implementation in :mod:`!xml.dom.minidom`:" +msgstr "" + +#: ../../../library/xml.dom.minidom.rst:279 msgid ":class:`DOMTimeStamp`" msgstr "" -#: ../../../library/xml.dom.minidom.rst:258 -msgid ":class:`EntityReference`" +#: ../../../library/xml.dom.minidom.rst:281 +msgid "" +"This reflects information in the XML document that is not of general utility " +"to most DOM users." msgstr "" -#: ../../../library/xml.dom.minidom.rst:260 +#: ../../../library/xml.dom.minidom.rst:284 msgid "" -"Most of these reflect information in the XML document that is not of general " -"utility to most DOM users." +":class:`~xml.dom.EntityReference` is now implemented. Note that the parser " +"expands entity references, so they only occur in a document if created " +"explicitly." msgstr "" -#: ../../../library/xml.dom.minidom.rst:264 +#: ../../../library/xml.dom.minidom.rst:290 msgid "Footnotes" msgstr "" -#: ../../../library/xml.dom.minidom.rst:265 +#: ../../../library/xml.dom.minidom.rst:291 msgid "" "The encoding name included in the XML output should conform to the " "appropriate standards. For example, \"UTF-8\" is valid, but \"UTF8\" is not " diff --git a/main/locale/pot/LC_MESSAGES/library/xml.dom.pot b/main/locale/pot/LC_MESSAGES/library/xml.dom.pot index a97f9e6be6f..0696bc5d190 100644 --- a/main/locale/pot/LC_MESSAGES/library/xml.dom.pot +++ b/main/locale/pot/LC_MESSAGES/library/xml.dom.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-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -60,7 +60,7 @@ msgid "" "substantially based on the DOM Level 2 recommendation." msgstr "" -#: ../../../library/xml.dom.rst:42 +#: ../../../library/xml.dom.rst:34 msgid "" "DOM applications typically start by parsing some XML into a DOM. How this " "is accomplished is not covered at all by DOM Level 1, and Level 2 provides " @@ -74,7 +74,7 @@ msgid "" "reader, but this is not yet available in the Python standard library." msgstr "" -#: ../../../library/xml.dom.rst:53 +#: ../../../library/xml.dom.rst:45 msgid "" "Once you have a DOM document object, you can access the parts of your XML " "document through its properties and methods. These properties are defined " @@ -82,7 +82,7 @@ msgid "" "interpretation of the specification in Python." msgstr "" -#: ../../../library/xml.dom.rst:58 +#: ../../../library/xml.dom.rst:50 msgid "" "The specification provided by the W3C defines the DOM API for Java, " "ECMAScript, and OMG IDL. The Python mapping defined here is based in large " @@ -92,45 +92,45 @@ msgid "" "mapping requirements." msgstr "" -#: ../../../library/xml.dom.rst:67 +#: ../../../library/xml.dom.rst:59 msgid "" "`Document Object Model (DOM) Level 2 Specification `_" msgstr "" -#: ../../../library/xml.dom.rst:68 +#: ../../../library/xml.dom.rst:60 msgid "The W3C recommendation upon which the Python DOM API is based." msgstr "" -#: ../../../library/xml.dom.rst:70 +#: ../../../library/xml.dom.rst:62 msgid "" "`Document Object Model (DOM) Level 1 Specification `_" msgstr "" -#: ../../../library/xml.dom.rst:71 +#: ../../../library/xml.dom.rst:63 msgid "The W3C recommendation for the DOM supported by :mod:`xml.dom.minidom`." msgstr "" -#: ../../../library/xml.dom.rst:73 +#: ../../../library/xml.dom.rst:65 msgid "" "`Python Language Mapping Specification `_" msgstr "" -#: ../../../library/xml.dom.rst:74 +#: ../../../library/xml.dom.rst:66 msgid "This specifies the mapping from OMG IDL to Python." msgstr "" -#: ../../../library/xml.dom.rst:78 +#: ../../../library/xml.dom.rst:70 msgid "Module Contents" msgstr "" -#: ../../../library/xml.dom.rst:80 +#: ../../../library/xml.dom.rst:72 msgid "The :mod:`!xml.dom` contains the following functions:" msgstr "" -#: ../../../library/xml.dom.rst:85 +#: ../../../library/xml.dom.rst:77 msgid "" "Register the *factory* function with the name *name*. The factory function " "should return an object which implements the :class:`DOMImplementation` " @@ -139,227 +139,240 @@ msgid "" "if that implementation supports some customization)." msgstr "" -#: ../../../library/xml.dom.rst:94 +#: ../../../library/xml.dom.rst:86 msgid "" "Return a suitable DOM implementation. The *name* is either well-known, the " "module name of a DOM implementation, or ``None``. If it is not ``None``, " "imports the corresponding module and returns a :class:`DOMImplementation` " "object if the import succeeds. If no name is given, and if the environment " -"variable :envvar:`PYTHON_DOM` is set, this variable is used to find the " -"implementation." +"variable :envvar:`!PYTHON_DOM` is set, this variable is used to find the " +"implementation. The only well-known name in the standard library is " +"``'minidom'``, for :mod:`xml.dom.minidom`." msgstr "" -#: ../../../library/xml.dom.rst:100 +#: ../../../library/xml.dom.rst:94 msgid "" "If name is not given, this examines the available implementations to find " "one with the required feature set. If no implementation can be found, raise " "an :exc:`ImportError`. The features list must be a sequence of ``(feature, " -"version)`` pairs which are passed to the :meth:`hasFeature` method on " -"available :class:`DOMImplementation` objects." +"version)`` pairs which are passed to the :meth:`~DOMImplementation." +"hasFeature` method on available :class:`DOMImplementation` objects." msgstr "" -#: ../../../library/xml.dom.rst:106 +#: ../../../library/xml.dom.rst:100 msgid "Some convenience constants are also provided:" msgstr "" -#: ../../../library/xml.dom.rst:111 +#: ../../../library/xml.dom.rst:105 msgid "" "The value used to indicate that no namespace is associated with a node in " -"the DOM. This is typically found as the :attr:`namespaceURI` of a node, or " -"used as the *namespaceURI* parameter to a namespaces-specific method." +"the DOM. This is typically found as the :attr:`~Node.namespaceURI` of a " +"node, or used as the *namespaceURI* parameter to a namespaces-specific " +"method." msgstr "" -#: ../../../library/xml.dom.rst:118 +#: ../../../library/xml.dom.rst:112 msgid "" "The namespace URI associated with the reserved prefix ``xml``, as defined by " "`Namespaces in XML `_ (section 4)." msgstr "" -#: ../../../library/xml.dom.rst:124 +#: ../../../library/xml.dom.rst:118 msgid "" "The namespace URI for namespace declarations, as defined by `Document Object " "Model (DOM) Level 2 Core Specification `_ (section 1.1.8)." msgstr "" -#: ../../../library/xml.dom.rst:131 +#: ../../../library/xml.dom.rst:125 msgid "" "The URI of the XHTML namespace as defined by `XHTML 1.0: The Extensible " "HyperText Markup Language `_ (section 3.1.1)." msgstr "" -#: ../../../library/xml.dom.rst:135 +#: ../../../library/xml.dom.rst:129 msgid "" "In addition, :mod:`!xml.dom` contains a base :class:`Node` class and the DOM " "exception classes. The :class:`Node` class provided by this module does not " "implement any of the methods or attributes defined by the DOM specification; " "concrete DOM implementations must provide those. The :class:`Node` class " "provided as part of this module does provide the constants used for the :" -"attr:`nodeType` attribute on concrete :class:`Node` objects; they are " +"attr:`~Node.nodeType` attribute on concrete :class:`Node` objects; they are " "located within the class rather than at the module level to conform with the " "DOM specifications." msgstr "" -#: ../../../library/xml.dom.rst:150 +#: ../../../library/xml.dom.rst:144 msgid "Objects in the DOM" msgstr "" -#: ../../../library/xml.dom.rst:152 +#: ../../../library/xml.dom.rst:146 msgid "" "The definitive documentation for the DOM is the DOM specification from the " "W3C." msgstr "" -#: ../../../library/xml.dom.rst:154 +#: ../../../library/xml.dom.rst:148 +msgid "" +"The names documented in this section are DOM interfaces. With the exception " +"of :class:`Node` and the exception classes, they are not provided by the :" +"mod:`!xml.dom` module itself, but by concrete DOM implementations, such as :" +"mod:`xml.dom.minidom`." +msgstr "" + +#: ../../../library/xml.dom.rst:153 msgid "" "Note that DOM attributes may also be manipulated as nodes instead of as " "simple strings. It is fairly rare that you must do this, however, so this " "usage is not yet documented." msgstr "" -#: ../../../library/xml.dom.rst:159 +#: ../../../library/xml.dom.rst:158 msgid "Interface" msgstr "" -#: ../../../library/xml.dom.rst:159 +#: ../../../library/xml.dom.rst:158 msgid "Section" msgstr "" -#: ../../../library/xml.dom.rst:159 +#: ../../../library/xml.dom.rst:158 msgid "Purpose" msgstr "" -#: ../../../library/xml.dom.rst:161 +#: ../../../library/xml.dom.rst:160 msgid ":class:`DOMImplementation`" msgstr "" -#: ../../../library/xml.dom.rst:161 +#: ../../../library/xml.dom.rst:160 msgid ":ref:`dom-implementation-objects`" msgstr "" -#: ../../../library/xml.dom.rst:161 +#: ../../../library/xml.dom.rst:160 msgid "Interface to the underlying implementation." msgstr "" -#: ../../../library/xml.dom.rst:164 +#: ../../../library/xml.dom.rst:163 msgid ":class:`Node`" msgstr "" -#: ../../../library/xml.dom.rst:164 +#: ../../../library/xml.dom.rst:163 msgid ":ref:`dom-node-objects`" msgstr "" -#: ../../../library/xml.dom.rst:164 +#: ../../../library/xml.dom.rst:163 msgid "Base interface for most objects in a document." msgstr "" -#: ../../../library/xml.dom.rst:167 +#: ../../../library/xml.dom.rst:166 msgid ":class:`NodeList`" msgstr "" -#: ../../../library/xml.dom.rst:167 +#: ../../../library/xml.dom.rst:166 msgid ":ref:`dom-nodelist-objects`" msgstr "" -#: ../../../library/xml.dom.rst:167 +#: ../../../library/xml.dom.rst:166 msgid "Interface for a sequence of nodes." msgstr "" -#: ../../../library/xml.dom.rst:170 +#: ../../../library/xml.dom.rst:169 ../../../library/xml.dom.rst:416 msgid ":class:`DocumentType`" msgstr "" -#: ../../../library/xml.dom.rst:170 +#: ../../../library/xml.dom.rst:169 msgid ":ref:`dom-documenttype-objects`" msgstr "" -#: ../../../library/xml.dom.rst:170 +#: ../../../library/xml.dom.rst:169 msgid "Information about the declarations needed to process a document." msgstr "" -#: ../../../library/xml.dom.rst:174 +#: ../../../library/xml.dom.rst:173 ../../../library/xml.dom.rst:248 +#: ../../../library/xml.dom.rst:412 msgid ":class:`Document`" msgstr "" -#: ../../../library/xml.dom.rst:174 +#: ../../../library/xml.dom.rst:173 msgid ":ref:`dom-document-objects`" msgstr "" -#: ../../../library/xml.dom.rst:174 +#: ../../../library/xml.dom.rst:173 msgid "Object which represents an entire document." msgstr "" -#: ../../../library/xml.dom.rst:177 +#: ../../../library/xml.dom.rst:176 ../../../library/xml.dom.rst:418 msgid ":class:`Element`" msgstr "" -#: ../../../library/xml.dom.rst:177 +#: ../../../library/xml.dom.rst:176 msgid ":ref:`dom-element-objects`" msgstr "" -#: ../../../library/xml.dom.rst:177 +#: ../../../library/xml.dom.rst:176 msgid "Element nodes in the document hierarchy." msgstr "" -#: ../../../library/xml.dom.rst:180 +#: ../../../library/xml.dom.rst:179 ../../../library/xml.dom.rst:256 +#: ../../../library/xml.dom.rst:406 msgid ":class:`Attr`" msgstr "" -#: ../../../library/xml.dom.rst:180 +#: ../../../library/xml.dom.rst:179 msgid ":ref:`dom-attr-objects`" msgstr "" -#: ../../../library/xml.dom.rst:180 +#: ../../../library/xml.dom.rst:179 msgid "Attribute value nodes on element nodes." msgstr "" -#: ../../../library/xml.dom.rst:183 +#: ../../../library/xml.dom.rst:182 ../../../library/xml.dom.rst:410 msgid ":class:`Comment`" msgstr "" -#: ../../../library/xml.dom.rst:183 +#: ../../../library/xml.dom.rst:182 msgid ":ref:`dom-comment-objects`" msgstr "" -#: ../../../library/xml.dom.rst:183 +#: ../../../library/xml.dom.rst:182 msgid "Representation of comments in the source document." msgstr "" -#: ../../../library/xml.dom.rst:186 +#: ../../../library/xml.dom.rst:185 ../../../library/xml.dom.rst:257 +#: ../../../library/xml.dom.rst:426 msgid ":class:`Text`" msgstr "" -#: ../../../library/xml.dom.rst:186 +#: ../../../library/xml.dom.rst:185 msgid ":ref:`dom-text-objects`" msgstr "" -#: ../../../library/xml.dom.rst:186 +#: ../../../library/xml.dom.rst:185 msgid "Nodes containing textual content from the document." msgstr "" -#: ../../../library/xml.dom.rst:189 +#: ../../../library/xml.dom.rst:188 ../../../library/xml.dom.rst:424 msgid ":class:`ProcessingInstruction`" msgstr "" -#: ../../../library/xml.dom.rst:189 +#: ../../../library/xml.dom.rst:188 msgid ":ref:`dom-pi-objects`" msgstr "" -#: ../../../library/xml.dom.rst:189 +#: ../../../library/xml.dom.rst:188 msgid "Processing instruction representation." msgstr "" -#: ../../../library/xml.dom.rst:193 +#: ../../../library/xml.dom.rst:192 msgid "" "An additional section describes the exceptions defined for working with the " "DOM in Python." msgstr "" -#: ../../../library/xml.dom.rst:200 +#: ../../../library/xml.dom.rst:199 msgid "DOMImplementation Objects" msgstr "" -#: ../../../library/xml.dom.rst:202 +#: ../../../library/xml.dom.rst:204 msgid "" "The :class:`DOMImplementation` interface provides a way for applications to " "determine the availability of particular features in the DOM they are using. " @@ -367,13 +380,13 @@ msgid "" "`DocumentType` objects using the :class:`DOMImplementation` as well." msgstr "" -#: ../../../library/xml.dom.rst:210 +#: ../../../library/xml.dom.rst:212 msgid "" "Return ``True`` if the feature identified by the pair of strings *feature* " "and *version* is implemented." msgstr "" -#: ../../../library/xml.dom.rst:216 +#: ../../../library/xml.dom.rst:218 msgid "" "Return a new :class:`Document` object (the root of the DOM), with a child :" "class:`Element` object having the given *namespaceUri* and *qualifiedName*. " @@ -383,33 +396,71 @@ msgid "" "child is to be created." msgstr "" -#: ../../../library/xml.dom.rst:226 +#: ../../../library/xml.dom.rst:228 msgid "" "Return a new :class:`DocumentType` object that encapsulates the given " "*qualifiedName*, *publicId*, and *systemId* strings, representing the " "information contained in an XML document type declaration." msgstr "" -#: ../../../library/xml.dom.rst:234 +#: ../../../library/xml.dom.rst:232 ../../../library/xml.dom.rst:679 +#: ../../../library/xml.dom.rst:689 ../../../library/xml.dom.rst:704 +#: ../../../library/xml.dom.rst:722 ../../../library/xml.dom.rst:732 +#: ../../../library/xml.dom.rst:742 ../../../library/xml.dom.rst:878 +#: ../../../library/xml.dom.rst:907 +msgid "Raise :exc:`InvalidCharacterErr` if the name is not a valid XML name." +msgstr "" + +#: ../../../library/xml.dom.rst:238 msgid "Node Objects" msgstr "" -#: ../../../library/xml.dom.rst:236 +#: ../../../library/xml.dom.rst:243 msgid "" "All of the components of an XML document are subclasses of :class:`Node`." msgstr "" -#: ../../../library/xml.dom.rst:241 +#: ../../../library/xml.dom.rst:245 +msgid "" +"Only nodes of the following types can have children, and only children of " +"the listed types:" +msgstr "" + +#: ../../../library/xml.dom.rst:249 +msgid "" +"at most one :class:`Element`, at most one :class:`DocumentType`, :class:" +"`ProcessingInstruction` and :class:`Comment`" +msgstr "" + +#: ../../../library/xml.dom.rst:252 +msgid ":class:`DocumentFragment` and :class:`Element`" +msgstr "" + +#: ../../../library/xml.dom.rst:253 +msgid "" +":class:`Element`, :class:`Text`, :class:`CDATASection`, :class:" +"`ProcessingInstruction` and :class:`Comment`" +msgstr "" + +#: ../../../library/xml.dom.rst:259 +msgid "" +"Nodes of other types cannot have children. Inserting a child of a not " +"allowed type raises :exc:`HierarchyRequestErr`." +msgstr "" + +#: ../../../library/xml.dom.rst:265 msgid "" "An integer representing the node type. Symbolic constants for the types are " -"on the :class:`Node` object: :const:`ELEMENT_NODE`, :const:" -"`ATTRIBUTE_NODE`, :const:`TEXT_NODE`, :const:`CDATA_SECTION_NODE`, :const:" -"`ENTITY_NODE`, :const:`PROCESSING_INSTRUCTION_NODE`, :const:`COMMENT_NODE`, :" -"const:`DOCUMENT_NODE`, :const:`DOCUMENT_TYPE_NODE`, :const:`NOTATION_NODE`. " -"This is a read-only attribute." +"on the :class:`Node` object. This is a read-only attribute." +msgstr "" + +#: ../../../library/xml.dom.rst:283 +msgid "" +"Integer constants for the possible values of the :attr:`~Node.nodeType` " +"attribute." msgstr "" -#: ../../../library/xml.dom.rst:251 +#: ../../../library/xml.dom.rst:289 msgid "" "The parent of the current node, or ``None`` for the document node. The value " "is always a :class:`Node` object or ``None``. For :class:`Element` nodes, " @@ -418,14 +469,14 @@ msgid "" "always ``None``. This is a read-only attribute." msgstr "" -#: ../../../library/xml.dom.rst:260 +#: ../../../library/xml.dom.rst:298 msgid "" "A :class:`NamedNodeMap` of attribute objects. Only elements have actual " "values for this; others provide ``None`` for this attribute. This is a read-" "only attribute." msgstr "" -#: ../../../library/xml.dom.rst:267 +#: ../../../library/xml.dom.rst:305 msgid "" "The node that immediately precedes this one with the same parent. For " "instance the element with an end-tag that comes just before the *self* " @@ -435,81 +486,203 @@ msgid "" "``None``. This is a read-only attribute." msgstr "" -#: ../../../library/xml.dom.rst:277 +#: ../../../library/xml.dom.rst:315 msgid "" "The node that immediately follows this one with the same parent. See also :" "attr:`previousSibling`. If this is the last child of the parent, this " "attribute will be ``None``. This is a read-only attribute." msgstr "" -#: ../../../library/xml.dom.rst:284 +#: ../../../library/xml.dom.rst:322 msgid "" -"A list of nodes contained within this node. This is a read-only attribute." +"A :class:`NodeList` of the children of this node. If the node has no " +"children, the list is empty. This is a read-only attribute." msgstr "" -#: ../../../library/xml.dom.rst:289 +#: ../../../library/xml.dom.rst:329 msgid "" "The first child of the node, if there are any, or ``None``. This is a read-" "only attribute." msgstr "" -#: ../../../library/xml.dom.rst:295 +#: ../../../library/xml.dom.rst:335 msgid "" "The last child of the node, if there are any, or ``None``. This is a read-" "only attribute." msgstr "" -#: ../../../library/xml.dom.rst:301 +#: ../../../library/xml.dom.rst:341 msgid "" -"The part of the :attr:`tagName` following the colon if there is one, else " -"the entire :attr:`tagName`. The value is a string." +"The part of the :attr:`~Element.tagName` following the colon if there is " +"one, else the entire :attr:`~Element.tagName`. The value is a string." msgstr "" -#: ../../../library/xml.dom.rst:307 +#: ../../../library/xml.dom.rst:347 msgid "" -"The part of the :attr:`tagName` preceding the colon if there is one, else " -"the empty string. The value is a string, or ``None``." +"The part of the :attr:`~Element.tagName` preceding the colon if there is " +"one, else the empty string. The value is a string, or ``None``." msgstr "" -#: ../../../library/xml.dom.rst:313 +#: ../../../library/xml.dom.rst:353 msgid "" "The namespace associated with the element name. This will be a string or " "``None``. This is a read-only attribute." msgstr "" -#: ../../../library/xml.dom.rst:319 +#: ../../../library/xml.dom.rst:359 +msgid "" +"The :class:`Document` object to which this node belongs, or ``None`` for a " +"document itself. This is a read-only attribute." +msgstr "" + +#: ../../../library/xml.dom.rst:366 msgid "" -"This has a different meaning for each node type; see the DOM specification " -"for details. You can always get the information you would get here from " -"another property such as the :attr:`tagName` property for elements or the :" -"attr:`name` property for attributes. For all node types, the value of this " -"attribute will be either a string or ``None``. This is a read-only " -"attribute." +"Return whether the DOM implementation supports a particular *feature*, as :" +"meth:`DOMImplementation.hasFeature` does." msgstr "" -#: ../../../library/xml.dom.rst:328 +#: ../../../library/xml.dom.rst:372 msgid "" -"This has a different meaning for each node type; see the DOM specification " -"for details. The situation is similar to that with :attr:`nodeName`. The " +"Associate *data* with *key* on this node and return the data previously " +"associated with *key*, or ``None``. If *data* is ``None``, the association " +"is removed. *handler* is called when the node is cloned, imported, renamed " +"or deleted; pass ``None`` if no notification is needed." +msgstr "" + +#: ../../../library/xml.dom.rst:381 +msgid "" +"Return the data associated with *key* on this node by :meth:`~Node." +"setUserData`, or ``None``." +msgstr "" + +#: ../../../library/xml.dom.rst:387 +msgid "" +"The name of this node, depending on its type; see the table below. You can " +"always get the information you would get here from another property such as " +"the :attr:`~Element.tagName` property for elements or the :attr:`~Attr.name` " +"property for attributes. This is a read-only attribute." +msgstr "" + +#: ../../../library/xml.dom.rst:396 +msgid "" +"The value of this node, depending on its type; see the table below. The " "value is a string or ``None``." msgstr "" -#: ../../../library/xml.dom.rst:335 +#: ../../../library/xml.dom.rst:400 +msgid "" +"The values of :attr:`~Node.nodeName` and :attr:`~Node.nodeValue` for each " +"node type are:" +msgstr "" + +#: ../../../library/xml.dom.rst:404 +msgid "Node type" +msgstr "" + +#: ../../../library/xml.dom.rst:404 +msgid "nodeName" +msgstr "" + +#: ../../../library/xml.dom.rst:404 +msgid "nodeValue" +msgstr "" + +#: ../../../library/xml.dom.rst:406 +msgid ":attr:`~Attr.name`" +msgstr "" + +#: ../../../library/xml.dom.rst:406 +msgid ":attr:`~Attr.value`" +msgstr "" + +#: ../../../library/xml.dom.rst:408 +msgid ":class:`CDATASection`" +msgstr "" + +#: ../../../library/xml.dom.rst:408 +msgid "``'#cdata-section'``" +msgstr "" + +#: ../../../library/xml.dom.rst:408 ../../../library/xml.dom.rst:410 +#: ../../../library/xml.dom.rst:426 +msgid "the content" +msgstr "" + +#: ../../../library/xml.dom.rst:410 +msgid "``'#comment'``" +msgstr "" + +#: ../../../library/xml.dom.rst:412 +msgid "``'#document'``" +msgstr "" + +#: ../../../library/xml.dom.rst:412 ../../../library/xml.dom.rst:414 +#: ../../../library/xml.dom.rst:416 ../../../library/xml.dom.rst:418 +#: ../../../library/xml.dom.rst:420 ../../../library/xml.dom.rst:422 +#: ../../../library/xml.dom.rst:1489 +msgid "``None``" +msgstr "" + +#: ../../../library/xml.dom.rst:414 +msgid ":class:`DocumentFragment`" +msgstr "" + +#: ../../../library/xml.dom.rst:414 +msgid "``'#document-fragment'``" +msgstr "" + +#: ../../../library/xml.dom.rst:416 +msgid ":attr:`~DocumentType.name`" +msgstr "" + +#: ../../../library/xml.dom.rst:418 +msgid ":attr:`~Element.tagName`" +msgstr "" + +#: ../../../library/xml.dom.rst:420 +msgid ":class:`Entity`" +msgstr "" + +#: ../../../library/xml.dom.rst:420 +msgid "the name of the entity" +msgstr "" + +#: ../../../library/xml.dom.rst:422 +msgid ":class:`Notation`" +msgstr "" + +#: ../../../library/xml.dom.rst:422 +msgid "the name of the notation" +msgstr "" + +#: ../../../library/xml.dom.rst:424 +msgid ":attr:`~ProcessingInstruction.target`" +msgstr "" + +#: ../../../library/xml.dom.rst:424 +msgid ":attr:`~ProcessingInstruction.data`" +msgstr "" + +#: ../../../library/xml.dom.rst:426 +msgid "``'#text'``" +msgstr "" + +#: ../../../library/xml.dom.rst:431 msgid "Return ``True`` if the node has any attributes." msgstr "" -#: ../../../library/xml.dom.rst:340 +#: ../../../library/xml.dom.rst:436 msgid "Return ``True`` if the node has any child nodes." msgstr "" -#: ../../../library/xml.dom.rst:345 +#: ../../../library/xml.dom.rst:441 msgid "" "Return ``True`` if *other* refers to the same node as this node. This is " "especially useful for DOM implementations which use any sort of proxy " "architecture (because more than one object can refer to the same node)." msgstr "" -#: ../../../library/xml.dom.rst:351 +#: ../../../library/xml.dom.rst:447 msgid "" "This is based on a proposed DOM Level 3 API which is still in the \"working " "draft\" stage, but this particular interface appears uncontroversial. " @@ -517,78 +690,90 @@ msgid "" "DOM interface (though any new W3C API for this would also be supported)." msgstr "" -#: ../../../library/xml.dom.rst:359 +#: ../../../library/xml.dom.rst:455 msgid "" "Add a new child node to this node at the end of the list of children, " "returning *newChild*. If the node was already in the tree, it is removed " "first." msgstr "" -#: ../../../library/xml.dom.rst:366 +#: ../../../library/xml.dom.rst:459 ../../../library/xml.dom.rst:471 +#: ../../../library/xml.dom.rst:489 +msgid "" +"Raise :exc:`WrongDocumentErr` if *newChild* was created by another document, " +"and :exc:`HierarchyRequestErr` if it is this node itself or its ancestor." +msgstr "" + +#: ../../../library/xml.dom.rst:466 msgid "" "Insert a new child node before an existing child. It must be the case that " -"*refChild* is a child of this node; if not, :exc:`ValueError` is raised. " +"*refChild* is a child of this node; if not, :exc:`NotFoundErr` is raised. " "*newChild* is returned. If *refChild* is ``None``, it inserts *newChild* at " "the end of the children's list." msgstr "" -#: ../../../library/xml.dom.rst:374 +#: ../../../library/xml.dom.rst:478 msgid "" "Remove a child node. *oldChild* must be a child of this node; if not, :exc:" -"`ValueError` is raised. *oldChild* is returned on success. If *oldChild* " -"will not be used further, its :meth:`unlink` method should be called." +"`NotFoundErr` is raised. *oldChild* is returned on success. If *oldChild* " +"will not be used further, its :meth:`~xml.dom.minidom.Node.unlink` method " +"should be called." msgstr "" -#: ../../../library/xml.dom.rst:381 +#: ../../../library/xml.dom.rst:486 msgid "" "Replace an existing node with a new node. It must be the case that " -"*oldChild* is a child of this node; if not, :exc:`ValueError` is raised." +"*oldChild* is a child of this node; if not, :exc:`NotFoundErr` is raised." msgstr "" -#: ../../../library/xml.dom.rst:387 +#: ../../../library/xml.dom.rst:496 msgid "" "Join adjacent text nodes so that all stretches of text are stored as single :" "class:`Text` instances. This simplifies processing text from a DOM tree for " "many applications." msgstr "" -#: ../../../library/xml.dom.rst:394 +#: ../../../library/xml.dom.rst:503 msgid "" "Clone this node. Setting *deep* means to clone all child nodes as well. " "This returns the clone." msgstr "" -#: ../../../library/xml.dom.rst:401 +#: ../../../library/xml.dom.rst:510 msgid "NodeList Objects" msgstr "" -#: ../../../library/xml.dom.rst:403 +#: ../../../library/xml.dom.rst:515 msgid "" "A :class:`NodeList` represents a sequence of nodes. These objects are used " "in two ways in the DOM Core recommendation: an :class:`Element` object " -"provides one as its list of child nodes, and the :meth:" -"`getElementsByTagName` and :meth:`getElementsByTagNameNS` methods of :class:" -"`Node` return objects with this interface to represent query results." +"provides one as its list of child nodes, and the :meth:`~Element." +"getElementsByTagName` and :meth:`~Element.getElementsByTagNameNS` methods " +"of :class:`Node` return objects with this interface to represent query " +"results." msgstr "" -#: ../../../library/xml.dom.rst:409 +#: ../../../library/xml.dom.rst:521 +msgid ":class:`NodeList` does *not* inherit from :class:`Node`." +msgstr "" + +#: ../../../library/xml.dom.rst:523 msgid "" "The DOM Level 2 recommendation defines one method and one attribute for " "these objects:" msgstr "" -#: ../../../library/xml.dom.rst:415 +#: ../../../library/xml.dom.rst:529 msgid "" -"Return the *i*'th item from the sequence, if there is one, or ``None``. The " -"index *i* is not allowed to be less than zero or greater than or equal to " -"the length of the sequence." +"Return the *i*'th item from the sequence, or ``None`` if *i* is out of " +"range. Negative indices are not supported." msgstr "" -#: ../../../library/xml.dom.rst:422 +#: ../../../library/xml.dom.rst:536 msgid "The number of nodes in the sequence." msgstr "" -#: ../../../library/xml.dom.rst:424 +#: ../../../library/xml.dom.rst:538 msgid "" "In addition, the Python DOM interface requires that some additional support " "is provided to allow :class:`NodeList` objects to be used as Python " @@ -598,355 +783,584 @@ msgid "" "support for the :func:`len` built-in function." msgstr "" -#: ../../../library/xml.dom.rst:432 +#: ../../../library/xml.dom.rst:546 msgid "" "If a DOM implementation supports modification of the document, the :class:" "`NodeList` implementation must also support the :meth:`~object.__setitem__` " "and :meth:`~object.__delitem__` methods." msgstr "" -#: ../../../library/xml.dom.rst:440 +#: ../../../library/xml.dom.rst:554 msgid "DocumentType Objects" msgstr "" -#: ../../../library/xml.dom.rst:442 +#: ../../../library/xml.dom.rst:559 msgid "" "Information about the notations and entities declared by a document " "(including the external subset if the parser uses it and can provide the " "information) is available from a :class:`DocumentType` object. The :class:" "`DocumentType` for a document is available from the :class:`Document` " -"object's :attr:`doctype` attribute; if there is no ``DOCTYPE`` declaration " -"for the document, the document's :attr:`doctype` attribute will be set to " -"``None`` instead of an instance of this interface." +"object's :attr:`~Document.doctype` attribute; if there is no ``DOCTYPE`` " +"declaration for the document, the document's :attr:`~Document.doctype` " +"attribute will be set to ``None`` instead of an instance of this interface." msgstr "" -#: ../../../library/xml.dom.rst:450 +#: ../../../library/xml.dom.rst:567 msgid "" ":class:`DocumentType` is a specialization of :class:`Node`, and adds the " "following attributes:" msgstr "" -#: ../../../library/xml.dom.rst:456 +#: ../../../library/xml.dom.rst:573 msgid "" "The public identifier for the external subset of the document type " -"definition. This will be a string or ``None``." +"definition, or ``None`` if the ``DOCTYPE`` declaration does not specify it." msgstr "" -#: ../../../library/xml.dom.rst:462 +#: ../../../library/xml.dom.rst:579 msgid "" -"The system identifier for the external subset of the document type " -"definition. This will be a URI as a string, or ``None``." +"The system identifier, a URI, for the external subset of the document type " +"definition, or ``None`` if the ``DOCTYPE`` declaration does not specify it." msgstr "" -#: ../../../library/xml.dom.rst:468 +#: ../../../library/xml.dom.rst:585 msgid "" "A string giving the complete internal subset from the document. This does " "not include the brackets which enclose the subset. If the document has no " "internal subset, this should be ``None``." msgstr "" -#: ../../../library/xml.dom.rst:475 +#: ../../../library/xml.dom.rst:592 msgid "" "The name of the root element as given in the ``DOCTYPE`` declaration, if " "present." msgstr "" -#: ../../../library/xml.dom.rst:481 +#: ../../../library/xml.dom.rst:598 msgid "" -"This is a :class:`NamedNodeMap` giving the definitions of external entities. " -"For entity names defined more than once, only the first definition is " -"provided (others are ignored as required by the XML recommendation). This " -"may be ``None`` if the information is not provided by the parser, or if no " -"entities are defined." +"This is a :class:`NamedNodeMap` of :class:`Entity` nodes giving the " +"definitions of external entities. For entity names defined more than once, " +"only the first definition is provided (others are ignored as required by the " +"XML recommendation). This may be ``None`` if the information is not " +"provided by the parser, or if no entities are defined." msgstr "" -#: ../../../library/xml.dom.rst:490 +#: ../../../library/xml.dom.rst:608 msgid "" -"This is a :class:`NamedNodeMap` giving the definitions of notations. For " -"notation names defined more than once, only the first definition is provided " -"(others are ignored as required by the XML recommendation). This may be " -"``None`` if the information is not provided by the parser, or if no " -"notations are defined." +"This is a :class:`NamedNodeMap` of :class:`Notation` nodes giving the " +"definitions of notations. For notation names defined more than once, only " +"the first definition is provided (others are ignored as required by the XML " +"recommendation). This may be ``None`` if the information is not provided by " +"the parser, or if no notations are defined." msgstr "" -#: ../../../library/xml.dom.rst:500 +#: ../../../library/xml.dom.rst:619 msgid "Document Objects" msgstr "" -#: ../../../library/xml.dom.rst:502 +#: ../../../library/xml.dom.rst:624 msgid "" "A :class:`Document` represents an entire XML document, including its " "constituent elements, attributes, processing instructions, comments etc. " "Remember that it inherits properties from :class:`Node`." msgstr "" -#: ../../../library/xml.dom.rst:509 +#: ../../../library/xml.dom.rst:631 msgid "The one and only root element of the document." msgstr "" -#: ../../../library/xml.dom.rst:514 +#: ../../../library/xml.dom.rst:636 +msgid "" +"The :class:`DocumentType` node of the document, or ``None``. This is a read-" +"only attribute." +msgstr "" + +#: ../../../library/xml.dom.rst:642 +msgid "" +"The :class:`DOMImplementation` object which created this document. This is a " +"read-only attribute." +msgstr "" + +#: ../../../library/xml.dom.rst:648 +msgid "Whether error checking is enforced." +msgstr "" + +#: ../../../library/xml.dom.rst:653 +msgid "The location of the document, or ``None`` if it is unknown." +msgstr "" + +#: ../../../library/xml.dom.rst:658 +msgid "Create and return an empty :class:`DocumentFragment` node." +msgstr "" + +#: ../../../library/xml.dom.rst:663 +msgid "Create and return a :class:`CDATASection` node containing *data*." +msgstr "" + +#: ../../../library/xml.dom.rst:668 +msgid "" +"Return a copy of *importedNode* which belongs to this document. The original " +"node is not removed from its document. If *deep* is true, the descendants of " +"the node are copied too." +msgstr "" + +#: ../../../library/xml.dom.rst:675 msgid "" "Create and return a new element node. The element is not inserted into the " "document when it is created. You need to explicitly insert it with one of " -"the other methods such as :meth:`insertBefore` or :meth:`appendChild`." +"the other methods such as :meth:`~Node.insertBefore` or :meth:`~Node." +"appendChild`." msgstr "" -#: ../../../library/xml.dom.rst:521 +#: ../../../library/xml.dom.rst:684 msgid "" "Create and return a new element with a namespace. The *tagName* may have a " "prefix. The element is not inserted into the document when it is created. " "You need to explicitly insert it with one of the other methods such as :meth:" -"`insertBefore` or :meth:`appendChild`." +"`~Node.insertBefore` or :meth:`~Node.appendChild`." msgstr "" -#: ../../../library/xml.dom.rst:529 +#: ../../../library/xml.dom.rst:694 msgid "" "Create and return a text node containing the data passed as a parameter. As " "with the other creation methods, this one does not insert the node into the " "tree." msgstr "" -#: ../../../library/xml.dom.rst:536 +#: ../../../library/xml.dom.rst:701 +msgid "" +"Create and return a new entity reference node. The node is not inserted into " +"the document when it is created." +msgstr "" + +#: ../../../library/xml.dom.rst:711 msgid "" "Create and return a comment node containing the data passed as a parameter. " "As with the other creation methods, this one does not insert the node into " "the tree." msgstr "" -#: ../../../library/xml.dom.rst:543 +#: ../../../library/xml.dom.rst:718 msgid "" "Create and return a processing instruction node containing the *target* and " "*data* passed as parameters. As with the other creation methods, this one " "does not insert the node into the tree." msgstr "" -#: ../../../library/xml.dom.rst:550 +#: ../../../library/xml.dom.rst:727 msgid "" "Create and return an attribute node. This method does not associate the " -"attribute node with any particular element. You must use :meth:" -"`setAttributeNode` on the appropriate :class:`Element` object to use the " +"attribute node with any particular element. You must use :meth:`~Element." +"setAttributeNode` on the appropriate :class:`Element` object to use the " "newly created attribute instance." msgstr "" -#: ../../../library/xml.dom.rst:558 +#: ../../../library/xml.dom.rst:737 msgid "" "Create and return an attribute node with a namespace. The *tagName* may " "have a prefix. This method does not associate the attribute node with any " -"particular element. You must use :meth:`setAttributeNode` on the " +"particular element. You must use :meth:`~Element.setAttributeNode` on the " "appropriate :class:`Element` object to use the newly created attribute " "instance." msgstr "" -#: ../../../library/xml.dom.rst:566 +#: ../../../library/xml.dom.rst:747 +msgid "" +"Return the element with the given ID, or ``None``. Only attributes declared " +"as being of type ID in the DTD or by :meth:`Element.setIdAttribute` are " +"searched." +msgstr "" + +#: ../../../library/xml.dom.rst:754 msgid "" "Search for all descendants (direct children, children's children, etc.) with " "a particular element type name." msgstr "" -#: ../../../library/xml.dom.rst:572 +#: ../../../library/xml.dom.rst:760 msgid "" "Search for all descendants (direct children, children's children, etc.) with " "a particular namespace URI and localname. The localname is the part of the " "namespace after the prefix." msgstr "" -#: ../../../library/xml.dom.rst:580 +#: ../../../library/xml.dom.rst:767 +msgid "" +"Rename the element or attribute node *n* and return it. *namespaceURI* is " +"the new namespace URI, or :data:`~xml.dom.EMPTY_NAMESPACE` if the node does " +"not belong to a namespace. *name* is the new qualified name." +msgstr "" + +#: ../../../library/xml.dom.rst:773 +msgid "" +"Raise :exc:`WrongDocumentErr` if *n* was created by another document, and :" +"exc:`NotSupportedErr` if it is neither an element nor an attribute." +msgstr "" + +#: ../../../library/xml.dom.rst:780 msgid "Element Objects" msgstr "" -#: ../../../library/xml.dom.rst:582 +#: ../../../library/xml.dom.rst:785 msgid "" ":class:`Element` is a subclass of :class:`Node`, so inherits all the " "attributes of that class." msgstr "" -#: ../../../library/xml.dom.rst:588 +#: ../../../library/xml.dom.rst:791 msgid "" "The element type name. In a namespace-using document it may have colons in " "it. The value is a string." msgstr "" -#: ../../../library/xml.dom.rst:594 ../../../library/xml.dom.rst:599 +#: ../../../library/xml.dom.rst:797 +msgid "" +"Declare that the attribute *name* is of type ID, so that the element is " +"found by :meth:`Document.getElementById`. Raise :exc:`NotFoundErr` if the " +"element has no such attribute." +msgstr "" + +#: ../../../library/xml.dom.rst:804 +msgid "" +"The same as :meth:`~Element.setIdAttribute`, but for an attribute specified " +"by its namespace URI and local name." +msgstr "" + +#: ../../../library/xml.dom.rst:810 +msgid "" +"The same as :meth:`~Element.setIdAttribute`, but for an already retrieved " +"attribute node." +msgstr "" + +#: ../../../library/xml.dom.rst:816 ../../../library/xml.dom.rst:821 msgid "Same as equivalent method in the :class:`Document` class." msgstr "" -#: ../../../library/xml.dom.rst:604 +#: ../../../library/xml.dom.rst:826 msgid "Return ``True`` if the element has an attribute named by *name*." msgstr "" -#: ../../../library/xml.dom.rst:609 +#: ../../../library/xml.dom.rst:831 msgid "" "Return ``True`` if the element has an attribute named by *namespaceURI* and " "*localName*." msgstr "" -#: ../../../library/xml.dom.rst:615 +#: ../../../library/xml.dom.rst:837 msgid "" "Return the value of the attribute named by *name* as a string. If no such " "attribute exists, an empty string is returned, as if the attribute had no " "value." msgstr "" -#: ../../../library/xml.dom.rst:621 +#: ../../../library/xml.dom.rst:843 msgid "Return the :class:`Attr` node for the attribute named by *attrname*." msgstr "" -#: ../../../library/xml.dom.rst:626 +#: ../../../library/xml.dom.rst:848 msgid "" "Return the value of the attribute named by *namespaceURI* and *localName* as " "a string. If no such attribute exists, an empty string is returned, as if " "the attribute had no value." msgstr "" -#: ../../../library/xml.dom.rst:633 +#: ../../../library/xml.dom.rst:855 msgid "" "Return an attribute value as a node, given a *namespaceURI* and *localName*." msgstr "" -#: ../../../library/xml.dom.rst:638 -msgid "" -"Remove an attribute by name. If there is no matching attribute, a :exc:" -"`NotFoundErr` is raised." +#: ../../../library/xml.dom.rst:860 +msgid "Remove an attribute by name." msgstr "" -#: ../../../library/xml.dom.rst:644 +#: ../../../library/xml.dom.rst:865 msgid "" "Remove and return *oldAttr* from the attribute list, if present. If " "*oldAttr* is not present, :exc:`NotFoundErr` is raised." msgstr "" -#: ../../../library/xml.dom.rst:650 +#: ../../../library/xml.dom.rst:871 msgid "" -"Remove an attribute by name. Note that it uses a localName, not a qname. " -"No exception is raised if there is no matching attribute." +"Remove an attribute by name. Note that it uses a localName, not a qname." msgstr "" -#: ../../../library/xml.dom.rst:656 +#: ../../../library/xml.dom.rst:876 msgid "Set an attribute value from a string." msgstr "" -#: ../../../library/xml.dom.rst:661 +#: ../../../library/xml.dom.rst:883 msgid "" "Add a new attribute node to the element, replacing an existing attribute if " -"necessary if the :attr:`name` attribute matches. If a replacement occurs, " -"the old attribute node will be returned. If *newAttr* is already in use, :" -"exc:`InuseAttributeErr` will be raised." +"necessary if the :attr:`~Attr.name` attribute matches. If a replacement " +"occurs, the old attribute node will be returned. If *newAttr* is already in " +"use, :exc:`InuseAttributeErr` will be raised." +msgstr "" + +#: ../../../library/xml.dom.rst:888 ../../../library/xml.dom.rst:899 +msgid "" +"Raise :exc:`WrongDocumentErr` if *newAttr* was created by another document." msgstr "" -#: ../../../library/xml.dom.rst:669 +#: ../../../library/xml.dom.rst:893 msgid "" "Add a new attribute node to the element, replacing an existing attribute if " -"necessary if the :attr:`namespaceURI` and :attr:`localName` attributes " -"match. If a replacement occurs, the old attribute node will be returned. If " -"*newAttr* is already in use, :exc:`InuseAttributeErr` will be raised." +"necessary if the :attr:`~Node.namespaceURI` and :attr:`~Attr.localName` " +"attributes match. If a replacement occurs, the old attribute node will be " +"returned. If *newAttr* is already in use, :exc:`InuseAttributeErr` will be " +"raised." msgstr "" -#: ../../../library/xml.dom.rst:677 +#: ../../../library/xml.dom.rst:904 msgid "" "Set an attribute value from a string, given a *namespaceURI* and a *qname*. " "Note that a qname is the whole attribute name. This is different than above." msgstr "" -#: ../../../library/xml.dom.rst:684 +#: ../../../library/xml.dom.rst:913 msgid "Attr Objects" msgstr "" -#: ../../../library/xml.dom.rst:686 +#: ../../../library/xml.dom.rst:918 msgid "" ":class:`Attr` inherits from :class:`Node`, so inherits all its attributes." msgstr "" -#: ../../../library/xml.dom.rst:691 +#: ../../../library/xml.dom.rst:920 +msgid "" +"Attribute nodes are not part of the document tree. They are contained in " +"the :attr:`~Node.attributes` map of an element, not in its children, and " +"their :attr:`~Node.parentNode`, :attr:`~Node.previousSibling` and :attr:" +"`~Node.nextSibling` are always ``None``." +msgstr "" + +#: ../../../library/xml.dom.rst:929 msgid "" "The attribute name. In a namespace-using document it may include a colon." msgstr "" -#: ../../../library/xml.dom.rst:697 +#: ../../../library/xml.dom.rst:935 msgid "" "The part of the name following the colon if there is one, else the entire " "name. This is a read-only attribute." msgstr "" -#: ../../../library/xml.dom.rst:704 +#: ../../../library/xml.dom.rst:942 msgid "" "The part of the name preceding the colon if there is one, else the empty " "string." msgstr "" -#: ../../../library/xml.dom.rst:710 +#: ../../../library/xml.dom.rst:948 +msgid "" +"Whether this attribute is of type ID, either because it is declared as such " +"in the DTD or because :meth:`Element.setIdAttribute` was used. This is a " +"read-only attribute." +msgstr "" + +#: ../../../library/xml.dom.rst:956 msgid "" -"The text value of the attribute. This is a synonym for the :attr:" -"`nodeValue` attribute." +"The :class:`Element` node to which this attribute belongs, or ``None`` if it " +"is not used. This is a read-only attribute." msgstr "" -#: ../../../library/xml.dom.rst:717 +#: ../../../library/xml.dom.rst:963 +msgid "" +"Whether the value of the attribute was explicitly set in the document, as " +"opposed to being defaulted from the DTD. This is a read-only attribute." +msgstr "" + +#: ../../../library/xml.dom.rst:970 +msgid "" +"The text value of the attribute. This is a synonym for the :attr:`~Node." +"nodeValue` attribute." +msgstr "" + +#: ../../../library/xml.dom.rst:977 msgid "NamedNodeMap Objects" msgstr "" -#: ../../../library/xml.dom.rst:719 +#: ../../../library/xml.dom.rst:982 msgid ":class:`NamedNodeMap` does *not* inherit from :class:`Node`." msgstr "" -#: ../../../library/xml.dom.rst:724 +#: ../../../library/xml.dom.rst:987 msgid "The length of the attribute list." msgstr "" -#: ../../../library/xml.dom.rst:729 +#: ../../../library/xml.dom.rst:992 msgid "" "Return an attribute with a particular index. The order you get the " "attributes in is arbitrary but will be consistent for the life of a DOM. " -"Each item is an attribute node. Get its value with the :attr:`value` " +"Each item is an attribute node. Get its value with the :attr:`~Attr.value` " "attribute." msgstr "" -#: ../../../library/xml.dom.rst:733 +#: ../../../library/xml.dom.rst:999 +msgid "" +"Return the node with the given :attr:`~Attr.name`, or ``None`` if there is " +"no such node." +msgstr "" + +#: ../../../library/xml.dom.rst:1005 +msgid "" +"Return the node with the given namespace URI and local name, or ``None`` if " +"there is no such node." +msgstr "" + +#: ../../../library/xml.dom.rst:1011 +msgid "" +"Add *node* to the map, using its :attr:`~Attr.name` as the key. Return the " +"node which it replaces, or ``None`` if it replaces no node." +msgstr "" + +#: ../../../library/xml.dom.rst:1014 ../../../library/xml.dom.rst:1024 +msgid "" +"Raise :exc:`WrongDocumentErr` if *node* was created by another document, " +"and :exc:`InuseAttributeErr` if it belongs to another element." +msgstr "" + +#: ../../../library/xml.dom.rst:1020 +msgid "" +"Add *node* to the map, using its namespace URI and local name as the key. " +"Return the node which it replaces, or ``None`` if it replaces no node." +msgstr "" + +#: ../../../library/xml.dom.rst:1030 +msgid "" +"Remove and return the node with the given :attr:`~Attr.name`. Raise :exc:" +"`NotFoundErr` if there is no such node." +msgstr "" + +#: ../../../library/xml.dom.rst:1036 msgid "" -"There are also experimental methods that give this class more mapping " -"behavior. You can use them or you can use the standardized :meth:`!" -"getAttribute\\*` family of methods on the :class:`Element` objects." +"Remove and return the node with the given namespace URI and local name. " +"Raise :exc:`NotFoundErr` if there is no such node." msgstr "" -#: ../../../library/xml.dom.rst:741 +#: ../../../library/xml.dom.rst:1039 +msgid "" +"You can also use the standardized :meth:`!getAttribute\\*` family of methods " +"on the :class:`Element` objects." +msgstr "" + +#: ../../../library/xml.dom.rst:1046 +msgid "DocumentFragment Objects" +msgstr "" + +#: ../../../library/xml.dom.rst:1051 +msgid "" +":class:`DocumentFragment` is a lightweight container of nodes. It is a " +"subclass of :class:`Node`. When it is inserted into the document tree, its " +"children are inserted instead of it, and it becomes empty." +msgstr "" + +#: ../../../library/xml.dom.rst:1061 +msgid "CharacterData Objects" +msgstr "" + +#: ../../../library/xml.dom.rst:1066 +msgid "" +":class:`CharacterData` represents text-like data in the XML document. It is " +"a subclass of :class:`Node`, and the base class of :class:`Text`, :class:" +"`CDATASection` and :class:`Comment`. Such nodes cannot have child nodes." +msgstr "" + +#: ../../../library/xml.dom.rst:1074 +msgid "The content of the node as a string." +msgstr "" + +#: ../../../library/xml.dom.rst:1079 +msgid "" +"The number of characters in :attr:`~CharacterData.data`. This is a read-only " +"attribute." +msgstr "" + +#: ../../../library/xml.dom.rst:1085 +msgid "" +"Return the substring of :attr:`~CharacterData.data` of *count* characters " +"starting at *offset*." +msgstr "" + +#: ../../../library/xml.dom.rst:1091 +msgid "Append the string *arg* to :attr:`~CharacterData.data`." +msgstr "" + +#: ../../../library/xml.dom.rst:1096 +msgid "Insert the string *arg* into :attr:`~CharacterData.data` at *offset*." +msgstr "" + +#: ../../../library/xml.dom.rst:1101 +msgid "" +"Remove *count* characters from :attr:`~CharacterData.data` starting at " +"*offset*." +msgstr "" + +#: ../../../library/xml.dom.rst:1107 +msgid "" +"Replace *count* characters of :attr:`~CharacterData.data` starting at " +"*offset* with the string *arg*." +msgstr "" + +#: ../../../library/xml.dom.rst:1114 msgid "Comment Objects" msgstr "" -#: ../../../library/xml.dom.rst:743 +#: ../../../library/xml.dom.rst:1119 msgid "" -":class:`Comment` represents a comment in the XML document. It is a subclass " -"of :class:`Node`, but cannot have child nodes." +":class:`Comment` represents a comment in the XML document. It is a subclass " +"of :class:`CharacterData`." msgstr "" -#: ../../../library/xml.dom.rst:749 +#: ../../../library/xml.dom.rst:1125 msgid "" "The content of the comment as a string. The attribute contains all " "characters between the leading ````, " "but does not include them." msgstr "" -#: ../../../library/xml.dom.rst:757 +#: ../../../library/xml.dom.rst:1133 msgid "Text and CDATASection Objects" msgstr "" -#: ../../../library/xml.dom.rst:759 +#: ../../../library/xml.dom.rst:1141 msgid "" "The :class:`Text` interface represents text in the XML document. If the " "parser and DOM implementation support the DOM's XML extension, portions of " "the text enclosed in CDATA marked sections are stored in :class:" "`CDATASection` objects. These two interfaces are identical, but provide " -"different values for the :attr:`nodeType` attribute." +"different values for the :attr:`~Node.nodeType` attribute." msgstr "" -#: ../../../library/xml.dom.rst:765 +#: ../../../library/xml.dom.rst:1147 msgid "" -"These interfaces extend the :class:`Node` interface. They cannot have child " -"nodes." +":class:`Text` extends the :class:`CharacterData` interface, and :class:" +"`CDATASection` extends :class:`Text`." msgstr "" -#: ../../../library/xml.dom.rst:771 +#: ../../../library/xml.dom.rst:1153 msgid "The content of the text node as a string." msgstr "" -#: ../../../library/xml.dom.rst:775 +#: ../../../library/xml.dom.rst:1158 +msgid "" +"The text of all :class:`Text` nodes logically adjacent to this node, " +"concatenated in document order. This is a read-only attribute." +msgstr "" + +#: ../../../library/xml.dom.rst:1165 +msgid "" +"Replace the text of all :class:`Text` nodes logically adjacent to this node " +"with *content*, removing the other nodes. Return this node, or ``None`` if " +"*content* is empty." +msgstr "" + +#: ../../../library/xml.dom.rst:1172 +msgid "" +"Split this node into two nodes at *offset*, keeping the first part in this " +"node and returning a new sibling node with the rest." +msgstr "" + +#: ../../../library/xml.dom.rst:1178 msgid "" "The use of a :class:`CDATASection` node does not indicate that the node " "represents a complete CDATA marked section, only that the content of the " @@ -956,33 +1370,105 @@ msgid "" "marked sections." msgstr "" -#: ../../../library/xml.dom.rst:785 +#: ../../../library/xml.dom.rst:1188 msgid "ProcessingInstruction Objects" msgstr "" -#: ../../../library/xml.dom.rst:787 +#: ../../../library/xml.dom.rst:1193 msgid "" "Represents a processing instruction in the XML document; this inherits from " "the :class:`Node` interface and cannot have child nodes." msgstr "" -#: ../../../library/xml.dom.rst:793 +#: ../../../library/xml.dom.rst:1199 msgid "" "The content of the processing instruction up to the first whitespace " "character. This is a read-only attribute." msgstr "" -#: ../../../library/xml.dom.rst:799 +#: ../../../library/xml.dom.rst:1205 msgid "" "The content of the processing instruction following the first whitespace " "character." msgstr "" -#: ../../../library/xml.dom.rst:806 +#: ../../../library/xml.dom.rst:1212 +msgid "Entity Objects" +msgstr "" + +#: ../../../library/xml.dom.rst:1217 +msgid "" +":class:`Entity` represents a parsed or unparsed entity declared in the DTD. " +"It is a subclass of :class:`Node`. Entity nodes are contained in :attr:" +"`DocumentType.entities` and cannot be inserted into the document tree. The " +"name of the entity is its :attr:`~Node.nodeName`." +msgstr "" + +#: ../../../library/xml.dom.rst:1226 +msgid "" +"The public identifier of the entity, or ``None`` if it is not specified. " +"This is a read-only attribute." +msgstr "" + +#: ../../../library/xml.dom.rst:1233 +msgid "" +"The system identifier of the entity, or ``None`` if it is not specified. " +"This is a read-only attribute." +msgstr "" + +#: ../../../library/xml.dom.rst:1240 +msgid "" +"The name of the notation for an unparsed entity, or ``None`` for a parsed " +"entity. This is a read-only attribute." +msgstr "" + +#: ../../../library/xml.dom.rst:1248 +msgid "Notation Objects" +msgstr "" + +#: ../../../library/xml.dom.rst:1253 +msgid "" +":class:`Notation` represents a notation declared in the DTD. It is a " +"subclass of :class:`Node` and cannot have child nodes. Notation nodes are " +"contained in :attr:`DocumentType.notations` and cannot be inserted into the " +"document tree. The name of the notation is its :attr:`~Node.nodeName`." +msgstr "" + +#: ../../../library/xml.dom.rst:1262 +msgid "" +"The public identifier of the notation, or ``None`` if it is not specified. " +"This is a read-only attribute." +msgstr "" + +#: ../../../library/xml.dom.rst:1269 +msgid "" +"The system identifier of the notation, or ``None`` if it is not specified. " +"This is a read-only attribute." +msgstr "" + +#: ../../../library/xml.dom.rst:1275 +msgid "EntityReference Objects" +msgstr "" + +#: ../../../library/xml.dom.rst:1280 +msgid "" +":class:`EntityReference` represents an entity reference in the XML document. " +"It is a subclass of :class:`Node`. The name of the referenced entity is its :" +"attr:`~Node.nodeName`. Its children are the replacement text of the entity, " +"and are read-only." +msgstr "" + +#: ../../../library/xml.dom.rst:1285 +msgid "" +"Parsers may expand entity references, so such a node only occurs in a " +"document if it was created explicitly." +msgstr "" + +#: ../../../library/xml.dom.rst:1294 msgid "Exceptions" msgstr "" -#: ../../../library/xml.dom.rst:808 +#: ../../../library/xml.dom.rst:1296 msgid "" "The DOM Level 2 recommendation defines a single exception, :exc:" "`DOMException`, and a number of constants that allow applications to " @@ -991,7 +1477,7 @@ msgid "" "specific exception." msgstr "" -#: ../../../library/xml.dom.rst:813 +#: ../../../library/xml.dom.rst:1301 msgid "" "The Python DOM interface provides the constants, but also expands the set of " "exceptions so that a specific exception exists for each of the exception " @@ -1000,44 +1486,44 @@ msgid "" "attr:`code` attribute." msgstr "" -#: ../../../library/xml.dom.rst:822 +#: ../../../library/xml.dom.rst:1310 msgid "" "Base exception class used for all specific DOM exceptions. This exception " "class cannot be directly instantiated." msgstr "" -#: ../../../library/xml.dom.rst:828 +#: ../../../library/xml.dom.rst:1316 msgid "" "Raised when a specified range of text does not fit into a string. This is " "not known to be used in the Python DOM implementations, but may be received " "from DOM implementations not written in Python." msgstr "" -#: ../../../library/xml.dom.rst:835 +#: ../../../library/xml.dom.rst:1323 msgid "" "Raised when an attempt is made to insert a node where the node type is not " "allowed." msgstr "" -#: ../../../library/xml.dom.rst:841 +#: ../../../library/xml.dom.rst:1329 msgid "" "Raised when an index or size parameter to a method is negative or exceeds " "the allowed values." msgstr "" -#: ../../../library/xml.dom.rst:847 +#: ../../../library/xml.dom.rst:1335 msgid "" "Raised when an attempt is made to insert an :class:`Attr` node that is " "already present elsewhere in the document." msgstr "" -#: ../../../library/xml.dom.rst:853 +#: ../../../library/xml.dom.rst:1341 msgid "" "Raised if a parameter or an operation is not supported on the underlying " "object." msgstr "" -#: ../../../library/xml.dom.rst:858 +#: ../../../library/xml.dom.rst:1346 msgid "" "This exception is raised when a string parameter contains a character that " "is not permitted in the context it's being used in by the XML 1.0 " @@ -1045,280 +1531,228 @@ msgid "" "with a space in the element type name will cause this error to be raised." msgstr "" -#: ../../../library/xml.dom.rst:866 +#: ../../../library/xml.dom.rst:1354 msgid "Raised when an attempt is made to modify the type of a node." msgstr "" -#: ../../../library/xml.dom.rst:871 +#: ../../../library/xml.dom.rst:1359 msgid "" "Raised when an attempt is made to use an object that is not defined or is no " "longer usable." msgstr "" -#: ../../../library/xml.dom.rst:877 +#: ../../../library/xml.dom.rst:1365 msgid "" "If an attempt is made to change any object in a way that is not permitted " "with regard to the `Namespaces in XML `_ recommendation, this exception is raised." msgstr "" -#: ../../../library/xml.dom.rst:884 +#: ../../../library/xml.dom.rst:1372 msgid "" "Exception when a node does not exist in the referenced context. For " "example, :meth:`NamedNodeMap.removeNamedItem` will raise this if the node " "passed in does not exist in the map." msgstr "" -#: ../../../library/xml.dom.rst:891 +#: ../../../library/xml.dom.rst:1379 msgid "" "Raised when the implementation does not support the requested type of object " "or operation." msgstr "" -#: ../../../library/xml.dom.rst:897 +#: ../../../library/xml.dom.rst:1385 msgid "" "This is raised if data is specified for a node which does not support data." msgstr "" -#: ../../../library/xml.dom.rst:904 +#: ../../../library/xml.dom.rst:1392 msgid "" "Raised on attempts to modify an object where modifications are not allowed " "(such as for read-only nodes)." msgstr "" -#: ../../../library/xml.dom.rst:910 +#: ../../../library/xml.dom.rst:1398 msgid "Raised when an invalid or illegal string is specified." msgstr "" -#: ../../../library/xml.dom.rst:917 +#: ../../../library/xml.dom.rst:1405 +msgid "" +"Raised when an operation would make the document invalid with respect to " +"partial validity. This is not known to be used in the Python DOM " +"implementations, but may be received from DOM implementations not written in " +"Python." +msgstr "" + +#: ../../../library/xml.dom.rst:1413 msgid "" "Raised when a node is inserted in a different document than it currently " "belongs to, and the implementation does not support migrating the node from " "one document to the other." msgstr "" -#: ../../../library/xml.dom.rst:921 +#: ../../../library/xml.dom.rst:1418 msgid "" "The exception codes defined in the DOM recommendation map to the exceptions " "described above according to this table:" msgstr "" -#: ../../../library/xml.dom.rst:925 +#: ../../../library/xml.dom.rst:1422 msgid "Constant" msgstr "" -#: ../../../library/xml.dom.rst:925 +#: ../../../library/xml.dom.rst:1422 msgid "Exception" msgstr "" -#: ../../../library/xml.dom.rst:927 -msgid ":const:`DOMSTRING_SIZE_ERR`" -msgstr "" - -#: ../../../library/xml.dom.rst:927 +#: ../../../library/xml.dom.rst:1424 msgid ":exc:`DomstringSizeErr`" msgstr "" -#: ../../../library/xml.dom.rst:929 -msgid ":const:`HIERARCHY_REQUEST_ERR`" -msgstr "" - -#: ../../../library/xml.dom.rst:929 +#: ../../../library/xml.dom.rst:1426 msgid ":exc:`HierarchyRequestErr`" msgstr "" -#: ../../../library/xml.dom.rst:931 -msgid ":const:`INDEX_SIZE_ERR`" -msgstr "" - -#: ../../../library/xml.dom.rst:931 +#: ../../../library/xml.dom.rst:1428 msgid ":exc:`IndexSizeErr`" msgstr "" -#: ../../../library/xml.dom.rst:933 -msgid ":const:`INUSE_ATTRIBUTE_ERR`" -msgstr "" - -#: ../../../library/xml.dom.rst:933 +#: ../../../library/xml.dom.rst:1430 msgid ":exc:`InuseAttributeErr`" msgstr "" -#: ../../../library/xml.dom.rst:935 -msgid ":const:`INVALID_ACCESS_ERR`" -msgstr "" - -#: ../../../library/xml.dom.rst:935 +#: ../../../library/xml.dom.rst:1432 msgid ":exc:`InvalidAccessErr`" msgstr "" -#: ../../../library/xml.dom.rst:937 -msgid ":const:`INVALID_CHARACTER_ERR`" -msgstr "" - -#: ../../../library/xml.dom.rst:937 +#: ../../../library/xml.dom.rst:1434 msgid ":exc:`InvalidCharacterErr`" msgstr "" -#: ../../../library/xml.dom.rst:939 -msgid ":const:`INVALID_MODIFICATION_ERR`" -msgstr "" - -#: ../../../library/xml.dom.rst:939 +#: ../../../library/xml.dom.rst:1436 msgid ":exc:`InvalidModificationErr`" msgstr "" -#: ../../../library/xml.dom.rst:941 -msgid ":const:`INVALID_STATE_ERR`" -msgstr "" - -#: ../../../library/xml.dom.rst:941 +#: ../../../library/xml.dom.rst:1438 msgid ":exc:`InvalidStateErr`" msgstr "" -#: ../../../library/xml.dom.rst:943 -msgid ":const:`NAMESPACE_ERR`" -msgstr "" - -#: ../../../library/xml.dom.rst:943 +#: ../../../library/xml.dom.rst:1440 msgid ":exc:`NamespaceErr`" msgstr "" -#: ../../../library/xml.dom.rst:945 -msgid ":const:`NOT_FOUND_ERR`" -msgstr "" - -#: ../../../library/xml.dom.rst:945 +#: ../../../library/xml.dom.rst:1442 msgid ":exc:`NotFoundErr`" msgstr "" -#: ../../../library/xml.dom.rst:947 -msgid ":const:`NOT_SUPPORTED_ERR`" -msgstr "" - -#: ../../../library/xml.dom.rst:947 +#: ../../../library/xml.dom.rst:1444 msgid ":exc:`NotSupportedErr`" msgstr "" -#: ../../../library/xml.dom.rst:949 -msgid ":const:`NO_DATA_ALLOWED_ERR`" -msgstr "" - -#: ../../../library/xml.dom.rst:949 +#: ../../../library/xml.dom.rst:1446 msgid ":exc:`NoDataAllowedErr`" msgstr "" -#: ../../../library/xml.dom.rst:951 -msgid ":const:`NO_MODIFICATION_ALLOWED_ERR`" -msgstr "" - -#: ../../../library/xml.dom.rst:951 +#: ../../../library/xml.dom.rst:1448 msgid ":exc:`NoModificationAllowedErr`" msgstr "" -#: ../../../library/xml.dom.rst:953 -msgid ":const:`SYNTAX_ERR`" -msgstr "" - -#: ../../../library/xml.dom.rst:953 +#: ../../../library/xml.dom.rst:1450 msgid ":exc:`SyntaxErr`" msgstr "" -#: ../../../library/xml.dom.rst:955 -msgid ":const:`WRONG_DOCUMENT_ERR`" +#: ../../../library/xml.dom.rst:1452 +msgid ":exc:`ValidationErr`" msgstr "" -#: ../../../library/xml.dom.rst:955 +#: ../../../library/xml.dom.rst:1454 msgid ":exc:`WrongDocumentErr`" msgstr "" -#: ../../../library/xml.dom.rst:962 +#: ../../../library/xml.dom.rst:1461 msgid "Conformance" msgstr "" -#: ../../../library/xml.dom.rst:964 +#: ../../../library/xml.dom.rst:1463 msgid "" "This section describes the conformance requirements and relationships " "between the Python DOM API, the W3C DOM recommendations, and the OMG IDL " "mapping for Python." msgstr "" -#: ../../../library/xml.dom.rst:972 +#: ../../../library/xml.dom.rst:1471 msgid "Type Mapping" msgstr "" -#: ../../../library/xml.dom.rst:974 +#: ../../../library/xml.dom.rst:1473 msgid "" "The IDL types used in the DOM specification are mapped to Python types " "according to the following table." msgstr "" -#: ../../../library/xml.dom.rst:978 +#: ../../../library/xml.dom.rst:1477 msgid "IDL Type" msgstr "" -#: ../../../library/xml.dom.rst:978 +#: ../../../library/xml.dom.rst:1477 msgid "Python Type" msgstr "" -#: ../../../library/xml.dom.rst:980 +#: ../../../library/xml.dom.rst:1479 msgid "``boolean``" msgstr "" -#: ../../../library/xml.dom.rst:980 +#: ../../../library/xml.dom.rst:1479 msgid "``bool`` or ``int``" msgstr "" -#: ../../../library/xml.dom.rst:982 ../../../library/xml.dom.rst:984 -#: ../../../library/xml.dom.rst:986 +#: ../../../library/xml.dom.rst:1481 ../../../library/xml.dom.rst:1483 +#: ../../../library/xml.dom.rst:1485 msgid "``int``" msgstr "" -#: ../../../library/xml.dom.rst:984 +#: ../../../library/xml.dom.rst:1483 msgid "``long int``" msgstr "" -#: ../../../library/xml.dom.rst:986 +#: ../../../library/xml.dom.rst:1485 msgid "``unsigned int``" msgstr "" -#: ../../../library/xml.dom.rst:988 +#: ../../../library/xml.dom.rst:1487 msgid "``DOMString``" msgstr "" -#: ../../../library/xml.dom.rst:988 +#: ../../../library/xml.dom.rst:1487 msgid "``str`` or ``bytes``" msgstr "" -#: ../../../library/xml.dom.rst:990 +#: ../../../library/xml.dom.rst:1489 msgid "``null``" msgstr "" -#: ../../../library/xml.dom.rst:990 -msgid "``None``" -msgstr "" - -#: ../../../library/xml.dom.rst:996 +#: ../../../library/xml.dom.rst:1495 msgid "Accessor Methods" msgstr "" -#: ../../../library/xml.dom.rst:998 +#: ../../../library/xml.dom.rst:1497 msgid "" "The mapping from OMG IDL to Python defines accessor functions for IDL " "``attribute`` declarations in much the way the Java mapping does. Mapping " "the IDL declarations ::" msgstr "" -#: ../../../library/xml.dom.rst:1005 +#: ../../../library/xml.dom.rst:1504 msgid "" -"yields three accessor functions: a \"get\" method for :attr:`someValue` (:" -"meth:`_get_someValue`), and \"get\" and \"set\" methods for :attr:" -"`anotherValue` (:meth:`_get_anotherValue` and :meth:`_set_anotherValue`). " +"yields three accessor functions: a \"get\" method for :attr:`!someValue` (:" +"meth:`!_get_someValue`), and \"get\" and \"set\" methods for :attr:`!" +"anotherValue` (:meth:`!_get_anotherValue` and :meth:`!_set_anotherValue`). " "The mapping, in particular, does not require that the IDL attributes are " "accessible as normal Python attributes: ``object.someValue`` is *not* " "required to work, and may raise an :exc:`AttributeError`." msgstr "" -#: ../../../library/xml.dom.rst:1012 +#: ../../../library/xml.dom.rst:1511 msgid "" "The Python DOM API, however, *does* require that normal attribute access " "work. This means that the typical surrogates generated by Python IDL " @@ -1330,7 +1764,7 @@ msgid "" "all DOM implementations." msgstr "" -#: ../../../library/xml.dom.rst:1021 +#: ../../../library/xml.dom.rst:1520 msgid "" "In the Python DOM API, accessor functions are not required. If provided, " "they should take the form defined by the Python IDL mapping, but these " @@ -1339,10 +1773,10 @@ msgid "" "``readonly`` attributes." msgstr "" -#: ../../../library/xml.dom.rst:1026 +#: ../../../library/xml.dom.rst:1525 msgid "" "The IDL definitions do not fully embody the requirements of the W3C DOM API, " "such as the notion of certain objects, such as the return value of :meth:" -"`getElementsByTagName`, being \"live\". The Python DOM API does not require " -"implementations to enforce such requirements." +"`~Element.getElementsByTagName`, being \"live\". The Python DOM API does " +"not require implementations to enforce such requirements." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/xml.dom.pulldom.pot b/main/locale/pot/LC_MESSAGES/library/xml.dom.pulldom.pot index 2f67fae6541..90d8b123fe8 100644 --- a/main/locale/pot/LC_MESSAGES/library/xml.dom.pulldom.pot +++ b/main/locale/pot/LC_MESSAGES/library/xml.dom.pulldom.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-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -25,7 +25,7 @@ msgstr "" msgid "**Source code:** :source:`Lib/xml/dom/pulldom.py`" msgstr "" -#: ../../../library/xml.dom.pulldom.rst:11 +#: ../../../library/xml.dom.pulldom.rst:16 msgid "" "The :mod:`!xml.dom.pulldom` module provides a \"pull parser\" which can also " "be asked to produce DOM-accessible fragments of the document where " @@ -37,66 +37,64 @@ msgid "" "occurs." msgstr "" -#: ../../../library/xml.dom.pulldom.rst:22 +#: ../../../library/xml.dom.pulldom.rst:27 msgid "" "If you need to parse untrusted or unauthenticated data, see :ref:`xml-" "security`." msgstr "" -#: ../../../library/xml.dom.pulldom.rst:27 +#: ../../../library/xml.dom.pulldom.rst:32 msgid "" "The SAX parser no longer processes general external entities by default to " "increase security by default. To enable processing of external entities, " "pass a custom parser instance in::" msgstr "" -#: ../../../library/xml.dom.pulldom.rst:40 +#: ../../../library/xml.dom.pulldom.rst:45 msgid "Example::" msgstr "" -#: ../../../library/xml.dom.pulldom.rst:51 -msgid "``event`` is a constant and can be one of:" -msgstr "" - -#: ../../../library/xml.dom.pulldom.rst:53 -msgid ":data:`START_ELEMENT`" -msgstr "" - -#: ../../../library/xml.dom.pulldom.rst:54 -msgid ":data:`END_ELEMENT`" -msgstr "" - -#: ../../../library/xml.dom.pulldom.rst:55 -msgid ":data:`COMMENT`" +#: ../../../library/xml.dom.pulldom.rst:56 +msgid "" +"``event`` is one of the following constants, and ``node`` is the node which " +"the event is about. The nodes implement the :mod:`xml.dom` interfaces; they " +"are created by the DOM implementation given to :class:`PullDOM`, which is :" +"mod:`xml.dom.minidom` by default." msgstr "" -#: ../../../library/xml.dom.pulldom.rst:56 -msgid ":data:`START_DOCUMENT`" +#: ../../../library/xml.dom.pulldom.rst:66 +msgid "" +"The start and the end of the document. *node* is the :class:`~xml.dom." +"Document`." msgstr "" -#: ../../../library/xml.dom.pulldom.rst:57 -msgid ":data:`END_DOCUMENT`" +#: ../../../library/xml.dom.pulldom.rst:73 +msgid "" +"The start tag and the end tag of an element. *node* is the :class:`~xml.dom." +"Element`." msgstr "" -#: ../../../library/xml.dom.pulldom.rst:58 -msgid ":data:`CHARACTERS`" +#: ../../../library/xml.dom.pulldom.rst:79 +msgid "Character data. *node* is the :class:`~xml.dom.Text` node." msgstr "" -#: ../../../library/xml.dom.pulldom.rst:59 -msgid ":data:`PROCESSING_INSTRUCTION`" +#: ../../../library/xml.dom.pulldom.rst:85 +msgid "" +"White space in element content, as declared in the DTD. *node* is the :class:" +"`~xml.dom.Text` node." msgstr "" -#: ../../../library/xml.dom.pulldom.rst:60 -msgid ":data:`IGNORABLE_WHITESPACE`" +#: ../../../library/xml.dom.pulldom.rst:91 +msgid "A comment. *node* is the :class:`~xml.dom.Comment` node." msgstr "" -#: ../../../library/xml.dom.pulldom.rst:62 +#: ../../../library/xml.dom.pulldom.rst:97 msgid "" -"``node`` is an object of type :class:`xml.dom.minidom.Document`, :class:`xml." -"dom.minidom.Element` or :class:`xml.dom.minidom.Text`." +"A processing instruction. *node* is the :class:`~xml.dom." +"ProcessingInstruction` node." msgstr "" -#: ../../../library/xml.dom.pulldom.rst:65 +#: ../../../library/xml.dom.pulldom.rst:100 msgid "" "Since the document is treated as a \"flat\" stream of events, the document " "\"tree\" is implicitly traversed and the desired elements are found " @@ -108,12 +106,22 @@ msgid "" "`DOMEventStream.expandNode` method and switch to DOM-related processing." msgstr "" -#: ../../../library/xml.dom.pulldom.rst:77 -#: ../../../library/xml.dom.pulldom.rst:82 -msgid "Subclass of :class:`xml.sax.handler.ContentHandler`." +#: ../../../library/xml.dom.pulldom.rst:112 +msgid "" +"Subclass of :class:`xml.sax.handler.ContentHandler` which turns SAX events " +"into the events of the pull parser. The nodes are created, but they are not " +"added to the tree, unless :meth:`~DOMEventStream.expandNode` is called. " +"*documentFactory*, if given, is a DOM implementation used to create the " +"document; by default the implementation of :mod:`xml.dom.minidom` is used." msgstr "" -#: ../../../library/xml.dom.pulldom.rst:87 +#: ../../../library/xml.dom.pulldom.rst:123 +msgid "" +"Subclass of :class:`PullDOM` which also adds every created node to the tree, " +"so that the complete document is built." +msgstr "" + +#: ../../../library/xml.dom.pulldom.rst:129 msgid "" "Return a :class:`DOMEventStream` from the given input. *stream_or_string* " "may be either a file name, or a file-like object. *parser*, if given, must " @@ -123,45 +131,64 @@ msgid "" "done in advance." msgstr "" -#: ../../../library/xml.dom.pulldom.rst:94 +#: ../../../library/xml.dom.pulldom.rst:136 msgid "" "If you have XML in a string, you can use the :func:`parseString` function " "instead:" msgstr "" -#: ../../../library/xml.dom.pulldom.rst:98 +#: ../../../library/xml.dom.pulldom.rst:140 msgid "" -"Return a :class:`DOMEventStream` that represents the (Unicode) *string*." +"Return a :class:`DOMEventStream` that represents the *string*. *string* must " +"be a :class:`str` instance; to parse bytes, pass a binary file object to :" +"func:`parse`." msgstr "" -#: ../../../library/xml.dom.pulldom.rst:102 +#: ../../../library/xml.dom.pulldom.rst:146 msgid "Default value for the *bufsize* parameter to :func:`parse`." msgstr "" -#: ../../../library/xml.dom.pulldom.rst:104 +#: ../../../library/xml.dom.pulldom.rst:148 msgid "" "The value of this variable can be changed before calling :func:`parse` and " "the new value will take effect." msgstr "" -#: ../../../library/xml.dom.pulldom.rst:110 +#: ../../../library/xml.dom.pulldom.rst:154 msgid "DOMEventStream Objects" msgstr "" -#: ../../../library/xml.dom.pulldom.rst:114 +#: ../../../library/xml.dom.pulldom.rst:158 +msgid "" +"Produce the events for the data read from the file object *stream* by the :" +"class:`~xml.sax.xmlreader.XMLReader` *parser*. The data is read by *bufsize* " +"bytes, or characters for a text stream, at a time." +msgstr "" + +#: ../../../library/xml.dom.pulldom.rst:163 msgid "Support for :meth:`~object.__getitem__` method has been removed." msgstr "" -#: ../../../library/xml.dom.pulldom.rst:119 +#: ../../../library/xml.dom.pulldom.rst:168 msgid "" -"Return a tuple containing *event* and the current *node* as :class:`xml.dom." -"minidom.Document` if event equals :data:`START_DOCUMENT`, :class:`xml.dom." -"minidom.Element` if event equals :data:`START_ELEMENT` or :data:" -"`END_ELEMENT` or :class:`xml.dom.minidom.Text` if event equals :data:" -"`CHARACTERS`. The current node does not contain information about its " -"children, unless :func:`expandNode` is called." +"Return the next ``(event, node)`` tuple, or ``None`` at the end of the " +"document. See above for the events and the corresponding nodes. The current " +"node does not contain information about its children, unless :meth:" +"`expandNode` is called." msgstr "" -#: ../../../library/xml.dom.pulldom.rst:129 +#: ../../../library/xml.dom.pulldom.rst:176 msgid "Expands all children of *node* into *node*. Example::" msgstr "" + +#: ../../../library/xml.dom.pulldom.rst:192 +msgid "" +"Discard the events which are not read yet and prepare the object for parsing " +"a new document." +msgstr "" + +#: ../../../library/xml.dom.pulldom.rst:198 +msgid "" +"Release the parser and the document. The stream is not closed, and the " +"object can no longer be used." +msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/xml.etree.elementtree.pot b/main/locale/pot/LC_MESSAGES/library/xml.etree.elementtree.pot index 85d61abdeb5..a4a0fff82d4 100644 --- a/main/locale/pot/LC_MESSAGES/library/xml.etree.elementtree.pot +++ b/main/locale/pot/LC_MESSAGES/library/xml.etree.elementtree.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-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -36,7 +36,7 @@ msgid "This module will use a fast implementation whenever available." msgstr "" #: ../../../library/xml.etree.elementtree.rst:17 -msgid "The :mod:`!xml.etree.cElementTree` module is deprecated." +msgid "The :mod:`!xml.etree.cElementTree` alias of this module is deprecated." msgstr "" #: ../../../library/xml.etree.elementtree.rst:23 @@ -297,7 +297,7 @@ msgid "" msgstr "" #: ../../../library/xml.etree.elementtree.rst:380 -#: ../../../library/xml.etree.elementtree.rst:789 +#: ../../../library/xml.etree.elementtree.rst:795 msgid "Example" msgstr "" @@ -482,12 +482,12 @@ msgid "" msgstr "" #: ../../../library/xml.etree.elementtree.rst:496 -#: ../../../library/xml.etree.elementtree.rst:841 +#: ../../../library/xml.etree.elementtree.rst:847 msgid "Reference" msgstr "" #: ../../../library/xml.etree.elementtree.rst:501 -#: ../../../library/xml.etree.elementtree.rst:846 +#: ../../../library/xml.etree.elementtree.rst:852 msgid "Functions" msgstr "" @@ -572,13 +572,12 @@ msgstr "" #: ../../../library/xml.etree.elementtree.rst:553 msgid "" "Comment element factory. This factory function creates a special element " -"that will be serialized as an XML comment by the standard serializer. The " -"comment string can be either a bytestring or a Unicode string. *text* is a " -"string containing the comment string. Returns an element instance " +"that will be serialized as an XML comment by the standard serializer. *text* " +"is a string containing the comment string. Returns an element instance " "representing a comment." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:559 +#: ../../../library/xml.etree.elementtree.rst:558 msgid "" "Note that :class:`XMLParser` skips over comments in the input instead of " "creating comment objects for them. An :class:`ElementTree` will only contain " @@ -586,29 +585,29 @@ msgid "" "class:`Element` methods." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:566 +#: ../../../library/xml.etree.elementtree.rst:565 msgid "" "Writes an element tree or element structure to sys.stdout. This function " "should be used for debugging only." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:569 +#: ../../../library/xml.etree.elementtree.rst:568 msgid "" "The exact output format is implementation dependent. In this version, it's " "written as an ordinary XML file." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:572 +#: ../../../library/xml.etree.elementtree.rst:571 msgid "*elem* is an element tree or an individual element." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:574 +#: ../../../library/xml.etree.elementtree.rst:573 msgid "" "The :func:`dump` function now preserves the attribute order specified by the " "user." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:581 +#: ../../../library/xml.etree.elementtree.rst:580 msgid "" "Parses an XML section from a string constant. Same as :func:`XML`. *text* " "is a string containing XML data. *parser* is an optional parser instance. " @@ -616,7 +615,7 @@ msgid "" "class:`Element` instance." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:589 +#: ../../../library/xml.etree.elementtree.rst:588 msgid "" "Parses an XML document from a sequence of string fragments. *sequence* is a " "list or other sequence containing XML data fragments. *parser* is an " @@ -624,7 +623,7 @@ msgid "" "parser is used. Returns an :class:`Element` instance." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:599 +#: ../../../library/xml.etree.elementtree.rst:598 msgid "" "Appends whitespace to the subtree to indent the tree visually. This can be " "used to generate pretty-printed XML output. *tree* can be an Element or " @@ -634,13 +633,13 @@ msgid "" "indentation level as *level*." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:611 +#: ../../../library/xml.etree.elementtree.rst:610 msgid "" "Check if an object appears to be a valid element object. *element* is an " "element instance. Return ``True`` if this is an element object." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:617 +#: ../../../library/xml.etree.elementtree.rst:616 msgid "" "Parses an XML section into an element tree incrementally, and reports what's " "going on to the user. *source* is a filename or :term:`file object` " @@ -649,13 +648,13 @@ msgid "" "``\"comment\"``, ``\"pi\"``, ``\"start-ns\"`` and ``\"end-ns\"`` (the \"ns\" " "events are used to get detailed namespace information). If *events* is " "omitted, only ``\"end\"`` events are reported. *parser* is an optional " -"parser instance. If not given, the standard :class:`XMLParser` parser is " -"used. *parser* must be a subclass of :class:`XMLParser` and can only use " -"the default :class:`TreeBuilder` as a target. Returns an :term:`iterator` " -"providing ``(event, elem)`` pairs; it has a ``root`` attribute that " -"references the root element of the resulting XML tree once *source* is fully " -"read. The iterator has the :meth:`!close` method that closes the internal " -"file object if *source* is a filename." +"parser instance. If not given, the standard :class:`XMLParser` parser is " +"used. *parser* must be an instance of :class:`XMLParser` or its subclass and " +"can only use the default :class:`TreeBuilder` as a target. Returns an :term:" +"`iterator` providing ``(event, elem)`` pairs; it has a ``root`` attribute " +"that references the root element of the resulting XML tree once *source* is " +"fully read. The iterator has the :meth:`!close` method that closes the " +"internal file object if *source* is a filename." msgstr "" #: ../../../library/xml.etree.elementtree.rst:633 @@ -676,7 +675,7 @@ msgid "" msgstr "" #: ../../../library/xml.etree.elementtree.rst:646 -#: ../../../library/xml.etree.elementtree.rst:1535 +#: ../../../library/xml.etree.elementtree.rst:1561 msgid "If you need a fully populated element, look for \"end\" events instead." msgstr "" @@ -685,7 +684,7 @@ msgid "The *parser* argument." msgstr "" #: ../../../library/xml.etree.elementtree.rst:651 -#: ../../../library/xml.etree.elementtree.rst:1539 +#: ../../../library/xml.etree.elementtree.rst:1565 msgid "The ``comment`` and ``pi`` events were added." msgstr "" @@ -740,72 +739,77 @@ msgstr "" #: ../../../library/xml.etree.elementtree.rst:699 msgid "" -"The element name, attribute names, and attribute values can be either " -"bytestrings or Unicode strings. *parent* is the parent element. *tag* is " -"the subelement name. *attrib* is an optional dictionary, containing element " -"attributes. *extra* contains additional attributes, given as keyword " -"arguments. Returns an element instance." +"*parent* is the parent element. *tag* is the subelement name. *attrib* is " +"an optional dictionary, containing element attributes. *extra* contains " +"additional attributes, given as keyword arguments. Returns an element " +"instance." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:705 -#: ../../../library/xml.etree.elementtree.rst:896 +#: ../../../library/xml.etree.elementtree.rst:704 +#: ../../../library/xml.etree.elementtree.rst:913 msgid "*attrib* can now be a :class:`frozendict`." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:708 +#: ../../../library/xml.etree.elementtree.rst:707 msgid "*parent* and *tag* are now positional-only parameters." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:716 +#: ../../../library/xml.etree.elementtree.rst:715 msgid "" "Generates a string representation of an XML element, including all " "subelements. *element* is an :class:`Element` instance. *encoding* [1]_ is " "the output encoding (default is US-ASCII). Use ``encoding=\"unicode\"`` to " "generate a Unicode string (otherwise, a bytestring is generated). *method* " "is either ``\"xml\"``, ``\"html\"`` or ``\"text\"`` (default is " -"``\"xml\"``). *xml_declaration*, *default_namespace* and " -"*short_empty_elements* has the same meaning as in :meth:`ElementTree.write`. " +"``\"xml\"``). *xml_declaration*, *default_namespace*, *short_empty_elements* " +"and *standalone* has the same meaning as in :meth:`ElementTree.write`. " "Returns an (optionally) encoded string containing the XML data." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:725 -#: ../../../library/xml.etree.elementtree.rst:752 -#: ../../../library/xml.etree.elementtree.rst:1212 +#: ../../../library/xml.etree.elementtree.rst:724 +#: ../../../library/xml.etree.elementtree.rst:755 +#: ../../../library/xml.etree.elementtree.rst:1234 msgid "Added the *short_empty_elements* parameter." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:728 -#: ../../../library/xml.etree.elementtree.rst:755 +#: ../../../library/xml.etree.elementtree.rst:727 +#: ../../../library/xml.etree.elementtree.rst:758 msgid "Added the *xml_declaration* and *default_namespace* parameters." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:731 +#: ../../../library/xml.etree.elementtree.rst:730 msgid "" "The :func:`tostring` function now preserves the attribute order specified by " "the user." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:740 +#: ../../../library/xml.etree.elementtree.rst:734 +#: ../../../library/xml.etree.elementtree.rst:765 +#: ../../../library/xml.etree.elementtree.rst:1241 +msgid "Added the *standalone* parameter." +msgstr "" + +#: ../../../library/xml.etree.elementtree.rst:742 msgid "" "Generates a string representation of an XML element, including all " "subelements. *element* is an :class:`Element` instance. *encoding* [1]_ is " "the output encoding (default is US-ASCII). Use ``encoding=\"unicode\"`` to " "generate a Unicode string (otherwise, a bytestring is generated). *method* " "is either ``\"xml\"``, ``\"html\"`` or ``\"text\"`` (default is " -"``\"xml\"``). *xml_declaration*, *default_namespace* and " -"*short_empty_elements* has the same meaning as in :meth:`ElementTree.write`. " +"``\"xml\"``). *xml_declaration*, *default_namespace*, *short_empty_elements* " +"and *standalone* has the same meaning as in :meth:`ElementTree.write`. " "Returns a list of (optionally) encoded strings containing the XML data. It " "does not guarantee any specific sequence, except that ``b\"\"." "join(tostringlist(element)) == tostring(element)``." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:758 +#: ../../../library/xml.etree.elementtree.rst:761 msgid "" "The :func:`tostringlist` function now preserves the attribute order " "specified by the user." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:765 +#: ../../../library/xml.etree.elementtree.rst:771 msgid "" "Parses an XML section from a string constant. This function can be used to " "embed \"XML literals\" in Python code. *text* is a string containing XML " @@ -813,7 +817,7 @@ msgid "" "class:`XMLParser` parser is used. Returns an :class:`Element` instance." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:773 +#: ../../../library/xml.etree.elementtree.rst:779 msgid "" "Parses an XML section from a string constant, and also returns a dictionary " "which maps from element id:s to elements. *text* is a string containing XML " @@ -822,11 +826,11 @@ msgid "" "`Element` instance and a dictionary." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:783 +#: ../../../library/xml.etree.elementtree.rst:789 msgid "XInclude support" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:785 +#: ../../../library/xml.etree.elementtree.rst:791 msgid "" "This module provides limited support for `XInclude directives `_, via the :mod:`xml.etree.ElementInclude` helper " @@ -834,7 +838,7 @@ msgid "" "element trees, based on information in the tree." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:791 +#: ../../../library/xml.etree.elementtree.rst:797 msgid "" "Here's an example that demonstrates use of the XInclude module. To include " "an XML document in the current document, use the ``{http://www.w3.org/2001/" @@ -842,43 +846,43 @@ msgid "" "and use the **href** attribute to specify the document to include." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:800 +#: ../../../library/xml.etree.elementtree.rst:806 msgid "" "By default, the **href** attribute is treated as a file name. You can use " "custom loaders to override this behaviour. Also note that the standard " "helper does not support XPointer syntax." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:802 +#: ../../../library/xml.etree.elementtree.rst:808 msgid "" "To process this file, load it as usual, and pass the root element to the :" "mod:`!xml.etree.ElementTree` module:" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:813 +#: ../../../library/xml.etree.elementtree.rst:819 msgid "" "The ElementInclude module replaces the ``{http://www.w3.org/2001/XInclude}" "include`` element with the root element from the **source.xml** document. " "The result might look something like this:" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:821 +#: ../../../library/xml.etree.elementtree.rst:827 msgid "" "If the **parse** attribute is omitted, it defaults to \"xml\". The href " "attribute is required." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:823 +#: ../../../library/xml.etree.elementtree.rst:829 msgid "" "To include a text document, use the ``{http://www.w3.org/2001/XInclude}" "include`` element, and set the **parse** attribute to \"text\":" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:832 +#: ../../../library/xml.etree.elementtree.rst:838 msgid "The result might look something like:" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:852 +#: ../../../library/xml.etree.elementtree.rst:858 msgid "" "Default loader. This default loader reads an included resource from disk. " "*href* is a URL. *parse* is for parse mode either \"xml\" or \"text\". " @@ -889,7 +893,7 @@ msgid "" "``None`` or raise an exception." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:863 +#: ../../../library/xml.etree.elementtree.rst:869 msgid "" "This function expands XInclude directives in-place in tree pointed by " "*elem*. *elem* is either the root :class:`~xml.etree.ElementTree.Element` or " @@ -902,39 +906,51 @@ msgid "" "malicious content explosion. Pass ``None`` to disable the limitation." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:873 +#: ../../../library/xml.etree.elementtree.rst:879 msgid "Added the *base_url* and *max_depth* parameters." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:880 +#: ../../../library/xml.etree.elementtree.rst:886 msgid "Element Objects" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:888 +#: ../../../library/xml.etree.elementtree.rst:894 msgid "" "Element class. This class defines the Element interface, and provides a " "reference implementation of this interface." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:891 +#: ../../../library/xml.etree.elementtree.rst:897 +msgid "" +"*tag* is the element name. *attrib* is an optional dictionary, containing " +"element attributes. *extra* contains additional attributes, given as " +"keyword arguments." +msgstr "" + +#: ../../../library/xml.etree.elementtree.rst:901 msgid "" -"The element name, attribute names, and attribute values can be either " -"bytestrings or Unicode strings. *tag* is the element name. *attrib* is an " -"optional dictionary, containing element attributes. *extra* contains " -"additional attributes, given as keyword arguments." +"The element name and the attribute names and values are strings or :class:" +"`QName` instances, and the text and the tail are strings or ``None``. The " +"element name can also be :func:`Comment` or :func:`ProcessingInstruction`, " +"which are used for special elements. If it is ``None``, the element itself " +"is not serialized: only its text and its children are written, and its " +"attributes are ignored. This can be used for a fragment which contains " +"several elements. With ``method=\"html\"`` the attribute value can also be " +"``None``, which produces an empty attribute (such as ``checked``). Other " +"objects can be stored in the tree, but they cannot be serialized." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:899 +#: ../../../library/xml.etree.elementtree.rst:916 msgid "*tag* is now a positional-only parameter." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:905 +#: ../../../library/xml.etree.elementtree.rst:922 msgid "" "A string identifying what kind of data this element represents (the element " "type, in other words)." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:912 +#: ../../../library/xml.etree.elementtree.rst:929 msgid "" "These attributes can be used to hold additional data associated with the " "element. Their values are usually strings but may be any application-" @@ -945,7 +961,7 @@ msgid "" "the XML data" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:924 +#: ../../../library/xml.etree.elementtree.rst:941 msgid "" "the *a* element has ``None`` for both *text* and *tail* attributes, the *b* " "element has *text* ``\"1\"`` and *tail* ``\"4\"``, the *c* element has " @@ -953,17 +969,17 @@ msgid "" "``None`` and *tail* ``\"3\"``." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:929 +#: ../../../library/xml.etree.elementtree.rst:946 msgid "" "To collect the inner text of an element, see :meth:`itertext`, for example " "``\"\".join(element.itertext())``." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:932 +#: ../../../library/xml.etree.elementtree.rst:949 msgid "Applications may store arbitrary objects in these attributes." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:937 +#: ../../../library/xml.etree.elementtree.rst:954 msgid "" "A dictionary containing the element's attributes. Note that while the " "*attrib* value is always a real mutable Python dictionary, an ElementTree " @@ -972,59 +988,55 @@ msgid "" "implementations, use the dictionary methods below whenever possible." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:943 +#: ../../../library/xml.etree.elementtree.rst:960 msgid "The following dictionary-like methods work on the element attributes." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:948 +#: ../../../library/xml.etree.elementtree.rst:965 msgid "" "Resets an element. This function removes all subelements, clears all " "attributes, and sets the text and tail attributes to ``None``." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:954 +#: ../../../library/xml.etree.elementtree.rst:971 msgid "Gets the element attribute named *key*." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:956 +#: ../../../library/xml.etree.elementtree.rst:973 msgid "" "Returns the attribute value, or *default* if the attribute was not found." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:961 -msgid "" -"Returns the element attributes as a sequence of (name, value) pairs. The " -"attributes are returned in an arbitrary order." +#: ../../../library/xml.etree.elementtree.rst:978 +msgid "Returns the element attributes as (name, value) pairs." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:967 -msgid "" -"Returns the elements attribute names as a list. The names are returned in " -"an arbitrary order." +#: ../../../library/xml.etree.elementtree.rst:983 +msgid "Returns the element attribute names." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:973 +#: ../../../library/xml.etree.elementtree.rst:988 msgid "Set the attribute *key* on the element to *value*." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:975 +#: ../../../library/xml.etree.elementtree.rst:990 msgid "The following methods work on the element's children (subelements)." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:980 +#: ../../../library/xml.etree.elementtree.rst:995 msgid "" "Adds the element *subelement* to the end of this element's internal list of " "subelements. Raises :exc:`TypeError` if *subelement* is not an :class:" "`Element`." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:987 +#: ../../../library/xml.etree.elementtree.rst:1002 msgid "" "Appends *subelements* from an iterable of elements. Raises :exc:`TypeError` " "if a subelement is not an :class:`Element`." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:995 +#: ../../../library/xml.etree.elementtree.rst:1010 msgid "" "Finds the first subelement matching *match*. *match* may be a tag name or " "a :ref:`path `. Returns an element instance or " @@ -1033,7 +1045,7 @@ msgid "" "expression into the given namespace." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1004 +#: ../../../library/xml.etree.elementtree.rst:1019 msgid "" "Finds all matching subelements, by tag name or :ref:`path `. Returns a list containing all matching elements in document " @@ -1042,7 +1054,7 @@ msgid "" "expression into the given namespace." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1013 +#: ../../../library/xml.etree.elementtree.rst:1028 msgid "" "Finds text for the first subelement matching *match*. *match* may be a tag " "name or a :ref:`path `. Returns the text content of the " @@ -1053,13 +1065,13 @@ msgid "" "into the given namespace." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1024 +#: ../../../library/xml.etree.elementtree.rst:1039 msgid "" "Inserts *subelement* at the given position in this element. Raises :exc:" "`TypeError` if *subelement* is not an :class:`Element`." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1030 +#: ../../../library/xml.etree.elementtree.rst:1045 msgid "" "Creates a tree :term:`iterator` with the current element as the root. The " "iterator iterates over this element and all elements below it, in document " @@ -1068,7 +1080,7 @@ msgid "" "structure is modified during iteration, the result is undefined." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1041 +#: ../../../library/xml.etree.elementtree.rst:1056 msgid "" "Finds all matching subelements, by tag name or :ref:`path `. Returns an iterable yielding all matching elements in document " @@ -1076,33 +1088,33 @@ msgid "" "name." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1052 +#: ../../../library/xml.etree.elementtree.rst:1067 msgid "" "Creates a text iterator. The iterator loops over this element and all " "subelements, in document order, and returns all inner text." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1060 +#: ../../../library/xml.etree.elementtree.rst:1075 msgid "" "Creates a new element object of the same type as this element. Do not call " "this method, use the :func:`SubElement` factory function instead." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1066 +#: ../../../library/xml.etree.elementtree.rst:1081 msgid "" "Removes *subelement* from the element. Unlike the find\\* methods this " "method compares elements based on the instance identity, not on tag value or " "contents." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1070 +#: ../../../library/xml.etree.elementtree.rst:1085 msgid "" ":class:`Element` objects also support the following sequence type methods " "for working with subelements: :meth:`~object.__delitem__`, :meth:`~object." "__getitem__`, :meth:`~object.__setitem__`, :meth:`~object.__len__`." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1075 +#: ../../../library/xml.etree.elementtree.rst:1090 msgid "" "Caution: Elements with no subelements will test as ``False``. In a future " "release of Python, all elements will test as ``True`` regardless of whether " @@ -1110,11 +1122,11 @@ msgid "" "None`` tests.::" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1088 +#: ../../../library/xml.etree.elementtree.rst:1103 msgid "Testing the truth value of an Element emits :exc:`DeprecationWarning`." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1091 +#: ../../../library/xml.etree.elementtree.rst:1106 msgid "" "Prior to Python 3.8, the serialisation order of the XML attributes of " "elements was artificially made predictable by sorting the attributes by " @@ -1123,7 +1135,7 @@ msgid "" "attributes were originally parsed or created by user code." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1097 +#: ../../../library/xml.etree.elementtree.rst:1112 msgid "" "In general, user code should try not to depend on a specific ordering of " "attributes, given that the `XML Information Set `_ writer. Arguments are the " "same as for the :func:`canonicalize` function. This class does not build a " @@ -1359,11 +1379,11 @@ msgid "" "using the *write* function." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1376 +#: ../../../library/xml.etree.elementtree.rst:1400 msgid "XMLParser Objects" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1381 +#: ../../../library/xml.etree.elementtree.rst:1405 msgid "" "This class is the low-level building block of the module. It uses :mod:`xml." "parsers.expat` for efficient, event-based parsing of XML. It can be fed XML " @@ -1374,25 +1394,27 @@ msgid "" "XML file." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1389 +#: ../../../library/xml.etree.elementtree.rst:1413 msgid "" "Parameters are now :ref:`keyword-only `. The *html* " "argument is no longer supported." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1396 +#: ../../../library/xml.etree.elementtree.rst:1420 msgid "" "Finishes feeding data to the parser. Returns the result of calling the " "``close()`` method of the *target* passed during construction; by default, " "this is the toplevel document element." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1403 -msgid "Feeds data to the parser. *data* is encoded data." +#: ../../../library/xml.etree.elementtree.rst:1427 +msgid "" +"Feeds data to the parser. *data* is a string or encoded data (:class:" +"`bytes` or a :term:`bytes-like object`)." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1408 -#: ../../../library/xml.etree.elementtree.rst:1486 +#: ../../../library/xml.etree.elementtree.rst:1433 +#: ../../../library/xml.etree.elementtree.rst:1512 msgid "" "Triggers parsing of any previously fed unparsed data, which can be used to " "ensure more immediate feedback, in particular with Expat >=2.6.0. The " @@ -1402,15 +1424,15 @@ msgid "" "xmlparser.SetReparseDeferralEnabled` for details." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1415 -#: ../../../library/xml.etree.elementtree.rst:1493 +#: ../../../library/xml.etree.elementtree.rst:1440 +#: ../../../library/xml.etree.elementtree.rst:1519 msgid "" ":meth:`!flush` has been backported to some prior releases of CPython as a " "security fix. Check for availability using :func:`hasattr` if used in code " "running across a variety of Python versions." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1423 +#: ../../../library/xml.etree.elementtree.rst:1448 msgid "" ":meth:`XMLParser.feed` calls *target*\\'s ``start(tag, attrs_dict)`` method " "for each opening tag, its ``end(tag)`` method for each closing tag, and data " @@ -1421,11 +1443,11 @@ msgid "" "of an XML file::" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1467 +#: ../../../library/xml.etree.elementtree.rst:1492 msgid "XMLPullParser Objects" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1471 +#: ../../../library/xml.etree.elementtree.rst:1496 msgid "" "A pull parser suitable for non-blocking applications. Its input-side API is " "similar to that of :class:`XMLParser`, but instead of pushing calls to a " @@ -1437,11 +1459,13 @@ msgid "" "If *events* is omitted, only ``\"end\"`` events are reported." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1482 -msgid "Feed the given bytes data to the parser." +#: ../../../library/xml.etree.elementtree.rst:1507 +msgid "" +"Feed the given data to the parser. *data* is a string or encoded data (:" +"class:`bytes` or a :term:`bytes-like object`)." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1502 +#: ../../../library/xml.etree.elementtree.rst:1528 msgid "" "Signal the parser that the data stream is terminated. Unlike :meth:" "`XMLParser.close`, this method always returns :const:`None`. Any events not " @@ -1449,7 +1473,7 @@ msgid "" "`read_events`." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1509 +#: ../../../library/xml.etree.elementtree.rst:1535 msgid "" "Return an iterator over the events which have been encountered in the data " "fed to the parser. The iterator yields ``(event, elem)`` pairs, where " @@ -1458,25 +1482,25 @@ msgid "" "follows." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1515 +#: ../../../library/xml.etree.elementtree.rst:1541 msgid "``start``, ``end``: the current Element." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1516 +#: ../../../library/xml.etree.elementtree.rst:1542 msgid "``comment``, ``pi``: the current comment / processing instruction" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1517 +#: ../../../library/xml.etree.elementtree.rst:1543 msgid "" "``start-ns``: a tuple ``(prefix, uri)`` naming the declared namespace " "mapping." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1519 +#: ../../../library/xml.etree.elementtree.rst:1545 msgid "``end-ns``: :const:`None` (this may change in a future version)" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1521 +#: ../../../library/xml.etree.elementtree.rst:1547 msgid "" "Events provided in a previous call to :meth:`read_events` will not be " "yielded again. Events are consumed from the internal queue only when they " @@ -1485,7 +1509,7 @@ msgid "" "results." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1529 +#: ../../../library/xml.etree.elementtree.rst:1555 msgid "" ":class:`XMLPullParser` only guarantees that it has seen the \">\" character " "of a starting tag when it emits a \"start\" event, so the attributes are " @@ -1494,11 +1518,11 @@ msgid "" "be present." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1544 +#: ../../../library/xml.etree.elementtree.rst:1570 msgid "Exceptions" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1548 +#: ../../../library/xml.etree.elementtree.rst:1574 msgid "" "XML parse error, raised by the various parsing methods in this module when " "parsing fails. The string representation of an instance of this exception " @@ -1506,22 +1530,22 @@ msgid "" "following attributes available:" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1555 +#: ../../../library/xml.etree.elementtree.rst:1581 msgid "" "A numeric error code from the expat parser. See the documentation of :mod:" "`xml.parsers.expat` for the list of error codes and their meanings." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1560 +#: ../../../library/xml.etree.elementtree.rst:1586 msgid "" "A tuple of *line*, *column* numbers, specifying where the error occurred." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1563 +#: ../../../library/xml.etree.elementtree.rst:1589 msgid "Footnotes" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1564 +#: ../../../library/xml.etree.elementtree.rst:1590 msgid "" "The encoding string included in XML output should conform to the appropriate " "standards. For example, \"UTF-8\" is valid, but \"UTF8\" is not. See " diff --git a/main/locale/pot/LC_MESSAGES/library/xml.sax.handler.pot b/main/locale/pot/LC_MESSAGES/library/xml.sax.handler.pot index a4502a9c9f2..784317ff377 100644 --- a/main/locale/pot/LC_MESSAGES/library/xml.sax.handler.pot +++ b/main/locale/pot/LC_MESSAGES/library/xml.sax.handler.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-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -95,11 +95,11 @@ msgstr "" #: ../../../library/xml.sax.handler.rst:63 #: ../../../library/xml.sax.handler.rst:73 -#: ../../../library/xml.sax.handler.rst:82 -#: ../../../library/xml.sax.handler.rst:91 -#: ../../../library/xml.sax.handler.rst:107 -#: ../../../library/xml.sax.handler.rst:117 -#: ../../../library/xml.sax.handler.rst:149 +#: ../../../library/xml.sax.handler.rst:85 +#: ../../../library/xml.sax.handler.rst:94 +#: ../../../library/xml.sax.handler.rst:113 +#: ../../../library/xml.sax.handler.rst:123 +#: ../../../library/xml.sax.handler.rst:160 msgid "access: (parsing) read-only; (not parsing) read/write" msgstr "" @@ -119,36 +119,49 @@ msgid "" "optionally do not report original prefixed names (default)." msgstr "" -#: ../../../library/xml.sax.handler.rst:78 -msgid "value: ``\"http://xml.org/sax/features/string-interning\"``" +#: ../../../library/xml.sax.handler.rst:75 +#: ../../../library/xml.sax.handler.rst:125 +msgid "" +"The parser based on :mod:`xml.parsers.expat` does not support this feature." msgstr "" #: ../../../library/xml.sax.handler.rst:80 +msgid "value: ``\"http://xml.org/sax/features/string-interning\"``" +msgstr "" + +#: ../../../library/xml.sax.handler.rst:83 msgid "" "true: All element names, prefixes, attribute names, Namespace URIs, and " -"local names are interned using the built-in intern function." +"local names are interned in a dictionary (see :data:" +"`property_interning_dict`)." msgstr "" -#: ../../../library/xml.sax.handler.rst:81 +#: ../../../library/xml.sax.handler.rst:84 msgid "" "false: Names are not necessarily interned, although they may be (default)." msgstr "" -#: ../../../library/xml.sax.handler.rst:87 +#: ../../../library/xml.sax.handler.rst:90 msgid "value: ``\"http://xml.org/sax/features/validation\"``" msgstr "" -#: ../../../library/xml.sax.handler.rst:89 +#: ../../../library/xml.sax.handler.rst:92 msgid "" "true: Report all validation errors (implies external-general-entities and " "external-parameter-entities)." msgstr "" -#: ../../../library/xml.sax.handler.rst:90 +#: ../../../library/xml.sax.handler.rst:93 msgid "false: Do not report validation errors." msgstr "" -#: ../../../library/xml.sax.handler.rst:98 +#: ../../../library/xml.sax.handler.rst:96 +msgid "" +"The parser based on :mod:`xml.parsers.expat` does not support this feature, " +"because Expat is a non-validating parser." +msgstr "" + +#: ../../../library/xml.sax.handler.rst:104 msgid "" "Enabling opens a vulnerability to `external entity attacks `_ if the parser is used with " @@ -156,124 +169,164 @@ msgid "" "wikipedia.org/wiki/Threat_model>`_ before enabling this feature." msgstr "" -#: ../../../library/xml.sax.handler.rst:104 +#: ../../../library/xml.sax.handler.rst:110 msgid "value: ``\"http://xml.org/sax/features/external-general-entities\"``" msgstr "" -#: ../../../library/xml.sax.handler.rst:105 +#: ../../../library/xml.sax.handler.rst:111 msgid "true: Include all external general (text) entities." msgstr "" -#: ../../../library/xml.sax.handler.rst:106 +#: ../../../library/xml.sax.handler.rst:112 msgid "false: Do not include external general entities." msgstr "" -#: ../../../library/xml.sax.handler.rst:112 +#: ../../../library/xml.sax.handler.rst:118 msgid "value: ``\"http://xml.org/sax/features/external-parameter-entities\"``" msgstr "" -#: ../../../library/xml.sax.handler.rst:114 +#: ../../../library/xml.sax.handler.rst:120 msgid "" "true: Include all external parameter entities, including the external DTD " "subset." msgstr "" -#: ../../../library/xml.sax.handler.rst:116 +#: ../../../library/xml.sax.handler.rst:122 msgid "" "false: Do not include any external parameter entities, even the external DTD " "subset." msgstr "" -#: ../../../library/xml.sax.handler.rst:122 +#: ../../../library/xml.sax.handler.rst:130 msgid "List of all features." msgstr "" -#: ../../../library/xml.sax.handler.rst:127 +#: ../../../library/xml.sax.handler.rst:135 msgid "value: ``\"http://xml.org/sax/properties/lexical-handler\"``" msgstr "" -#: ../../../library/xml.sax.handler.rst:128 -msgid "data type: xml.sax.handler.LexicalHandler (not supported in Python 2)" +#: ../../../library/xml.sax.handler.rst:136 +msgid "data type: :class:`~xml.sax.handler.LexicalHandler`" msgstr "" -#: ../../../library/xml.sax.handler.rst:130 +#: ../../../library/xml.sax.handler.rst:138 msgid "" "description: An optional extension handler for lexical events like comments." msgstr "" -#: ../../../library/xml.sax.handler.rst:131 -#: ../../../library/xml.sax.handler.rst:140 +#: ../../../library/xml.sax.handler.rst:139 +#: ../../../library/xml.sax.handler.rst:148 +#: ../../../library/xml.sax.handler.rst:179 +#: ../../../library/xml.sax.handler.rst:192 msgid "access: read/write" msgstr "" -#: ../../../library/xml.sax.handler.rst:136 +#: ../../../library/xml.sax.handler.rst:144 msgid "value: ``\"http://xml.org/sax/properties/declaration-handler\"``" msgstr "" -#: ../../../library/xml.sax.handler.rst:137 -msgid "data type: xml.sax.sax2lib.DeclHandler (not supported in Python 2)" +#: ../../../library/xml.sax.handler.rst:145 +msgid "data type: an object implementing the SAX2 ``DeclHandler`` interface" msgstr "" -#: ../../../library/xml.sax.handler.rst:139 +#: ../../../library/xml.sax.handler.rst:147 msgid "" "description: An optional extension handler for DTD-related events other than " "notations and unparsed entities." msgstr "" -#: ../../../library/xml.sax.handler.rst:145 +#: ../../../library/xml.sax.handler.rst:150 +msgid "" +"No parser in the standard library supports this property, and the standard " +"library provides no such handler." +msgstr "" + +#: ../../../library/xml.sax.handler.rst:156 msgid "value: ``\"http://xml.org/sax/properties/dom-node\"``" msgstr "" -#: ../../../library/xml.sax.handler.rst:146 -msgid "data type: org.w3c.dom.Node (not supported in Python 2)" +#: ../../../library/xml.sax.handler.rst:157 +msgid "data type: :class:`xml.dom.Node`" msgstr "" -#: ../../../library/xml.sax.handler.rst:148 +#: ../../../library/xml.sax.handler.rst:159 msgid "" "description: When parsing, the current DOM node being visited if this is a " "DOM iterator; when not parsing, the root DOM node for iteration." msgstr "" -#: ../../../library/xml.sax.handler.rst:154 +#: ../../../library/xml.sax.handler.rst:162 +#: ../../../library/xml.sax.handler.rst:181 +msgid "No parser in the standard library supports this property." +msgstr "" + +#: ../../../library/xml.sax.handler.rst:167 msgid "value: ``\"http://xml.org/sax/properties/xml-string\"``" msgstr "" -#: ../../../library/xml.sax.handler.rst:155 +#: ../../../library/xml.sax.handler.rst:168 msgid "data type: Bytes" msgstr "" -#: ../../../library/xml.sax.handler.rst:157 +#: ../../../library/xml.sax.handler.rst:170 msgid "" "description: The literal string of characters that was the source for the " "current event." msgstr "" -#: ../../../library/xml.sax.handler.rst:158 -msgid "access: read-only" +#: ../../../library/xml.sax.handler.rst:171 +msgid "access: read-only, and only during a handler callback" +msgstr "" + +#: ../../../library/xml.sax.handler.rst:176 +msgid "value: ``\"http://www.python.org/sax/properties/encoding\"``" +msgstr "" + +#: ../../../library/xml.sax.handler.rst:177 +msgid "data type: String" +msgstr "" + +#: ../../../library/xml.sax.handler.rst:178 +msgid "description: The name of the encoding to assume for input data." +msgstr "" + +#: ../../../library/xml.sax.handler.rst:186 +msgid "value: ``\"http://www.python.org/sax/properties/interning-dict\"``" msgstr "" -#: ../../../library/xml.sax.handler.rst:163 +#: ../../../library/xml.sax.handler.rst:187 +msgid "data type: Dictionary" +msgstr "" + +#: ../../../library/xml.sax.handler.rst:191 +msgid "" +"description: The dictionary used to intern names, or ``None`` if names are " +"not interned. Setting it enables interning, as does the :data:" +"`feature_string_interning` feature." +msgstr "" + +#: ../../../library/xml.sax.handler.rst:197 msgid "List of all known property names." msgstr "" -#: ../../../library/xml.sax.handler.rst:169 +#: ../../../library/xml.sax.handler.rst:203 msgid "ContentHandler Objects" msgstr "" -#: ../../../library/xml.sax.handler.rst:171 +#: ../../../library/xml.sax.handler.rst:205 msgid "" "Users are expected to subclass :class:`ContentHandler` to support their " "application. The following methods are called by the parser on the " "appropriate events in the input document:" msgstr "" -#: ../../../library/xml.sax.handler.rst:178 +#: ../../../library/xml.sax.handler.rst:212 msgid "" "Called by the parser to give the application a locator for locating the " "origin of document events." msgstr "" -#: ../../../library/xml.sax.handler.rst:181 +#: ../../../library/xml.sax.handler.rst:215 msgid "" "SAX parsers are strongly encouraged (though not absolutely required) to " "supply a locator: if it does so, it must supply the locator to the " @@ -281,7 +334,7 @@ msgid "" "in the DocumentHandler interface." msgstr "" -#: ../../../library/xml.sax.handler.rst:186 +#: ../../../library/xml.sax.handler.rst:220 msgid "" "The locator allows the application to determine the end position of any " "document-related event, even if the parser is not reporting an error. " @@ -291,28 +344,28 @@ msgid "" "sufficient for use with a search engine." msgstr "" -#: ../../../library/xml.sax.handler.rst:193 +#: ../../../library/xml.sax.handler.rst:227 msgid "" "Note that the locator will return correct information only during the " "invocation of the events in this interface. The application should not " "attempt to use it at any other time." msgstr "" -#: ../../../library/xml.sax.handler.rst:200 +#: ../../../library/xml.sax.handler.rst:234 msgid "Receive notification of the beginning of a document." msgstr "" -#: ../../../library/xml.sax.handler.rst:202 +#: ../../../library/xml.sax.handler.rst:236 msgid "" "The SAX parser will invoke this method only once, before any other methods " "in this interface or in DTDHandler (except for :meth:`setDocumentLocator`)." msgstr "" -#: ../../../library/xml.sax.handler.rst:208 +#: ../../../library/xml.sax.handler.rst:242 msgid "Receive notification of the end of a document." msgstr "" -#: ../../../library/xml.sax.handler.rst:210 +#: ../../../library/xml.sax.handler.rst:244 msgid "" "The SAX parser will invoke this method only once, and it will be the last " "method invoked during the parse. The parser shall not invoke this method " @@ -320,11 +373,11 @@ msgid "" "reached the end of input." msgstr "" -#: ../../../library/xml.sax.handler.rst:218 +#: ../../../library/xml.sax.handler.rst:252 msgid "Begin the scope of a prefix-URI Namespace mapping." msgstr "" -#: ../../../library/xml.sax.handler.rst:220 +#: ../../../library/xml.sax.handler.rst:254 msgid "" "The information from this event is not necessary for normal Namespace " "processing: the SAX XML reader will automatically replace prefixes for " @@ -332,7 +385,7 @@ msgid "" "enabled (the default)." msgstr "" -#: ../../../library/xml.sax.handler.rst:225 +#: ../../../library/xml.sax.handler.rst:259 msgid "" "There are cases, however, when applications need to use prefixes in " "character data or in attribute values, where they cannot safely be expanded " @@ -341,7 +394,7 @@ msgid "" "contexts itself, if necessary." msgstr "" -#: ../../../library/xml.sax.handler.rst:233 +#: ../../../library/xml.sax.handler.rst:267 msgid "" "Note that :meth:`startPrefixMapping` and :meth:`endPrefixMapping` events are " "not guaranteed to be properly nested relative to each-other: all :meth:" @@ -351,22 +404,22 @@ msgid "" "guaranteed." msgstr "" -#: ../../../library/xml.sax.handler.rst:243 +#: ../../../library/xml.sax.handler.rst:277 msgid "End the scope of a prefix-URI mapping." msgstr "" -#: ../../../library/xml.sax.handler.rst:245 +#: ../../../library/xml.sax.handler.rst:279 msgid "" "See :meth:`startPrefixMapping` for details. This event will always occur " "after the corresponding :meth:`endElement` event, but the order of :meth:" "`endPrefixMapping` events is not otherwise guaranteed." msgstr "" -#: ../../../library/xml.sax.handler.rst:252 +#: ../../../library/xml.sax.handler.rst:286 msgid "Signals the start of an element in non-namespace mode." msgstr "" -#: ../../../library/xml.sax.handler.rst:254 +#: ../../../library/xml.sax.handler.rst:288 msgid "" "The *name* parameter contains the raw XML 1.0 name of the element type as a " "string and the *attrs* parameter holds an object of the :ref:`Attributes " @@ -377,21 +430,21 @@ msgid "" "object." msgstr "" -#: ../../../library/xml.sax.handler.rst:265 +#: ../../../library/xml.sax.handler.rst:299 msgid "Signals the end of an element in non-namespace mode." msgstr "" -#: ../../../library/xml.sax.handler.rst:267 +#: ../../../library/xml.sax.handler.rst:301 msgid "" "The *name* parameter contains the name of the element type, just as with " "the :meth:`startElement` event." msgstr "" -#: ../../../library/xml.sax.handler.rst:273 +#: ../../../library/xml.sax.handler.rst:307 msgid "Signals the start of an element in namespace mode." msgstr "" -#: ../../../library/xml.sax.handler.rst:275 +#: ../../../library/xml.sax.handler.rst:309 msgid "" "The *name* parameter contains the name of the element type as a ``(uri, " "localname)`` tuple, the *qname* parameter contains the raw XML 1.0 name used " @@ -404,27 +457,27 @@ msgid "" "attributes, use the :meth:`copy` method of the *attrs* object." msgstr "" -#: ../../../library/xml.sax.handler.rst:285 +#: ../../../library/xml.sax.handler.rst:319 msgid "" "Parsers may set the *qname* parameter to ``None``, unless the " "``feature_namespace_prefixes`` feature is activated." msgstr "" -#: ../../../library/xml.sax.handler.rst:291 +#: ../../../library/xml.sax.handler.rst:325 msgid "Signals the end of an element in namespace mode." msgstr "" -#: ../../../library/xml.sax.handler.rst:293 +#: ../../../library/xml.sax.handler.rst:327 msgid "" "The *name* parameter contains the name of the element type, just as with " "the :meth:`startElementNS` method, likewise the *qname* parameter." msgstr "" -#: ../../../library/xml.sax.handler.rst:299 +#: ../../../library/xml.sax.handler.rst:333 msgid "Receive notification of character data." msgstr "" -#: ../../../library/xml.sax.handler.rst:301 +#: ../../../library/xml.sax.handler.rst:335 msgid "" "The Parser will call this method to report each chunk of character data. SAX " "parsers may return all contiguous character data in a single chunk, or they " @@ -433,13 +486,13 @@ msgid "" "provides useful information." msgstr "" -#: ../../../library/xml.sax.handler.rst:307 +#: ../../../library/xml.sax.handler.rst:341 msgid "" "*content* may be a string or bytes instance; the ``expat`` reader module " "always produces strings." msgstr "" -#: ../../../library/xml.sax.handler.rst:312 +#: ../../../library/xml.sax.handler.rst:346 msgid "" "The earlier SAX 1 interface provided by the Python XML Special Interest " "Group used a more Java-like interface for this method. Since most parsers " @@ -449,11 +502,11 @@ msgid "" "and *length* parameters." msgstr "" -#: ../../../library/xml.sax.handler.rst:321 +#: ../../../library/xml.sax.handler.rst:355 msgid "Receive notification of ignorable whitespace in element content." msgstr "" -#: ../../../library/xml.sax.handler.rst:323 +#: ../../../library/xml.sax.handler.rst:357 msgid "" "Validating Parsers must use this method to report each chunk of ignorable " "whitespace (see the W3C XML 1.0 recommendation, section 2.10): non-" @@ -461,7 +514,7 @@ msgid "" "and using content models." msgstr "" -#: ../../../library/xml.sax.handler.rst:328 +#: ../../../library/xml.sax.handler.rst:362 msgid "" "SAX parsers may return all contiguous whitespace in a single chunk, or they " "may split it into several chunks; however, all of the characters in any " @@ -469,28 +522,28 @@ msgid "" "provides useful information." msgstr "" -#: ../../../library/xml.sax.handler.rst:336 +#: ../../../library/xml.sax.handler.rst:370 msgid "Receive notification of a processing instruction." msgstr "" -#: ../../../library/xml.sax.handler.rst:338 +#: ../../../library/xml.sax.handler.rst:372 msgid "" "The Parser will invoke this method once for each processing instruction " "found: note that processing instructions may occur before or after the main " "document element." msgstr "" -#: ../../../library/xml.sax.handler.rst:342 +#: ../../../library/xml.sax.handler.rst:376 msgid "" "A SAX parser should never report an XML declaration (XML 1.0, section 2.8) " "or a text declaration (XML 1.0, section 4.3.1) using this method." msgstr "" -#: ../../../library/xml.sax.handler.rst:348 +#: ../../../library/xml.sax.handler.rst:382 msgid "Receive notification of a skipped entity." msgstr "" -#: ../../../library/xml.sax.handler.rst:350 +#: ../../../library/xml.sax.handler.rst:384 msgid "" "The Parser will invoke this method once for each entity skipped. Non-" "validating processors may skip entities if they have not seen the " @@ -500,38 +553,38 @@ msgid "" "properties." msgstr "" -#: ../../../library/xml.sax.handler.rst:360 +#: ../../../library/xml.sax.handler.rst:394 msgid "DTDHandler Objects" msgstr "" -#: ../../../library/xml.sax.handler.rst:362 +#: ../../../library/xml.sax.handler.rst:396 msgid ":class:`DTDHandler` instances provide the following methods:" msgstr "" -#: ../../../library/xml.sax.handler.rst:367 +#: ../../../library/xml.sax.handler.rst:401 msgid "Handle a notation declaration event." msgstr "" -#: ../../../library/xml.sax.handler.rst:372 +#: ../../../library/xml.sax.handler.rst:406 msgid "Handle an unparsed entity declaration event." msgstr "" -#: ../../../library/xml.sax.handler.rst:378 +#: ../../../library/xml.sax.handler.rst:412 msgid "EntityResolver Objects" msgstr "" -#: ../../../library/xml.sax.handler.rst:383 +#: ../../../library/xml.sax.handler.rst:417 msgid "" "Resolve the system identifier of an entity and return either the system " "identifier to read from as a string, or an InputSource to read from. The " "default implementation returns *systemId*." msgstr "" -#: ../../../library/xml.sax.handler.rst:391 +#: ../../../library/xml.sax.handler.rst:425 msgid "ErrorHandler Objects" msgstr "" -#: ../../../library/xml.sax.handler.rst:393 +#: ../../../library/xml.sax.handler.rst:427 msgid "" "Objects with this interface are used to receive error and warning " "information from the :class:`~xml.sax.xmlreader.XMLReader`. If you create " @@ -544,7 +597,7 @@ msgid "" "the passed-in exception object." msgstr "" -#: ../../../library/xml.sax.handler.rst:406 +#: ../../../library/xml.sax.handler.rst:440 msgid "" "Called when the parser encounters a recoverable error. If this method does " "not raise an exception, parsing may continue, but further document " @@ -553,13 +606,13 @@ msgid "" "document." msgstr "" -#: ../../../library/xml.sax.handler.rst:414 +#: ../../../library/xml.sax.handler.rst:448 msgid "" "Called when the parser encounters an error it cannot recover from; parsing " "is expected to terminate when this method returns." msgstr "" -#: ../../../library/xml.sax.handler.rst:420 +#: ../../../library/xml.sax.handler.rst:454 msgid "" "Called when the parser presents minor warning information to the " "application. Parsing is expected to continue when this method returns, and " @@ -567,15 +620,15 @@ msgid "" "an exception in this method will cause parsing to end." msgstr "" -#: ../../../library/xml.sax.handler.rst:429 +#: ../../../library/xml.sax.handler.rst:463 msgid "LexicalHandler Objects" msgstr "" -#: ../../../library/xml.sax.handler.rst:430 +#: ../../../library/xml.sax.handler.rst:464 msgid "Optional SAX2 handler for lexical events." msgstr "" -#: ../../../library/xml.sax.handler.rst:432 +#: ../../../library/xml.sax.handler.rst:466 msgid "" "This handler is used to obtain lexical information about an XML document. " "Lexical information includes information describing the document encoding " @@ -584,38 +637,38 @@ msgid "" "used in the same manner as content handlers." msgstr "" -#: ../../../library/xml.sax.handler.rst:438 +#: ../../../library/xml.sax.handler.rst:472 msgid "" "Set the LexicalHandler of an XMLReader by using the setProperty method with " "the property identifier ``'http://xml.org/sax/properties/lexical-handler'``." msgstr "" -#: ../../../library/xml.sax.handler.rst:445 +#: ../../../library/xml.sax.handler.rst:479 msgid "" "Reports a comment anywhere in the document (including the DTD and outside " "the document element)." msgstr "" -#: ../../../library/xml.sax.handler.rst:450 +#: ../../../library/xml.sax.handler.rst:484 msgid "" "Reports the start of the DTD declarations if the document has an associated " "DTD." msgstr "" -#: ../../../library/xml.sax.handler.rst:455 +#: ../../../library/xml.sax.handler.rst:489 msgid "Reports the end of DTD declaration." msgstr "" -#: ../../../library/xml.sax.handler.rst:459 +#: ../../../library/xml.sax.handler.rst:493 msgid "Reports the start of a CDATA marked section." msgstr "" -#: ../../../library/xml.sax.handler.rst:461 +#: ../../../library/xml.sax.handler.rst:495 msgid "" "The contents of the CDATA marked section will be reported through the " "characters handler." msgstr "" -#: ../../../library/xml.sax.handler.rst:466 +#: ../../../library/xml.sax.handler.rst:500 msgid "Reports the end of a CDATA marked section." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/xml.sax.pot b/main/locale/pot/LC_MESSAGES/library/xml.sax.pot index c9acbf91be7..6b296984d09 100644 --- a/main/locale/pot/LC_MESSAGES/library/xml.sax.pot +++ b/main/locale/pot/LC_MESSAGES/library/xml.sax.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-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -50,7 +50,7 @@ msgid "" msgstr "" #: ../../../library/xml.sax.rst:31 -msgid "The convenience functions are:" +msgid "The convenience functions and data are:" msgstr "" #: ../../../library/xml.sax.rst:36 @@ -69,26 +69,38 @@ msgstr "" #: ../../../library/xml.sax.rst:48 msgid "" "Create a SAX parser and use it to parse a document. The document, passed in " -"as *filename_or_stream*, can be a filename or a file object. The *handler* " -"parameter needs to be a SAX :class:`~handler.ContentHandler` instance. If " -"*error_handler* is given, it must be a SAX :class:`~handler.ErrorHandler` " -"instance; if omitted, :exc:`SAXParseException` will be raised on all " -"errors. There is no return value; all work must be done by the *handler* " -"passed in." +"as *filename_or_stream*, can be a system identifier (a string identifying " +"the input source -- typically a file name or a URL), a :term:`path-like " +"` object, or a file object. A system identifier which does " +"not refer to an existing file is opened with :func:`urllib.request.urlopen`. " +"The *handler* parameter needs to be a SAX :class:`~handler.ContentHandler` " +"instance. If *errorHandler* is given, it must be a SAX :class:`~handler." +"ErrorHandler` instance; if omitted, :exc:`SAXParseException` will be raised " +"on all errors. There is no return value; all work must be done by the " +"*handler* passed in." msgstr "" -#: ../../../library/xml.sax.rst:59 +#: ../../../library/xml.sax.rst:64 msgid "" "Similar to :func:`parse`, but parses from a buffer *string* received as a " "parameter. *string* must be a :class:`str` instance or a :term:`bytes-like " "object`." msgstr "" -#: ../../../library/xml.sax.rst:63 +#: ../../../library/xml.sax.rst:68 msgid "Added support of :class:`str` instances." msgstr "" -#: ../../../library/xml.sax.rst:66 +#: ../../../library/xml.sax.rst:74 +msgid "" +"The list of the names of modules which are tried by :func:`make_parser` " +"after the modules named in its *parser_list* argument. It contains ``'xml." +"sax.expatreader'``, or, if the :envvar:`!PY_SAX_PARSER` environment variable " +"is set and the environment is not ignored, the comma-separated list of " +"module names taken from it." +msgstr "" + +#: ../../../library/xml.sax.rst:80 msgid "" "A typical SAX application uses three kinds of objects: readers, handlers and " "input sources. \"Reader\" in this context is another term for parser, i.e. " @@ -102,7 +114,7 @@ msgid "" "structural and syntactic events from the input data." msgstr "" -#: ../../../library/xml.sax.rst:77 +#: ../../../library/xml.sax.rst:91 msgid "" "For these objects, only the interfaces are relevant; they are normally not " "instantiated by the application itself. Since Python does not have an " @@ -118,13 +130,13 @@ msgid "" "interfaces are described below." msgstr "" -#: ../../../library/xml.sax.rst:90 +#: ../../../library/xml.sax.rst:104 msgid "" "In addition to these classes, :mod:`!xml.sax` provides the following " "exception classes." msgstr "" -#: ../../../library/xml.sax.rst:96 +#: ../../../library/xml.sax.rst:110 msgid "" "Encapsulate an XML error or warning. This class can contain basic error or " "warning information from either the XML parser or the application: it can be " @@ -135,7 +147,7 @@ msgid "" "container for information." msgstr "" -#: ../../../library/xml.sax.rst:104 +#: ../../../library/xml.sax.rst:118 msgid "" "When instantiated, *msg* should be a human-readable description of the " "error. The optional *exception* parameter, if given, should be ``None`` or " @@ -143,11 +155,11 @@ msgid "" "as information." msgstr "" -#: ../../../library/xml.sax.rst:108 +#: ../../../library/xml.sax.rst:122 msgid "This is the base class for the other SAX exception classes." msgstr "" -#: ../../../library/xml.sax.rst:113 +#: ../../../library/xml.sax.rst:127 msgid "" "Subclass of :exc:`SAXException` raised on parse errors. Instances of this " "class are passed to the methods of the SAX :class:`~xml.sax.handler." @@ -156,14 +168,14 @@ msgid "" "as the :class:`SAXException` interface." msgstr "" -#: ../../../library/xml.sax.rst:123 +#: ../../../library/xml.sax.rst:137 msgid "" "Subclass of :exc:`SAXException` raised when a SAX :class:`~xml.sax.xmlreader." "XMLReader` is confronted with an unrecognized feature or property. SAX " "applications and extensions may use this class for similar purposes." msgstr "" -#: ../../../library/xml.sax.rst:131 +#: ../../../library/xml.sax.rst:145 msgid "" "Subclass of :exc:`SAXException` raised when a SAX :class:`~xml.sax.xmlreader." "XMLReader` is asked to enable a feature that is not supported, or to set a " @@ -171,54 +183,62 @@ msgid "" "applications and extensions may use this class for similar purposes." msgstr "" -#: ../../../library/xml.sax.rst:140 +#: ../../../library/xml.sax.rst:154 +msgid "" +"Subclass of :exc:`SAXNotSupportedException` raised when no parser is " +"available. A parser module raises it when it is imported or during parsing " +"if the parser it provides cannot be used, and :func:`make_parser` raises it " +"if no module from the tried ones provides a usable parser." +msgstr "" + +#: ../../../library/xml.sax.rst:162 msgid "`SAX: The Simple API for XML `_" msgstr "" -#: ../../../library/xml.sax.rst:141 +#: ../../../library/xml.sax.rst:163 msgid "" "This site is the focal point for the definition of the SAX API. It provides " "a Java implementation and online documentation. Links to implementations " "and historical information are also available." msgstr "" -#: ../../../library/xml.sax.rst:145 +#: ../../../library/xml.sax.rst:167 msgid "Module :mod:`xml.sax.handler`" msgstr "" -#: ../../../library/xml.sax.rst:146 +#: ../../../library/xml.sax.rst:168 msgid "Definitions of the interfaces for application-provided objects." msgstr "" -#: ../../../library/xml.sax.rst:148 +#: ../../../library/xml.sax.rst:170 msgid "Module :mod:`xml.sax.saxutils`" msgstr "" -#: ../../../library/xml.sax.rst:149 +#: ../../../library/xml.sax.rst:171 msgid "Convenience functions for use in SAX applications." msgstr "" -#: ../../../library/xml.sax.rst:151 +#: ../../../library/xml.sax.rst:173 msgid "Module :mod:`xml.sax.xmlreader`" msgstr "" -#: ../../../library/xml.sax.rst:152 +#: ../../../library/xml.sax.rst:174 msgid "Definitions of the interfaces for parser-provided objects." msgstr "" -#: ../../../library/xml.sax.rst:158 +#: ../../../library/xml.sax.rst:180 msgid "SAXException Objects" msgstr "" -#: ../../../library/xml.sax.rst:160 +#: ../../../library/xml.sax.rst:182 msgid "" "The :class:`SAXException` exception class supports the following methods:" msgstr "" -#: ../../../library/xml.sax.rst:165 +#: ../../../library/xml.sax.rst:187 msgid "Return a human-readable message describing the error condition." msgstr "" -#: ../../../library/xml.sax.rst:170 +#: ../../../library/xml.sax.rst:192 msgid "Return an encapsulated exception object, or ``None``." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/xml.sax.reader.pot b/main/locale/pot/LC_MESSAGES/library/xml.sax.reader.pot index 473e7a8556a..8feaa0b75a0 100644 --- a/main/locale/pot/LC_MESSAGES/library/xml.sax.reader.pot +++ b/main/locale/pot/LC_MESSAGES/library/xml.sax.reader.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-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -254,122 +254,130 @@ msgstr "" #: ../../../library/xml.sax.reader.rst:221 msgid "" +"Prepare the parser for parsing *source*, an :class:`InputSource` instance. " +"It is called by :meth:`~XMLReader.parse` before feeding the data. The parser " +"implementation must override this method; the default implementation raises :" +"exc:`NotImplementedError`." +msgstr "" + +#: ../../../library/xml.sax.reader.rst:230 +msgid "" "This method is called after close has been called to reset the parser so " "that it is ready to parse new documents. The results of calling parse or " "feed after close without calling reset are undefined." msgstr "" -#: ../../../library/xml.sax.reader.rst:229 +#: ../../../library/xml.sax.reader.rst:238 msgid "Locator Objects" msgstr "" -#: ../../../library/xml.sax.reader.rst:231 +#: ../../../library/xml.sax.reader.rst:240 msgid "Instances of :class:`Locator` provide these methods:" msgstr "" -#: ../../../library/xml.sax.reader.rst:236 +#: ../../../library/xml.sax.reader.rst:245 msgid "Return the column number where the current event begins." msgstr "" -#: ../../../library/xml.sax.reader.rst:241 +#: ../../../library/xml.sax.reader.rst:250 msgid "Return the line number where the current event begins." msgstr "" -#: ../../../library/xml.sax.reader.rst:246 +#: ../../../library/xml.sax.reader.rst:255 msgid "Return the public identifier for the current event." msgstr "" -#: ../../../library/xml.sax.reader.rst:251 +#: ../../../library/xml.sax.reader.rst:260 msgid "Return the system identifier for the current event." msgstr "" -#: ../../../library/xml.sax.reader.rst:257 +#: ../../../library/xml.sax.reader.rst:266 msgid "InputSource Objects" msgstr "" -#: ../../../library/xml.sax.reader.rst:262 +#: ../../../library/xml.sax.reader.rst:271 msgid "Sets the public identifier of this :class:`InputSource`." msgstr "" -#: ../../../library/xml.sax.reader.rst:267 +#: ../../../library/xml.sax.reader.rst:276 msgid "Returns the public identifier of this :class:`InputSource`." msgstr "" -#: ../../../library/xml.sax.reader.rst:272 +#: ../../../library/xml.sax.reader.rst:281 msgid "Sets the system identifier of this :class:`InputSource`." msgstr "" -#: ../../../library/xml.sax.reader.rst:277 +#: ../../../library/xml.sax.reader.rst:286 msgid "Returns the system identifier of this :class:`InputSource`." msgstr "" -#: ../../../library/xml.sax.reader.rst:282 +#: ../../../library/xml.sax.reader.rst:291 msgid "Sets the character encoding of this :class:`InputSource`." msgstr "" -#: ../../../library/xml.sax.reader.rst:284 +#: ../../../library/xml.sax.reader.rst:293 msgid "" "The encoding must be a string acceptable for an XML encoding declaration " "(see section 4.3.3 of the XML recommendation)." msgstr "" -#: ../../../library/xml.sax.reader.rst:287 +#: ../../../library/xml.sax.reader.rst:296 msgid "" "The encoding attribute of the :class:`InputSource` is ignored if the :class:" "`InputSource` also contains a character stream." msgstr "" -#: ../../../library/xml.sax.reader.rst:293 +#: ../../../library/xml.sax.reader.rst:302 msgid "Get the character encoding of this InputSource." msgstr "" -#: ../../../library/xml.sax.reader.rst:298 +#: ../../../library/xml.sax.reader.rst:307 msgid "Set the byte stream (a :term:`binary file`) for this input source." msgstr "" -#: ../../../library/xml.sax.reader.rst:300 +#: ../../../library/xml.sax.reader.rst:309 msgid "" "The SAX parser will ignore this if there is also a character stream " "specified, but it will use a byte stream in preference to opening a URI " "connection itself." msgstr "" -#: ../../../library/xml.sax.reader.rst:303 +#: ../../../library/xml.sax.reader.rst:312 msgid "" "If the application knows the character encoding of the byte stream, it " "should set it with the setEncoding method." msgstr "" -#: ../../../library/xml.sax.reader.rst:309 +#: ../../../library/xml.sax.reader.rst:318 msgid "Get the byte stream for this input source." msgstr "" -#: ../../../library/xml.sax.reader.rst:311 +#: ../../../library/xml.sax.reader.rst:320 msgid "" "The getEncoding method will return the character encoding for this byte " "stream, or ``None`` if unknown." msgstr "" -#: ../../../library/xml.sax.reader.rst:317 +#: ../../../library/xml.sax.reader.rst:326 msgid "Set the character stream (a :term:`text file`) for this input source." msgstr "" -#: ../../../library/xml.sax.reader.rst:319 +#: ../../../library/xml.sax.reader.rst:328 msgid "" "If there is a character stream specified, the SAX parser will ignore any " "byte stream and will not attempt to open a URI connection to the system " "identifier." msgstr "" -#: ../../../library/xml.sax.reader.rst:325 +#: ../../../library/xml.sax.reader.rst:334 msgid "Get the character stream for this input source." msgstr "" -#: ../../../library/xml.sax.reader.rst:331 +#: ../../../library/xml.sax.reader.rst:340 msgid "The :class:`Attributes` Interface" msgstr "" -#: ../../../library/xml.sax.reader.rst:333 +#: ../../../library/xml.sax.reader.rst:342 msgid "" ":class:`Attributes` objects implement a portion of the :term:`mapping " "protocol `, including the methods :meth:`~collections.abc.Mapping." @@ -379,50 +387,50 @@ msgid "" "are also provided:" msgstr "" -#: ../../../library/xml.sax.reader.rst:343 +#: ../../../library/xml.sax.reader.rst:352 msgid "Return the number of attributes." msgstr "" -#: ../../../library/xml.sax.reader.rst:348 +#: ../../../library/xml.sax.reader.rst:357 msgid "Return the names of the attributes." msgstr "" -#: ../../../library/xml.sax.reader.rst:353 +#: ../../../library/xml.sax.reader.rst:362 msgid "" "Returns the type of the attribute *name*, which is normally ``'CDATA'``." msgstr "" -#: ../../../library/xml.sax.reader.rst:358 +#: ../../../library/xml.sax.reader.rst:367 msgid "Return the value of attribute *name*." msgstr "" -#: ../../../library/xml.sax.reader.rst:367 +#: ../../../library/xml.sax.reader.rst:376 msgid "The :class:`AttributesNS` Interface" msgstr "" -#: ../../../library/xml.sax.reader.rst:369 +#: ../../../library/xml.sax.reader.rst:378 msgid "" "This interface is a subtype of the :class:`Attributes` interface (see " "section :ref:`attributes-objects`). All methods supported by that interface " "are also available on :class:`AttributesNS` objects." msgstr "" -#: ../../../library/xml.sax.reader.rst:373 +#: ../../../library/xml.sax.reader.rst:382 msgid "The following methods are also available:" msgstr "" -#: ../../../library/xml.sax.reader.rst:378 +#: ../../../library/xml.sax.reader.rst:387 msgid "Return the value for a qualified name." msgstr "" -#: ../../../library/xml.sax.reader.rst:383 +#: ../../../library/xml.sax.reader.rst:392 msgid "Return the ``(namespace, localname)`` pair for a qualified *name*." msgstr "" -#: ../../../library/xml.sax.reader.rst:388 +#: ../../../library/xml.sax.reader.rst:397 msgid "Return the qualified name for a ``(namespace, localname)`` pair." msgstr "" -#: ../../../library/xml.sax.reader.rst:393 +#: ../../../library/xml.sax.reader.rst:402 msgid "Return the qualified names of all attributes." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/xml.sax.utils.pot b/main/locale/pot/LC_MESSAGES/library/xml.sax.utils.pot index 82feb2bf1c5..d2716ec734a 100644 --- a/main/locale/pot/LC_MESSAGES/library/xml.sax.utils.pot +++ b/main/locale/pot/LC_MESSAGES/library/xml.sax.utils.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-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -108,7 +108,15 @@ msgid "" "stream or the configuration requests as they pass through." msgstr "" -#: ../../../library/xml.sax.utils.rst:87 +#: ../../../library/xml.sax.utils.rst:86 +msgid "Return the parent reader, or ``None`` if it is not set." +msgstr "" + +#: ../../../library/xml.sax.utils.rst:91 +msgid "Set the parent reader, which the events are read from." +msgstr "" + +#: ../../../library/xml.sax.utils.rst:96 msgid "" "This function takes an input source and an optional base URL and returns a " "fully resolved :class:`~xml.sax.xmlreader.InputSource` object ready for " diff --git a/main/locale/pot/LC_MESSAGES/reference/expressions.pot b/main/locale/pot/LC_MESSAGES/reference/expressions.pot index d2652841a12..bd87d54bc65 100644 --- a/main/locale/pot/LC_MESSAGES/reference/expressions.pot +++ b/main/locale/pot/LC_MESSAGES/reference/expressions.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1064,133 +1064,34 @@ msgid "" "coroutine functions." msgstr "" -#: ../../../reference/expressions.rst:1186 -msgid "Generator-iterator methods" -msgstr "" - -#: ../../../reference/expressions.rst:1188 -msgid "" -"This subsection describes the methods of a generator iterator. They can be " -"used to control the execution of a generator function." -msgstr "" - -#: ../../../reference/expressions.rst:1191 -msgid "" -"Note that calling any of the generator methods below when the generator is " -"already executing raises a :exc:`ValueError` exception." -msgstr "" - -#: ../../../reference/expressions.rst:1199 -msgid "" -"Starts the execution of a generator function or resumes it at the last " -"executed yield expression. When a generator function is resumed with a :" -"meth:`~generator.__next__` method, the current yield expression always " -"evaluates to :const:`None`. The execution then continues to the next yield " -"expression, where the generator is suspended again, and the value of the :" -"token:`~python-grammar:yield_list` is returned to :meth:`__next__`'s " -"caller. If the generator exits without yielding another value, a :exc:" -"`StopIteration` exception is raised." -msgstr "" - -#: ../../../reference/expressions.rst:1208 -msgid "" -"This method is normally called implicitly, e.g. by a :keyword:`for` loop, or " -"by the built-in :func:`next` function." -msgstr "" - -#: ../../../reference/expressions.rst:1214 -msgid "" -"Resumes the execution and \"sends\" a value into the generator function. " -"The *value* argument becomes the result of the current yield expression. " -"The :meth:`send` method returns the next value yielded by the generator, or " -"raises :exc:`StopIteration` if the generator exits without yielding another " -"value. When :meth:`send` is called to start the generator, it must be " -"called with :const:`None` as the argument, because there is no yield " -"expression that could receive the value." -msgstr "" - -#: ../../../reference/expressions.rst:1226 -msgid "" -"Raises an exception at the point where the generator was paused, and returns " -"the next value yielded by the generator function. If the generator exits " -"without yielding another value, a :exc:`StopIteration` exception is raised. " -"If the generator function does not catch the passed-in exception, or raises " -"a different exception, then that exception propagates to the caller." -msgstr "" - -#: ../../../reference/expressions.rst:1232 -msgid "" -"In typical use, this is called with a single exception instance similar to " -"the way the :keyword:`raise` keyword is used." -msgstr "" - -#: ../../../reference/expressions.rst:1235 -msgid "" -"For backwards compatibility, however, the second signature is supported, " -"following a convention from older versions of Python. The *type* argument " -"should be an exception class, and *value* should be an exception instance. " -"If the *value* is not provided, the *type* constructor is called to get an " -"instance. If *traceback* is provided, it is set on the exception, otherwise " -"any existing :attr:`~BaseException.__traceback__` attribute stored in " -"*value* may be cleared." -msgstr "" - -#: ../../../reference/expressions.rst:1246 -#: ../../../reference/expressions.rst:1432 -msgid "" -"The second signature \\(type\\[, value\\[, traceback\\]\\]\\) is deprecated " -"and may be removed in a future version of Python." -msgstr "" - -#: ../../../reference/expressions.rst:1254 -msgid "" -"Raises a :exc:`GeneratorExit` exception at the point where the generator " -"function was paused (equivalent to calling ``throw(GeneratorExit)``). The " -"exception is raised by the yield expression where the generator was paused. " -"If the generator function catches the exception and returns a value, this " -"value is returned from :meth:`close`. If the generator function is already " -"closed, or raises :exc:`GeneratorExit` (by not catching the exception), :" -"meth:`close` returns :const:`None`. If the generator yields a value, a :exc:" -"`RuntimeError` is raised. If the generator raises any other exception, it " -"is propagated to the caller. If the generator has already exited due to an " -"exception or normal exit, :meth:`close` returns :const:`None` and has no " -"other effect." -msgstr "" - -#: ../../../reference/expressions.rst:1268 -msgid "" -"If a generator returns a value upon being closed, the value is returned by :" -"meth:`close`." -msgstr "" - -#: ../../../reference/expressions.rst:1274 +#: ../../../reference/expressions.rst:1185 msgid "Examples" msgstr "" -#: ../../../reference/expressions.rst:1276 +#: ../../../reference/expressions.rst:1187 msgid "" "Here is a simple example that demonstrates the behavior of generators and " "generator functions::" msgstr "" -#: ../../../reference/expressions.rst:1303 +#: ../../../reference/expressions.rst:1214 msgid "" "For examples using ``yield from``, see :ref:`pep-380` in \"What's New in " "Python.\"" msgstr "" -#: ../../../reference/expressions.rst:1309 +#: ../../../reference/expressions.rst:1220 msgid "Asynchronous generator functions" msgstr "" -#: ../../../reference/expressions.rst:1311 +#: ../../../reference/expressions.rst:1222 msgid "" "The presence of a yield expression in a function or method defined using :" "keyword:`async def` further defines the function as an :term:`asynchronous " "generator` function." msgstr "" -#: ../../../reference/expressions.rst:1315 +#: ../../../reference/expressions.rst:1226 msgid "" "When an asynchronous generator function is called, it returns an " "asynchronous iterator known as an asynchronous generator object. That object " @@ -1200,7 +1101,7 @@ msgid "" "keyword:`for` statement." msgstr "" -#: ../../../reference/expressions.rst:1322 +#: ../../../reference/expressions.rst:1233 msgid "" "Calling one of the asynchronous generator's methods returns an :term:" "`awaitable` object, and the execution starts when this object is awaited on. " @@ -1218,7 +1119,7 @@ msgid "" "then the result will be the value passed in to that method." msgstr "" -#: ../../../reference/expressions.rst:1337 +#: ../../../reference/expressions.rst:1248 msgid "" "If an asynchronous generator happens to exit early by :keyword:`break`, the " "caller task being cancelled, or other exceptions, the generator's async " @@ -1230,7 +1131,7 @@ msgid "" "generator and ultimately detach it from the event loop." msgstr "" -#: ../../../reference/expressions.rst:1347 +#: ../../../reference/expressions.rst:1258 msgid "" "In an asynchronous generator function, yield expressions are allowed " "anywhere in a :keyword:`try` construct. However, if an asynchronous " @@ -1244,7 +1145,7 @@ msgid "" "finally` clauses to execute." msgstr "" -#: ../../../reference/expressions.rst:1358 +#: ../../../reference/expressions.rst:1269 msgid "" "To take care of finalization upon event loop termination, an event loop " "should define a *finalizer* function which takes an asynchronous generator-" @@ -1257,104 +1158,31 @@ msgid "" "asyncio/base_events.py`." msgstr "" -#: ../../../reference/expressions.rst:1367 +#: ../../../reference/expressions.rst:1278 msgid "" "The expression ``yield from `` is a syntax error when used in an " "asynchronous generator function." msgstr "" -#: ../../../reference/expressions.rst:1374 -msgid "Asynchronous generator-iterator methods" -msgstr "" - -#: ../../../reference/expressions.rst:1376 -msgid "" -"This subsection describes the methods of an asynchronous generator iterator, " -"which are used to control the execution of a generator function." -msgstr "" - -#: ../../../reference/expressions.rst:1385 -msgid "" -"Returns an awaitable which when run starts to execute the asynchronous " -"generator or resumes it at the last executed yield expression. When an " -"asynchronous generator function is resumed with an :meth:`~agen.__anext__` " -"method, the current yield expression always evaluates to :const:`None` in " -"the returned awaitable, which when run will continue to the next yield " -"expression. The value of the :token:`~python-grammar:yield_list` of the " -"yield expression is the value of the :exc:`StopIteration` exception raised " -"by the completing coroutine. If the asynchronous generator exits without " -"yielding another value, the awaitable instead raises a :exc:" -"`StopAsyncIteration` exception, signalling that the asynchronous iteration " -"has completed." -msgstr "" - -#: ../../../reference/expressions.rst:1397 -msgid "" -"This method is normally called implicitly by a :keyword:`async for` loop." -msgstr "" - -#: ../../../reference/expressions.rst:1403 -msgid "" -"Returns an awaitable which when run resumes the execution of the " -"asynchronous generator. As with the :meth:`~generator.send` method for a " -"generator, this \"sends\" a value into the asynchronous generator function, " -"and the *value* argument becomes the result of the current yield expression. " -"The awaitable returned by the :meth:`asend` method will return the next " -"value yielded by the generator as the value of the raised :exc:" -"`StopIteration`, or raises :exc:`StopAsyncIteration` if the asynchronous " -"generator exits without yielding another value. When :meth:`asend` is " -"called to start the asynchronous generator, it must be called with :const:" -"`None` as the argument, because there is no yield expression that could " -"receive the value." -msgstr "" - -#: ../../../reference/expressions.rst:1420 -msgid "" -"Returns an awaitable that raises an exception of type ``type`` at the point " -"where the asynchronous generator was paused, and returns the next value " -"yielded by the generator function as the value of the raised :exc:" -"`StopIteration` exception. If the asynchronous generator exits without " -"yielding another value, a :exc:`StopAsyncIteration` exception is raised by " -"the awaitable. If the generator function does not catch the passed-in " -"exception, or raises a different exception, then when the awaitable is run " -"that exception propagates to the caller of the awaitable." -msgstr "" - -#: ../../../reference/expressions.rst:1441 -msgid "" -"Returns an awaitable that when run will throw a :exc:`GeneratorExit` into " -"the asynchronous generator function at the point where it was paused. If the " -"asynchronous generator function then exits gracefully, is already closed, or " -"raises :exc:`GeneratorExit` (by not catching the exception), then the " -"returned awaitable will raise a :exc:`StopIteration` exception. Any further " -"awaitables returned by subsequent calls to the asynchronous generator will " -"raise a :exc:`StopAsyncIteration` exception. If the asynchronous generator " -"yields a value, a :exc:`RuntimeError` is raised by the awaitable. If the " -"asynchronous generator raises any other exception, it is propagated to the " -"caller of the awaitable. If the asynchronous generator has already exited " -"due to an exception or normal exit, then further calls to :meth:`aclose` " -"will return an awaitable that does nothing." -msgstr "" - -#: ../../../reference/expressions.rst:1457 +#: ../../../reference/expressions.rst:1284 msgid "Primaries" msgstr "" -#: ../../../reference/expressions.rst:1461 +#: ../../../reference/expressions.rst:1288 msgid "" "Primaries represent the most tightly bound operations of the language. Their " "syntax is:" msgstr "" -#: ../../../reference/expressions.rst:1471 +#: ../../../reference/expressions.rst:1298 msgid "Attribute references" msgstr "" -#: ../../../reference/expressions.rst:1477 +#: ../../../reference/expressions.rst:1304 msgid "An attribute reference is a primary followed by a period and a name:" msgstr "" -#: ../../../reference/expressions.rst:1487 +#: ../../../reference/expressions.rst:1314 msgid "" "The primary must evaluate to an object of a type that supports attribute " "references, which most objects do. This object is then asked to produce the " @@ -1363,7 +1191,7 @@ msgid "" "reference may yield different objects." msgstr "" -#: ../../../reference/expressions.rst:1493 +#: ../../../reference/expressions.rst:1320 msgid "" "This production can be customized by overriding the :meth:`~object." "__getattribute__` method or the :meth:`~object.__getattr__` method. The :" @@ -1371,31 +1199,31 @@ msgid "" "or raises :exc:`AttributeError` if the attribute is not available." msgstr "" -#: ../../../reference/expressions.rst:1499 +#: ../../../reference/expressions.rst:1326 msgid "" "If an :exc:`AttributeError` is raised and the object has a :meth:`!" "__getattr__` method, that method is called as a fallback." msgstr "" -#: ../../../reference/expressions.rst:1505 +#: ../../../reference/expressions.rst:1332 msgid "Subscriptions and slicings" msgstr "" -#: ../../../reference/expressions.rst:1520 +#: ../../../reference/expressions.rst:1347 msgid "" "The :dfn:`subscription` syntax is usually used for selecting an element from " "a :ref:`container ` -- for example, to get a value from a :" "class:`dict`::" msgstr "" -#: ../../../reference/expressions.rst:1528 +#: ../../../reference/expressions.rst:1355 msgid "" "In the subscription syntax, the object being subscribed -- a :ref:`primary " "` -- is followed by a :dfn:`subscript` in square brackets. In the " "simplest case, the subscript is a single expression." msgstr "" -#: ../../../reference/expressions.rst:1533 +#: ../../../reference/expressions.rst:1360 msgid "" "Depending on the type of the object being subscribed, the subscript is " "sometimes called a :term:`key` (for mappings), :term:`index` (for " @@ -1403,7 +1231,7 @@ msgid "" "Syntactically, these are all equivalent::" msgstr "" -#: ../../../reference/expressions.rst:1545 +#: ../../../reference/expressions.rst:1372 msgid "" "At runtime, the interpreter will evaluate the primary and the subscript, and " "call the primary's :meth:`~object.__getitem__` or :meth:`~object." @@ -1412,20 +1240,20 @@ msgid "" "versus-getitem`." msgstr "" -#: ../../../reference/expressions.rst:1552 +#: ../../../reference/expressions.rst:1379 msgid "" "To show how subscription works, we can define a custom object that " "implements :meth:`~object.__getitem__` and prints out the value of the " "subscript::" msgstr "" -#: ../../../reference/expressions.rst:1566 +#: ../../../reference/expressions.rst:1393 msgid "" "See :meth:`~object.__getitem__` documentation for how built-in types handle " "subscription." msgstr "" -#: ../../../reference/expressions.rst:1569 +#: ../../../reference/expressions.rst:1396 msgid "" "Subscriptions may also be used as targets in :ref:`assignment ` " "or :ref:`deletion ` statements. In these cases, the interpreter will " @@ -1434,17 +1262,17 @@ msgid "" "__getitem__`." msgstr "" -#: ../../../reference/expressions.rst:1585 +#: ../../../reference/expressions.rst:1412 msgid "" "All advanced forms of *subscript* documented in the following sections are " "also usable for assignment and deletion." msgstr "" -#: ../../../reference/expressions.rst:1604 +#: ../../../reference/expressions.rst:1431 msgid "Slicings" msgstr "" -#: ../../../reference/expressions.rst:1606 +#: ../../../reference/expressions.rst:1433 msgid "" "A more advanced form of subscription, :dfn:`slicing`, is commonly used to " "extract a portion of a :ref:`sequence `. In this form, " @@ -1453,7 +1281,7 @@ msgid "" "least one colon::" msgstr "" -#: ../../../reference/expressions.rst:1630 +#: ../../../reference/expressions.rst:1457 msgid "" "When a slice is evaluated, the interpreter constructs a :class:`slice` " "object whose :attr:`~slice.start`, :attr:`~slice.stop` and :attr:`~slice." @@ -1463,17 +1291,17 @@ msgid "" "`~object.__class_getitem__` :term:`special method`, as above. ::" msgstr "" -#: ../../../reference/expressions.rst:1646 +#: ../../../reference/expressions.rst:1473 msgid "Comma-separated subscripts" msgstr "" -#: ../../../reference/expressions.rst:1648 +#: ../../../reference/expressions.rst:1475 msgid "" "The subscript can also be given as two or more comma-separated expressions " "or slices::" msgstr "" -#: ../../../reference/expressions.rst:1657 +#: ../../../reference/expressions.rst:1484 msgid "" "This form is commonly used with numerical libraries for slicing multi-" "dimensional data. In this case, the interpreter constructs a :class:`tuple` " @@ -1482,61 +1310,61 @@ msgid "" "`special method`, as above." msgstr "" -#: ../../../reference/expressions.rst:1663 +#: ../../../reference/expressions.rst:1490 msgid "" "The subscript may also be given as a single expression or slice followed by " "a comma, to specify a one-element tuple::" msgstr "" -#: ../../../reference/expressions.rst:1671 +#: ../../../reference/expressions.rst:1498 msgid "\"Starred\" subscriptions" msgstr "" -#: ../../../reference/expressions.rst:1673 +#: ../../../reference/expressions.rst:1500 msgid "Expressions in *tuple_slices* may be starred. See :pep:`646`." msgstr "" -#: ../../../reference/expressions.rst:1676 +#: ../../../reference/expressions.rst:1503 msgid "" "The subscript can also contain a starred expression. In this case, the " "interpreter unpacks the result into a tuple, and passes this tuple to :meth:" "`~object.__getitem__` or :meth:`~object.__class_getitem__`::" msgstr "" -#: ../../../reference/expressions.rst:1684 +#: ../../../reference/expressions.rst:1511 msgid "" "Starred expressions may be combined with comma-separated expressions and " "slices::" msgstr "" -#: ../../../reference/expressions.rst:1692 +#: ../../../reference/expressions.rst:1519 msgid "Formal subscription grammar" msgstr "" -#: ../../../reference/expressions.rst:1703 +#: ../../../reference/expressions.rst:1530 msgid "" "Recall that the ``|`` operator :ref:`denotes ordered choice `. " "Specifically, in :token:`!subscript`, if both alternatives would match, the " "first (:token:`!single_subscript`) has priority." msgstr "" -#: ../../../reference/expressions.rst:1718 +#: ../../../reference/expressions.rst:1545 msgid "Calls" msgstr "" -#: ../../../reference/expressions.rst:1720 +#: ../../../reference/expressions.rst:1547 msgid "" "A call calls a callable object (e.g., a :term:`function`) with a possibly " "empty series of :term:`arguments `:" msgstr "" -#: ../../../reference/expressions.rst:1737 +#: ../../../reference/expressions.rst:1564 msgid "" "An optional trailing comma may be present after the positional and keyword " "arguments but does not affect the semantics." msgstr "" -#: ../../../reference/expressions.rst:1743 +#: ../../../reference/expressions.rst:1570 msgid "" "The primary must evaluate to a callable object (user-defined functions, " "built-in functions, methods of built-in objects, class objects, methods of " @@ -1546,7 +1374,7 @@ msgid "" "formal :term:`parameter` lists." msgstr "" -#: ../../../reference/expressions.rst:1751 +#: ../../../reference/expressions.rst:1578 msgid "" "If keyword arguments are present, they are first converted to positional " "arguments, as follows. First, a list of unfilled slots is created for the " @@ -1567,7 +1395,7 @@ msgid "" "filled slots is used as the argument list for the call." msgstr "" -#: ../../../reference/expressions.rst:1771 +#: ../../../reference/expressions.rst:1598 msgid "" "An implementation may provide built-in functions whose positional parameters " "do not have names, even if they are 'named' for the purpose of " @@ -1576,7 +1404,7 @@ msgid "" "`PyArg_ParseTuple` to parse their arguments." msgstr "" -#: ../../../reference/expressions.rst:1777 +#: ../../../reference/expressions.rst:1604 msgid "" "If there are more positional arguments than there are formal parameter " "slots, a :exc:`TypeError` exception is raised, unless a formal parameter " @@ -1585,7 +1413,7 @@ msgid "" "empty tuple if there were no excess positional arguments)." msgstr "" -#: ../../../reference/expressions.rst:1783 +#: ../../../reference/expressions.rst:1610 msgid "" "If any keyword argument does not correspond to a formal parameter name, a :" "exc:`TypeError` exception is raised, unless a formal parameter using the " @@ -1595,7 +1423,7 @@ msgid "" "(new) empty dictionary if there were no excess keyword arguments." msgstr "" -#: ../../../reference/expressions.rst:1794 +#: ../../../reference/expressions.rst:1621 msgid "" "If the syntax ``*expression`` appears in the function call, ``expression`` " "must evaluate to an :term:`iterable`. Elements from these iterables are " @@ -1605,20 +1433,20 @@ msgid "" "*y1*, ..., *yM*, *x3*, *x4*." msgstr "" -#: ../../../reference/expressions.rst:1801 +#: ../../../reference/expressions.rst:1628 msgid "" "A consequence of this is that although the ``*expression`` syntax may appear " "*after* explicit keyword arguments, it is processed *before* the keyword " "arguments (and any ``**expression`` arguments -- see below). So::" msgstr "" -#: ../../../reference/expressions.rst:1817 +#: ../../../reference/expressions.rst:1644 msgid "" "It is unusual for both keyword arguments and the ``*expression`` syntax to " "be used in the same call, so in practice this confusion does not often arise." msgstr "" -#: ../../../reference/expressions.rst:1823 +#: ../../../reference/expressions.rst:1650 msgid "" "If the syntax ``**expression`` appears in the function call, ``expression`` " "must evaluate to a :term:`mapping`, the contents of which are treated as " @@ -1627,7 +1455,7 @@ msgid "" "a :exc:`TypeError` exception is raised." msgstr "" -#: ../../../reference/expressions.rst:1829 +#: ../../../reference/expressions.rst:1656 msgid "" "When ``**expression`` is used, each key in this mapping must be a string. " "Each value from the mapping is assigned to the first formal parameter " @@ -1639,35 +1467,35 @@ msgid "" "is raised." msgstr "" -#: ../../../reference/expressions.rst:1839 +#: ../../../reference/expressions.rst:1666 msgid "" "Formal parameters using the syntax ``*identifier`` or ``**identifier`` " "cannot be used as positional argument slots or as keyword argument names." msgstr "" -#: ../../../reference/expressions.rst:1842 +#: ../../../reference/expressions.rst:1669 msgid "" "Function calls accept any number of ``*`` and ``**`` unpackings, positional " "arguments may follow iterable unpackings (``*``), and keyword arguments may " "follow dictionary unpackings (``**``). Originally proposed by :pep:`448`." msgstr "" -#: ../../../reference/expressions.rst:1848 +#: ../../../reference/expressions.rst:1675 msgid "" "A call always returns some value, possibly ``None``, unless it raises an " "exception. How this value is computed depends on the type of the callable " "object." msgstr "" -#: ../../../reference/expressions.rst:1852 +#: ../../../reference/expressions.rst:1679 msgid "If it is---" msgstr "" -#: ../../../reference/expressions.rst:1854 +#: ../../../reference/expressions.rst:1681 msgid "a user-defined function:" msgstr "" -#: ../../../reference/expressions.rst:1861 +#: ../../../reference/expressions.rst:1688 msgid "" "The code block for the function is executed, passing it the argument list. " "The first thing the code block will do is bind the formal parameters to the " @@ -1678,74 +1506,74 @@ msgid "" "``None``." msgstr "" -#: ../../../reference/expressions.rst:1868 +#: ../../../reference/expressions.rst:1695 msgid "a built-in function or method:" msgstr "" -#: ../../../reference/expressions.rst:1879 +#: ../../../reference/expressions.rst:1706 msgid "" "The result is up to the interpreter; see :ref:`built-in-funcs` for the " "descriptions of built-in functions and methods." msgstr "" -#: ../../../reference/expressions.rst:1882 +#: ../../../reference/expressions.rst:1709 msgid "a class object:" msgstr "" -#: ../../../reference/expressions.rst:1887 +#: ../../../reference/expressions.rst:1714 msgid "A new instance of that class is returned." msgstr "" -#: ../../../reference/expressions.rst:1889 +#: ../../../reference/expressions.rst:1716 msgid "a class instance method:" msgstr "" -#: ../../../reference/expressions.rst:1895 +#: ../../../reference/expressions.rst:1722 msgid "" "The corresponding user-defined function is called, with an argument list " "that is one longer than the argument list of the call: the instance becomes " "the first argument." msgstr "" -#: ../../../reference/expressions.rst:1899 +#: ../../../reference/expressions.rst:1726 msgid "a class instance:" msgstr "" -#: ../../../reference/expressions.rst:1904 +#: ../../../reference/expressions.rst:1731 msgid "" "The class must define a :meth:`~object.__call__` method; the effect is then " "the same as if that method was called." msgstr "" -#: ../../../reference/expressions.rst:1912 -#: ../../../reference/expressions.rst:2749 +#: ../../../reference/expressions.rst:1739 +#: ../../../reference/expressions.rst:2576 msgid "Await expression" msgstr "" -#: ../../../reference/expressions.rst:1914 +#: ../../../reference/expressions.rst:1741 msgid "" "Suspend the execution of :term:`coroutine` on an :term:`awaitable` object. " "Can only be used inside a :term:`coroutine function`." msgstr "" -#: ../../../reference/expressions.rst:1926 +#: ../../../reference/expressions.rst:1753 msgid "The power operator" msgstr "" -#: ../../../reference/expressions.rst:1932 +#: ../../../reference/expressions.rst:1759 msgid "" "The power operator binds more tightly than unary operators on its left; it " "binds less tightly than unary operators on its right. The syntax is:" msgstr "" -#: ../../../reference/expressions.rst:1938 +#: ../../../reference/expressions.rst:1765 msgid "" "Thus, in an unparenthesized sequence of power and unary operators, the " "operators are evaluated from right to left (this does not constrain the " "evaluation order for the operands): ``-1**2`` results in ``-1``." msgstr "" -#: ../../../reference/expressions.rst:1942 +#: ../../../reference/expressions.rst:1769 msgid "" "The power operator has the same semantics as the built-in :func:`pow` " "function, when called with two arguments: it yields its left argument raised " @@ -1754,7 +1582,7 @@ msgid "" "of that type." msgstr "" -#: ../../../reference/expressions.rst:1948 +#: ../../../reference/expressions.rst:1775 msgid "" "For int operands, the result has the same type as the operands unless the " "second argument is negative; in that case, all arguments are converted to " @@ -1762,41 +1590,41 @@ msgid "" "``100``, but ``10**-2`` returns ``0.01``." msgstr "" -#: ../../../reference/expressions.rst:1953 +#: ../../../reference/expressions.rst:1780 msgid "" "Raising ``0.0`` to a negative power results in a :exc:`ZeroDivisionError`. " "Raising a negative number to a fractional power results in a :class:" "`complex` number. (In earlier versions it raised a :exc:`ValueError`.)" msgstr "" -#: ../../../reference/expressions.rst:1957 +#: ../../../reference/expressions.rst:1784 msgid "" "This operation can be customized using the special :meth:`~object.__pow__` " "and :meth:`~object.__rpow__` methods." msgstr "" -#: ../../../reference/expressions.rst:1963 +#: ../../../reference/expressions.rst:1790 msgid "Unary arithmetic and bitwise operations" msgstr "" -#: ../../../reference/expressions.rst:1969 +#: ../../../reference/expressions.rst:1796 msgid "All unary arithmetic and bitwise operations have the same priority:" msgstr "" -#: ../../../reference/expressions.rst:1980 +#: ../../../reference/expressions.rst:1807 msgid "" "The unary ``-`` (minus) operator yields the negation of its numeric " "argument; the operation can be overridden with the :meth:`~object.__neg__` " "special method." msgstr "" -#: ../../../reference/expressions.rst:1988 +#: ../../../reference/expressions.rst:1815 msgid "" "The unary ``+`` (plus) operator yields its numeric argument unchanged; the " "operation can be overridden with the :meth:`~object.__pos__` special method." msgstr "" -#: ../../../reference/expressions.rst:1995 +#: ../../../reference/expressions.rst:1822 msgid "" "The unary ``~`` (invert) operator yields the bitwise inversion of its " "integer argument. The bitwise inversion of ``x`` is defined as ``-(x+1)``. " @@ -1804,17 +1632,17 @@ msgid "" "meth:`~object.__invert__` special method." msgstr "" -#: ../../../reference/expressions.rst:2004 +#: ../../../reference/expressions.rst:1831 msgid "" "In all three cases, if the argument does not have the proper type, a :exc:" "`TypeError` exception is raised." msgstr "" -#: ../../../reference/expressions.rst:2011 +#: ../../../reference/expressions.rst:1838 msgid "Binary arithmetic operations" msgstr "" -#: ../../../reference/expressions.rst:2015 +#: ../../../reference/expressions.rst:1842 msgid "" "The binary arithmetic operations have the conventional priority levels. " "Note that some of these operations also apply to certain non-numeric types. " @@ -1822,7 +1650,7 @@ msgid "" "multiplicative operators and one for additive operators:" msgstr "" -#: ../../../reference/expressions.rst:2030 +#: ../../../reference/expressions.rst:1857 msgid "" "The ``*`` (multiplication) operator yields the product of its arguments. " "The arguments must either both be numbers, or one argument must be an " @@ -1832,33 +1660,33 @@ msgid "" "performed; a negative repetition factor yields an empty sequence." msgstr "" -#: ../../../reference/expressions.rst:2037 +#: ../../../reference/expressions.rst:1864 msgid "" "This operation can be customized using the special :meth:`~object.__mul__` " "and :meth:`~object.__rmul__` methods." msgstr "" -#: ../../../reference/expressions.rst:2040 -#: ../../../reference/expressions.rst:2121 -#: ../../../reference/expressions.rst:2137 +#: ../../../reference/expressions.rst:1867 +#: ../../../reference/expressions.rst:1948 +#: ../../../reference/expressions.rst:1964 msgid "" "If only one operand is a complex number, the other operand is converted to a " "floating-point number." msgstr "" -#: ../../../reference/expressions.rst:2048 +#: ../../../reference/expressions.rst:1875 msgid "" "The ``@`` (at) operator is intended to be used for matrix multiplication. " "No builtin Python types implement this operator." msgstr "" -#: ../../../reference/expressions.rst:2051 +#: ../../../reference/expressions.rst:1878 msgid "" "This operation can be customized using the special :meth:`~object." "__matmul__` and :meth:`~object.__rmatmul__` methods." msgstr "" -#: ../../../reference/expressions.rst:2062 +#: ../../../reference/expressions.rst:1889 msgid "" "The ``/`` (division) and ``//`` (floor division) operators yield the " "quotient of their arguments. The numeric arguments are first :ref:" @@ -1869,7 +1697,7 @@ msgid "" "`ZeroDivisionError` exception." msgstr "" -#: ../../../reference/expressions.rst:2070 +#: ../../../reference/expressions.rst:1897 msgid "" "The division operation can be customized using the special :meth:`~object." "__truediv__` and :meth:`~object.__rtruediv__` methods. The floor division " @@ -1877,7 +1705,7 @@ msgid "" "and :meth:`~object.__rfloordiv__` methods." msgstr "" -#: ../../../reference/expressions.rst:2079 +#: ../../../reference/expressions.rst:1906 msgid "" "The ``%`` (modulo) operator yields the remainder from the division of the " "first argument by the second. The numeric arguments are first :ref:" @@ -1890,7 +1718,7 @@ msgid "" "second operand [#]_." msgstr "" -#: ../../../reference/expressions.rst:2089 +#: ../../../reference/expressions.rst:1916 msgid "" "The floor division and modulo operators are connected by the following " "identity: ``x == (x//y)*y + (x%y)``. Floor division and modulo are also " @@ -1898,7 +1726,7 @@ msgid "" "y, x%y)``. [#]_." msgstr "" -#: ../../../reference/expressions.rst:2094 +#: ../../../reference/expressions.rst:1921 msgid "" "In addition to performing the modulo operation on numbers, the ``%`` " "operator is also overloaded by string objects to perform old-style string " @@ -1907,20 +1735,20 @@ msgid "" "formatting`." msgstr "" -#: ../../../reference/expressions.rst:2099 +#: ../../../reference/expressions.rst:1926 msgid "" "The *modulo* operation can be customized using the special :meth:`~object." "__mod__` and :meth:`~object.__rmod__` methods." msgstr "" -#: ../../../reference/expressions.rst:2102 +#: ../../../reference/expressions.rst:1929 msgid "" "The floor division operator, the modulo operator, and the :func:`divmod` " "function are not defined for complex numbers. Instead, convert to a " "floating-point number using the :func:`abs` function if appropriate." msgstr "" -#: ../../../reference/expressions.rst:2111 +#: ../../../reference/expressions.rst:1938 msgid "" "The ``+`` (addition) operator yields the sum of its arguments. The " "arguments must either both be numbers or both be sequences of the same " @@ -1929,41 +1757,41 @@ msgid "" "case, the sequences are concatenated." msgstr "" -#: ../../../reference/expressions.rst:2118 +#: ../../../reference/expressions.rst:1945 msgid "" "This operation can be customized using the special :meth:`~object.__add__` " "and :meth:`~object.__radd__` methods." msgstr "" -#: ../../../reference/expressions.rst:2130 +#: ../../../reference/expressions.rst:1957 msgid "" "The ``-`` (subtraction) operator yields the difference of its arguments. The " "numeric arguments are first :ref:`converted to a common real type `." msgstr "" -#: ../../../reference/expressions.rst:2134 +#: ../../../reference/expressions.rst:1961 msgid "" "This operation can be customized using the special :meth:`~object.__sub__` " "and :meth:`~object.__rsub__` methods." msgstr "" -#: ../../../reference/expressions.rst:2145 +#: ../../../reference/expressions.rst:1972 msgid "Shifting operations" msgstr "" -#: ../../../reference/expressions.rst:2152 +#: ../../../reference/expressions.rst:1979 msgid "" "The shifting operations have lower priority than the arithmetic operations:" msgstr "" -#: ../../../reference/expressions.rst:2157 +#: ../../../reference/expressions.rst:1984 msgid "" "These operators accept integers as arguments. They shift the first argument " "to the left or right by the number of bits given by the second argument." msgstr "" -#: ../../../reference/expressions.rst:2160 +#: ../../../reference/expressions.rst:1987 msgid "" "The left shift operation can be customized using the special :meth:`~object." "__lshift__` and :meth:`~object.__rlshift__` methods. The right shift " @@ -1971,46 +1799,46 @@ msgid "" "and :meth:`~object.__rrshift__` methods." msgstr "" -#: ../../../reference/expressions.rst:2167 +#: ../../../reference/expressions.rst:1994 msgid "" "A right shift by *n* bits is defined as floor division by ``pow(2,n)``. A " "left shift by *n* bits is defined as multiplication with ``pow(2,n)``." msgstr "" -#: ../../../reference/expressions.rst:2174 +#: ../../../reference/expressions.rst:2001 msgid "Binary bitwise operations" msgstr "" -#: ../../../reference/expressions.rst:2178 +#: ../../../reference/expressions.rst:2005 msgid "Each of the three bitwise operations has a different priority level:" msgstr "" -#: ../../../reference/expressions.rst:2189 +#: ../../../reference/expressions.rst:2016 msgid "" "The ``&`` operator yields the bitwise AND of its arguments, which must be " "integers or one of them must be a custom object overriding :meth:`~object." "__and__` or :meth:`~object.__rand__` special methods." msgstr "" -#: ../../../reference/expressions.rst:2198 +#: ../../../reference/expressions.rst:2025 msgid "" "The ``^`` operator yields the bitwise XOR (exclusive OR) of its arguments, " "which must be integers or one of them must be a custom object overriding :" "meth:`~object.__xor__` or :meth:`~object.__rxor__` special methods." msgstr "" -#: ../../../reference/expressions.rst:2207 +#: ../../../reference/expressions.rst:2034 msgid "" "The ``|`` operator yields the bitwise (inclusive) OR of its arguments, which " "must be integers or one of them must be a custom object overriding :meth:" "`~object.__or__` or :meth:`~object.__ror__` special methods." msgstr "" -#: ../../../reference/expressions.rst:2215 +#: ../../../reference/expressions.rst:2042 msgid "Comparisons" msgstr "" -#: ../../../reference/expressions.rst:2227 +#: ../../../reference/expressions.rst:2054 msgid "" "Unlike C, all comparison operations in Python have the same priority, which " "is lower than that of any arithmetic, shifting or bitwise operation. Also " @@ -2018,14 +1846,14 @@ msgid "" "conventional in mathematics:" msgstr "" -#: ../../../reference/expressions.rst:2237 +#: ../../../reference/expressions.rst:2064 msgid "" "Comparisons yield boolean values: ``True`` or ``False``. Custom :dfn:`rich " "comparison methods` may return non-boolean values. In this case Python will " "call :func:`bool` on such value in boolean contexts." msgstr "" -#: ../../../reference/expressions.rst:2243 +#: ../../../reference/expressions.rst:2070 msgid "" "Comparisons can be chained arbitrarily, e.g., ``x < y <= z`` is equivalent " "to ``x < y and y <= z``, except that ``y`` is evaluated only once (but in " @@ -2033,7 +1861,7 @@ msgid "" "false)." msgstr "" -#: ../../../reference/expressions.rst:2247 +#: ../../../reference/expressions.rst:2074 msgid "" "Formally, if *a*, *b*, *c*, ..., *y*, *z* are expressions and *op1*, " "*op2*, ..., *opN* are comparison operators, then ``a op1 b op2 c ... y opN " @@ -2041,24 +1869,24 @@ msgid "" "each expression is evaluated at most once." msgstr "" -#: ../../../reference/expressions.rst:2252 +#: ../../../reference/expressions.rst:2079 msgid "" "Note that ``a op1 b op2 c`` doesn't imply any kind of comparison between *a* " "and *c*, so that, e.g., ``x < y > z`` is perfectly legal (though perhaps not " "pretty)." msgstr "" -#: ../../../reference/expressions.rst:2259 +#: ../../../reference/expressions.rst:2086 msgid "Value comparisons" msgstr "" -#: ../../../reference/expressions.rst:2261 +#: ../../../reference/expressions.rst:2088 msgid "" "The operators ``<``, ``>``, ``==``, ``>=``, ``<=``, and ``!=`` compare the " "values of two objects. The objects do not need to have the same type." msgstr "" -#: ../../../reference/expressions.rst:2264 +#: ../../../reference/expressions.rst:2091 msgid "" "Chapter :ref:`objects` states that objects have a value (in addition to type " "and identity). The value of an object is a rather abstract notion in " @@ -2070,7 +1898,7 @@ msgid "" "indirectly, by means of their comparison implementation." msgstr "" -#: ../../../reference/expressions.rst:2273 +#: ../../../reference/expressions.rst:2100 msgid "" "Because all types are (direct or indirect) subtypes of :class:`object`, they " "inherit the default comparison behavior from :class:`object`. Types can " @@ -2078,7 +1906,7 @@ msgid "" "methods` like :meth:`~object.__lt__`, described in :ref:`customization`." msgstr "" -#: ../../../reference/expressions.rst:2279 +#: ../../../reference/expressions.rst:2106 msgid "" "The default behavior for equality comparison (``==`` and ``!=``) is based on " "the identity of the objects. Hence, equality comparison of instances with " @@ -2088,14 +1916,14 @@ msgid "" "``x is y`` implies ``x == y``)." msgstr "" -#: ../../../reference/expressions.rst:2286 +#: ../../../reference/expressions.rst:2113 msgid "" "A default order comparison (``<``, ``>``, ``<=``, and ``>=``) is not " "provided; an attempt raises :exc:`TypeError`. A motivation for this default " "behavior is the lack of a similar invariant as for equality." msgstr "" -#: ../../../reference/expressions.rst:2290 +#: ../../../reference/expressions.rst:2117 msgid "" "The behavior of the default equality comparison, that instances with " "different identities are always unequal, may be in contrast to what types " @@ -2104,13 +1932,13 @@ msgid "" "in fact, a number of built-in types have done that." msgstr "" -#: ../../../reference/expressions.rst:2296 +#: ../../../reference/expressions.rst:2123 msgid "" "The following list describes the comparison behavior of the most important " "built-in types." msgstr "" -#: ../../../reference/expressions.rst:2299 +#: ../../../reference/expressions.rst:2126 msgid "" "Numbers of built-in numeric types (:ref:`typesnumeric`) and of the standard " "library types :class:`fractions.Fraction` and :class:`decimal.Decimal` can " @@ -2120,7 +1948,7 @@ msgid "" "of precision." msgstr "" -#: ../../../reference/expressions.rst:2306 +#: ../../../reference/expressions.rst:2133 msgid "" "The not-a-number values ``float('NaN')`` and ``decimal.Decimal('NaN')`` are " "special. Any ordered comparison of a number to a not-a-number value is " @@ -2130,32 +1958,32 @@ msgid "" "is compliant with IEEE 754." msgstr "" -#: ../../../reference/expressions.rst:2313 +#: ../../../reference/expressions.rst:2140 msgid "" "``None`` and :data:`NotImplemented` are singletons. :PEP:`8` advises that " "comparisons for singletons should always be done with ``is`` or ``is not``, " "never the equality operators." msgstr "" -#: ../../../reference/expressions.rst:2317 +#: ../../../reference/expressions.rst:2144 msgid "" "Binary sequences (instances of :class:`bytes` or :class:`bytearray`) can be " "compared within and across their types. They compare lexicographically " "using the numeric values of their elements." msgstr "" -#: ../../../reference/expressions.rst:2321 +#: ../../../reference/expressions.rst:2148 msgid "" "Strings (instances of :class:`str`) compare lexicographically using the " "numerical Unicode code points (the result of the built-in function :func:" "`ord`) of their characters. [#]_" msgstr "" -#: ../../../reference/expressions.rst:2325 +#: ../../../reference/expressions.rst:2152 msgid "Strings and binary sequences cannot be directly compared." msgstr "" -#: ../../../reference/expressions.rst:2327 +#: ../../../reference/expressions.rst:2154 msgid "" "Sequences (instances of :class:`tuple`, :class:`list`, or :class:`range`) " "can be compared only within each of their types, with the restriction that " @@ -2164,7 +1992,7 @@ msgid "" "raises :exc:`TypeError`." msgstr "" -#: ../../../reference/expressions.rst:2333 +#: ../../../reference/expressions.rst:2160 msgid "" "Sequences compare lexicographically using comparison of corresponding " "elements. The built-in containers typically assume identical objects are " @@ -2172,19 +2000,19 @@ msgid "" "objects to improve performance and to maintain their internal invariants." msgstr "" -#: ../../../reference/expressions.rst:2338 +#: ../../../reference/expressions.rst:2165 msgid "" "Lexicographical comparison between built-in collections works as follows:" msgstr "" -#: ../../../reference/expressions.rst:2340 +#: ../../../reference/expressions.rst:2167 msgid "" "For two collections to compare equal, they must be of the same type, have " "the same length, and each pair of corresponding elements must compare equal " "(for example, ``[1,2] == (1,2)`` is false because the type is not the same)." msgstr "" -#: ../../../reference/expressions.rst:2345 +#: ../../../reference/expressions.rst:2172 msgid "" "Collections that support order comparison are ordered the same as their " "first unequal elements (for example, ``[1,2,x] <= [1,2,y]`` has the same " @@ -2193,25 +2021,25 @@ msgid "" "true)." msgstr "" -#: ../../../reference/expressions.rst:2351 +#: ../../../reference/expressions.rst:2178 msgid "" "Mappings (instances of :class:`dict`) compare equal if and only if they have " "equal ``(key, value)`` pairs. Equality comparison of the keys and values " "enforces reflexivity." msgstr "" -#: ../../../reference/expressions.rst:2355 +#: ../../../reference/expressions.rst:2182 msgid "" "Order comparisons (``<``, ``>``, ``<=``, and ``>=``) raise :exc:`TypeError`." msgstr "" -#: ../../../reference/expressions.rst:2357 +#: ../../../reference/expressions.rst:2184 msgid "" "Sets (instances of :class:`set` or :class:`frozenset`) can be compared " "within and across their types." msgstr "" -#: ../../../reference/expressions.rst:2360 +#: ../../../reference/expressions.rst:2187 msgid "" "They define order comparison operators to mean subset and superset tests. " "Those relations do not define total orderings (for example, the two sets " @@ -2222,110 +2050,110 @@ msgid "" "sets as inputs)." msgstr "" -#: ../../../reference/expressions.rst:2368 +#: ../../../reference/expressions.rst:2195 msgid "Comparison of sets enforces reflexivity of its elements." msgstr "" -#: ../../../reference/expressions.rst:2370 +#: ../../../reference/expressions.rst:2197 msgid "" "Most other built-in types have no comparison methods implemented, so they " "inherit the default comparison behavior." msgstr "" -#: ../../../reference/expressions.rst:2373 +#: ../../../reference/expressions.rst:2200 msgid "" "User-defined classes that customize their comparison behavior should follow " "some consistency rules, if possible:" msgstr "" -#: ../../../reference/expressions.rst:2376 +#: ../../../reference/expressions.rst:2203 msgid "" "Equality comparison should be reflexive. In other words, identical objects " "should compare equal:" msgstr "" -#: ../../../reference/expressions.rst:2379 +#: ../../../reference/expressions.rst:2206 msgid "``x is y`` implies ``x == y``" msgstr "" -#: ../../../reference/expressions.rst:2381 +#: ../../../reference/expressions.rst:2208 msgid "" "Comparison should be symmetric. In other words, the following expressions " "should have the same result:" msgstr "" -#: ../../../reference/expressions.rst:2384 +#: ../../../reference/expressions.rst:2211 msgid "``x == y`` and ``y == x``" msgstr "" -#: ../../../reference/expressions.rst:2386 +#: ../../../reference/expressions.rst:2213 msgid "``x != y`` and ``y != x``" msgstr "" -#: ../../../reference/expressions.rst:2388 +#: ../../../reference/expressions.rst:2215 msgid "``x < y`` and ``y > x``" msgstr "" -#: ../../../reference/expressions.rst:2390 +#: ../../../reference/expressions.rst:2217 msgid "``x <= y`` and ``y >= x``" msgstr "" -#: ../../../reference/expressions.rst:2392 +#: ../../../reference/expressions.rst:2219 msgid "" "Comparison should be transitive. The following (non-exhaustive) examples " "illustrate that:" msgstr "" -#: ../../../reference/expressions.rst:2395 +#: ../../../reference/expressions.rst:2222 msgid "``x > y and y > z`` implies ``x > z``" msgstr "" -#: ../../../reference/expressions.rst:2397 +#: ../../../reference/expressions.rst:2224 msgid "``x < y and y <= z`` implies ``x < z``" msgstr "" -#: ../../../reference/expressions.rst:2399 +#: ../../../reference/expressions.rst:2226 msgid "" "Inverse comparison should result in the boolean negation. In other words, " "the following expressions should have the same result:" msgstr "" -#: ../../../reference/expressions.rst:2402 +#: ../../../reference/expressions.rst:2229 msgid "``x == y`` and ``not x != y``" msgstr "" -#: ../../../reference/expressions.rst:2404 +#: ../../../reference/expressions.rst:2231 msgid "``x < y`` and ``not x >= y`` (for total ordering)" msgstr "" -#: ../../../reference/expressions.rst:2406 +#: ../../../reference/expressions.rst:2233 msgid "``x > y`` and ``not x <= y`` (for total ordering)" msgstr "" -#: ../../../reference/expressions.rst:2408 +#: ../../../reference/expressions.rst:2235 msgid "" "The last two expressions apply to totally ordered collections (e.g. to " "sequences, but not to sets or mappings). See also the :deco:`~functools." "total_ordering` decorator." msgstr "" -#: ../../../reference/expressions.rst:2412 +#: ../../../reference/expressions.rst:2239 msgid "" "The :func:`hash` result should be consistent with equality. Objects that are " "equal should either have the same hash value, or be marked as unhashable." msgstr "" -#: ../../../reference/expressions.rst:2416 +#: ../../../reference/expressions.rst:2243 msgid "" "Python does not enforce these consistency rules. In fact, the not-a-number " "values are an example for not following these rules." msgstr "" -#: ../../../reference/expressions.rst:2425 +#: ../../../reference/expressions.rst:2252 msgid "Membership test operations" msgstr "" -#: ../../../reference/expressions.rst:2427 +#: ../../../reference/expressions.rst:2254 msgid "" "The operators :keyword:`in` and :keyword:`not in` test for membership. ``x " "in s`` evaluates to ``True`` if *x* is a member of *s*, and ``False`` " @@ -2336,7 +2164,7 @@ msgid "" "expression ``x in y`` is equivalent to ``any(x is e or x == e for e in y)``." msgstr "" -#: ../../../reference/expressions.rst:2435 +#: ../../../reference/expressions.rst:2262 msgid "" "For the string and bytes types, ``x in y`` is ``True`` if and only if *x* is " "a substring of *y*. An equivalent test is ``y.find(x) != -1``. Empty " @@ -2344,14 +2172,14 @@ msgid "" "``\"\" in \"abc\"`` will return ``True``." msgstr "" -#: ../../../reference/expressions.rst:2440 +#: ../../../reference/expressions.rst:2267 msgid "" "For user-defined classes which define the :meth:`~object.__contains__` " "method, ``x in y`` returns ``True`` if ``y.__contains__(x)`` returns a true " "value, and ``False`` otherwise." msgstr "" -#: ../../../reference/expressions.rst:2444 +#: ../../../reference/expressions.rst:2271 msgid "" "For user-defined classes which do not define :meth:`~object.__contains__` " "but do define :meth:`~object.__iter__`, ``x in y`` is ``True`` if some value " @@ -2360,7 +2188,7 @@ msgid "" "it is as if :keyword:`in` raised that exception." msgstr "" -#: ../../../reference/expressions.rst:2450 +#: ../../../reference/expressions.rst:2277 msgid "" "Lastly, the old-style iteration protocol is tried: if a class defines :meth:" "`~object.__getitem__`, ``x in y`` is ``True`` if and only if there is a non-" @@ -2369,17 +2197,17 @@ msgid "" "exception is raised, it is as if :keyword:`in` raised that exception)." msgstr "" -#: ../../../reference/expressions.rst:2462 +#: ../../../reference/expressions.rst:2289 msgid "" "The operator :keyword:`not in` is defined to have the inverse truth value " "of :keyword:`in`." msgstr "" -#: ../../../reference/expressions.rst:2475 +#: ../../../reference/expressions.rst:2302 msgid "Identity comparisons" msgstr "" -#: ../../../reference/expressions.rst:2477 +#: ../../../reference/expressions.rst:2304 msgid "" "The operators :keyword:`is` and :keyword:`is not` test for an object's " "identity: ``x is y`` is true if and only if *x* and *y* are the same " @@ -2387,11 +2215,11 @@ msgid "" "``x is not y`` yields the inverse truth value. [#]_" msgstr "" -#: ../../../reference/expressions.rst:2489 +#: ../../../reference/expressions.rst:2316 msgid "Boolean operations" msgstr "" -#: ../../../reference/expressions.rst:2500 +#: ../../../reference/expressions.rst:2327 msgid "" "In the context of Boolean operations, and also when expressions are used by " "control flow statements, the following values are interpreted as false: " @@ -2402,25 +2230,25 @@ msgid "" "__bool__` method." msgstr "" -#: ../../../reference/expressions.rst:2509 +#: ../../../reference/expressions.rst:2336 msgid "" "The operator :keyword:`not` yields ``True`` if its argument is false, " "``False`` otherwise." msgstr "" -#: ../../../reference/expressions.rst:2514 +#: ../../../reference/expressions.rst:2341 msgid "" "The expression ``x and y`` first evaluates *x*; if *x* is false, its value " "is returned; otherwise, *y* is evaluated and the resulting value is returned." msgstr "" -#: ../../../reference/expressions.rst:2519 +#: ../../../reference/expressions.rst:2346 msgid "" "The expression ``x or y`` first evaluates *x*; if *x* is true, its value is " "returned; otherwise, *y* is evaluated and the resulting value is returned." msgstr "" -#: ../../../reference/expressions.rst:2522 +#: ../../../reference/expressions.rst:2349 msgid "" "Note that neither :keyword:`and` nor :keyword:`or` restrict the value and " "type they return to ``False`` and ``True``, but rather return the last " @@ -2431,11 +2259,11 @@ msgid "" "argument (for example, ``not 'foo'`` produces ``False`` rather than ``''``.)" msgstr "" -#: ../../../reference/expressions.rst:2541 +#: ../../../reference/expressions.rst:2368 msgid "Assignment expressions" msgstr "" -#: ../../../reference/expressions.rst:2546 +#: ../../../reference/expressions.rst:2373 msgid "" "An assignment expression (sometimes also called a \"named expression\" or " "\"walrus\") assigns an :token:`~python-grammar:expression` to an :token:" @@ -2443,15 +2271,15 @@ msgid "" "`~python-grammar:expression`." msgstr "" -#: ../../../reference/expressions.rst:2551 +#: ../../../reference/expressions.rst:2378 msgid "One common use case is when handling matched regular expressions:" msgstr "" -#: ../../../reference/expressions.rst:2558 +#: ../../../reference/expressions.rst:2385 msgid "Or, when processing a file stream in chunks:" msgstr "" -#: ../../../reference/expressions.rst:2565 +#: ../../../reference/expressions.rst:2392 msgid "" "Assignment expressions must be surrounded by parentheses when used as " "expression statements and when used as sub-expressions in slicing, " @@ -2461,37 +2289,37 @@ msgid "" "and ``while`` statements." msgstr "" -#: ../../../reference/expressions.rst:2573 +#: ../../../reference/expressions.rst:2400 msgid "See :pep:`572` for more details about assignment expressions." msgstr "" -#: ../../../reference/expressions.rst:2580 +#: ../../../reference/expressions.rst:2407 msgid "Conditional expressions" msgstr "" -#: ../../../reference/expressions.rst:2592 +#: ../../../reference/expressions.rst:2419 msgid "" "A conditional expression (sometimes called a \"ternary operator\") is an " "alternative to the if-else statement. As it is an expression, it returns a " "value and can appear as a sub-expression." msgstr "" -#: ../../../reference/expressions.rst:2596 +#: ../../../reference/expressions.rst:2423 msgid "" "The expression ``x if C else y`` first evaluates the condition, *C* rather " "than *x*. If *C* is true, *x* is evaluated and its value is returned; " "otherwise, *y* is evaluated and its value is returned." msgstr "" -#: ../../../reference/expressions.rst:2600 +#: ../../../reference/expressions.rst:2427 msgid "See :pep:`308` for more details about conditional expressions." msgstr "" -#: ../../../reference/expressions.rst:2607 +#: ../../../reference/expressions.rst:2434 msgid "Lambdas" msgstr "" -#: ../../../reference/expressions.rst:2618 +#: ../../../reference/expressions.rst:2445 msgid "" "Lambda expressions (sometimes called lambda forms) are used to create " "anonymous functions. The expression ``lambda parameters: expression`` yields " @@ -2499,25 +2327,25 @@ msgid "" "defined with:" msgstr "" -#: ../../../reference/expressions.rst:2627 +#: ../../../reference/expressions.rst:2454 msgid "" "See section :ref:`function` for the syntax of parameter lists. Note that " "functions created with lambda expressions cannot contain statements or " "annotations." msgstr "" -#: ../../../reference/expressions.rst:2639 +#: ../../../reference/expressions.rst:2466 msgid "Expression lists" msgstr "" -#: ../../../reference/expressions.rst:2655 +#: ../../../reference/expressions.rst:2482 msgid "" "Except when part of a list or set display, an expression list containing at " "least one comma yields a tuple. The length of the tuple is the number of " "expressions in the list. The expressions are evaluated from left to right." msgstr "" -#: ../../../reference/expressions.rst:2662 +#: ../../../reference/expressions.rst:2489 msgid "" "A trailing comma is required only to create a one-item tuple, such as ``1," "``; it is optional in all other cases. A single expression without a " @@ -2526,54 +2354,54 @@ msgid "" "``()``.)" msgstr "" -#: ../../../reference/expressions.rst:2677 +#: ../../../reference/expressions.rst:2504 msgid "Iterable unpacking" msgstr "" -#: ../../../reference/expressions.rst:2679 +#: ../../../reference/expressions.rst:2506 msgid "" "In an expression list or tuple, list or set display, any expression may be " "prefixed with an asterisk (``*``). This denotes :dfn:`iterable unpacking`." msgstr "" -#: ../../../reference/expressions.rst:2683 +#: ../../../reference/expressions.rst:2510 msgid "" "At runtime, the asterisk-prefixed expression must evaluate to an :term:" "`iterable`. The iterable is expanded into a sequence of items, which are " "included in the new tuple, list, or set, at the site of the unpacking." msgstr "" -#: ../../../reference/expressions.rst:2689 +#: ../../../reference/expressions.rst:2516 msgid "" "Iterable unpacking in expression lists, originally proposed by :pep:`448`." msgstr "" -#: ../../../reference/expressions.rst:2692 +#: ../../../reference/expressions.rst:2519 msgid "Any item in an expression list may be starred. See :pep:`646`." msgstr "" -#: ../../../reference/expressions.rst:2699 +#: ../../../reference/expressions.rst:2526 msgid "Evaluation order" msgstr "" -#: ../../../reference/expressions.rst:2703 +#: ../../../reference/expressions.rst:2530 msgid "" "Python evaluates expressions from left to right. Notice that while " "evaluating an assignment, the right-hand side is evaluated before the left-" "hand side." msgstr "" -#: ../../../reference/expressions.rst:2706 +#: ../../../reference/expressions.rst:2533 msgid "" "In the following lines, expressions will be evaluated in the arithmetic " "order of their suffixes::" msgstr "" -#: ../../../reference/expressions.rst:2721 +#: ../../../reference/expressions.rst:2548 msgid "Operator precedence" msgstr "" -#: ../../../reference/expressions.rst:2726 +#: ../../../reference/expressions.rst:2553 msgid "" "The following table summarizes the operator precedence in Python, from " "highest precedence (most binding) to lowest precedence (least binding). " @@ -2583,176 +2411,176 @@ msgid "" "group from right to left)." msgstr "" -#: ../../../reference/expressions.rst:2732 +#: ../../../reference/expressions.rst:2559 msgid "" "Note that comparisons, membership tests, and identity tests, all have the " "same precedence and have a left-to-right chaining feature as described in " "the :ref:`comparisons` section." msgstr "" -#: ../../../reference/expressions.rst:2738 +#: ../../../reference/expressions.rst:2565 msgid "Operator" msgstr "" -#: ../../../reference/expressions.rst:2738 +#: ../../../reference/expressions.rst:2565 msgid "Description" msgstr "" -#: ../../../reference/expressions.rst:2740 +#: ../../../reference/expressions.rst:2567 msgid "``(expressions...)``," msgstr "" -#: ../../../reference/expressions.rst:2742 +#: ../../../reference/expressions.rst:2569 msgid "``[expressions...]``, ``{key: value...}``, ``{expressions...}``" msgstr "" -#: ../../../reference/expressions.rst:2740 +#: ../../../reference/expressions.rst:2567 msgid "" "Binding or parenthesized expression, list display, dictionary display, set " "display" msgstr "" -#: ../../../reference/expressions.rst:2746 +#: ../../../reference/expressions.rst:2573 msgid "``x[index]``, ``x[index:index]`` ``x(arguments...)``, ``x.attribute``" msgstr "" -#: ../../../reference/expressions.rst:2746 +#: ../../../reference/expressions.rst:2573 msgid "Subscription (including slicing), call, attribute reference" msgstr "" -#: ../../../reference/expressions.rst:2749 +#: ../../../reference/expressions.rst:2576 msgid ":keyword:`await x `" msgstr "" -#: ../../../reference/expressions.rst:2751 +#: ../../../reference/expressions.rst:2578 msgid "``**``" msgstr "" -#: ../../../reference/expressions.rst:2751 +#: ../../../reference/expressions.rst:2578 msgid "Exponentiation [#]_" msgstr "" -#: ../../../reference/expressions.rst:2753 +#: ../../../reference/expressions.rst:2580 msgid "``+x``, ``-x``, ``~x``" msgstr "" -#: ../../../reference/expressions.rst:2753 +#: ../../../reference/expressions.rst:2580 msgid "Positive, negative, bitwise NOT" msgstr "" -#: ../../../reference/expressions.rst:2755 +#: ../../../reference/expressions.rst:2582 msgid "``*``, ``@``, ``/``, ``//``, ``%``" msgstr "" -#: ../../../reference/expressions.rst:2755 +#: ../../../reference/expressions.rst:2582 msgid "" "Multiplication, matrix multiplication, division, floor division, remainder " "[#]_" msgstr "" -#: ../../../reference/expressions.rst:2759 +#: ../../../reference/expressions.rst:2586 msgid "``+``, ``-``" msgstr "" -#: ../../../reference/expressions.rst:2759 +#: ../../../reference/expressions.rst:2586 msgid "Addition and subtraction" msgstr "" -#: ../../../reference/expressions.rst:2761 +#: ../../../reference/expressions.rst:2588 msgid "``<<``, ``>>``" msgstr "" -#: ../../../reference/expressions.rst:2761 +#: ../../../reference/expressions.rst:2588 msgid "Shifts" msgstr "" -#: ../../../reference/expressions.rst:2763 +#: ../../../reference/expressions.rst:2590 msgid "``&``" msgstr "" -#: ../../../reference/expressions.rst:2763 +#: ../../../reference/expressions.rst:2590 msgid "Bitwise AND" msgstr "" -#: ../../../reference/expressions.rst:2765 +#: ../../../reference/expressions.rst:2592 msgid "``^``" msgstr "" -#: ../../../reference/expressions.rst:2765 +#: ../../../reference/expressions.rst:2592 msgid "Bitwise XOR" msgstr "" -#: ../../../reference/expressions.rst:2767 +#: ../../../reference/expressions.rst:2594 msgid "``|``" msgstr "" -#: ../../../reference/expressions.rst:2767 +#: ../../../reference/expressions.rst:2594 msgid "Bitwise OR" msgstr "" -#: ../../../reference/expressions.rst:2769 +#: ../../../reference/expressions.rst:2596 msgid "" ":keyword:`in`, :keyword:`not in`, :keyword:`is`, :keyword:`is not`, ``<``, " "``<=``, ``>``, ``>=``, ``!=``, ``==``" msgstr "" -#: ../../../reference/expressions.rst:2769 +#: ../../../reference/expressions.rst:2596 msgid "Comparisons, including membership tests and identity tests" msgstr "" -#: ../../../reference/expressions.rst:2773 +#: ../../../reference/expressions.rst:2600 msgid ":keyword:`not x `" msgstr "" -#: ../../../reference/expressions.rst:2773 +#: ../../../reference/expressions.rst:2600 msgid "Boolean NOT" msgstr "" -#: ../../../reference/expressions.rst:2775 +#: ../../../reference/expressions.rst:2602 msgid ":keyword:`and`" msgstr "" -#: ../../../reference/expressions.rst:2775 +#: ../../../reference/expressions.rst:2602 msgid "Boolean AND" msgstr "" -#: ../../../reference/expressions.rst:2777 +#: ../../../reference/expressions.rst:2604 msgid ":keyword:`or`" msgstr "" -#: ../../../reference/expressions.rst:2777 +#: ../../../reference/expressions.rst:2604 msgid "Boolean OR" msgstr "" -#: ../../../reference/expressions.rst:2779 +#: ../../../reference/expressions.rst:2606 msgid ":keyword:`if ` -- :keyword:`!else`" msgstr "" -#: ../../../reference/expressions.rst:2779 +#: ../../../reference/expressions.rst:2606 msgid "Conditional expression" msgstr "" -#: ../../../reference/expressions.rst:2781 +#: ../../../reference/expressions.rst:2608 msgid ":keyword:`lambda`" msgstr "" -#: ../../../reference/expressions.rst:2781 +#: ../../../reference/expressions.rst:2608 msgid "Lambda expression" msgstr "" -#: ../../../reference/expressions.rst:2783 +#: ../../../reference/expressions.rst:2610 msgid "``:=``" msgstr "" -#: ../../../reference/expressions.rst:2783 +#: ../../../reference/expressions.rst:2610 msgid "Assignment expression" msgstr "" -#: ../../../reference/expressions.rst:2788 +#: ../../../reference/expressions.rst:2615 msgid "Footnotes" msgstr "" -#: ../../../reference/expressions.rst:2789 +#: ../../../reference/expressions.rst:2616 msgid "" "While ``abs(x%y) < abs(y)`` is true mathematically, for floats it may not be " "true numerically due to roundoff. For example, and assuming a platform on " @@ -2764,7 +2592,7 @@ msgid "" "approach is more appropriate depends on the application." msgstr "" -#: ../../../reference/expressions.rst:2798 +#: ../../../reference/expressions.rst:2625 msgid "" "If x is very close to an exact integer multiple of y, it's possible for ``x//" "y`` to be one larger than ``(x-x%y)//y`` due to rounding. In such cases, " @@ -2772,7 +2600,7 @@ msgid "" "* y + x % y`` be very close to ``x``." msgstr "" -#: ../../../reference/expressions.rst:2803 +#: ../../../reference/expressions.rst:2630 msgid "" "The Unicode standard distinguishes between :dfn:`code points` (e.g. U+0041) " "and :dfn:`abstract characters` (e.g. \"LATIN CAPITAL LETTER A\"). While most " @@ -2786,7 +2614,7 @@ msgid "" "(COMBINING CEDILLA)." msgstr "" -#: ../../../reference/expressions.rst:2814 +#: ../../../reference/expressions.rst:2641 msgid "" "The comparison operators on strings compare at the level of Unicode code " "points. This may be counter-intuitive to humans. For example, ``\"\\u00C7\" " @@ -2794,13 +2622,13 @@ msgid "" "same abstract character \"LATIN CAPITAL LETTER C WITH CEDILLA\"." msgstr "" -#: ../../../reference/expressions.rst:2819 +#: ../../../reference/expressions.rst:2646 msgid "" "To compare strings at the level of abstract characters (that is, in a way " "intuitive to humans), use :func:`unicodedata.normalize`." msgstr "" -#: ../../../reference/expressions.rst:2822 +#: ../../../reference/expressions.rst:2649 msgid "" "Due to automatic garbage-collection, free lists, and the dynamic nature of " "descriptors, you may notice seemingly unusual behaviour in certain uses of " @@ -2808,13 +2636,13 @@ msgid "" "instance methods, or constants. Check their documentation for more info." msgstr "" -#: ../../../reference/expressions.rst:2827 +#: ../../../reference/expressions.rst:2654 msgid "" "The power operator ``**`` binds less tightly than an arithmetic or bitwise " "unary operator on its right, that is, ``2**-1`` is ``0.5``." msgstr "" -#: ../../../reference/expressions.rst:2830 +#: ../../../reference/expressions.rst:2657 msgid "" "The ``%`` operator is also used for string formatting; the same precedence " "applies." @@ -2822,11 +2650,11 @@ msgstr "" #: ../../../reference/expressions.rst:8 ../../../reference/expressions.rst:956 #: ../../../reference/expressions.rst:1073 -#: ../../../reference/expressions.rst:2491 -#: ../../../reference/expressions.rst:2531 -#: ../../../reference/expressions.rst:2582 -#: ../../../reference/expressions.rst:2609 -#: ../../../reference/expressions.rst:2641 +#: ../../../reference/expressions.rst:2318 +#: ../../../reference/expressions.rst:2358 +#: ../../../reference/expressions.rst:2409 +#: ../../../reference/expressions.rst:2436 +#: ../../../reference/expressions.rst:2468 msgid "expression" msgstr "" @@ -2835,8 +2663,8 @@ msgid "BNF" msgstr "" #: ../../../reference/expressions.rst:30 -#: ../../../reference/expressions.rst:1965 -#: ../../../reference/expressions.rst:2013 +#: ../../../reference/expressions.rst:1792 +#: ../../../reference/expressions.rst:1840 msgid "arithmetic" msgstr "" @@ -2858,14 +2686,10 @@ msgid "identifier" msgstr "" #: ../../../reference/expressions.rst:131 -#: ../../../reference/expressions.rst:1194 -#: ../../../reference/expressions.rst:1249 -#: ../../../reference/expressions.rst:1380 -#: ../../../reference/expressions.rst:1435 -#: ../../../reference/expressions.rst:1482 -#: ../../../reference/expressions.rst:2002 -#: ../../../reference/expressions.rst:2056 -#: ../../../reference/expressions.rst:2165 +#: ../../../reference/expressions.rst:1309 +#: ../../../reference/expressions.rst:1829 +#: ../../../reference/expressions.rst:1883 +#: ../../../reference/expressions.rst:1992 msgid "exception" msgstr "" @@ -2906,18 +2730,16 @@ msgstr "" #: ../../../reference/expressions.rst:493 #: ../../../reference/expressions.rst:589 #: ../../../reference/expressions.rst:956 -#: ../../../reference/expressions.rst:1182 -#: ../../../reference/expressions.rst:1370 -#: ../../../reference/expressions.rst:1482 -#: ../../../reference/expressions.rst:1511 -#: ../../../reference/expressions.rst:1595 -#: ../../../reference/expressions.rst:1707 -#: ../../../reference/expressions.rst:1855 -#: ../../../reference/expressions.rst:1869 -#: ../../../reference/expressions.rst:1883 -#: ../../../reference/expressions.rst:1890 -#: ../../../reference/expressions.rst:2456 -#: ../../../reference/expressions.rst:2653 +#: ../../../reference/expressions.rst:1309 +#: ../../../reference/expressions.rst:1338 +#: ../../../reference/expressions.rst:1422 +#: ../../../reference/expressions.rst:1534 +#: ../../../reference/expressions.rst:1682 +#: ../../../reference/expressions.rst:1696 +#: ../../../reference/expressions.rst:1710 +#: ../../../reference/expressions.rst:1717 +#: ../../../reference/expressions.rst:2283 +#: ../../../reference/expressions.rst:2480 msgid "object" msgstr "" @@ -2927,7 +2749,7 @@ msgstr "" #: ../../../reference/expressions.rst:331 #: ../../../reference/expressions.rst:956 -#: ../../../reference/expressions.rst:1707 +#: ../../../reference/expressions.rst:1534 msgid "() (parentheses)" msgstr "" @@ -2940,46 +2762,46 @@ msgid "comprehensions" msgstr "" #: ../../../reference/expressions.rst:401 -#: ../../../reference/expressions.rst:2660 +#: ../../../reference/expressions.rst:2487 msgid "trailing" msgstr "" #: ../../../reference/expressions.rst:401 #: ../../../reference/expressions.rst:523 -#: ../../../reference/expressions.rst:2632 -#: ../../../reference/expressions.rst:2660 +#: ../../../reference/expressions.rst:2459 +#: ../../../reference/expressions.rst:2487 msgid "comma" msgstr "" #: ../../../reference/expressions.rst:426 -#: ../../../reference/expressions.rst:2672 +#: ../../../reference/expressions.rst:2499 msgid "iterable" msgstr "" #: ../../../reference/expressions.rst:426 #: ../../../reference/expressions.rst:624 -#: ../../../reference/expressions.rst:1790 -#: ../../../reference/expressions.rst:2672 +#: ../../../reference/expressions.rst:1617 +#: ../../../reference/expressions.rst:2499 msgid "unpacking" msgstr "" #: ../../../reference/expressions.rst:426 -#: ../../../reference/expressions.rst:1790 -#: ../../../reference/expressions.rst:2026 -#: ../../../reference/expressions.rst:2672 +#: ../../../reference/expressions.rst:1617 +#: ../../../reference/expressions.rst:1853 +#: ../../../reference/expressions.rst:2499 msgid "* (asterisk)" msgstr "" #: ../../../reference/expressions.rst:426 -#: ../../../reference/expressions.rst:2672 +#: ../../../reference/expressions.rst:2499 msgid "in expression lists" msgstr "" #: ../../../reference/expressions.rst:460 -#: ../../../reference/expressions.rst:1482 -#: ../../../reference/expressions.rst:1511 -#: ../../../reference/expressions.rst:1595 -#: ../../../reference/expressions.rst:2641 +#: ../../../reference/expressions.rst:1309 +#: ../../../reference/expressions.rst:1338 +#: ../../../reference/expressions.rst:1422 +#: ../../../reference/expressions.rst:2468 msgid "list" msgstr "" @@ -2995,7 +2817,7 @@ msgid "empty" msgstr "" #: ../../../reference/expressions.rst:460 -#: ../../../reference/expressions.rst:1507 +#: ../../../reference/expressions.rst:1334 msgid "[] (square brackets)" msgstr "" @@ -3007,16 +2829,16 @@ msgstr "" #: ../../../reference/expressions.rst:493 #: ../../../reference/expressions.rst:523 #: ../../../reference/expressions.rst:589 -#: ../../../reference/expressions.rst:1589 -#: ../../../reference/expressions.rst:1707 -#: ../../../reference/expressions.rst:2632 -#: ../../../reference/expressions.rst:2641 +#: ../../../reference/expressions.rst:1416 +#: ../../../reference/expressions.rst:1534 +#: ../../../reference/expressions.rst:2459 +#: ../../../reference/expressions.rst:2468 msgid ", (comma)" msgstr "" #: ../../../reference/expressions.rst:460 #: ../../../reference/expressions.rst:493 -#: ../../../reference/expressions.rst:2641 +#: ../../../reference/expressions.rst:2468 msgid "expression list" msgstr "" @@ -3038,15 +2860,15 @@ msgid "tuple display" msgstr "" #: ../../../reference/expressions.rst:530 -#: ../../../reference/expressions.rst:1511 -#: ../../../reference/expressions.rst:1595 -#: ../../../reference/expressions.rst:2653 +#: ../../../reference/expressions.rst:1338 +#: ../../../reference/expressions.rst:1422 +#: ../../../reference/expressions.rst:2480 msgid "tuple" msgstr "" #: ../../../reference/expressions.rst:589 #: ../../../reference/expressions.rst:624 -#: ../../../reference/expressions.rst:1511 +#: ../../../reference/expressions.rst:1338 msgid "dictionary" msgstr "" @@ -3067,8 +2889,8 @@ msgid "dictionary expression" msgstr "" #: ../../../reference/expressions.rst:589 -#: ../../../reference/expressions.rst:1589 -#: ../../../reference/expressions.rst:2609 +#: ../../../reference/expressions.rst:1416 +#: ../../../reference/expressions.rst:2436 msgid ": (colon)" msgstr "" @@ -3082,8 +2904,8 @@ msgid "in dictionary displays" msgstr "" #: ../../../reference/expressions.rst:624 -#: ../../../reference/expressions.rst:1820 -#: ../../../reference/expressions.rst:1928 +#: ../../../reference/expressions.rst:1647 +#: ../../../reference/expressions.rst:1755 msgid "**" msgstr "" @@ -3098,7 +2920,7 @@ msgid "in comprehensions" msgstr "" #: ../../../reference/expressions.rst:749 -#: ../../../reference/expressions.rst:2582 +#: ../../../reference/expressions.rst:2409 msgid "if" msgstr "" @@ -3107,13 +2929,12 @@ msgid "async for" msgstr "" #: ../../../reference/expressions.rst:900 -#: ../../../reference/expressions.rst:1908 +#: ../../../reference/expressions.rst:1735 msgid "await" msgstr "" #: ../../../reference/expressions.rst:956 #: ../../../reference/expressions.rst:1073 -#: ../../../reference/expressions.rst:1182 msgid "generator" msgstr "" @@ -3122,12 +2943,12 @@ msgid "generator expression" msgstr "" #: ../../../reference/expressions.rst:1073 -#: ../../../reference/expressions.rst:1908 +#: ../../../reference/expressions.rst:1735 msgid "keyword" msgstr "" #: ../../../reference/expressions.rst:1073 -#: ../../../reference/expressions.rst:1271 +#: ../../../reference/expressions.rst:1182 msgid "yield" msgstr "" @@ -3137,9 +2958,9 @@ msgid "from" msgstr "" #: ../../../reference/expressions.rst:1073 -#: ../../../reference/expressions.rst:1855 -#: ../../../reference/expressions.rst:1869 -#: ../../../reference/expressions.rst:2609 +#: ../../../reference/expressions.rst:1682 +#: ../../../reference/expressions.rst:1696 +#: ../../../reference/expressions.rst:2436 msgid "function" msgstr "" @@ -3151,506 +2972,489 @@ msgstr "" msgid "yield from expression" msgstr "" -#: ../../../reference/expressions.rst:1194 -msgid "StopIteration" -msgstr "" - -#: ../../../reference/expressions.rst:1249 -#: ../../../reference/expressions.rst:1435 -msgid "GeneratorExit" -msgstr "" - -#: ../../../reference/expressions.rst:1271 +#: ../../../reference/expressions.rst:1182 msgid "examples" msgstr "" -#: ../../../reference/expressions.rst:1370 -msgid "asynchronous-generator" -msgstr "" - -#: ../../../reference/expressions.rst:1380 -msgid "StopAsyncIteration" -msgstr "" - -#: ../../../reference/expressions.rst:1459 +#: ../../../reference/expressions.rst:1286 msgid "primary" msgstr "" -#: ../../../reference/expressions.rst:1473 +#: ../../../reference/expressions.rst:1300 msgid "attribute" msgstr "" -#: ../../../reference/expressions.rst:1473 +#: ../../../reference/expressions.rst:1300 msgid "reference" msgstr "" -#: ../../../reference/expressions.rst:1473 +#: ../../../reference/expressions.rst:1300 msgid ". (dot)" msgstr "" -#: ../../../reference/expressions.rst:1473 +#: ../../../reference/expressions.rst:1300 msgid "attribute reference" msgstr "" -#: ../../../reference/expressions.rst:1482 +#: ../../../reference/expressions.rst:1309 msgid "AttributeError" msgstr "" -#: ../../../reference/expressions.rst:1482 +#: ../../../reference/expressions.rst:1309 msgid "module" msgstr "" -#: ../../../reference/expressions.rst:1507 +#: ../../../reference/expressions.rst:1334 msgid "subscription" msgstr "" -#: ../../../reference/expressions.rst:1511 -#: ../../../reference/expressions.rst:1595 -#: ../../../reference/expressions.rst:2456 +#: ../../../reference/expressions.rst:1338 +#: ../../../reference/expressions.rst:1422 +#: ../../../reference/expressions.rst:2283 msgid "sequence" msgstr "" -#: ../../../reference/expressions.rst:1511 +#: ../../../reference/expressions.rst:1338 msgid "mapping" msgstr "" -#: ../../../reference/expressions.rst:1511 -#: ../../../reference/expressions.rst:1595 +#: ../../../reference/expressions.rst:1338 +#: ../../../reference/expressions.rst:1422 msgid "string" msgstr "" -#: ../../../reference/expressions.rst:1511 +#: ../../../reference/expressions.rst:1338 msgid "item" msgstr "" -#: ../../../reference/expressions.rst:1589 +#: ../../../reference/expressions.rst:1416 msgid "slicing" msgstr "" -#: ../../../reference/expressions.rst:1589 +#: ../../../reference/expressions.rst:1416 msgid "slice" msgstr "" -#: ../../../reference/expressions.rst:1707 +#: ../../../reference/expressions.rst:1534 msgid "callable" msgstr "" -#: ../../../reference/expressions.rst:1707 -#: ../../../reference/expressions.rst:1855 -#: ../../../reference/expressions.rst:1869 -#: ../../../reference/expressions.rst:1883 -#: ../../../reference/expressions.rst:1890 -#: ../../../reference/expressions.rst:1900 +#: ../../../reference/expressions.rst:1534 +#: ../../../reference/expressions.rst:1682 +#: ../../../reference/expressions.rst:1696 +#: ../../../reference/expressions.rst:1710 +#: ../../../reference/expressions.rst:1717 +#: ../../../reference/expressions.rst:1727 msgid "call" msgstr "" -#: ../../../reference/expressions.rst:1707 +#: ../../../reference/expressions.rst:1534 msgid "argument" msgstr "" -#: ../../../reference/expressions.rst:1707 -#: ../../../reference/expressions.rst:1740 +#: ../../../reference/expressions.rst:1534 +#: ../../../reference/expressions.rst:1567 msgid "call semantics" msgstr "" -#: ../../../reference/expressions.rst:1707 +#: ../../../reference/expressions.rst:1534 msgid "argument list" msgstr "" -#: ../../../reference/expressions.rst:1707 +#: ../../../reference/expressions.rst:1534 msgid "= (equals)" msgstr "" -#: ../../../reference/expressions.rst:1707 -#: ../../../reference/expressions.rst:1790 -#: ../../../reference/expressions.rst:1820 +#: ../../../reference/expressions.rst:1534 +#: ../../../reference/expressions.rst:1617 +#: ../../../reference/expressions.rst:1647 msgid "in function calls" msgstr "" -#: ../../../reference/expressions.rst:1740 +#: ../../../reference/expressions.rst:1567 msgid "parameter" msgstr "" -#: ../../../reference/expressions.rst:1855 +#: ../../../reference/expressions.rst:1682 msgid "user-defined" msgstr "" -#: ../../../reference/expressions.rst:1855 +#: ../../../reference/expressions.rst:1682 msgid "user-defined function" msgstr "" -#: ../../../reference/expressions.rst:1869 +#: ../../../reference/expressions.rst:1696 msgid "built-in function" msgstr "" -#: ../../../reference/expressions.rst:1869 +#: ../../../reference/expressions.rst:1696 msgid "method" msgstr "" -#: ../../../reference/expressions.rst:1869 +#: ../../../reference/expressions.rst:1696 msgid "built-in method" msgstr "" -#: ../../../reference/expressions.rst:1883 +#: ../../../reference/expressions.rst:1710 msgid "class" msgstr "" -#: ../../../reference/expressions.rst:1883 +#: ../../../reference/expressions.rst:1710 msgid "class object" msgstr "" -#: ../../../reference/expressions.rst:1890 +#: ../../../reference/expressions.rst:1717 msgid "class instance" msgstr "" -#: ../../../reference/expressions.rst:1890 -#: ../../../reference/expressions.rst:1900 +#: ../../../reference/expressions.rst:1717 +#: ../../../reference/expressions.rst:1727 msgid "instance" msgstr "" -#: ../../../reference/expressions.rst:1900 +#: ../../../reference/expressions.rst:1727 msgid "__call__() (object method)" msgstr "" -#: ../../../reference/expressions.rst:1928 +#: ../../../reference/expressions.rst:1755 msgid "power" msgstr "" -#: ../../../reference/expressions.rst:1928 -#: ../../../reference/expressions.rst:1965 -#: ../../../reference/expressions.rst:2013 -#: ../../../reference/expressions.rst:2147 -#: ../../../reference/expressions.rst:2176 -#: ../../../reference/expressions.rst:2491 +#: ../../../reference/expressions.rst:1755 +#: ../../../reference/expressions.rst:1792 +#: ../../../reference/expressions.rst:1840 +#: ../../../reference/expressions.rst:1974 +#: ../../../reference/expressions.rst:2003 +#: ../../../reference/expressions.rst:2318 msgid "operation" msgstr "" -#: ../../../reference/expressions.rst:1928 +#: ../../../reference/expressions.rst:1755 +#: ../../../reference/expressions.rst:1801 +#: ../../../reference/expressions.rst:1810 +#: ../../../reference/expressions.rst:1818 +#: ../../../reference/expressions.rst:1853 +#: ../../../reference/expressions.rst:1871 +#: ../../../reference/expressions.rst:1883 +#: ../../../reference/expressions.rst:1902 +#: ../../../reference/expressions.rst:1933 +#: ../../../reference/expressions.rst:1952 #: ../../../reference/expressions.rst:1974 -#: ../../../reference/expressions.rst:1983 -#: ../../../reference/expressions.rst:1991 -#: ../../../reference/expressions.rst:2026 +#: ../../../reference/expressions.rst:2012 +#: ../../../reference/expressions.rst:2020 +#: ../../../reference/expressions.rst:2029 #: ../../../reference/expressions.rst:2044 -#: ../../../reference/expressions.rst:2056 -#: ../../../reference/expressions.rst:2075 -#: ../../../reference/expressions.rst:2106 -#: ../../../reference/expressions.rst:2125 -#: ../../../reference/expressions.rst:2147 -#: ../../../reference/expressions.rst:2185 -#: ../../../reference/expressions.rst:2193 -#: ../../../reference/expressions.rst:2202 -#: ../../../reference/expressions.rst:2217 -#: ../../../reference/expressions.rst:2456 -#: ../../../reference/expressions.rst:2465 -#: ../../../reference/expressions.rst:2507 -#: ../../../reference/expressions.rst:2512 -#: ../../../reference/expressions.rst:2517 -#: ../../../reference/expressions.rst:2582 -#: ../../../reference/expressions.rst:2723 +#: ../../../reference/expressions.rst:2283 +#: ../../../reference/expressions.rst:2292 +#: ../../../reference/expressions.rst:2334 +#: ../../../reference/expressions.rst:2339 +#: ../../../reference/expressions.rst:2344 +#: ../../../reference/expressions.rst:2409 +#: ../../../reference/expressions.rst:2550 msgid "operator" msgstr "" -#: ../../../reference/expressions.rst:1965 +#: ../../../reference/expressions.rst:1792 msgid "unary" msgstr "" -#: ../../../reference/expressions.rst:1965 -#: ../../../reference/expressions.rst:2176 -#: ../../../reference/expressions.rst:2185 -#: ../../../reference/expressions.rst:2193 -#: ../../../reference/expressions.rst:2202 +#: ../../../reference/expressions.rst:1792 +#: ../../../reference/expressions.rst:2003 +#: ../../../reference/expressions.rst:2012 +#: ../../../reference/expressions.rst:2020 +#: ../../../reference/expressions.rst:2029 msgid "bitwise" msgstr "" -#: ../../../reference/expressions.rst:1974 +#: ../../../reference/expressions.rst:1801 msgid "negation" msgstr "" -#: ../../../reference/expressions.rst:1974 +#: ../../../reference/expressions.rst:1801 msgid "minus" msgstr "" -#: ../../../reference/expressions.rst:1974 -#: ../../../reference/expressions.rst:2125 +#: ../../../reference/expressions.rst:1801 +#: ../../../reference/expressions.rst:1952 msgid "- (minus)" msgstr "" -#: ../../../reference/expressions.rst:1974 -#: ../../../reference/expressions.rst:1983 +#: ../../../reference/expressions.rst:1801 +#: ../../../reference/expressions.rst:1810 msgid "unary operator" msgstr "" -#: ../../../reference/expressions.rst:1983 +#: ../../../reference/expressions.rst:1810 msgid "plus" msgstr "" -#: ../../../reference/expressions.rst:1983 -#: ../../../reference/expressions.rst:2106 +#: ../../../reference/expressions.rst:1810 +#: ../../../reference/expressions.rst:1933 msgid "+ (plus)" msgstr "" -#: ../../../reference/expressions.rst:1991 +#: ../../../reference/expressions.rst:1818 msgid "inversion" msgstr "" -#: ../../../reference/expressions.rst:1991 +#: ../../../reference/expressions.rst:1818 msgid "~ (tilde)" msgstr "" -#: ../../../reference/expressions.rst:2002 +#: ../../../reference/expressions.rst:1829 msgid "TypeError" msgstr "" -#: ../../../reference/expressions.rst:2013 -#: ../../../reference/expressions.rst:2176 +#: ../../../reference/expressions.rst:1840 +#: ../../../reference/expressions.rst:2003 msgid "binary" msgstr "" -#: ../../../reference/expressions.rst:2026 +#: ../../../reference/expressions.rst:1853 msgid "multiplication" msgstr "" -#: ../../../reference/expressions.rst:2044 +#: ../../../reference/expressions.rst:1871 msgid "matrix multiplication" msgstr "" -#: ../../../reference/expressions.rst:2044 +#: ../../../reference/expressions.rst:1871 msgid "@ (at)" msgstr "" -#: ../../../reference/expressions.rst:2056 +#: ../../../reference/expressions.rst:1883 msgid "ZeroDivisionError" msgstr "" -#: ../../../reference/expressions.rst:2056 +#: ../../../reference/expressions.rst:1883 msgid "division" msgstr "" -#: ../../../reference/expressions.rst:2056 +#: ../../../reference/expressions.rst:1883 msgid "/ (slash)" msgstr "" -#: ../../../reference/expressions.rst:2056 +#: ../../../reference/expressions.rst:1883 msgid "//" msgstr "" -#: ../../../reference/expressions.rst:2075 +#: ../../../reference/expressions.rst:1902 msgid "modulo" msgstr "" -#: ../../../reference/expressions.rst:2075 +#: ../../../reference/expressions.rst:1902 msgid "% (percent)" msgstr "" -#: ../../../reference/expressions.rst:2106 +#: ../../../reference/expressions.rst:1933 msgid "addition" msgstr "" -#: ../../../reference/expressions.rst:2106 -#: ../../../reference/expressions.rst:2125 +#: ../../../reference/expressions.rst:1933 +#: ../../../reference/expressions.rst:1952 msgid "binary operator" msgstr "" -#: ../../../reference/expressions.rst:2125 +#: ../../../reference/expressions.rst:1952 msgid "subtraction" msgstr "" -#: ../../../reference/expressions.rst:2147 +#: ../../../reference/expressions.rst:1974 msgid "shifting" msgstr "" -#: ../../../reference/expressions.rst:2147 +#: ../../../reference/expressions.rst:1974 msgid "<<" msgstr "" -#: ../../../reference/expressions.rst:2147 +#: ../../../reference/expressions.rst:1974 msgid ">>" msgstr "" -#: ../../../reference/expressions.rst:2165 +#: ../../../reference/expressions.rst:1992 msgid "ValueError" msgstr "" -#: ../../../reference/expressions.rst:2185 -#: ../../../reference/expressions.rst:2512 +#: ../../../reference/expressions.rst:2012 +#: ../../../reference/expressions.rst:2339 msgid "and" msgstr "" -#: ../../../reference/expressions.rst:2185 +#: ../../../reference/expressions.rst:2012 msgid "& (ampersand)" msgstr "" -#: ../../../reference/expressions.rst:2193 +#: ../../../reference/expressions.rst:2020 msgid "xor" msgstr "" -#: ../../../reference/expressions.rst:2193 +#: ../../../reference/expressions.rst:2020 msgid "exclusive" msgstr "" -#: ../../../reference/expressions.rst:2193 -#: ../../../reference/expressions.rst:2202 -#: ../../../reference/expressions.rst:2517 +#: ../../../reference/expressions.rst:2020 +#: ../../../reference/expressions.rst:2029 +#: ../../../reference/expressions.rst:2344 msgid "or" msgstr "" -#: ../../../reference/expressions.rst:2193 +#: ../../../reference/expressions.rst:2020 msgid "^ (caret)" msgstr "" -#: ../../../reference/expressions.rst:2202 +#: ../../../reference/expressions.rst:2029 msgid "inclusive" msgstr "" -#: ../../../reference/expressions.rst:2202 +#: ../../../reference/expressions.rst:2029 msgid "| (vertical bar)" msgstr "" -#: ../../../reference/expressions.rst:2217 +#: ../../../reference/expressions.rst:2044 msgid "comparison" msgstr "" -#: ../../../reference/expressions.rst:2217 +#: ../../../reference/expressions.rst:2044 msgid "C" msgstr "" -#: ../../../reference/expressions.rst:2217 +#: ../../../reference/expressions.rst:2044 msgid "language" msgstr "" -#: ../../../reference/expressions.rst:2217 +#: ../../../reference/expressions.rst:2044 msgid "< (less)" msgstr "" -#: ../../../reference/expressions.rst:2217 +#: ../../../reference/expressions.rst:2044 msgid "> (greater)" msgstr "" -#: ../../../reference/expressions.rst:2217 +#: ../../../reference/expressions.rst:2044 msgid "<=" msgstr "" -#: ../../../reference/expressions.rst:2217 +#: ../../../reference/expressions.rst:2044 msgid ">=" msgstr "" -#: ../../../reference/expressions.rst:2217 +#: ../../../reference/expressions.rst:2044 msgid "==" msgstr "" -#: ../../../reference/expressions.rst:2217 +#: ../../../reference/expressions.rst:2044 msgid "!=" msgstr "" -#: ../../../reference/expressions.rst:2241 +#: ../../../reference/expressions.rst:2068 msgid "chaining" msgstr "" -#: ../../../reference/expressions.rst:2241 +#: ../../../reference/expressions.rst:2068 msgid "comparisons" msgstr "" -#: ../../../reference/expressions.rst:2456 +#: ../../../reference/expressions.rst:2283 msgid "in" msgstr "" -#: ../../../reference/expressions.rst:2456 +#: ../../../reference/expressions.rst:2283 msgid "not in" msgstr "" -#: ../../../reference/expressions.rst:2456 +#: ../../../reference/expressions.rst:2283 msgid "membership" msgstr "" -#: ../../../reference/expressions.rst:2456 -#: ../../../reference/expressions.rst:2465 +#: ../../../reference/expressions.rst:2283 +#: ../../../reference/expressions.rst:2292 msgid "test" msgstr "" -#: ../../../reference/expressions.rst:2465 +#: ../../../reference/expressions.rst:2292 msgid "is" msgstr "" -#: ../../../reference/expressions.rst:2465 +#: ../../../reference/expressions.rst:2292 msgid "is not" msgstr "" -#: ../../../reference/expressions.rst:2465 +#: ../../../reference/expressions.rst:2292 msgid "identity" msgstr "" -#: ../../../reference/expressions.rst:2491 +#: ../../../reference/expressions.rst:2318 msgid "Conditional" msgstr "" -#: ../../../reference/expressions.rst:2491 +#: ../../../reference/expressions.rst:2318 msgid "Boolean" msgstr "" -#: ../../../reference/expressions.rst:2507 +#: ../../../reference/expressions.rst:2334 msgid "not" msgstr "" -#: ../../../reference/expressions.rst:2531 +#: ../../../reference/expressions.rst:2358 msgid ":= (colon equals)" msgstr "" -#: ../../../reference/expressions.rst:2531 +#: ../../../reference/expressions.rst:2358 msgid "assignment expression" msgstr "" -#: ../../../reference/expressions.rst:2531 +#: ../../../reference/expressions.rst:2358 msgid "walrus operator" msgstr "" -#: ../../../reference/expressions.rst:2531 +#: ../../../reference/expressions.rst:2358 msgid "named expression" msgstr "" -#: ../../../reference/expressions.rst:2531 +#: ../../../reference/expressions.rst:2358 msgid "assignment" msgstr "" -#: ../../../reference/expressions.rst:2582 +#: ../../../reference/expressions.rst:2409 msgid "conditional" msgstr "" -#: ../../../reference/expressions.rst:2582 +#: ../../../reference/expressions.rst:2409 msgid "ternary" msgstr "" -#: ../../../reference/expressions.rst:2582 +#: ../../../reference/expressions.rst:2409 msgid "conditional expression" msgstr "" -#: ../../../reference/expressions.rst:2582 +#: ../../../reference/expressions.rst:2409 msgid "else" msgstr "" -#: ../../../reference/expressions.rst:2609 +#: ../../../reference/expressions.rst:2436 msgid "lambda" msgstr "" -#: ../../../reference/expressions.rst:2609 +#: ../../../reference/expressions.rst:2436 msgid "form" msgstr "" -#: ../../../reference/expressions.rst:2609 +#: ../../../reference/expressions.rst:2436 msgid "anonymous" msgstr "" -#: ../../../reference/expressions.rst:2609 +#: ../../../reference/expressions.rst:2436 msgid "lambda expression" msgstr "" -#: ../../../reference/expressions.rst:2701 +#: ../../../reference/expressions.rst:2528 msgid "evaluation" msgstr "" -#: ../../../reference/expressions.rst:2701 +#: ../../../reference/expressions.rst:2528 msgid "order" msgstr "" -#: ../../../reference/expressions.rst:2723 +#: ../../../reference/expressions.rst:2550 msgid "precedence" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/tutorial/datastructures.pot b/main/locale/pot/LC_MESSAGES/tutorial/datastructures.pot index 13ef9d6c9b4..94f6f08d18b 100644 --- a/main/locale/pot/LC_MESSAGES/tutorial/datastructures.pot +++ b/main/locale/pot/LC_MESSAGES/tutorial/datastructures.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-30 10:06+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -148,20 +148,21 @@ msgid "" "is the first element retrieved (\"first-in, first-out\"); however, lists are " "not efficient for this purpose. While appends and pops from the end of list " "are fast, doing inserts or pops from the beginning of a list is slow " -"(because all of the other elements have to be shifted by one)." +"(because all of the other elements have to be shifted by one). See :ref:" +"`time-complexity` for more information." msgstr "" -#: ../../../tutorial/datastructures.rst:172 +#: ../../../tutorial/datastructures.rst:173 msgid "" "To implement a queue, use :class:`collections.deque` which was designed to " "have fast appends and pops from both ends. For example::" msgstr "" -#: ../../../tutorial/datastructures.rst:190 +#: ../../../tutorial/datastructures.rst:191 msgid "List Comprehensions" msgstr "" -#: ../../../tutorial/datastructures.rst:192 +#: ../../../tutorial/datastructures.rst:193 msgid "" "List comprehensions provide a concise way to create lists. Common " "applications are to make new lists where each element is the result of some " @@ -169,26 +170,26 @@ msgid "" "create a subsequence of those elements that satisfy a certain condition." msgstr "" -#: ../../../tutorial/datastructures.rst:197 +#: ../../../tutorial/datastructures.rst:198 msgid "For example, assume we want to create a list of squares, like::" msgstr "" -#: ../../../tutorial/datastructures.rst:206 +#: ../../../tutorial/datastructures.rst:207 msgid "" "Note that this creates (or overwrites) a variable named ``x`` that still " "exists after the loop completes. We can calculate the list of squares " "without any side effects using::" msgstr "" -#: ../../../tutorial/datastructures.rst:212 +#: ../../../tutorial/datastructures.rst:213 msgid "or, equivalently::" msgstr "" -#: ../../../tutorial/datastructures.rst:216 +#: ../../../tutorial/datastructures.rst:217 msgid "which is more concise and readable." msgstr "" -#: ../../../tutorial/datastructures.rst:218 +#: ../../../tutorial/datastructures.rst:219 msgid "" "A list comprehension consists of brackets containing an expression followed " "by a :keyword:`!for` clause, then zero or more :keyword:`!for` or :keyword:`!" @@ -198,74 +199,74 @@ msgid "" "lists if they are not equal::" msgstr "" -#: ../../../tutorial/datastructures.rst:228 +#: ../../../tutorial/datastructures.rst:229 msgid "and it's equivalent to::" msgstr "" -#: ../../../tutorial/datastructures.rst:239 +#: ../../../tutorial/datastructures.rst:240 msgid "" "Note how the order of the :keyword:`for` and :keyword:`if` statements is the " "same in both these snippets." msgstr "" -#: ../../../tutorial/datastructures.rst:242 +#: ../../../tutorial/datastructures.rst:243 msgid "" "If the expression is a tuple (e.g. the ``(x, y)`` in the previous example), " "it must be parenthesized. ::" msgstr "" -#: ../../../tutorial/datastructures.rst:273 +#: ../../../tutorial/datastructures.rst:274 msgid "" "List comprehensions can contain complex expressions and nested functions::" msgstr "" -#: ../../../tutorial/datastructures.rst:280 +#: ../../../tutorial/datastructures.rst:281 msgid "Nested List Comprehensions" msgstr "" -#: ../../../tutorial/datastructures.rst:282 +#: ../../../tutorial/datastructures.rst:283 msgid "" "The initial expression in a list comprehension can be any arbitrary " "expression, including another list comprehension." msgstr "" -#: ../../../tutorial/datastructures.rst:285 +#: ../../../tutorial/datastructures.rst:286 msgid "" "Consider the following example of a 3x4 matrix implemented as a list of 3 " "lists of length 4::" msgstr "" -#: ../../../tutorial/datastructures.rst:294 +#: ../../../tutorial/datastructures.rst:295 msgid "The following list comprehension will transpose rows and columns::" msgstr "" -#: ../../../tutorial/datastructures.rst:299 +#: ../../../tutorial/datastructures.rst:300 msgid "" "As we saw in the previous section, the inner list comprehension is evaluated " "in the context of the :keyword:`for` that follows it, so this example is " "equivalent to::" msgstr "" -#: ../../../tutorial/datastructures.rst:310 +#: ../../../tutorial/datastructures.rst:311 msgid "which, in turn, is the same as::" msgstr "" -#: ../../../tutorial/datastructures.rst:323 +#: ../../../tutorial/datastructures.rst:324 msgid "" "In the real world, you should prefer built-in functions to complex flow " "statements. The :func:`zip` function would do a great job for this use case::" msgstr "" -#: ../../../tutorial/datastructures.rst:329 +#: ../../../tutorial/datastructures.rst:330 msgid "" "See :ref:`tut-unpacking-arguments` for details on the asterisk in this line." msgstr "" -#: ../../../tutorial/datastructures.rst:332 +#: ../../../tutorial/datastructures.rst:333 msgid "Unpacking in Lists and List Comprehensions" msgstr "" -#: ../../../tutorial/datastructures.rst:334 +#: ../../../tutorial/datastructures.rst:335 msgid "" "The section on :ref:`tut-unpacking-arguments` describes the use of ``*`` to " "\"unpack\" the elements of an iterable object, providing each one separately " @@ -275,36 +276,36 @@ msgid "" "expression, adding each of its elements to the list we're creating::" msgstr "" -#: ../../../tutorial/datastructures.rst:345 +#: ../../../tutorial/datastructures.rst:346 msgid "" "This only works if the expression following the ``*`` evaluates to an " "iterable object; trying to unpack a non-iterable object will raise an " "exception::" msgstr "" -#: ../../../tutorial/datastructures.rst:355 +#: ../../../tutorial/datastructures.rst:356 msgid "" "Unpacking can also be used in list comprehensions, as a way to build a new " "list representing the concatenation of an arbitrary number of iterables::" msgstr "" -#: ../../../tutorial/datastructures.rst:362 +#: ../../../tutorial/datastructures.rst:363 msgid "" "Note that the effect is that each element from ``x`` is unpacked. This " "works for arbitrary iterable objects, not just lists::" msgstr "" -#: ../../../tutorial/datastructures.rst:369 +#: ../../../tutorial/datastructures.rst:370 msgid "" "But if the objects in ``x`` are not iterable, this expression would again " "raise an exception." msgstr "" -#: ../../../tutorial/datastructures.rst:375 +#: ../../../tutorial/datastructures.rst:376 msgid "The :keyword:`!del` statement" msgstr "" -#: ../../../tutorial/datastructures.rst:377 +#: ../../../tutorial/datastructures.rst:378 msgid "" "There is a way to remove an item from a list given its index instead of its " "value: the :keyword:`del` statement. This differs from the :meth:`~list." @@ -313,21 +314,21 @@ msgid "" "earlier by assignment of an empty list to the slice). For example::" msgstr "" -#: ../../../tutorial/datastructures.rst:394 +#: ../../../tutorial/datastructures.rst:395 msgid ":keyword:`del` can also be used to delete entire variables::" msgstr "" -#: ../../../tutorial/datastructures.rst:398 +#: ../../../tutorial/datastructures.rst:399 msgid "" "Referencing the name ``a`` hereafter is an error (at least until another " "value is assigned to it). We'll find other uses for :keyword:`del` later." msgstr "" -#: ../../../tutorial/datastructures.rst:405 +#: ../../../tutorial/datastructures.rst:406 msgid "Tuples and Sequences" msgstr "" -#: ../../../tutorial/datastructures.rst:407 +#: ../../../tutorial/datastructures.rst:408 msgid "" "We saw that lists and strings have many common properties, such as indexing " "and slicing operations. They are two examples of *sequence* data types " @@ -336,12 +337,12 @@ msgid "" "the *tuple*." msgstr "" -#: ../../../tutorial/datastructures.rst:413 +#: ../../../tutorial/datastructures.rst:414 msgid "" "A tuple consists of a number of values separated by commas, for instance::" msgstr "" -#: ../../../tutorial/datastructures.rst:438 +#: ../../../tutorial/datastructures.rst:439 msgid "" "As you see, on output tuples are always enclosed in parentheses, so that " "nested tuples are interpreted correctly; they may be input with or without " @@ -351,7 +352,7 @@ msgid "" "which contain mutable objects, such as lists." msgstr "" -#: ../../../tutorial/datastructures.rst:445 +#: ../../../tutorial/datastructures.rst:446 msgid "" "Though tuples may seem similar to lists, they are often used in different " "situations and for different purposes. Tuples are :term:`immutable`, and " @@ -362,7 +363,7 @@ msgid "" "iterating over the list." msgstr "" -#: ../../../tutorial/datastructures.rst:453 +#: ../../../tutorial/datastructures.rst:454 msgid "" "A special problem is the construction of tuples containing 0 or 1 items: the " "syntax has some extra quirks to accommodate these. Empty tuples are " @@ -371,14 +372,14 @@ msgid "" "enclose a single value in parentheses). Ugly, but effective. For example::" msgstr "" -#: ../../../tutorial/datastructures.rst:468 +#: ../../../tutorial/datastructures.rst:469 msgid "" "The statement ``t = 12345, 54321, 'hello!'`` is an example of *tuple " "packing*: the values ``12345``, ``54321`` and ``'hello!'`` are packed " "together in a tuple. The reverse operation is also possible::" msgstr "" -#: ../../../tutorial/datastructures.rst:474 +#: ../../../tutorial/datastructures.rst:475 msgid "" "This is called, appropriately enough, *sequence unpacking* and works for any " "sequence on the right-hand side. Sequence unpacking requires that there are " @@ -387,11 +388,11 @@ msgid "" "of tuple packing and sequence unpacking." msgstr "" -#: ../../../tutorial/datastructures.rst:484 +#: ../../../tutorial/datastructures.rst:485 msgid "Sets" msgstr "" -#: ../../../tutorial/datastructures.rst:486 +#: ../../../tutorial/datastructures.rst:487 msgid "" "Python also includes a data type for :ref:`sets `. A set is an " "unordered collection with no duplicate elements. Basic uses include " @@ -400,7 +401,7 @@ msgid "" "symmetric difference." msgstr "" -#: ../../../tutorial/datastructures.rst:492 +#: ../../../tutorial/datastructures.rst:493 msgid "" "Curly braces or the :func:`set` function can be used to create sets. Note: " "to create an empty set you have to use ``set()``, not ``{}``; the latter " @@ -408,27 +409,27 @@ msgid "" "section." msgstr "" -#: ../../../tutorial/datastructures.rst:496 +#: ../../../tutorial/datastructures.rst:497 msgid "" "Because sets are unordered, iterating over them or printing them can produce " "the elements in a different order than you expect." msgstr "" -#: ../../../tutorial/datastructures.rst:499 +#: ../../../tutorial/datastructures.rst:500 msgid "Here is a brief demonstration::" msgstr "" -#: ../../../tutorial/datastructures.rst:524 +#: ../../../tutorial/datastructures.rst:525 msgid "" "Similarly to :ref:`list comprehensions `, set comprehensions " "are also supported, including comprehensions with unpacking::" msgstr "" -#: ../../../tutorial/datastructures.rst:539 +#: ../../../tutorial/datastructures.rst:540 msgid "Dictionaries" msgstr "" -#: ../../../tutorial/datastructures.rst:541 +#: ../../../tutorial/datastructures.rst:542 msgid "" "Another useful data type built into Python is the *dictionary* (see :ref:" "`typesmapping`). Dictionaries are sometimes found in other languages as " @@ -442,7 +443,7 @@ msgid "" "`~list.append` and :meth:`~list.extend`." msgstr "" -#: ../../../tutorial/datastructures.rst:552 +#: ../../../tutorial/datastructures.rst:553 msgid "" "It is best to think of a dictionary as a set of *key: value* pairs, with the " "requirement that the keys are unique (within one dictionary). A pair of " @@ -451,7 +452,7 @@ msgid "" "dictionary; this is also the way dictionaries are written on output." msgstr "" -#: ../../../tutorial/datastructures.rst:558 +#: ../../../tutorial/datastructures.rst:559 msgid "" "The main operations on a dictionary are storing a value with some key and " "extracting the value given the key. It is also possible to delete a key:" @@ -459,7 +460,7 @@ msgid "" "the old value associated with that key is forgotten." msgstr "" -#: ../../../tutorial/datastructures.rst:563 +#: ../../../tutorial/datastructures.rst:564 msgid "" "Extracting a value for a non-existent key by subscripting (``d[key]``) " "raises a :exc:`KeyError`. To avoid getting this error when trying to access " @@ -468,7 +469,7 @@ msgid "" "dictionary." msgstr "" -#: ../../../tutorial/datastructures.rst:568 +#: ../../../tutorial/datastructures.rst:569 msgid "" "Performing ``list(d)`` on a dictionary returns a list of all the keys used " "in the dictionary, in insertion order (if you want it sorted, just use " @@ -476,69 +477,69 @@ msgid "" "use the :keyword:`in` keyword." msgstr "" -#: ../../../tutorial/datastructures.rst:573 +#: ../../../tutorial/datastructures.rst:574 msgid "Here is a small example using a dictionary::" msgstr "" -#: ../../../tutorial/datastructures.rst:600 +#: ../../../tutorial/datastructures.rst:601 msgid "" "The :func:`dict` constructor builds dictionaries directly from sequences of " "key-value pairs::" msgstr "" -#: ../../../tutorial/datastructures.rst:606 +#: ../../../tutorial/datastructures.rst:607 msgid "" "In addition, dict comprehensions can be used to create dictionaries from " "arbitrary key and value expressions::" msgstr "" -#: ../../../tutorial/datastructures.rst:612 +#: ../../../tutorial/datastructures.rst:613 msgid "" "And dictionary unpacking (via ``**``) can be used to merge multiple " "dictionaries::" msgstr "" -#: ../../../tutorial/datastructures.rst:624 +#: ../../../tutorial/datastructures.rst:625 msgid "" "When the keys are simple strings, it is sometimes easier to specify pairs " "using keyword arguments::" msgstr "" -#: ../../../tutorial/datastructures.rst:634 +#: ../../../tutorial/datastructures.rst:635 msgid "Looping Techniques" msgstr "" -#: ../../../tutorial/datastructures.rst:636 +#: ../../../tutorial/datastructures.rst:637 msgid "" "When looping through dictionaries, the key and corresponding value can be " "retrieved at the same time using the :meth:`~dict.items` method. ::" msgstr "" -#: ../../../tutorial/datastructures.rst:646 +#: ../../../tutorial/datastructures.rst:647 msgid "" "When looping through a sequence, the position index and corresponding value " "can be retrieved at the same time using the :func:`enumerate` function. ::" msgstr "" -#: ../../../tutorial/datastructures.rst:656 +#: ../../../tutorial/datastructures.rst:657 msgid "" "To loop over two or more sequences at the same time, the entries can be " "paired with the :func:`zip` function. ::" msgstr "" -#: ../../../tutorial/datastructures.rst:668 +#: ../../../tutorial/datastructures.rst:669 msgid "" "To loop over a sequence in reverse, first specify the sequence in a forward " "direction and then call the :func:`reversed` function. ::" msgstr "" -#: ../../../tutorial/datastructures.rst:680 +#: ../../../tutorial/datastructures.rst:681 msgid "" "To loop over a sequence in sorted order, use the :func:`sorted` function " "which returns a new sorted list while leaving the source unaltered. ::" msgstr "" -#: ../../../tutorial/datastructures.rst:694 +#: ../../../tutorial/datastructures.rst:695 msgid "" "Using :func:`set` on a sequence eliminates duplicate elements. The use of :" "func:`sorted` in combination with :func:`set` over a sequence is an " @@ -546,23 +547,23 @@ msgid "" "order. ::" msgstr "" -#: ../../../tutorial/datastructures.rst:707 +#: ../../../tutorial/datastructures.rst:708 msgid "" "It is sometimes tempting to change a list while you are looping over it; " "however, it is often simpler and safer to create a new list instead. ::" msgstr "" -#: ../../../tutorial/datastructures.rst:724 +#: ../../../tutorial/datastructures.rst:725 msgid "More on Conditions" msgstr "" -#: ../../../tutorial/datastructures.rst:726 +#: ../../../tutorial/datastructures.rst:727 msgid "" "The conditions used in ``while`` and ``if`` statements can contain any " "operators, not just comparisons." msgstr "" -#: ../../../tutorial/datastructures.rst:730 +#: ../../../tutorial/datastructures.rst:731 msgid "" "The comparison operators ``in`` and ``not in`` are membership tests that " "determine whether a value is in (or not in) a container. The operators " @@ -571,13 +572,13 @@ msgid "" "than that of all numerical operators." msgstr "" -#: ../../../tutorial/datastructures.rst:736 +#: ../../../tutorial/datastructures.rst:737 msgid "" "Comparisons can be chained. For example, ``a < b == c`` tests whether ``a`` " "is less than ``b`` and moreover ``b`` equals ``c``." msgstr "" -#: ../../../tutorial/datastructures.rst:739 +#: ../../../tutorial/datastructures.rst:740 msgid "" "Comparisons may be combined using the Boolean operators ``and`` and ``or``, " "and the outcome of a comparison (or of any other Boolean expression) may be " @@ -587,7 +588,7 @@ msgid "" "C``. As always, parentheses can be used to express the desired composition." msgstr "" -#: ../../../tutorial/datastructures.rst:746 +#: ../../../tutorial/datastructures.rst:747 msgid "" "The Boolean operators ``and`` and ``or`` are so-called *short-circuit* " "operators: their arguments are evaluated from left to right, and evaluation " @@ -597,13 +598,13 @@ msgid "" "return value of a short-circuit operator is the last evaluated argument." msgstr "" -#: ../../../tutorial/datastructures.rst:753 +#: ../../../tutorial/datastructures.rst:754 msgid "" "It is possible to assign the result of a comparison or other Boolean " "expression to a variable. For example, ::" msgstr "" -#: ../../../tutorial/datastructures.rst:761 +#: ../../../tutorial/datastructures.rst:762 msgid "" "Note that in Python, unlike C, assignment inside expressions must be done " "explicitly with the :ref:`walrus operator `` is legal " "provided that the objects have appropriate comparison methods. For example, " @@ -640,11 +641,11 @@ msgid "" "the interpreter will raise a :exc:`TypeError` exception." msgstr "" -#: ../../../tutorial/datastructures.rst:800 +#: ../../../tutorial/datastructures.rst:801 msgid "Footnotes" msgstr "" -#: ../../../tutorial/datastructures.rst:801 +#: ../../../tutorial/datastructures.rst:802 msgid "" "Other languages may return the mutated object, which allows method chaining, " "such as ``d->insert(\"a\")->remove(\"b\")->sort();``." diff --git a/main/locale/pot/LC_MESSAGES/tutorial/modules.pot b/main/locale/pot/LC_MESSAGES/tutorial/modules.pot index ce4e79719e4..9043f3eb2d0 100644 --- a/main/locale/pot/LC_MESSAGES/tutorial/modules.pot +++ b/main/locale/pot/LC_MESSAGES/tutorial/modules.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-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -580,29 +580,10 @@ msgid "" msgstr "" #: ../../../tutorial/modules.rst:588 -msgid "Packages in Multiple Directories" -msgstr "" - -#: ../../../tutorial/modules.rst:590 -msgid "" -"Packages support one more special attribute, :attr:`~module.__path__`. This " -"is initialized to be a :term:`sequence` of strings containing the name of " -"the directory holding the package's :file:`__init__.py` before the code in " -"that file is executed. This variable can be modified; doing so affects " -"future searches for modules and subpackages contained in the package." -msgstr "" - -#: ../../../tutorial/modules.rst:597 -msgid "" -"While this feature is not often needed, it can be used to extend the set of " -"modules found in a package." -msgstr "" - -#: ../../../tutorial/modules.rst:602 msgid "Footnotes" msgstr "" -#: ../../../tutorial/modules.rst:603 +#: ../../../tutorial/modules.rst:589 msgid "" "In fact function definitions are also 'statements' that are 'executed'; the " "execution of a module-level function definition adds the function name to " diff --git a/main/locale/pot/LC_MESSAGES/using/windows.pot b/main/locale/pot/LC_MESSAGES/using/windows.pot index 3adcfd06777..912b27787a8 100644 --- a/main/locale/pot/LC_MESSAGES/using/windows.pot +++ b/main/locale/pot/LC_MESSAGES/using/windows.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1653,11 +1653,17 @@ msgid "" "`_ for the ARM64 version" msgstr "" -#: ../../../using/windows.rst:1230 -msgid "Free-threaded packages" +#: ../../../using/windows.rst:1229 +msgid "" +"Resolve error ``Unable to find package 'python'`` from a misconfigured " +"``nuget.config`` using::" msgstr "" #: ../../../using/windows.rst:1234 +msgid "Free-threaded packages" +msgstr "" + +#: ../../../using/windows.rst:1238 msgid "" "Packages containing free-threaded binaries are named `python-freethreaded " "`_ for the 64-bit " @@ -1668,45 +1674,45 @@ msgid "" "exe`` entry points, both of which run free threaded." msgstr "" -#: ../../../using/windows.rst:1245 +#: ../../../using/windows.rst:1249 msgid "Alternative bundles" msgstr "" -#: ../../../using/windows.rst:1247 +#: ../../../using/windows.rst:1251 msgid "" "Besides the standard CPython distribution, there are modified packages " "including additional functionality. The following is a list of popular " "versions and their key features:" msgstr "" -#: ../../../using/windows.rst:1251 +#: ../../../using/windows.rst:1255 msgid "`ActivePython `_" msgstr "" -#: ../../../using/windows.rst:1252 +#: ../../../using/windows.rst:1256 msgid "Installer with multi-platform compatibility, documentation, PyWin32" msgstr "" -#: ../../../using/windows.rst:1254 +#: ../../../using/windows.rst:1258 msgid "`Anaconda `_" msgstr "" -#: ../../../using/windows.rst:1255 +#: ../../../using/windows.rst:1259 msgid "" "Popular scientific modules (such as numpy, scipy and pandas) and the " "``conda`` package manager." msgstr "" -#: ../../../using/windows.rst:1258 +#: ../../../using/windows.rst:1262 msgid "" "`Enthought Deployment Manager `_" msgstr "" -#: ../../../using/windows.rst:1259 +#: ../../../using/windows.rst:1263 msgid "\"The Next Generation Python Environment and Package Manager\"." msgstr "" -#: ../../../using/windows.rst:1261 +#: ../../../using/windows.rst:1265 msgid "" "Previously Enthought provided Canopy, but it `reached end of life in 2016 " "`_." msgstr "" -#: ../../../using/windows.rst:1264 +#: ../../../using/windows.rst:1268 msgid "`WinPython `_" msgstr "" -#: ../../../using/windows.rst:1265 +#: ../../../using/windows.rst:1269 msgid "" "Windows-specific distribution with prebuilt scientific packages and tools " "for building packages." msgstr "" -#: ../../../using/windows.rst:1268 +#: ../../../using/windows.rst:1272 msgid "" "Note that these packages may not include the latest versions of Python or " "other libraries, and are not maintained or supported by the core Python team." msgstr "" -#: ../../../using/windows.rst:1273 +#: ../../../using/windows.rst:1277 msgid "Supported Windows versions" msgstr "" -#: ../../../using/windows.rst:1275 +#: ../../../using/windows.rst:1279 msgid "" "As specified in :pep:`11`, a Python release only supports a Windows platform " "while Microsoft considers the platform under extended support. This means " @@ -1743,17 +1749,17 @@ msgid "" "please install Python 3.12." msgstr "" -#: ../../../using/windows.rst:1285 +#: ../../../using/windows.rst:1289 msgid "Removing the MAX_PATH limitation" msgstr "" -#: ../../../using/windows.rst:1287 +#: ../../../using/windows.rst:1291 msgid "" "Windows historically has limited path lengths to 260 characters. This meant " "that paths longer than this would not resolve and errors would result." msgstr "" -#: ../../../using/windows.rst:1290 +#: ../../../using/windows.rst:1294 msgid "" "In the latest versions of Windows, this limitation can be expanded to over " "32,000 characters. Your administrator will need to activate the \"Enable " @@ -1762,40 +1768,40 @@ msgid "" "``HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\FileSystem``." msgstr "" -#: ../../../using/windows.rst:1295 +#: ../../../using/windows.rst:1299 msgid "" "This allows the :func:`open` function, the :mod:`os` module and most other " "path functionality to accept and return paths longer than 260 characters." msgstr "" -#: ../../../using/windows.rst:1298 +#: ../../../using/windows.rst:1302 msgid "" "After changing the above option and rebooting, no further configuration is " "required." msgstr "" -#: ../../../using/windows.rst:1305 +#: ../../../using/windows.rst:1309 msgid "UTF-8 mode" msgstr "" -#: ../../../using/windows.rst:1310 +#: ../../../using/windows.rst:1314 msgid "Python UTF-8 mode is now enabled by default (:pep:`686`)." msgstr "" -#: ../../../using/windows.rst:1312 +#: ../../../using/windows.rst:1316 msgid "" "Windows still uses legacy encodings for the system encoding (the ANSI Code " "Page). Python uses it for the default encoding of text files (e.g. :func:" "`locale.getencoding`)." msgstr "" -#: ../../../using/windows.rst:1316 +#: ../../../using/windows.rst:1320 msgid "" "This may cause issues because UTF-8 is widely used on the internet and most " "Unix systems, including WSL (Windows Subsystem for Linux)." msgstr "" -#: ../../../using/windows.rst:1319 +#: ../../../using/windows.rst:1323 msgid "" "The :ref:`Python UTF-8 Mode `, enabled by default, can help by " "changing the default text encoding to UTF-8. When the :ref:`UTF-8 mode ` via the ``-X " "utf8=0`` command line option, or the ``PYTHONUTF8=0`` environment variable. " @@ -1811,7 +1817,7 @@ msgid "" "envvars` for how to modify environment variables." msgstr "" -#: ../../../using/windows.rst:1330 +#: ../../../using/windows.rst:1334 msgid "" "Adding ``PYTHONUTF8={0,1}`` to the default environment variables will affect " "all Python 3.7+ applications on your system. If you have any Python 3.7+ " @@ -1820,45 +1826,45 @@ msgid "" "option." msgstr "" -#: ../../../using/windows.rst:1337 +#: ../../../using/windows.rst:1341 msgid "" "Even when UTF-8 mode is disabled, Python uses UTF-8 by default on Windows " "for:" msgstr "" -#: ../../../using/windows.rst:1340 +#: ../../../using/windows.rst:1344 msgid "Console I/O including standard I/O (see :pep:`528` for details)." msgstr "" -#: ../../../using/windows.rst:1341 +#: ../../../using/windows.rst:1345 msgid "" "The :term:`filesystem encoding ` " "(see :pep:`529` for details)." msgstr "" -#: ../../../using/windows.rst:1348 +#: ../../../using/windows.rst:1352 msgid "Finding modules" msgstr "" -#: ../../../using/windows.rst:1350 +#: ../../../using/windows.rst:1354 msgid "" "These notes supplement the description at :ref:`sys-path-init` with detailed " "Windows notes." msgstr "" -#: ../../../using/windows.rst:1353 +#: ../../../using/windows.rst:1357 msgid "" "When no ``._pth`` file is found, this is how :data:`sys.path` is populated " "on Windows:" msgstr "" -#: ../../../using/windows.rst:1356 +#: ../../../using/windows.rst:1360 msgid "" "An empty entry is added at the start, which corresponds to the current " "directory." msgstr "" -#: ../../../using/windows.rst:1359 +#: ../../../using/windows.rst:1363 msgid "" "If the environment variable :envvar:`PYTHONPATH` exists, as described in :" "ref:`using-on-envvars`, its entries are added next. Note that on Windows, " @@ -1866,7 +1872,7 @@ msgid "" "from the colon used in drive identifiers (``C:\\`` etc.)." msgstr "" -#: ../../../using/windows.rst:1364 +#: ../../../using/windows.rst:1368 msgid "" "Additional \"application paths\" can be added in the registry as subkeys of :" "samp:`\\\\SOFTWARE\\\\Python\\\\PythonCore\\\\{version}\\\\PythonPath` under " @@ -1876,7 +1882,7 @@ msgid "" "installers only use HKLM, so HKCU is typically empty.)" msgstr "" -#: ../../../using/windows.rst:1371 +#: ../../../using/windows.rst:1375 msgid "" "If the environment variable :envvar:`PYTHONHOME` is set, it is assumed as " "\"Python Home\". Otherwise, the path of the main Python executable is used " @@ -1887,31 +1893,31 @@ msgid "" "PythonPath stored in the registry." msgstr "" -#: ../../../using/windows.rst:1379 +#: ../../../using/windows.rst:1383 msgid "" "If the Python Home cannot be located, no :envvar:`PYTHONPATH` is specified " "in the environment, and no registry entries can be found, a default path " "with relative entries is used (e.g. ``.\\Lib;.\\plat-win``, etc)." msgstr "" -#: ../../../using/windows.rst:1383 +#: ../../../using/windows.rst:1387 msgid "" "If a ``pyvenv.cfg`` file is found alongside the main executable or in the " "directory one level above the executable, the following variations apply:" msgstr "" -#: ../../../using/windows.rst:1386 +#: ../../../using/windows.rst:1390 msgid "" "If ``home`` is an absolute path and :envvar:`PYTHONHOME` is not set, this " "path is used instead of the path to the main executable when deducing the " "home location." msgstr "" -#: ../../../using/windows.rst:1390 +#: ../../../using/windows.rst:1394 msgid "The end result of all this is:" msgstr "" -#: ../../../using/windows.rst:1392 +#: ../../../using/windows.rst:1396 msgid "" "When running :file:`python.exe`, or any other .exe in the main Python " "directory (either an installed version, or directly from the PCbuild " @@ -1919,7 +1925,7 @@ msgid "" "ignored. Other \"application paths\" in the registry are always read." msgstr "" -#: ../../../using/windows.rst:1397 +#: ../../../using/windows.rst:1401 msgid "" "When Python is hosted in another .exe (different directory, embedded via " "COM, etc), the \"Python Home\" will not be deduced, so the core path from " @@ -1927,20 +1933,20 @@ msgid "" "always read." msgstr "" -#: ../../../using/windows.rst:1401 +#: ../../../using/windows.rst:1405 msgid "" "If Python can't find its home and there are no registry value (frozen .exe, " "some very strange installation setup) you get a path with some default, but " "relative, paths." msgstr "" -#: ../../../using/windows.rst:1405 +#: ../../../using/windows.rst:1409 msgid "" "For those who want to bundle Python into their application or distribution, " "the following advice will prevent conflicts with other installations:" msgstr "" -#: ../../../using/windows.rst:1408 +#: ../../../using/windows.rst:1412 msgid "" "Include a ``._pth`` file alongside your executable containing the " "directories to include. This will ignore paths listed in the registry and " @@ -1948,20 +1954,20 @@ msgid "" "listed." msgstr "" -#: ../../../using/windows.rst:1413 +#: ../../../using/windows.rst:1417 msgid "" "If you are loading :file:`python3.dll` or :file:`python37.dll` in your own " "executable, explicitly set :c:member:`PyConfig.module_search_paths` before :" "c:func:`Py_InitializeFromConfig`." msgstr "" -#: ../../../using/windows.rst:1417 +#: ../../../using/windows.rst:1421 msgid "" "Clear and/or overwrite :envvar:`PYTHONPATH` and set :envvar:`PYTHONHOME` " "before launching :file:`python.exe` from your application." msgstr "" -#: ../../../using/windows.rst:1420 +#: ../../../using/windows.rst:1424 msgid "" "If you cannot use the previous suggestions (for example, you are a " "distribution that allows people to run :file:`python.exe` directly), ensure " @@ -1970,7 +1976,7 @@ msgid "" "correctly named ZIP file will be detected instead.)" msgstr "" -#: ../../../using/windows.rst:1426 +#: ../../../using/windows.rst:1430 msgid "" "These will ensure that the files in a system-wide installation will not take " "precedence over the copy of the standard library bundled with your " @@ -1980,19 +1986,19 @@ msgid "" "packages." msgstr "" -#: ../../../using/windows.rst:1434 +#: ../../../using/windows.rst:1438 msgid "" "Add ``._pth`` file support and removes ``applocal`` option from ``pyvenv." "cfg``." msgstr "" -#: ../../../using/windows.rst:1439 +#: ../../../using/windows.rst:1443 msgid "" "Add :file:`python{XX}.zip` as a potential landmark when directly adjacent to " "the executable." msgstr "" -#: ../../../using/windows.rst:1444 +#: ../../../using/windows.rst:1448 msgid "" "Modules specified in the registry under ``Modules`` (not ``PythonPath``) may " "be imported by :class:`importlib.machinery.WindowsRegistryFinder`. This " @@ -2000,86 +2006,86 @@ msgid "" "explicitly added to :data:`sys.meta_path` in the future." msgstr "" -#: ../../../using/windows.rst:1450 +#: ../../../using/windows.rst:1454 msgid "Additional modules" msgstr "" -#: ../../../using/windows.rst:1452 +#: ../../../using/windows.rst:1456 msgid "" "Even though Python aims to be portable among all platforms, there are " "features that are unique to Windows. A couple of modules, both in the " "standard library and external, and snippets exist to use these features." msgstr "" -#: ../../../using/windows.rst:1456 +#: ../../../using/windows.rst:1460 msgid "" "The Windows-specific standard modules are documented in :ref:`mswin-specific-" "services`." msgstr "" -#: ../../../using/windows.rst:1460 +#: ../../../using/windows.rst:1464 msgid "PyWin32" msgstr "" -#: ../../../using/windows.rst:1462 +#: ../../../using/windows.rst:1466 msgid "" "The :pypi:`PyWin32` module by Mark Hammond is a collection of modules for " "advanced Windows-specific support. This includes utilities for:" msgstr "" -#: ../../../using/windows.rst:1466 +#: ../../../using/windows.rst:1470 msgid "" "`Component Object Model `_ (COM)" msgstr "" -#: ../../../using/windows.rst:1469 +#: ../../../using/windows.rst:1473 msgid "Win32 API calls" msgstr "" -#: ../../../using/windows.rst:1470 +#: ../../../using/windows.rst:1474 msgid "Registry" msgstr "" -#: ../../../using/windows.rst:1471 +#: ../../../using/windows.rst:1475 msgid "Event log" msgstr "" -#: ../../../using/windows.rst:1472 +#: ../../../using/windows.rst:1476 msgid "" "`Microsoft Foundation Classes `_ (MFC) user interfaces" msgstr "" -#: ../../../using/windows.rst:1476 +#: ../../../using/windows.rst:1480 msgid "" "`PythonWin `_ is a sample MFC application shipped with PyWin32. " "It is an embeddable IDE with a built-in debugger." msgstr "" -#: ../../../using/windows.rst:1482 +#: ../../../using/windows.rst:1486 msgid "" "`Win32 How Do I...? `_" msgstr "" -#: ../../../using/windows.rst:1483 +#: ../../../using/windows.rst:1487 msgid "by Tim Golden" msgstr "" -#: ../../../using/windows.rst:1485 +#: ../../../using/windows.rst:1489 msgid "`Python and COM `_" msgstr "" -#: ../../../using/windows.rst:1486 +#: ../../../using/windows.rst:1490 msgid "by David and Paul Boddie" msgstr "" -#: ../../../using/windows.rst:1490 +#: ../../../using/windows.rst:1494 msgid "cx_Freeze" msgstr "" -#: ../../../using/windows.rst:1492 +#: ../../../using/windows.rst:1496 msgid "" "`cx_Freeze `_ wraps Python " "scripts into executable Windows programs (:file:`{*}.exe` files). When you " @@ -2087,11 +2093,11 @@ msgid "" "users to install Python." msgstr "" -#: ../../../using/windows.rst:1499 +#: ../../../using/windows.rst:1503 msgid "Compiling Python on Windows" msgstr "" -#: ../../../using/windows.rst:1501 +#: ../../../using/windows.rst:1505 msgid "" "If you want to compile CPython yourself, first thing you should do is get " "the `source `_. You can download " @@ -2099,19 +2105,19 @@ msgid "" "devguide.python.org/setup/#get-the-source-code>`_." msgstr "" -#: ../../../using/windows.rst:1506 +#: ../../../using/windows.rst:1510 msgid "" "The source tree contains a build solution and project files for Microsoft " "Visual Studio, which is the compiler used to build the official Python " "releases. These files are in the :file:`PCbuild` directory." msgstr "" -#: ../../../using/windows.rst:1510 +#: ../../../using/windows.rst:1514 msgid "" "Check :file:`PCbuild/readme.txt` for general information on the build " "process." msgstr "" -#: ../../../using/windows.rst:1512 +#: ../../../using/windows.rst:1516 msgid "For extension modules, consult :ref:`building-on-windows`." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/whatsnew/3.14.pot b/main/locale/pot/LC_MESSAGES/whatsnew/3.14.pot index 69967f2d2b4..6a8a5218935 100644 --- a/main/locale/pot/LC_MESSAGES/whatsnew/3.14.pot +++ b/main/locale/pot/LC_MESSAGES/whatsnew/3.14.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -764,7 +764,7 @@ msgstr "" #: ../../../whatsnew/3.14.rst:651 msgid "" -"The new :mod:`!compression` package contains modules :mod:`!compression." +"The new :mod:`compression` package contains modules :mod:`!compression." "lzma`, :mod:`!compression.bz2`, :mod:`!compression.gzip` and :mod:`!" "compression.zlib` which re-export the :mod:`lzma`, :mod:`bz2`, :mod:`gzip` " "and :mod:`zlib` modules respectively. The new import names under :mod:`!" @@ -776,7 +776,7 @@ msgstr "" #: ../../../whatsnew/3.14.rst:660 msgid "" -"The new :mod:`!compression.zstd` module provides compression and " +"The new :mod:`compression.zstd` module provides compression and " "decompression APIs for the Zstandard format via bindings to `Meta's zstd " "library `__. Zstandard is a widely " "adopted, highly efficient, and fast compression format. In addition to the " diff --git a/main/locale/pot/LC_MESSAGES/whatsnew/3.15.pot b/main/locale/pot/LC_MESSAGES/whatsnew/3.15.pot index c100e53fc13..b44ec89481a 100644 --- a/main/locale/pot/LC_MESSAGES/whatsnew/3.15.pot +++ b/main/locale/pot/LC_MESSAGES/whatsnew/3.15.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -153,7 +153,7 @@ msgstr "" msgid ":ref:`More color `" msgstr "" -#: ../../../whatsnew/3.15.rst:103 ../../../whatsnew/3.15.rst:2416 +#: ../../../whatsnew/3.15.rst:103 ../../../whatsnew/3.15.rst:2434 msgid "New features" msgstr "" @@ -1126,85 +1126,94 @@ msgid "" "Galindo in :gh:`130472`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:907 +#: ../../../whatsnew/3.15.rst:905 +msgid "" +"Tab completion now suggests module attributes in ``from ... import`` " +"statements. Attributes can only be suggested once the module is imported, " +"so :term:`stdlib` modules are imported automatically, while for other " +"modules the completer offers to import them when :kbd:`Tab` is pressed a " +"second time. (Contributed by Loïc Simon and Pablo Galindo in :gh:`140870`.)" +msgstr "" + +#: ../../../whatsnew/3.15.rst:914 msgid "New modules" msgstr "" -#: ../../../whatsnew/3.15.rst:910 +#: ../../../whatsnew/3.15.rst:917 msgid "math.integer" msgstr "" -#: ../../../whatsnew/3.15.rst:912 +#: ../../../whatsnew/3.15.rst:919 msgid "" "This module provides access to the mathematical functions for integer " "arguments (:pep:`791`). (Contributed by Serhiy Storchaka in :gh:`81313`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:918 +#: ../../../whatsnew/3.15.rst:925 msgid "Improved modules" msgstr "" -#: ../../../whatsnew/3.15.rst:921 +#: ../../../whatsnew/3.15.rst:928 msgid "argparse" msgstr "" -#: ../../../whatsnew/3.15.rst:923 +#: ../../../whatsnew/3.15.rst:930 msgid "" "The :class:`~argparse.BooleanOptionalAction` action now supports single-dash " "long options and alternate prefix characters. (Contributed by Serhiy " "Storchaka in :gh:`138525`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:927 +#: ../../../whatsnew/3.15.rst:934 msgid "" "Changed the *suggest_on_error* parameter of :class:`argparse.ArgumentParser` " "to default to ``True``. This enables suggestions for mistyped arguments by " "default. (Contributed by Jakob Schluse in :gh:`140450`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:933 +#: ../../../whatsnew/3.15.rst:940 msgid "" "Added backtick markup support in :class:`~argparse.ArgumentParser` " "description and epilog text to highlight inline code when color output is " "enabled. (Contributed by Savannah Ostrowski in :gh:`142390`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:937 +#: ../../../whatsnew/3.15.rst:944 msgid "" "Extended backtick markup to argument ``help`` text and added support for " "double backticks (RST inline-literal style). (Contributed by Hugo van " "Kemenade in :gh:`149375`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:943 +#: ../../../whatsnew/3.15.rst:950 msgid "array" msgstr "" -#: ../../../whatsnew/3.15.rst:945 +#: ../../../whatsnew/3.15.rst:952 msgid "" "Support the :c:expr:`float complex` and :c:expr:`double complex` C types: " "formatting characters ``'Zf'`` and ``'Zd'`` respectively. (Contributed by " "Victor Stinner in :gh:`146151` and :gh:`148675`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:949 +#: ../../../whatsnew/3.15.rst:956 msgid "" "Support half-floats (16-bit IEEE 754 binary interchange format): formatting " "character ``'e'``. (Contributed by Sergey B Kirpichev in :gh:`146238`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:953 +#: ../../../whatsnew/3.15.rst:960 msgid "" "The :data:`array.typecodes` type changed from :class:`str` to :class:`tuple` " "to support type codes longer than 1 character (``Zf`` and ``Zd``). " "(Contributed by Victor Stinner in :gh:`148675`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:959 ../../../whatsnew/3.15.rst:2065 +#: ../../../whatsnew/3.15.rst:966 ../../../whatsnew/3.15.rst:2072 msgid "ast" msgstr "" -#: ../../../whatsnew/3.15.rst:963 +#: ../../../whatsnew/3.15.rst:970 msgid "" "Add *color* parameter to :func:`~ast.dump`. If ``True``, the returned string " "is syntax highlighted using ANSI escape sequences. If ``False`` (the " @@ -1212,18 +1221,18 @@ msgid "" "in :gh:`148981`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:969 +#: ../../../whatsnew/3.15.rst:976 msgid "" "The :ref:`command-line ` output is now syntax highlighted by " "default. This can be :ref:`controlled using environment variables `. (Contributed by Stan Ulbrych in :gh:`148981`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:975 +#: ../../../whatsnew/3.15.rst:982 msgid "asyncio" msgstr "" -#: ../../../whatsnew/3.15.rst:977 +#: ../../../whatsnew/3.15.rst:984 msgid "" "Added :meth:`TaskGroup.cancel ` to allow early " "termination of a task group, for instance, when the goal of the tasks has " @@ -1233,17 +1242,17 @@ msgid "" "by John Belmonte in :gh:`127214`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:986 +#: ../../../whatsnew/3.15.rst:993 msgid "base64" msgstr "" -#: ../../../whatsnew/3.15.rst:988 +#: ../../../whatsnew/3.15.rst:995 msgid "" "Added the *pad* parameter in :func:`~base64.z85encode`. (Contributed by " "Hauke Dämpfling in :gh:`143103`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:991 +#: ../../../whatsnew/3.15.rst:998 msgid "" "Added the *padded* parameter in :func:`~base64.b32encode`, :func:`~base64." "b32decode`, :func:`~base64.b32hexencode`, :func:`~base64.b32hexdecode`, :" @@ -1252,7 +1261,7 @@ msgid "" "Serhiy Storchaka in :gh:`73613`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:998 +#: ../../../whatsnew/3.15.rst:1005 msgid "" "Added the *wrapcol* parameter in :func:`~base64.b16encode`, :func:`~base64." "b32encode`, :func:`~base64.b32hexencode`, :func:`~base64.b64encode`, :func:" @@ -1260,7 +1269,7 @@ msgid "" "Storchaka in :gh:`143214` and :gh:`146431`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1004 +#: ../../../whatsnew/3.15.rst:1011 msgid "" "Added the *ignorechars* parameter in :func:`~base64.b16decode`, :func:" "`~base64.b32decode`, :func:`~base64.b32hexdecode`, :func:`~base64." @@ -1268,100 +1277,99 @@ msgid "" "(Contributed by Serhiy Storchaka in :gh:`144001` and :gh:`146431`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1010 +#: ../../../whatsnew/3.15.rst:1017 msgid "" "Added the *canonical* parameter in :func:`~base64.b32decode`, :func:`~base64." -"b32hexdecode`, :func:`~base64.b64decode`, :func:`~base64." -"urlsafe_b64decode`, :func:`~base64.a85decode`, :func:`~base64.b85decode`, " -"and :func:`~base64.z85decode`, to reject encodings with non-zero padding " -"bits or other non-canonical forms. (Contributed by Gregory P. Smith in :gh:" -"`146311`.)" +"b32hexdecode`, :func:`~base64.b64decode`, :func:`~base64.a85decode`, :func:" +"`~base64.b85decode`, and :func:`~base64.z85decode`, to reject encodings with " +"non-zero padding bits or other non-canonical forms. (Contributed by Gregory " +"P. Smith in :gh:`146311`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1021 +#: ../../../whatsnew/3.15.rst:1028 msgid "binascii" msgstr "" -#: ../../../whatsnew/3.15.rst:1023 +#: ../../../whatsnew/3.15.rst:1030 msgid "Added functions for Base32 encoding:" msgstr "" -#: ../../../whatsnew/3.15.rst:1025 +#: ../../../whatsnew/3.15.rst:1032 msgid ":func:`~binascii.b2a_base32` and :func:`~binascii.a2b_base32`" msgstr "" -#: ../../../whatsnew/3.15.rst:1027 +#: ../../../whatsnew/3.15.rst:1034 msgid "(Contributed by James Seo in :gh:`146192`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1029 +#: ../../../whatsnew/3.15.rst:1036 msgid "Added functions for Ascii85, Base85, and Z85 encoding:" msgstr "" -#: ../../../whatsnew/3.15.rst:1031 +#: ../../../whatsnew/3.15.rst:1038 msgid ":func:`~binascii.b2a_ascii85` and :func:`~binascii.a2b_ascii85`" msgstr "" -#: ../../../whatsnew/3.15.rst:1032 +#: ../../../whatsnew/3.15.rst:1039 msgid ":func:`~binascii.b2a_base85` and :func:`~binascii.a2b_base85`" msgstr "" -#: ../../../whatsnew/3.15.rst:1034 +#: ../../../whatsnew/3.15.rst:1041 msgid "(Contributed by James Seo and Serhiy Storchaka in :gh:`101178`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1036 +#: ../../../whatsnew/3.15.rst:1043 msgid "" "Added the *padded* parameter in :func:`~binascii.b2a_base32`, :func:" "`~binascii.a2b_base32`, :func:`~binascii.b2a_base64`, and :func:`~binascii." "a2b_base64`. (Contributed by Serhiy Storchaka in :gh:`73613`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1041 +#: ../../../whatsnew/3.15.rst:1048 msgid "" "Added the *wrapcol* parameter in :func:`~binascii.b2a_base64`. (Contributed " "by Serhiy Storchaka in :gh:`143214`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1044 +#: ../../../whatsnew/3.15.rst:1051 msgid "" "Added the *alphabet* parameter in :func:`~binascii.b2a_base64` and :func:" "`~binascii.a2b_base64`. (Contributed by Serhiy Storchaka in :gh:`145980`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1048 +#: ../../../whatsnew/3.15.rst:1055 msgid "" "Added the *ignorechars* parameter in :func:`~binascii.a2b_hex`, :func:" "`~binascii.unhexlify`, and :func:`~binascii.a2b_base64`. (Contributed by " "Serhiy Storchaka in :gh:`144001` and :gh:`146431`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1052 +#: ../../../whatsnew/3.15.rst:1059 msgid "" "Added the *canonical* parameter in :func:`~binascii.a2b_base64`, to reject " "encodings with non-zero padding bits. (Contributed by Gregory P. Smith in :" "gh:`146311`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1058 +#: ../../../whatsnew/3.15.rst:1065 msgid "calendar" msgstr "" -#: ../../../whatsnew/3.15.rst:1062 +#: ../../../whatsnew/3.15.rst:1069 msgid "" ":mod:`calendar`'s :ref:`command-line ` text output has more " "color. This can be controlled with :ref:`environment variables `. (Contributed by Hugo van Kemenade in :gh:`148352`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1067 +#: ../../../whatsnew/3.15.rst:1074 msgid "" "The :mod:`calendar`'s :ref:`command-line ` HTML output now " "accepts the year-month option: ``python -m calendar -t html 2009 06``. " "(Contributed by Pål Grønås Drange in :gh:`140212`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1071 +#: ../../../whatsnew/3.15.rst:1078 msgid "" "Calendar pages generated by the :class:`calendar.HTMLCalendar` class now " "support dark mode and have been migrated to the HTML5 standard for improved " @@ -1369,22 +1377,22 @@ msgid "" "`137634`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1077 +#: ../../../whatsnew/3.15.rst:1084 msgid "collections" msgstr "" -#: ../../../whatsnew/3.15.rst:1079 +#: ../../../whatsnew/3.15.rst:1086 msgid "" "Added :meth:`!collections.Counter.__xor__` and :meth:`!collections.Counter." "__ixor__` to compute the symmetric difference between :class:`~collections." "Counter` objects. (Contributed by Raymond Hettinger in :gh:`138682`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1086 +#: ../../../whatsnew/3.15.rst:1093 msgid "concurrent.futures" msgstr "" -#: ../../../whatsnew/3.15.rst:1088 +#: ../../../whatsnew/3.15.rst:1095 msgid "" "Improved error reporting when a child process in a :class:`concurrent." "futures.ProcessPoolExecutor` terminates abruptly. The resulting traceback " @@ -1392,11 +1400,11 @@ msgid "" "(Contributed by Jonathan Berg in :gh:`139486`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1096 +#: ../../../whatsnew/3.15.rst:1103 msgid "contextlib" msgstr "" -#: ../../../whatsnew/3.15.rst:1098 +#: ../../../whatsnew/3.15.rst:1105 msgid "" "Added support for arbitrary descriptors :meth:`!__enter__`, :meth:`!" "__exit__`, :meth:`!__aenter__`, and :meth:`!__aexit__` in :class:" @@ -1405,7 +1413,7 @@ msgid "" "(Contributed by Serhiy Storchaka in :gh:`144386`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1104 +#: ../../../whatsnew/3.15.rst:1111 msgid "" ":class:`~contextlib.ContextDecorator` and :class:`~contextlib." "AsyncContextDecorator` (and therefore :func:`~contextlib.contextmanager` " @@ -1417,11 +1425,11 @@ msgid "" "`125862`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1115 ../../../whatsnew/3.15.rst:2083 +#: ../../../whatsnew/3.15.rst:1122 ../../../whatsnew/3.15.rst:2090 msgid "ctypes" msgstr "" -#: ../../../whatsnew/3.15.rst:1117 +#: ../../../whatsnew/3.15.rst:1124 msgid "" "Change the :py:attr:`~ctypes._SimpleCData._type_` of :class:`~ctypes." "c_float_complex`, :class:`~ctypes.c_double_complex` and :class:`~ctypes." @@ -1430,32 +1438,32 @@ msgid "" "`148675`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1125 +#: ../../../whatsnew/3.15.rst:1132 msgid "dataclasses" msgstr "" -#: ../../../whatsnew/3.15.rst:1127 +#: ../../../whatsnew/3.15.rst:1134 msgid "" "Annotations for generated ``__init__`` methods no longer include internal " "type names." msgstr "" -#: ../../../whatsnew/3.15.rst:1132 +#: ../../../whatsnew/3.15.rst:1139 msgid "dbm" msgstr "" -#: ../../../whatsnew/3.15.rst:1134 +#: ../../../whatsnew/3.15.rst:1141 msgid "" "Added new :meth:`!reorganize` methods to :mod:`dbm.dumb` and :mod:`dbm." "sqlite3` to recover unused free space previously occupied by deleted " "entries. (Contributed by Andrea Oliveri in :gh:`134004`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1140 +#: ../../../whatsnew/3.15.rst:1147 msgid "difflib" msgstr "" -#: ../../../whatsnew/3.15.rst:1144 +#: ../../../whatsnew/3.15.rst:1151 msgid "" "Introduced the optional *color* parameter to :func:`difflib.unified_diff`, " "enabling color output similar to :program:`git diff`. This can be controlled " @@ -1463,18 +1471,18 @@ msgid "" "by Douglas Thor in :gh:`133725`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1150 +#: ../../../whatsnew/3.15.rst:1157 msgid "" "Improved the styling of HTML diff pages generated by the :class:`difflib." "HtmlDiff` class, and migrated the output to the HTML5 standard. (Contributed " "by Jiahao Li in :gh:`134580`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1156 +#: ../../../whatsnew/3.15.rst:1163 msgid "email" msgstr "" -#: ../../../whatsnew/3.15.rst:1158 +#: ../../../whatsnew/3.15.rst:1165 msgid "" "Email generators now raise an error when an :class:`.EmailMessage` cannot be " "accurately flattened due to a non-ASCII email address (mailbox) in an " @@ -1483,11 +1491,11 @@ msgid "" "Murray and Mike Edmunds in :gh:`122540`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1166 +#: ../../../whatsnew/3.15.rst:1173 msgid "faulthandler" msgstr "" -#: ../../../whatsnew/3.15.rst:1168 +#: ../../../whatsnew/3.15.rst:1175 msgid "" "Added the *max_threads* parameter in :func:`faulthandler.enable`, :func:" "`faulthandler.dump_traceback`, :func:`faulthandler.dump_traceback_later`, " @@ -1495,28 +1503,28 @@ msgid "" "`149085`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1175 +#: ../../../whatsnew/3.15.rst:1182 msgid "functools" msgstr "" -#: ../../../whatsnew/3.15.rst:1177 +#: ../../../whatsnew/3.15.rst:1184 msgid "" ":func:`~functools.singledispatchmethod` now supports non-:term:`descriptor` " "callables. (Contributed by Serhiy Storchaka in :gh:`140873`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1181 +#: ../../../whatsnew/3.15.rst:1188 msgid "" ":func:`~functools.singledispatchmethod` now dispatches on the second " "argument if it wraps a regular method and is called as a class attribute. " "(Contributed by Bartosz Sławecki in :gh:`143535`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1187 +#: ../../../whatsnew/3.15.rst:1194 msgid "gc" msgstr "" -#: ../../../whatsnew/3.15.rst:1189 +#: ../../../whatsnew/3.15.rst:1196 msgid "" "Python 3.14.0-3.14.4 shipped with a new incremental garbage collector. " "However, due to a number of `reports `, is colored by default. This " @@ -1564,7 +1572,7 @@ msgid "" "color>`. (Contributed by Hugo van Kemenade in :gh:`146292`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1230 +#: ../../../whatsnew/3.15.rst:1237 msgid "" "Added :attr:`~http.server.SimpleHTTPRequestHandler.default_content_type` and " "the :option:`--content-type ` command-line " @@ -1573,25 +1581,25 @@ msgid "" "in :gh:`113471`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1236 +#: ../../../whatsnew/3.15.rst:1243 msgid "" "Add a new ``extra_response_headers`` keyword argument to :class:`~http." "server.SimpleHTTPRequestHandler` to support custom headers in HTTP " "responses. (Contributed by Anton I. Sipos in :gh:`135057`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1241 +#: ../../../whatsnew/3.15.rst:1248 msgid "" "Add a ``-H/--header`` option to the :program:`python -m http.server` command-" "line interface to support custom headers in HTTP responses. (Contributed by " "Anton I. Sipos in :gh:`135057`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1247 +#: ../../../whatsnew/3.15.rst:1254 msgid "importlib.metadata" msgstr "" -#: ../../../whatsnew/3.15.rst:1249 +#: ../../../whatsnew/3.15.rst:1256 msgid "" "Previously, when accessing a distribution metadata directory not containing " "a metadata file, ``metadata()`` and ``Distribution.metadata`` would return " @@ -1602,21 +1610,21 @@ msgid "" "(Contributed by Jason R. Coombs.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1260 +#: ../../../whatsnew/3.15.rst:1267 msgid "inspect" msgstr "" -#: ../../../whatsnew/3.15.rst:1262 +#: ../../../whatsnew/3.15.rst:1269 msgid "" "Add parameters *inherit_class_doc* and *fallback_to_class_doc* for :func:" "`~inspect.getdoc`. (Contributed by Serhiy Storchaka in :gh:`132686`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1268 +#: ../../../whatsnew/3.15.rst:1275 msgid "json" msgstr "" -#: ../../../whatsnew/3.15.rst:1270 +#: ../../../whatsnew/3.15.rst:1277 msgid "" "Add the *array_hook* parameter to :func:`~json.load` and :func:`~json.loads` " "functions: allow a callback for JSON literal array types to customize Python " @@ -1626,11 +1634,11 @@ msgid "" "(Contributed by Joao S. O. Bueno in :gh:`146440`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1280 +#: ../../../whatsnew/3.15.rst:1287 msgid "locale" msgstr "" -#: ../../../whatsnew/3.15.rst:1282 +#: ../../../whatsnew/3.15.rst:1289 msgid "" ":func:`~locale.setlocale` now supports language codes with ``@``-modifiers. " "``@``-modifiers are no longer silently removed in :func:`~locale.getlocale`, " @@ -1638,33 +1646,33 @@ msgid "" "`137729`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1287 +#: ../../../whatsnew/3.15.rst:1294 msgid "" "Undeprecate the :func:`locale.getdefaultlocale` function. (Contributed by " "Victor Stinner in :gh:`130796`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1292 +#: ../../../whatsnew/3.15.rst:1299 msgid "math" msgstr "" -#: ../../../whatsnew/3.15.rst:1294 +#: ../../../whatsnew/3.15.rst:1301 msgid "" "Add :func:`math.isnormal` and :func:`math.issubnormal` functions. " "(Contributed by Sergey B Kirpichev in :gh:`132908`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1297 +#: ../../../whatsnew/3.15.rst:1304 msgid "" "Add :func:`math.fmax`, :func:`math.fmin` and :func:`math.signbit` functions. " "(Contributed by Bénédikt Tran in :gh:`135853`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1302 +#: ../../../whatsnew/3.15.rst:1309 msgid "mimetypes" msgstr "" -#: ../../../whatsnew/3.15.rst:1304 +#: ../../../whatsnew/3.15.rst:1311 msgid "" "Add more MIME types. (Contributed by Benedikt Johannes, Charlie Lin, " "Foolbar, Gil Forcada and John Franey in :gh:`144217`, :gh:`145720`, :gh:" @@ -1672,30 +1680,30 @@ msgid "" "`144213`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1309 +#: ../../../whatsnew/3.15.rst:1316 msgid "" "Rename ``application/x-texinfo`` to ``application/texinfo``. (Contributed by " "Charlie Lin in :gh:`140165`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1311 +#: ../../../whatsnew/3.15.rst:1318 msgid "" "Changed the MIME type for ``.ai`` files to ``application/pdf``. (Contributed " "by Stan Ulbrych in :gh:`141239`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1316 +#: ../../../whatsnew/3.15.rst:1323 msgid "mmap" msgstr "" -#: ../../../whatsnew/3.15.rst:1318 +#: ../../../whatsnew/3.15.rst:1325 msgid "" ":class:`mmap.mmap` now has a *trackfd* parameter on Windows; if it is " "``False``, the file handle corresponding to *fileno* will not be duplicated. " "(Contributed by Serhiy Storchaka in :gh:`78502`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1323 +#: ../../../whatsnew/3.15.rst:1330 msgid "" "Added the :meth:`mmap.mmap.set_name` method to annotate an anonymous memory " "mapping if Linux kernel supports :manpage:`PR_SET_VMA_ANON_NAME " @@ -1703,18 +1711,18 @@ msgid "" "gh:`142419`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1330 +#: ../../../whatsnew/3.15.rst:1337 msgid "os" msgstr "" -#: ../../../whatsnew/3.15.rst:1332 +#: ../../../whatsnew/3.15.rst:1339 msgid "" "Add :func:`os.statx` on Linux kernel versions 4.11 and later with glibc " "versions 2.28 and later. (Contributed by Jeffrey Bosboom and Victor Stinner " "in :gh:`83714`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1336 +#: ../../../whatsnew/3.15.rst:1343 msgid "" ":func:`os.makedirs` function now has a *parent_mode* parameter that allows " "specifying the mode for intermediate directories. This can be used to match " @@ -1722,17 +1730,17 @@ msgid "" "(Contributed by Zackery Spytz and Gregory P. Smith in :gh:`86533`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1342 +#: ../../../whatsnew/3.15.rst:1349 msgid "os.path" msgstr "" -#: ../../../whatsnew/3.15.rst:1344 +#: ../../../whatsnew/3.15.rst:1351 msgid "" "Add support of the all-but-last mode in :func:`~os.path.realpath`. " "(Contributed by Serhiy Storchaka in :gh:`71189`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1347 +#: ../../../whatsnew/3.15.rst:1354 msgid "" "The *strict* parameter to :func:`os.path.realpath` accepts a new value, :" "data:`os.path.ALLOW_MISSING`. If used, errors other than :exc:" @@ -1741,53 +1749,53 @@ msgid "" "`2025-4517`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1355 ../../../whatsnew/3.15.rst:2126 +#: ../../../whatsnew/3.15.rst:1362 ../../../whatsnew/3.15.rst:2144 msgid "pathlib" msgstr "" -#: ../../../whatsnew/3.15.rst:1357 +#: ../../../whatsnew/3.15.rst:1364 msgid "" ":meth:`pathlib.Path.mkdir` now has a *parent_mode* parameter that allows " "specifying the mode for intermediate directories when ``parents=True``. " "(Contributed by Gregory P. Smith in :gh:`86533`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1363 +#: ../../../whatsnew/3.15.rst:1370 msgid "pdb" msgstr "" -#: ../../../whatsnew/3.15.rst:1365 +#: ../../../whatsnew/3.15.rst:1372 msgid "" "Use the new interactive shell as the default input shell for :mod:`pdb`. " "(Contributed by Tian Gao in :gh:`145379`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1370 +#: ../../../whatsnew/3.15.rst:1377 msgid "pickle" msgstr "" -#: ../../../whatsnew/3.15.rst:1372 +#: ../../../whatsnew/3.15.rst:1379 msgid "" "Add support for pickling private methods and nested classes. (Contributed by " "Zackery Spytz and Serhiy Storchaka in :gh:`77188`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1377 +#: ../../../whatsnew/3.15.rst:1384 msgid "pickletools" msgstr "" -#: ../../../whatsnew/3.15.rst:1381 +#: ../../../whatsnew/3.15.rst:1388 msgid "" "The output of the :mod:`pickletools` command-line interface is colored by " "default. This can be controlled with :ref:`environment variables `. (Contributed by Hugo van Kemenade in :gh:`149026`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1388 +#: ../../../whatsnew/3.15.rst:1395 msgid "pprint" msgstr "" -#: ../../../whatsnew/3.15.rst:1390 +#: ../../../whatsnew/3.15.rst:1397 msgid "" "Add an *expand* keyword argument for :func:`pprint.pprint`, :func:`pprint." "pformat`, :func:`pprint.pp`. If true, the output will be formatted similar " @@ -1795,17 +1803,17 @@ msgid "" "by Stefan Todoran, Semyon Moroz and Hugo van Kemenade in :gh:`112632`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1397 +#: ../../../whatsnew/3.15.rst:1404 msgid "" "Add t-string support to :mod:`pprint`. (Contributed by Loïc Simon and Hugo " "van Kemenade in :gh:`134551`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1402 +#: ../../../whatsnew/3.15.rst:1409 msgid "re" msgstr "" -#: ../../../whatsnew/3.15.rst:1404 +#: ../../../whatsnew/3.15.rst:1411 msgid "" ":func:`re.prefixmatch` and a corresponding :meth:`re.Pattern.prefixmatch` " "have been added as alternate, more explicit names for the existing and now :" @@ -1817,11 +1825,11 @@ msgid "" "(Contributed by Gregory P. Smith in :gh:`86519`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1416 +#: ../../../whatsnew/3.15.rst:1423 msgid "resource" msgstr "" -#: ../../../whatsnew/3.15.rst:1418 +#: ../../../whatsnew/3.15.rst:1425 msgid "" "Add new constants: :data:`~resource.RLIMIT_NTHR`, :data:`~resource." "RLIMIT_UMTXP`, :data:`~resource.RLIMIT_THREADS`, :data:`~resource." @@ -1829,87 +1837,87 @@ msgid "" "Serhiy Storchaka in :gh:`137512`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1425 +#: ../../../whatsnew/3.15.rst:1432 msgid "shelve" msgstr "" -#: ../../../whatsnew/3.15.rst:1427 +#: ../../../whatsnew/3.15.rst:1434 msgid "" "Added new :meth:`!reorganize` method to :mod:`shelve` used to recover unused " "free space previously occupied by deleted entries. (Contributed by Andrea " "Oliveri in :gh:`134004`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1430 +#: ../../../whatsnew/3.15.rst:1437 msgid "" "Add support for custom serialization and deserialization functions in the :" "mod:`shelve` module. (Contributed by Furkan Onder in :gh:`99631`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1436 +#: ../../../whatsnew/3.15.rst:1443 msgid "shutil" msgstr "" -#: ../../../whatsnew/3.15.rst:1438 +#: ../../../whatsnew/3.15.rst:1445 msgid "" ":func:`shutil.copyfile` now also raises :exc:`~shutil.SpecialFileError` for " "sockets and device files. (Contributed by Savannah Ostrowski in :gh:" "`142693`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1444 +#: ../../../whatsnew/3.15.rst:1451 msgid "socket" msgstr "" -#: ../../../whatsnew/3.15.rst:1446 +#: ../../../whatsnew/3.15.rst:1453 msgid "" "Add constants for the ISO-TP CAN protocol. (Contributed by Patrick Menschel " "and Stefan Tatschner in :gh:`86819`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1451 +#: ../../../whatsnew/3.15.rst:1458 msgid "sqlite3" msgstr "" -#: ../../../whatsnew/3.15.rst:1453 +#: ../../../whatsnew/3.15.rst:1460 msgid "" "The :ref:`command-line interface ` has several new features:" msgstr "" -#: ../../../whatsnew/3.15.rst:1455 +#: ../../../whatsnew/3.15.rst:1462 msgid "" "SQL keyword completion on . (Contributed by Long Tan in :gh:`133393`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1460 +#: ../../../whatsnew/3.15.rst:1467 msgid "" "Prompts, error messages, and help text are now colored. This is enabled by " "default, see :ref:`using-on-controlling-color` for details. (Contributed by " "Stan Ulbrych and Łukasz Langa in :gh:`133461`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1465 +#: ../../../whatsnew/3.15.rst:1472 msgid "" "Table, index, trigger, view, column, function, and schema completion on " ". (Contributed by Long Tan in :gh:`136101`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1470 +#: ../../../whatsnew/3.15.rst:1477 msgid "ssl" msgstr "" -#: ../../../whatsnew/3.15.rst:1472 +#: ../../../whatsnew/3.15.rst:1479 msgid "" "Indicate through :data:`ssl.HAS_PSK_TLS13` whether the :mod:`ssl` module " "supports \"External PSKs\" in TLSv1.3, as described in :rfc:`9258`. " "(Contributed by Will Childs-Klein in :gh:`133624`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1476 +#: ../../../whatsnew/3.15.rst:1483 msgid "Added new methods for managing groups used for SSL key agreement:" msgstr "" -#: ../../../whatsnew/3.15.rst:1478 +#: ../../../whatsnew/3.15.rst:1485 msgid "" ":meth:`ssl.SSLContext.set_groups` sets the groups allowed for doing key " "agreement, extending the previous :meth:`ssl.SSLContext.set_ecdh_curve` " @@ -1919,25 +1927,25 @@ msgid "" "handshake." msgstr "" -#: ../../../whatsnew/3.15.rst:1485 +#: ../../../whatsnew/3.15.rst:1492 msgid "" ":meth:`ssl.SSLSocket.group` returns the group selected for doing key " "agreement on the current connection after the TLS handshake completes. This " "call requires OpenSSL 3.2 or later." msgstr "" -#: ../../../whatsnew/3.15.rst:1488 +#: ../../../whatsnew/3.15.rst:1495 msgid "" ":meth:`ssl.SSLContext.get_groups` returns a list of all available key " "agreement groups compatible with the minimum and maximum TLS versions " "currently set in the context. This call requires OpenSSL 3.5 or later." msgstr "" -#: ../../../whatsnew/3.15.rst:1492 +#: ../../../whatsnew/3.15.rst:1499 msgid "(Contributed by Ron Frederick in :gh:`136306`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1494 +#: ../../../whatsnew/3.15.rst:1501 msgid "" "Added a new method :meth:`ssl.SSLContext.set_ciphersuites` for setting TLS " "1.3 ciphers. For TLS 1.2 or earlier, :meth:`ssl.SSLContext.set_ciphers` " @@ -1946,103 +1954,103 @@ msgid "" "connection is made. (Contributed by Ron Frederick in :gh:`137197`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1501 +#: ../../../whatsnew/3.15.rst:1508 msgid "Added new methods for managing signature algorithms:" msgstr "" -#: ../../../whatsnew/3.15.rst:1503 +#: ../../../whatsnew/3.15.rst:1510 msgid "" ":func:`ssl.get_sigalgs` returns a list of all available TLS signature " "algorithms. This call requires OpenSSL 3.4 or later." msgstr "" -#: ../../../whatsnew/3.15.rst:1505 +#: ../../../whatsnew/3.15.rst:1512 msgid "" ":meth:`ssl.SSLContext.set_client_sigalgs` sets the signature algorithms " "allowed for certificate-based client authentication." msgstr "" -#: ../../../whatsnew/3.15.rst:1507 +#: ../../../whatsnew/3.15.rst:1514 msgid "" ":meth:`ssl.SSLContext.set_server_sigalgs` sets the signature algorithms " "allowed for the server to complete the TLS handshake." msgstr "" -#: ../../../whatsnew/3.15.rst:1509 +#: ../../../whatsnew/3.15.rst:1516 msgid "" ":meth:`ssl.SSLSocket.client_sigalg` returns the signature algorithm selected " "for client authentication on the current connection. This call requires " "OpenSSL 3.5 or later." msgstr "" -#: ../../../whatsnew/3.15.rst:1512 +#: ../../../whatsnew/3.15.rst:1519 msgid "" ":meth:`ssl.SSLSocket.server_sigalg` returns the signature algorithm selected " "for the server to complete the TLS handshake on the current connection. This " "call requires OpenSSL 3.5 or later." msgstr "" -#: ../../../whatsnew/3.15.rst:1516 +#: ../../../whatsnew/3.15.rst:1523 msgid "(Contributed by Ron Frederick in :gh:`138252`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1520 +#: ../../../whatsnew/3.15.rst:1527 msgid "subprocess" msgstr "" -#: ../../../whatsnew/3.15.rst:1522 +#: ../../../whatsnew/3.15.rst:1529 msgid "" ":meth:`subprocess.Popen.wait`: when ``timeout`` is not ``None`` and the " "platform supports it, an efficient event-driven mechanism is used to wait " "for process termination:" msgstr "" -#: ../../../whatsnew/3.15.rst:1526 +#: ../../../whatsnew/3.15.rst:1533 msgid "Linux >= 5.3 uses :func:`os.pidfd_open` + :func:`select.poll`." msgstr "" -#: ../../../whatsnew/3.15.rst:1527 +#: ../../../whatsnew/3.15.rst:1534 msgid "" "macOS and other BSD variants use :func:`select.kqueue` + ``KQ_FILTER_PROC`` " "+ ``KQ_NOTE_EXIT``." msgstr "" -#: ../../../whatsnew/3.15.rst:1528 +#: ../../../whatsnew/3.15.rst:1535 msgid "Windows keeps using ``WaitForSingleObject`` (unchanged)." msgstr "" -#: ../../../whatsnew/3.15.rst:1530 +#: ../../../whatsnew/3.15.rst:1537 msgid "" "If none of these mechanisms are available, the function falls back to the " "traditional busy loop (non-blocking call and short sleeps). (Contributed by " "Giampaolo Rodola in :gh:`83069`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1536 +#: ../../../whatsnew/3.15.rst:1543 msgid "symtable" msgstr "" -#: ../../../whatsnew/3.15.rst:1538 +#: ../../../whatsnew/3.15.rst:1545 msgid "" "Add :meth:`symtable.Function.get_cells` and :meth:`symtable.Symbol.is_cell` " "methods. (Contributed by Yashp002 in :gh:`143504`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1543 +#: ../../../whatsnew/3.15.rst:1550 msgid "sys" msgstr "" -#: ../../../whatsnew/3.15.rst:1545 +#: ../../../whatsnew/3.15.rst:1552 msgid "" "Add :data:`sys.abi_info` namespace to improve access to ABI information. " "(Contributed by Klaus Zimmermann in :gh:`137476`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1550 +#: ../../../whatsnew/3.15.rst:1557 msgid "sys.monitoring" msgstr "" -#: ../../../whatsnew/3.15.rst:1552 +#: ../../../whatsnew/3.15.rst:1559 msgid "" "The :ref:`other events ` (:monitoring-event:" "`PY_THROW`, :monitoring-event:`PY_UNWIND`, :monitoring-event:`RAISE`, :" @@ -2054,25 +2062,25 @@ msgid "" "Tornetta in :gh:`146182`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1563 +#: ../../../whatsnew/3.15.rst:1570 msgid "tarfile" msgstr "" -#: ../../../whatsnew/3.15.rst:1565 +#: ../../../whatsnew/3.15.rst:1572 msgid "" ":func:`~tarfile.data_filter` now normalizes symbolic link targets in order " "to avoid path traversal attacks. (Contributed by Petr Viktorin in :gh:" "`127987` and :cve:`2025-4138`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1568 +#: ../../../whatsnew/3.15.rst:1575 msgid "" ":func:`~tarfile.TarFile.extractall` now skips fixing up directory attributes " "when a directory was removed or replaced by another kind of file. " "(Contributed by Petr Viktorin in :gh:`127987` and :cve:`2024-12718`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1571 +#: ../../../whatsnew/3.15.rst:1578 msgid "" ":func:`~tarfile.TarFile.extract` and :func:`~tarfile.TarFile.extractall` now " "(re-)apply the extraction filter when substituting a link (hard or symbolic) " @@ -2082,7 +2090,7 @@ msgid "" "cve:`2024-12718`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1577 +#: ../../../whatsnew/3.15.rst:1584 msgid "" ":func:`~tarfile.TarFile.extract` and :func:`~tarfile.TarFile.extractall` no " "longer extract rejected members when :func:`~tarfile.TarFile.errorlevel` is " @@ -2090,7 +2098,7 @@ msgid "" "cve:`2025-4435`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1582 +#: ../../../whatsnew/3.15.rst:1589 msgid "" ":func:`~tarfile.TarFile.extract` and :func:`~tarfile.TarFile.extractall` now " "replace slashes with backslashes in symlink targets on Windows to prevent " @@ -2098,18 +2106,18 @@ msgid "" "`57911`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1586 +#: ../../../whatsnew/3.15.rst:1593 msgid "" ":func:`~tarfile.TarFile.gettarinfo` now replaces backslashes with slashes in " "symlink targets on Windows to conform to the tar format standard. " "(Contributed by Daniele Nicolodi in :gh:`151669`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1592 ../../../whatsnew/3.15.rst:2156 +#: ../../../whatsnew/3.15.rst:1599 ../../../whatsnew/3.15.rst:2174 msgid "threading" msgstr "" -#: ../../../whatsnew/3.15.rst:1594 +#: ../../../whatsnew/3.15.rst:1601 msgid "" "Added :class:`~threading.serialize_iterator`, :func:`~threading." "synchronized_iterator`, and :func:`~threading.concurrent_tee` to support " @@ -2117,36 +2125,36 @@ msgid "" "Hettinger in :gh:`124397`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1602 +#: ../../../whatsnew/3.15.rst:1609 msgid "timeit" msgstr "" -#: ../../../whatsnew/3.15.rst:1606 +#: ../../../whatsnew/3.15.rst:1613 msgid "" "The output of the :mod:`timeit` command-line interface is colored by " "default. This can be controlled with :ref:`environment variables `. (Contributed by Hugo van Kemenade in :gh:`146609`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1611 +#: ../../../whatsnew/3.15.rst:1618 msgid "" "The command-line interface now colorizes error tracebacks by default. This " "can be controlled with :ref:`environment variables `. (Contributed by Yi Hong in :gh:`139374`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1616 +#: ../../../whatsnew/3.15.rst:1623 msgid "" "Make the target time of :meth:`timeit.Timer.autorange` configurable and add " "``--target-time`` option to the command-line interface. (Contributed by " "Alessandro Cucci and Miikka Koskinen in :gh:`80642`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1622 +#: ../../../whatsnew/3.15.rst:1629 msgid "tkinter" msgstr "" -#: ../../../whatsnew/3.15.rst:1624 +#: ../../../whatsnew/3.15.rst:1631 msgid "" "The :meth:`!tkinter.Text.search` method now supports two additional " "arguments: *nolinestop* which allows the search to continue across line " @@ -2154,7 +2162,7 @@ msgid "" "specified range. (Contributed by Rihaan Meher in :gh:`130848`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1630 +#: ../../../whatsnew/3.15.rst:1637 msgid "" "A new method :meth:`!tkinter.Text.search_all` has been introduced. This " "method allows for searching for all matches of a pattern using Tcl's ``-" @@ -2162,7 +2170,7 @@ msgid "" "`130848`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1635 +#: ../../../whatsnew/3.15.rst:1642 msgid "" "Added new methods :meth:`!pack_content`, :meth:`!place_content` and :meth:`!" "grid_content` which use Tk commands with new names (introduced in Tk 8.6) " @@ -2170,7 +2178,7 @@ msgid "" "names. (Contributed by Serhiy Storchaka in :gh:`143754`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1641 +#: ../../../whatsnew/3.15.rst:1648 msgid "" "Added :class:`!Event` attributes :attr:`!user_data` for Tk virtual events " "and :attr:`!detail` for ``Enter``, ``Leave``, ``FocusIn``, ``FocusOut``, and " @@ -2178,11 +2186,11 @@ msgid "" "Storchaka in :gh:`47655`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1648 +#: ../../../whatsnew/3.15.rst:1655 msgid "tokenize" msgstr "" -#: ../../../whatsnew/3.15.rst:1652 +#: ../../../whatsnew/3.15.rst:1659 msgid "" "The output of the :mod:`tokenize` :ref:`command-line interface ` is colored by default. This can be controlled with :ref:`environment " @@ -2190,63 +2198,63 @@ msgid "" "in :gh:`148991`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1661 +#: ../../../whatsnew/3.15.rst:1668 msgid "tomllib" msgstr "" -#: ../../../whatsnew/3.15.rst:1663 +#: ../../../whatsnew/3.15.rst:1670 msgid "" "The :mod:`tomllib` module now supports TOML 1.1.0. This is a backwards " "compatible update, meaning that all valid TOML 1.0.0 documents are parsed " "the same way." msgstr "" -#: ../../../whatsnew/3.15.rst:1667 +#: ../../../whatsnew/3.15.rst:1674 msgid "The changes, according to the `official TOML changelog`_, are:" msgstr "" -#: ../../../whatsnew/3.15.rst:1669 +#: ../../../whatsnew/3.15.rst:1676 msgid "Allow newlines and trailing commas in inline tables." msgstr "" -#: ../../../whatsnew/3.15.rst:1671 +#: ../../../whatsnew/3.15.rst:1678 msgid "" "Previously an inline table had to be on a single line and couldn't end with " "a trailing comma. This is now relaxed so that the following is valid:" msgstr "" -#: ../../../whatsnew/3.15.rst:1683 +#: ../../../whatsnew/3.15.rst:1690 msgid "" "Add ``\\xHH`` notation to basic strings for codepoints under 255, and the " "``\\e`` escape for the escape character:" msgstr "" -#: ../../../whatsnew/3.15.rst:1691 +#: ../../../whatsnew/3.15.rst:1698 msgid "" "Seconds in datetime and time values are now optional. The following are now " "valid:" msgstr "" -#: ../../../whatsnew/3.15.rst:1699 +#: ../../../whatsnew/3.15.rst:1706 msgid "(Contributed by Taneli Hukkinen in :gh:`142956`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1705 ../../../whatsnew/3.15.rst:2165 +#: ../../../whatsnew/3.15.rst:1712 ../../../whatsnew/3.15.rst:2183 msgid "types" msgstr "" -#: ../../../whatsnew/3.15.rst:1707 +#: ../../../whatsnew/3.15.rst:1714 msgid "" "Expose the write-through :func:`locals` proxy type as :class:`types." "FrameLocalsProxyType`. This represents the type of the :attr:`frame." "f_locals` attribute, as described in :pep:`667`." msgstr "" -#: ../../../whatsnew/3.15.rst:1714 ../../../whatsnew/3.15.rst:2173 +#: ../../../whatsnew/3.15.rst:1721 ../../../whatsnew/3.15.rst:2191 msgid "typing" msgstr "" -#: ../../../whatsnew/3.15.rst:1718 +#: ../../../whatsnew/3.15.rst:1725 msgid "" ":pep:`747`: Add :data:`~typing.TypeForm`, a new special form for annotating " "values that are themselves type expressions. ``TypeForm[T]`` means \"a type " @@ -2255,18 +2263,18 @@ msgid "" "type-form values without changing behavior." msgstr "" -#: ../../../whatsnew/3.15.rst:1725 +#: ../../../whatsnew/3.15.rst:1732 msgid "" "This helps libraries that accept user-provided type expressions (for example " "``int``, ``str | None``, :class:`~typing.TypedDict` classes, or " "``list[int]``) expose precise signatures:" msgstr "" -#: ../../../whatsnew/3.15.rst:1735 +#: ../../../whatsnew/3.15.rst:1742 msgid "(Contributed by Jelle Zijlstra in :gh:`145033`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1739 +#: ../../../whatsnew/3.15.rst:1746 msgid "" ":pep:`728`: Add support in :class:`~typing.TypedDict` for the *closed* and " "*extra_items* class arguments. A closed :class:`~typing.TypedDict` does not " @@ -2276,14 +2284,14 @@ msgid "" "`137840`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1746 +#: ../../../whatsnew/3.15.rst:1753 msgid "" "Code like ``class ExtraTypeVars(P1[S], Protocol[T, T2]): ...`` now raises a :" "exc:`TypeError`, because ``S`` is not listed in ``Protocol`` parameters. " "(Contributed by Nikita Sobolev in :gh:`137191`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1750 +#: ../../../whatsnew/3.15.rst:1757 msgid "" "Code like ``class B2(A[T2], Protocol[T1, T2]): ...`` now correctly handles " "type parameters order: it is ``(T1, T2)``, not ``(T2, T1)`` as it was " @@ -2291,7 +2299,7 @@ msgid "" "gh:`137191`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1757 +#: ../../../whatsnew/3.15.rst:1764 msgid "" ":pep:`800`: Add :deco:`typing.disjoint_base`, a new decorator marking a " "class as a disjoint base. This is an advanced feature primarily intended to " @@ -2302,7 +2310,7 @@ msgid "" "by Jelle Zijlstra in :gh:`148639`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1764 +#: ../../../whatsnew/3.15.rst:1771 msgid "" ":class:`~typing.TypeVarTuple` now accepts ``bound``, ``covariant``, " "``contravariant``, and ``infer_variance`` keyword arguments, matching the " @@ -2310,15 +2318,15 @@ msgid "" "``bound`` semantics remain undefined in the specification." msgstr "" -#: ../../../whatsnew/3.15.rst:1771 +#: ../../../whatsnew/3.15.rst:1778 msgid "unicodedata" msgstr "" -#: ../../../whatsnew/3.15.rst:1773 +#: ../../../whatsnew/3.15.rst:1780 msgid "The Unicode database has been updated to Unicode 17.0.0." msgstr "" -#: ../../../whatsnew/3.15.rst:1775 +#: ../../../whatsnew/3.15.rst:1782 msgid "" "Add :func:`unicodedata.isxidstart` and :func:`unicodedata.isxidcontinue` " "functions to check whether a character can start or continue a `Unicode " @@ -2326,7 +2334,7 @@ msgid "" "(Contributed by Stan Ulbrych in :gh:`129117`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1780 +#: ../../../whatsnew/3.15.rst:1787 msgid "" "Add the :func:`~unicodedata.iter_graphemes` function to iterate over " "grapheme clusters according to rules defined in `Unicode Standard Annex #29, " @@ -2338,7 +2346,7 @@ msgid "" "gh:`74902`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1790 +#: ../../../whatsnew/3.15.rst:1797 msgid "" "Add :func:`~unicodedata.block` function to return the `Unicode block " " lib`` symlink. " @@ -2391,11 +2399,11 @@ msgid "" "equal to ``lib``. (Contributed by Rui Xi in :gh:`133951`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1834 +#: ../../../whatsnew/3.15.rst:1841 msgid "warnings" msgstr "" -#: ../../../whatsnew/3.15.rst:1836 +#: ../../../whatsnew/3.15.rst:1843 msgid "" "Improve filtering by module in :func:`warnings.warn_explicit` if no *module* " "argument is passed. It now tests the module regular expression in the " @@ -2405,44 +2413,44 @@ msgid "" "``.pyw`` stripped). (Contributed by Serhiy Storchaka in :gh:`135801`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1846 ../../../whatsnew/3.15.rst:2196 +#: ../../../whatsnew/3.15.rst:1853 ../../../whatsnew/3.15.rst:2214 msgid "wave" msgstr "" -#: ../../../whatsnew/3.15.rst:1848 +#: ../../../whatsnew/3.15.rst:1855 msgid "" "Added support for IEEE floating-point WAVE audio " "(``WAVE_FORMAT_IEEE_FLOAT``) in :mod:`wave`." msgstr "" -#: ../../../whatsnew/3.15.rst:1851 +#: ../../../whatsnew/3.15.rst:1858 msgid "" "Added :meth:`wave.Wave_read.getformat`, :meth:`wave.Wave_write.getformat`, " "and :meth:`wave.Wave_write.setformat` for explicit frame format handling." msgstr "" -#: ../../../whatsnew/3.15.rst:1854 +#: ../../../whatsnew/3.15.rst:1861 msgid "" ":meth:`wave.Wave_write.setparams` accepts both 7-item tuples including " "``format`` and 6-item tuples for backwards compatibility (defaulting to " "``WAVE_FORMAT_PCM``)." msgstr "" -#: ../../../whatsnew/3.15.rst:1858 +#: ../../../whatsnew/3.15.rst:1865 msgid "" "``WAVE_FORMAT_IEEE_FLOAT`` output now includes a ``fact`` chunk, as required " "for non-PCM WAVE formats." msgstr "" -#: ../../../whatsnew/3.15.rst:1861 +#: ../../../whatsnew/3.15.rst:1868 msgid "(Contributed by Lionel Koenig and Michiel W. Beijen in :gh:`60729`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1865 +#: ../../../whatsnew/3.15.rst:1872 msgid "webbrowser" msgstr "" -#: ../../../whatsnew/3.15.rst:1867 +#: ../../../whatsnew/3.15.rst:1874 msgid "" "On macOS, the new :class:`!webbrowser.MacOS` class opens URLs via :program:`/" "usr/bin/open` instead of constructing and executing AppleScript via :program:" @@ -2454,28 +2462,28 @@ msgid "" "in :gh:`137586`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1879 +#: ../../../whatsnew/3.15.rst:1886 msgid "xml" msgstr "" -#: ../../../whatsnew/3.15.rst:1881 +#: ../../../whatsnew/3.15.rst:1888 msgid "" "Add the :func:`xml.is_valid_name` function to check whether a string can be " "used as an element or attribute name in XML. (Contributed by Serhiy " "Storchaka in :gh:`139489`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1885 +#: ../../../whatsnew/3.15.rst:1892 msgid "" "Add the :func:`xml.is_valid_text` function to check whether a string can be " "used in an XML document. (Contributed by Serhiy Storchaka in :gh:`139489`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1891 +#: ../../../whatsnew/3.15.rst:1898 msgid "xml.parsers.expat" msgstr "" -#: ../../../whatsnew/3.15.rst:1893 +#: ../../../whatsnew/3.15.rst:1900 msgid "" "Add :meth:`~xml.parsers.expat.xmlparser.SetAllocTrackerActivationThreshold` " "and :meth:`~xml.parsers.expat.xmlparser.SetAllocTrackerMaximumAmplification` " @@ -2484,7 +2492,7 @@ msgid "" "(Contributed by Bénédikt Tran in :gh:`90949`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1899 +#: ../../../whatsnew/3.15.rst:1906 msgid "" "Add :meth:`~xml.parsers.expat.xmlparser." "SetBillionLaughsAttackProtectionActivationThreshold` and :meth:`~xml.parsers." @@ -2493,27 +2501,27 @@ msgid "" "`billion laughs`_ attacks. (Contributed by Bénédikt Tran in :gh:`90949`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1909 +#: ../../../whatsnew/3.15.rst:1916 msgid "zlib" msgstr "" -#: ../../../whatsnew/3.15.rst:1911 +#: ../../../whatsnew/3.15.rst:1918 msgid "" "Allow combining two Adler-32 checksums via :func:`~zlib.adler32_combine`. " "(Contributed by Callum Attryde and Bénédikt Tran in :gh:`134635`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1914 +#: ../../../whatsnew/3.15.rst:1921 msgid "" "Allow combining two CRC-32 checksums via :func:`~zlib.crc32_combine`. " "(Contributed by Bénédikt Tran in :gh:`134635`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1921 +#: ../../../whatsnew/3.15.rst:1928 msgid "Optimizations" msgstr "" -#: ../../../whatsnew/3.15.rst:1923 +#: ../../../whatsnew/3.15.rst:1930 msgid "" "``mimalloc`` is now used as the default allocator for raw memory allocations " "such as via :c:func:`PyMem_RawMalloc` for better performance on :term:`free-" @@ -2521,18 +2529,18 @@ msgid "" "`144914`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1930 +#: ../../../whatsnew/3.15.rst:1937 msgid "base64 & binascii" msgstr "" -#: ../../../whatsnew/3.15.rst:1932 +#: ../../../whatsnew/3.15.rst:1939 msgid "" "CPython's underlying base64 implementation now encodes 2x faster and decodes " "3x faster thanks to simple CPU pipelining optimizations. (Contributed by " "Gregory P. Smith and Serhiy Storchaka in :gh:`143262`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1936 +#: ../../../whatsnew/3.15.rst:1943 msgid "" "Implementation for Ascii85, Base85, and Z85 encoding has been rewritten in " "C. Encoding and decoding is now two orders of magnitude faster and consumes " @@ -2540,28 +2548,28 @@ msgid "" "Storchaka in :gh:`101178`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1941 +#: ../../../whatsnew/3.15.rst:1948 msgid "" "Implementation for Base32 has been rewritten in C. Encoding and decoding is " "now two orders of magnitude faster. (Contributed by James Seo in :gh:" "`146192`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1947 +#: ../../../whatsnew/3.15.rst:1954 msgid "csv" msgstr "" -#: ../../../whatsnew/3.15.rst:1949 +#: ../../../whatsnew/3.15.rst:1956 msgid "" ":meth:`csv.Sniffer.sniff` delimiter detection is now up to 1.6x faster. " "(Contributed by Maurycy Pawłowski-Wieroński in :gh:`137628`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1956 +#: ../../../whatsnew/3.15.rst:1963 msgid "Upgraded JIT compiler" msgstr "" -#: ../../../whatsnew/3.15.rst:1958 +#: ../../../whatsnew/3.15.rst:1965 msgid "" "Results from the `pyperformance `__ " "benchmark suite report `8-9% `__ is now performed. This means when the JIT compiler " @@ -2651,7 +2659,7 @@ msgid "" "`132732`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2020 +#: ../../../whatsnew/3.15.rst:2027 msgid "" ":term:`Reference counts ` are avoided whenever it is safe " "to do so. This generally reduces the cost of most operations in Python. " @@ -2660,7 +2668,7 @@ msgid "" "gh:`134584`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2025 +#: ../../../whatsnew/3.15.rst:2032 msgid "" "By tracking unique references to objects, the JIT optimizer can now " "eliminate reference count updates and perform in-place operations on ints " @@ -2668,13 +2676,13 @@ msgid "" "and :gh:`146306`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2029 +#: ../../../whatsnew/3.15.rst:2036 msgid "" "The JIT optimizer now supports significantly more operations than in 3.14. " "(Contributed by Kumar Aditya, Ken Jin, Jiahao Li, and Sacul in :gh:`131798`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2034 +#: ../../../whatsnew/3.15.rst:2041 msgid "" "The JIT compiler now publishes unwind information for generated machine code " "to the GDB interface on supported Linux ELF platforms. When libgcc frame " @@ -2685,7 +2693,7 @@ msgid "" "and Pablo Galindo Salgado in :gh:`146071` and :gh:`149104`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2045 +#: ../../../whatsnew/3.15.rst:2052 msgid "" "The JIT compiler's machine code generator now produces better machine code " "for x86-64 and AArch64 macOS and Linux targets. In general, users should " @@ -2696,22 +2704,22 @@ msgid "" "and Diego Russo in :gh:`140683` and :gh:`142305`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2055 +#: ../../../whatsnew/3.15.rst:2062 msgid "Maintainability" msgstr "" -#: ../../../whatsnew/3.15.rst:2056 +#: ../../../whatsnew/3.15.rst:2063 msgid "" "The JIT optimizer's operations have been simplified. This was made possible " "by a refactoring of JIT data structures. (Contributed by Zhongtian Zheng in :" "gh:`148211` and Hai Zhu in :gh:`143421`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2062 +#: ../../../whatsnew/3.15.rst:2069 msgid "Removed" msgstr "" -#: ../../../whatsnew/3.15.rst:2067 +#: ../../../whatsnew/3.15.rst:2074 msgid "" "The constructors of :ref:`AST nodes ` now raise a :exc:" "`TypeError` when a required argument is omitted or when a keyword argument " @@ -2721,29 +2729,29 @@ msgid "" "`105858`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2075 +#: ../../../whatsnew/3.15.rst:2082 msgid "collections.abc" msgstr "" -#: ../../../whatsnew/3.15.rst:2077 +#: ../../../whatsnew/3.15.rst:2084 msgid "" ":class:`collections.abc.ByteString` has been removed from ``collections.abc." "__all__``. :class:`!collections.abc.ByteString` has been deprecated since " "Python 3.12, and is scheduled for removal in Python 3.17." msgstr "" -#: ../../../whatsnew/3.15.rst:2085 +#: ../../../whatsnew/3.15.rst:2092 msgid "" "Removed the undocumented function :func:`!ctypes.SetPointerType`, which has " "been deprecated since Python 3.13. (Contributed by Bénédikt Tran in :gh:" "`133866`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2091 +#: ../../../whatsnew/3.15.rst:2098 msgid "datetime" msgstr "" -#: ../../../whatsnew/3.15.rst:2093 +#: ../../../whatsnew/3.15.rst:2100 msgid "" ":meth:`~datetime.datetime.strptime` now raises :exc:`ValueError` when the " "format string contains ``%d`` (day of month) without a year directive. This " @@ -2751,11 +2759,11 @@ msgid "" "Gregory P. Smith in :gh:`70647`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2100 +#: ../../../whatsnew/3.15.rst:2107 msgid "glob" msgstr "" -#: ../../../whatsnew/3.15.rst:2102 +#: ../../../whatsnew/3.15.rst:2109 msgid "" "Removed the undocumented :func:`!glob.glob0` and :func:`!glob.glob1` " "functions, which have been deprecated since Python 3.13. Use :func:`glob." @@ -2763,82 +2771,95 @@ msgid "" "by Barney Gale in :gh:`137466`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2111 +#: ../../../whatsnew/3.15.rst:2118 msgid "" "Removed the :class:`!CGIHTTPRequestHandler` class and the ``--cgi`` flag " "from the :program:`python -m http.server` command-line interface. They were " "deprecated in Python 3.13. (Contributed by Bénédikt Tran in :gh:`133810`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2118 +#: ../../../whatsnew/3.15.rst:2125 +msgid "importlib" +msgstr "" + +#: ../../../whatsnew/3.15.rst:2127 +msgid "" +"The ``load_module()`` methods of :class:`~importlib.abc.Loader` and its " +"subclasses is removed. The import system will no longer call it when defined " +"on custom subclasses. The method has been deprecated in favor of :meth:" +"`~importlib.abc.Loader.exec_module` since Python 3.4. (Contributed by Brett " +"Cannon in :gh:`97850`.)" +msgstr "" + +#: ../../../whatsnew/3.15.rst:2136 msgid "importlib.resources" msgstr "" -#: ../../../whatsnew/3.15.rst:2120 +#: ../../../whatsnew/3.15.rst:2138 msgid "" "Removed deprecated ``package`` parameter from :func:`importlib.resources." "files` function. (Contributed by Semyon Moroz in :gh:`138044`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2128 +#: ../../../whatsnew/3.15.rst:2146 msgid "" "Removed deprecated :meth:`!pathlib.PurePath.is_reserved`. Use :func:`os.path." "isreserved` to detect reserved paths on Windows. (Contributed by Nikita " "Sobolev in :gh:`133875`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2134 +#: ../../../whatsnew/3.15.rst:2152 msgid "platform" msgstr "" -#: ../../../whatsnew/3.15.rst:2136 +#: ../../../whatsnew/3.15.rst:2154 msgid "" "Removed the :func:`!platform.java_ver` function, which was deprecated since " "Python 3.13. (Contributed by Alexey Makridenko in :gh:`133604`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2142 +#: ../../../whatsnew/3.15.rst:2160 msgid "sre_*" msgstr "" -#: ../../../whatsnew/3.15.rst:2144 +#: ../../../whatsnew/3.15.rst:2162 msgid "" "Removed :mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse` " "modules. (Contributed by Stan Ulbrych in :gh:`135994`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2149 +#: ../../../whatsnew/3.15.rst:2167 msgid "sysconfig" msgstr "" -#: ../../../whatsnew/3.15.rst:2151 +#: ../../../whatsnew/3.15.rst:2169 msgid "" "Removed the *check_home* parameter of :func:`sysconfig.is_python_build`. " "(Contributed by Filipe Laíns in :gh:`92897`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2158 +#: ../../../whatsnew/3.15.rst:2176 msgid "" "Remove support for arbitrary positional or keyword arguments in the C " "implementation of :class:`~threading.RLock` objects. This was deprecated in " "Python 3.14. (Contributed by Bénédikt Tran in :gh:`134087`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2167 +#: ../../../whatsnew/3.15.rst:2185 msgid "" "Removed :attr:`!codeobject.co_lnotab` from :class:`types.CodeType`, " "deprecated since Python 3.12 by :pep:`626`. (Contributed by Nikita Sobolev " "in :gh:`134690`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2175 +#: ../../../whatsnew/3.15.rst:2193 msgid "" ":class:`typing.ByteString` has been removed from ``typing.__all__``. :class:" "`!typing.ByteString` has been deprecated since Python 3.9, and is scheduled " "for removal in Python 3.17." msgstr "" -#: ../../../whatsnew/3.15.rst:2179 +#: ../../../whatsnew/3.15.rst:2197 msgid "" "The undocumented keyword argument syntax for creating :class:`~typing." "NamedTuple` classes (for example, ``Point = NamedTuple(\"Point\", x=int, " @@ -2846,7 +2867,7 @@ msgid "" "functional syntax instead. (Contributed by Bénédikt Tran in :gh:`133817`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2185 +#: ../../../whatsnew/3.15.rst:2203 msgid "" "Using ``TD = TypedDict(\"TD\")`` or ``TD = TypedDict(\"TD\", None)`` to " "construct a :class:`~typing.TypedDict` type with zero fields is no longer " @@ -2854,13 +2875,13 @@ msgid "" "{})`` instead. (Contributed by Bénédikt Tran in :gh:`133823`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2191 +#: ../../../whatsnew/3.15.rst:2209 msgid "" "Deprecated :deco:`!typing.no_type_check_decorator` has been removed. " "(Contributed by Nikita Sobolev in :gh:`133601`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2198 +#: ../../../whatsnew/3.15.rst:2216 msgid "" "Removed the ``getmark()``, ``setmark()`` and ``getmarkers()`` methods of " "the :class:`~wave.Wave_read` and :class:`~wave.Wave_write` classes, which " @@ -2868,45 +2889,45 @@ msgid "" "`133873`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2205 +#: ../../../whatsnew/3.15.rst:2223 msgid "zipimport" msgstr "" -#: ../../../whatsnew/3.15.rst:2207 +#: ../../../whatsnew/3.15.rst:2225 msgid "" "Remove deprecated :meth:`!zipimport.zipimporter.load_module`. Use :meth:" "`zipimport.zipimporter.exec_module` instead. (Contributed by Jiahao Li in :" "gh:`133656`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2213 +#: ../../../whatsnew/3.15.rst:2231 msgid "Deprecated" msgstr "" -#: ../../../whatsnew/3.15.rst:2216 +#: ../../../whatsnew/3.15.rst:2234 msgid "New deprecations" msgstr "" -#: ../../../whatsnew/3.15.rst:2218 +#: ../../../whatsnew/3.15.rst:2236 msgid ":mod:`ast`" msgstr "" -#: ../../../whatsnew/3.15.rst:2220 +#: ../../../whatsnew/3.15.rst:2238 #: ../../../deprecations/pending-removal-in-3.20.rst:54 msgid "" "Creating instances of abstract AST nodes (such as :class:`ast.AST` or :class:" "`!ast.expr`) is deprecated and will raise an error in Python 3.20." msgstr "" -#: ../../../whatsnew/3.15.rst:2223 +#: ../../../whatsnew/3.15.rst:2241 msgid "(Contributed by Brian Schubert in :gh:`116021`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2225 +#: ../../../whatsnew/3.15.rst:2243 msgid ":mod:`base64`:" msgstr "" -#: ../../../whatsnew/3.15.rst:2227 +#: ../../../whatsnew/3.15.rst:2245 msgid "" "Accepting the ``+`` and ``/`` characters with an alternative alphabet in :" "func:`~base64.b64decode` and :func:`~base64.urlsafe_b64decode` is now " @@ -2915,11 +2936,11 @@ msgid "" "gh:`125346`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2234 +#: ../../../whatsnew/3.15.rst:2252 msgid "CLI:" msgstr "" -#: ../../../whatsnew/3.15.rst:2236 +#: ../../../whatsnew/3.15.rst:2254 msgid "" "Deprecate :option:`-b` and :option:`!-bb` command-line options and schedule " "them to become no-ops in Python 3.17. These were primarily helpers for the " @@ -2927,29 +2948,29 @@ msgid "" "will be raised for these cases; use a type checker instead." msgstr "" -#: ../../../whatsnew/3.15.rst:2242 +#: ../../../whatsnew/3.15.rst:2260 msgid "(Contributed by Nikita Sobolev in :gh:`136355`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2244 +#: ../../../whatsnew/3.15.rst:2262 msgid ":mod:`collections.abc`" msgstr "" -#: ../../../whatsnew/3.15.rst:2246 ../../../whatsnew/3.15.rst:2335 +#: ../../../whatsnew/3.15.rst:2264 ../../../whatsnew/3.15.rst:2353 msgid "" "The following statements now cause ``DeprecationWarning``\\ s to be emitted " "at runtime:" msgstr "" -#: ../../../whatsnew/3.15.rst:2249 +#: ../../../whatsnew/3.15.rst:2267 msgid "``from collections.abc import ByteString``" msgstr "" -#: ../../../whatsnew/3.15.rst:2250 +#: ../../../whatsnew/3.15.rst:2268 msgid "``import collections.abc; collections.abc.ByteString``." msgstr "" -#: ../../../whatsnew/3.15.rst:2252 +#: ../../../whatsnew/3.15.rst:2270 msgid "" "``DeprecationWarning``\\ s were already emitted if :class:`collections.abc." "ByteString` was subclassed or used as the second argument to :func:" @@ -2958,12 +2979,12 @@ msgid "" "module." msgstr "" -#: ../../../whatsnew/3.15.rst:2259 +#: ../../../whatsnew/3.15.rst:2277 #: ../../../deprecations/pending-removal-in-3.19.rst:10 msgid ":mod:`hashlib`:" msgstr "" -#: ../../../whatsnew/3.15.rst:2261 +#: ../../../whatsnew/3.15.rst:2279 msgid "" "In hash function constructors such as :func:`~hashlib.new` or the direct " "hash-named constructors such as :func:`~hashlib.md5` and :func:`~hashlib." @@ -2972,23 +2993,23 @@ msgid "" "implementations." msgstr "" -#: ../../../whatsnew/3.15.rst:2267 +#: ../../../whatsnew/3.15.rst:2285 msgid "" "Support for the ``string`` keyword argument name is now deprecated and is " "slated for removal in Python 3.19. Prefer passing the initial data as a " "positional argument for maximum backwards compatibility." msgstr "" -#: ../../../whatsnew/3.15.rst:2271 +#: ../../../whatsnew/3.15.rst:2289 msgid "(Contributed by Bénédikt Tran in :gh:`134978`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2274 +#: ../../../whatsnew/3.15.rst:2292 #: ../../../deprecations/pending-removal-in-3.19.rst:26 msgid ":mod:`http.cookies`:" msgstr "" -#: ../../../whatsnew/3.15.rst:2276 +#: ../../../whatsnew/3.15.rst:2294 msgid "" ":meth:`Morsel.js_output ` and :meth:" "`BaseCookie.js_output ` are deprecated " @@ -2997,24 +3018,24 @@ msgid "" "output>` instead. (Contributed by kishorhange111 in :gh:`148849`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2284 +#: ../../../whatsnew/3.15.rst:2302 #: ../../../deprecations/pending-removal-in-3.19.rst:34 msgid ":mod:`imaplib`:" msgstr "" -#: ../../../whatsnew/3.15.rst:2286 +#: ../../../whatsnew/3.15.rst:2304 msgid "" "Altering :attr:`IMAP4.file ` is now deprecated and " "slated for removal in Python 3.19. This property is now unused and changing " "its value does *not* explicitly close the current file." msgstr "" -#: ../../../whatsnew/3.15.rst:2291 +#: ../../../whatsnew/3.15.rst:2309 #: ../../../deprecations/pending-removal-in-3.17.rst:40 msgid ":mod:`profile`:" msgstr "" -#: ../../../whatsnew/3.15.rst:2293 +#: ../../../whatsnew/3.15.rst:2311 #: ../../../deprecations/pending-removal-in-3.17.rst:42 msgid "" "The :mod:`!profile` module is deprecated and will be removed in Python 3.17. " @@ -3023,11 +3044,11 @@ msgid "" "in :gh:`138122`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2299 +#: ../../../whatsnew/3.15.rst:2317 msgid ":mod:`re`:" msgstr "" -#: ../../../whatsnew/3.15.rst:2301 +#: ../../../whatsnew/3.15.rst:2319 #: ../../../deprecations/soft-deprecations.rst:6 msgid "" ":func:`re.match` and :meth:`re.Pattern.match` are now :term:`soft " @@ -3039,7 +3060,7 @@ msgid "" "API named *match* to mean what Python has always called *search*." msgstr "" -#: ../../../whatsnew/3.15.rst:2310 +#: ../../../whatsnew/3.15.rst:2328 #: ../../../deprecations/soft-deprecations.rst:15 msgid "" "We **do not** plan to remove the older :func:`!match` name, as it has been " @@ -3048,19 +3069,19 @@ msgid "" "prefixmatch`. See :ref:`prefixmatch-vs-match`." msgstr "" -#: ../../../whatsnew/3.15.rst:2315 +#: ../../../whatsnew/3.15.rst:2333 #: ../../../deprecations/soft-deprecations.rst:20 msgid "" "(Contributed by Gregory P. Smith in :gh:`86519` and Hugo van Kemenade in :gh:" "`148100`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2319 +#: ../../../whatsnew/3.15.rst:2337 #: ../../../deprecations/pending-removal-in-3.21.rst:21 msgid ":mod:`struct`:" msgstr "" -#: ../../../whatsnew/3.15.rst:2321 +#: ../../../whatsnew/3.15.rst:2339 msgid "" "Calling ``Struct.__new__()`` without a required argument is now deprecated " "and will be removed in Python 3.20. Calling the :meth:`~object.__init__` " @@ -3068,34 +3089,34 @@ msgid "" "will be removed in Python 3.20." msgstr "" -#: ../../../whatsnew/3.15.rst:2326 +#: ../../../whatsnew/3.15.rst:2344 #: ../../../deprecations/pending-removal-in-3.20.rst:9 msgid "" "(Contributed by Sergey B Kirpichev and Serhiy Storchaka in :gh:`143715`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2328 +#: ../../../whatsnew/3.15.rst:2346 msgid "" "The ``'F'`` and ``'D'`` type codes are now :term:`soft deprecated` in favor " "of the two-letter forms ``'Zf'`` and ``'Zd'``. (Contributed by Sergey B " "Kirpichev in :gh:`121249`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2333 +#: ../../../whatsnew/3.15.rst:2351 #: ../../../deprecations/pending-removal-in-3.17.rst:52 #: ../../../deprecations/pending-removal-in-3.20.rst:57 msgid ":mod:`typing`:" msgstr "" -#: ../../../whatsnew/3.15.rst:2338 +#: ../../../whatsnew/3.15.rst:2356 msgid "``from typing import ByteString``" msgstr "" -#: ../../../whatsnew/3.15.rst:2339 +#: ../../../whatsnew/3.15.rst:2357 msgid "``import typing; typing.ByteString``." msgstr "" -#: ../../../whatsnew/3.15.rst:2341 +#: ../../../whatsnew/3.15.rst:2359 msgid "" "``DeprecationWarning``\\ s were already emitted if :class:`typing." "ByteString` was subclassed or used as the second argument to :func:" @@ -3103,7 +3124,7 @@ msgid "" "if it was merely imported or accessed from the :mod:`!typing` module." msgstr "" -#: ../../../whatsnew/3.15.rst:2346 +#: ../../../whatsnew/3.15.rst:2364 #: ../../../deprecations/pending-removal-in-3.20.rst:59 msgid "" "It is deprecated to call :func:`isinstance` and :func:`issubclass` checks on " @@ -3112,28 +3133,28 @@ msgid "" "This will raise a :exc:`TypeError` in Python 3.20." msgstr "" -#: ../../../whatsnew/3.15.rst:2351 +#: ../../../whatsnew/3.15.rst:2369 #: ../../../deprecations/pending-removal-in-3.20.rst:64 msgid "(Contributed by Bartosz Sławecki in :gh:`132604`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2354 +#: ../../../whatsnew/3.15.rst:2372 #: ../../../deprecations/pending-removal-in-3.17.rst:47 msgid ":mod:`webbrowser`:" msgstr "" -#: ../../../whatsnew/3.15.rst:2356 +#: ../../../whatsnew/3.15.rst:2374 msgid "" ":class:`!webbrowser.MacOSXOSAScript` is deprecated in favour of :class:`!" "webbrowser.MacOS` and scheduled for removal in Python 3.17. (Contributed by " "Jeff Lyon in :gh:`137586`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2360 +#: ../../../whatsnew/3.15.rst:2378 msgid "``__version__``" msgstr "" -#: ../../../whatsnew/3.15.rst:2362 +#: ../../../whatsnew/3.15.rst:2380 #: ../../../deprecations/pending-removal-in-3.20.rst:11 msgid "" "The ``__version__``, ``version`` and ``VERSION`` attributes have been " @@ -3141,127 +3162,127 @@ msgid "" "3.20. Use :py:data:`sys.version_info` instead." msgstr "" -#: ../../../whatsnew/3.15.rst:2366 +#: ../../../whatsnew/3.15.rst:2384 #: ../../../deprecations/pending-removal-in-3.20.rst:15 msgid ":mod:`argparse`" msgstr "" -#: ../../../whatsnew/3.15.rst:2367 +#: ../../../whatsnew/3.15.rst:2385 #: ../../../deprecations/pending-removal-in-3.20.rst:16 msgid ":mod:`csv`" msgstr "" -#: ../../../whatsnew/3.15.rst:2368 +#: ../../../whatsnew/3.15.rst:2386 #: ../../../deprecations/pending-removal-in-3.20.rst:17 msgid ":mod:`ctypes`" msgstr "" -#: ../../../whatsnew/3.15.rst:2369 +#: ../../../whatsnew/3.15.rst:2387 #: ../../../deprecations/pending-removal-in-3.20.rst:18 msgid ":mod:`!ctypes.macholib`" msgstr "" -#: ../../../whatsnew/3.15.rst:2370 +#: ../../../whatsnew/3.15.rst:2388 #: ../../../deprecations/pending-removal-in-3.20.rst:19 msgid ":mod:`decimal` (use :data:`decimal.SPEC_VERSION` instead)" msgstr "" -#: ../../../whatsnew/3.15.rst:2371 +#: ../../../whatsnew/3.15.rst:2389 #: ../../../deprecations/pending-removal-in-3.20.rst:20 msgid ":mod:`http.server`" msgstr "" -#: ../../../whatsnew/3.15.rst:2372 +#: ../../../whatsnew/3.15.rst:2390 #: ../../../deprecations/pending-removal-in-3.20.rst:21 msgid ":mod:`imaplib`" msgstr "" -#: ../../../whatsnew/3.15.rst:2373 +#: ../../../whatsnew/3.15.rst:2391 #: ../../../deprecations/pending-removal-in-3.20.rst:22 msgid ":mod:`ipaddress`" msgstr "" -#: ../../../whatsnew/3.15.rst:2374 +#: ../../../whatsnew/3.15.rst:2392 #: ../../../deprecations/pending-removal-in-3.20.rst:23 msgid ":mod:`json`" msgstr "" -#: ../../../whatsnew/3.15.rst:2375 +#: ../../../whatsnew/3.15.rst:2393 #: ../../../deprecations/pending-removal-in-3.20.rst:24 msgid ":mod:`logging` (``__date__`` also deprecated)" msgstr "" -#: ../../../whatsnew/3.15.rst:2376 +#: ../../../whatsnew/3.15.rst:2394 #: ../../../deprecations/pending-removal-in-3.20.rst:25 msgid ":mod:`optparse`" msgstr "" -#: ../../../whatsnew/3.15.rst:2377 +#: ../../../whatsnew/3.15.rst:2395 #: ../../../deprecations/pending-removal-in-3.20.rst:26 msgid ":mod:`pickle`" msgstr "" -#: ../../../whatsnew/3.15.rst:2378 +#: ../../../whatsnew/3.15.rst:2396 #: ../../../deprecations/pending-removal-in-3.20.rst:27 msgid ":mod:`platform`" msgstr "" -#: ../../../whatsnew/3.15.rst:2379 +#: ../../../whatsnew/3.15.rst:2397 #: ../../../deprecations/pending-removal-in-3.20.rst:28 msgid ":mod:`re`" msgstr "" -#: ../../../whatsnew/3.15.rst:2380 +#: ../../../whatsnew/3.15.rst:2398 #: ../../../deprecations/pending-removal-in-3.20.rst:29 msgid ":mod:`socketserver`" msgstr "" -#: ../../../whatsnew/3.15.rst:2381 +#: ../../../whatsnew/3.15.rst:2399 #: ../../../deprecations/pending-removal-in-3.20.rst:30 msgid ":mod:`tabnanny`" msgstr "" -#: ../../../whatsnew/3.15.rst:2382 +#: ../../../whatsnew/3.15.rst:2400 #: ../../../deprecations/pending-removal-in-3.20.rst:31 msgid ":mod:`tarfile`" msgstr "" -#: ../../../whatsnew/3.15.rst:2383 +#: ../../../whatsnew/3.15.rst:2401 #: ../../../deprecations/pending-removal-in-3.20.rst:32 msgid ":mod:`tkinter.font`" msgstr "" -#: ../../../whatsnew/3.15.rst:2384 +#: ../../../whatsnew/3.15.rst:2402 #: ../../../deprecations/pending-removal-in-3.20.rst:33 msgid ":mod:`tkinter.ttk`" msgstr "" -#: ../../../whatsnew/3.15.rst:2385 +#: ../../../whatsnew/3.15.rst:2403 #: ../../../deprecations/pending-removal-in-3.20.rst:34 msgid ":mod:`wsgiref.simple_server`" msgstr "" -#: ../../../whatsnew/3.15.rst:2386 +#: ../../../whatsnew/3.15.rst:2404 #: ../../../deprecations/pending-removal-in-3.20.rst:35 msgid ":mod:`xml.etree.ElementTree`" msgstr "" -#: ../../../whatsnew/3.15.rst:2387 +#: ../../../whatsnew/3.15.rst:2405 #: ../../../deprecations/pending-removal-in-3.20.rst:36 msgid ":mod:`!xml.sax.expatreader`" msgstr "" -#: ../../../whatsnew/3.15.rst:2388 +#: ../../../whatsnew/3.15.rst:2406 #: ../../../deprecations/pending-removal-in-3.20.rst:37 msgid ":mod:`xml.sax.handler`" msgstr "" -#: ../../../whatsnew/3.15.rst:2389 +#: ../../../whatsnew/3.15.rst:2407 #: ../../../deprecations/pending-removal-in-3.20.rst:38 msgid ":mod:`zlib`" msgstr "" -#: ../../../whatsnew/3.15.rst:2391 +#: ../../../whatsnew/3.15.rst:2409 #: ../../../deprecations/pending-removal-in-3.20.rst:40 msgid "(Contributed by Hugo van Kemenade and Stan Ulbrych in :gh:`76007`.)" msgstr "" @@ -4111,52 +4132,52 @@ msgstr "" msgid "There are no plans to remove :term:`soft deprecated` APIs." msgstr "" -#: ../../../whatsnew/3.15.rst:2413 +#: ../../../whatsnew/3.15.rst:2431 msgid "C API changes" msgstr "" -#: ../../../whatsnew/3.15.rst:2418 +#: ../../../whatsnew/3.15.rst:2436 msgid "" "Add :c:func:`PyArg_ParseArray` and :c:func:`PyArg_ParseArrayAndKeywords` " "functions to parse arguments of functions using the :c:macro:`METH_FASTCALL` " "calling convention. (Contributed by Victor Stinner in :gh:`144175`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2423 +#: ../../../whatsnew/3.15.rst:2441 msgid "Add the following functions for the new :class:`frozendict` type:" msgstr "" -#: ../../../whatsnew/3.15.rst:2425 +#: ../../../whatsnew/3.15.rst:2443 msgid ":c:func:`PyAnyDict_Check`" msgstr "" -#: ../../../whatsnew/3.15.rst:2426 +#: ../../../whatsnew/3.15.rst:2444 msgid ":c:func:`PyAnyDict_CheckExact`" msgstr "" -#: ../../../whatsnew/3.15.rst:2427 +#: ../../../whatsnew/3.15.rst:2445 msgid ":c:func:`PyFrozenDict_Check`" msgstr "" -#: ../../../whatsnew/3.15.rst:2428 +#: ../../../whatsnew/3.15.rst:2446 msgid ":c:func:`PyFrozenDict_CheckExact`" msgstr "" -#: ../../../whatsnew/3.15.rst:2429 +#: ../../../whatsnew/3.15.rst:2447 msgid ":c:func:`PyFrozenDict_New`" msgstr "" -#: ../../../whatsnew/3.15.rst:2431 +#: ../../../whatsnew/3.15.rst:2449 msgid "(Contributed by Victor Stinner in :gh:`141510`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2433 +#: ../../../whatsnew/3.15.rst:2451 msgid "" "Add :c:func:`PyObject_CallFinalizerFromDealloc` function to the limited C " "API. (Contributed by Victor Stinner in :gh:`146063`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2437 +#: ../../../whatsnew/3.15.rst:2455 msgid "" "Add :c:func:`PySys_GetAttr`, :c:func:`PySys_GetAttrString`, :c:func:" "`PySys_GetOptionalAttr`, and :c:func:`PySys_GetOptionalAttrString` functions " @@ -4164,112 +4185,112 @@ msgid "" "Storchaka in :gh:`108512`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2442 +#: ../../../whatsnew/3.15.rst:2460 msgid "" "Add :c:func:`PyUnstable_Unicode_GET_CACHED_HASH` to get the cached hash of a " "string. See the documentation for caveats. (Contributed by Petr Viktorin in :" "gh:`131510`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2446 +#: ../../../whatsnew/3.15.rst:2464 msgid "" "Add API for checking an extension module's ABI compatibility: :c:data:" "`Py_mod_abi`, :c:func:`PyABIInfo_Check`, and :c:macro:`PyABIInfo_VAR`. " "(Contributed by Petr Viktorin in :gh:`137210`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2453 +#: ../../../whatsnew/3.15.rst:2471 msgid "" "Implement :pep:`782`, the :ref:`PyBytesWriter API `. Add " "functions:" msgstr "" -#: ../../../whatsnew/3.15.rst:2456 +#: ../../../whatsnew/3.15.rst:2474 msgid ":c:func:`PyBytesWriter_Create`" msgstr "" -#: ../../../whatsnew/3.15.rst:2457 +#: ../../../whatsnew/3.15.rst:2475 msgid ":c:func:`PyBytesWriter_Discard`" msgstr "" -#: ../../../whatsnew/3.15.rst:2458 +#: ../../../whatsnew/3.15.rst:2476 msgid ":c:func:`PyBytesWriter_Finish`" msgstr "" -#: ../../../whatsnew/3.15.rst:2459 +#: ../../../whatsnew/3.15.rst:2477 msgid ":c:func:`PyBytesWriter_FinishWithPointer`" msgstr "" -#: ../../../whatsnew/3.15.rst:2460 +#: ../../../whatsnew/3.15.rst:2478 msgid ":c:func:`PyBytesWriter_FinishWithSize`" msgstr "" -#: ../../../whatsnew/3.15.rst:2461 +#: ../../../whatsnew/3.15.rst:2479 msgid ":c:func:`PyBytesWriter_Format`" msgstr "" -#: ../../../whatsnew/3.15.rst:2462 +#: ../../../whatsnew/3.15.rst:2480 msgid ":c:func:`PyBytesWriter_GetData`" msgstr "" -#: ../../../whatsnew/3.15.rst:2463 +#: ../../../whatsnew/3.15.rst:2481 msgid ":c:func:`PyBytesWriter_GetSize`" msgstr "" -#: ../../../whatsnew/3.15.rst:2464 +#: ../../../whatsnew/3.15.rst:2482 msgid ":c:func:`PyBytesWriter_Grow`" msgstr "" -#: ../../../whatsnew/3.15.rst:2465 +#: ../../../whatsnew/3.15.rst:2483 msgid ":c:func:`PyBytesWriter_GrowAndUpdatePointer`" msgstr "" -#: ../../../whatsnew/3.15.rst:2466 +#: ../../../whatsnew/3.15.rst:2484 msgid ":c:func:`PyBytesWriter_Resize`" msgstr "" -#: ../../../whatsnew/3.15.rst:2467 +#: ../../../whatsnew/3.15.rst:2485 msgid ":c:func:`PyBytesWriter_WriteBytes`" msgstr "" -#: ../../../whatsnew/3.15.rst:2469 +#: ../../../whatsnew/3.15.rst:2487 msgid "(Contributed by Victor Stinner in :gh:`129813`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2471 +#: ../../../whatsnew/3.15.rst:2489 msgid "" ":c:type:`PyCriticalSection` and related functions are added to the Stable " "ABI." msgstr "" -#: ../../../whatsnew/3.15.rst:2474 +#: ../../../whatsnew/3.15.rst:2492 msgid "(Contributed in :gh:`149227`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2476 +#: ../../../whatsnew/3.15.rst:2494 msgid "" "Add a new :c:func:`PyImport_CreateModuleFromInitfunc` C API for creating a " "module from a *spec* and *initfunc*. (Contributed by Itamar Oren in :gh:" "`116146`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2480 +#: ../../../whatsnew/3.15.rst:2498 msgid "" "Add :c:func:`PyTuple_FromArray` to create a :class:`tuple` from an array. " "(Contributed by Victor Stinner in :gh:`111489`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2483 +#: ../../../whatsnew/3.15.rst:2501 msgid "" "Add a new module export hook, :c:func:`PyModExport_* " "`." msgstr "" -#: ../../../whatsnew/3.15.rst:2486 +#: ../../../whatsnew/3.15.rst:2504 msgid "(Contributed by Petr Viktorin in :pep:`793` and :gh:`140550`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2488 +#: ../../../whatsnew/3.15.rst:2506 msgid "" "Add functions that are guaranteed to be safe for use in :c:member:" "`~PyTypeObject.tp_traverse` handlers: :c:func:" @@ -4281,31 +4302,31 @@ msgid "" "gh:`145925`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2499 +#: ../../../whatsnew/3.15.rst:2517 msgid "" "Add :c:func:`PyObject_Dump` to dump an object to ``stderr``. It should only " "be used for debugging. (Contributed by Victor Stinner in :gh:`141070`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2503 +#: ../../../whatsnew/3.15.rst:2521 msgid "" "Implement :pep:`820`: ``PySlot`` -- Unified slot system for the C API. See :" "ref:`capi-slots` for documentation." msgstr "" -#: ../../../whatsnew/3.15.rst:2506 +#: ../../../whatsnew/3.15.rst:2524 msgid "This adds:" msgstr "" -#: ../../../whatsnew/3.15.rst:2508 +#: ../../../whatsnew/3.15.rst:2526 msgid "The :c:type:`PySlot` struct;" msgstr "" -#: ../../../whatsnew/3.15.rst:2509 +#: ../../../whatsnew/3.15.rst:2527 msgid "the :c:func:`PyType_FromSlots` function;" msgstr "" -#: ../../../whatsnew/3.15.rst:2510 +#: ../../../whatsnew/3.15.rst:2528 msgid "" "new slot IDs: :c:macro:`Py_slot_end`, :c:macro:`Py_slot_invalid`; :c:macro:" "`Py_slot_subslots`, :c:macro:`Py_tp_slots`, :c:macro:`Py_mod_slots`; :c:" @@ -4314,7 +4335,7 @@ msgid "" "c:macro:`Py_tp_metaclass`, :c:macro:`Py_tp_module`;" msgstr "" -#: ../../../whatsnew/3.15.rst:2517 +#: ../../../whatsnew/3.15.rst:2535 msgid "" "convenience macros: :c:macro:`PySlot_DATA`, :c:macro:`PySlot_FUNC`, :c:macro:" "`PySlot_SIZE`, :c:macro:`PySlot_INT64`, :c:macro:`PySlot_UINT64`, :c:macro:" @@ -4322,46 +4343,46 @@ msgid "" "`PySlot_PTR_STATIC`." msgstr "" -#: ../../../whatsnew/3.15.rst:2522 +#: ../../../whatsnew/3.15.rst:2540 msgid "" "The :c:func:`PyModule_FromSlotsAndSpec` function and ``PyModExport`` :ref:" "`module export hook ` also use the new :c:type:`!" "PySlot` struct." msgstr "" -#: ../../../whatsnew/3.15.rst:2526 +#: ../../../whatsnew/3.15.rst:2544 msgid "These following functions are :term:`soft deprecated`:" msgstr "" -#: ../../../whatsnew/3.15.rst:2528 +#: ../../../whatsnew/3.15.rst:2546 msgid ":c:func:`PyType_FromSpec`" msgstr "" -#: ../../../whatsnew/3.15.rst:2529 +#: ../../../whatsnew/3.15.rst:2547 msgid ":c:func:`PyType_FromSpecWithBases`" msgstr "" -#: ../../../whatsnew/3.15.rst:2530 +#: ../../../whatsnew/3.15.rst:2548 msgid ":c:func:`PyType_FromModuleAndSpec`" msgstr "" -#: ../../../whatsnew/3.15.rst:2531 +#: ../../../whatsnew/3.15.rst:2549 msgid ":c:func:`PyType_FromMetaclass`" msgstr "" -#: ../../../whatsnew/3.15.rst:2532 +#: ../../../whatsnew/3.15.rst:2550 msgid ":c:func:`PyModule_FromDefAndSpec`" msgstr "" -#: ../../../whatsnew/3.15.rst:2533 +#: ../../../whatsnew/3.15.rst:2551 msgid ":c:func:`PyModule_FromDefAndSpec2`" msgstr "" -#: ../../../whatsnew/3.15.rst:2534 +#: ../../../whatsnew/3.15.rst:2552 msgid ":c:func:`PyModule_ExecDef`" msgstr "" -#: ../../../whatsnew/3.15.rst:2537 +#: ../../../whatsnew/3.15.rst:2555 msgid "" "The slots :c:macro:`Py_tp_bases` and :c:macro:`Py_tp_base` are now " "equivalent: they can be set either to a single type or a tuple of types. " @@ -4369,11 +4390,11 @@ msgid "" "are specified." msgstr "" -#: ../../../whatsnew/3.15.rst:2542 +#: ../../../whatsnew/3.15.rst:2560 msgid "(Contributed by Petr Viktorin in :gh:`149044`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2544 +#: ../../../whatsnew/3.15.rst:2562 msgid "" "Add :c:func:`PyUnstable_ThreadState_SetStackProtection` and :c:func:" "`PyUnstable_ThreadState_ResetStackProtection` functions to set the stack " @@ -4381,86 +4402,86 @@ msgid "" "(Contributed by Victor Stinner in :gh:`139653`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2550 +#: ../../../whatsnew/3.15.rst:2568 msgid "" "Add :c:func:`PyUnstable_SetImmortal` C API function to mark objects as :term:" "`immortal`. (Contributed by Kumar Aditya in :gh:`143300`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2553 +#: ../../../whatsnew/3.15.rst:2571 msgid "" "Restore private provisional ``_Py_InitializeMain()`` function removed in " "Python 3.14. (Contributed by Victor Stinner in :gh:`142417`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2557 +#: ../../../whatsnew/3.15.rst:2575 msgid "" "Add :c:func:`PyUnstable_DumpTraceback` and :c:func:" "`PyUnstable_DumpTracebackThreads` functions to output Python stacktraces. " "(Contributed by Alex Malyshev in :gh:`145559`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2563 +#: ../../../whatsnew/3.15.rst:2581 msgid "Changed C APIs" msgstr "" -#: ../../../whatsnew/3.15.rst:2565 +#: ../../../whatsnew/3.15.rst:2583 msgid "" "If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` or :c:macro:" "`Py_TPFLAGS_MANAGED_WEAKREF` flag is set then :c:macro:`Py_TPFLAGS_HAVE_GC` " "must be set too. (Contributed by Sergey Miryanov in :gh:`134786`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2569 +#: ../../../whatsnew/3.15.rst:2587 msgid "" ":c:macro:`PyDateTime_IMPORT` is now thread safe. Code that directly checks " "``PyDateTimeAPI`` for ``NULL`` should be updated to call :c:macro:" "`PyDateTime_IMPORT` instead. (Contributed by Kumar Aditya in :gh:`141563`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2575 +#: ../../../whatsnew/3.15.rst:2593 msgid "Removed C APIs" msgstr "" -#: ../../../whatsnew/3.15.rst:2577 +#: ../../../whatsnew/3.15.rst:2595 msgid "Remove deprecated ``PyUnicode`` functions:" msgstr "" -#: ../../../whatsnew/3.15.rst:2579 +#: ../../../whatsnew/3.15.rst:2597 msgid "" ":c:func:`!PyUnicode_AsDecodedObject`: Use :c:func:`PyCodec_Decode` instead." msgstr "" -#: ../../../whatsnew/3.15.rst:2581 +#: ../../../whatsnew/3.15.rst:2599 msgid "" ":c:func:`!PyUnicode_AsDecodedUnicode`: Use :c:func:`PyCodec_Decode` instead; " "note that some codecs (for example, \"base64\") may return a type other " "than :class:`str`, such as :class:`bytes`." msgstr "" -#: ../../../whatsnew/3.15.rst:2584 +#: ../../../whatsnew/3.15.rst:2602 msgid "" ":c:func:`!PyUnicode_AsEncodedObject`: Use :c:func:`PyCodec_Encode` instead." msgstr "" -#: ../../../whatsnew/3.15.rst:2586 +#: ../../../whatsnew/3.15.rst:2604 msgid "" ":c:func:`!PyUnicode_AsEncodedUnicode`: Use :c:func:`PyCodec_Encode` instead; " "note that some codecs (for example, \"base64\") may return a type other " "than :class:`bytes`, such as :class:`str`." msgstr "" -#: ../../../whatsnew/3.15.rst:2590 +#: ../../../whatsnew/3.15.rst:2608 msgid "(Contributed by Stan Ulbrych in :gh:`133612`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2592 +#: ../../../whatsnew/3.15.rst:2610 msgid "" ":c:func:`!PyImport_ImportModuleNoBlock`: deprecated alias of :c:func:" "`PyImport_ImportModule`. (Contributed by Bénédikt Tran in :gh:`133644`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2596 +#: ../../../whatsnew/3.15.rst:2614 msgid "" ":c:func:`!PyWeakref_GetObject` and :c:macro:`!PyWeakref_GET_OBJECT`: use :c:" "func:`PyWeakref_GetRef` instead. The |pythoncapi_compat_project| can be used " @@ -4468,28 +4489,28 @@ msgid "" "Bénédikt Tran in :gh:`133644`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2601 +#: ../../../whatsnew/3.15.rst:2619 msgid "" "Remove deprecated :c:func:`!PySys_ResetWarnOptions`. Clear :data:`sys." "warnoptions` and :data:`!warnings.filters` instead." msgstr "" -#: ../../../whatsnew/3.15.rst:2604 +#: ../../../whatsnew/3.15.rst:2622 msgid "(Contributed by Nikita Sobolev in :gh:`138886`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2606 +#: ../../../whatsnew/3.15.rst:2624 msgid "" "The following functions are removed in favor of :c:func:`PyConfig_Get`. The |" "pythoncapi_compat_project| can be used to get :c:func:`!PyConfig_Get` on " "Python 3.13 and older." msgstr "" -#: ../../../whatsnew/3.15.rst:2610 +#: ../../../whatsnew/3.15.rst:2628 msgid "Python initialization functions:" msgstr "" -#: ../../../whatsnew/3.15.rst:2612 +#: ../../../whatsnew/3.15.rst:2630 msgid "" ":c:func:`!Py_GetExecPrefix`: use :c:func:`PyConfig_Get(\"base_exec_prefix\") " "` (:data:`sys.base_exec_prefix`) instead. Use :c:func:" @@ -4497,13 +4518,13 @@ msgid "" "ref:`virtual environments ` need to be handled." msgstr "" -#: ../../../whatsnew/3.15.rst:2618 +#: ../../../whatsnew/3.15.rst:2636 msgid "" ":c:func:`!Py_GetPath`: use :c:func:`PyConfig_Get(\"module_search_paths\") " "` (:data:`sys.path`) instead." msgstr "" -#: ../../../whatsnew/3.15.rst:2621 +#: ../../../whatsnew/3.15.rst:2639 msgid "" ":c:func:`!Py_GetPrefix`: use :c:func:`PyConfig_Get(\"base_prefix\") " "` (:data:`sys.base_prefix`) instead. Use :c:func:" @@ -4511,39 +4532,39 @@ msgid "" "`virtual environments ` need to be handled." msgstr "" -#: ../../../whatsnew/3.15.rst:2627 +#: ../../../whatsnew/3.15.rst:2645 msgid "" ":c:func:`!Py_GetProgramFullPath`: use :c:func:`PyConfig_Get(\"executable\") " "` (:data:`sys.executable`) instead." msgstr "" -#: ../../../whatsnew/3.15.rst:2630 +#: ../../../whatsnew/3.15.rst:2648 msgid "" ":c:func:`!Py_GetProgramName`: use :c:func:`PyConfig_Get(\"executable\") " "` (:data:`sys.executable`) instead." msgstr "" -#: ../../../whatsnew/3.15.rst:2633 +#: ../../../whatsnew/3.15.rst:2651 msgid "" ":c:func:`!Py_GetPythonHome`: use :c:func:`PyConfig_Get(\"home\") " "` or the :envvar:`PYTHONHOME` environment variable instead." msgstr "" -#: ../../../whatsnew/3.15.rst:2637 +#: ../../../whatsnew/3.15.rst:2655 msgid "(Contributed by Bénédikt Tran in :gh:`133644`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2645 +#: ../../../whatsnew/3.15.rst:2663 msgid "Deprecated C APIs" msgstr "" -#: ../../../whatsnew/3.15.rst:2647 +#: ../../../whatsnew/3.15.rst:2665 msgid "" "Deprecate :pep:`456` support for providing an external definition of the " "string hashing scheme. Removal is scheduled for Python 3.19." msgstr "" -#: ../../../whatsnew/3.15.rst:2650 +#: ../../../whatsnew/3.15.rst:2668 msgid "" "Previously, embedders could define :c:macro:`Py_HASH_ALGORITHM` to be " "``Py_HASH_EXTERNAL`` to indicate that the hashing scheme was provided " @@ -4551,11 +4572,11 @@ msgid "" "unused." msgstr "" -#: ../../../whatsnew/3.15.rst:2655 +#: ../../../whatsnew/3.15.rst:2673 msgid "(Contributed by Bénédikt Tran in :gh:`141226`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2657 +#: ../../../whatsnew/3.15.rst:2675 msgid "" "For unsigned integer formats in :c:func:`PyArg_ParseTuple`, accepting Python " "integers with value that is larger than the maximal value for the C type or " @@ -4564,14 +4585,14 @@ msgid "" "`132629`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2663 +#: ../../../whatsnew/3.15.rst:2681 msgid "" ":c:func:`PyBytes_FromStringAndSize(NULL, len) ` " "and :c:func:`_PyBytes_Resize` are :term:`soft deprecated`, use the :c:type:" "`PyBytesWriter` API instead. (Contributed by Victor Stinner in :gh:`129813`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2668 +#: ../../../whatsnew/3.15.rst:2686 msgid "" ":c:func:`!_PyObject_CallMethodId`, :c:func:`!_PyObject_GetAttrId` and :c:" "func:`!_PyUnicode_FromId` are deprecated since 3.15 and will be removed in " @@ -4580,7 +4601,7 @@ msgid "" "func:`PyObject_GetAttr`. (Contributed by Victor Stinner in :gh:`141049`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2675 +#: ../../../whatsnew/3.15.rst:2693 msgid "" "Deprecate :c:member:`~PyComplexObject.cval` field of the :c:type:" "`PyComplexObject` type. Use :c:func:`PyComplex_AsCComplex` and :c:func:" @@ -4589,7 +4610,7 @@ msgid "" "`128813`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2682 +#: ../../../whatsnew/3.15.rst:2700 msgid "" "Functions :c:func:`_Py_c_sum`, :c:func:`_Py_c_diff`, :c:func:`_Py_c_neg`, :c:" "func:`_Py_c_prod`, :c:func:`_Py_c_quot`, :c:func:`_Py_c_pow` and :c:func:" @@ -4597,38 +4618,38 @@ msgid "" "in :gh:`128813`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2687 +#: ../../../whatsnew/3.15.rst:2705 msgid "" ":c:member:`~PyConfig.bytes_warning` is deprecated since 3.15 and will be " "removed in 3.17. (Contributed by Nikita Sobolev in :gh:`136355`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2691 +#: ../../../whatsnew/3.15.rst:2709 msgid "" ":c:macro:`!Py_INFINITY` macro is :term:`soft deprecated`, use the C11 " "standard ```` :c:macro:`!INFINITY` instead. (Contributed by Sergey B " "Kirpichev in :gh:`141004`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2695 +#: ../../../whatsnew/3.15.rst:2713 msgid "The following macros are :term:`soft deprecated`:" msgstr "" -#: ../../../whatsnew/3.15.rst:2697 +#: ../../../whatsnew/3.15.rst:2715 msgid ":c:macro:`Py_ALIGNED`: Prefer ``alignas`` instead." msgstr "" -#: ../../../whatsnew/3.15.rst:2698 +#: ../../../whatsnew/3.15.rst:2716 msgid ":c:macro:`PY_FORMAT_SIZE_T`: Use ``\"z\"`` directly." msgstr "" -#: ../../../whatsnew/3.15.rst:2699 +#: ../../../whatsnew/3.15.rst:2717 msgid "" ":c:macro:`Py_LL` and :c:macro:`Py_ULL`: Use standard suffixes, ``LL`` and " "``ULL``." msgstr "" -#: ../../../whatsnew/3.15.rst:2701 +#: ../../../whatsnew/3.15.rst:2719 msgid "" ":c:macro:`PY_LONG_LONG`, :c:macro:`PY_LLONG_MIN`, :c:macro:`PY_LLONG_MAX`, :" "c:macro:`PY_ULLONG_MAX`, :c:macro:`PY_INT32_T`, :c:macro:`PY_UINT32_T`, :c:" @@ -4636,36 +4657,36 @@ msgid "" "types/limits." msgstr "" -#: ../../../whatsnew/3.15.rst:2705 +#: ../../../whatsnew/3.15.rst:2723 msgid ":c:macro:`Py_UNICODE_SIZE`: Use ``sizeof(wchar_t)`` directly." msgstr "" -#: ../../../whatsnew/3.15.rst:2706 +#: ../../../whatsnew/3.15.rst:2724 msgid ":c:macro:`Py_VA_COPY`: Use ``va_copy`` directly." msgstr "" -#: ../../../whatsnew/3.15.rst:2708 +#: ../../../whatsnew/3.15.rst:2726 msgid "" "The macro :c:macro:`Py_UNICODE_WIDE`, which was scheduled for removal, is :" "term:`soft deprecated` instead." msgstr "" -#: ../../../whatsnew/3.15.rst:2711 +#: ../../../whatsnew/3.15.rst:2729 msgid "(Contributed by Petr Viktorin in :gh:`146175`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2713 +#: ../../../whatsnew/3.15.rst:2731 msgid "" ":c:macro:`!Py_MATH_El` and :c:macro:`!Py_MATH_PIl` are deprecated since 3.15 " "and will be removed in 3.20. (Contributed by Sergey B Kirpichev in :gh:" "`141004`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2722 +#: ../../../whatsnew/3.15.rst:2740 msgid "Build changes" msgstr "" -#: ../../../whatsnew/3.15.rst:2724 +#: ../../../whatsnew/3.15.rst:2742 msgid "" "Removed implicit fallback to the bundled copy of the ``libmpdec`` library. " "Now this should be explicitly enabled with :option:`!--with-system-libmpdec` " @@ -4673,7 +4694,7 @@ msgid "" "Sergey B Kirpichev in :gh:`115119`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2729 +#: ../../../whatsnew/3.15.rst:2747 msgid "" "The new configure option :option:`--with-missing-stdlib-config=FILE` allows " "distributors to pass a `JSON `_ " @@ -4682,7 +4703,7 @@ msgid "" "Stan Ulbrych and Petr Viktorin in :gh:`139707`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2735 +#: ../../../whatsnew/3.15.rst:2753 msgid "" "The new configure option :option:`--with-pymalloc-hugepages` enables huge " "page support for :ref:`pymalloc ` arenas. When enabled, arena size " @@ -4693,7 +4714,7 @@ msgid "" "environment variable to ``1``." msgstr "" -#: ../../../whatsnew/3.15.rst:2743 +#: ../../../whatsnew/3.15.rst:2761 msgid "" "Annotating anonymous mmap usage is now supported if the Linux kernel " "supports :manpage:`PR_SET_VMA_ANON_NAME ` (Linux 5.17 or " @@ -4703,13 +4724,13 @@ msgid "" "Na in :gh:`141770`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2750 +#: ../../../whatsnew/3.15.rst:2768 msgid "" "CPython is now built with frame pointers enabled by default (:pep:`831`). " "Pass :option:`--without-frame-pointers` to opt out." msgstr "" -#: ../../../whatsnew/3.15.rst:2753 +#: ../../../whatsnew/3.15.rst:2771 msgid "" "Authors of C extensions and native libraries built with custom build systems " "should ensure the unwind chain is intact. This is usually done by adding ``-" @@ -4717,13 +4738,13 @@ msgid "" "without-frame-pointers` documentation for the specific flags Python uses." msgstr "" -#: ../../../whatsnew/3.15.rst:2759 +#: ../../../whatsnew/3.15.rst:2777 msgid "" "(Contributed by Pablo Galindo Salgado and Savannah Ostrowski in :gh:" "`149201`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2763 +#: ../../../whatsnew/3.15.rst:2781 msgid "" "64-bit builds using Visual Studio 2026 (MSVC 18) may now use the new :ref:" "`tail-calling interpreter `. Results on " @@ -4739,45 +4760,45 @@ msgid "" "Hulon Jenkins.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2780 +#: ../../../whatsnew/3.15.rst:2798 msgid "Porting to Python 3.15" msgstr "" -#: ../../../whatsnew/3.15.rst:2782 +#: ../../../whatsnew/3.15.rst:2800 msgid "" "This section lists previously described changes and other bugfixes that may " "require changes to your code." msgstr "" -#: ../../../whatsnew/3.15.rst:2785 +#: ../../../whatsnew/3.15.rst:2803 msgid ":class:`sqlite3.Connection` APIs have been cleaned up." msgstr "" -#: ../../../whatsnew/3.15.rst:2787 +#: ../../../whatsnew/3.15.rst:2805 msgid "" "All parameters of :func:`sqlite3.connect` except *database* are now keyword-" "only." msgstr "" -#: ../../../whatsnew/3.15.rst:2788 +#: ../../../whatsnew/3.15.rst:2806 msgid "" "The first three parameters of methods :meth:`~sqlite3.Connection." "create_function` and :meth:`~sqlite3.Connection.create_aggregate` are now " "positional-only." msgstr "" -#: ../../../whatsnew/3.15.rst:2790 +#: ../../../whatsnew/3.15.rst:2808 msgid "" "The first parameter of methods :meth:`~sqlite3.Connection.set_authorizer`, :" "meth:`~sqlite3.Connection.set_progress_handler` and :meth:`~sqlite3." "Connection.set_trace_callback` is now positional-only." msgstr "" -#: ../../../whatsnew/3.15.rst:2794 +#: ../../../whatsnew/3.15.rst:2812 msgid "(Contributed by Serhiy Storchaka in :gh:`133595`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2796 +#: ../../../whatsnew/3.15.rst:2814 msgid "" ":data:`resource.RLIM_INFINITY` is now always positive. Passing a negative " "integer value that corresponded to its old value (such as ``-1`` or ``-3``, " @@ -4786,13 +4807,13 @@ msgid "" "`137044`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2802 +#: ../../../whatsnew/3.15.rst:2820 msgid "" ":meth:`mmap.mmap.resize` has been removed on platforms that don't support " "the underlying syscall, instead of raising a :exc:`SystemError`." msgstr "" -#: ../../../whatsnew/3.15.rst:2805 +#: ../../../whatsnew/3.15.rst:2823 msgid "" "A resource warning is now emitted for an unclosed :func:`xml.etree." "ElementTree.iterparse` iterator if it opened a file. Use its :meth:`!close` " @@ -4800,7 +4821,7 @@ msgid "" "(Contributed by Osama Abdelkader and Serhiy Storchaka in :gh:`140601`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2811 +#: ../../../whatsnew/3.15.rst:2829 msgid "" "If a short option and a single-dash long option are passed to :meth:" "`argparse.ArgumentParser.add_argument`, *dest* is now inferred from the " @@ -4810,7 +4831,7 @@ msgid "" "`138697`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2818 +#: ../../../whatsnew/3.15.rst:2836 msgid "" "Padding of input no longer required in :func:`base64.urlsafe_b64decode`. " "Pass a new argument ``padded=True`` or use :func:`base64.b64decode` with " @@ -4818,7 +4839,7 @@ msgid "" "padding required. (Contributed by Serhiy Storchaka in :gh:`73613`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:2824 +#: ../../../whatsnew/3.15.rst:2842 msgid "" "Since :meth:`unittest.TestCase.assertWarns` and :meth:`unittest.TestCase." "assertWarnsRegex` no longer swallow warnings that do not match the specified " diff --git a/main/locale/pot/LC_MESSAGES/whatsnew/3.16.pot b/main/locale/pot/LC_MESSAGES/whatsnew/3.16.pot index aa8b7cd2972..57fe2812443 100644 --- a/main/locale/pot/LC_MESSAGES/whatsnew/3.16.pot +++ b/main/locale/pot/LC_MESSAGES/whatsnew/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-08-24 09:54+0000\n" +"POT-Creation-Date: 2026-09-07 15:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -49,7 +49,7 @@ msgstr "" msgid "Summary --- release highlights" msgstr "" -#: ../../../whatsnew/3.16.rst:71 ../../../whatsnew/3.16.rst:902 +#: ../../../whatsnew/3.16.rst:71 ../../../whatsnew/3.16.rst:980 msgid "New features" msgstr "" @@ -59,11 +59,21 @@ msgstr "" #: ../../../whatsnew/3.16.rst:78 msgid "" +"The :func:`iter` function now accepts the *stop_exception* parameter. The " +"created iterator stops when the callable raises the specified exception. The " +"second parameter is now named *stop_value* and can be passed by keyword. :" +"func:`aiter` now accepts the same *stop_value* and *stop_exception* " +"parameters, calling an asynchronous callable and awaiting the result. " +"(Contributed by Serhiy Storchaka in :gh:`64862`.)" +msgstr "" + +#: ../../../whatsnew/3.16.rst:85 +msgid "" ":meth:`memoryview.cast` now allows casting a multidimensional F-contiguous " "view to a one-dimensional view. (Contributed by Jaemin Park in :gh:`91484`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:82 +#: ../../../whatsnew/3.16.rst:89 msgid "" ":meth:`memoryview.cast` now accepts an *order* parameter. With " "``order='F'`` it returns a zero-copy Fortran-contiguous (column-major) view " @@ -71,7 +81,7 @@ msgid "" "libraries. (Contributed by Serhiy Storchaka in :gh:`78959`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:88 +#: ../../../whatsnew/3.16.rst:95 msgid "" ":ref:`Frame objects ` now support :mod:`weak references " "`. This allows associating extra data with active frames, for " @@ -79,34 +89,34 @@ msgid "" "reference) alive indefinitely. (Contributed by Łukasz Langa in :gh:`102960`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:96 +#: ../../../whatsnew/3.16.rst:103 msgid "New modules" msgstr "" -#: ../../../whatsnew/3.16.rst:98 +#: ../../../whatsnew/3.16.rst:105 msgid "None yet." msgstr "" -#: ../../../whatsnew/3.16.rst:102 +#: ../../../whatsnew/3.16.rst:109 msgid "Improved modules" msgstr "" -#: ../../../whatsnew/3.16.rst:105 ../../../whatsnew/3.16.rst:684 +#: ../../../whatsnew/3.16.rst:112 ../../../whatsnew/3.16.rst:739 msgid "asyncio" msgstr "" -#: ../../../whatsnew/3.16.rst:107 +#: ../../../whatsnew/3.16.rst:114 msgid "" "Add the *mode* parameter to :meth:`asyncio.loop.create_unix_server` and :" "func:`asyncio.start_unix_server` to set the permissions of the Unix socket " "file created for *path*. (Contributed by Sam Bull in :gh:`94984`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:114 +#: ../../../whatsnew/3.16.rst:121 msgid "codecs" msgstr "" -#: ../../../whatsnew/3.16.rst:116 +#: ../../../whatsnew/3.16.rst:123 msgid "" "On platforms that provide the C library's :manpage:`iconv(3)` function, " "every encoding known to ``iconv`` for which Python has no built-in codec is " @@ -115,11 +125,23 @@ msgid "" "the same name exists. (Contributed by Serhiy Storchaka in :gh:`152997`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:124 +#: ../../../whatsnew/3.16.rst:132 ../../../whatsnew/3.16.rst:320 +msgid "concurrent.futures" +msgstr "" + +#: ../../../whatsnew/3.16.rst:134 ../../../whatsnew/3.16.rst:322 +msgid "" +"The iterator returned by :meth:`concurrent.futures.Executor.map` is no " +"longer automatically closed if a function call raises an exception. Use " +"method :meth:`!close` to explicitly close the iterator. (Contributed by " +"xzmeng and Serhiy Storchaka in :gh:`108518`.)" +msgstr "" + +#: ../../../whatsnew/3.16.rst:141 msgid "csv" msgstr "" -#: ../../../whatsnew/3.16.rst:126 +#: ../../../whatsnew/3.16.rst:143 msgid "" ":meth:`csv.Sniffer.sniff` now deduces the dialect by trial parsing instead " "of heuristics based on matching isolated fragments and on character " @@ -132,18 +154,35 @@ msgid "" "Storchaka in :gh:`83273`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:138 +#: ../../../whatsnew/3.16.rst:155 msgid "" ":meth:`csv.Sniffer.sniff` now detects the *lineterminator* parameter by a " "majority vote among the line endings of the sample, instead of always " "returning ``'\\r\\n'``. (Contributed by Serhiy Storchaka in :gh:`75008`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:144 +#: ../../../whatsnew/3.16.rst:162 ../../../whatsnew/3.16.rst:308 +msgid "ctypes" +msgstr "" + +#: ../../../whatsnew/3.16.rst:164 ../../../whatsnew/3.16.rst:310 +msgid "" +"Add :func:`ctypes.util.struct` for generating :class:`~ctypes.Structure` " +"types from an annotation-based syntax, similar to how the :mod:`dataclasses` " +"module is used. (Contributed by Peter Bierma in :gh:`104533`.)" +msgstr "" + +#: ../../../whatsnew/3.16.rst:168 ../../../whatsnew/3.16.rst:314 +msgid "" +"Add :func:`ctypes.util.wrap_dll_function` for generating function pointers " +"through a function signature. (Contributed by Peter Bierma in :gh:`153903`.)" +msgstr "" + +#: ../../../whatsnew/3.16.rst:174 msgid "curses" msgstr "" -#: ../../../whatsnew/3.16.rst:146 +#: ../../../whatsnew/3.16.rst:176 msgid "" "The :mod:`curses` character-cell window methods now accept a full character " "cell --- a spacing character optionally followed by combining characters --- " @@ -164,7 +203,7 @@ msgid "" "Serhiy Storchaka in :gh:`151757`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:166 +#: ../../../whatsnew/3.16.rst:196 msgid "" "Add the :class:`curses.complexchar` type, representing a styled character " "cell (its text, attributes and color pair), and the window methods :meth:" @@ -178,7 +217,7 @@ msgid "" "locales are supported). (Contributed by Serhiy Storchaka in :gh:`152233`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:179 +#: ../../../whatsnew/3.16.rst:209 msgid "" "Add the :class:`curses.complexstr` type, an immutable run of styled cells " "(the string counterpart of :class:`~curses.complexchar`), and the window " @@ -190,7 +229,7 @@ msgid "" "library. (Contributed by Serhiy Storchaka in :gh:`152233`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:189 +#: ../../../whatsnew/3.16.rst:219 msgid "" "The wide-character :mod:`curses` functions and methods :meth:`~curses.window." "get_wch`, :meth:`~curses.window.get_wstr`, :func:`curses.unget_wch`, :func:" @@ -203,7 +242,7 @@ msgid "" "`OverflowError`). (Contributed by Serhiy Storchaka in :gh:`152470`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:200 +#: ../../../whatsnew/3.16.rst:230 msgid "" "Add support for multiple terminals to the :mod:`curses` module: the new " "functions :func:`curses.newterm`, :func:`curses.set_term` and :func:`curses." @@ -212,7 +251,7 @@ msgid "" "Serhiy Storchaka in :gh:`90092`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:207 +#: ../../../whatsnew/3.16.rst:237 msgid "" "Add the :mod:`curses` window methods :meth:`~curses.window.attr_get`, :meth:" "`~curses.window.attr_set`, :meth:`~curses.window.attr_on`, :meth:`~curses." @@ -222,7 +261,7 @@ msgid "" "Storchaka in :gh:`152219`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:214 +#: ../../../whatsnew/3.16.rst:244 msgid "" "Add the :func:`curses.term_attrs` function, which returns the supported " "video attributes as :ref:`WA_* ` values, the " @@ -230,14 +269,14 @@ msgid "" "in :gh:`152332`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:219 +#: ../../../whatsnew/3.16.rst:249 msgid "" "Add the ``WACS_*`` constants to the :mod:`curses` module, the counterparts " "of the :ref:`ACS_* ` line-drawing codes as :class:`curses." "complexchar` cells. (Contributed by Serhiy Storchaka in :gh:`155863`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:224 +#: ../../../whatsnew/3.16.rst:254 msgid "" "Add the :mod:`curses` functions :func:`curses.alloc_pair`, :func:`curses." "find_pair`, :func:`curses.free_pair` and :func:`curses.reset_color_pairs` " @@ -246,7 +285,7 @@ msgid "" "Storchaka in :gh:`151774`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:231 +#: ../../../whatsnew/3.16.rst:261 msgid "" "Add the :mod:`curses` functions :func:`~curses.scr_dump`, :func:`~curses." "scr_restore`, :func:`~curses.scr_init` and :func:`~curses.scr_set`, which " @@ -254,14 +293,14 @@ msgid "" "Storchaka in :gh:`152260`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:236 +#: ../../../whatsnew/3.16.rst:266 msgid "" "Add the :mod:`curses` window method :meth:`~curses.window.dupwin`, which " "returns a new window that is an independent duplicate of an existing one. " "(Contributed by Serhiy Storchaka in :gh:`152258`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:240 +#: ../../../whatsnew/3.16.rst:270 msgid "" "Add the soft-label-key functions to the :mod:`curses` module, which manage a " "row of labels along the bottom line of the screen: :func:`~curses." @@ -275,7 +314,7 @@ msgid "" "Storchaka in :gh:`152263`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:252 +#: ../../../whatsnew/3.16.rst:282 msgid "" "Add the :mod:`curses` key-management functions :func:`~curses.define_key`, :" "func:`~curses.key_defined` and :func:`~curses.keyok`, available when built " @@ -283,14 +322,14 @@ msgid "" "Storchaka in :gh:`152334`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:257 +#: ../../../whatsnew/3.16.rst:287 msgid "" "Add the :func:`curses.has_mouse` function and the :meth:`curses.window." "mouse_trafo` method, completing the :mod:`curses` mouse interface. " "(Contributed by Serhiy Storchaka in :gh:`152325`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:262 +#: ../../../whatsnew/3.16.rst:292 msgid "" "Add :mod:`curses` functions and window methods that report state which could " "previously only be set, such as :meth:`curses.window.is_keypad`, :meth:" @@ -299,13 +338,13 @@ msgid "" "Storchaka in :gh:`151776`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:268 +#: ../../../whatsnew/3.16.rst:298 msgid "" "Add :func:`curses.nofilter`, which undoes the effect of :func:`curses." "filter`. (Contributed by Serhiy Storchaka in :gh:`151744`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:271 +#: ../../../whatsnew/3.16.rst:301 msgid "" ":class:`curses.textpad.Textbox` now supports entering and reading back the " "full Unicode range, including combining characters, when curses is built " @@ -313,84 +352,57 @@ msgid "" "`133031`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:278 -msgid "ctypes" -msgstr "" - -#: ../../../whatsnew/3.16.rst:280 -msgid "" -"Add :func:`ctypes.util.struct` for generating :class:`~ctypes.Structure` " -"types from an annotation-based syntax, similar to how the :mod:`dataclasses` " -"module is used. (Contributed by Peter Bierma in :gh:`104533`.)" -msgstr "" - -#: ../../../whatsnew/3.16.rst:284 -msgid "" -"Add :func:`ctypes.util.wrap_dll_function` for generating function pointers " -"through a function signature. (Contributed by Peter Bierma in :gh:`153903`.)" +#: ../../../whatsnew/3.16.rst:329 +msgid "difflib" msgstr "" -#: ../../../whatsnew/3.16.rst:290 -msgid "concurrent.futures" -msgstr "" - -#: ../../../whatsnew/3.16.rst:292 +#: ../../../whatsnew/3.16.rst:331 msgid "" -"The iterator returned by :meth:`concurrent.futures.Executor.map` is no " -"longer automatically closed if a function call raises an exception. Use " -"method :meth:`!close` to explicitly close the iterator. (Contributed by " -"xzmeng and Serhiy Storchaka in :gh:`108518`.)" +"Expose optional ``autojunk`` parameter from :class:`difflib.SequenceMatcher` " +"to public functions and class methods in :mod:`difflib`, allowing to modify " +"behavior of automatic junk heuristic in this module in higher public class " +"methods and functions. (Contributed by Tomasz Kazimierczak in :gh:`118150`)" msgstr "" -#: ../../../whatsnew/3.16.rst:299 +#: ../../../whatsnew/3.16.rst:339 msgid "encodings" msgstr "" -#: ../../../whatsnew/3.16.rst:301 +#: ../../../whatsnew/3.16.rst:341 msgid "" "Add the ``utf-7-imap`` codec, implementing the modified UTF-7 encoding used " "for international IMAP4 mailbox names (:rfc:`3501`). (Contributed by Serhiy " "Storchaka in :gh:`66788`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:307 +#: ../../../whatsnew/3.16.rst:347 msgid "gzip" msgstr "" -#: ../../../whatsnew/3.16.rst:309 +#: ../../../whatsnew/3.16.rst:349 msgid "" ":func:`gzip.open` now accepts an optional argument ``mtime`` which is passed " "on to the constructor of the :class:`~gzip.GzipFile` class. (Contributed by " "Marin Misur in :gh:`91372`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:314 -msgid "io" -msgstr "" - -#: ../../../whatsnew/3.16.rst:316 -msgid "" -"Add :meth:`io.BytesIO.peek` method to read without advancing position. " -"(Contributed by Marcel Martin in :gh:`90533`.)" -msgstr "" - -#: ../../../whatsnew/3.16.rst:321 +#: ../../../whatsnew/3.16.rst:355 msgid "imaplib" msgstr "" -#: ../../../whatsnew/3.16.rst:323 +#: ../../../whatsnew/3.16.rst:357 msgid "" "Add the :meth:`~imaplib.IMAP4.id` method, a wrapper for the ``ID`` command (:" "rfc:`2971`). (Contributed by Serhiy Storchaka in :gh:`98092`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:327 +#: ../../../whatsnew/3.16.rst:361 msgid "" "Add the :meth:`~imaplib.IMAP4.move` method, a wrapper for the ``MOVE`` " "command (:rfc:`6851`). (Contributed by Serhiy Storchaka in :gh:`77508`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:331 +#: ../../../whatsnew/3.16.rst:365 msgid "" "Add the :meth:`~imaplib.IMAP4.login_plain` method, which authenticates using " "the ``PLAIN`` SASL mechanism (:rfc:`4616`) and supports non-ASCII user names " @@ -398,7 +410,7 @@ msgid "" "in :gh:`89869`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:336 +#: ../../../whatsnew/3.16.rst:370 msgid "" "Non-ASCII mailbox names are now automatically encoded as modified UTF-7 (:" "rfc:`3501`, section 5.1.3) in the default mode, so international mailbox " @@ -407,7 +419,7 @@ msgid "" "Storchaka in :gh:`49555`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:342 +#: ../../../whatsnew/3.16.rst:376 msgid "" "The :meth:`~imaplib.IMAP4.copy`, :meth:`~imaplib.IMAP4.move`, :meth:" "`~imaplib.IMAP4.fetch`, :meth:`~imaplib.IMAP4.store`, :meth:`~imaplib.IMAP4." @@ -418,7 +430,7 @@ msgid "" "Storchaka in :gh:`153502`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:351 +#: ../../../whatsnew/3.16.rst:385 msgid "" ":meth:`~imaplib.IMAP4.search`, :meth:`~imaplib.IMAP4.sort` and :meth:" "`~imaplib.IMAP4.thread` (and the corresponding ``uid`` commands) now encode :" @@ -429,7 +441,7 @@ msgid "" "`153494`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:359 +#: ../../../whatsnew/3.16.rst:393 msgid "" "Command methods now accept structured arguments, so the module takes care of " "quoting instead of the caller. A *message_set* and lists of flags or other " @@ -441,22 +453,32 @@ msgid "" "(Contributed by Serhiy Storchaka in :gh:`153521`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:372 +#: ../../../whatsnew/3.16.rst:406 +msgid "io" +msgstr "" + +#: ../../../whatsnew/3.16.rst:408 +msgid "" +"Add :meth:`io.BytesIO.peek` method to read without advancing position. " +"(Contributed by Marcel Martin in :gh:`90533`.)" +msgstr "" + +#: ../../../whatsnew/3.16.rst:413 msgid "ipaddress" msgstr "" -#: ../../../whatsnew/3.16.rst:374 +#: ../../../whatsnew/3.16.rst:415 msgid "" "Add :meth:`~ipaddress.IPv4Network.next_network` and :meth:`~ipaddress." "IPv6Network.next_network` methods to find the next nearest network with a " -"specific prefix size." +"specific prefix size. (Contributed by Faisal Mahmood in :gh:`87027`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:380 ../../../whatsnew/3.16.rst:708 +#: ../../../whatsnew/3.16.rst:422 ../../../whatsnew/3.16.rst:765 msgid "logging" msgstr "" -#: ../../../whatsnew/3.16.rst:382 +#: ../../../whatsnew/3.16.rst:424 msgid "" ":class:`~logging.handlers.TimedRotatingFileHandler` now uses the creation " "time instead of the last modification time of an existing log file as the " @@ -466,11 +488,11 @@ msgid "" "Márton and Serhiy Storchaka in :gh:`84649`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:392 +#: ../../../whatsnew/3.16.rst:434 msgid "lzma" msgstr "" -#: ../../../whatsnew/3.16.rst:394 +#: ../../../whatsnew/3.16.rst:436 msgid "" "Add support of new BCJ filters ARM64 and RISC-V via :const:`!lzma." "FILTER_ARM64` and :const:`!lzma.FILTER_RISCV`. Note that the new filters " @@ -479,11 +501,11 @@ msgid "" "by Chien Wong in :gh:`115988`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:402 +#: ../../../whatsnew/3.16.rst:444 msgid "math" msgstr "" -#: ../../../whatsnew/3.16.rst:404 +#: ../../../whatsnew/3.16.rst:446 msgid "" "Added trigonometric functions that work in units of half turns, rather than " "radians. The new functions :func:`math.acospi`, :func:`math.asinpi`, :func:" @@ -494,42 +516,39 @@ msgid "" "`150534`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:414 +#: ../../../whatsnew/3.16.rst:456 msgid "multiprocessing" msgstr "" -#: ../../../whatsnew/3.16.rst:416 +#: ../../../whatsnew/3.16.rst:458 msgid "" -"Add the optional ``buffersize`` parameter to :meth:`multiprocessing.pool." -"Pool.imap` and :meth:`multiprocessing.pool.Pool.imap_unordered` to limit the " +"Add the optional *buffersize* parameter to :meth:`multiprocessing.pool.Pool." +"imap` and :meth:`multiprocessing.pool.Pool.imap_unordered` to limit the " "number of submitted tasks whose results have not yet been yielded. If the " -"buffer is full, iteration over the *iterables* pauses until a result is " +"buffer is full, iteration over the *iterable* pauses until a result is " "yielded from the buffer. To fully utilize pool's capacity when using this " "feature, set *buffersize* at least to the number of processes in pool (to " "consume *iterable* as you go), or even higher (to prefetch the next " -"``N=buffersize-processes`` arguments)." -msgstr "" - -#: ../../../whatsnew/3.16.rst:426 -msgid "(Contributed by Oleksandr Baltian in :gh:`136871`.)" +"``N=buffersize-processes`` arguments). (Contributed by Oleksandr Baltian in :" +"gh:`136871`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:430 +#: ../../../whatsnew/3.16.rst:471 msgid "os" msgstr "" -#: ../../../whatsnew/3.16.rst:432 +#: ../../../whatsnew/3.16.rst:473 msgid "" "Add :func:`os.pidfd_getfd` for duplicating a file descriptor from another " "process via a pidfd. Available on Linux 5.6+. (Contributed by Maurycy " "Pawłowski-Wieroński in :gh:`149464`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:438 +#: ../../../whatsnew/3.16.rst:479 msgid "pydoc" msgstr "" -#: ../../../whatsnew/3.16.rst:440 +#: ../../../whatsnew/3.16.rst:481 msgid "" "Modernize the HTML output of :mod:`pydoc`. The pages generated by the :mod:" "`pydoc` HTTP server now use semantic HTML5 markup and a new style sheet " @@ -539,11 +558,11 @@ msgid "" "`153906`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:449 ../../../whatsnew/3.16.rst:648 +#: ../../../whatsnew/3.16.rst:490 ../../../whatsnew/3.16.rst:709 msgid "re" msgstr "" -#: ../../../whatsnew/3.16.rst:451 +#: ../../../whatsnew/3.16.rst:492 msgid "" ":mod:`re` now supports set operations and nested sets in character classes, " "as described in `Unicode Technical Standard #18 ` " "method which returns the list of styles defined in a theme. (Contributed by " "Serhiy Storchaka in :gh:`151920`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:518 +#: ../../../whatsnew/3.16.rst:561 msgid "" "Added new :class:`!tkinter.Canvas` methods :meth:`~tkinter.Canvas.rchars` " "which replaces the text or coordinates of canvas items, and :meth:`~tkinter." @@ -641,14 +660,14 @@ msgid "" "by Serhiy Storchaka in :gh:`151876`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:523 +#: ../../../whatsnew/3.16.rst:566 msgid "" "Added a :meth:`!validate` method to the :class:`!tkinter.Entry` and :class:`!" "tkinter.Spinbox` widgets, which forces an evaluation of the validation " "command. (Contributed by Serhiy Storchaka in :gh:`151878`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:528 +#: ../../../whatsnew/3.16.rst:571 msgid "" "Added the :meth:`tkinter.Menu.postcascade` method, and the :meth:`~tkinter." "Misc.tk_scaling` and :meth:`~tkinter.Misc.tk_inactive` methods which " @@ -656,7 +675,7 @@ msgid "" "idle time. (Contributed by Serhiy Storchaka in :gh:`151881`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:534 +#: ../../../whatsnew/3.16.rst:577 msgid "" "Added the :meth:`!tk_print` method to :class:`tkinter.Canvas` and :class:" "`tkinter.Text` which prints the contents of the widget using the native " @@ -664,7 +683,7 @@ msgid "" "Storchaka in :gh:`153256`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:539 +#: ../../../whatsnew/3.16.rst:582 msgid "" "Added new window-management methods :meth:`~tkinter.Misc.winfo_isdark` (dark " "mode detection), :meth:`~tkinter.Wm.wm_iconbadge` (application icon badge) " @@ -672,7 +691,7 @@ msgid "" "(Contributed by Serhiy Storchaka in :gh:`151874`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:544 +#: ../../../whatsnew/3.16.rst:587 msgid "" "Added the :meth:`~tkinter.Misc.tk_appname`, :meth:`~tkinter.Misc." "tk_useinputmethods` and :meth:`~tkinter.Misc.tk_caret` methods, exposing the " @@ -680,7 +699,7 @@ msgid "" "location. (Contributed by Serhiy Storchaka in :gh:`151886`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:550 +#: ../../../whatsnew/3.16.rst:593 msgid "" "Added support for more options in :class:`!tkinter.PhotoImage` methods: the " "*format* parameter of :meth:`~tkinter.PhotoImage.put`, the *metadata* " @@ -690,21 +709,21 @@ msgid "" "(Contributed by Serhiy Storchaka in :gh:`151890`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:557 +#: ../../../whatsnew/3.16.rst:600 msgid "" "Added the :meth:`~tkinter.PhotoImage.redither` method which recalculates the " "dithered image when its data was supplied in pieces. (Contributed by Serhiy " "Storchaka in :gh:`151888`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:561 +#: ../../../whatsnew/3.16.rst:604 msgid "" ":class:`tkinter.OptionMenu` now accepts arbitrary :class:`!tkinter." "Menubutton` options as keyword arguments, which can also override its " "default appearance. (Contributed by Serhiy Storchaka in :gh:`101284`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:565 +#: ../../../whatsnew/3.16.rst:608 msgid "" "The :mod:`tkinter.simpledialog` dialogs were modernized to match the look " "and feel of the native Tk dialogs. :class:`!tkinter.simpledialog." @@ -721,7 +740,7 @@ msgid "" "Serhiy Storchaka in :gh:`59396`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:581 +#: ../../../whatsnew/3.16.rst:624 msgid "" "The :class:`!tkinter.filedialog.FileDialog` dialog and its :class:`!tkinter." "filedialog.LoadFileDialog` and :class:`!tkinter.filedialog.SaveFileDialog` " @@ -731,7 +750,7 @@ msgid "" "in :gh:`59396`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:589 +#: ../../../whatsnew/3.16.rst:632 msgid "" "Added the :mod:`tkinter.systray` module which provides the :class:`~tkinter." "systray.SysTrayIcon` class as an interface to the system tray icon and the :" @@ -740,7 +759,7 @@ msgid "" "`153259`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:595 +#: ../../../whatsnew/3.16.rst:638 msgid "" ":class:`tkinter.scrolledtext.ScrolledText` gained a *use_ttk* parameter to " "use the themed :mod:`tkinter.ttk` frame and scroll bar instead of the " @@ -748,7 +767,7 @@ msgid "" "`59396`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:600 +#: ../../../whatsnew/3.16.rst:643 msgid "" ":class:`tkinter.font.Font` can now wrap a font description without creating " "a new named font, by passing it as *font* with ``exists=True`` and no " @@ -757,14 +776,14 @@ msgid "" "metrics`. (Contributed by Serhiy Storchaka in :gh:`143990`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:606 +#: ../../../whatsnew/3.16.rst:649 msgid "" "Added the :mod:`tkinter.fontchooser` module which provides the :class:" "`~tkinter.fontchooser.FontChooser` class as an interface to the native font " "selection dialog. (Contributed by Serhiy Storchaka in :gh:`72880`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:611 +#: ../../../whatsnew/3.16.rst:654 msgid "" "Values of several Tcl object types returned by :mod:`tkinter` are now " "converted to the corresponding Python type instead of being wrapped in a :" @@ -774,11 +793,11 @@ msgid "" "Serhiy Storchaka in :gh:`153513`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:619 +#: ../../../whatsnew/3.16.rst:662 msgid "xml" msgstr "" -#: ../../../whatsnew/3.16.rst:621 +#: ../../../whatsnew/3.16.rst:664 msgid "" "Add support for multiple multi-byte encodings in the :mod:`XML parser `: \"cp932\", \"cp949\", \"cp950\", \"Big5\", \"EUC-JP\", " @@ -792,11 +811,31 @@ msgid "" "`62259`.)" msgstr "" -#: ../../../whatsnew/3.16.rst:634 +#: ../../../whatsnew/3.16.rst:676 +msgid "" +":mod:`xml.dom.minidom` now conforms closer to the DOM Level 1 specification. " +"It checks names passed to the factory methods, rejects inserting or setting " +"a node created by another document or making a node a descendant of itself, " +"rejects a second element or document type child of a document and a notation " +"child of a document fragment, reports attributes defaulted in the DTD and " +"whether an attribute was given in the start tag, and implements :class:`!" +"EntityReference` nodes and :meth:`!Document.createEntityReference`. " +"(Contributed by Jason Orendorff and Serhiy Storchaka in :gh:`44871`.)" +msgstr "" + +#: ../../../whatsnew/3.16.rst:688 +msgid "" +"Add :meth:`!GetSpecifiedAttributeCount` method to the :mod:`XML parser ` objects. It tells how many of the reported attributes were " +"given in the start tag rather than defaulted from the DTD. (Contributed by " +"Jason Orendorff and Serhiy Storchaka in :gh:`44871`.)" +msgstr "" + +#: ../../../whatsnew/3.16.rst:695 msgid "zipfile" msgstr "" -#: ../../../whatsnew/3.16.rst:636 +#: ../../../whatsnew/3.16.rst:697 msgid "" "Add :meth:`ZipFile.remove() ` to remove a member " "from an archive's central directory, and :meth:`ZipFile.repack()