From f9d5302669c65515e6f291957f04954c66b16da0 Mon Sep 17 00:00:00 2001 From: skpanagiotis Date: Sat, 18 Jul 2026 13:50:52 +0300 Subject: [PATCH 1/7] Sync to 3.13 --- Makefile | 2 +- about.po | 2 +- bugs.po | 7 +- c-api/abstract.po | 2 +- c-api/allocation.po | 32 +- c-api/apiabiversion.po | 2 +- c-api/arg.po | 2 +- c-api/bool.po | 2 +- c-api/buffer.po | 2 +- c-api/bytearray.po | 2 +- c-api/bytes.po | 31 +- c-api/call.po | 28 +- c-api/capsule.po | 2 +- c-api/cell.po | 2 +- c-api/code.po | 144 +- c-api/codec.po | 2 +- c-api/complex.po | 2 +- c-api/concrete.po | 2 +- c-api/contextvars.po | 2 +- c-api/conversion.po | 74 +- c-api/coro.po | 2 +- c-api/curses.po | 3 +- c-api/datetime.po | 2 +- c-api/descriptor.po | 172 +- c-api/dict.po | 201 +- c-api/exceptions.po | 446 +- c-api/file.po | 17 +- c-api/float.po | 6 +- c-api/frame.po | 91 +- c-api/function.po | 2 +- c-api/gcsupport.po | 43 +- c-api/gen.po | 18 +- c-api/hash.po | 2 +- c-api/import.po | 9 +- c-api/index.po | 2 +- c-api/init.po | 8 +- c-api/init_config.po | 4 +- c-api/intro.po | 484 +- c-api/iter.po | 2 +- c-api/iterator.po | 2 +- c-api/list.po | 45 +- c-api/long.po | 166 +- c-api/mapping.po | 2 +- c-api/marshal.po | 2 +- c-api/memory.po | 357 +- c-api/memoryview.po | 2 +- c-api/method.po | 2 +- c-api/module.po | 202 +- c-api/monitoring.po | 6 +- c-api/none.po | 2 +- c-api/number.po | 2 +- c-api/object.po | 111 +- c-api/objimpl.po | 2 +- c-api/perfmaps.po | 2 +- c-api/picklebuffer.po | 3 +- c-api/refcounting.po | 2 +- c-api/reflection.po | 2 +- c-api/sequence.po | 6 +- c-api/set.po | 8 +- c-api/slice.po | 2 +- c-api/stable.po | 2 +- c-api/structures.po | 4 +- c-api/sys.po | 2 +- c-api/time.po | 2 +- c-api/tuple.po | 71 +- c-api/type.po | 153 +- c-api/typehints.po | 6 +- c-api/typeobj.po | 894 +- c-api/unicode.po | 6 +- c-api/utilities.po | 2 +- c-api/veryhigh.po | 4 +- c-api/weakref.po | 10 +- contents.po | 2 +- copyright.po | 2 +- cpython | 2 +- deprecations/c-api-pending-removal-in-3.14.po | 2 +- deprecations/c-api-pending-removal-in-3.15.po | 2 +- deprecations/c-api-pending-removal-in-3.16.po | 3 +- .../c-api-pending-removal-in-future.po | 2 +- deprecations/index.po | 65 +- deprecations/pending-removal-in-3.13.po | 2 +- deprecations/pending-removal-in-3.14.po | 2 +- deprecations/pending-removal-in-3.15.po | 47 +- deprecations/pending-removal-in-3.16.po | 2 +- deprecations/pending-removal-in-3.17.po | 3 +- deprecations/pending-removal-in-3.18.po | 33 + deprecations/pending-removal-in-future.po | 2 +- distributing/index.po | 2 +- extending/building.po | 2 +- extending/embedding.po | 2 +- extending/extending.po | 263 +- extending/index.po | 2 +- extending/newtypes.po | 2 +- extending/newtypes_tutorial.po | 2 +- extending/windows.po | 2 +- faq/design.po | 228 +- faq/extending.po | 2 +- faq/general.po | 2 +- faq/gui.po | 2 +- faq/index.po | 2 +- faq/installed.po | 2 +- faq/library.po | 2 +- faq/programming.po | 1245 +- faq/windows.po | 2 +- glossary.po | 1216 +- howto/a-conceptual-overview-of-asyncio.po | 5 +- howto/annotations.po | 2 +- howto/argparse-optparse.po | 2 +- howto/argparse.po | 2 +- howto/clinic.po | 2 +- howto/cporting.po | 2 +- howto/curses.po | 7 +- howto/descriptor.po | 4 +- howto/enum.po | 340 +- howto/free-threading-extensions.po | 2 +- howto/free-threading-python.po | 2 +- howto/functional.po | 6 +- howto/gdb_helpers.po | 2 +- howto/index.po | 2 +- howto/instrumentation.po | 122 +- howto/ipaddress.po | 2 +- howto/isolating-extensions.po | 2 +- howto/logging-cookbook.po | 142 +- howto/logging.po | 10 +- howto/mro.po | 4 +- howto/perf_profiling.po | 2 +- howto/pyporting.po | 2 +- howto/regex.po | 66 +- howto/sockets.po | 2 +- howto/sorting.po | 2 +- howto/timerfd.po | 2 +- howto/unicode.po | 2 +- howto/urllib2.po | 4 +- installing/index.po | 232 +- library/__future__.po | 2 +- library/__main__.po | 2 +- library/_thread.po | 84 +- library/abc.po | 2 +- library/aifc.po | 2 +- library/allos.po | 2 +- library/archiving.po | 2 +- library/argparse.po | 705 +- library/array.po | 102 +- library/ast.po | 606 +- library/asynchat.po | 2 +- library/asyncio-api-index.po | 2 +- library/asyncio-dev.po | 294 +- library/asyncio-eventloop.po | 841 +- library/asyncio-exceptions.po | 2 +- library/asyncio-extending.po | 2 +- library/asyncio-future.po | 90 +- library/asyncio-llapi-index.po | 2 +- library/asyncio-platforms.po | 60 +- library/asyncio-policy.po | 2 +- library/asyncio-protocol.po | 4 +- library/asyncio-queue.po | 77 +- library/asyncio-runner.po | 2 +- library/asyncio-stream.po | 2 +- library/asyncio-subprocess.po | 41 +- library/asyncio-sync.po | 2 +- library/asyncio-task.po | 337 +- library/asyncio.po | 2 +- library/asyncore.po | 2 +- library/atexit.po | 2 +- library/audioop.po | 2 +- library/audit_events.po | 2 +- library/base64.po | 242 +- library/bdb.po | 2 +- library/binary.po | 2 +- library/binascii.po | 2 +- library/bisect.po | 8 +- library/builtins.po | 2 +- library/bz2.po | 2 +- library/calendar.po | 76 +- library/cgi.po | 2 +- library/cgitb.po | 2 +- library/chunk.po | 2 +- library/cmath.po | 2 +- library/cmd.po | 2 +- library/cmdline.po | 2 +- library/cmdlinelibs.po | 2 +- library/code.po | 2 +- library/codecs.po | 178 +- library/codeop.po | 2 +- library/collections.abc.po | 5 +- library/collections.po | 415 +- library/colorsys.po | 2 +- library/compileall.po | 2 +- library/concurrency.po | 2 +- library/concurrent.futures.po | 211 +- library/concurrent.po | 2 +- library/configparser.po | 2 +- library/constants.po | 8 +- library/contextlib.po | 260 +- library/contextvars.po | 111 +- library/copy.po | 38 +- library/copyreg.po | 2 +- library/crypt.po | 2 +- library/crypto.po | 2 +- library/csv.po | 249 +- library/ctypes.po | 1127 +- library/curses.ascii.po | 38 +- library/curses.panel.po | 64 +- library/curses.po | 1196 +- library/custominterp.po | 2 +- library/dataclasses.po | 304 +- library/datatypes.po | 2 +- library/datetime.po | 1629 +- library/dbm.po | 111 +- library/debug.po | 2 +- library/decimal.po | 824 +- library/development.po | 2 +- library/devmode.po | 2 +- library/dialog.po | 252 +- library/difflib.po | 18 +- library/dis.po | 4 +- library/distribution.po | 2 +- library/distutils.po | 2 +- library/doctest.po | 2 +- library/email.charset.po | 2 +- library/email.compat32-message.po | 2 +- library/email.contentmanager.po | 2 +- library/email.encoders.po | 2 +- library/email.errors.po | 2 +- library/email.examples.po | 2 +- library/email.generator.po | 2 +- library/email.header.po | 2 +- library/email.headerregistry.po | 171 +- library/email.iterators.po | 2 +- library/email.message.po | 13 +- library/email.mime.po | 2 +- library/email.parser.po | 4 +- library/email.po | 2 +- library/email.policy.po | 11 +- library/email.utils.po | 2 +- library/ensurepip.po | 2 +- library/enum.po | 464 +- library/errno.po | 2 +- library/exceptions.po | 59 +- library/faulthandler.po | 2 +- library/fcntl.po | 102 +- library/filecmp.po | 6 +- library/fileformats.po | 2 +- library/fileinput.po | 2 +- library/filesys.po | 2 +- library/fnmatch.po | 2 +- library/fractions.po | 2 +- library/frameworks.po | 2 +- library/ftplib.po | 2 +- library/functional.po | 2 +- library/functions.po | 863 +- library/functools.po | 4 +- library/gc.po | 2 +- library/getopt.po | 2 +- library/getpass.po | 2 +- library/gettext.po | 2 +- library/glob.po | 71 +- library/graphlib.po | 2 +- library/grp.po | 54 +- library/gzip.po | 2 +- library/hashlib.po | 2 +- library/heapq.po | 2 +- library/hmac.po | 2 +- library/html.entities.po | 2 +- library/html.parser.po | 37 +- library/html.po | 2 +- library/http.client.po | 136 +- library/http.cookiejar.po | 404 +- library/http.cookies.po | 6 +- library/http.po | 2 +- library/http.server.po | 333 +- library/i18n.po | 2 +- library/idle.po | 598 +- library/imaplib.po | 247 +- library/imghdr.po | 2 +- library/imp.po | 2 +- library/importlib.metadata.po | 2 +- library/importlib.po | 2 +- library/importlib.resources.abc.po | 56 +- library/importlib.resources.po | 114 +- library/index.po | 2 +- library/inspect.po | 618 +- library/internet.po | 2 +- library/intro.po | 2 +- library/io.po | 602 +- library/ipaddress.po | 8 +- library/ipc.po | 2 +- library/itertools.po | 27 +- library/json.po | 4 +- library/keyword.po | 2 +- library/language.po | 2 +- library/linecache.po | 2 +- library/locale.po | 332 +- library/logging.config.po | 2 +- library/logging.handlers.po | 2 +- library/logging.po | 352 +- library/lzma.po | 2 +- library/mailbox.po | 12 +- library/mailcap.po | 2 +- library/markup.po | 2 +- library/marshal.po | 2 +- library/math.po | 207 +- library/mimetypes.po | 2 +- library/mm.po | 2 +- library/mmap.po | 2 +- library/modulefinder.po | 2 +- library/modules.po | 2 +- library/msilib.po | 2 +- library/msvcrt.po | 94 +- library/multiprocessing.po | 1175 +- library/multiprocessing.shared_memory.po | 2 +- library/netdata.po | 2 +- library/netrc.po | 2 +- library/nis.po | 2 +- library/nntplib.po | 2 +- library/numbers.po | 50 +- library/numeric.po | 2 +- library/operator.po | 234 +- library/optparse.po | 2 +- library/os.path.po | 254 +- library/os.po | 2116 +- library/ossaudiodev.po | 2 +- library/pathlib.po | 387 +- library/pdb.po | 2 +- library/persistence.po | 2 +- library/pickle.po | 481 +- library/pickletools.po | 2 +- library/pipes.po | 2 +- library/pkgutil.po | 71 +- library/platform.po | 2 +- library/plistlib.po | 6 +- library/poplib.po | 2 +- library/posix.po | 42 +- library/pprint.po | 2 +- library/profile.po | 2 +- library/pty.po | 42 +- library/pwd.po | 72 +- library/py_compile.po | 2 +- library/pyclbr.po | 2 +- library/pydoc.po | 24 +- library/pyexpat.po | 319 +- library/python.po | 2 +- library/queue.po | 93 +- library/quopri.po | 2 +- library/random.po | 77 +- library/re.po | 649 +- library/readline.po | 115 +- library/removed.po | 2 +- library/reprlib.po | 2 +- library/resource.po | 226 +- library/rlcompleter.po | 2 +- library/runpy.po | 2 +- library/sched.po | 18 +- library/secrets.po | 73 +- library/security_warnings.po | 2 +- library/select.po | 561 +- library/selectors.po | 4 +- library/shelve.po | 4 +- library/shlex.po | 14 +- library/shutil.po | 254 +- library/signal.po | 278 +- library/site.po | 10 +- library/smtpd.po | 2 +- library/smtplib.po | 84 +- library/sndhdr.po | 2 +- library/socket.po | 962 +- library/socketserver.po | 2 +- library/spwd.po | 2 +- library/sqlite3.po | 446 +- library/ssl.po | 34 +- library/stat.po | 2 +- library/statistics.po | 2 +- library/stdtypes.po | 2784 +- library/string.po | 267 +- library/stringprep.po | 2 +- library/struct.po | 468 +- library/subprocess.po | 467 +- library/sunau.po | 2 +- library/superseded.po | 2 +- library/symtable.po | 2 +- library/sys.monitoring.po | 9 +- library/sys.po | 4 +- library/sys_path_init.po | 2 +- library/sysconfig.po | 2 +- library/syslog.po | 62 +- library/tabnanny.po | 2 +- library/tarfile.po | 2 +- library/telnetlib.po | 2 +- library/tempfile.po | 97 +- library/termios.po | 50 +- library/test.po | 462 +- library/text.po | 2 +- library/textwrap.po | 2 +- library/threading.po | 6 +- library/time.po | 2 +- library/timeit.po | 2 +- library/tk.po | 2 +- library/tkinter.colorchooser.po | 34 +- library/tkinter.dnd.po | 52 +- library/tkinter.font.po | 93 +- library/tkinter.messagebox.po | 63 +- library/tkinter.po | 7247 +- library/tkinter.scrolledtext.po | 26 +- library/tkinter.ttk.po | 1435 +- library/token.po | 2 +- library/tokenize.po | 2 +- library/tomllib.po | 89 +- library/trace.po | 4 +- library/traceback.po | 190 +- library/tracemalloc.po | 30 +- library/tty.po | 34 +- library/turtle.po | 2 +- library/types.po | 69 +- library/typing.po | 1282 +- library/unicodedata.po | 2 +- library/unittest.mock-examples.po | 34 +- library/unittest.mock.po | 6 +- library/unittest.po | 6 +- library/unix.po | 2 +- library/urllib.error.po | 2 +- library/urllib.parse.po | 495 +- library/urllib.po | 2 +- library/urllib.request.po | 240 +- library/urllib.robotparser.po | 20 +- library/uu.po | 2 +- library/uuid.po | 2 +- library/venv.po | 6 +- library/warnings.po | 54 +- library/wave.po | 52 +- library/weakref.po | 152 +- library/webbrowser.po | 2 +- library/windows.po | 2 +- library/winreg.po | 358 +- library/winsound.po | 74 +- library/wsgiref.po | 272 +- library/xdrlib.po | 2 +- library/xml.dom.minidom.po | 4 +- library/xml.dom.po | 2 +- library/xml.dom.pulldom.po | 2 +- library/xml.etree.elementtree.po | 2 +- library/xml.po | 2 +- library/xml.sax.handler.po | 174 +- library/xml.sax.po | 2 +- library/xml.sax.reader.po | 2 +- library/xml.sax.utils.po | 2 +- library/xmlrpc.client.po | 14 +- library/xmlrpc.po | 2 +- library/xmlrpc.server.po | 14 +- library/zipapp.po | 2 +- library/zipfile.po | 40 +- library/zipimport.po | 2 +- library/zlib.po | 2 +- library/zoneinfo.po | 170 +- license.po | 2 +- reference/compound_stmts.po | 817 +- reference/datamodel.po | 1573 +- reference/executionmodel.po | 273 +- reference/expressions.po | 2 +- reference/grammar.po | 2 +- reference/import.po | 381 +- reference/index.po | 2 +- reference/introduction.po | 2 +- reference/lexical_analysis.po | 2 +- reference/simple_stmts.po | 209 +- reference/toplevel_components.po | 2 +- sphinx.po | 143 +- tutorial/appendix.po | 2 +- tutorial/appetite.po | 2 +- tutorial/classes.po | 11 +- tutorial/controlflow.po | 145 +- tutorial/datastructures.po | 115 +- tutorial/errors.po | 7 +- tutorial/floatingpoint.po | 2 +- tutorial/index.po | 2 +- tutorial/inputoutput.po | 2 +- tutorial/interactive.po | 2 +- tutorial/interpreter.po | 19 +- tutorial/introduction.po | 14 +- tutorial/modules.po | 2 +- tutorial/stdlib.po | 45 +- tutorial/stdlib2.po | 104 +- tutorial/venv.po | 53 +- tutorial/whatnow.po | 6 +- using/android.po | 5 +- using/cmdline.po | 12 +- using/configure.po | 406 +- using/editors.po | 2 +- using/index.po | 2 +- using/ios.po | 2 +- using/mac.po | 2 +- using/unix.po | 2 +- using/windows.po | 9 +- whatsnew/2.0.po | 2 +- whatsnew/2.1.po | 2 +- whatsnew/2.2.po | 2 +- whatsnew/2.3.po | 16 +- whatsnew/2.4.po | 752 +- whatsnew/2.5.po | 1032 +- whatsnew/2.6.po | 6 +- whatsnew/2.7.po | 2 +- whatsnew/3.0.po | 2 +- whatsnew/3.1.po | 2 +- whatsnew/3.10.po | 24 +- whatsnew/3.11.po | 2 +- whatsnew/3.12.po | 47 +- whatsnew/3.13.po | 588 +- whatsnew/3.2.po | 10 +- whatsnew/3.3.po | 2 +- whatsnew/3.4.po | 16 +- whatsnew/3.5.po | 4 +- whatsnew/3.6.po | 6 +- whatsnew/3.7.po | 2 +- whatsnew/3.8.po | 1019 +- whatsnew/3.9.po | 16 +- whatsnew/changelog.po | 67793 +--------------- whatsnew/index.po | 2 +- 516 files changed, 34799 insertions(+), 92660 deletions(-) create mode 100644 deprecations/pending-removal-in-3.18.po diff --git a/Makefile b/Makefile index 6992b90b3..b9d7f0689 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ # from which we generated our po files. We use it here so when we # test build, we're building with the .rst files that generated our # .po files. -CPYTHON_CURRENT_COMMIT := 9756d8c63737042db611205b0c33c353d5dbd9c3 +CPYTHON_CURRENT_COMMIT := 9b2aca607c4ee59204031be709350624194b7c47 CPYTHON_PATH := ./cpython diff --git a/about.po b/about.po index 9ea7bcfd2..12b19ffea 100644 --- a/about.po +++ b/about.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: 2024-03-31 19:50+0000\n" "Last-Translator: Theofanis Petkos \n" "Language-Team: PyGreece \n" diff --git a/bugs.po b/bugs.po index c83cab978..b0343f64b 100644 --- a/bugs.po +++ b/bugs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: 2025-11-27 09:00+0200\n" "Last-Translator: Theofanis Petkos \n" "Language-Team: PyGreece \n" @@ -32,10 +32,11 @@ msgstr "" "ήθελαν να γνωρίζουν τυχόν ελλείψεις που βρίσκετε στην Python." #: bugs.rst:11 +#, fuzzy msgid "" "It can be sometimes faster to fix bugs yourself and contribute patches to " -"Python as it streamlines the process and involves less people. Learn how to :" -"ref:`contribute `." +"Python as it streamlines the process and involves fewer people. Learn how " +"to :ref:`contribute `." msgstr "" "Μερικές φορές μπορεί να είναι πιο γρήγορο να διορθώσετε μόνοι σας σφάλματα " "και να συνεισφέρετε ενημερώσεις στον κώδικα της Python μιας και " diff --git a/c-api/abstract.po b/c-api/abstract.po index 68aa56c4b..ed39245ee 100644 --- a/c-api/abstract.po +++ b/c-api/abstract.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/allocation.po b/c-api/allocation.po index 14424859c..739316c76 100644 --- a/c-api/allocation.po +++ b/c-api/allocation.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,7 +18,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: c-api/allocation.rst:6 -msgid "Allocating Objects on the Heap" +msgid "Allocating objects on the heap" msgstr "" #: c-api/allocation.rst:17 @@ -87,47 +87,47 @@ msgid "To allocate and create extension modules." msgstr "" #: c-api/allocation.rst:75 -msgid "Deprecated aliases" +msgid "Soft-deprecated aliases" msgstr "" -#: c-api/allocation.rst:77 +#: c-api/allocation.rst:79 msgid "" -"These are :term:`soft deprecated` aliases to existing functions and macros. " -"They exist solely for backwards compatibility." +"These are aliases to existing functions and macros. They exist solely for " +"backwards compatibility." msgstr "" -#: c-api/allocation.rst:85 -msgid "Deprecated alias" +#: c-api/allocation.rst:87 +msgid "Soft-deprecated alias" msgstr "" -#: c-api/allocation.rst:86 +#: c-api/allocation.rst:88 msgid "Function" msgstr "" -#: c-api/allocation.rst:88 +#: c-api/allocation.rst:90 msgid ":c:macro:`PyObject_New`" msgstr "" -#: c-api/allocation.rst:90 +#: c-api/allocation.rst:92 msgid ":c:macro:`PyObject_NewVar`" msgstr "" -#: c-api/allocation.rst:92 +#: c-api/allocation.rst:94 msgid ":c:func:`PyObject_Init`" msgstr "" -#: c-api/allocation.rst:94 +#: c-api/allocation.rst:96 msgid ":c:func:`PyObject_InitVar`" msgstr "" -#: c-api/allocation.rst:96 +#: c-api/allocation.rst:98 msgid ":c:func:`PyObject_Malloc`" msgstr "" -#: c-api/allocation.rst:98 +#: c-api/allocation.rst:100 msgid ":c:func:`PyObject_Realloc`" msgstr "" -#: c-api/allocation.rst:102 c-api/allocation.rst:104 +#: c-api/allocation.rst:104 c-api/allocation.rst:106 msgid ":c:func:`PyObject_Free`" msgstr "" diff --git a/c-api/apiabiversion.po b/c-api/apiabiversion.po index 7ba2f9ca8..5907d09f1 100644 --- a/c-api/apiabiversion.po +++ b/c-api/apiabiversion.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/arg.po b/c-api/arg.po index a5783f393..357744421 100644 --- a/c-api/arg.po +++ b/c-api/arg.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/bool.po b/c-api/bool.po index a723df099..d302231e4 100644 --- a/c-api/bool.po +++ b/c-api/bool.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/buffer.po b/c-api/buffer.po index 500de2b50..17358b6c9 100644 --- a/c-api/buffer.po +++ b/c-api/buffer.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/bytearray.po b/c-api/bytearray.po index 4342b38f5..8cfd092c9 100644 --- a/c-api/bytearray.po +++ b/c-api/bytearray.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/bytes.po b/c-api/bytes.po index 765d0effd..6b94dba4d 100644 --- a/c-api/bytes.po +++ b/c-api/bytes.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -299,20 +299,21 @@ msgstr "" #: c-api/bytes.rst:178 msgid "" "Create a new bytes object in *\\*bytes* containing the contents of *newpart* " -"appended to *bytes*; the caller will own the new reference. The reference " -"to the old value of *bytes* will be stolen. If the new object cannot be " -"created, the old reference to *bytes* will still be discarded and the value " -"of *\\*bytes* will be set to ``NULL``; the appropriate exception will be set." +"appended to *bytes*; the caller will own the new reference. The reference to " +"the old value of *bytes* will be \":term:`stolen `\". If the new " +"object cannot be created, the old reference to *bytes* will still be " +"\"stolen\", the value of *\\*bytes* will be set to ``NULL``, and the " +"appropriate exception will be set." msgstr "" -#: c-api/bytes.rst:187 +#: c-api/bytes.rst:188 msgid "" "Create a new bytes object in *\\*bytes* containing the contents of *newpart* " "appended to *bytes*. This version releases the :term:`strong reference` to " "*newpart* (i.e. decrements its reference count)." msgstr "" -#: c-api/bytes.rst:194 +#: c-api/bytes.rst:195 msgid "" "Resize a bytes object. *newsize* will be the new length of the bytes object. " "You can think of it as creating a new bytes object and destroying the old " @@ -324,19 +325,19 @@ msgid "" "``NULL``, :exc:`MemoryError` is set, and ``-1`` is returned." msgstr "" -#: c-api/bytes.rst:208 +#: c-api/bytes.rst:209 msgid "" "Get the string representation of *bytes*. This function is currently used to " "implement :meth:`!bytes.__repr__` in Python." msgstr "" -#: c-api/bytes.rst:211 +#: c-api/bytes.rst:212 msgid "" "This function does not do type checking; it is undefined behavior to pass " "*bytes* as a non-bytes object or ``NULL``." msgstr "" -#: c-api/bytes.rst:214 +#: c-api/bytes.rst:215 msgid "" "If *smartquotes* is true, the representation will use a double-quoted string " "instead of single-quoted string when single-quotes are present in *bytes*. " @@ -345,33 +346,33 @@ msgid "" "is false." msgstr "" -#: c-api/bytes.rst:220 +#: c-api/bytes.rst:221 msgid "" "On success, this function returns a :term:`strong reference` to a :class:" "`str` object containing the representation. On failure, this returns " "``NULL`` with an exception set." msgstr "" -#: c-api/bytes.rst:227 +#: c-api/bytes.rst:228 msgid "" "Unescape a backslash-escaped string *s*. *s* must not be ``NULL``. *len* " "must be the size of *s*." msgstr "" -#: c-api/bytes.rst:230 +#: c-api/bytes.rst:231 msgid "" "*errors* must be one of ``\"strict\"``, ``\"replace\"``, or ``\"ignore\"``. " "If *errors* is ``NULL``, then ``\"strict\"`` is used by default." msgstr "" -#: c-api/bytes.rst:233 +#: c-api/bytes.rst:234 msgid "" "On success, this function returns a :term:`strong reference` to a Python :" "class:`bytes` object containing the unescaped string. On failure, this " "function returns ``NULL`` with an exception set." msgstr "" -#: c-api/bytes.rst:237 +#: c-api/bytes.rst:238 msgid "*unicode* and *recode_encoding* are now unused." msgstr "" diff --git a/c-api/call.po b/c-api/call.po index b417df722..e9087c96e 100644 --- a/c-api/call.po +++ b/c-api/call.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -395,7 +395,7 @@ msgid "" msgstr "" #: c-api/call.rst:237 c-api/call.rst:259 c-api/call.rst:291 c-api/call.rst:324 -#: c-api/call.rst:345 c-api/call.rst:392 +#: c-api/call.rst:345 c-api/call.rst:399 msgid "" "Return the result of the call on success, or raise an exception and return " "*NULL* on failure." @@ -508,21 +508,31 @@ msgid "" "*name*." msgstr "" -#: c-api/call.rst:353 +#: c-api/call.rst:355 msgid "" "Call a callable Python object *callable*. The arguments are the same as for :" "c:type:`vectorcallfunc`. If *callable* supports vectorcall_, this directly " "calls the vectorcall function stored in *callable*." msgstr "" -#: c-api/call.rst:365 +#: c-api/call.rst:363 +msgid "as ``_PyObject_Vectorcall``" +msgstr "" + +#: c-api/call.rst:367 +msgid "" +"Renamed to the current name, without the leading underscore. The old " +"provisional name is :term:`soft deprecated`." +msgstr "" + +#: c-api/call.rst:372 msgid "" "Call *callable* with positional arguments passed exactly as in the " "vectorcall_ protocol, but with keyword arguments passed as a dictionary " "*kwdict*. The *args* array contains only the positional arguments." msgstr "" -#: c-api/call.rst:369 +#: c-api/call.rst:376 msgid "" "Regardless of which protocol is used internally, a conversion of arguments " "needs to be done. Therefore, this function should only be used if the caller " @@ -530,7 +540,7 @@ msgid "" "tuple for the positional arguments." msgstr "" -#: c-api/call.rst:379 +#: c-api/call.rst:386 msgid "" "Call a method using the vectorcall calling convention. The name of the " "method is given as a Python string *name*. The object whose method is called " @@ -542,17 +552,17 @@ msgid "" "`PyObject_Vectorcall`." msgstr "" -#: c-api/call.rst:388 +#: c-api/call.rst:395 msgid "" "If the object has the :c:macro:`Py_TPFLAGS_METHOD_DESCRIPTOR` feature, this " "will call the unbound method object with the full *args* vector as arguments." msgstr "" -#: c-api/call.rst:399 +#: c-api/call.rst:406 msgid "Call Support API" msgstr "" -#: c-api/call.rst:403 +#: c-api/call.rst:410 msgid "" "Determine if the object *o* is callable. Return ``1`` if the object is " "callable and ``0`` otherwise. This function always succeeds." diff --git a/c-api/capsule.po b/c-api/capsule.po index 6f34748f9..c7f4f40f1 100644 --- a/c-api/capsule.po +++ b/c-api/capsule.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/cell.po b/c-api/cell.po index 2d0726d29..29476f81e 100644 --- a/c-api/cell.po +++ b/c-api/cell.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/code.po b/c-api/code.po index fbf55d8bb..0aaf7e757 100644 --- a/c-api/code.po +++ b/c-api/code.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -94,80 +94,80 @@ msgid "" "is deprecated, but will remain available until the signature changes again." msgstr "" -#: c-api/code.rst:74 +#: c-api/code.rst:77 msgid "" "Similar to :c:func:`PyUnstable_Code_New`, but with an extra " "\"posonlyargcount\" for positional-only arguments. The same caveats that " "apply to ``PyUnstable_Code_New`` also apply to this function." msgstr "" -#: c-api/code.rst:79 +#: c-api/code.rst:80 msgid "as ``PyCode_NewWithPosOnlyArgs``" msgstr "" -#: c-api/code.rst:81 +#: c-api/code.rst:82 msgid "Added ``qualname`` and ``exceptiontable`` parameters." msgstr "" -#: c-api/code.rst:86 +#: c-api/code.rst:87 msgid "" "Renamed to ``PyUnstable_Code_NewWithPosOnlyArgs``. The old name is " "deprecated, but will remain available until the signature changes again." msgstr "" -#: c-api/code.rst:92 +#: c-api/code.rst:93 msgid "" "Return a new empty code object with the specified filename, function name, " "and first line number. The resulting code object will raise an ``Exception`` " "if executed." msgstr "" -#: c-api/code.rst:98 +#: c-api/code.rst:99 msgid "" "Return the line number of the instruction that occurs on or before " "``byte_offset`` and ends after it. If you just need the line number of a " "frame, use :c:func:`PyFrame_GetLineNumber` instead." msgstr "" -#: c-api/code.rst:101 +#: c-api/code.rst:102 msgid "" "For efficiently iterating over the line numbers in a code object, use :pep:" "`the API described in PEP 626 <0626#out-of-process-debuggers-and-profilers>`." msgstr "" -#: c-api/code.rst:106 +#: c-api/code.rst:107 msgid "" "Sets the passed ``int`` pointers to the source code line and column numbers " "for the instruction at ``byte_offset``. Sets the value to ``0`` when " "information is not available for any particular element." msgstr "" -#: c-api/code.rst:110 +#: c-api/code.rst:111 msgid "Returns ``1`` if the function succeeds and 0 otherwise." msgstr "" -#: c-api/code.rst:116 +#: c-api/code.rst:117 msgid "" "Equivalent to the Python code ``getattr(co, 'co_code')``. Returns a strong " "reference to a :c:type:`PyBytesObject` representing the bytecode in a code " "object. On error, ``NULL`` is returned and an exception is raised." msgstr "" -#: c-api/code.rst:121 +#: c-api/code.rst:122 msgid "" "This ``PyBytesObject`` may be created on-demand by the interpreter and does " "not necessarily represent the bytecode actually executed by CPython. The " "primary use case for this function is debuggers and profilers." msgstr "" -#: c-api/code.rst:129 +#: c-api/code.rst:130 msgid "" "Equivalent to the Python code ``getattr(co, 'co_varnames')``. Returns a new " "reference to a :c:type:`PyTupleObject` containing the names of the local " "variables. On error, ``NULL`` is returned and an exception is raised." msgstr "" -#: c-api/code.rst:138 +#: c-api/code.rst:139 msgid "" "Equivalent to the Python code ``getattr(co, 'co_cellvars')``. Returns a new " "reference to a :c:type:`PyTupleObject` containing the names of the local " @@ -175,7 +175,7 @@ msgid "" "returned and an exception is raised." msgstr "" -#: c-api/code.rst:147 +#: c-api/code.rst:148 msgid "" "Equivalent to the Python code ``getattr(co, 'co_freevars')``. Returns a new " "reference to a :c:type:`PyTupleObject` containing the names of the :term:" @@ -183,7 +183,7 @@ msgid "" "returned and an exception is raised." msgstr "" -#: c-api/code.rst:156 +#: c-api/code.rst:157 msgid "" "Register *callback* as a code object watcher for the current interpreter. " "Return an ID which may be passed to :c:func:`PyCode_ClearWatcher`. In case " @@ -191,7 +191,7 @@ msgid "" "exception." msgstr "" -#: c-api/code.rst:165 +#: c-api/code.rst:166 msgid "" "Clear watcher identified by *watcher_id* previously returned from :c:func:" "`PyCode_AddWatcher` for the current interpreter. Return ``0`` on success, or " @@ -199,17 +199,17 @@ msgid "" "never registered.)" msgstr "" -#: c-api/code.rst:174 +#: c-api/code.rst:175 msgid "" "Enumeration of possible code object watcher events: - " "``PY_CODE_EVENT_CREATE`` - ``PY_CODE_EVENT_DESTROY``" msgstr "" -#: c-api/code.rst:182 +#: c-api/code.rst:183 msgid "Type of a code object watcher callback function." msgstr "" -#: c-api/code.rst:184 +#: c-api/code.rst:185 msgid "" "If *event* is ``PY_CODE_EVENT_CREATE``, then the callback is invoked after " "*co* has been fully initialized. Otherwise, the callback is invoked before " @@ -217,7 +217,7 @@ msgid "" "inspected." msgstr "" -#: c-api/code.rst:189 +#: c-api/code.rst:190 msgid "" "If *event* is ``PY_CODE_EVENT_DESTROY``, taking a reference in the callback " "to the about-to-be-destroyed code object will resurrect it and prevent it " @@ -225,7 +225,7 @@ msgid "" "later, any watcher callbacks active at that time will be called again." msgstr "" -#: c-api/code.rst:194 +#: c-api/code.rst:195 msgid "" "Users of this API should not rely on internal runtime implementation " "details. Such details may include, but are not limited to, the exact order " @@ -235,14 +235,14 @@ msgid "" "the Python code being executed." msgstr "" -#: c-api/code.rst:201 +#: c-api/code.rst:202 msgid "" "If the callback sets an exception, it must return ``-1``; this exception " "will be printed as an unraisable exception using :c:func:" "`PyErr_WriteUnraisable`. Otherwise it should return ``0``." msgstr "" -#: c-api/code.rst:205 +#: c-api/code.rst:206 msgid "" "There may already be a pending exception set on entry to the callback. In " "this case, the callback should return ``0`` with the same exception still " @@ -251,25 +251,25 @@ msgid "" "it before returning." msgstr "" -#: c-api/code.rst:216 +#: c-api/code.rst:217 msgid "This is a :term:`soft deprecated` function that does nothing." msgstr "" -#: c-api/code.rst:218 +#: c-api/code.rst:219 msgid "" "Prior to Python 3.10, this function would perform basic optimizations to a " "code object." msgstr "" -#: c-api/code.rst:221 +#: c-api/code.rst:222 msgid "This function now does nothing." msgstr "" -#: c-api/code.rst:228 +#: c-api/code.rst:229 msgid "Code Object Flags" msgstr "" -#: c-api/code.rst:230 +#: c-api/code.rst:231 msgid "" "Code objects contain a bit-field of flags, which can be retrieved as the :" "attr:`~codeobject.co_flags` Python attribute (for example using :c:func:" @@ -277,7 +277,7 @@ msgid "" "`PyUnstable_Code_New` and similar functions." msgstr "" -#: c-api/code.rst:235 +#: c-api/code.rst:236 msgid "" "Flags whose names start with ``CO_FUTURE_`` correspond to features normally " "selectable by :ref:`future statements `. These flags can be used in :" @@ -285,163 +285,163 @@ msgid "" "mandatory in current versions of Python, and setting them has no effect." msgstr "" -#: c-api/code.rst:241 +#: c-api/code.rst:242 msgid "" "The following flags are available. For their meaning, see the linked " "documentation of their Python equivalents." msgstr "" -#: c-api/code.rst:249 +#: c-api/code.rst:250 msgid "Flag" msgstr "" -#: c-api/code.rst:250 +#: c-api/code.rst:251 msgid "Meaning" msgstr "" -#: c-api/code.rst:252 +#: c-api/code.rst:253 msgid ":py:data:`inspect.CO_OPTIMIZED`" msgstr "" -#: c-api/code.rst:254 +#: c-api/code.rst:255 msgid ":py:data:`inspect.CO_NEWLOCALS`" msgstr "" -#: c-api/code.rst:256 +#: c-api/code.rst:257 msgid ":py:data:`inspect.CO_VARARGS`" msgstr "" -#: c-api/code.rst:258 +#: c-api/code.rst:259 msgid ":py:data:`inspect.CO_VARKEYWORDS`" msgstr "" -#: c-api/code.rst:260 +#: c-api/code.rst:261 msgid ":py:data:`inspect.CO_NESTED`" msgstr "" -#: c-api/code.rst:262 +#: c-api/code.rst:263 msgid ":py:data:`inspect.CO_GENERATOR`" msgstr "" -#: c-api/code.rst:264 +#: c-api/code.rst:265 msgid ":py:data:`inspect.CO_COROUTINE`" msgstr "" -#: c-api/code.rst:266 +#: c-api/code.rst:267 msgid ":py:data:`inspect.CO_ITERABLE_COROUTINE`" msgstr "" -#: c-api/code.rst:268 +#: c-api/code.rst:269 msgid ":py:data:`inspect.CO_ASYNC_GENERATOR`" msgstr "" -#: c-api/code.rst:271 +#: c-api/code.rst:272 msgid "no effect (:py:data:`__future__.division`)" msgstr "" -#: c-api/code.rst:273 +#: c-api/code.rst:274 msgid "no effect (:py:data:`__future__.absolute_import`)" msgstr "" -#: c-api/code.rst:275 +#: c-api/code.rst:276 msgid "no effect (:py:data:`__future__.with_statement`)" msgstr "" -#: c-api/code.rst:277 +#: c-api/code.rst:278 msgid "no effect (:py:data:`__future__.print_function`)" msgstr "" -#: c-api/code.rst:279 +#: c-api/code.rst:280 msgid "no effect (:py:data:`__future__.unicode_literals`)" msgstr "" -#: c-api/code.rst:281 +#: c-api/code.rst:282 msgid "no effect (:py:data:`__future__.generator_stop`)" msgstr "" -#: c-api/code.rst:283 +#: c-api/code.rst:284 msgid ":py:data:`__future__.annotations`" msgstr "" -#: c-api/code.rst:287 +#: c-api/code.rst:288 msgid "Extra information" msgstr "" -#: c-api/code.rst:289 +#: c-api/code.rst:290 msgid "" "To support low-level extensions to frame evaluation, such as external just-" "in-time compilers, it is possible to attach arbitrary extra data to code " "objects." msgstr "" -#: c-api/code.rst:293 +#: c-api/code.rst:294 msgid "" "These functions are part of the unstable C API tier: this functionality is a " "CPython implementation detail, and the API may change without deprecation " "warnings." msgstr "" -#: c-api/code.rst:299 +#: c-api/code.rst:303 msgid "Return a new opaque index value used to adding data to code objects." msgstr "" -#: c-api/code.rst:301 +#: c-api/code.rst:305 msgid "" "You generally call this function once (per interpreter) and use the result " "with ``PyCode_GetExtra`` and ``PyCode_SetExtra`` to manipulate data on " "individual code objects." msgstr "" -#: c-api/code.rst:305 +#: c-api/code.rst:309 msgid "" "If *free* is not ``NULL``: when a code object is deallocated, *free* will be " "called on non-``NULL`` data stored under the new index. Use :c:func:" "`Py_DecRef` when storing :c:type:`PyObject`." msgstr "" -#: c-api/code.rst:311 +#: c-api/code.rst:313 msgid "as ``_PyEval_RequestCodeExtraIndex``" msgstr "" -#: c-api/code.rst:315 +#: c-api/code.rst:317 msgid "" "Renamed to ``PyUnstable_Eval_RequestCodeExtraIndex``. The old private name " "is deprecated, but will be available until the API changes." msgstr "" -#: c-api/code.rst:321 +#: c-api/code.rst:326 msgid "" "Set *extra* to the extra data stored under the given index. Return 0 on " "success. Set an exception and return -1 on failure." msgstr "" -#: c-api/code.rst:324 +#: c-api/code.rst:329 msgid "" "If no data was set under the index, set *extra* to ``NULL`` and return 0 " "without setting an exception." msgstr "" -#: c-api/code.rst:329 +#: c-api/code.rst:332 msgid "as ``_PyCode_GetExtra``" msgstr "" -#: c-api/code.rst:333 +#: c-api/code.rst:336 msgid "" "Renamed to ``PyUnstable_Code_GetExtra``. The old private name is deprecated, " "but will be available until the API changes." msgstr "" -#: c-api/code.rst:339 +#: c-api/code.rst:345 msgid "" "Set the extra data stored under the given index to *extra*. Return 0 on " "success. Set an exception and return -1 on failure." msgstr "" -#: c-api/code.rst:344 +#: c-api/code.rst:348 msgid "as ``_PyCode_SetExtra``" msgstr "" -#: c-api/code.rst:348 +#: c-api/code.rst:352 msgid "" "Renamed to ``PyUnstable_Code_SetExtra``. The old private name is deprecated, " "but will be available until the API changes." @@ -462,19 +462,3 @@ msgstr "" #: c-api/code.rst:64 msgid "PyCode_New (C function)" msgstr "" - -#: c-api/code.rst:77 -msgid "PyCode_NewWithPosOnlyArgs (C function)" -msgstr "" - -#: c-api/code.rst:309 -msgid "_PyEval_RequestCodeExtraIndex (C function)" -msgstr "" - -#: c-api/code.rst:327 -msgid "_PyCode_GetExtra (C function)" -msgstr "" - -#: c-api/code.rst:342 -msgid "_PyCode_SetExtra (C function)" -msgstr "" diff --git a/c-api/codec.po b/c-api/codec.po index 9e7e5e048..6ed86a67d 100644 --- a/c-api/codec.po +++ b/c-api/codec.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/complex.po b/c-api/complex.po index c443d3b64..111f66707 100644 --- a/c-api/complex.po +++ b/c-api/complex.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/concrete.po b/c-api/concrete.po index 43d794d16..97546f012 100644 --- a/c-api/concrete.po +++ b/c-api/concrete.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/contextvars.po b/c-api/contextvars.po index 779e8eaae..0dc6369e5 100644 --- a/c-api/contextvars.po +++ b/c-api/contextvars.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/conversion.po b/c-api/conversion.po index 7b85b615f..39e2f345a 100644 --- a/c-api/conversion.po +++ b/c-api/conversion.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -193,131 +193,149 @@ msgstr "" msgid "*flags* can be zero or more of the following values or-ed together:" msgstr "" -#: c-api/conversion.rst:135 +#: c-api/conversion.rst:137 msgid "" "Always precede the returned string with a sign character, even if *val* is " "non-negative." msgstr "" -#: c-api/conversion.rst:140 +#: c-api/conversion.rst:142 msgid "Ensure that the returned string will not look like an integer." msgstr "" -#: c-api/conversion.rst:144 +#: c-api/conversion.rst:146 msgid "" "Apply \"alternate\" formatting rules. See the documentation for the :c:func:" "`PyOS_snprintf` ``'#'`` specifier for details." msgstr "" -#: c-api/conversion.rst:150 +#: c-api/conversion.rst:152 msgid "Negative zero is converted to positive zero." msgstr "" -#: c-api/conversion.rst:154 +#: c-api/conversion.rst:156 msgid "" "If *ptype* is non-``NULL``, then the value it points to will be set to one " -"of ``Py_DTST_FINITE``, ``Py_DTST_INFINITE``, or ``Py_DTST_NAN``, signifying " -"that *val* is a finite number, an infinite number, or not a number, " -"respectively." +"of the following constants depending on the type of *val*:" +msgstr "" + +#: c-api/conversion.rst:163 +msgid "*\\*ptype*" +msgstr "" + +#: c-api/conversion.rst:164 +msgid "type of *val*" +msgstr "" + +#: c-api/conversion.rst:166 +msgid "finite number" +msgstr "" + +#: c-api/conversion.rst:168 +msgid "infinite number" msgstr "" -#: c-api/conversion.rst:158 +#: c-api/conversion.rst:170 +msgid "not a number" +msgstr "" + +#: c-api/conversion.rst:172 msgid "" "The return value is a pointer to *buffer* with the converted string or " "``NULL`` if the conversion failed. The caller is responsible for freeing the " "returned string by calling :c:func:`PyMem_Free`." msgstr "" -#: c-api/conversion.rst:168 +#: c-api/conversion.rst:182 msgid "" "Case insensitive comparison of strings. These functions work almost " "identically to :c:func:`!strcmp` and :c:func:`!strncmp` (respectively), " "except that they ignore the case of ASCII characters." msgstr "" -#: c-api/conversion.rst:172 +#: c-api/conversion.rst:186 msgid "" "Return ``0`` if the strings are equal, a negative value if *str1* sorts " "lexicographically before *str2*, or a positive value if it sorts after." msgstr "" -#: c-api/conversion.rst:175 +#: c-api/conversion.rst:189 msgid "" "In the *str1* or *str2* arguments, a NUL byte marks the end of the string. " "For :c:func:`!PyOS_mystrnicmp`, the *size* argument gives the maximum size " "of the string, as if NUL was present at the index given by *size*." msgstr "" -#: c-api/conversion.rst:179 +#: c-api/conversion.rst:193 msgid "These functions do not use the locale." msgstr "" -#: c-api/conversion.rst:185 +#: c-api/conversion.rst:199 msgid "Case insensitive comparison of strings." msgstr "" -#: c-api/conversion.rst:187 +#: c-api/conversion.rst:201 msgid "" "On Windows, these are aliases of :c:func:`!stricmp` and :c:func:`!strnicmp`, " "respectively." msgstr "" -#: c-api/conversion.rst:190 +#: c-api/conversion.rst:204 msgid "" "On other platforms, they are aliases of :c:func:`PyOS_mystricmp` and :c:func:" "`PyOS_mystrnicmp`, respectively." msgstr "" -#: c-api/conversion.rst:195 +#: c-api/conversion.rst:209 msgid "Character classification and conversion" msgstr "" -#: c-api/conversion.rst:197 +#: c-api/conversion.rst:211 msgid "" "The following macros provide locale-independent (unlike the C standard " "library ``ctype.h``) character classification and conversion. The argument " "must be a signed or unsigned :c:expr:`char`." msgstr "" -#: c-api/conversion.rst:204 +#: c-api/conversion.rst:218 msgid "Return true if the character *c* is an alphanumeric character." msgstr "" -#: c-api/conversion.rst:209 +#: c-api/conversion.rst:223 msgid "" "Return true if the character *c* is an alphabetic character (``a-z`` and ``A-" "Z``)." msgstr "" -#: c-api/conversion.rst:214 +#: c-api/conversion.rst:228 msgid "Return true if the character *c* is a decimal digit (``0-9``)." msgstr "" -#: c-api/conversion.rst:219 +#: c-api/conversion.rst:233 msgid "Return true if the character *c* is a lowercase ASCII letter (``a-z``)." msgstr "" -#: c-api/conversion.rst:224 +#: c-api/conversion.rst:238 msgid "" "Return true if the character *c* is an uppercase ASCII letter (``A-Z``)." msgstr "" -#: c-api/conversion.rst:229 +#: c-api/conversion.rst:243 msgid "" "Return true if the character *c* is a whitespace character (space, tab, " "carriage return, newline, vertical tab, or form feed)." msgstr "" -#: c-api/conversion.rst:235 +#: c-api/conversion.rst:249 msgid "" "Return true if the character *c* is a hexadecimal digit (``0-9``, ``a-f``, " "and ``A-F``)." msgstr "" -#: c-api/conversion.rst:241 +#: c-api/conversion.rst:255 msgid "Return the lowercase equivalent of the character *c*." msgstr "" -#: c-api/conversion.rst:246 +#: c-api/conversion.rst:260 msgid "Return the uppercase equivalent of the character *c*." msgstr "" diff --git a/c-api/coro.po b/c-api/coro.po index a815775ea..c0ed321a1 100644 --- a/c-api/coro.po +++ b/c-api/coro.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/curses.po b/c-api/curses.po index 70ab7c18a..e5a84ff5d 100644 --- a/c-api/curses.po +++ b/c-api/curses.po @@ -8,10 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\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/c-api/datetime.po b/c-api/datetime.po index 79f5601a7..88f7e49dc 100644 --- a/c-api/datetime.po +++ b/c-api/datetime.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/descriptor.po b/c-api/descriptor.po index 3ee8ab227..7c63457c6 100644 --- a/c-api/descriptor.po +++ b/c-api/descriptor.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -27,59 +27,209 @@ msgid "" "are found in the dictionary of type objects." msgstr "" -#: c-api/descriptor.rst:15 +#: c-api/descriptor.rst:13 msgid "The type object for the built-in descriptor types." msgstr "" -#: c-api/descriptor.rst:35 +#: c-api/descriptor.rst:18 +msgid "" +"Create a new get-set descriptor for extension type *type* from the :c:type:" +"`PyGetSetDef` structure *getset*." +msgstr "" + +#: c-api/descriptor.rst:21 +msgid "" +"Get-set descriptors expose attributes implemented by C getter and setter " +"functions rather than stored directly in the instance. This is the same kind " +"of descriptor created for entries in :c:member:`~PyTypeObject.tp_getset`, " +"and it appears in Python as a :class:`types.GetSetDescriptorType` object." +msgstr "" + +#: c-api/descriptor.rst:39 c-api/descriptor.rst:101 c-api/descriptor.rst:123 +msgid "" +"On success, return a :term:`strong reference` to the descriptor. Return " +"``NULL`` with an exception set on failure." +msgstr "" + +#: c-api/descriptor.rst:31 +msgid "" +"Create a new member descriptor for extension type *type* from the :c:type:" +"`PyMemberDef` structure *member*." +msgstr "" + +#: c-api/descriptor.rst:34 +msgid "" +"Member descriptors expose fields in the type's C struct as Python " +"attributes. This is the same kind of descriptor created for entries in :c:" +"member:`~PyTypeObject.tp_members`, and it appears in Python as a :class:" +"`types.MemberDescriptorType` object." +msgstr "" + +#: c-api/descriptor.rst:44 +msgid "" +"The type object for member descriptor objects created from :c:type:" +"`PyMemberDef` structures. These descriptors expose fields of a C struct as " +"attributes on a type, and correspond to :class:`types.MemberDescriptorType` " +"objects in Python." +msgstr "" + +#: c-api/descriptor.rst:53 +msgid "" +"The type object for get/set descriptor objects created from :c:type:" +"`PyGetSetDef` structures. These descriptors implement attributes whose value " +"is computed by C getter and setter functions, and are used for many built-in " +"type attributes. They correspond to :class:`types.GetSetDescriptorType` " +"objects in Python." +msgstr "" + +#: c-api/descriptor.rst:62 +msgid "" +"Create a new method descriptor for extension type *type* from the :c:type:" +"`PyMethodDef` structure *meth*." +msgstr "" + +#: c-api/descriptor.rst:65 +msgid "" +"Method descriptors expose C functions as methods on a type. This is the same " +"kind of descriptor created for entries in :c:member:`~PyTypeObject." +"tp_methods`, and it appears in Python as a :class:`types." +"MethodDescriptorType` object." +msgstr "" + +#: c-api/descriptor.rst:75 +msgid "" +"The type object for method descriptor objects created from :c:type:" +"`PyMethodDef` structures. These descriptors expose C functions as methods on " +"a type, and correspond to :class:`types.MethodDescriptorType` objects in " +"Python." +msgstr "" + +#: c-api/descriptor.rst:83 +msgid "Describes a slot wrapper used by :c:func:`PyDescr_NewWrapper`." +msgstr "" + +#: c-api/descriptor.rst:85 +msgid "" +"Each ``wrapperbase`` record stores the Python-visible name and metadata for " +"a special method implemented by a type slot, together with the wrapper " +"function used to adapt that slot to Python's calling convention." +msgstr "" + +#: c-api/descriptor.rst:91 +msgid "" +"Create a new wrapper descriptor for extension type *type* from the :c:struct:" +"`wrapperbase` structure *base* and the wrapped slot function pointer " +"*wrapped*." +msgstr "" + +#: c-api/descriptor.rst:96 +msgid "" +"Wrapper descriptors expose special methods implemented by type slots. This " +"is the same kind of descriptor that CPython creates for slot-based special " +"methods such as ``__repr__`` or ``__add__``, and it appears in Python as a :" +"class:`types.WrapperDescriptorType` object." +msgstr "" + +#: c-api/descriptor.rst:106 +msgid "" +"The type object for wrapper descriptor objects created by :c:func:" +"`PyDescr_NewWrapper` and :c:func:`PyWrapper_New`. Wrapper descriptors are " +"used internally to expose special methods implemented via wrapper " +"structures, and appear in Python as :class:`types.WrapperDescriptorType` " +"objects." +msgstr "" + +#: c-api/descriptor.rst:115 +msgid "" +"Create a new class method descriptor for extension type *type* from the :c:" +"type:`PyMethodDef` structure *method*." +msgstr "" + +#: c-api/descriptor.rst:118 +msgid "" +"Class method descriptors expose C methods that receive the class rather than " +"an instance when accessed. This is the same kind of descriptor created for " +"``METH_CLASS`` entries in :c:member:`~PyTypeObject.tp_methods`, and it " +"appears in Python as a :class:`types.ClassMethodDescriptorType` object." +msgstr "" + +#: c-api/descriptor.rst:128 msgid "" "Return non-zero if the descriptor object *descr* describes a data attribute, " "or ``0`` if it describes a method. *descr* must be a descriptor object; " "there is no error checking." msgstr "" -#: c-api/descriptor.rst:44 +#: c-api/descriptor.rst:135 +msgid "" +"Create a new bound wrapper object from the wrapper descriptor *d* and the " +"instance *self*." +msgstr "" + +#: c-api/descriptor.rst:138 +msgid "" +"This is the bound form of a wrapper descriptor created by :c:func:" +"`PyDescr_NewWrapper`. CPython creates these objects when a slot wrapper is " +"accessed through an instance, and they appear in Python as :class:`types." +"MethodWrapperType` objects." +msgstr "" + +#: c-api/descriptor.rst:143 +msgid "" +"On success, return a :term:`strong reference` to the wrapper object. Return " +"``NULL`` with an exception set on failure." +msgstr "" + +#: c-api/descriptor.rst:147 msgid "Built-in descriptors" msgstr "" -#: c-api/descriptor.rst:48 +#: c-api/descriptor.rst:151 msgid "" "The type object for super objects. This is the same object as :class:`super` " "in the Python layer." msgstr "" -#: c-api/descriptor.rst:54 +#: c-api/descriptor.rst:157 msgid "" "The type of class method objects. This is the same object as :class:" "`classmethod` in the Python layer." msgstr "" -#: c-api/descriptor.rst:60 +#: c-api/descriptor.rst:163 +msgid "" +"The type object for C-level class method descriptor objects. This is the " +"type of the descriptors created for :func:`classmethod` defined in C " +"extension types, and corresponds to :class:`types.ClassMethodDescriptorType` " +"objects in Python." +msgstr "" + +#: c-api/descriptor.rst:171 msgid "" "Create a new :class:`classmethod` object wrapping *callable*. *callable* " "must be a callable object and must not be ``NULL``." msgstr "" -#: c-api/descriptor.rst:63 +#: c-api/descriptor.rst:174 msgid "" "On success, this function returns a :term:`strong reference` to a new class " "method descriptor. On failure, this function returns ``NULL`` with an " "exception set." msgstr "" -#: c-api/descriptor.rst:70 +#: c-api/descriptor.rst:181 msgid "" "The type of static method objects. This is the same object as :class:" "`staticmethod` in the Python layer." msgstr "" -#: c-api/descriptor.rst:76 +#: c-api/descriptor.rst:187 msgid "" "Create a new :class:`staticmethod` object wrapping *callable*. *callable* " "must be a callable object and must not be ``NULL``." msgstr "" -#: c-api/descriptor.rst:79 +#: c-api/descriptor.rst:190 msgid "" "On success, this function returns a :term:`strong reference` to a new static " "method descriptor. On failure, this function returns ``NULL`` with an " diff --git a/c-api/dict.po b/c-api/dict.po index b09ddd071..4122a4dd9 100644 --- a/c-api/dict.po +++ b/c-api/dict.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -56,43 +56,53 @@ msgid "" msgstr "" #: c-api/dict.rst:48 +msgid "" +"The type object for mapping proxy objects created by :c:func:" +"`PyDictProxy_New` and for the read-only ``__dict__`` attribute of many built-" +"in types. A :c:type:`PyDictProxy_Type` instance provides a dynamic, read-" +"only view of an underlying dictionary: changes to the underlying dictionary " +"are reflected in the proxy, but the proxy itself does not support mutation " +"operations. This corresponds to :class:`types.MappingProxyType` in Python." +msgstr "" + +#: c-api/dict.rst:59 msgid "Empty an existing dictionary of all key-value pairs." msgstr "" -#: c-api/dict.rst:53 +#: c-api/dict.rst:64 msgid "" "Determine if dictionary *p* contains *key*. If an item in *p* matches " "*key*, return ``1``, otherwise return ``0``. On error, return ``-1``. This " "is equivalent to the Python expression ``key in p``." msgstr "" -#: c-api/dict.rst:60 +#: c-api/dict.rst:71 msgid "" "This is the same as :c:func:`PyDict_Contains`, but *key* is specified as a :" "c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" "`PyObject*`." msgstr "" -#: c-api/dict.rst:69 +#: c-api/dict.rst:80 msgid "Return a new dictionary that contains the same key-value pairs as *p*." msgstr "" -#: c-api/dict.rst:74 +#: c-api/dict.rst:85 msgid "" "Insert *val* into the dictionary *p* with a key of *key*. *key* must be :" "term:`hashable`; if it isn't, :exc:`TypeError` will be raised. Return ``0`` " -"on success or ``-1`` on failure. This function *does not* steal a reference " -"to *val*." +"on success or ``-1`` on failure. This function *does not* \":term:`steal`\" " +"a reference to *val*." msgstr "" -#: c-api/dict.rst:82 +#: c-api/dict.rst:93 msgid "" "This is the same as :c:func:`PyDict_SetItem`, but *key* is specified as a :c:" "expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" "`PyObject*`." msgstr "" -#: c-api/dict.rst:89 +#: c-api/dict.rst:100 msgid "" "Remove the entry in dictionary *p* with key *key*. *key* must be :term:" "`hashable`; if it isn't, :exc:`TypeError` is raised. If *key* is not in the " @@ -100,72 +110,73 @@ msgid "" "failure." msgstr "" -#: c-api/dict.rst:97 +#: c-api/dict.rst:108 msgid "" "This is the same as :c:func:`PyDict_DelItem`, but *key* is specified as a :c:" "expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" "`PyObject*`." msgstr "" -#: c-api/dict.rst:104 +#: c-api/dict.rst:115 msgid "" "Return a new :term:`strong reference` to the object from dictionary *p* " "which has a key *key*:" msgstr "" -#: c-api/dict.rst:107 +#: c-api/dict.rst:118 msgid "" "If the key is present, set *\\*result* to a new :term:`strong reference` to " "the value and return ``1``." msgstr "" -#: c-api/dict.rst:109 +#: c-api/dict.rst:120 msgid "If the key is missing, set *\\*result* to ``NULL`` and return ``0``." msgstr "" -#: c-api/dict.rst:207 -msgid "On error, raise an exception and return ``-1``." +#: c-api/dict.rst:121 +msgid "" +"On error, raise an exception, set *\\*result* to ``NULL`` and return ``-1``." msgstr "" -#: c-api/dict.rst:114 +#: c-api/dict.rst:125 msgid "See also the :c:func:`PyObject_GetItem` function." msgstr "" -#: c-api/dict.rst:119 +#: c-api/dict.rst:130 msgid "" "Return a :term:`borrowed reference` to the object from dictionary *p* which " "has a key *key*. Return ``NULL`` if the key *key* is missing *without* " "setting an exception." msgstr "" -#: c-api/dict.rst:125 +#: c-api/dict.rst:136 msgid "" "Exceptions that occur while this calls :meth:`~object.__hash__` and :meth:" "`~object.__eq__` methods are silently ignored. Prefer the :c:func:" "`PyDict_GetItemWithError` function instead." msgstr "" -#: c-api/dict.rst:129 +#: c-api/dict.rst:140 msgid "" "Calling this API without :term:`GIL` held had been allowed for historical " "reason. It is no longer allowed." msgstr "" -#: c-api/dict.rst:136 +#: c-api/dict.rst:147 msgid "" "Variant of :c:func:`PyDict_GetItem` that does not suppress exceptions. " "Return ``NULL`` **with** an exception set if an exception occurred. Return " "``NULL`` **without** an exception set if the key wasn't present." msgstr "" -#: c-api/dict.rst:144 +#: c-api/dict.rst:155 msgid "" "This is the same as :c:func:`PyDict_GetItem`, but *key* is specified as a :c:" "expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" "`PyObject*`." msgstr "" -#: c-api/dict.rst:150 +#: c-api/dict.rst:161 msgid "" "Exceptions that occur while this calls :meth:`~object.__hash__` and :meth:" "`~object.__eq__` methods or while creating the temporary :class:`str` object " @@ -173,13 +184,13 @@ msgid "" "function with your own :c:func:`PyUnicode_FromString` *key* instead." msgstr "" -#: c-api/dict.rst:159 +#: c-api/dict.rst:170 msgid "" "Similar to :c:func:`PyDict_GetItemRef`, but *key* is specified as a :c:expr:" "`const char*` UTF-8 encoded bytes string, rather than a :c:expr:`PyObject*`." msgstr "" -#: c-api/dict.rst:168 +#: c-api/dict.rst:179 msgid "" "This is the same as the Python-level :meth:`dict.setdefault`. If present, " "it returns the value corresponding to *key* from the dictionary *p*. If the " @@ -189,7 +200,7 @@ msgid "" "the insertion." msgstr "" -#: c-api/dict.rst:179 +#: c-api/dict.rst:190 msgid "" "Inserts *default_value* into the dictionary *p* with a key of *key* if the " "key is not already present in the dictionary. If *result* is not ``NULL``, " @@ -201,7 +212,7 @@ msgid "" "exception, and sets ``*result`` to ``NULL``." msgstr "" -#: c-api/dict.rst:189 +#: c-api/dict.rst:200 msgid "" "For clarity: if you have a strong reference to *default_value* before " "calling this function, then after it returns, you hold a strong reference to " @@ -209,63 +220,67 @@ msgid "" "to the same object: in that case you hold two separate references to it." msgstr "" -#: c-api/dict.rst:200 +#: c-api/dict.rst:211 msgid "" "Remove *key* from dictionary *p* and optionally return the removed value. Do " "not raise :exc:`KeyError` if the key is missing." msgstr "" -#: c-api/dict.rst:203 +#: c-api/dict.rst:214 msgid "" "If the key is present, set *\\*result* to a new reference to the removed " "value if *result* is not ``NULL``, and return ``1``." msgstr "" -#: c-api/dict.rst:205 +#: c-api/dict.rst:216 msgid "" "If the key is missing, set *\\*result* to ``NULL`` if *result* is not " "``NULL``, and return ``0``." msgstr "" -#: c-api/dict.rst:209 +#: c-api/dict.rst:218 +msgid "On error, raise an exception and return ``-1``." +msgstr "" + +#: c-api/dict.rst:220 msgid "" "Similar to :meth:`dict.pop`, but without the default value and not raising :" "exc:`KeyError` if the key is missing." msgstr "" -#: c-api/dict.rst:217 +#: c-api/dict.rst:228 msgid "" "Similar to :c:func:`PyDict_Pop`, but *key* is specified as a :c:expr:`const " "char*` UTF-8 encoded bytes string, rather than a :c:expr:`PyObject*`." msgstr "" -#: c-api/dict.rst:226 +#: c-api/dict.rst:237 msgid "" "Return a :c:type:`PyListObject` containing all the items from the dictionary." msgstr "" -#: c-api/dict.rst:231 +#: c-api/dict.rst:242 msgid "" "Return a :c:type:`PyListObject` containing all the keys from the dictionary." msgstr "" -#: c-api/dict.rst:236 +#: c-api/dict.rst:247 msgid "" "Return a :c:type:`PyListObject` containing all the values from the " "dictionary *p*." msgstr "" -#: c-api/dict.rst:244 +#: c-api/dict.rst:255 msgid "" "Return the number of items in the dictionary. This is equivalent to " "``len(p)`` on a dictionary." msgstr "" -#: c-api/dict.rst:250 +#: c-api/dict.rst:261 msgid "Similar to :c:func:`PyDict_Size`, but without error checking." msgstr "" -#: c-api/dict.rst:255 +#: c-api/dict.rst:266 msgid "" "Iterate over all key-value pairs in the dictionary *p*. The :c:type:" "`Py_ssize_t` referred to by *ppos* must be initialized to ``0`` prior to the " @@ -279,11 +294,11 @@ msgid "" "structure is sparse, the offsets are not consecutive." msgstr "" -#: c-api/dict.rst:266 +#: c-api/dict.rst:277 msgid "For example::" msgstr "" -#: c-api/dict.rst:268 +#: c-api/dict.rst:279 msgid "" "PyObject *key, *value;\n" "Py_ssize_t pos = 0;\n" @@ -294,14 +309,14 @@ msgid "" "}" msgstr "" -#: c-api/dict.rst:276 +#: c-api/dict.rst:287 msgid "" "The dictionary *p* should not be mutated during iteration. It is safe to " "modify the values of the keys as you iterate over the dictionary, but only " "so long as the set of keys does not change. For example::" msgstr "" -#: c-api/dict.rst:280 +#: c-api/dict.rst:291 msgid "" "PyObject *key, *value;\n" "Py_ssize_t pos = 0;\n" @@ -322,14 +337,14 @@ msgid "" "}" msgstr "" -#: c-api/dict.rst:298 +#: c-api/dict.rst:309 msgid "" "The function is not thread-safe in the :term:`free-threaded ` build without external synchronization. You can use :c:macro:" "`Py_BEGIN_CRITICAL_SECTION` to lock the dictionary while iterating over it::" msgstr "" -#: c-api/dict.rst:303 +#: c-api/dict.rst:314 msgid "" "Py_BEGIN_CRITICAL_SECTION(self->dict);\n" "while (PyDict_Next(self->dict, &pos, &key, &value)) {\n" @@ -338,7 +353,7 @@ msgid "" "Py_END_CRITICAL_SECTION();" msgstr "" -#: c-api/dict.rst:312 +#: c-api/dict.rst:323 msgid "" "Iterate over mapping object *b* adding key-value pairs to dictionary *a*. " "*b* may be a dictionary, or any object supporting :c:func:`PyMapping_Keys` " @@ -348,7 +363,7 @@ msgid "" "or ``-1`` if an exception was raised." msgstr "" -#: c-api/dict.rst:322 +#: c-api/dict.rst:333 msgid "" "This is the same as ``PyDict_Merge(a, b, 1)`` in C, and is similar to ``a." "update(b)`` in Python except that :c:func:`PyDict_Update` doesn't fall back " @@ -357,7 +372,7 @@ msgid "" "exception was raised." msgstr "" -#: c-api/dict.rst:331 +#: c-api/dict.rst:342 msgid "" "Update or merge into dictionary *a*, from the key-value pairs in *seq2*. " "*seq2* must be an iterable object producing iterable objects of length 2, " @@ -366,7 +381,7 @@ msgid "" "if an exception was raised. Equivalent Python (except for the return value)::" msgstr "" -#: c-api/dict.rst:338 +#: c-api/dict.rst:349 msgid "" "def PyDict_MergeFromSeq2(a, seq2, override):\n" " for key, value in seq2:\n" @@ -374,7 +389,7 @@ msgid "" " a[key] = value" msgstr "" -#: c-api/dict.rst:345 +#: c-api/dict.rst:356 msgid "" "Register *callback* as a dictionary watcher. Return a non-negative integer " "id which must be passed to future calls to :c:func:`PyDict_Watch`. In case " @@ -382,21 +397,21 @@ msgid "" "exception." msgstr "" -#: c-api/dict.rst:354 +#: c-api/dict.rst:365 msgid "" "Clear watcher identified by *watcher_id* previously returned from :c:func:" "`PyDict_AddWatcher`. Return ``0`` on success, ``-1`` on error (e.g. if the " "given *watcher_id* was never registered.)" msgstr "" -#: c-api/dict.rst:362 +#: c-api/dict.rst:373 msgid "" "Mark dictionary *dict* as watched. The callback granted *watcher_id* by :c:" "func:`PyDict_AddWatcher` will be called when *dict* is modified or " "deallocated. Return ``0`` on success or ``-1`` on error." msgstr "" -#: c-api/dict.rst:370 +#: c-api/dict.rst:381 msgid "" "Mark dictionary *dict* as no longer watched. The callback granted " "*watcher_id* by :c:func:`PyDict_AddWatcher` will no longer be called when " @@ -404,7 +419,7 @@ msgid "" "watched by this watcher. Return ``0`` on success or ``-1`` on error." msgstr "" -#: c-api/dict.rst:379 +#: c-api/dict.rst:390 msgid "" "Enumeration of possible dictionary watcher events: ``PyDict_EVENT_ADDED``, " "``PyDict_EVENT_MODIFIED``, ``PyDict_EVENT_DELETED``, " @@ -412,11 +427,11 @@ msgid "" "``PyDict_EVENT_DEALLOCATED``." msgstr "" -#: c-api/dict.rst:387 +#: c-api/dict.rst:398 msgid "Type of a dict watcher callback function." msgstr "" -#: c-api/dict.rst:389 +#: c-api/dict.rst:400 msgid "" "If *event* is ``PyDict_EVENT_CLEARED`` or ``PyDict_EVENT_DEALLOCATED``, both " "*key* and *new_value* will be ``NULL``. If *event* is ``PyDict_EVENT_ADDED`` " @@ -425,7 +440,7 @@ msgid "" "dictionary and *new_value* will be ``NULL``." msgstr "" -#: c-api/dict.rst:395 +#: c-api/dict.rst:406 msgid "" "``PyDict_EVENT_CLONED`` occurs when *dict* was previously empty and another " "dict is merged into it. To maintain efficiency of this operation, per-key " @@ -433,14 +448,14 @@ msgid "" "``PyDict_EVENT_CLONED`` is issued, and *key* will be the source dictionary." msgstr "" -#: c-api/dict.rst:401 +#: c-api/dict.rst:412 msgid "" "The callback may inspect but must not modify *dict*; doing so could have " "unpredictable effects, including infinite recursion. Do not trigger Python " "code execution in the callback, as it could modify the dict as a side effect." msgstr "" -#: c-api/dict.rst:405 +#: c-api/dict.rst:416 msgid "" "If *event* is ``PyDict_EVENT_DEALLOCATED``, taking a new reference in the " "callback to the about-to-be-destroyed dictionary will resurrect it and " @@ -449,20 +464,20 @@ msgid "" "again." msgstr "" -#: c-api/dict.rst:411 +#: c-api/dict.rst:422 msgid "" "Callbacks occur before the notified modification to *dict* takes place, so " "the prior state of *dict* can be inspected." msgstr "" -#: c-api/dict.rst:414 +#: c-api/dict.rst:425 msgid "" "If the callback sets an exception, it must return ``-1``; this exception " "will be printed as an unraisable exception using :c:func:" "`PyErr_WriteUnraisable`. Otherwise it should return ``0``." msgstr "" -#: c-api/dict.rst:418 +#: c-api/dict.rst:429 msgid "" "There may already be a pending exception set on entry to the callback. In " "this case, the callback should return ``0`` with the same exception still " @@ -471,157 +486,157 @@ msgid "" "it before returning." msgstr "" -#: c-api/dict.rst:428 +#: c-api/dict.rst:439 msgid "Dictionary View Objects" msgstr "" -#: c-api/dict.rst:432 +#: c-api/dict.rst:443 msgid "" "Return true if *op* is a view of a set inside a dictionary. This is " "currently equivalent to :c:expr:`PyDictKeys_Check(op) || " "PyDictItems_Check(op)`. This function always succeeds." msgstr "" -#: c-api/dict.rst:439 +#: c-api/dict.rst:450 msgid "" "Type object for a view of dictionary keys. In Python, this is the type of " "the object returned by :meth:`dict.keys`." msgstr "" -#: c-api/dict.rst:445 +#: c-api/dict.rst:456 msgid "" "Return true if *op* is an instance of a dictionary keys view. This function " "always succeeds." msgstr "" -#: c-api/dict.rst:451 +#: c-api/dict.rst:462 msgid "" "Type object for a view of dictionary values. In Python, this is the type of " "the object returned by :meth:`dict.values`." msgstr "" -#: c-api/dict.rst:457 +#: c-api/dict.rst:468 msgid "" "Return true if *op* is an instance of a dictionary values view. This " "function always succeeds." msgstr "" -#: c-api/dict.rst:463 +#: c-api/dict.rst:474 msgid "" "Type object for a view of dictionary items. In Python, this is the type of " "the object returned by :meth:`dict.items`." msgstr "" -#: c-api/dict.rst:469 +#: c-api/dict.rst:480 msgid "" "Return true if *op* is an instance of a dictionary items view. This function " "always succeeds." msgstr "" -#: c-api/dict.rst:474 +#: c-api/dict.rst:485 msgid "Ordered Dictionaries" msgstr "" -#: c-api/dict.rst:476 +#: c-api/dict.rst:487 msgid "" "Python's C API provides interface for :class:`collections.OrderedDict` from " "C. Since Python 3.7, dictionaries are ordered by default, so there is " "usually little need for these functions; prefer ``PyDict*`` where possible." msgstr "" -#: c-api/dict.rst:483 +#: c-api/dict.rst:494 msgid "" "Type object for ordered dictionaries. This is the same object as :class:" "`collections.OrderedDict` in the Python layer." msgstr "" -#: c-api/dict.rst:489 +#: c-api/dict.rst:500 msgid "" "Return true if *od* is an ordered dictionary object or an instance of a " "subtype of the :class:`~collections.OrderedDict` type. This function always " "succeeds." msgstr "" -#: c-api/dict.rst:496 +#: c-api/dict.rst:507 msgid "" "Return true if *od* is an ordered dictionary object, but not an instance of " "a subtype of the :class:`~collections.OrderedDict` type. This function " "always succeeds." msgstr "" -#: c-api/dict.rst:503 +#: c-api/dict.rst:514 msgid "Analogous to :c:type:`PyDictKeys_Type` for ordered dictionaries." msgstr "" -#: c-api/dict.rst:508 +#: c-api/dict.rst:519 msgid "Analogous to :c:type:`PyDictValues_Type` for ordered dictionaries." msgstr "" -#: c-api/dict.rst:513 +#: c-api/dict.rst:524 msgid "Analogous to :c:type:`PyDictItems_Type` for ordered dictionaries." msgstr "" -#: c-api/dict.rst:518 +#: c-api/dict.rst:529 msgid "Return a new empty ordered dictionary, or ``NULL`` on failure." msgstr "" -#: c-api/dict.rst:520 +#: c-api/dict.rst:531 msgid "This is analogous to :c:func:`PyDict_New`." msgstr "" -#: c-api/dict.rst:525 +#: c-api/dict.rst:536 msgid "" "Insert *value* into the ordered dictionary *od* with a key of *key*. Return " "``0`` on success or ``-1`` with an exception set on failure." msgstr "" -#: c-api/dict.rst:528 +#: c-api/dict.rst:539 msgid "This is analogous to :c:func:`PyDict_SetItem`." msgstr "" -#: c-api/dict.rst:533 +#: c-api/dict.rst:544 msgid "" "Remove the entry in the ordered dictionary *od* with key *key*. Return ``0`` " "on success or ``-1`` with an exception set on failure." msgstr "" -#: c-api/dict.rst:536 +#: c-api/dict.rst:547 msgid "This is analogous to :c:func:`PyDict_DelItem`." msgstr "" -#: c-api/dict.rst:539 +#: c-api/dict.rst:550 msgid "These are :term:`soft deprecated` aliases to ``PyDict`` APIs:" msgstr "" -#: c-api/dict.rst:546 +#: c-api/dict.rst:557 msgid "``PyODict``" msgstr "" -#: c-api/dict.rst:547 +#: c-api/dict.rst:558 msgid "``PyDict``" msgstr "" -#: c-api/dict.rst:549 +#: c-api/dict.rst:560 msgid ":c:func:`PyDict_GetItem`" msgstr "" -#: c-api/dict.rst:551 +#: c-api/dict.rst:562 msgid ":c:func:`PyDict_GetItemWithError`" msgstr "" -#: c-api/dict.rst:553 +#: c-api/dict.rst:564 msgid ":c:func:`PyDict_GetItemString`" msgstr "" -#: c-api/dict.rst:555 +#: c-api/dict.rst:566 msgid ":c:func:`PyDict_Contains`" msgstr "" -#: c-api/dict.rst:557 +#: c-api/dict.rst:568 msgid ":c:func:`PyDict_Size`" msgstr "" -#: c-api/dict.rst:559 +#: c-api/dict.rst:570 msgid ":c:func:`PyDict_GET_SIZE`" msgstr "" @@ -633,10 +648,10 @@ msgstr "" msgid "dictionary" msgstr "" -#: c-api/dict.rst:242 +#: c-api/dict.rst:253 msgid "built-in function" msgstr "" -#: c-api/dict.rst:242 +#: c-api/dict.rst:253 msgid "len" msgstr "" diff --git a/c-api/exceptions.po b/c-api/exceptions.po index 3f9f98197..145c96386 100644 --- a/c-api/exceptions.po +++ b/c-api/exceptions.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -431,7 +431,7 @@ msgstr "" #: c-api/exceptions.rst:415 msgid "" -"Function similar to :c:func:`PyErr_WarnEx`, but use :c:func:" +"Function similar to :c:func:`PyErr_WarnEx`, but uses :c:func:" "`PyUnicode_FromFormat` to format the warning message. *format* is an ASCII-" "encoded string." msgstr "" @@ -502,7 +502,7 @@ msgid "" "needs to save and restore the error indicator temporarily." msgstr "" -#: c-api/exceptions.rst:527 +#: c-api/exceptions.rst:528 msgid "For example::" msgstr "" @@ -530,14 +530,16 @@ msgid "" msgstr "" #: c-api/exceptions.rst:506 -msgid "This call steals a reference to *exc*, which must be a valid exception." +msgid "" +"This call \":term:`steals `\" a reference to *exc*, which must be a " +"valid exception." msgstr "" -#: c-api/exceptions.rst:515 +#: c-api/exceptions.rst:516 msgid "Use :c:func:`PyErr_GetRaisedException` instead." msgstr "" -#: c-api/exceptions.rst:517 +#: c-api/exceptions.rst:518 msgid "" "Retrieve the error indicator into three variables whose addresses are " "passed. If the error indicator is not set, set all three variables to " @@ -546,13 +548,13 @@ msgid "" "the type object is not." msgstr "" -#: c-api/exceptions.rst:524 +#: c-api/exceptions.rst:525 msgid "" "This function is normally only used by legacy code that needs to catch " "exceptions or save and restore the error indicator temporarily." msgstr "" -#: c-api/exceptions.rst:529 +#: c-api/exceptions.rst:530 msgid "" "{\n" " PyObject *type, *value, *traceback;\n" @@ -564,11 +566,11 @@ msgid "" "}" msgstr "" -#: c-api/exceptions.rst:543 +#: c-api/exceptions.rst:544 msgid "Use :c:func:`PyErr_SetRaisedException` instead." msgstr "" -#: c-api/exceptions.rst:545 +#: c-api/exceptions.rst:546 msgid "" "Set the error indicator from the three objects, *type*, *value*, and " "*traceback*, clearing the existing exception if one is set. If the objects " @@ -581,20 +583,20 @@ msgid "" "don't use this function. I warned you.)" msgstr "" -#: c-api/exceptions.rst:559 +#: c-api/exceptions.rst:560 msgid "" "This function is normally only used by legacy code that needs to save and " "restore the error indicator temporarily. Use :c:func:`PyErr_Fetch` to save " "the current error indicator." msgstr "" -#: c-api/exceptions.rst:568 +#: c-api/exceptions.rst:569 msgid "" "Use :c:func:`PyErr_GetRaisedException` instead, to avoid any possible de-" "normalization." msgstr "" -#: c-api/exceptions.rst:571 +#: c-api/exceptions.rst:572 msgid "" "Under certain circumstances, the values returned by :c:func:`PyErr_Fetch` " "below can be \"unnormalized\", meaning that ``*exc`` is a class object but " @@ -604,21 +606,21 @@ msgid "" "improve performance." msgstr "" -#: c-api/exceptions.rst:579 +#: c-api/exceptions.rst:580 msgid "" "This function *does not* implicitly set the :attr:`~BaseException." "__traceback__` attribute on the exception value. If setting the traceback " "appropriately is desired, the following additional snippet is needed::" msgstr "" -#: c-api/exceptions.rst:584 +#: c-api/exceptions.rst:585 msgid "" "if (tb != NULL) {\n" " PyException_SetTraceback(val, tb);\n" "}" msgstr "" -#: c-api/exceptions.rst:591 +#: c-api/exceptions.rst:592 msgid "" "Retrieve the active exception instance, as would be returned by :func:`sys." "exception`. This refers to an exception that was *already caught*, not to an " @@ -626,7 +628,7 @@ msgid "" "or ``NULL``. Does not modify the interpreter's exception state." msgstr "" -#: c-api/exceptions.rst:598 +#: c-api/exceptions.rst:599 msgid "" "This function is not normally used by code that wants to handle exceptions. " "Rather, it can be used when code needs to save and restore the exception " @@ -634,14 +636,14 @@ msgid "" "clear the exception state." msgstr "" -#: c-api/exceptions.rst:607 +#: c-api/exceptions.rst:608 msgid "" "Set the active exception, as known from ``sys.exception()``. This refers to " "an exception that was *already caught*, not to an exception that was freshly " "raised. To clear the exception state, pass ``NULL``." msgstr "" -#: c-api/exceptions.rst:614 +#: c-api/exceptions.rst:615 msgid "" "This function is not normally used by code that wants to handle exceptions. " "Rather, it can be used when code needs to save and restore the exception " @@ -649,7 +651,7 @@ msgid "" "exception state." msgstr "" -#: c-api/exceptions.rst:623 +#: c-api/exceptions.rst:624 msgid "" "Retrieve the old-style representation of the exception info, as known from :" "func:`sys.exc_info`. This refers to an exception that was *already caught*, " @@ -659,7 +661,7 @@ msgid "" "using :c:func:`PyErr_GetHandledException`." msgstr "" -#: c-api/exceptions.rst:632 +#: c-api/exceptions.rst:633 msgid "" "This function is not normally used by code that wants to handle exceptions. " "Rather, it can be used when code needs to save and restore the exception " @@ -667,17 +669,17 @@ msgid "" "exception state." msgstr "" -#: c-api/exceptions.rst:642 +#: c-api/exceptions.rst:643 msgid "" "Set the exception info, as known from ``sys.exc_info()``. This refers to an " "exception that was *already caught*, not to an exception that was freshly " -"raised. This function steals the references of the arguments. To clear the " -"exception state, pass ``NULL`` for all three arguments. This function is " -"kept for backwards compatibility. Prefer using :c:func:" -"`PyErr_SetHandledException`." +"raised. This function \":term:`steals `\" the references of the " +"arguments. To clear the exception state, pass ``NULL`` for all three " +"arguments. This function is kept for backwards compatibility. Prefer using :" +"c:func:`PyErr_SetHandledException`." msgstr "" -#: c-api/exceptions.rst:651 +#: c-api/exceptions.rst:653 msgid "" "This function is not normally used by code that wants to handle exceptions. " "Rather, it can be used when code needs to save and restore the exception " @@ -685,76 +687,101 @@ msgid "" "state." msgstr "" -#: c-api/exceptions.rst:658 +#: c-api/exceptions.rst:660 msgid "" "The ``type`` and ``traceback`` arguments are no longer used and can be NULL. " "The interpreter now derives them from the exception instance (the ``value`` " -"argument). The function still steals references of all three arguments." +"argument). The function still \":term:`steals `\" references of all " +"three arguments." msgstr "" -#: c-api/exceptions.rst:666 +#: c-api/exceptions.rst:668 msgid "Signal Handling" msgstr "" -#: c-api/exceptions.rst:676 -msgid "This function interacts with Python's signal handling." -msgstr "" - #: c-api/exceptions.rst:678 msgid "" -"If the function is called from the main thread and under the main Python " -"interpreter, it checks whether a signal has been sent to the processes and " -"if so, invokes the corresponding signal handler. If the :mod:`signal` " -"module is supported, this can invoke a signal handler written in Python." +"Handle external interruptions, such as signals or activating a debugger, " +"whose processing has been delayed until it is safe to run Python code and/or " +"raise exceptions." msgstr "" -#: c-api/exceptions.rst:683 +#: c-api/exceptions.rst:682 msgid "" -"The function attempts to handle all pending signals, and then returns ``0``. " -"However, if a Python signal handler raises an exception, the error indicator " -"is set and the function returns ``-1`` immediately (such that other pending " -"signals may not have been handled yet: they will be on the next :c:func:" -"`PyErr_CheckSignals()` invocation)." +"For example, pressing :kbd:`Ctrl-C` causes a terminal to send the :py:data:" +"`signal.SIGINT` signal. This function executes the corresponding Python " +"signal handler, which, by default, raises the :exc:`KeyboardInterrupt` " +"exception." msgstr "" -#: c-api/exceptions.rst:689 +#: c-api/exceptions.rst:687 msgid "" -"If the function is called from a non-main thread, or under a non-main Python " -"interpreter, it does nothing and returns ``0``." +":c:func:`!PyErr_CheckSignals` should be called by long-running C code " +"frequently enough so that the response appears immediate to humans." +msgstr "" + +#: c-api/exceptions.rst:690 +msgid "Handlers invoked by this function currently include:" msgstr "" #: c-api/exceptions.rst:692 msgid "" -"This function can be called by long-running C code that wants to be " -"interruptible by user requests (such as by pressing Ctrl-C)." +"Signal handlers, including Python functions registered using the :mod:" +"`signal` module." msgstr "" -#: c-api/exceptions.rst:696 +#: c-api/exceptions.rst:695 msgid "" -"The default Python signal handler for :c:macro:`!SIGINT` raises the :exc:" -"`KeyboardInterrupt` exception." +"Signal handlers are only run in the main thread of the main interpreter." +msgstr "" + +#: c-api/exceptions.rst:697 +msgid "" +"(This is where the function got the name: originally, signals were the only " +"way to interrupt the interpreter.)" +msgstr "" + +#: c-api/exceptions.rst:700 +msgid "Running the garbage collector, if necessary." +msgstr "" + +#: c-api/exceptions.rst:702 +msgid "" +"If any handler raises an exception, immediately return ``-1`` with that " +"exception set. Any remaining interruptions are left to be processed on the " +"next :c:func:`PyErr_CheckSignals()` invocation, if appropriate." msgstr "" #: c-api/exceptions.rst:707 msgid "" +"If all handlers finish successfully, or there are no handlers to run, return " +"``0``." +msgstr "" + +#: c-api/exceptions.rst:710 +msgid "This function may now invoke the garbage collector." +msgstr "" + +#: c-api/exceptions.rst:721 +msgid "" "Simulate the effect of a :c:macro:`!SIGINT` signal arriving. This is " "equivalent to ``PyErr_SetInterruptEx(SIGINT)``." msgstr "" -#: c-api/exceptions.rst:738 +#: c-api/exceptions.rst:752 msgid "" "This function is async-signal-safe. It can be called without the :term:" "`GIL` and from a C signal handler." msgstr "" -#: c-api/exceptions.rst:721 +#: c-api/exceptions.rst:735 msgid "" "Simulate the effect of a signal arriving. The next time :c:func:" "`PyErr_CheckSignals` is called, the Python signal handler for the given " "signal number will be called." msgstr "" -#: c-api/exceptions.rst:725 +#: c-api/exceptions.rst:739 msgid "" "This function can be called by C code that sets up its own signal handling " "and wants Python signal handlers to be invoked as expected when an " @@ -762,27 +789,27 @@ msgid "" "interrupt an operation)." msgstr "" -#: c-api/exceptions.rst:730 +#: c-api/exceptions.rst:744 msgid "" "If the given signal isn't handled by Python (it was set to :py:const:`signal." "SIG_DFL` or :py:const:`signal.SIG_IGN`), it will be ignored." msgstr "" -#: c-api/exceptions.rst:733 +#: c-api/exceptions.rst:747 msgid "" "If *signum* is outside of the allowed range of signal numbers, ``-1`` is " "returned. Otherwise, ``0`` is returned. The error indicator is never " "changed by this function." msgstr "" -#: c-api/exceptions.rst:746 +#: c-api/exceptions.rst:760 msgid "" "This utility function specifies a file descriptor to which the signal number " "is written as a single byte whenever a signal is received. *fd* must be non-" "blocking. It returns the previous such file descriptor." msgstr "" -#: c-api/exceptions.rst:750 +#: c-api/exceptions.rst:764 msgid "" "The value ``-1`` disables the feature; this is the initial state. This is " "equivalent to :func:`signal.set_wakeup_fd` in Python, but without any error " @@ -790,15 +817,15 @@ msgid "" "be called from the main thread." msgstr "" -#: c-api/exceptions.rst:755 +#: c-api/exceptions.rst:769 msgid "On Windows, the function now also supports socket handles." msgstr "" -#: c-api/exceptions.rst:760 +#: c-api/exceptions.rst:774 msgid "Exception Classes" msgstr "" -#: c-api/exceptions.rst:764 +#: c-api/exceptions.rst:778 msgid "" "This utility function creates and returns a new exception class. The *name* " "argument must be the name of the new exception, a C string of the form " @@ -807,7 +834,7 @@ msgid "" "(accessible in C as :c:data:`PyExc_Exception`)." msgstr "" -#: c-api/exceptions.rst:770 +#: c-api/exceptions.rst:784 msgid "" "The :attr:`~type.__module__` attribute of the new class is set to the first " "part (up to the last dot) of the *name* argument, and the class name is set " @@ -817,51 +844,51 @@ msgid "" "variables and methods." msgstr "" -#: c-api/exceptions.rst:779 +#: c-api/exceptions.rst:793 msgid "" "Same as :c:func:`PyErr_NewException`, except that the new exception class " "can easily be given a docstring: If *doc* is non-``NULL``, it will be used " "as the docstring for the exception class." msgstr "" -#: c-api/exceptions.rst:788 +#: c-api/exceptions.rst:802 msgid "" "Return non-zero if *ob* is an exception class, zero otherwise. This function " "always succeeds." msgstr "" -#: c-api/exceptions.rst:793 +#: c-api/exceptions.rst:807 msgid "Return :c:member:`~PyTypeObject.tp_name` of the exception class *ob*." msgstr "" -#: c-api/exceptions.rst:797 +#: c-api/exceptions.rst:811 msgid "Exception Objects" msgstr "" -#: c-api/exceptions.rst:801 +#: c-api/exceptions.rst:815 msgid "" "Return true if *op* is an instance of :class:`BaseException`, false " "otherwise. This function always succeeds." msgstr "" -#: c-api/exceptions.rst:807 +#: c-api/exceptions.rst:821 msgid "Equivalent to :c:func:`Py_TYPE(op) `." msgstr "" -#: c-api/exceptions.rst:812 +#: c-api/exceptions.rst:826 msgid "" "Return the traceback associated with the exception as a new reference, as " "accessible from Python through the :attr:`~BaseException.__traceback__` " "attribute. If there is no traceback associated, this returns ``NULL``." msgstr "" -#: c-api/exceptions.rst:820 +#: c-api/exceptions.rst:834 msgid "" "Set the traceback associated with the exception to *tb*. Use ``Py_None`` to " "clear it." msgstr "" -#: c-api/exceptions.rst:826 +#: c-api/exceptions.rst:840 msgid "" "Return the context (another exception instance during whose handling *ex* " "was raised) associated with the exception as a new reference, as accessible " @@ -869,14 +896,14 @@ msgid "" "there is no context associated, this returns ``NULL``." msgstr "" -#: c-api/exceptions.rst:834 +#: c-api/exceptions.rst:848 msgid "" "Set the context associated with the exception to *ctx*. Use ``NULL`` to " "clear it. There is no type check to make sure that *ctx* is an exception " -"instance. This steals a reference to *ctx*." +"instance. This \":term:`steals `\" a reference to *ctx*." msgstr "" -#: c-api/exceptions.rst:841 +#: c-api/exceptions.rst:855 msgid "" "Return the cause (either an exception instance, or ``None``, set by " "``raise ... from ...``) associated with the exception as a new reference, as " @@ -884,28 +911,29 @@ msgid "" "attribute." msgstr "" -#: c-api/exceptions.rst:849 +#: c-api/exceptions.rst:863 msgid "" "Set the cause associated with the exception to *cause*. Use ``NULL`` to " "clear it. There is no type check to make sure that *cause* is either an " -"exception instance or ``None``. This steals a reference to *cause*." +"exception instance or ``None``. This \":term:`steals `\" a reference " +"to *cause*." msgstr "" -#: c-api/exceptions.rst:853 +#: c-api/exceptions.rst:868 msgid "" "The :attr:`~BaseException.__suppress_context__` attribute is implicitly set " "to ``True`` by this function." msgstr "" -#: c-api/exceptions.rst:859 +#: c-api/exceptions.rst:874 msgid "Return :attr:`~BaseException.args` of exception *ex*." msgstr "" -#: c-api/exceptions.rst:864 +#: c-api/exceptions.rst:879 msgid "Set :attr:`~BaseException.args` of exception *ex* to *args*." msgstr "" -#: c-api/exceptions.rst:868 +#: c-api/exceptions.rst:883 msgid "" "Implement part of the interpreter's implementation of :keyword:`!except*`. " "*orig* is the original exception that was caught, and *excs* is the list of " @@ -917,72 +945,72 @@ msgid "" "if there is nothing to reraise." msgstr "" -#: c-api/exceptions.rst:882 +#: c-api/exceptions.rst:897 msgid "Unicode Exception Objects" msgstr "" -#: c-api/exceptions.rst:884 +#: c-api/exceptions.rst:899 msgid "" "The following functions are used to create and modify Unicode exceptions " "from C." msgstr "" -#: c-api/exceptions.rst:888 +#: c-api/exceptions.rst:903 msgid "" "Create a :class:`UnicodeDecodeError` object with the attributes *encoding*, " "*object*, *length*, *start*, *end* and *reason*. *encoding* and *reason* are " "UTF-8 encoded strings." msgstr "" -#: c-api/exceptions.rst:895 +#: c-api/exceptions.rst:910 msgid "Return the *encoding* attribute of the given exception object." msgstr "" -#: c-api/exceptions.rst:901 +#: c-api/exceptions.rst:916 msgid "Return the *object* attribute of the given exception object." msgstr "" -#: c-api/exceptions.rst:907 +#: c-api/exceptions.rst:922 msgid "" "Get the *start* attribute of the given exception object and place it into " "*\\*start*. *start* must not be ``NULL``. Return ``0`` on success, ``-1`` " "on failure." msgstr "" -#: c-api/exceptions.rst:915 +#: c-api/exceptions.rst:930 msgid "" "Set the *start* attribute of the given exception object to *start*. Return " "``0`` on success, ``-1`` on failure." msgstr "" -#: c-api/exceptions.rst:922 +#: c-api/exceptions.rst:937 msgid "" "Get the *end* attribute of the given exception object and place it into " "*\\*end*. *end* must not be ``NULL``. Return ``0`` on success, ``-1`` on " "failure." msgstr "" -#: c-api/exceptions.rst:930 +#: c-api/exceptions.rst:945 msgid "" "Set the *end* attribute of the given exception object to *end*. Return " "``0`` on success, ``-1`` on failure." msgstr "" -#: c-api/exceptions.rst:937 +#: c-api/exceptions.rst:952 msgid "Return the *reason* attribute of the given exception object." msgstr "" -#: c-api/exceptions.rst:943 +#: c-api/exceptions.rst:958 msgid "" "Set the *reason* attribute of the given exception object to *reason*. " "Return ``0`` on success, ``-1`` on failure." msgstr "" -#: c-api/exceptions.rst:950 +#: c-api/exceptions.rst:965 msgid "Recursion Control" msgstr "" -#: c-api/exceptions.rst:952 +#: c-api/exceptions.rst:967 msgid "" "These two functions provide a way to perform safe recursive calls at the C " "level, both in the core and in extension modules. They are needed if the " @@ -992,44 +1020,44 @@ msgid "" "recursion handling." msgstr "" -#: c-api/exceptions.rst:961 +#: c-api/exceptions.rst:976 msgid "Marks a point where a recursive C-level call is about to be performed." msgstr "" -#: c-api/exceptions.rst:963 +#: c-api/exceptions.rst:978 msgid "" "If :c:macro:`!USE_STACKCHECK` is defined, this function checks if the OS " "stack overflowed using :c:func:`PyOS_CheckStack`. If this is the case, it " "sets a :exc:`MemoryError` and returns a nonzero value." msgstr "" -#: c-api/exceptions.rst:967 +#: c-api/exceptions.rst:982 msgid "" "The function then checks if the recursion limit is reached. If this is the " "case, a :exc:`RecursionError` is set and a nonzero value is returned. " "Otherwise, zero is returned." msgstr "" -#: c-api/exceptions.rst:971 +#: c-api/exceptions.rst:986 msgid "" "*where* should be a UTF-8 encoded string such as ``\" in instance check\"`` " "to be concatenated to the :exc:`RecursionError` message caused by the " "recursion depth limit." msgstr "" -#: c-api/exceptions.rst:983 +#: c-api/exceptions.rst:998 msgid "" "This function is now also available in the :ref:`limited API `." msgstr "" -#: c-api/exceptions.rst:980 +#: c-api/exceptions.rst:995 msgid "" "Ends a :c:func:`Py_EnterRecursiveCall`. Must be called once for each " "*successful* invocation of :c:func:`Py_EnterRecursiveCall`." msgstr "" -#: c-api/exceptions.rst:986 +#: c-api/exceptions.rst:1001 msgid "" "Properly implementing :c:member:`~PyTypeObject.tp_repr` for container types " "requires special recursion handling. In addition to protecting the stack, :" @@ -1038,13 +1066,13 @@ msgid "" "Effectively, these are the C equivalent to :func:`reprlib.recursive_repr`." msgstr "" -#: c-api/exceptions.rst:994 +#: c-api/exceptions.rst:1009 msgid "" "Called at the beginning of the :c:member:`~PyTypeObject.tp_repr` " "implementation to detect cycles." msgstr "" -#: c-api/exceptions.rst:997 +#: c-api/exceptions.rst:1012 msgid "" "If the object has already been processed, the function returns a positive " "integer. In that case the :c:member:`~PyTypeObject.tp_repr` implementation " @@ -1052,296 +1080,296 @@ msgid "" "`dict` objects return ``{...}`` and :class:`list` objects return ``[...]``." msgstr "" -#: c-api/exceptions.rst:1003 +#: c-api/exceptions.rst:1018 msgid "" "The function will return a negative integer if the recursion limit is " "reached. In that case the :c:member:`~PyTypeObject.tp_repr` implementation " "should typically return ``NULL``." msgstr "" -#: c-api/exceptions.rst:1007 +#: c-api/exceptions.rst:1022 msgid "" "Otherwise, the function returns zero and the :c:member:`~PyTypeObject." "tp_repr` implementation can continue normally." msgstr "" -#: c-api/exceptions.rst:1012 +#: c-api/exceptions.rst:1027 msgid "" "Ends a :c:func:`Py_ReprEnter`. Must be called once for each invocation of :" "c:func:`Py_ReprEnter` that returns zero." msgstr "" -#: c-api/exceptions.rst:1017 +#: c-api/exceptions.rst:1032 msgid "" "Get the recursion limit for the current interpreter. It can be set with :c:" "func:`Py_SetRecursionLimit`. The recursion limit prevents the Python " "interpreter stack from growing infinitely." msgstr "" -#: c-api/exceptions.rst:1031 +#: c-api/exceptions.rst:1046 msgid "This function cannot fail, and the caller must hold the :term:`GIL`." msgstr "" -#: c-api/exceptions.rst:1025 +#: c-api/exceptions.rst:1040 msgid ":py:func:`sys.getrecursionlimit`" msgstr "" -#: c-api/exceptions.rst:1029 +#: c-api/exceptions.rst:1044 msgid "Set the recursion limit for the current interpreter." msgstr "" -#: c-api/exceptions.rst:1035 +#: c-api/exceptions.rst:1050 msgid ":py:func:`sys.setrecursionlimit`" msgstr "" -#: c-api/exceptions.rst:1040 +#: c-api/exceptions.rst:1055 msgid "Exception and warning types" msgstr "" -#: c-api/exceptions.rst:1042 +#: c-api/exceptions.rst:1057 msgid "" "All standard Python exceptions and warning categories are available as " "global variables whose names are ``PyExc_`` followed by the Python exception " "name. These have the type :c:expr:`PyObject*`; they are all class objects." msgstr "" -#: c-api/exceptions.rst:1046 +#: c-api/exceptions.rst:1061 msgid "For completeness, here are all the variables:" msgstr "" -#: c-api/exceptions.rst:1049 +#: c-api/exceptions.rst:1064 msgid "Exception types" msgstr "" -#: c-api/exceptions.rst:1202 c-api/exceptions.rst:1232 +#: c-api/exceptions.rst:1217 c-api/exceptions.rst:1247 msgid "C name" msgstr "" -#: c-api/exceptions.rst:1203 c-api/exceptions.rst:1233 +#: c-api/exceptions.rst:1218 c-api/exceptions.rst:1248 msgid "Python name" msgstr "" -#: c-api/exceptions.rst:1059 +#: c-api/exceptions.rst:1074 msgid ":exc:`BaseException`" msgstr "" -#: c-api/exceptions.rst:1061 +#: c-api/exceptions.rst:1076 msgid ":exc:`BaseExceptionGroup`" msgstr "" -#: c-api/exceptions.rst:1063 +#: c-api/exceptions.rst:1078 msgid ":exc:`Exception`" msgstr "" -#: c-api/exceptions.rst:1065 +#: c-api/exceptions.rst:1080 msgid ":exc:`ArithmeticError`" msgstr "" -#: c-api/exceptions.rst:1067 +#: c-api/exceptions.rst:1082 msgid ":exc:`AssertionError`" msgstr "" -#: c-api/exceptions.rst:1069 +#: c-api/exceptions.rst:1084 msgid ":exc:`AttributeError`" msgstr "" -#: c-api/exceptions.rst:1071 +#: c-api/exceptions.rst:1086 msgid ":exc:`BlockingIOError`" msgstr "" -#: c-api/exceptions.rst:1073 +#: c-api/exceptions.rst:1088 msgid ":exc:`BrokenPipeError`" msgstr "" -#: c-api/exceptions.rst:1075 +#: c-api/exceptions.rst:1090 msgid ":exc:`BufferError`" msgstr "" -#: c-api/exceptions.rst:1077 +#: c-api/exceptions.rst:1092 msgid ":exc:`ChildProcessError`" msgstr "" -#: c-api/exceptions.rst:1079 +#: c-api/exceptions.rst:1094 msgid ":exc:`ConnectionAbortedError`" msgstr "" -#: c-api/exceptions.rst:1081 +#: c-api/exceptions.rst:1096 msgid ":exc:`ConnectionError`" msgstr "" -#: c-api/exceptions.rst:1083 +#: c-api/exceptions.rst:1098 msgid ":exc:`ConnectionRefusedError`" msgstr "" -#: c-api/exceptions.rst:1085 +#: c-api/exceptions.rst:1100 msgid ":exc:`ConnectionResetError`" msgstr "" -#: c-api/exceptions.rst:1087 +#: c-api/exceptions.rst:1102 msgid ":exc:`EOFError`" msgstr "" -#: c-api/exceptions.rst:1089 +#: c-api/exceptions.rst:1104 msgid ":exc:`FileExistsError`" msgstr "" -#: c-api/exceptions.rst:1091 +#: c-api/exceptions.rst:1106 msgid ":exc:`FileNotFoundError`" msgstr "" -#: c-api/exceptions.rst:1093 +#: c-api/exceptions.rst:1108 msgid ":exc:`FloatingPointError`" msgstr "" -#: c-api/exceptions.rst:1095 +#: c-api/exceptions.rst:1110 msgid ":exc:`GeneratorExit`" msgstr "" -#: c-api/exceptions.rst:1097 +#: c-api/exceptions.rst:1112 msgid ":exc:`ImportError`" msgstr "" -#: c-api/exceptions.rst:1099 +#: c-api/exceptions.rst:1114 msgid ":exc:`IndentationError`" msgstr "" -#: c-api/exceptions.rst:1101 +#: c-api/exceptions.rst:1116 msgid ":exc:`IndexError`" msgstr "" -#: c-api/exceptions.rst:1103 +#: c-api/exceptions.rst:1118 msgid ":exc:`InterruptedError`" msgstr "" -#: c-api/exceptions.rst:1105 +#: c-api/exceptions.rst:1120 msgid ":exc:`IsADirectoryError`" msgstr "" -#: c-api/exceptions.rst:1107 +#: c-api/exceptions.rst:1122 msgid ":exc:`KeyError`" msgstr "" -#: c-api/exceptions.rst:1109 +#: c-api/exceptions.rst:1124 msgid ":exc:`KeyboardInterrupt`" msgstr "" -#: c-api/exceptions.rst:1111 +#: c-api/exceptions.rst:1126 msgid ":exc:`LookupError`" msgstr "" -#: c-api/exceptions.rst:1113 +#: c-api/exceptions.rst:1128 msgid ":exc:`MemoryError`" msgstr "" -#: c-api/exceptions.rst:1115 +#: c-api/exceptions.rst:1130 msgid ":exc:`ModuleNotFoundError`" msgstr "" -#: c-api/exceptions.rst:1117 +#: c-api/exceptions.rst:1132 msgid ":exc:`NameError`" msgstr "" -#: c-api/exceptions.rst:1119 +#: c-api/exceptions.rst:1134 msgid ":exc:`NotADirectoryError`" msgstr "" -#: c-api/exceptions.rst:1121 +#: c-api/exceptions.rst:1136 msgid ":exc:`NotImplementedError`" msgstr "" -#: c-api/exceptions.rst:1206 c-api/exceptions.rst:1212 +#: c-api/exceptions.rst:1221 c-api/exceptions.rst:1227 msgid ":exc:`OSError`" msgstr "" -#: c-api/exceptions.rst:1125 +#: c-api/exceptions.rst:1140 msgid ":exc:`OverflowError`" msgstr "" -#: c-api/exceptions.rst:1127 +#: c-api/exceptions.rst:1142 msgid ":exc:`PermissionError`" msgstr "" -#: c-api/exceptions.rst:1129 +#: c-api/exceptions.rst:1144 msgid ":exc:`ProcessLookupError`" msgstr "" -#: c-api/exceptions.rst:1131 +#: c-api/exceptions.rst:1146 msgid ":exc:`PythonFinalizationError`" msgstr "" -#: c-api/exceptions.rst:1133 +#: c-api/exceptions.rst:1148 msgid ":exc:`RecursionError`" msgstr "" -#: c-api/exceptions.rst:1135 +#: c-api/exceptions.rst:1150 msgid ":exc:`ReferenceError`" msgstr "" -#: c-api/exceptions.rst:1137 +#: c-api/exceptions.rst:1152 msgid ":exc:`RuntimeError`" msgstr "" -#: c-api/exceptions.rst:1139 +#: c-api/exceptions.rst:1154 msgid ":exc:`StopAsyncIteration`" msgstr "" -#: c-api/exceptions.rst:1141 +#: c-api/exceptions.rst:1156 msgid ":exc:`StopIteration`" msgstr "" -#: c-api/exceptions.rst:1143 +#: c-api/exceptions.rst:1158 msgid ":exc:`SyntaxError`" msgstr "" -#: c-api/exceptions.rst:1145 +#: c-api/exceptions.rst:1160 msgid ":exc:`SystemError`" msgstr "" -#: c-api/exceptions.rst:1147 +#: c-api/exceptions.rst:1162 msgid ":exc:`SystemExit`" msgstr "" -#: c-api/exceptions.rst:1149 +#: c-api/exceptions.rst:1164 msgid ":exc:`TabError`" msgstr "" -#: c-api/exceptions.rst:1151 +#: c-api/exceptions.rst:1166 msgid ":exc:`TimeoutError`" msgstr "" -#: c-api/exceptions.rst:1153 +#: c-api/exceptions.rst:1168 msgid ":exc:`TypeError`" msgstr "" -#: c-api/exceptions.rst:1155 +#: c-api/exceptions.rst:1170 msgid ":exc:`UnboundLocalError`" msgstr "" -#: c-api/exceptions.rst:1157 +#: c-api/exceptions.rst:1172 msgid ":exc:`UnicodeDecodeError`" msgstr "" -#: c-api/exceptions.rst:1159 +#: c-api/exceptions.rst:1174 msgid ":exc:`UnicodeEncodeError`" msgstr "" -#: c-api/exceptions.rst:1161 +#: c-api/exceptions.rst:1176 msgid ":exc:`UnicodeError`" msgstr "" -#: c-api/exceptions.rst:1163 +#: c-api/exceptions.rst:1178 msgid ":exc:`UnicodeTranslateError`" msgstr "" -#: c-api/exceptions.rst:1165 +#: c-api/exceptions.rst:1180 msgid ":exc:`ValueError`" msgstr "" -#: c-api/exceptions.rst:1167 +#: c-api/exceptions.rst:1182 msgid ":exc:`ZeroDivisionError`" msgstr "" -#: c-api/exceptions.rst:1169 +#: c-api/exceptions.rst:1184 msgid "" ":c:data:`PyExc_BlockingIOError`, :c:data:`PyExc_BrokenPipeError`, :c:data:" "`PyExc_ChildProcessError`, :c:data:`PyExc_ConnectionError`, :c:data:" @@ -1353,141 +1381,141 @@ msgid "" "`PyExc_TimeoutError` were introduced following :pep:`3151`." msgstr "" -#: c-api/exceptions.rst:1179 +#: c-api/exceptions.rst:1194 msgid ":c:data:`PyExc_StopAsyncIteration` and :c:data:`PyExc_RecursionError`." msgstr "" -#: c-api/exceptions.rst:1182 +#: c-api/exceptions.rst:1197 msgid ":c:data:`PyExc_ModuleNotFoundError`." msgstr "" -#: c-api/exceptions.rst:1185 +#: c-api/exceptions.rst:1200 msgid ":c:data:`PyExc_BaseExceptionGroup`." msgstr "" -#: c-api/exceptions.rst:1190 +#: c-api/exceptions.rst:1205 msgid "OSError aliases" msgstr "" -#: c-api/exceptions.rst:1192 +#: c-api/exceptions.rst:1207 msgid "The following are a compatibility aliases to :c:data:`PyExc_OSError`." msgstr "" -#: c-api/exceptions.rst:1194 +#: c-api/exceptions.rst:1209 msgid "These aliases used to be separate exception types." msgstr "" -#: c-api/exceptions.rst:1204 +#: c-api/exceptions.rst:1219 msgid "Notes" msgstr "" -#: c-api/exceptions.rst:1213 +#: c-api/exceptions.rst:1228 msgid "[win]_" msgstr "" -#: c-api/exceptions.rst:1215 +#: c-api/exceptions.rst:1230 msgid "Notes:" msgstr "" -#: c-api/exceptions.rst:1218 +#: c-api/exceptions.rst:1233 msgid "" ":c:var:`!PyExc_WindowsError` is only defined on Windows; protect code that " "uses this by testing that the preprocessor macro ``MS_WINDOWS`` is defined." msgstr "" -#: c-api/exceptions.rst:1225 +#: c-api/exceptions.rst:1240 msgid "Warning types" msgstr "" -#: c-api/exceptions.rst:1235 +#: c-api/exceptions.rst:1250 msgid ":exc:`Warning`" msgstr "" -#: c-api/exceptions.rst:1237 +#: c-api/exceptions.rst:1252 msgid ":exc:`BytesWarning`" msgstr "" -#: c-api/exceptions.rst:1239 +#: c-api/exceptions.rst:1254 msgid ":exc:`DeprecationWarning`" msgstr "" -#: c-api/exceptions.rst:1241 +#: c-api/exceptions.rst:1256 msgid ":exc:`EncodingWarning`" msgstr "" -#: c-api/exceptions.rst:1243 +#: c-api/exceptions.rst:1258 msgid ":exc:`FutureWarning`" msgstr "" -#: c-api/exceptions.rst:1245 +#: c-api/exceptions.rst:1260 msgid ":exc:`ImportWarning`" msgstr "" -#: c-api/exceptions.rst:1247 +#: c-api/exceptions.rst:1262 msgid ":exc:`PendingDeprecationWarning`" msgstr "" -#: c-api/exceptions.rst:1249 +#: c-api/exceptions.rst:1264 msgid ":exc:`ResourceWarning`" msgstr "" -#: c-api/exceptions.rst:1251 +#: c-api/exceptions.rst:1266 msgid ":exc:`RuntimeWarning`" msgstr "" -#: c-api/exceptions.rst:1253 +#: c-api/exceptions.rst:1268 msgid ":exc:`SyntaxWarning`" msgstr "" -#: c-api/exceptions.rst:1255 +#: c-api/exceptions.rst:1270 msgid ":exc:`UnicodeWarning`" msgstr "" -#: c-api/exceptions.rst:1257 +#: c-api/exceptions.rst:1272 msgid ":exc:`UserWarning`" msgstr "" -#: c-api/exceptions.rst:1259 +#: c-api/exceptions.rst:1274 msgid ":c:data:`PyExc_ResourceWarning`." msgstr "" -#: c-api/exceptions.rst:1262 +#: c-api/exceptions.rst:1277 msgid ":c:data:`PyExc_EncodingWarning`." msgstr "" -#: c-api/exceptions.rst:1267 +#: c-api/exceptions.rst:1282 msgid "Tracebacks" msgstr "" -#: c-api/exceptions.rst:1271 +#: c-api/exceptions.rst:1286 msgid "" "Type object for traceback objects. This is available as :class:`types." "TracebackType` in the Python layer." msgstr "" -#: c-api/exceptions.rst:1277 +#: c-api/exceptions.rst:1292 msgid "" "Return true if *op* is a traceback object, false otherwise. This function " "does not account for subtypes." msgstr "" -#: c-api/exceptions.rst:1283 +#: c-api/exceptions.rst:1298 msgid "" "Replace the :attr:`~BaseException.__traceback__` attribute on the current " "exception with a new traceback prepending *f* to the existing chain." msgstr "" -#: c-api/exceptions.rst:1286 +#: c-api/exceptions.rst:1301 msgid "Calling this function without an exception set is undefined behavior." msgstr "" -#: c-api/exceptions.rst:1296 +#: c-api/exceptions.rst:1311 msgid "" "This function returns ``0`` on success, and returns ``-1`` with an exception " "set on failure." msgstr "" -#: c-api/exceptions.rst:1294 +#: c-api/exceptions.rst:1309 msgid "Write the traceback *tb* into the file *f*." msgstr "" @@ -1495,18 +1523,18 @@ msgstr "" msgid "strerror (C function)" msgstr "" -#: c-api/exceptions.rst:702 c-api/exceptions.rst:717 +#: c-api/exceptions.rst:716 c-api/exceptions.rst:731 msgid "module" msgstr "" -#: c-api/exceptions.rst:702 c-api/exceptions.rst:717 +#: c-api/exceptions.rst:716 c-api/exceptions.rst:731 msgid "signal" msgstr "" -#: c-api/exceptions.rst:702 +#: c-api/exceptions.rst:716 msgid "SIGINT (C macro)" msgstr "" -#: c-api/exceptions.rst:702 c-api/exceptions.rst:717 +#: c-api/exceptions.rst:716 c-api/exceptions.rst:731 msgid "KeyboardInterrupt (built-in exception)" msgstr "" diff --git a/c-api/file.po b/c-api/file.po index c3cc5d6f6..fa6d2d4b7 100644 --- a/c-api/file.po +++ b/c-api/file.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -151,11 +151,20 @@ msgstr "" msgid "" "Write object *obj* to file object *p*. The only supported flag for *flags* " "is :c:macro:`Py_PRINT_RAW`; if given, the :func:`str` of the object is " -"written instead of the :func:`repr`. Return ``0`` on success or ``-1`` on " -"failure; the appropriate exception will be set." +"written instead of the :func:`repr`." +msgstr "" + +#: c-api/file.rst:128 +msgid "If *obj* is ``NULL``, write the string ``\"\"``." +msgstr "" + +#: c-api/file.rst:130 +msgid "" +"Return ``0`` on success or ``-1`` on failure; the appropriate exception will " +"be set." msgstr "" -#: c-api/file.rst:132 +#: c-api/file.rst:135 msgid "" "Write string *s* to file object *p*. Return ``0`` on success or ``-1`` on " "failure; the appropriate exception will be set." diff --git a/c-api/float.po b/c-api/float.po index f18577253..281a1f3ba 100644 --- a/c-api/float.po +++ b/c-api/float.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -95,7 +95,7 @@ msgstr "" #: c-api/float.rst:83 msgid "" -"This macro expands a to constant expression of type :c:expr:`double`, that " +"This macro expands to a constant expression of type :c:expr:`double`, that " "represents the positive infinity." msgstr "" @@ -107,7 +107,7 @@ msgstr "" #: c-api/float.rst:92 msgid "" -"This macro expands a to constant expression of type :c:expr:`double`, that " +"This macro expands to a constant expression of type :c:expr:`double`, that " "represents a quiet not-a-number (qNaN) value." msgstr "" diff --git a/c-api/frame.po b/c-api/frame.po index b67fad952..c82b248d0 100644 --- a/c-api/frame.po +++ b/c-api/frame.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,7 +18,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: c-api/frame.rst:4 -msgid "Frame Objects" +msgid "Frame objects" msgstr "" #: c-api/frame.rst:8 @@ -79,80 +79,81 @@ msgstr "" #: c-api/frame.rst:51 msgid "" -"Return a :term:`strong reference`, or ``NULL`` if *frame* has no outer frame." +"Return a :term:`strong reference`, or ``NULL`` if *frame* has no outer " +"frame. This raises no exceptions." msgstr "" -#: c-api/frame.rst:59 +#: c-api/frame.rst:60 msgid "Get the *frame*'s :attr:`~frame.f_builtins` attribute." msgstr "" -#: c-api/frame.rst:92 +#: c-api/frame.rst:93 msgid "Return a :term:`strong reference`. The result cannot be ``NULL``." msgstr "" -#: c-api/frame.rst:68 +#: c-api/frame.rst:69 msgid "Get the *frame* code." msgstr "" -#: c-api/frame.rst:136 +#: c-api/frame.rst:137 msgid "Return a :term:`strong reference`." msgstr "" -#: c-api/frame.rst:72 +#: c-api/frame.rst:73 msgid "The result (frame code) cannot be ``NULL``." msgstr "" -#: c-api/frame.rst:79 +#: c-api/frame.rst:80 msgid "" "Get the generator, coroutine, or async generator that owns this frame, or " "``NULL`` if this frame is not owned by a generator. Does not raise an " "exception, even if the return value is ``NULL``." msgstr "" -#: c-api/frame.rst:83 +#: c-api/frame.rst:84 msgid "Return a :term:`strong reference`, or ``NULL``." msgstr "" -#: c-api/frame.rst:90 +#: c-api/frame.rst:91 msgid "Get the *frame*'s :attr:`~frame.f_globals` attribute." msgstr "" -#: c-api/frame.rst:99 +#: c-api/frame.rst:100 msgid "Get the *frame*'s :attr:`~frame.f_lasti` attribute." msgstr "" -#: c-api/frame.rst:101 +#: c-api/frame.rst:102 msgid "Returns -1 if ``frame.f_lasti`` is ``None``." msgstr "" -#: c-api/frame.rst:108 +#: c-api/frame.rst:109 msgid "Get the variable *name* of *frame*." msgstr "" -#: c-api/frame.rst:110 +#: c-api/frame.rst:111 msgid "Return a :term:`strong reference` to the variable value on success." msgstr "" -#: c-api/frame.rst:111 +#: c-api/frame.rst:112 msgid "" "Raise :exc:`NameError` and return ``NULL`` if the variable does not exist." msgstr "" -#: c-api/frame.rst:112 +#: c-api/frame.rst:113 msgid "Raise an exception and return ``NULL`` on error." msgstr "" -#: c-api/frame.rst:114 +#: c-api/frame.rst:115 msgid "*name* type must be a :class:`str`." msgstr "" -#: c-api/frame.rst:121 +#: c-api/frame.rst:122 msgid "" "Similar to :c:func:`PyFrame_GetVar`, but the variable name is a C string " "encoded in UTF-8." msgstr "" -#: c-api/frame.rst:129 +#: c-api/frame.rst:130 msgid "" "Get the *frame*'s :attr:`~frame.f_locals` attribute. If the frame refers to " "an :term:`optimized scope`, this returns a write-through proxy object that " @@ -161,21 +162,21 @@ msgid "" "directly (as described for :func:`locals`)." msgstr "" -#: c-api/frame.rst:140 +#: c-api/frame.rst:141 msgid "" "As part of :pep:`667`, return an instance of :c:var:" "`PyFrameLocalsProxy_Type`." msgstr "" -#: c-api/frame.rst:146 +#: c-api/frame.rst:147 msgid "Return the line number that *frame* is currently executing." msgstr "" -#: c-api/frame.rst:150 -msgid "Frame Locals Proxies" +#: c-api/frame.rst:151 +msgid "Frame locals proxies" msgstr "" -#: c-api/frame.rst:154 +#: c-api/frame.rst:155 msgid "" "The :attr:`~frame.f_locals` attribute on a :ref:`frame object ` is an instance of a \"frame-locals proxy\". The proxy object " @@ -184,33 +185,29 @@ msgid "" "to date with the live local variables in the frame itself." msgstr "" -#: c-api/frame.rst:160 +#: c-api/frame.rst:161 msgid "See :pep:`667` for more information." msgstr "" -#: c-api/frame.rst:164 +#: c-api/frame.rst:165 msgid "The type of frame :func:`locals` proxy objects." msgstr "" -#: c-api/frame.rst:168 +#: c-api/frame.rst:169 msgid "Return non-zero if *obj* is a frame :func:`locals` proxy." msgstr "" -#: c-api/frame.rst:172 -msgid "Legacy Local Variable APIs" +#: c-api/frame.rst:173 +msgid "Legacy local variable APIs" msgstr "" -#: c-api/frame.rst:174 +#: c-api/frame.rst:175 msgid "" "These APIs are :term:`soft deprecated`. As of Python 3.13, they do nothing. " "They exist solely for backwards compatibility." msgstr "" -#: c-api/frame.rst:194 c-api/frame.rst:207 -msgid "This function is :term:`soft deprecated` and does nothing." -msgstr "" - -#: c-api/frame.rst:182 +#: c-api/frame.rst:181 msgid "" "Prior to Python 3.13, this function would copy the :attr:`~frame.f_locals` " "attribute of *f* to the internal \"fast\" array of local variables, allowing " @@ -219,11 +216,11 @@ msgid "" "dictionary." msgstr "" -#: c-api/frame.rst:201 c-api/frame.rst:213 +#: c-api/frame.rst:198 c-api/frame.rst:208 msgid "This function now does nothing." msgstr "" -#: c-api/frame.rst:196 +#: c-api/frame.rst:193 msgid "" "Prior to Python 3.13, this function would copy the internal \"fast\" array " "of local variables (which is used by the interpreter) to the :attr:`~frame." @@ -231,38 +228,38 @@ msgid "" "visible to frame objects." msgstr "" -#: c-api/frame.rst:209 +#: c-api/frame.rst:204 msgid "" "Prior to Python 3.13, this function was similar to :c:func:" "`PyFrame_FastToLocals`, but would return ``0`` on success, and ``-1`` with " "an exception set on failure." msgstr "" -#: c-api/frame.rst:218 +#: c-api/frame.rst:213 msgid ":pep:`667`" msgstr "" -#: c-api/frame.rst:222 -msgid "Internal Frames" +#: c-api/frame.rst:217 +msgid "Internal frames" msgstr "" -#: c-api/frame.rst:224 +#: c-api/frame.rst:219 msgid "Unless using :pep:`523`, you will not need this." msgstr "" -#: c-api/frame.rst:228 +#: c-api/frame.rst:223 msgid "The interpreter's internal frame representation." msgstr "" -#: c-api/frame.rst:234 +#: c-api/frame.rst:229 msgid "Return a :term:`strong reference` to the code object for the frame." msgstr "" -#: c-api/frame.rst:241 +#: c-api/frame.rst:236 msgid "Return the byte offset into the last executed instruction." msgstr "" -#: c-api/frame.rst:248 +#: c-api/frame.rst:243 msgid "" "Return the currently executing line number, or -1 if there is no line number." msgstr "" diff --git a/c-api/function.po b/c-api/function.po index 2521d02a3..328f45679 100644 --- a/c-api/function.po +++ b/c-api/function.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/gcsupport.po b/c-api/gcsupport.po index 1c84b6086..c0b9b6dae 100644 --- a/c-api/gcsupport.po +++ b/c-api/gcsupport.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -246,13 +246,20 @@ msgstr "" #: c-api/gcsupport.rst:178 msgid "" +"The traversal function must not have any side effects. Implementations may " +"not modify the reference counts of any Python objects nor create or destroy " +"any Python objects." +msgstr "" + +#: c-api/gcsupport.rst:182 +msgid "" "To simplify writing :c:member:`~PyTypeObject.tp_traverse` handlers, a :c:" "func:`Py_VISIT` macro is provided. In order to use this macro, the :c:" "member:`~PyTypeObject.tp_traverse` implementation must name its arguments " "exactly *visit* and *arg*:" msgstr "" -#: c-api/gcsupport.rst:185 +#: c-api/gcsupport.rst:189 msgid "" "If the :c:expr:`PyObject *` *o* is not ``NULL``, call the *visit* callback, " "with arguments *o* and *arg*. If *visit* returns a non-zero value, then " @@ -260,7 +267,7 @@ msgid "" "look like::" msgstr "" -#: c-api/gcsupport.rst:190 +#: c-api/gcsupport.rst:194 msgid "" "static int\n" "my_traverse(Noddy *self, visitproc visit, void *arg)\n" @@ -271,13 +278,13 @@ msgid "" "}" msgstr "" -#: c-api/gcsupport.rst:198 +#: c-api/gcsupport.rst:202 msgid "" "The :c:member:`~PyTypeObject.tp_clear` handler must be of the :c:type:" "`inquiry` type, or ``NULL`` if the object is immutable." msgstr "" -#: c-api/gcsupport.rst:204 +#: c-api/gcsupport.rst:208 msgid "" "Drop references that may have created reference cycles. Immutable objects " "do not have to define this method since they can never directly create " @@ -287,23 +294,23 @@ msgid "" "in a reference cycle." msgstr "" -#: c-api/gcsupport.rst:213 +#: c-api/gcsupport.rst:217 msgid "Controlling the Garbage Collector State" msgstr "" -#: c-api/gcsupport.rst:215 +#: c-api/gcsupport.rst:219 msgid "" "The C-API provides the following functions for controlling garbage " "collection runs." msgstr "" -#: c-api/gcsupport.rst:220 +#: c-api/gcsupport.rst:224 msgid "" "Perform a full garbage collection, if the garbage collector is enabled. " "(Note that :func:`gc.collect` runs it unconditionally.)" msgstr "" -#: c-api/gcsupport.rst:223 +#: c-api/gcsupport.rst:227 msgid "" "Returns the number of collected + unreachable objects which cannot be " "collected. If the garbage collector is disabled or already collecting, " @@ -311,54 +318,54 @@ msgid "" "data:`sys.unraisablehook`. This function does not raise exceptions." msgstr "" -#: c-api/gcsupport.rst:233 +#: c-api/gcsupport.rst:237 msgid "" "Enable the garbage collector: similar to :func:`gc.enable`. Returns the " "previous state, 0 for disabled and 1 for enabled." msgstr "" -#: c-api/gcsupport.rst:241 +#: c-api/gcsupport.rst:245 msgid "" "Disable the garbage collector: similar to :func:`gc.disable`. Returns the " "previous state, 0 for disabled and 1 for enabled." msgstr "" -#: c-api/gcsupport.rst:249 +#: c-api/gcsupport.rst:253 msgid "" "Query the state of the garbage collector: similar to :func:`gc.isenabled`. " "Returns the current state, 0 for disabled and 1 for enabled." msgstr "" -#: c-api/gcsupport.rst:256 +#: c-api/gcsupport.rst:260 msgid "Querying Garbage Collector State" msgstr "" -#: c-api/gcsupport.rst:258 +#: c-api/gcsupport.rst:262 msgid "" "The C-API provides the following interface for querying information about " "the garbage collector." msgstr "" -#: c-api/gcsupport.rst:263 +#: c-api/gcsupport.rst:267 msgid "" "Run supplied *callback* on all live GC-capable objects. *arg* is passed " "through to all invocations of *callback*." msgstr "" -#: c-api/gcsupport.rst:267 +#: c-api/gcsupport.rst:271 msgid "" "If new objects are (de)allocated by the callback it is undefined if they " "will be visited." msgstr "" -#: c-api/gcsupport.rst:270 +#: c-api/gcsupport.rst:274 msgid "" "Garbage collection is disabled during operation. Explicitly running a " "collection in the callback may lead to undefined behaviour e.g. visiting the " "same objects multiple times or not at all." msgstr "" -#: c-api/gcsupport.rst:278 +#: c-api/gcsupport.rst:282 msgid "" "Type of the visitor function to be passed to :c:func:" "`PyUnstable_GC_VisitObjects`. *arg* is the same as the *arg* passed to " diff --git a/c-api/gen.po b/c-api/gen.po index ded0e7d53..05470fb89 100644 --- a/c-api/gen.po +++ b/c-api/gen.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -52,16 +52,16 @@ msgstr "" #: c-api/gen.rst:37 msgid "" "Create and return a new generator object based on the *frame* object. A " -"reference to *frame* is stolen by this function. The argument must not be " -"``NULL``." +"reference to *frame* is \":term:`stolen `\" by this function (even on " +"error). The argument must not be ``NULL``." msgstr "" #: c-api/gen.rst:43 msgid "" "Create and return a new generator object based on the *frame* object, with " "``__name__`` and ``__qualname__`` set to *name* and *qualname*. A reference " -"to *frame* is stolen by this function. The *frame* argument must not be " -"``NULL``." +"to *frame* is \":term:`stolen `\" by this function (even on error). " +"The *frame* argument must not be ``NULL``." msgstr "" #: c-api/gen.rst:50 @@ -87,18 +87,18 @@ msgstr "" #: c-api/gen.rst:69 msgid "" "Create a new asynchronous generator wrapping *frame*, with ``__name__`` and " -"``__qualname__`` set to *name* and *qualname*. *frame* is stolen by this " -"function and must not be ``NULL``." +"``__qualname__`` set to *name* and *qualname*. *frame* is \":term:`stolen " +"`\" by this function (even on error) and must not be ``NULL``." msgstr "" -#: c-api/gen.rst:73 +#: c-api/gen.rst:74 msgid "" "On success, this function returns a :term:`strong reference` to the new " "asynchronous generator. On failure, this function returns ``NULL`` with an " "exception set." msgstr "" -#: c-api/gen.rst:81 +#: c-api/gen.rst:82 msgid "" "Return true if *op* is an asynchronous generator object, false otherwise. " "This function always succeeds." diff --git a/c-api/hash.po b/c-api/hash.po index f6b97c14c..ca909c9a7 100644 --- a/c-api/hash.po +++ b/c-api/hash.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/import.po b/c-api/import.po index 4f0c246f8..d46b186c3 100644 --- a/c-api/import.po +++ b/c-api/import.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -373,6 +373,13 @@ msgid "" "initialization." msgstr "" +#: c-api/import.rst:332 +msgid "" +"The table of built-in modules used by Python initialization. Do not use this " +"directly; use :c:func:`PyImport_AppendInittab` and :c:func:" +"`PyImport_ExtendInittab` instead." +msgstr "" + #: c-api/import.rst:11 msgid "package variable" msgstr "" diff --git a/c-api/index.po b/c-api/index.po index 7c4b7e055..0f40ec090 100644 --- a/c-api/index.po +++ b/c-api/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/init.po b/c-api/init.po index b215df3c8..f804966fd 100644 --- a/c-api/init.po +++ b/c-api/init.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1766,7 +1766,7 @@ msgstr "" #: c-api/init.rst:1466 msgid "" -"Issue a fatal error if there no current Python thread state or no current " +"Issue a fatal error if there is no current Python thread state or no current " "interpreter. It cannot return NULL." msgstr "" @@ -2459,7 +2459,7 @@ msgid "" "exception becomes set within the frame being executed. The effect of this " "is that as exception propagation causes the Python stack to unwind, the " "callback is called upon return to each frame as the exception propagates. " -"Only trace functions receives these events; they are not needed by the " +"Only trace functions receive these events; they are not needed by the " "profiler." msgstr "" @@ -2599,7 +2599,7 @@ msgstr "" #: c-api/init.rst:2182 msgid "" -"Not that tracer functions **must not** create Python objects inside or " +"Note that tracer functions **must not** create Python objects inside or " "otherwise the call will be re-entrant. The tracer also **must not** clear " "any existing exception or set an exception. The GIL will be held every time " "the tracer function is called." diff --git a/c-api/init_config.po b/c-api/init_config.po index 4a20ccff2..8511865ae 100644 --- a/c-api/init_config.po +++ b/c-api/init_config.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -709,7 +709,7 @@ msgstr "" msgid "" "Most ``PyConfig`` methods :ref:`preinitialize Python ` if needed. " "In that case, the Python preinitialization configuration (:c:type:" -"`PyPreConfig`) in based on the :c:type:`PyConfig`. If configuration fields " +"`PyPreConfig`) is based on the :c:type:`PyConfig`. If configuration fields " "which are in common with :c:type:`PyPreConfig` are tuned, they must be set " "before calling a :c:type:`PyConfig` method:" msgstr "" diff --git a/c-api/intro.po b/c-api/intro.po index 1567d1d2a..9c8c3fcdd 100644 --- a/c-api/intro.po +++ b/c-api/intro.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -200,116 +200,251 @@ msgid "" msgstr "" #: c-api/intro.rst:144 +msgid "Specify alignment to *num* bytes on compilers that support it." +msgstr "" + +#: c-api/intro.rst:146 +msgid "Consider using the C11 standard ``_Alignas`` specifier over this macro." +msgstr "" + +#: c-api/intro.rst:150 +msgid "" +"Similar to ``integer >> positions``, but forces sign extension, as the C " +"standard does not define whether a right-shift of a signed integer will " +"perform sign extension or a zero-fill." +msgstr "" + +#: c-api/intro.rst:154 +msgid "" +"*integer* should be any signed integer type. *positions* is the number of " +"positions to shift to the right." +msgstr "" + +#: c-api/intro.rst:157 +msgid "" +"Both *integer* and *positions* can be evaluated more than once; " +"consequently, avoid directly passing a function call or some other operation " +"with side-effects to this macro. Instead, store the result as a variable and " +"then pass it." +msgstr "" + +#: c-api/intro.rst:162 +msgid "" +"*type* is unused and only kept for backwards compatibility. Historically, " +"*type* was used to cast *integer*." +msgstr "" + +#: c-api/intro.rst:167 +msgid "" +"This macro is now valid for all signed integer types, not just those for " +"which ``unsigned type`` is legal. As a result, *type* is no longer used." +msgstr "" + +#: c-api/intro.rst:173 msgid "" "Ask the compiler to always inline a static inline function. The compiler can " "ignore it and decide to not inline the function." msgstr "" -#: c-api/intro.rst:147 +#: c-api/intro.rst:176 msgid "" "It can be used to inline performance critical static inline functions when " "building Python in debug mode with function inlining disabled. For example, " "MSC disables function inlining when building in debug mode." msgstr "" -#: c-api/intro.rst:151 +#: c-api/intro.rst:180 msgid "" "Marking blindly a static inline function with Py_ALWAYS_INLINE can result in " "worse performances (due to increased code size for example). The compiler is " "usually smarter than the developer for the cost/benefit analysis." msgstr "" -#: c-api/intro.rst:155 +#: c-api/intro.rst:184 msgid "" "If Python is :ref:`built in debug mode ` (if the :c:macro:" "`Py_DEBUG` macro is defined), the :c:macro:`Py_ALWAYS_INLINE` macro does " "nothing." msgstr "" -#: c-api/intro.rst:158 +#: c-api/intro.rst:187 msgid "It must be specified before the function return type. Usage::" msgstr "" -#: c-api/intro.rst:160 +#: c-api/intro.rst:189 msgid "static inline Py_ALWAYS_INLINE int random(void) { return 4; }" msgstr "" -#: c-api/intro.rst:166 +#: c-api/intro.rst:195 +msgid "" +"If this macro is defined, then the current system is able to start threads." +msgstr "" + +#: c-api/intro.rst:197 +msgid "" +"Currently, all systems supported by CPython (per :pep:`11`), with the " +"exception of some WebAssembly platforms, support starting threads." +msgstr "" + +#: c-api/intro.rst:204 msgid "" "Argument must be a character or an integer in the range [-128, 127] or [0, " "255]. This macro returns ``c`` cast to an ``unsigned char``." msgstr "" -#: c-api/intro.rst:171 +#: c-api/intro.rst:209 msgid "" "Use this for deprecated declarations. The macro must be placed before the " "symbol name." msgstr "" -#: c-api/intro.rst:294 c-api/intro.rst:312 +#: c-api/intro.rst:388 c-api/intro.rst:406 msgid "Example::" msgstr "" -#: c-api/intro.rst:176 +#: c-api/intro.rst:214 msgid "Py_DEPRECATED(3.8) PyAPI_FUNC(int) Py_OldFunction(void);" msgstr "" -#: c-api/intro.rst:178 +#: c-api/intro.rst:216 msgid "MSVC support was added." msgstr "" -#: c-api/intro.rst:183 +#: c-api/intro.rst:221 +msgid "" +"This is equivalent to ``X``, which is useful for token-pasting in macros, as " +"macro expansions in *X* are forcefully evaluated by the preprocessor." +msgstr "" + +#: c-api/intro.rst:227 +msgid "" +"Use a GCC attribute *name*, hiding it from compilers that don't support GCC " +"attributes (such as MSVC)." +msgstr "" + +#: c-api/intro.rst:230 +msgid "" +"This expands to ``__attribute__((name))`` on a GCC compiler, and expands to " +"nothing on compilers that don't support GCC attributes." +msgstr "" + +#: c-api/intro.rst:235 msgid "" "Like ``getenv(s)``, but returns ``NULL`` if :option:`-E` was passed on the " "command line (see :c:member:`PyConfig.use_environment`)." msgstr "" -#: c-api/intro.rst:188 +#: c-api/intro.rst:240 +msgid "Use *number* as a ``long long`` integer literal." +msgstr "" + +#: c-api/intro.rst:242 +msgid "" +"This usally expands to *number* followed by ``LL``, but will expand to some " +"compiler-specific suffixes (such as ``I64``) on older compilers." +msgstr "" + +#: c-api/intro.rst:245 +msgid "" +"In modern versions of Python, this macro is not very useful, as C99 and " +"later require the ``LL`` suffix to be valid for an integer." +msgstr "" + +#: c-api/intro.rst:250 msgid "" "Declare a function returning the specified *type* using a fast-calling " "qualifier for functions that are local to the current file. Semantically, " "this is equivalent to ``static type``." msgstr "" -#: c-api/intro.rst:194 +#: c-api/intro.rst:256 msgid "" "Equivalent to :c:macro:`Py_LOCAL` but additionally requests the function be " "inlined." msgstr "" -#: c-api/intro.rst:199 +#: c-api/intro.rst:261 +msgid "" +"Macro used to declare a symbol as local to the shared library (hidden). On " +"supported platforms, it ensures the symbol is not exported." +msgstr "" + +#: c-api/intro.rst:264 +msgid "" +"On compatible versions of GCC/Clang, it expands to " +"``__attribute__((visibility(\"hidden\")))``." +msgstr "" + +#: c-api/intro.rst:269 msgid "Return the maximum value between ``x`` and ``y``." msgstr "" -#: c-api/intro.rst:205 +#: c-api/intro.rst:275 msgid "Return the size of a structure (``type``) ``member`` in bytes." msgstr "" -#: c-api/intro.rst:211 +#: c-api/intro.rst:281 msgid "Return the minimum value between ``x`` and ``y``." msgstr "" -#: c-api/intro.rst:217 +#: c-api/intro.rst:287 msgid "" "Disable inlining on a function. For example, it reduces the C stack " "consumption: useful on LTO+PGO builds which heavily inline code (see :issue:" "`33720`)." msgstr "" -#: c-api/intro.rst:221 +#: c-api/intro.rst:291 msgid "Usage::" msgstr "" -#: c-api/intro.rst:223 +#: c-api/intro.rst:293 msgid "Py_NO_INLINE static int random(void) { return 4; }" msgstr "" -#: c-api/intro.rst:229 +#: c-api/intro.rst:299 +msgid "" +"Cast *value* to type *smaller* from type *larger*, validating that no " +"information was lost." +msgstr "" + +#: c-api/intro.rst:302 +msgid "" +"On release builds of Python, this is roughly equivalent to ``(smaller) " +"value`` (in C++, ``static_cast(value)`` will be used instead)." +msgstr "" + +#: c-api/intro.rst:306 +msgid "" +"On debug builds (implying that :c:macro:`Py_DEBUG` is defined), this asserts " +"that no information was lost with the cast from *larger* to *smaller*." +msgstr "" + +#: c-api/intro.rst:309 +msgid "" +"*value*, *larger*, and *smaller* may all be evaluated more than once in the " +"expression; consequently, do not pass an expression with side-effects " +"directly to this macro." +msgstr "" + +#: c-api/intro.rst:315 msgid "" "Convert ``x`` to a C string. E.g. ``Py_STRINGIFY(123)`` returns ``\"123\"``." msgstr "" -#: c-api/intro.rst:236 +#: c-api/intro.rst:322 +msgid "" +"Similar to :c:macro:`Py_LL`, but *number* will be an ``unsigned long long`` " +"literal instead. This is done by appending ``U`` to the result of ``Py_LL``." +msgstr "" + +#: c-api/intro.rst:325 +msgid "" +"In modern versions of Python, this macro is not very useful, as C99 and " +"later require the ``ULL``/``LLU`` suffixes to be valid for an integer." +msgstr "" + +#: c-api/intro.rst:330 msgid "" "Use this when you have a code path that cannot be reached by design. For " "example, in the ``default:`` clause in a ``switch`` statement for which all " @@ -317,20 +452,20 @@ msgid "" "where you might be tempted to put an ``assert(0)`` or ``abort()`` call." msgstr "" -#: c-api/intro.rst:241 +#: c-api/intro.rst:335 msgid "" "In release mode, the macro helps the compiler to optimize the code, and " "avoids a warning about unreachable code. For example, the macro is " "implemented with ``__builtin_unreachable()`` on GCC in release mode." msgstr "" -#: c-api/intro.rst:245 +#: c-api/intro.rst:339 msgid "" -"A use for ``Py_UNREACHABLE()`` is following a call a function that never " +"A use for ``Py_UNREACHABLE()`` is following a call to a function that never " "returns but that is not declared :c:macro:`_Py_NO_RETURN`." msgstr "" -#: c-api/intro.rst:248 +#: c-api/intro.rst:342 msgid "" "If a code path is very unlikely code but can be reached under exceptional " "case, this macro must not be used. For example, under low memory condition " @@ -339,52 +474,52 @@ msgid "" "reported to caller, :c:func:`Py_FatalError` can be used." msgstr "" -#: c-api/intro.rst:258 +#: c-api/intro.rst:352 msgid "" "Use this for unused arguments in a function definition to silence compiler " "warnings. Example: ``int func(int a, int Py_UNUSED(b)) { return a; }``." msgstr "" -#: c-api/intro.rst:265 +#: c-api/intro.rst:359 msgid "" "Asserts a compile-time condition *cond*, as a statement. The build will fail " "if the condition is false or cannot be evaluated at compile time." msgstr "" -#: c-api/intro.rst:279 c-api/intro.rst:324 +#: c-api/intro.rst:373 c-api/intro.rst:418 msgid "For example::" msgstr "" -#: c-api/intro.rst:270 +#: c-api/intro.rst:364 msgid "Py_BUILD_ASSERT(sizeof(PyTime_t) == sizeof(int64_t));" msgstr "" -#: c-api/intro.rst:276 +#: c-api/intro.rst:370 msgid "" "Asserts a compile-time condition *cond*, as an expression that evaluates to " "``0``. The build will fail if the condition is false or cannot be evaluated " "at compile time." msgstr "" -#: c-api/intro.rst:281 +#: c-api/intro.rst:375 msgid "" "#define foo_to_char(foo) \\\n" " ((char *)(foo) + Py_BUILD_ASSERT_EXPR(offsetof(struct foo, string) == 0))" msgstr "" -#: c-api/intro.rst:288 +#: c-api/intro.rst:382 msgid "" "Creates a variable with name *name* that can be used in docstrings. If " "Python is built without docstrings, the value will be empty." msgstr "" -#: c-api/intro.rst:291 +#: c-api/intro.rst:385 msgid "" "Use :c:macro:`PyDoc_STRVAR` for docstrings to support building Python " "without docstrings, as specified in :pep:`7`." msgstr "" -#: c-api/intro.rst:296 +#: c-api/intro.rst:390 msgid "" "PyDoc_STRVAR(pop_doc, \"Remove and return the rightmost element.\");\n" "\n" @@ -395,19 +530,19 @@ msgid "" "}" msgstr "" -#: c-api/intro.rst:306 +#: c-api/intro.rst:400 msgid "" "Creates a docstring for the given input string or an empty string if " "docstrings are disabled." msgstr "" -#: c-api/intro.rst:309 +#: c-api/intro.rst:403 msgid "" "Use :c:macro:`PyDoc_STR` in specifying docstrings to support building Python " "without docstrings, as specified in :pep:`7`." msgstr "" -#: c-api/intro.rst:314 +#: c-api/intro.rst:408 msgid "" "static PyMethodDef pysqlite_row_methods[] = {\n" " {\"keys\", (PyCFunction)pysqlite_row_keys, METH_NOARGS,\n" @@ -416,11 +551,11 @@ msgid "" "};" msgstr "" -#: c-api/intro.rst:322 +#: c-api/intro.rst:416 msgid "Declares a static character array variable with the given name *name*." msgstr "" -#: c-api/intro.rst:326 +#: c-api/intro.rst:420 msgid "" "PyDoc_VAR(python_doc) = PyDoc_STR(\"A genus of constricting snakes in the " "Pythonidae family native \"\n" @@ -428,11 +563,11 @@ msgid "" "Eastern Hemisphere.\");" msgstr "" -#: c-api/intro.rst:331 +#: c-api/intro.rst:425 msgid "Compute the length of a statically allocated C array at compile time." msgstr "" -#: c-api/intro.rst:333 +#: c-api/intro.rst:427 msgid "" "The *array* argument must be a C array with a size known at compile time. " "Passing an array with an unknown size, such as a heap-allocated array, will " @@ -440,19 +575,66 @@ msgid "" "incorrect results." msgstr "" -#: c-api/intro.rst:338 +#: c-api/intro.rst:432 msgid "This is roughly equivalent to::" msgstr "" -#: c-api/intro.rst:340 +#: c-api/intro.rst:434 msgid "sizeof(array) / sizeof((array)[0])" msgstr "" -#: c-api/intro.rst:346 +#: c-api/intro.rst:439 +msgid "" +"Macro used to declare a symbol (function or data) as exported. On Windows, " +"this expands to ``__declspec(dllexport)``. On compatible versions of GCC/" +"Clang, it expands to ``__attribute__((visibility(\"default\")))``. This " +"macro is for defining the C API itself; extension modules should not use it." +msgstr "" + +#: c-api/intro.rst:448 +msgid "" +"Macro used to declare a symbol as imported. On Windows, this expands to " +"``__declspec(dllimport)``. This macro is for defining the C API itself; " +"extension modules should not use it." +msgstr "" + +#: c-api/intro.rst:455 +msgid "" +"Macro used by CPython to declare a function as part of the C API. Its " +"expansion depends on the platform and build configuration. This macro is " +"intended for defining CPython's C API itself; extension modules should not " +"use it for their own symbols." +msgstr "" + +#: c-api/intro.rst:463 +msgid "" +"Macro used by CPython to declare a public global variable as part of the C " +"API. Its expansion depends on the platform and build configuration. This " +"macro is intended for defining CPython's C API itself; extension modules " +"should not use it for their own symbols." +msgstr "" + +#: c-api/intro.rst:470 +msgid "" +"This is a :term:`soft deprecated` alias to the C99-standard ``va_copy`` " +"function." +msgstr "" + +#: c-api/intro.rst:473 +msgid "" +"Historically, this would use a compiler-specific method to copy a " +"``va_list``." +msgstr "" + +#: c-api/intro.rst:475 +msgid "This is now an alias to ``va_copy``." +msgstr "" + +#: c-api/intro.rst:482 msgid "Objects, Types and Reference Counts" msgstr "" -#: c-api/intro.rst:350 +#: c-api/intro.rst:486 msgid "" "Most Python/C API functions have one or more arguments as well as a return " "value of type :c:expr:`PyObject*`. This type is a pointer to an opaque data " @@ -467,7 +649,7 @@ msgid "" "objects." msgstr "" -#: c-api/intro.rst:361 +#: c-api/intro.rst:497 msgid "" "All Python objects (even Python integers) have a :dfn:`type` and a :dfn:" "`reference count`. An object's type determines what kind of object it is (e." @@ -478,11 +660,11 @@ msgid "" "a Python list." msgstr "" -#: c-api/intro.rst:372 +#: c-api/intro.rst:508 msgid "Reference Counts" msgstr "" -#: c-api/intro.rst:374 +#: c-api/intro.rst:510 msgid "" "The reference count is important because today's computers have a finite " "(and often severely limited) memory size; it counts how many different " @@ -497,7 +679,7 @@ msgid "" "that.\")" msgstr "" -#: c-api/intro.rst:391 +#: c-api/intro.rst:527 msgid "" "Reference counts are always manipulated explicitly. The normal way is to " "use the macro :c:func:`Py_INCREF` to take a new reference to an object (i.e. " @@ -516,7 +698,7 @@ msgid "" "increment is a simple operation." msgstr "" -#: c-api/intro.rst:407 +#: c-api/intro.rst:543 msgid "" "It is not necessary to hold a :term:`strong reference` (i.e. increment the " "reference count) for every local variable that contains a pointer to an " @@ -534,7 +716,7 @@ msgid "" "reference to every argument for the duration of the call." msgstr "" -#: c-api/intro.rst:423 +#: c-api/intro.rst:559 msgid "" "However, a common pitfall is to extract an object from a list and hold on to " "it for a while without taking a new reference. Some other operation might " @@ -545,7 +727,7 @@ msgid "" "`Py_DECREF`, so almost any operation is potentially dangerous." msgstr "" -#: c-api/intro.rst:431 +#: c-api/intro.rst:567 msgid "" "A safe approach is to always use the generic operations (functions whose " "name begins with ``PyObject_``, ``PyNumber_``, ``PySequence_`` or " @@ -555,11 +737,11 @@ msgid "" "when they are done with the result; this soon becomes second nature." msgstr "" -#: c-api/intro.rst:442 +#: c-api/intro.rst:578 msgid "Reference Count Details" msgstr "" -#: c-api/intro.rst:444 +#: c-api/intro.rst:580 msgid "" "The reference count behavior of functions in the Python/C API is best " "explained in terms of *ownership of references*. Ownership pertains to " @@ -576,16 +758,22 @@ msgid "" "`borrowed reference`." msgstr "" -#: c-api/intro.rst:457 +#: c-api/intro.rst:593 msgid "" "Conversely, when a calling function passes in a reference to an object, " "there are two possibilities: the function *steals* a reference to the " -"object, or it does not. *Stealing a reference* means that when you pass a " -"reference to a function, that function assumes that it now owns that " -"reference, and you are not responsible for it any longer." +"object, or it does not." +msgstr "" + +#: c-api/intro.rst:597 +msgid "" +"*Stealing a reference* means that when you pass a reference to a function, " +"that function assumes that it now owns that reference. Since the new owner " +"can use :c:func:`!Py_DECREF` at its discretion, you (the caller) must not " +"use that reference after the call." msgstr "" -#: c-api/intro.rst:467 +#: c-api/intro.rst:606 msgid "" "Few functions steal references; the two notable exceptions are :c:func:" "`PyList_SetItem` and :c:func:`PyTuple_SetItem`, which steal a reference to " @@ -597,7 +785,7 @@ msgid "" "below)::" msgstr "" -#: c-api/intro.rst:475 +#: c-api/intro.rst:614 msgid "" "PyObject *t;\n" "\n" @@ -607,7 +795,7 @@ msgid "" "PyTuple_SetItem(t, 2, PyUnicode_FromString(\"three\"));" msgstr "" -#: c-api/intro.rst:482 +#: c-api/intro.rst:621 msgid "" "Here, :c:func:`PyLong_FromLong` returns a new reference which is immediately " "stolen by :c:func:`PyTuple_SetItem`. When you want to keep using an object " @@ -615,7 +803,7 @@ msgid "" "another reference before calling the reference-stealing function." msgstr "" -#: c-api/intro.rst:487 +#: c-api/intro.rst:626 msgid "" "Incidentally, :c:func:`PyTuple_SetItem` is the *only* way to set tuple " "items; :c:func:`PySequence_SetItem` and :c:func:`PyObject_SetItem` refuse to " @@ -623,13 +811,13 @@ msgid "" "func:`PyTuple_SetItem` for tuples that you are creating yourself." msgstr "" -#: c-api/intro.rst:492 +#: c-api/intro.rst:631 msgid "" "Equivalent code for populating a list can be written using :c:func:" "`PyList_New` and :c:func:`PyList_SetItem`." msgstr "" -#: c-api/intro.rst:495 +#: c-api/intro.rst:634 msgid "" "However, in practice, you will rarely use these ways of creating and " "populating a tuple or list. There's a generic function, :c:func:" @@ -638,7 +826,7 @@ msgid "" "be replaced by the following (which also takes care of the error checking)::" msgstr "" -#: c-api/intro.rst:501 +#: c-api/intro.rst:640 msgid "" "PyObject *tuple, *list;\n" "\n" @@ -646,7 +834,7 @@ msgid "" "list = Py_BuildValue(\"[iis]\", 1, 2, \"three\");" msgstr "" -#: c-api/intro.rst:506 +#: c-api/intro.rst:645 msgid "" "It is much more common to use :c:func:`PyObject_SetItem` and friends with " "items whose references you are only borrowing, like arguments that were " @@ -657,7 +845,7 @@ msgid "" "sequence) to a given item::" msgstr "" -#: c-api/intro.rst:513 +#: c-api/intro.rst:652 msgid "" "int\n" "set_all(PyObject *target, PyObject *item)\n" @@ -681,7 +869,7 @@ msgid "" "}" msgstr "" -#: c-api/intro.rst:536 +#: c-api/intro.rst:675 msgid "" "The situation is slightly different for function return values. While " "passing a reference to most functions does not change your ownership " @@ -694,7 +882,7 @@ msgid "" "becomes the owner of the reference)." msgstr "" -#: c-api/intro.rst:545 +#: c-api/intro.rst:684 msgid "" "It is important to realize that whether you own a reference returned by a " "function depends on which function you call only --- *the plumage* (the type " @@ -705,14 +893,14 @@ msgid "" "the same arguments), you do own a reference to the returned object." msgstr "" -#: c-api/intro.rst:557 +#: c-api/intro.rst:696 msgid "" "Here is an example of how you could write a function that computes the sum " "of the items in a list of integers; once using :c:func:`PyList_GetItem`, " "and once using :c:func:`PySequence_GetItem`. ::" msgstr "" -#: c-api/intro.rst:561 +#: c-api/intro.rst:700 msgid "" "long\n" "sum_list(PyObject *list)\n" @@ -737,7 +925,7 @@ msgid "" "}" msgstr "" -#: c-api/intro.rst:587 +#: c-api/intro.rst:726 msgid "" "long\n" "sum_sequence(PyObject *sequence)\n" @@ -768,11 +956,11 @@ msgid "" "}" msgstr "" -#: c-api/intro.rst:621 +#: c-api/intro.rst:760 msgid "Types" msgstr "" -#: c-api/intro.rst:623 +#: c-api/intro.rst:762 msgid "" "There are few other data types that play a significant role in the Python/C " "API; most are simple C types such as :c:expr:`int`, :c:expr:`long`, :c:expr:" @@ -783,7 +971,7 @@ msgid "" "that use them." msgstr "" -#: c-api/intro.rst:633 +#: c-api/intro.rst:772 msgid "" "A signed integral type such that ``sizeof(Py_ssize_t) == sizeof(size_t)``. " "C99 doesn't define such a thing directly (size_t is an unsigned integral " @@ -791,11 +979,11 @@ msgid "" "positive value of type :c:type:`Py_ssize_t`." msgstr "" -#: c-api/intro.rst:642 +#: c-api/intro.rst:781 msgid "Exceptions" msgstr "" -#: c-api/intro.rst:644 +#: c-api/intro.rst:783 msgid "" "The Python programmer only needs to deal with exceptions if specific error " "handling is required; unhandled exceptions are automatically propagated to " @@ -804,7 +992,7 @@ msgid "" "stack traceback." msgstr "" -#: c-api/intro.rst:652 +#: c-api/intro.rst:791 msgid "" "For C programmers, however, error checking always has to be explicit. All " "functions in the Python/C API can raise exceptions, unless an explicit claim " @@ -819,7 +1007,7 @@ msgid "" "explicitly documented." msgstr "" -#: c-api/intro.rst:667 +#: c-api/intro.rst:806 msgid "" "Exception state is maintained in per-thread storage (this is equivalent to " "using global storage in an unthreaded application). A thread can be in one " @@ -832,7 +1020,7 @@ msgid "" "clears the exception state." msgstr "" -#: c-api/intro.rst:677 +#: c-api/intro.rst:816 msgid "" "The full exception state consists of three objects (all of which can be " "``NULL``): the exception type, the corresponding exception value, and the " @@ -845,7 +1033,7 @@ msgid "" "``sys.exc_info()`` and friends." msgstr "" -#: c-api/intro.rst:689 +#: c-api/intro.rst:828 msgid "" "Note that starting with Python 1.5, the preferred, thread-safe way to access " "the exception state from Python code is to call the function :func:`sys." @@ -859,7 +1047,7 @@ msgid "" "referenced by the stack frames in the traceback." msgstr "" -#: c-api/intro.rst:700 +#: c-api/intro.rst:839 msgid "" "As a general principle, a function that calls another function to perform " "some task should check whether the called function raised an exception, and " @@ -870,7 +1058,7 @@ msgid "" "of the error." msgstr "" -#: c-api/intro.rst:709 +#: c-api/intro.rst:848 msgid "" "A simple example of detecting exceptions and passing them on is shown in " "the :c:func:`!sum_sequence` example above. It so happens that this example " @@ -879,7 +1067,7 @@ msgid "" "why you like Python, we show the equivalent Python code::" msgstr "" -#: c-api/intro.rst:715 +#: c-api/intro.rst:854 msgid "" "def incr_item(dict, key):\n" " try:\n" @@ -889,11 +1077,11 @@ msgid "" " dict[key] = item + 1" msgstr "" -#: c-api/intro.rst:724 +#: c-api/intro.rst:863 msgid "Here is the corresponding C code, in all its glory::" msgstr "" -#: c-api/intro.rst:726 +#: c-api/intro.rst:865 msgid "" "int\n" "incr_item(PyObject *dict, PyObject *key)\n" @@ -939,7 +1127,7 @@ msgid "" "}" msgstr "" -#: c-api/intro.rst:776 +#: c-api/intro.rst:915 msgid "" "This example represents an endorsed use of the ``goto`` statement in C! It " "illustrates the use of :c:func:`PyErr_ExceptionMatches` and :c:func:" @@ -952,11 +1140,11 @@ msgid "" "success after the final call made is successful." msgstr "" -#: c-api/intro.rst:790 +#: c-api/intro.rst:929 msgid "Embedding Python" msgstr "" -#: c-api/intro.rst:792 +#: c-api/intro.rst:931 msgid "" "The one important task that only embedders (as opposed to extension writers) " "of the Python interpreter have to worry about is the initialization, and " @@ -964,7 +1152,7 @@ msgid "" "the interpreter can only be used after the interpreter has been initialized." msgstr "" -#: c-api/intro.rst:805 +#: c-api/intro.rst:944 msgid "" "The basic initialization function is :c:func:`Py_Initialize`. This " "initializes the table of loaded modules, and creates the fundamental " @@ -972,7 +1160,7 @@ msgid "" "initializes the module search path (``sys.path``)." msgstr "" -#: c-api/intro.rst:810 +#: c-api/intro.rst:949 msgid "" ":c:func:`Py_Initialize` does not set the \"script argument list\" (``sys." "argv``). If this variable is needed by Python code that will be executed " @@ -980,7 +1168,7 @@ msgid "" "must be set: see :ref:`Python Initialization Configuration `." msgstr "" -#: c-api/intro.rst:815 +#: c-api/intro.rst:954 msgid "" "On most systems (in particular, on Unix and Windows, although the details " "are slightly different), :c:func:`Py_Initialize` calculates the module " @@ -992,7 +1180,7 @@ msgid "" "on the shell command search path (the environment variable :envvar:`PATH`)." msgstr "" -#: c-api/intro.rst:824 +#: c-api/intro.rst:963 msgid "" "For instance, if the Python executable is found in :file:`/usr/local/bin/" "python`, it will assume that the libraries are in :file:`/usr/local/lib/" @@ -1003,7 +1191,7 @@ msgid "" "in front of the standard path by setting :envvar:`PYTHONPATH`." msgstr "" -#: c-api/intro.rst:838 +#: c-api/intro.rst:977 msgid "" "The embedding application can steer the search by setting :c:member:" "`PyConfig.program_name` *before* calling :c:func:`Py_InitializeFromConfig`. " @@ -1014,7 +1202,7 @@ msgid "" "func:`Py_GetProgramFullPath` (all defined in :file:`Modules/getpath.c`)." msgstr "" -#: c-api/intro.rst:849 +#: c-api/intro.rst:988 msgid "" "Sometimes, it is desirable to \"uninitialize\" Python. For instance, the " "application may want to start over (make another call to :c:func:" @@ -1028,18 +1216,18 @@ msgid "" "released." msgstr "" -#: c-api/intro.rst:863 +#: c-api/intro.rst:1002 msgid "Debugging Builds" msgstr "" -#: c-api/intro.rst:865 +#: c-api/intro.rst:1004 msgid "" "Python can be built with several macros to enable extra checks of the " "interpreter and extension modules. These checks tend to add a large amount " "of overhead to the runtime so they are not enabled by default." msgstr "" -#: c-api/intro.rst:869 +#: c-api/intro.rst:1008 msgid "" "A full list of the various types of debugging builds is in the file :file:" "`Misc/SpecialBuilds.txt` in the Python source distribution. Builds are " @@ -1049,7 +1237,7 @@ msgid "" "section." msgstr "" -#: c-api/intro.rst:877 +#: c-api/intro.rst:1016 msgid "" "Compiling the interpreter with the :c:macro:`!Py_DEBUG` macro defined " "produces what is generally meant by :ref:`a debug build of Python `." msgstr "" -#: c-api/intro.rst:888 +#: c-api/intro.rst:1027 msgid "" "Defining :c:macro:`Py_TRACE_REFS` enables reference tracing (see the :option:" "`configure --with-trace-refs option <--with-trace-refs>`). When defined, a " @@ -1076,55 +1264,55 @@ msgid "" "this happens after every statement run by the interpreter.)" msgstr "" -#: c-api/intro.rst:895 +#: c-api/intro.rst:1034 msgid "" "Please refer to :file:`Misc/SpecialBuilds.txt` in the Python source " "distribution for more detailed information." msgstr "" -#: c-api/intro.rst:902 +#: c-api/intro.rst:1041 msgid "Recommended third party tools" msgstr "" -#: c-api/intro.rst:904 +#: c-api/intro.rst:1043 msgid "" "The following third party tools offer both simpler and more sophisticated " "approaches to creating C, C++ and Rust extensions for Python:" msgstr "" -#: c-api/intro.rst:907 +#: c-api/intro.rst:1046 msgid "`Cython `_" msgstr "" -#: c-api/intro.rst:908 +#: c-api/intro.rst:1047 msgid "`cffi `_" msgstr "" -#: c-api/intro.rst:909 +#: c-api/intro.rst:1048 msgid "`HPy `_" msgstr "" -#: c-api/intro.rst:910 +#: c-api/intro.rst:1049 msgid "`nanobind `_ (C++)" msgstr "" -#: c-api/intro.rst:911 +#: c-api/intro.rst:1050 msgid "`Numba `_" msgstr "" -#: c-api/intro.rst:912 +#: c-api/intro.rst:1051 msgid "`pybind11 `_ (C++)" msgstr "" -#: c-api/intro.rst:913 +#: c-api/intro.rst:1052 msgid "`PyO3 `_ (Rust)" msgstr "" -#: c-api/intro.rst:914 +#: c-api/intro.rst:1053 msgid "`SWIG `_" msgstr "" -#: c-api/intro.rst:916 +#: c-api/intro.rst:1055 msgid "" "Using tools such as these can help avoid writing code that is tightly bound " "to a particular version of CPython, avoid reference counting errors, and " @@ -1135,7 +1323,7 @@ msgid "" "sources." msgstr "" -#: c-api/intro.rst:923 +#: c-api/intro.rst:1062 msgid "" "These projects are not supported by the same people who maintain Python, and " "issues need to be raised with the projects directly. Remember to check that " @@ -1143,139 +1331,139 @@ msgid "" "outdated." msgstr "" -#: c-api/intro.rst:930 +#: c-api/intro.rst:1069 msgid "" "`Python Packaging User Guide: Binary Extensions `_" msgstr "" -#: c-api/intro.rst:931 +#: c-api/intro.rst:1070 msgid "" "The Python Packaging User Guide not only covers several available tools that " "simplify the creation of binary extensions, but also discusses the various " "reasons why creating an extension module may be desirable in the first place." msgstr "" -#: c-api/intro.rst:348 +#: c-api/intro.rst:484 msgid "object" msgstr "" -#: c-api/intro.rst:348 +#: c-api/intro.rst:484 msgid "type" msgstr "" -#: c-api/intro.rst:387 +#: c-api/intro.rst:523 msgid "Py_INCREF (C function)" msgstr "" -#: c-api/intro.rst:387 +#: c-api/intro.rst:523 msgid "Py_DECREF (C function)" msgstr "" -#: c-api/intro.rst:463 +#: c-api/intro.rst:602 msgid "PyList_SetItem (C function)" msgstr "" -#: c-api/intro.rst:463 +#: c-api/intro.rst:602 msgid "PyTuple_SetItem (C function)" msgstr "" -#: c-api/intro.rst:534 +#: c-api/intro.rst:673 msgid "set_all()" msgstr "" -#: c-api/intro.rst:553 +#: c-api/intro.rst:692 msgid "PyList_GetItem (C function)" msgstr "" -#: c-api/intro.rst:553 +#: c-api/intro.rst:692 msgid "PySequence_GetItem (C function)" msgstr "" -#: c-api/intro.rst:583 +#: c-api/intro.rst:722 msgid "sum_list()" msgstr "" -#: c-api/intro.rst:707 +#: c-api/intro.rst:846 msgid "sum_sequence()" msgstr "" -#: c-api/intro.rst:650 +#: c-api/intro.rst:789 msgid "PyErr_Occurred (C function)" msgstr "" -#: c-api/intro.rst:663 +#: c-api/intro.rst:802 msgid "PyErr_SetString (C function)" msgstr "" -#: c-api/intro.rst:771 +#: c-api/intro.rst:910 msgid "PyErr_Clear (C function)" msgstr "" -#: c-api/intro.rst:687 +#: c-api/intro.rst:826 msgid "exc_info (in module sys)" msgstr "" -#: c-api/intro.rst:769 +#: c-api/intro.rst:908 msgid "incr_item()" msgstr "" -#: c-api/intro.rst:771 +#: c-api/intro.rst:910 msgid "PyErr_ExceptionMatches (C function)" msgstr "" -#: c-api/intro.rst:771 +#: c-api/intro.rst:910 msgid "Py_XDECREF (C function)" msgstr "" -#: c-api/intro.rst:797 +#: c-api/intro.rst:936 msgid "Py_Initialize (C function)" msgstr "" -#: c-api/intro.rst:797 +#: c-api/intro.rst:936 msgid "module" msgstr "" -#: c-api/intro.rst:797 +#: c-api/intro.rst:936 msgid "builtins" msgstr "" -#: c-api/intro.rst:797 +#: c-api/intro.rst:936 msgid "__main__" msgstr "" -#: c-api/intro.rst:797 +#: c-api/intro.rst:936 msgid "sys" msgstr "" -#: c-api/intro.rst:797 +#: c-api/intro.rst:936 msgid "search" msgstr "" -#: c-api/intro.rst:797 +#: c-api/intro.rst:936 msgid "path" msgstr "" -#: c-api/intro.rst:797 +#: c-api/intro.rst:936 msgid "path (in module sys)" msgstr "" -#: c-api/intro.rst:832 +#: c-api/intro.rst:971 msgid "Py_GetPath (C function)" msgstr "" -#: c-api/intro.rst:832 +#: c-api/intro.rst:971 msgid "Py_GetPrefix (C function)" msgstr "" -#: c-api/intro.rst:832 +#: c-api/intro.rst:971 msgid "Py_GetExecPrefix (C function)" msgstr "" -#: c-api/intro.rst:832 +#: c-api/intro.rst:971 msgid "Py_GetProgramFullPath (C function)" msgstr "" -#: c-api/intro.rst:847 +#: c-api/intro.rst:986 msgid "Py_IsInitialized (C function)" msgstr "" diff --git a/c-api/iter.po b/c-api/iter.po index 28fcf1af1..81e904edb 100644 --- a/c-api/iter.po +++ b/c-api/iter.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/iterator.po b/c-api/iterator.po index a3b5f3d91..a257c6bf3 100644 --- a/c-api/iterator.po +++ b/c-api/iterator.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/list.po b/c-api/list.po index f7fa120e8..82b1b9036 100644 --- a/c-api/list.po +++ b/c-api/list.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -95,44 +95,45 @@ msgstr "" #: c-api/list.rst:91 msgid "" -"This function \"steals\" a reference to *item* and discards a reference to " -"an item already in the list at the affected position." +"This function \":term:`steals `\" a reference to *item*, even on " +"error. On success, it discards a reference to an item already in the list at " +"the affected position (unless it was ``NULL``)." msgstr "" -#: c-api/list.rst:97 +#: c-api/list.rst:99 msgid "" "Macro form of :c:func:`PyList_SetItem` without error checking. This is " "normally only used to fill in new lists where there is no previous content." msgstr "" -#: c-api/list.rst:100 +#: c-api/list.rst:102 msgid "" "Bounds checking is performed as an assertion if Python is built in :ref:" "`debug mode ` or :option:`with assertions <--with-assertions>`." msgstr "" -#: c-api/list.rst:106 +#: c-api/list.rst:108 msgid "" -"This macro \"steals\" a reference to *item*, and, unlike :c:func:" -"`PyList_SetItem`, does *not* discard a reference to any item that is being " -"replaced; any reference in *list* at position *i* will be leaked." +"This macro \":term:`steals `\" a reference to *item*, and, unlike :c:" +"func:`PyList_SetItem`, does *not* discard a reference to any item that is " +"being replaced; any reference in *list* at position *i* will be leaked." msgstr "" -#: c-api/list.rst:114 +#: c-api/list.rst:116 msgid "" "Insert the item *item* into list *list* in front of index *index*. Return " "``0`` if successful; return ``-1`` and set an exception if unsuccessful. " "Analogous to ``list.insert(index, item)``." msgstr "" -#: c-api/list.rst:121 +#: c-api/list.rst:123 msgid "" "Append the object *item* at the end of list *list*. Return ``0`` if " "successful; return ``-1`` and set an exception if unsuccessful. Analogous " "to ``list.append(item)``." msgstr "" -#: c-api/list.rst:128 +#: c-api/list.rst:130 msgid "" "Return a list of the objects in *list* containing the objects *between* " "*low* and *high*. Return ``NULL`` and set an exception if unsuccessful. " @@ -140,7 +141,7 @@ msgid "" "supported." msgstr "" -#: c-api/list.rst:135 +#: c-api/list.rst:137 msgid "" "Set the slice of *list* between *low* and *high* to the contents of " "*itemlist*. Analogous to ``list[low:high] = itemlist``. The *itemlist* may " @@ -149,45 +150,45 @@ msgid "" "list is not supported." msgstr "" -#: c-api/list.rst:144 +#: c-api/list.rst:146 msgid "" "Extend *list* with the contents of *iterable*. This is the same as " "``PyList_SetSlice(list, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, iterable)`` and " "analogous to ``list.extend(iterable)`` or ``list += iterable``." msgstr "" -#: c-api/list.rst:148 +#: c-api/list.rst:150 msgid "" "Raise an exception and return ``-1`` if *list* is not a :class:`list` " "object. Return 0 on success." msgstr "" -#: c-api/list.rst:156 +#: c-api/list.rst:158 msgid "" "Remove all items from *list*. This is the same as ``PyList_SetSlice(list, " "0, PY_SSIZE_T_MAX, NULL)`` and analogous to ``list.clear()`` or ``del " "list[:]``." msgstr "" -#: c-api/list.rst:160 +#: c-api/list.rst:162 msgid "" "Raise an exception and return ``-1`` if *list* is not a :class:`list` " "object. Return 0 on success." msgstr "" -#: c-api/list.rst:168 +#: c-api/list.rst:170 msgid "" "Sort the items of *list* in place. Return ``0`` on success, ``-1`` on " "failure. This is equivalent to ``list.sort()``." msgstr "" -#: c-api/list.rst:174 +#: c-api/list.rst:176 msgid "" "Reverse the items of *list* in place. Return ``0`` on success, ``-1`` on " "failure. This is the equivalent of ``list.reverse()``." msgstr "" -#: c-api/list.rst:182 +#: c-api/list.rst:184 msgid "" "Return a new tuple object containing the contents of *list*; equivalent to " "``tuple(list)``." @@ -201,7 +202,7 @@ msgstr "" msgid "list" msgstr "" -#: c-api/list.rst:180 +#: c-api/list.rst:182 msgid "built-in function" msgstr "" @@ -209,6 +210,6 @@ msgstr "" msgid "len" msgstr "" -#: c-api/list.rst:180 +#: c-api/list.rst:182 msgid "tuple" msgstr "" diff --git a/c-api/long.po b/c-api/long.po index 100b04f11..5e771bc8a 100644 --- a/c-api/long.po +++ b/c-api/long.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -175,7 +175,7 @@ msgid "" "`PyLong_FromLongLong`, depending on the size of the system's PID type." msgstr "" -#: c-api/long.rst:197 +#: c-api/long.rst:195 msgid "" "Return a C :c:expr:`long` representation of *obj*. If *obj* is not an " "instance of :c:type:`PyLongObject`, first call its :meth:`~object.__index__` " @@ -188,36 +188,31 @@ msgid "" "expr:`long`." msgstr "" -#: c-api/long.rst:206 c-api/long.rst:247 c-api/long.rst:270 +#: c-api/long.rst:204 c-api/long.rst:245 c-api/long.rst:268 msgid "Returns ``-1`` on error. Use :c:func:`PyErr_Occurred` to disambiguate." msgstr "" -#: c-api/long.rst:208 c-api/long.rst:251 c-api/long.rst:355 +#: c-api/long.rst:206 c-api/long.rst:249 c-api/long.rst:353 msgid "Use :meth:`~object.__index__` if available." msgstr "" -#: c-api/long.rst:211 c-api/long.rst:254 c-api/long.rst:358 +#: c-api/long.rst:209 c-api/long.rst:252 c-api/long.rst:356 msgid "This function will no longer use :meth:`~object.__int__`." msgstr "" #: c-api/long.rst:180 msgid "" -"A :term:`soft deprecated` alias. Exactly equivalent to the preferred " -"``PyLong_AsLong``. In particular, it can fail with :exc:`OverflowError` or " -"another exception." +"Exactly equivalent to the preferred ``PyLong_AsLong``. In particular, it can " +"fail with :exc:`OverflowError` or another exception." msgstr "" -#: c-api/long.rst:184 -msgid "The function is soft deprecated." -msgstr "" - -#: c-api/long.rst:189 +#: c-api/long.rst:187 msgid "" "Similar to :c:func:`PyLong_AsLong`, but store the result in a C :c:expr:" "`int` instead of a C :c:expr:`long`." msgstr "" -#: c-api/long.rst:201 +#: c-api/long.rst:199 msgid "" "If the value of *obj* is greater than :c:macro:`LONG_MAX` or less than :c:" "macro:`LONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and " @@ -225,20 +220,20 @@ msgid "" "exception occurs set *\\*overflow* to ``0`` and return ``-1`` as usual." msgstr "" -#: c-api/long.rst:238 +#: c-api/long.rst:236 msgid "" "Return a C :c:expr:`long long` representation of *obj*. If *obj* is not an " "instance of :c:type:`PyLongObject`, first call its :meth:`~object.__index__` " "method (if present) to convert it to a :c:type:`PyLongObject`." msgstr "" -#: c-api/long.rst:224 +#: c-api/long.rst:222 msgid "" "Raise :exc:`OverflowError` if the value of *obj* is out of range for a :c:" "expr:`long long`." msgstr "" -#: c-api/long.rst:242 +#: c-api/long.rst:240 msgid "" "If the value of *obj* is greater than :c:macro:`LLONG_MAX` or less than :c:" "macro:`LLONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and " @@ -246,133 +241,133 @@ msgid "" "exception occurs set *\\*overflow* to ``0`` and return ``-1`` as usual." msgstr "" -#: c-api/long.rst:264 +#: c-api/long.rst:262 msgid "" "Return a C :c:type:`Py_ssize_t` representation of *pylong*. *pylong* must " "be an instance of :c:type:`PyLongObject`." msgstr "" -#: c-api/long.rst:267 +#: c-api/long.rst:265 msgid "" "Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" "type:`Py_ssize_t`." msgstr "" -#: c-api/long.rst:279 +#: c-api/long.rst:277 msgid "" "Return a C :c:expr:`unsigned long` representation of *pylong*. *pylong* " "must be an instance of :c:type:`PyLongObject`." msgstr "" -#: c-api/long.rst:282 +#: c-api/long.rst:280 msgid "" "Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" "expr:`unsigned long`." msgstr "" -#: c-api/long.rst:285 +#: c-api/long.rst:283 msgid "" "Returns ``(unsigned long)-1`` on error. Use :c:func:`PyErr_Occurred` to " "disambiguate." msgstr "" -#: c-api/long.rst:295 +#: c-api/long.rst:293 msgid "" "Return a C :c:type:`size_t` representation of *pylong*. *pylong* must be an " "instance of :c:type:`PyLongObject`." msgstr "" -#: c-api/long.rst:298 +#: c-api/long.rst:296 msgid "" "Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" "type:`size_t`." msgstr "" -#: c-api/long.rst:301 +#: c-api/long.rst:299 msgid "" "Returns ``(size_t)-1`` on error. Use :c:func:`PyErr_Occurred` to " "disambiguate." msgstr "" -#: c-api/long.rst:310 +#: c-api/long.rst:308 msgid "" "Return a C :c:expr:`unsigned long long` representation of *pylong*. " "*pylong* must be an instance of :c:type:`PyLongObject`." msgstr "" -#: c-api/long.rst:313 +#: c-api/long.rst:311 msgid "" "Raise :exc:`OverflowError` if the value of *pylong* is out of range for an :" "c:expr:`unsigned long long`." msgstr "" -#: c-api/long.rst:316 +#: c-api/long.rst:314 msgid "" "Returns ``(unsigned long long)-1`` on error. Use :c:func:`PyErr_Occurred` to " "disambiguate." msgstr "" -#: c-api/long.rst:319 +#: c-api/long.rst:317 msgid "" "A negative *pylong* now raises :exc:`OverflowError`, not :exc:`TypeError`." msgstr "" -#: c-api/long.rst:325 +#: c-api/long.rst:323 msgid "" "Return a C :c:expr:`unsigned long` representation of *obj*. If *obj* is not " "an instance of :c:type:`PyLongObject`, first call its :meth:`~object." "__index__` method (if present) to convert it to a :c:type:`PyLongObject`." msgstr "" -#: c-api/long.rst:329 +#: c-api/long.rst:327 msgid "" "If the value of *obj* is out of range for an :c:expr:`unsigned long`, return " "the reduction of that value modulo ``ULONG_MAX + 1``." msgstr "" -#: c-api/long.rst:332 +#: c-api/long.rst:330 msgid "" "Returns ``(unsigned long)-1`` on error. Use :c:func:`PyErr_Occurred` to " "disambiguate." msgstr "" -#: c-api/long.rst:344 +#: c-api/long.rst:342 msgid "" "Return a C :c:expr:`unsigned long long` representation of *obj*. If *obj* " "is not an instance of :c:type:`PyLongObject`, first call its :meth:`~object." "__index__` method (if present) to convert it to a :c:type:`PyLongObject`." msgstr "" -#: c-api/long.rst:349 +#: c-api/long.rst:347 msgid "" "If the value of *obj* is out of range for an :c:expr:`unsigned long long`, " "return the reduction of that value modulo ``ULLONG_MAX + 1``." msgstr "" -#: c-api/long.rst:352 +#: c-api/long.rst:350 msgid "" "Returns ``(unsigned long long)-1`` on error. Use :c:func:`PyErr_Occurred` " "to disambiguate." msgstr "" -#: c-api/long.rst:364 +#: c-api/long.rst:362 msgid "" "Return a C :c:expr:`double` representation of *pylong*. *pylong* must be an " "instance of :c:type:`PyLongObject`." msgstr "" -#: c-api/long.rst:367 +#: c-api/long.rst:365 msgid "" "Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" "expr:`double`." msgstr "" -#: c-api/long.rst:370 +#: c-api/long.rst:368 msgid "" "Returns ``-1.0`` on error. Use :c:func:`PyErr_Occurred` to disambiguate." msgstr "" -#: c-api/long.rst:375 +#: c-api/long.rst:373 msgid "" "Convert a Python integer *pylong* to a C :c:expr:`void` pointer. If *pylong* " "cannot be converted, an :exc:`OverflowError` will be raised. This is only " @@ -380,44 +375,45 @@ msgid "" "c:func:`PyLong_FromVoidPtr`." msgstr "" -#: c-api/long.rst:380 +#: c-api/long.rst:378 msgid "" "Returns ``NULL`` on error. Use :c:func:`PyErr_Occurred` to disambiguate." msgstr "" -#: c-api/long.rst:385 +#: c-api/long.rst:383 msgid "Macro for converting a Python integer into a process identifier." msgstr "" -#: c-api/long.rst:387 +#: c-api/long.rst:385 msgid "" "This can be defined as an alias to :c:func:`PyLong_AsLong`, :c:func:" "`PyLong_FromLongLong`, or :c:func:`PyLong_AsInt`, depending on the size of " "the system's PID type." msgstr "" -#: c-api/long.rst:396 +#: c-api/long.rst:394 msgid "" "Copy the Python integer value *pylong* to a native *buffer* of size " "*n_bytes*. The *flags* can be set to ``-1`` to behave similarly to a C cast, " "or to values documented below to control the behavior." msgstr "" -#: c-api/long.rst:400 +#: c-api/long.rst:398 msgid "" "Returns ``-1`` with an exception raised on error. This may happen if " "*pylong* cannot be interpreted as an integer, or if *pylong* was negative " "and the ``Py_ASNATIVEBYTES_REJECT_NEGATIVE`` flag was set." msgstr "" -#: c-api/long.rst:404 +#: c-api/long.rst:402 msgid "" "Otherwise, returns the number of bytes required to store the value. If this " "is equal to or less than *n_bytes*, the entire value was copied. All " -"*n_bytes* of the buffer are written: large buffers are padded with zeroes." +"*n_bytes* of the buffer are written: remaining bytes filled by copies of the " +"sign bit." msgstr "" -#: c-api/long.rst:409 +#: c-api/long.rst:407 msgid "" "If the returned value is greater than *n_bytes*, the value was truncated: as " "many of the lowest bits of the value as could fit are written, and the " @@ -425,25 +421,25 @@ msgid "" "downcast." msgstr "" -#: c-api/long.rst:416 +#: c-api/long.rst:414 msgid "" "Overflow is not considered an error. If the returned value is larger than " "*n_bytes*, most significant bits were discarded." msgstr "" -#: c-api/long.rst:419 +#: c-api/long.rst:417 msgid "``0`` will never be returned." msgstr "" -#: c-api/long.rst:421 +#: c-api/long.rst:419 msgid "Values are always copied as two's-complement." msgstr "" -#: c-api/long.rst:423 +#: c-api/long.rst:421 msgid "Usage example::" msgstr "" -#: c-api/long.rst:425 +#: c-api/long.rst:423 msgid "" "int32_t value;\n" "Py_ssize_t bytes = PyLong_AsNativeBytes(pylong, &value, sizeof(value), -1);\n" @@ -460,26 +456,26 @@ msgid "" "}" msgstr "" -#: c-api/long.rst:439 +#: c-api/long.rst:437 msgid "" "Passing zero to *n_bytes* will return the size of a buffer that would be " "large enough to hold the value. This may be larger than technically " "necessary, but not unreasonably so. If *n_bytes=0*, *buffer* may be ``NULL``." msgstr "" -#: c-api/long.rst:446 +#: c-api/long.rst:444 msgid "" "Passing *n_bytes=0* to this function is not an accurate way to determine the " "bit length of the value." msgstr "" -#: c-api/long.rst:449 +#: c-api/long.rst:447 msgid "" "To get at the entire Python value of an unknown size, the function can be " "called twice: first to determine the buffer size, then to fill it::" msgstr "" -#: c-api/long.rst:452 +#: c-api/long.rst:450 msgid "" "// Ask how much space we need.\n" "Py_ssize_t expected = PyLong_AsNativeBytes(pylong, NULL, 0, -1);\n" @@ -510,69 +506,69 @@ msgid "" "free(bignum);" msgstr "" -#: c-api/long.rst:480 +#: c-api/long.rst:478 msgid "" "*flags* is either ``-1`` (``Py_ASNATIVEBYTES_DEFAULTS``) to select defaults " "that behave most like a C cast, or a combination of the other flags in the " "table below. Note that ``-1`` cannot be combined with other flags." msgstr "" -#: c-api/long.rst:485 +#: c-api/long.rst:483 msgid "" "Currently, ``-1`` corresponds to ``Py_ASNATIVEBYTES_NATIVE_ENDIAN | " "Py_ASNATIVEBYTES_UNSIGNED_BUFFER``." msgstr "" -#: c-api/long.rst:491 +#: c-api/long.rst:489 msgid "Flag" msgstr "" -#: c-api/long.rst:491 +#: c-api/long.rst:489 msgid "Value" msgstr "" -#: c-api/long.rst:493 +#: c-api/long.rst:491 msgid "``-1``" msgstr "" -#: c-api/long.rst:494 +#: c-api/long.rst:492 msgid "``0``" msgstr "" -#: c-api/long.rst:495 +#: c-api/long.rst:493 msgid "``1``" msgstr "" -#: c-api/long.rst:496 +#: c-api/long.rst:494 msgid "``3``" msgstr "" -#: c-api/long.rst:497 +#: c-api/long.rst:495 msgid "``4``" msgstr "" -#: c-api/long.rst:498 +#: c-api/long.rst:496 msgid "``8``" msgstr "" -#: c-api/long.rst:499 +#: c-api/long.rst:497 msgid "``16``" msgstr "" -#: c-api/long.rst:502 +#: c-api/long.rst:500 msgid "" "Specifying ``Py_ASNATIVEBYTES_NATIVE_ENDIAN`` will override any other endian " "flags. Passing ``2`` is reserved." msgstr "" -#: c-api/long.rst:505 +#: c-api/long.rst:503 msgid "" "By default, sufficient buffer will be requested to include a sign bit. For " "example, when converting 128 with *n_bytes=1*, the function will return 2 " "(or more) in order to store a zero sign bit." msgstr "" -#: c-api/long.rst:509 +#: c-api/long.rst:507 msgid "" "If ``Py_ASNATIVEBYTES_UNSIGNED_BUFFER`` is specified, a zero sign bit will " "be omitted from size calculations. This allows, for example, 128 to fit in a " @@ -582,7 +578,7 @@ msgid "" "requested." msgstr "" -#: c-api/long.rst:516 +#: c-api/long.rst:514 msgid "" "Specifying ``Py_ASNATIVEBYTES_REJECT_NEGATIVE`` causes an exception to be " "set if *pylong* is negative. Without this flag, negative values will be " @@ -590,7 +586,7 @@ msgid "" "of whether ``Py_ASNATIVEBYTES_UNSIGNED_BUFFER`` was specified." msgstr "" -#: c-api/long.rst:521 +#: c-api/long.rst:519 msgid "" "If ``Py_ASNATIVEBYTES_ALLOW_INDEX`` is specified and a non-integer value is " "passed, its :meth:`~object.__index__` method will be called first. This may " @@ -600,7 +596,7 @@ msgid "" "`TypeError`." msgstr "" -#: c-api/long.rst:530 +#: c-api/long.rst:528 msgid "" "With the default *flags* (``-1``, or *UNSIGNED_BUFFER* without " "*REJECT_NEGATIVE*), multiple Python integers can map to a single value " @@ -608,22 +604,22 @@ msgid "" "buffer and set all its bits. This matches typical C cast behavior." msgstr "" -#: c-api/long.rst:541 +#: c-api/long.rst:539 msgid "" "On success, return a read only :term:`named tuple`, that holds information " "about Python's internal representation of integers. See :data:`sys.int_info` " "for description of individual fields." msgstr "" -#: c-api/long.rst:545 +#: c-api/long.rst:543 msgid "On failure, return ``NULL`` with an exception set." msgstr "" -#: c-api/long.rst:552 +#: c-api/long.rst:550 msgid "Return 1 if *op* is compact, 0 otherwise." msgstr "" -#: c-api/long.rst:554 +#: c-api/long.rst:552 msgid "" "This function makes it possible for performance-critical code to implement a " "“fast path” for small integers. For compact values use :c:func:" @@ -631,23 +627,23 @@ msgid "" "`PyLong_As* ` function or :c:func:`PyLong_AsNativeBytes`." msgstr "" -#: c-api/long.rst:560 +#: c-api/long.rst:558 msgid "The speedup is expected to be negligible for most users." msgstr "" -#: c-api/long.rst:562 +#: c-api/long.rst:560 msgid "" "Exactly what values are considered compact is an implementation detail and " "is subject to change." msgstr "" -#: c-api/long.rst:570 +#: c-api/long.rst:568 msgid "" "If *op* is compact, as determined by :c:func:`PyUnstable_Long_IsCompact`, " "return its value." msgstr "" -#: c-api/long.rst:573 +#: c-api/long.rst:571 msgid "Otherwise, the return value is undefined." msgstr "" @@ -667,18 +663,18 @@ msgstr "" msgid "LONG_MAX (C macro)" msgstr "" -#: c-api/long.rst:217 c-api/long.rst:275 c-api/long.rst:307 +#: c-api/long.rst:215 c-api/long.rst:273 c-api/long.rst:305 msgid "OverflowError (built-in exception)" msgstr "" -#: c-api/long.rst:260 +#: c-api/long.rst:258 msgid "PY_SSIZE_T_MAX (C macro)" msgstr "" -#: c-api/long.rst:275 +#: c-api/long.rst:273 msgid "ULONG_MAX (C macro)" msgstr "" -#: c-api/long.rst:291 +#: c-api/long.rst:289 msgid "SIZE_MAX (C macro)" msgstr "" diff --git a/c-api/mapping.po b/c-api/mapping.po index e1ef8c694..dd77b9b35 100644 --- a/c-api/mapping.po +++ b/c-api/mapping.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/marshal.po b/c-api/marshal.po index 6180dfa8b..9d62f9162 100644 --- a/c-api/marshal.po +++ b/c-api/marshal.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/memory.po b/c-api/memory.po index 8af2b7c7f..70e7db40b 100644 --- a/c-api/memory.po +++ b/c-api/memory.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -104,8 +104,8 @@ msgid "" "certain circumstances, the Python memory manager may or may not trigger " "appropriate actions, like garbage collection, memory compaction or other " "preventive procedures. Note that by using the C library allocator as shown " -"in the previous example, the allocated memory for the I/O buffer escapes " -"completely the Python memory manager." +"in the previous example, the allocated memory for the I/O buffer completely " +"escapes the Python memory manager." msgstr "" #: c-api/memory.rst:88 @@ -204,7 +204,7 @@ msgid "" "requesting zero bytes." msgstr "" -#: c-api/memory.rst:225 c-api/memory.rst:335 +#: c-api/memory.rst:225 c-api/memory.rst:357 msgid "" "Allocates *n* bytes and returns a pointer of type :c:expr:`void*` to the " "allocated memory, or ``NULL`` if the request fails." @@ -217,11 +217,11 @@ msgid "" "have been initialized in any way." msgstr "" -#: c-api/memory.rst:235 c-api/memory.rst:345 +#: c-api/memory.rst:235 c-api/memory.rst:367 msgid "" -"Allocates *nelem* elements each whose size in bytes is *elsize* and returns " -"a pointer of type :c:expr:`void*` to the allocated memory, or ``NULL`` if " -"the request fails. The memory is initialized to zeros." +"Allocates *nelem* elements each of size *elsize* bytes and returns a pointer " +"of type :c:expr:`void*` to the allocated memory, or ``NULL`` if the request " +"fails. The memory is initialized to zeros." msgstr "" #: c-api/memory.rst:168 @@ -231,7 +231,7 @@ msgid "" "called instead." msgstr "" -#: c-api/memory.rst:248 c-api/memory.rst:358 +#: c-api/memory.rst:248 c-api/memory.rst:380 msgid "" "Resizes the memory block pointed to by *p* to *n* bytes. The contents will " "be unchanged to the minimum of the old and the new sizes." @@ -265,7 +265,7 @@ msgid "" "called before, undefined behavior occurs." msgstr "" -#: c-api/memory.rst:269 c-api/memory.rst:379 +#: c-api/memory.rst:269 c-api/memory.rst:401 msgid "If *p* is ``NULL``, no operation is performed." msgstr "" @@ -273,7 +273,7 @@ msgstr "" msgid "Memory Interface" msgstr "" -#: c-api/memory.rst:315 +#: c-api/memory.rst:337 msgid "" "The following function sets, modeled after the ANSI C standard, but " "specifying behavior when requesting zero bytes, are available for allocating " @@ -286,7 +286,7 @@ msgid "" "ref:`pymalloc memory allocator `." msgstr "" -#: c-api/memory.rst:330 +#: c-api/memory.rst:352 msgid "" "The :term:`GIL ` must be held when using these " "functions." @@ -369,43 +369,56 @@ msgstr "" msgid "Same as :c:func:`PyMem_Free`." msgstr "" -#: c-api/memory.rst:297 +#: c-api/memory.rst:299 +msgid "Deprecated aliases" +msgstr "" + +#: c-api/memory.rst:301 msgid "" -"In addition, the following macro sets are provided for calling the Python " -"memory allocator directly, without involving the C API functions listed " -"above. However, note that their use does not preserve binary compatibility " -"across Python versions and is therefore deprecated in extension modules." +"These are :term:`soft deprecated` aliases to existing functions and macros. " +"They exist solely for backwards compatibility." msgstr "" -#: c-api/memory.rst:302 -msgid "``PyMem_MALLOC(size)``" +#: c-api/memory.rst:308 +msgid "Deprecated alias" msgstr "" -#: c-api/memory.rst:303 -msgid "``PyMem_NEW(type, size)``" +#: c-api/memory.rst:309 +msgid "Corresponding function or macro" msgstr "" -#: c-api/memory.rst:304 -msgid "``PyMem_REALLOC(ptr, size)``" +#: c-api/memory.rst:311 +msgid ":c:func:`PyMem_Malloc`" msgstr "" -#: c-api/memory.rst:305 -msgid "``PyMem_RESIZE(ptr, type, size)``" +#: c-api/memory.rst:313 +msgid ":c:macro:`PyMem_New`" msgstr "" -#: c-api/memory.rst:306 -msgid "``PyMem_FREE(ptr)``" +#: c-api/memory.rst:484 +msgid ":c:func:`PyMem_Realloc`" msgstr "" -#: c-api/memory.rst:307 -msgid "``PyMem_DEL(ptr)``" +#: c-api/memory.rst:317 +msgid ":c:macro:`PyMem_Resize`" msgstr "" -#: c-api/memory.rst:313 +#: c-api/memory.rst:321 c-api/memory.rst:486 +msgid ":c:func:`PyMem_Free`" +msgstr "" + +#: c-api/memory.rst:325 +msgid "" +"The macros are now aliases of the corresponding functions and macros. " +"Previously, their behavior was the same, but their use did not necessarily " +"preserve binary compatibility across Python versions." +msgstr "" + +#: c-api/memory.rst:335 msgid "Object allocators" msgstr "" -#: c-api/memory.rst:320 +#: c-api/memory.rst:342 msgid "" "There is no guarantee that the memory returned by these allocators can be " "successfully cast to a Python object when intercepting the allocating " @@ -413,47 +426,47 @@ msgid "" "Memory Allocators ` section." msgstr "" -#: c-api/memory.rst:325 +#: c-api/memory.rst:347 msgid "" "The :ref:`default object allocator ` uses the :" "ref:`pymalloc memory allocator `." msgstr "" -#: c-api/memory.rst:338 +#: c-api/memory.rst:360 msgid "" "Requesting zero bytes returns a distinct non-``NULL`` pointer if possible, " "as if ``PyObject_Malloc(1)`` had been called instead. The memory will not " "have been initialized in any way." msgstr "" -#: c-api/memory.rst:349 +#: c-api/memory.rst:371 msgid "" "Requesting zero elements or elements of size zero bytes returns a distinct " "non-``NULL`` pointer if possible, as if ``PyObject_Calloc(1, 1)`` had been " "called instead." msgstr "" -#: c-api/memory.rst:361 +#: c-api/memory.rst:383 msgid "" "If *p* is ``NULL``, the call is equivalent to ``PyObject_Malloc(n)``; else " "if *n* is equal to zero, the memory block is resized but is not freed, and " "the returned pointer is non-``NULL``." msgstr "" -#: c-api/memory.rst:365 +#: c-api/memory.rst:387 msgid "" "Unless *p* is ``NULL``, it must have been returned by a previous call to :c:" "func:`PyObject_Malloc`, :c:func:`PyObject_Realloc` or :c:func:" "`PyObject_Calloc`." msgstr "" -#: c-api/memory.rst:368 +#: c-api/memory.rst:390 msgid "" "If the request fails, :c:func:`PyObject_Realloc` returns ``NULL`` and *p* " "remains a valid pointer to the previous memory area." msgstr "" -#: c-api/memory.rst:374 +#: c-api/memory.rst:396 msgid "" "Frees the memory block pointed to by *p*, which must have been returned by a " "previous call to :c:func:`PyObject_Malloc`, :c:func:`PyObject_Realloc` or :c:" @@ -461,282 +474,274 @@ msgid "" "called before, undefined behavior occurs." msgstr "" -#: c-api/memory.rst:385 +#: c-api/memory.rst:407 msgid "Default Memory Allocators" msgstr "" -#: c-api/memory.rst:387 +#: c-api/memory.rst:409 msgid "Default memory allocators:" msgstr "" -#: c-api/memory.rst:390 +#: c-api/memory.rst:412 msgid "Configuration" msgstr "" -#: c-api/memory.rst:390 +#: c-api/memory.rst:412 msgid "Name" msgstr "" -#: c-api/memory.rst:390 +#: c-api/memory.rst:412 msgid "PyMem_RawMalloc" msgstr "" -#: c-api/memory.rst:390 +#: c-api/memory.rst:412 msgid "PyMem_Malloc" msgstr "" -#: c-api/memory.rst:390 +#: c-api/memory.rst:412 msgid "PyObject_Malloc" msgstr "" -#: c-api/memory.rst:392 +#: c-api/memory.rst:414 msgid "Release build" msgstr "" -#: c-api/memory.rst:392 +#: c-api/memory.rst:414 msgid "``\"pymalloc\"``" msgstr "" -#: c-api/memory.rst:394 +#: c-api/memory.rst:416 msgid "``malloc``" msgstr "" -#: c-api/memory.rst:392 +#: c-api/memory.rst:414 msgid "``pymalloc``" msgstr "" -#: c-api/memory.rst:393 +#: c-api/memory.rst:415 msgid "Debug build" msgstr "" -#: c-api/memory.rst:393 +#: c-api/memory.rst:415 msgid "``\"pymalloc_debug\"``" msgstr "" -#: c-api/memory.rst:395 +#: c-api/memory.rst:417 msgid "``malloc`` + debug" msgstr "" -#: c-api/memory.rst:393 +#: c-api/memory.rst:415 msgid "``pymalloc`` + debug" msgstr "" -#: c-api/memory.rst:394 +#: c-api/memory.rst:416 msgid "Release build, without pymalloc" msgstr "" -#: c-api/memory.rst:394 +#: c-api/memory.rst:416 msgid "``\"malloc\"``" msgstr "" -#: c-api/memory.rst:395 +#: c-api/memory.rst:417 msgid "Debug build, without pymalloc" msgstr "" -#: c-api/memory.rst:395 +#: c-api/memory.rst:417 msgid "``\"malloc_debug\"``" msgstr "" -#: c-api/memory.rst:398 +#: c-api/memory.rst:420 msgid "Legend:" msgstr "" -#: c-api/memory.rst:400 +#: c-api/memory.rst:422 msgid "Name: value for :envvar:`PYTHONMALLOC` environment variable." msgstr "" -#: c-api/memory.rst:401 +#: c-api/memory.rst:423 msgid "" "``malloc``: system allocators from the standard C library, C functions: :c:" "func:`malloc`, :c:func:`calloc`, :c:func:`realloc` and :c:func:`free`." msgstr "" -#: c-api/memory.rst:403 +#: c-api/memory.rst:425 msgid "``pymalloc``: :ref:`pymalloc memory allocator `." msgstr "" -#: c-api/memory.rst:404 +#: c-api/memory.rst:426 msgid "" "``mimalloc``: :ref:`mimalloc memory allocator `. The pymalloc " "allocator will be used if mimalloc support isn't available." msgstr "" -#: c-api/memory.rst:406 +#: c-api/memory.rst:428 msgid "" "\"+ debug\": with :ref:`debug hooks on the Python memory allocators `." msgstr "" -#: c-api/memory.rst:408 +#: c-api/memory.rst:430 msgid "\"Debug build\": :ref:`Python build in debug mode `." msgstr "" -#: c-api/memory.rst:413 +#: c-api/memory.rst:435 msgid "Customize Memory Allocators" msgstr "" -#: c-api/memory.rst:419 +#: c-api/memory.rst:441 msgid "" "Structure used to describe a memory block allocator. The structure has the " "following fields:" msgstr "" -#: c-api/memory.rst:674 +#: c-api/memory.rst:696 msgid "Field" msgstr "" -#: c-api/memory.rst:674 +#: c-api/memory.rst:696 msgid "Meaning" msgstr "" -#: c-api/memory.rst:676 +#: c-api/memory.rst:698 msgid "``void *ctx``" msgstr "" -#: c-api/memory.rst:676 +#: c-api/memory.rst:698 msgid "user context passed as first argument" msgstr "" -#: c-api/memory.rst:427 +#: c-api/memory.rst:449 msgid "``void* malloc(void *ctx, size_t size)``" msgstr "" -#: c-api/memory.rst:427 +#: c-api/memory.rst:449 msgid "allocate a memory block" msgstr "" -#: c-api/memory.rst:429 +#: c-api/memory.rst:451 msgid "``void* calloc(void *ctx, size_t nelem, size_t elsize)``" msgstr "" -#: c-api/memory.rst:429 +#: c-api/memory.rst:451 msgid "allocate a memory block initialized with zeros" msgstr "" -#: c-api/memory.rst:432 +#: c-api/memory.rst:454 msgid "``void* realloc(void *ctx, void *ptr, size_t new_size)``" msgstr "" -#: c-api/memory.rst:432 +#: c-api/memory.rst:454 msgid "allocate or resize a memory block" msgstr "" -#: c-api/memory.rst:434 +#: c-api/memory.rst:456 msgid "``void free(void *ctx, void *ptr)``" msgstr "" -#: c-api/memory.rst:434 +#: c-api/memory.rst:456 msgid "free a memory block" msgstr "" -#: c-api/memory.rst:437 +#: c-api/memory.rst:459 msgid "" "The :c:type:`!PyMemAllocator` structure was renamed to :c:type:" "`PyMemAllocatorEx` and a new ``calloc`` field was added." msgstr "" -#: c-api/memory.rst:444 +#: c-api/memory.rst:466 msgid "Enum used to identify an allocator domain. Domains:" msgstr "" -#: c-api/memory.rst:459 c-api/memory.rst:468 +#: c-api/memory.rst:481 c-api/memory.rst:490 msgid "Functions:" msgstr "" -#: c-api/memory.rst:452 +#: c-api/memory.rst:474 msgid ":c:func:`PyMem_RawMalloc`" msgstr "" -#: c-api/memory.rst:453 +#: c-api/memory.rst:475 msgid ":c:func:`PyMem_RawRealloc`" msgstr "" -#: c-api/memory.rst:454 +#: c-api/memory.rst:476 msgid ":c:func:`PyMem_RawCalloc`" msgstr "" -#: c-api/memory.rst:455 +#: c-api/memory.rst:477 msgid ":c:func:`PyMem_RawFree`" msgstr "" -#: c-api/memory.rst:461 +#: c-api/memory.rst:483 msgid ":c:func:`PyMem_Malloc`," msgstr "" -#: c-api/memory.rst:462 -msgid ":c:func:`PyMem_Realloc`" -msgstr "" - -#: c-api/memory.rst:463 +#: c-api/memory.rst:485 msgid ":c:func:`PyMem_Calloc`" msgstr "" -#: c-api/memory.rst:464 -msgid ":c:func:`PyMem_Free`" -msgstr "" - -#: c-api/memory.rst:470 +#: c-api/memory.rst:492 msgid ":c:func:`PyObject_Malloc`" msgstr "" -#: c-api/memory.rst:471 +#: c-api/memory.rst:493 msgid ":c:func:`PyObject_Realloc`" msgstr "" -#: c-api/memory.rst:472 +#: c-api/memory.rst:494 msgid ":c:func:`PyObject_Calloc`" msgstr "" -#: c-api/memory.rst:473 +#: c-api/memory.rst:495 msgid ":c:func:`PyObject_Free`" msgstr "" -#: c-api/memory.rst:477 +#: c-api/memory.rst:499 msgid "Get the memory block allocator of the specified domain." msgstr "" -#: c-api/memory.rst:482 +#: c-api/memory.rst:504 msgid "Set the memory block allocator of the specified domain." msgstr "" -#: c-api/memory.rst:484 +#: c-api/memory.rst:506 msgid "" "The new allocator must return a distinct non-``NULL`` pointer when " "requesting zero bytes." msgstr "" -#: c-api/memory.rst:487 +#: c-api/memory.rst:509 msgid "" "For the :c:macro:`PYMEM_DOMAIN_RAW` domain, the allocator must be thread-" "safe: the :term:`GIL ` is not held when the " "allocator is called." msgstr "" -#: c-api/memory.rst:491 +#: c-api/memory.rst:513 msgid "" "For the remaining domains, the allocator must also be thread-safe: the " "allocator may be called in different interpreters that do not share a " "``GIL``." msgstr "" -#: c-api/memory.rst:495 +#: c-api/memory.rst:517 msgid "" "If the new allocator is not a hook (does not call the previous allocator), " "the :c:func:`PyMem_SetupDebugHooks` function must be called to reinstall the " "debug hooks on top on the new allocator." msgstr "" -#: c-api/memory.rst:499 +#: c-api/memory.rst:521 msgid "" "See also :c:member:`PyPreConfig.allocator` and :ref:`Preinitialize Python " "with PyPreConfig `." msgstr "" -#: c-api/memory.rst:504 +#: c-api/memory.rst:526 msgid ":c:func:`PyMem_SetAllocator` does have the following contract:" msgstr "" -#: c-api/memory.rst:506 +#: c-api/memory.rst:528 msgid "" "It can be called after :c:func:`Py_PreInitialize` and before :c:func:" "`Py_InitializeFromConfig` to install a custom memory allocator. There are no " @@ -746,7 +751,7 @@ msgid "" "domains>` for more information." msgstr "" -#: c-api/memory.rst:514 +#: c-api/memory.rst:536 msgid "" "If called after Python has finish initializing (after :c:func:" "`Py_InitializeFromConfig` has been called) the allocator **must** wrap the " @@ -754,21 +759,21 @@ msgid "" "arbitrary one is **not supported**." msgstr "" -#: c-api/memory.rst:519 +#: c-api/memory.rst:541 msgid "All allocators must be thread-safe." msgstr "" -#: c-api/memory.rst:525 +#: c-api/memory.rst:547 msgid "" "Setup :ref:`debug hooks in the Python memory allocators ` " "to detect memory errors." msgstr "" -#: c-api/memory.rst:532 +#: c-api/memory.rst:554 msgid "Debug hooks on the Python memory allocators" msgstr "" -#: c-api/memory.rst:534 +#: c-api/memory.rst:556 msgid "" "When :ref:`Python is built in debug mode `, the :c:func:" "`PyMem_SetupDebugHooks` function is called at the :ref:`Python " @@ -776,19 +781,19 @@ msgid "" "allocators to detect memory errors." msgstr "" -#: c-api/memory.rst:539 +#: c-api/memory.rst:561 msgid "" "The :envvar:`PYTHONMALLOC` environment variable can be used to install debug " "hooks on a Python compiled in release mode (ex: ``PYTHONMALLOC=debug``)." msgstr "" -#: c-api/memory.rst:542 +#: c-api/memory.rst:564 msgid "" "The :c:func:`PyMem_SetupDebugHooks` function can be used to set debug hooks " "after calling :c:func:`PyMem_SetAllocator`." msgstr "" -#: c-api/memory.rst:545 +#: c-api/memory.rst:567 msgid "" "These debug hooks fill dynamically allocated memory blocks with special, " "recognizable bit patterns. Newly allocated memory is filled with the byte " @@ -798,25 +803,25 @@ msgid "" "these bytes are unlikely to be valid addresses, floats, or ASCII strings." msgstr "" -#: c-api/memory.rst:552 +#: c-api/memory.rst:574 msgid "Runtime checks:" msgstr "" -#: c-api/memory.rst:554 +#: c-api/memory.rst:576 msgid "" "Detect API violations. For example, detect if :c:func:`PyObject_Free` is " "called on a memory block allocated by :c:func:`PyMem_Malloc`." msgstr "" -#: c-api/memory.rst:556 +#: c-api/memory.rst:578 msgid "Detect write before the start of the buffer (buffer underflow)." msgstr "" -#: c-api/memory.rst:557 +#: c-api/memory.rst:579 msgid "Detect write after the end of the buffer (buffer overflow)." msgstr "" -#: c-api/memory.rst:558 +#: c-api/memory.rst:580 msgid "" "Check that the :term:`GIL ` is held when allocator " "functions of :c:macro:`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) " @@ -824,7 +829,7 @@ msgid "" "called." msgstr "" -#: c-api/memory.rst:563 +#: c-api/memory.rst:585 msgid "" "On error, the debug hooks use the :mod:`tracemalloc` module to get the " "traceback where a memory block was allocated. The traceback is only " @@ -832,7 +837,7 @@ msgid "" "memory block was traced." msgstr "" -#: c-api/memory.rst:568 +#: c-api/memory.rst:590 msgid "" "Let *S* = ``sizeof(size_t)``. ``2*S`` bytes are added at each end of each " "block of *N* bytes requested. The memory layout is like so, where p " @@ -842,49 +847,49 @@ msgid "" "from a Python slice):" msgstr "" -#: c-api/memory.rst:574 +#: c-api/memory.rst:596 msgid "``p[-2*S:-S]``" msgstr "" -#: c-api/memory.rst:575 +#: c-api/memory.rst:597 msgid "" "Number of bytes originally asked for. This is a size_t, big-endian (easier " "to read in a memory dump)." msgstr "" -#: c-api/memory.rst:577 +#: c-api/memory.rst:599 msgid "``p[-S]``" msgstr "" -#: c-api/memory.rst:578 +#: c-api/memory.rst:600 msgid "API identifier (ASCII character):" msgstr "" -#: c-api/memory.rst:580 +#: c-api/memory.rst:602 msgid "``'r'`` for :c:macro:`PYMEM_DOMAIN_RAW`." msgstr "" -#: c-api/memory.rst:581 +#: c-api/memory.rst:603 msgid "``'m'`` for :c:macro:`PYMEM_DOMAIN_MEM`." msgstr "" -#: c-api/memory.rst:582 +#: c-api/memory.rst:604 msgid "``'o'`` for :c:macro:`PYMEM_DOMAIN_OBJ`." msgstr "" -#: c-api/memory.rst:584 +#: c-api/memory.rst:606 msgid "``p[-S+1:0]``" msgstr "" -#: c-api/memory.rst:585 +#: c-api/memory.rst:607 msgid "Copies of PYMEM_FORBIDDENBYTE. Used to catch under- writes and reads." msgstr "" -#: c-api/memory.rst:587 +#: c-api/memory.rst:609 msgid "``p[0:N]``" msgstr "" -#: c-api/memory.rst:588 +#: c-api/memory.rst:610 msgid "" "The requested memory, filled with copies of PYMEM_CLEANBYTE, used to catch " "reference to uninitialized memory. When a realloc-like function is called " @@ -895,25 +900,25 @@ msgid "" "bytes are also filled with PYMEM_DEADBYTE." msgstr "" -#: c-api/memory.rst:596 +#: c-api/memory.rst:618 msgid "``p[N:N+S]``" msgstr "" -#: c-api/memory.rst:597 +#: c-api/memory.rst:619 msgid "Copies of PYMEM_FORBIDDENBYTE. Used to catch over- writes and reads." msgstr "" -#: c-api/memory.rst:599 +#: c-api/memory.rst:621 msgid "``p[N+S:N+2*S]``" msgstr "" -#: c-api/memory.rst:600 +#: c-api/memory.rst:622 msgid "" "Only used if the ``PYMEM_DEBUG_SERIALNO`` macro is defined (not defined by " "default)." msgstr "" -#: c-api/memory.rst:603 +#: c-api/memory.rst:625 msgid "" "A serial number, incremented by 1 on each call to a malloc-like or realloc-" "like function. Big-endian :c:type:`size_t`. If \"bad memory\" is detected " @@ -923,7 +928,7 @@ msgid "" "number is incremented, and exists so you can set such a breakpoint easily." msgstr "" -#: c-api/memory.rst:610 +#: c-api/memory.rst:632 msgid "" "A realloc-like or free-like function first checks that the " "PYMEM_FORBIDDENBYTE bytes at each end are intact. If they've been altered, " @@ -936,7 +941,7 @@ msgid "" "getting used)." msgstr "" -#: c-api/memory.rst:619 +#: c-api/memory.rst:641 msgid "" "The :c:func:`PyMem_SetupDebugHooks` function now also works on Python " "compiled in release mode. On error, the debug hooks now use :mod:" @@ -945,7 +950,7 @@ msgid "" "`PYMEM_DOMAIN_OBJ` and :c:macro:`PYMEM_DOMAIN_MEM` domains are called." msgstr "" -#: c-api/memory.rst:627 +#: c-api/memory.rst:649 msgid "" "Byte patterns ``0xCB`` (``PYMEM_CLEANBYTE``), ``0xDB`` (``PYMEM_DEADBYTE``) " "and ``0xFB`` (``PYMEM_FORBIDDENBYTE``) have been replaced with ``0xCD``, " @@ -953,11 +958,11 @@ msgid "" "``malloc()`` and ``free()``." msgstr "" -#: c-api/memory.rst:637 +#: c-api/memory.rst:659 msgid "The pymalloc allocator" msgstr "" -#: c-api/memory.rst:639 +#: c-api/memory.rst:661 msgid "" "Python has a *pymalloc* allocator optimized for small objects (smaller or " "equal to 512 bytes) with a short lifetime. It uses memory mappings called " @@ -966,82 +971,82 @@ msgid "" "`PyMem_RawRealloc` for allocations larger than 512 bytes." msgstr "" -#: c-api/memory.rst:645 +#: c-api/memory.rst:667 msgid "" "*pymalloc* is the :ref:`default allocator ` of " "the :c:macro:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) and :c:macro:" "`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) domains." msgstr "" -#: c-api/memory.rst:649 +#: c-api/memory.rst:671 msgid "The arena allocator uses the following functions:" msgstr "" -#: c-api/memory.rst:651 +#: c-api/memory.rst:673 msgid ":c:func:`!VirtualAlloc` and :c:func:`!VirtualFree` on Windows," msgstr "" -#: c-api/memory.rst:652 +#: c-api/memory.rst:674 msgid ":c:func:`!mmap` and :c:func:`!munmap` if available," msgstr "" -#: c-api/memory.rst:653 +#: c-api/memory.rst:675 msgid ":c:func:`malloc` and :c:func:`free` otherwise." msgstr "" -#: c-api/memory.rst:655 +#: c-api/memory.rst:677 msgid "" "This allocator is disabled if Python is configured with the :option:`--" "without-pymalloc` option. It can also be disabled at runtime using the :" "envvar:`PYTHONMALLOC` environment variable (ex: ``PYTHONMALLOC=malloc``)." msgstr "" -#: c-api/memory.rst:659 +#: c-api/memory.rst:681 msgid "" "Typically, it makes sense to disable the pymalloc allocator when building " "Python with AddressSanitizer (:option:`--with-address-sanitizer`) which " "helps uncover low level bugs within the C code." msgstr "" -#: c-api/memory.rst:664 +#: c-api/memory.rst:686 msgid "Customize pymalloc Arena Allocator" msgstr "" -#: c-api/memory.rst:670 +#: c-api/memory.rst:692 msgid "" "Structure used to describe an arena allocator. The structure has three " "fields:" msgstr "" -#: c-api/memory.rst:678 +#: c-api/memory.rst:700 msgid "``void* alloc(void *ctx, size_t size)``" msgstr "" -#: c-api/memory.rst:678 +#: c-api/memory.rst:700 msgid "allocate an arena of size bytes" msgstr "" -#: c-api/memory.rst:680 +#: c-api/memory.rst:702 msgid "``void free(void *ctx, void *ptr, size_t size)``" msgstr "" -#: c-api/memory.rst:680 +#: c-api/memory.rst:702 msgid "free an arena" msgstr "" -#: c-api/memory.rst:685 +#: c-api/memory.rst:707 msgid "Get the arena allocator." msgstr "" -#: c-api/memory.rst:689 +#: c-api/memory.rst:711 msgid "Set the arena allocator." msgstr "" -#: c-api/memory.rst:694 +#: c-api/memory.rst:716 msgid "The mimalloc allocator" msgstr "" -#: c-api/memory.rst:698 +#: c-api/memory.rst:720 msgid "" "Python supports the mimalloc allocator when the underlying platform support " "is available. mimalloc \"is a general purpose allocator with excellent " @@ -1049,46 +1054,46 @@ msgid "" "runtime systems of the Koka and Lean languages.\"" msgstr "" -#: c-api/memory.rst:703 +#: c-api/memory.rst:725 msgid "tracemalloc C API" msgstr "" -#: c-api/memory.rst:709 +#: c-api/memory.rst:731 msgid "Track an allocated memory block in the :mod:`tracemalloc` module." msgstr "" -#: c-api/memory.rst:711 +#: c-api/memory.rst:733 msgid "" "Return ``0`` on success, return ``-1`` on error (failed to allocate memory " "to store the trace). Return ``-2`` if tracemalloc is disabled." msgstr "" -#: c-api/memory.rst:714 +#: c-api/memory.rst:736 msgid "If memory block is already tracked, update the existing trace." msgstr "" -#: c-api/memory.rst:718 +#: c-api/memory.rst:740 msgid "" "Untrack an allocated memory block in the :mod:`tracemalloc` module. Do " "nothing if the block was not tracked." msgstr "" -#: c-api/memory.rst:721 +#: c-api/memory.rst:743 msgid "Return ``-2`` if tracemalloc is disabled, otherwise return ``0``." msgstr "" -#: c-api/memory.rst:727 +#: c-api/memory.rst:749 msgid "Examples" msgstr "" -#: c-api/memory.rst:729 +#: c-api/memory.rst:751 msgid "" "Here is the example from section :ref:`memoryoverview`, rewritten so that " "the I/O buffer is allocated from the Python heap by using the first function " "set::" msgstr "" -#: c-api/memory.rst:732 +#: c-api/memory.rst:754 msgid "" "PyObject *res;\n" "char *buf = (char *) PyMem_Malloc(BUFSIZ); /* for I/O */\n" @@ -1101,11 +1106,11 @@ msgid "" "return res;" msgstr "" -#: c-api/memory.rst:742 +#: c-api/memory.rst:764 msgid "The same code using the type-oriented function set::" msgstr "" -#: c-api/memory.rst:744 +#: c-api/memory.rst:766 msgid "" "PyObject *res;\n" "char *buf = PyMem_New(char, BUFSIZ); /* for I/O */\n" @@ -1118,7 +1123,7 @@ msgid "" "return res;" msgstr "" -#: c-api/memory.rst:754 +#: c-api/memory.rst:776 msgid "" "Note that in the two examples above, the buffer is always manipulated via " "functions belonging to the same set. Indeed, it is required to use the same " @@ -1128,7 +1133,7 @@ msgid "" "different allocators operating on different heaps. ::" msgstr "" -#: c-api/memory.rst:761 +#: c-api/memory.rst:783 msgid "" "char *buf1 = PyMem_New(char, BUFSIZ);\n" "char *buf2 = (char *) malloc(BUFSIZ);\n" @@ -1139,14 +1144,14 @@ msgid "" "free(buf1); /* Fatal -- should be PyMem_Del() */" msgstr "" -#: c-api/memory.rst:769 +#: c-api/memory.rst:791 msgid "" "In addition to the functions aimed at handling raw memory blocks from the " "Python heap, objects in Python are allocated and released with :c:macro:" "`PyObject_New`, :c:macro:`PyObject_NewVar` and :c:func:`PyObject_Del`." msgstr "" -#: c-api/memory.rst:773 +#: c-api/memory.rst:795 msgid "" "These will be explained in the next chapter on defining and implementing new " "object types in C." diff --git a/c-api/memoryview.po b/c-api/memoryview.po index 5310de9c8..335cbd9f0 100644 --- a/c-api/memoryview.po +++ b/c-api/memoryview.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/method.po b/c-api/method.po index b721c7231..155779c15 100644 --- a/c-api/method.po +++ b/c-api/method.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/module.po b/c-api/module.po index 1ac094f27..923f21680 100644 --- a/c-api/module.po +++ b/c-api/module.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -48,7 +48,7 @@ msgid "" "setting a :attr:`~module.__file__` attribute." msgstr "" -#: c-api/module.rst:286 c-api/module.rst:510 +#: c-api/module.rst:292 c-api/module.rst:516 msgid "Return ``NULL`` with an exception set on error." msgstr "" @@ -283,49 +283,53 @@ msgid "" "not needed." msgstr "" -#: c-api/module.rst:267 +#: c-api/module.rst:269 +msgid "The type of ``PyModuleDef`` objects." +msgstr "" + +#: c-api/module.rst:273 msgid "Single-phase initialization" msgstr "" -#: c-api/module.rst:269 +#: c-api/module.rst:275 msgid "" "The module initialization function may create and return the module object " "directly. This is referred to as \"single-phase initialization\", and uses " "one of the following two module creation functions:" msgstr "" -#: c-api/module.rst:275 +#: c-api/module.rst:281 msgid "" "Create a new module object, given the definition in *def*. This behaves " "like :c:func:`PyModule_Create2` with *module_api_version* set to :c:macro:" "`PYTHON_API_VERSION`." msgstr "" -#: c-api/module.rst:282 +#: c-api/module.rst:288 msgid "" "Create a new module object, given the definition in *def*, assuming the API " "version *module_api_version*. If that version does not match the version of " "the running interpreter, a :exc:`RuntimeWarning` is emitted." msgstr "" -#: c-api/module.rst:290 +#: c-api/module.rst:296 msgid "" "Most uses of this function should be using :c:func:`PyModule_Create` " "instead; only use this if you are sure you need it." msgstr "" -#: c-api/module.rst:293 +#: c-api/module.rst:299 msgid "" "Before it is returned from in the initialization function, the resulting " "module object is typically populated using functions like :c:func:" "`PyModule_AddObjectRef`." msgstr "" -#: c-api/module.rst:299 +#: c-api/module.rst:305 msgid "Multi-phase initialization" msgstr "" -#: c-api/module.rst:301 +#: c-api/module.rst:307 msgid "" "An alternate way to specify extensions is to request \"multi-phase " "initialization\". Extension modules created this way behave more like Python " @@ -335,7 +339,7 @@ msgid "" "`~object.__init__` methods of classes." msgstr "" -#: c-api/module.rst:308 +#: c-api/module.rst:314 msgid "" "Unlike modules created using single-phase initialization, these modules are " "not singletons. For example, if the :py:attr:`sys.modules` entry is removed " @@ -344,7 +348,7 @@ msgid "" "normal garbage collection. This mirrors the behavior of pure-Python modules." msgstr "" -#: c-api/module.rst:316 +#: c-api/module.rst:322 msgid "" "Additional module instances may be created in :ref:`sub-interpreters ` or after after Python runtime reinitialization (:c:" @@ -353,7 +357,7 @@ msgid "" "undefined behavior." msgstr "" -#: c-api/module.rst:323 +#: c-api/module.rst:329 msgid "" "To avoid such issues, each instance of an extension module should be " "*isolated*: changes to one instance should not implicitly affect the others, " @@ -362,13 +366,13 @@ msgid "" "details and a practical guide." msgstr "" -#: c-api/module.rst:329 +#: c-api/module.rst:335 msgid "" "A simpler way to avoid these issues is :ref:`raising an error on repeated " "initialization `." msgstr "" -#: c-api/module.rst:332 +#: c-api/module.rst:338 msgid "" "All modules created using multi-phase initialization are expected to " "support :ref:`sub-interpreters `, or otherwise " @@ -378,7 +382,7 @@ msgid "" "slot." msgstr "" -#: c-api/module.rst:340 +#: c-api/module.rst:346 msgid "" "To request multi-phase initialization, the initialization function " "(PyInit_modulename) returns a :c:type:`PyModuleDef` instance with non-empty :" @@ -386,65 +390,65 @@ msgid "" "instance must be initialized with the following function:" msgstr "" -#: c-api/module.rst:347 +#: c-api/module.rst:353 msgid "" "Ensures a module definition is a properly initialized Python object that " "correctly reports its type and reference count." msgstr "" -#: c-api/module.rst:350 +#: c-api/module.rst:356 msgid "Returns *def* cast to ``PyObject*``, or ``NULL`` if an error occurred." msgstr "" -#: c-api/module.rst:354 +#: c-api/module.rst:360 msgid "" "The *m_slots* member of the module definition must point to an array of " "``PyModuleDef_Slot`` structures:" msgstr "" -#: c-api/module.rst:361 +#: c-api/module.rst:367 msgid "A slot ID, chosen from the available values explained below." msgstr "" -#: c-api/module.rst:365 +#: c-api/module.rst:371 msgid "Value of the slot, whose meaning depends on the slot ID." msgstr "" -#: c-api/module.rst:369 +#: c-api/module.rst:375 msgid "The *m_slots* array must be terminated by a slot with id 0." msgstr "" -#: c-api/module.rst:371 +#: c-api/module.rst:377 msgid "The available slot types are:" msgstr "" -#: c-api/module.rst:375 +#: c-api/module.rst:381 msgid "" "Specifies a function that is called to create the module object itself. The " "*value* pointer of this slot must point to a function of the signature:" msgstr "" -#: c-api/module.rst:382 +#: c-api/module.rst:388 msgid "" "The function receives a :py:class:`~importlib.machinery.ModuleSpec` " "instance, as defined in :PEP:`451`, and the module definition. It should " "return a new module object, or set an error and return ``NULL``." msgstr "" -#: c-api/module.rst:387 +#: c-api/module.rst:393 msgid "" "This function should be kept minimal. In particular, it should not call " "arbitrary Python code, as trying to import the same module again may result " "in an infinite loop." msgstr "" -#: c-api/module.rst:391 +#: c-api/module.rst:397 msgid "" "Multiple ``Py_mod_create`` slots may not be specified in one module " "definition." msgstr "" -#: c-api/module.rst:394 +#: c-api/module.rst:400 msgid "" "If ``Py_mod_create`` is not specified, the import machinery will create a " "normal module object using :c:func:`PyModule_New`. The name is taken from " @@ -453,7 +457,7 @@ msgid "" "through symlinks, all while sharing a single module definition." msgstr "" -#: c-api/module.rst:400 +#: c-api/module.rst:406 msgid "" "There is no requirement for the returned object to be an instance of :c:type:" "`PyModule_Type`. Any type can be used, as long as it supports setting and " @@ -463,7 +467,7 @@ msgid "" "``Py_mod_create``." msgstr "" -#: c-api/module.rst:411 +#: c-api/module.rst:417 msgid "" "Specifies a function that is called to *execute* the module. This is " "equivalent to executing the code of a Python module: typically, this " @@ -471,61 +475,61 @@ msgid "" "function is:" msgstr "" -#: c-api/module.rst:420 +#: c-api/module.rst:426 msgid "" "If multiple ``Py_mod_exec`` slots are specified, they are processed in the " "order they appear in the *m_slots* array." msgstr "" -#: c-api/module.rst:460 +#: c-api/module.rst:466 msgid "Specifies one of the following values:" msgstr "" -#: c-api/module.rst:433 +#: c-api/module.rst:439 msgid "The module does not support being imported in subinterpreters." msgstr "" -#: c-api/module.rst:437 +#: c-api/module.rst:443 msgid "" "The module supports being imported in subinterpreters, but only when they " "share the main interpreter's GIL. (See :ref:`isolating-extensions-howto`.)" msgstr "" -#: c-api/module.rst:443 +#: c-api/module.rst:449 msgid "" "The module supports being imported in subinterpreters, even when they have " "their own GIL. (See :ref:`isolating-extensions-howto`.)" msgstr "" -#: c-api/module.rst:447 +#: c-api/module.rst:453 msgid "" "This slot determines whether or not importing this module in a " "subinterpreter will fail." msgstr "" -#: c-api/module.rst:450 +#: c-api/module.rst:456 msgid "" "Multiple ``Py_mod_multiple_interpreters`` slots may not be specified in one " "module definition." msgstr "" -#: c-api/module.rst:453 +#: c-api/module.rst:459 msgid "" "If ``Py_mod_multiple_interpreters`` is not specified, the import machinery " "defaults to ``Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED``." msgstr "" -#: c-api/module.rst:466 +#: c-api/module.rst:472 msgid "" "The module depends on the presence of the global interpreter lock (GIL), and " "may access global state without synchronization." msgstr "" -#: c-api/module.rst:471 +#: c-api/module.rst:477 msgid "The module is safe to run without an active GIL." msgstr "" -#: c-api/module.rst:473 +#: c-api/module.rst:479 msgid "" "This slot is ignored by Python builds not configured with :option:`--disable-" "gil`. Otherwise, it determines whether or not importing this module will " @@ -533,26 +537,26 @@ msgid "" "threaded-cpython` for more detail." msgstr "" -#: c-api/module.rst:478 +#: c-api/module.rst:484 msgid "" "Multiple ``Py_mod_gil`` slots may not be specified in one module definition." msgstr "" -#: c-api/module.rst:480 +#: c-api/module.rst:486 msgid "" "If ``Py_mod_gil`` is not specified, the import machinery defaults to " "``Py_MOD_GIL_USED``." msgstr "" -#: c-api/module.rst:485 +#: c-api/module.rst:491 msgid "See :PEP:`489` for more details on multi-phase initialization." msgstr "" -#: c-api/module.rst:488 +#: c-api/module.rst:494 msgid "Low-level module creation functions" msgstr "" -#: c-api/module.rst:490 +#: c-api/module.rst:496 msgid "" "The following functions are called under the hood when using multi-phase " "initialization. They can be used directly, for example when creating module " @@ -560,14 +564,14 @@ msgid "" "``PyModule_ExecDef`` must be called to fully initialize a module." msgstr "" -#: c-api/module.rst:497 +#: c-api/module.rst:503 msgid "" "Create a new module object, given the definition in *def* and the ModuleSpec " "*spec*. This behaves like :c:func:`PyModule_FromDefAndSpec2` with " "*module_api_version* set to :c:macro:`PYTHON_API_VERSION`." msgstr "" -#: c-api/module.rst:505 +#: c-api/module.rst:511 msgid "" "Create a new module object, given the definition in *def* and the ModuleSpec " "*spec*, assuming the API version *module_api_version*. If that version does " @@ -575,24 +579,28 @@ msgid "" "emitted." msgstr "" -#: c-api/module.rst:514 +#: c-api/module.rst:520 msgid "" "Most uses of this function should be using :c:func:`PyModule_FromDefAndSpec` " "instead; only use this if you are sure you need it." msgstr "" -#: c-api/module.rst:521 +#: c-api/module.rst:527 msgid "Process any execution slots (:c:data:`Py_mod_exec`) given in *def*." msgstr "" -#: c-api/module.rst:527 +#: c-api/module.rst:533 msgid "" "Set the docstring for *module* to *docstring*. This function is called " "automatically when creating a module from ``PyModuleDef``, using either " "``PyModule_Create`` or ``PyModule_FromDefAndSpec``." msgstr "" -#: c-api/module.rst:536 +#: c-api/module.rst:538 +msgid "Return ``0`` on success. Return ``-1`` with an exception set on error." +msgstr "" + +#: c-api/module.rst:545 msgid "" "Add the functions from the ``NULL`` terminated *functions* array to " "*module*. Refer to the :c:type:`PyMethodDef` documentation for details on " @@ -604,17 +612,17 @@ msgid "" "``PyModule_FromDefAndSpec``." msgstr "" -#: c-api/module.rst:545 +#: c-api/module.rst:554 msgid "" "The *functions* array must be statically allocated (or otherwise guaranteed " "to outlive the module object)." msgstr "" -#: c-api/module.rst:551 +#: c-api/module.rst:560 msgid "Support functions" msgstr "" -#: c-api/module.rst:553 +#: c-api/module.rst:562 msgid "" "The module initialization function (if using single phase initialization) or " "a function called from a module execution slot (if using multi-phase " @@ -622,22 +630,22 @@ msgid "" "module state:" msgstr "" -#: c-api/module.rst:560 +#: c-api/module.rst:569 msgid "" "Add an object to *module* as *name*. This is a convenience function which " "can be used from the module's initialization function." msgstr "" -#: c-api/module.rst:563 +#: c-api/module.rst:572 msgid "" "On success, return ``0``. On error, raise an exception and return ``-1``." msgstr "" -#: c-api/module.rst:616 c-api/module.rst:643 +#: c-api/module.rst:625 c-api/module.rst:652 msgid "Example usage::" msgstr "" -#: c-api/module.rst:567 +#: c-api/module.rst:576 msgid "" "static int\n" "add_spam(PyObject *module, int value)\n" @@ -652,20 +660,20 @@ msgid "" " }" msgstr "" -#: c-api/module.rst:579 +#: c-api/module.rst:588 msgid "" "To be convenient, the function accepts ``NULL`` *value* with an exception " "set. In this case, return ``-1`` and just leave the raised exception " "unchanged." msgstr "" -#: c-api/module.rst:583 +#: c-api/module.rst:592 msgid "" "The example can also be written without checking explicitly if *obj* is " "``NULL``::" msgstr "" -#: c-api/module.rst:586 +#: c-api/module.rst:595 msgid "" "static int\n" "add_spam(PyObject *module, int value)\n" @@ -677,13 +685,13 @@ msgid "" " }" msgstr "" -#: c-api/module.rst:595 +#: c-api/module.rst:604 msgid "" "Note that ``Py_XDECREF()`` should be used instead of ``Py_DECREF()`` in this " "case, since *obj* can be ``NULL``." msgstr "" -#: c-api/module.rst:598 +#: c-api/module.rst:607 msgid "" "The number of different *name* strings passed to this function should be " "kept small, usually by only using statically allocated strings as *name*. " @@ -693,47 +701,47 @@ msgid "" "internally to create a key object." msgstr "" -#: c-api/module.rst:611 +#: c-api/module.rst:620 msgid "" -"Similar to :c:func:`PyModule_AddObjectRef`, but \"steals\" a reference to " -"*value*. It can be called with a result of function that returns a new " -"reference without bothering to check its result or even saving it to a " -"variable." +"Similar to :c:func:`PyModule_AddObjectRef`, but \":term:`steals `\" a " +"reference to *value* (even on error). It can be called with a result of " +"function that returns a new reference without bothering to check its result " +"or even saving it to a variable." msgstr "" -#: c-api/module.rst:618 +#: c-api/module.rst:627 msgid "" "if (PyModule_Add(module, \"spam\", PyBytes_FromString(value)) < 0) {\n" " goto error;\n" "}" msgstr "" -#: c-api/module.rst:627 +#: c-api/module.rst:636 msgid "" -"Similar to :c:func:`PyModule_AddObjectRef`, but steals a reference to " -"*value* on success (if it returns ``0``)." +"Similar to :c:func:`PyModule_AddObjectRef`, but :term:`steals ` a " +"reference to *value* on success (if it returns ``0``)." msgstr "" -#: c-api/module.rst:630 +#: c-api/module.rst:639 msgid "" "The new :c:func:`PyModule_Add` or :c:func:`PyModule_AddObjectRef` functions " "are recommended, since it is easy to introduce reference leaks by misusing " "the :c:func:`PyModule_AddObject` function." msgstr "" -#: c-api/module.rst:637 +#: c-api/module.rst:646 msgid "" "Unlike other functions that steal references, ``PyModule_AddObject()`` only " "releases the reference to *value* **on success**." msgstr "" -#: c-api/module.rst:640 +#: c-api/module.rst:649 msgid "" "This means that its return value must be checked, and calling code must :c:" "func:`Py_XDECREF` *value* manually on error." msgstr "" -#: c-api/module.rst:645 +#: c-api/module.rst:654 msgid "" "PyObject *obj = PyBytes_FromString(value);\n" "if (PyModule_AddObject(module, \"spam\", obj) < 0) {\n" @@ -747,24 +755,20 @@ msgid "" "// Py_XDECREF(obj) is not needed here." msgstr "" -#: c-api/module.rst:658 -msgid ":c:func:`PyModule_AddObject` is :term:`soft deprecated`." -msgstr "" - -#: c-api/module.rst:663 +#: c-api/module.rst:670 msgid "" "Add an integer constant to *module* as *name*. This convenience function " "can be used from the module's initialization function. Return ``-1`` with an " "exception set on error, ``0`` on success." msgstr "" -#: c-api/module.rst:667 +#: c-api/module.rst:674 msgid "" "This is a convenience function that calls :c:func:`PyLong_FromLong` and :c:" "func:`PyModule_AddObjectRef`; see their documentation for details." msgstr "" -#: c-api/module.rst:673 +#: c-api/module.rst:680 msgid "" "Add a string constant to *module* as *name*. This convenience function can " "be used from the module's initialization function. The string *value* must " @@ -772,14 +776,14 @@ msgid "" "on success." msgstr "" -#: c-api/module.rst:678 +#: c-api/module.rst:685 msgid "" "This is a convenience function that calls :c:func:" "`PyUnicode_InternFromString` and :c:func:`PyModule_AddObjectRef`; see their " "documentation for details." msgstr "" -#: c-api/module.rst:685 +#: c-api/module.rst:692 msgid "" "Add an int constant to *module*. The name and the value are taken from " "*macro*. For example ``PyModule_AddIntMacro(module, AF_INET)`` adds the int " @@ -787,11 +791,11 @@ msgid "" "with an exception set on error, ``0`` on success." msgstr "" -#: c-api/module.rst:693 +#: c-api/module.rst:700 msgid "Add a string constant to *module*." msgstr "" -#: c-api/module.rst:697 +#: c-api/module.rst:704 msgid "" "Add a type object to *module*. The type object is finalized by calling " "internally :c:func:`PyType_Ready`. The name of the type object is taken from " @@ -799,7 +803,7 @@ msgid "" "``-1`` with an exception set on error, ``0`` on success." msgstr "" -#: c-api/module.rst:707 +#: c-api/module.rst:714 msgid "" "Indicate that *module* does or does not support running without the global " "interpreter lock (GIL), using one of the values from :c:macro:`Py_mod_gil`. " @@ -810,25 +814,25 @@ msgid "" "Return ``-1`` with an exception set on error, ``0`` on success." msgstr "" -#: c-api/module.rst:720 +#: c-api/module.rst:727 msgid "Module lookup" msgstr "" -#: c-api/module.rst:722 +#: c-api/module.rst:729 msgid "" "Single-phase initialization creates singleton modules that can be looked up " "in the context of the current interpreter. This allows the module object to " "be retrieved later with only a reference to the module definition." msgstr "" -#: c-api/module.rst:726 +#: c-api/module.rst:733 msgid "" "These functions will not work on modules created using multi-phase " "initialization, since multiple such modules can be created from a single " "definition." msgstr "" -#: c-api/module.rst:731 +#: c-api/module.rst:738 msgid "" "Returns the module object that was created from *def* for the current " "interpreter. This method requires that the module object has been attached " @@ -837,18 +841,18 @@ msgid "" "to the interpreter state yet, it returns ``NULL``." msgstr "" -#: c-api/module.rst:738 +#: c-api/module.rst:745 msgid "" "Attaches the module object passed to the function to the interpreter state. " "This allows the module object to be accessible via :c:func:" "`PyState_FindModule`." msgstr "" -#: c-api/module.rst:741 +#: c-api/module.rst:748 msgid "Only effective on modules created using single-phase initialization." msgstr "" -#: c-api/module.rst:743 +#: c-api/module.rst:750 msgid "" "Python calls ``PyState_AddModule`` automatically after importing a module, " "so it is unnecessary (but harmless) to call it from module initialization " @@ -859,15 +863,15 @@ msgid "" "state updates)." msgstr "" -#: c-api/module.rst:762 +#: c-api/module.rst:769 msgid "The caller must hold the GIL." msgstr "" -#: c-api/module.rst:753 +#: c-api/module.rst:760 msgid "Return ``-1`` with an exception set on error, ``0`` on success." msgstr "" -#: c-api/module.rst:759 +#: c-api/module.rst:766 msgid "" "Removes the module object created from *def* from the interpreter state. " "Return ``-1`` with an exception set on error, ``0`` on success." diff --git a/c-api/monitoring.po b/c-api/monitoring.po index da4dc31a8..8ab4932bb 100644 --- a/c-api/monitoring.po +++ b/c-api/monitoring.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -289,7 +289,3 @@ msgid "" "Return true if the event corresponding to the event ID *ev* is a :ref:`local " "event `." msgstr "" - -#: c-api/monitoring.rst:204 -msgid "This function is :term:`soft deprecated`." -msgstr "" diff --git a/c-api/none.po b/c-api/none.po index 302222f3b..13bac4030 100644 --- a/c-api/none.po +++ b/c-api/none.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/number.po b/c-api/number.po index 70db1bd55..cacf3b4e4 100644 --- a/c-api/number.po +++ b/c-api/number.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/object.po b/c-api/object.po index 19f801f3c..85c3dbd64 100644 --- a/c-api/object.po +++ b/c-api/object.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -430,13 +430,17 @@ msgid "" "function." msgstr "" -#: c-api/object.rst:346 +#: c-api/object.rst:338 c-api/object.rst:350 +msgid "If argument is ``NULL``, return the string ``''``." +msgstr "" + +#: c-api/object.rst:352 msgid "" "This function now includes a debug assertion to help ensure that it does not " "silently discard an active exception." msgstr "" -#: c-api/object.rst:330 +#: c-api/object.rst:332 msgid "" "As :c:func:`PyObject_Repr`, compute a string representation of object *o*, " "but escape the non-ASCII characters in the string returned by :c:func:" @@ -445,7 +449,7 @@ msgid "" "Called by the :func:`ascii` built-in function." msgstr "" -#: c-api/object.rst:341 +#: c-api/object.rst:345 msgid "" "Compute a string representation of object *o*. Returns the string " "representation on success, ``NULL`` on failure. This is the equivalent of " @@ -453,7 +457,7 @@ msgid "" "function and, therefore, by the :func:`print` function." msgstr "" -#: c-api/object.rst:355 +#: c-api/object.rst:361 msgid "" "Compute a bytes representation of object *o*. ``NULL`` is returned on " "failure and a bytes object on success. This is equivalent to the Python " @@ -462,20 +466,25 @@ msgid "" "bytes object." msgstr "" -#: c-api/object.rst:364 +#: c-api/object.rst:367 +msgid "" +"If argument is ``NULL``, return the :class:`bytes` object ``b''``." +msgstr "" + +#: c-api/object.rst:372 msgid "" "Return ``1`` if the class *derived* is identical to or derived from the " "class *cls*, otherwise return ``0``. In case of an error, return ``-1``." msgstr "" -#: c-api/object.rst:386 +#: c-api/object.rst:394 msgid "" "If *cls* is a tuple, the check will be done against every entry in *cls*. " "The result will be ``1`` when at least one of the checks returns ``1``, " "otherwise it will be ``0``." msgstr "" -#: c-api/object.rst:371 +#: c-api/object.rst:379 msgid "" "If *cls* has a :meth:`~type.__subclasscheck__` method, it will be called to " "determine the subclass status as described in :pep:`3119`. Otherwise, " @@ -483,52 +492,52 @@ msgid "" "e. contained in :attr:`cls.__mro__ `." msgstr "" -#: c-api/object.rst:376 +#: c-api/object.rst:384 msgid "" "Normally only class objects, i.e. instances of :class:`type` or a derived " "class, are considered classes. However, objects can override this by having " "a :attr:`~type.__bases__` attribute (which must be a tuple of base classes)." msgstr "" -#: c-api/object.rst:383 +#: c-api/object.rst:391 msgid "" "Return ``1`` if *inst* is an instance of the class *cls* or a subclass of " "*cls*, or ``0`` if not. On error, returns ``-1`` and sets an exception." msgstr "" -#: c-api/object.rst:390 +#: c-api/object.rst:398 msgid "" "If *cls* has a :meth:`~type.__instancecheck__` method, it will be called to " "determine the subclass status as described in :pep:`3119`. Otherwise, " "*inst* is an instance of *cls* if its class is a subclass of *cls*." msgstr "" -#: c-api/object.rst:394 +#: c-api/object.rst:402 msgid "" "An instance *inst* can override what is considered its class by having a :" "attr:`~object.__class__` attribute." msgstr "" -#: c-api/object.rst:397 +#: c-api/object.rst:405 msgid "" "An object *cls* can override if it is considered a class, and what its base " "classes are, by having a :attr:`~type.__bases__` attribute (which must be a " "tuple of base classes)." msgstr "" -#: c-api/object.rst:406 +#: c-api/object.rst:414 msgid "" "Compute and return the hash value of an object *o*. On failure, return " "``-1``. This is the equivalent of the Python expression ``hash(o)``." msgstr "" -#: c-api/object.rst:409 +#: c-api/object.rst:417 msgid "" "The return type is now Py_hash_t. This is a signed integer the same size " "as :c:type:`Py_ssize_t`." msgstr "" -#: c-api/object.rst:416 +#: c-api/object.rst:424 msgid "" "Set a :exc:`TypeError` indicating that ``type(o)`` is not :term:`hashable` " "and return ``-1``. This function receives special treatment when stored in a " @@ -536,21 +545,21 @@ msgid "" "that it is not hashable." msgstr "" -#: c-api/object.rst:424 +#: c-api/object.rst:432 msgid "" "Returns ``1`` if the object *o* is considered to be true, and ``0`` " "otherwise. This is equivalent to the Python expression ``not not o``. On " "failure, return ``-1``." msgstr "" -#: c-api/object.rst:431 +#: c-api/object.rst:439 msgid "" "Returns ``0`` if the object *o* is considered to be true, and ``1`` " "otherwise. This is equivalent to the Python expression ``not o``. On " "failure, return ``-1``." msgstr "" -#: c-api/object.rst:440 +#: c-api/object.rst:448 msgid "" "When *o* is non-``NULL``, returns a type object corresponding to the object " "type of object *o*. On failure, raises :exc:`SystemError` and returns " @@ -561,13 +570,13 @@ msgid "" "when a new :term:`strong reference` is needed." msgstr "" -#: c-api/object.rst:452 +#: c-api/object.rst:460 msgid "" "Return non-zero if the object *o* is of type *type* or a subtype of *type*, " "and ``0`` otherwise. Both parameters must be non-``NULL``." msgstr "" -#: c-api/object.rst:461 +#: c-api/object.rst:469 msgid "" "Return the length of object *o*. If the object *o* provides either the " "sequence and mapping protocols, the sequence length is returned. On error, " @@ -575,7 +584,7 @@ msgid "" "``len(o)``." msgstr "" -#: c-api/object.rst:468 +#: c-api/object.rst:476 msgid "" "Return an estimated length for the object *o*. First try to return its " "actual length, then an estimate using :meth:`~object.__length_hint__`, and " @@ -584,33 +593,33 @@ msgid "" "defaultvalue)``." msgstr "" -#: c-api/object.rst:478 +#: c-api/object.rst:486 msgid "" "Return element of *o* corresponding to the object *key* or ``NULL`` on " "failure. This is the equivalent of the Python expression ``o[key]``." msgstr "" -#: c-api/object.rst:484 +#: c-api/object.rst:492 msgid "" "Map the object *key* to the value *v*. Raise an exception and return ``-1`` " "on failure; return ``0`` on success. This is the equivalent of the Python " "statement ``o[key] = v``. This function *does not* steal a reference to *v*." msgstr "" -#: c-api/object.rst:492 +#: c-api/object.rst:500 msgid "" "Remove the mapping for the object *key* from the object *o*. Return ``-1`` " "on failure. This is equivalent to the Python statement ``del o[key]``." msgstr "" -#: c-api/object.rst:498 +#: c-api/object.rst:506 msgid "" "This is the same as :c:func:`PyObject_DelItem`, but *key* is specified as a :" "c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" "`PyObject*`." msgstr "" -#: c-api/object.rst:505 +#: c-api/object.rst:513 msgid "" "This is equivalent to the Python expression ``dir(o)``, returning a " "(possibly empty) list of strings appropriate for the object argument, or " @@ -620,7 +629,7 @@ msgid "" "`PyErr_Occurred` will return false." msgstr "" -#: c-api/object.rst:514 +#: c-api/object.rst:522 msgid "" "This is equivalent to the Python expression ``iter(o)``. It returns a new " "iterator for the object argument, or the object itself if the object is " @@ -628,14 +637,14 @@ msgid "" "object cannot be iterated." msgstr "" -#: c-api/object.rst:522 +#: c-api/object.rst:530 msgid "" "This is equivalent to the Python ``__iter__(self): return self`` method. It " "is intended for :term:`iterator` types, to be used in the :c:member:" "`PyTypeObject.tp_iter` slot." msgstr "" -#: c-api/object.rst:528 +#: c-api/object.rst:536 msgid "" "This is the equivalent to the Python expression ``aiter(o)``. Takes an :" "class:`AsyncIterable` object and returns an :class:`AsyncIterator` for it. " @@ -644,77 +653,77 @@ msgid "" "``NULL`` if the object cannot be iterated." msgstr "" -#: c-api/object.rst:538 +#: c-api/object.rst:546 msgid "Get a pointer to subclass-specific data reserved for *cls*." msgstr "" -#: c-api/object.rst:540 +#: c-api/object.rst:548 msgid "" "The object *o* must be an instance of *cls*, and *cls* must have been " "created using negative :c:member:`PyType_Spec.basicsize`. Python does not " "check this." msgstr "" -#: c-api/object.rst:544 +#: c-api/object.rst:552 msgid "On error, set an exception and return ``NULL``." msgstr "" -#: c-api/object.rst:550 +#: c-api/object.rst:558 msgid "" "Return the size of the instance memory space reserved for *cls*, i.e. the " "size of the memory :c:func:`PyObject_GetTypeData` returns." msgstr "" -#: c-api/object.rst:553 +#: c-api/object.rst:561 msgid "" "This may be larger than requested using :c:member:`-PyType_Spec.basicsize " "`; it is safe to use this larger size (e.g. with :c:" "func:`!memset`)." msgstr "" -#: c-api/object.rst:556 +#: c-api/object.rst:564 msgid "" "The type *cls* **must** have been created using negative :c:member:" "`PyType_Spec.basicsize`. Python does not check this." msgstr "" -#: c-api/object.rst:560 +#: c-api/object.rst:568 msgid "On error, set an exception and return a negative value." msgstr "" -#: c-api/object.rst:566 +#: c-api/object.rst:574 msgid "" "Get a pointer to per-item data for a class with :c:macro:" "`Py_TPFLAGS_ITEMS_AT_END`." msgstr "" -#: c-api/object.rst:569 +#: c-api/object.rst:577 msgid "" "On error, set an exception and return ``NULL``. :py:exc:`TypeError` is " "raised if *o* does not have :c:macro:`Py_TPFLAGS_ITEMS_AT_END` set." msgstr "" -#: c-api/object.rst:577 +#: c-api/object.rst:585 msgid "Visit the managed dictionary of *obj*." msgstr "" -#: c-api/object.rst:579 +#: c-api/object.rst:587 msgid "" "This function must only be called in a traverse function of the type which " "has the :c:macro:`Py_TPFLAGS_MANAGED_DICT` flag set." msgstr "" -#: c-api/object.rst:586 +#: c-api/object.rst:594 msgid "Clear the managed dictionary of *obj*." msgstr "" -#: c-api/object.rst:588 +#: c-api/object.rst:596 msgid "" "This function must only be called in a clear function of the type which has " "the :c:macro:`Py_TPFLAGS_MANAGED_DICT` flag set." msgstr "" -#: c-api/object.rst:328 c-api/object.rst:404 c-api/object.rst:459 +#: c-api/object.rst:330 c-api/object.rst:412 c-api/object.rst:467 msgid "built-in function" msgstr "" @@ -722,30 +731,30 @@ msgstr "" msgid "repr" msgstr "" -#: c-api/object.rst:328 +#: c-api/object.rst:330 msgid "ascii" msgstr "" -#: c-api/object.rst:336 +#: c-api/object.rst:340 msgid "string" msgstr "" -#: c-api/object.rst:336 +#: c-api/object.rst:340 msgid "PyObject_Str (C function)" msgstr "" -#: c-api/object.rst:353 +#: c-api/object.rst:359 msgid "bytes" msgstr "" -#: c-api/object.rst:404 +#: c-api/object.rst:412 msgid "hash" msgstr "" -#: c-api/object.rst:438 +#: c-api/object.rst:446 msgid "type" msgstr "" -#: c-api/object.rst:459 +#: c-api/object.rst:467 msgid "len" msgstr "" diff --git a/c-api/objimpl.po b/c-api/objimpl.po index 09427b48c..51af3140d 100644 --- a/c-api/objimpl.po +++ b/c-api/objimpl.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/perfmaps.po b/c-api/perfmaps.po index 1c53d7f1c..e21cd24d6 100644 --- a/c-api/perfmaps.po +++ b/c-api/perfmaps.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/picklebuffer.po b/c-api/picklebuffer.po index 214f71cfc..3401cf01c 100644 --- a/c-api/picklebuffer.po +++ b/c-api/picklebuffer.po @@ -8,10 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\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/c-api/refcounting.po b/c-api/refcounting.po index 1df6f1366..458639253 100644 --- a/c-api/refcounting.po +++ b/c-api/refcounting.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/reflection.po b/c-api/reflection.po index baacba869..7741ac3f1 100644 --- a/c-api/reflection.po +++ b/c-api/reflection.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/sequence.po b/c-api/sequence.po index 6cb9a5f30..255ad3056 100644 --- a/c-api/sequence.po +++ b/c-api/sequence.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -79,8 +79,8 @@ msgstr "" msgid "" "Assign object *v* to the *i*\\ th element of *o*. Raise an exception and " "return ``-1`` on failure; return ``0`` on success. This is the equivalent " -"of the Python statement ``o[i] = v``. This function *does not* steal a " -"reference to *v*." +"of the Python statement ``o[i] = v``. This function *does not* \":term:" +"`steal`\" a reference to *v*." msgstr "" #: c-api/sequence.rst:72 diff --git a/c-api/set.po b/c-api/set.po index b04beec9c..b0f8df8ed 100644 --- a/c-api/set.po +++ b/c-api/set.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -167,9 +167,9 @@ msgid "" "Return ``1`` if found and removed, ``0`` if not found (no action taken), and " "``-1`` if an error is encountered. Does not raise :exc:`KeyError` for " "missing keys. Raise a :exc:`TypeError` if the *key* is unhashable. Unlike " -"the Python :meth:`~frozenset.discard` method, this function does not " -"automatically convert unhashable sets into temporary frozensets. Raise :exc:" -"`SystemError` if *set* is not an instance of :class:`set` or its subtype." +"the Python :meth:`~set.discard` method, this function does not automatically " +"convert unhashable sets into temporary frozensets. Raise :exc:`SystemError` " +"if *set* is not an instance of :class:`set` or its subtype." msgstr "" #: c-api/set.rst:158 diff --git a/c-api/slice.po b/c-api/slice.po index a108b3c2a..38eda95fc 100644 --- a/c-api/slice.po +++ b/c-api/slice.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/stable.po b/c-api/stable.po index 939da5174..56e3d4cc8 100644 --- a/c-api/stable.po +++ b/c-api/stable.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/structures.po b/c-api/structures.po index ab16c4613..2ad6354f6 100644 --- a/c-api/structures.po +++ b/c-api/structures.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -429,7 +429,7 @@ msgstr "" #: c-api/structures.rst:367 msgid "" "These two constants are not used to indicate the calling convention but the " -"binding when use with methods of classes. These may not be used for " +"binding when used with methods of classes. These may not be used for " "functions defined for modules. At most one of these flags may be set for " "any given method." msgstr "" diff --git a/c-api/sys.po b/c-api/sys.po index a84181872..c26986e6c 100644 --- a/c-api/sys.po +++ b/c-api/sys.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/time.po b/c-api/time.po index 2dac5d74e..a22620759 100644 --- a/c-api/time.po +++ b/c-api/time.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/tuple.po b/c-api/tuple.po index 0fe4c2f7c..55526471a 100644 --- a/c-api/tuple.po +++ b/c-api/tuple.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -107,30 +107,31 @@ msgstr "" #: c-api/tuple.rst:93 msgid "" -"This function \"steals\" a reference to *o* and discards a reference to an " -"item already in the tuple at the affected position." +"This function \":term:`steals `\" a reference to *o* and discards a " +"reference to an item already in the tuple at the affected position (unless " +"it was NULL)." msgstr "" -#: c-api/tuple.rst:99 +#: c-api/tuple.rst:100 msgid "" "Like :c:func:`PyTuple_SetItem`, but does no error checking, and should " "*only* be used to fill in brand new tuples." msgstr "" -#: c-api/tuple.rst:218 c-api/tuple.rst:236 +#: c-api/tuple.rst:219 c-api/tuple.rst:237 msgid "" "Bounds checking is performed as an assertion if Python is built in :ref:" "`debug mode ` or :option:`with assertions <--with-assertions>`." msgstr "" -#: c-api/tuple.rst:107 +#: c-api/tuple.rst:108 msgid "" -"This function \"steals\" a reference to *o*, and, unlike :c:func:" -"`PyTuple_SetItem`, does *not* discard a reference to any item that is being " -"replaced; any reference in the tuple at position *pos* will be leaked." +"This function \":term:`steals `\" a reference to *o*, and, unlike :c:" +"func:`PyTuple_SetItem`, does *not* discard a reference to any item that is " +"being replaced; any reference in the tuple at position *pos* will be leaked." msgstr "" -#: c-api/tuple.rst:115 +#: c-api/tuple.rst:116 msgid "" "Can be used to resize a tuple. *newsize* will be the new length of the " "tuple. Because tuples are *supposed* to be immutable, this should only be " @@ -145,11 +146,11 @@ msgid "" "`SystemError`." msgstr "" -#: c-api/tuple.rst:130 +#: c-api/tuple.rst:131 msgid "Struct Sequence Objects" msgstr "" -#: c-api/tuple.rst:132 +#: c-api/tuple.rst:133 msgid "" "Struct sequence objects are the C equivalent of :func:`~collections." "namedtuple` objects, i.e. a sequence whose items can also be accessed " @@ -157,50 +158,50 @@ msgid "" "specific struct sequence type." msgstr "" -#: c-api/tuple.rst:139 +#: c-api/tuple.rst:140 msgid "" "Create a new struct sequence type from the data in *desc*, described below. " "Instances of the resulting type can be created with :c:func:" "`PyStructSequence_New`." msgstr "" -#: c-api/tuple.rst:211 +#: c-api/tuple.rst:212 msgid "Return ``NULL`` with an exception set on failure." msgstr "" -#: c-api/tuple.rst:147 +#: c-api/tuple.rst:148 msgid "Initializes a struct sequence type *type* from *desc* in place." msgstr "" -#: c-api/tuple.rst:152 +#: c-api/tuple.rst:153 msgid "" "Like :c:func:`PyStructSequence_InitType`, but returns ``0`` on success and " "``-1`` with an exception set on failure." msgstr "" -#: c-api/tuple.rst:160 +#: c-api/tuple.rst:161 msgid "Contains the meta information of a struct sequence type to create." msgstr "" -#: c-api/tuple.rst:164 +#: c-api/tuple.rst:165 msgid "" "Fully qualified name of the type; null-terminated UTF-8 encoded. The name " "must contain the module name." msgstr "" -#: c-api/tuple.rst:169 +#: c-api/tuple.rst:170 msgid "Pointer to docstring for the type or ``NULL`` to omit." msgstr "" -#: c-api/tuple.rst:173 +#: c-api/tuple.rst:174 msgid "Pointer to ``NULL``-terminated array with field names of the new type." msgstr "" -#: c-api/tuple.rst:177 +#: c-api/tuple.rst:178 msgid "Number of fields visible to the Python side (if used as tuple)." msgstr "" -#: c-api/tuple.rst:182 +#: c-api/tuple.rst:183 msgid "" "Describes a field of a struct sequence. As a struct sequence is modeled as a " "tuple, all fields are typed as :c:expr:`PyObject*`. The index in the :c:" @@ -209,59 +210,59 @@ msgid "" "described." msgstr "" -#: c-api/tuple.rst:190 +#: c-api/tuple.rst:191 msgid "" "Name for the field or ``NULL`` to end the list of named fields, set to :c:" "data:`PyStructSequence_UnnamedField` to leave unnamed." msgstr "" -#: c-api/tuple.rst:195 +#: c-api/tuple.rst:196 msgid "Field docstring or ``NULL`` to omit." msgstr "" -#: c-api/tuple.rst:200 +#: c-api/tuple.rst:201 msgid "Special value for a field name to leave it unnamed." msgstr "" -#: c-api/tuple.rst:202 +#: c-api/tuple.rst:203 msgid "The type was changed from ``char *``." msgstr "" -#: c-api/tuple.rst:208 +#: c-api/tuple.rst:209 msgid "" "Creates an instance of *type*, which must have been created with :c:func:" "`PyStructSequence_NewType`." msgstr "" -#: c-api/tuple.rst:216 +#: c-api/tuple.rst:217 msgid "" "Return the object at position *pos* in the struct sequence pointed to by *p*." msgstr "" -#: c-api/tuple.rst:224 +#: c-api/tuple.rst:225 msgid "Alias to :c:func:`PyStructSequence_GetItem`." msgstr "" -#: c-api/tuple.rst:226 +#: c-api/tuple.rst:227 msgid "Now implemented as an alias to :c:func:`PyStructSequence_GetItem`." msgstr "" -#: c-api/tuple.rst:232 +#: c-api/tuple.rst:233 msgid "" "Sets the field at index *pos* of the struct sequence *p* to value *o*. " "Like :c:func:`PyTuple_SET_ITEM`, this should only be used to fill in brand " "new instances." msgstr "" -#: c-api/tuple.rst:241 -msgid "This function \"steals\" a reference to *o*." +#: c-api/tuple.rst:242 +msgid "This function \":term:`steals `\" a reference to *o*." msgstr "" -#: c-api/tuple.rst:246 +#: c-api/tuple.rst:247 msgid "Alias to :c:func:`PyStructSequence_SetItem`." msgstr "" -#: c-api/tuple.rst:248 +#: c-api/tuple.rst:249 msgid "Now implemented as an alias to :c:func:`PyStructSequence_SetItem`." msgstr "" diff --git a/c-api/type.po b/c-api/type.po index 995d7e1fb..92fe3fd7a 100644 --- a/c-api/type.po +++ b/c-api/type.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -283,13 +283,20 @@ msgid "" "created using :c:func:`PyType_FromModuleAndSpec`." msgstr "" -#: c-api/type.rst:283 +#: c-api/type.rst:309 +msgid "" +"The returned reference is :term:`borrowed ` from *type*, " +"and will be valid as long as you hold a reference to *type*. Do not release " +"it with :c:func:`Py_DECREF` or similar." +msgstr "" + +#: c-api/type.rst:287 msgid "" "If no module is associated with the given type, sets :py:class:`TypeError` " "and returns ``NULL``." msgstr "" -#: c-api/type.rst:265 +#: c-api/type.rst:269 msgid "" "This function is usually used to get the module in which a method is " "defined. Note that in such a method, ``PyType_GetModule(Py_TYPE(self))`` may " @@ -300,31 +307,31 @@ msgid "" "type:`!PyCMethod` cannot be used." msgstr "" -#: c-api/type.rst:279 +#: c-api/type.rst:283 msgid "" "Return the state of the module object associated with the given type. This " "is a shortcut for calling :c:func:`PyModule_GetState()` on the result of :c:" "func:`PyType_GetModule`." msgstr "" -#: c-api/type.rst:286 +#: c-api/type.rst:290 msgid "" "If the *type* has an associated module but its state is ``NULL``, returns " "``NULL`` without setting an exception." msgstr "" -#: c-api/type.rst:294 +#: c-api/type.rst:298 msgid "" "Find the first superclass whose module was created from the given :c:type:" "`PyModuleDef` *def*, and return that module." msgstr "" -#: c-api/type.rst:297 +#: c-api/type.rst:301 msgid "" "If no module is found, raises a :py:class:`TypeError` and returns ``NULL``." msgstr "" -#: c-api/type.rst:299 +#: c-api/type.rst:303 msgid "" "This function is intended to be used together with :c:func:" "`PyModule_GetState()` to get module state from slot methods (such as :c:" @@ -333,61 +340,54 @@ msgid "" "type:`PyCMethod` calling convention." msgstr "" -#: c-api/type.rst:305 -msgid "" -"The returned reference is :term:`borrowed ` from *type*, " -"and will be valid as long as you hold a reference to *type*. Do not release " -"it with :c:func:`Py_DECREF` or similar." -msgstr "" - -#: c-api/type.rst:314 +#: c-api/type.rst:318 msgid "Attempt to assign a version tag to the given type." msgstr "" -#: c-api/type.rst:316 +#: c-api/type.rst:320 msgid "" "Returns 1 if the type already had a valid version tag or a new one was " "assigned, or 0 if a new tag could not be assigned." msgstr "" -#: c-api/type.rst:324 +#: c-api/type.rst:328 msgid "" "Return true if instances of *type* support creating weak references, false " "otherwise. This function always succeeds. *type* must not be ``NULL``." msgstr "" -#: c-api/type.rst:328 +#: c-api/type.rst:332 msgid ":ref:`weakrefobjects`" msgstr "" -#: c-api/type.rst:329 +#: c-api/type.rst:333 msgid ":py:mod:`weakref`" msgstr "" -#: c-api/type.rst:333 +#: c-api/type.rst:337 msgid "Creating Heap-Allocated Types" msgstr "" -#: c-api/type.rst:335 +#: c-api/type.rst:339 msgid "" "The following functions and structs are used to create :ref:`heap types " "`." msgstr "" -#: c-api/type.rst:340 +#: c-api/type.rst:344 msgid "" "Create and return a :ref:`heap type ` from the *spec* (see :c:" "macro:`Py_TPFLAGS_HEAPTYPE`)." msgstr "" -#: c-api/type.rst:343 +#: c-api/type.rst:347 msgid "" "The metaclass *metaclass* is used to construct the resulting type object. " "When *metaclass* is ``NULL``, the metaclass is derived from *bases* (or " "*Py_tp_base[s]* slots if *bases* is ``NULL``, see below)." msgstr "" -#: c-api/type.rst:347 +#: c-api/type.rst:351 msgid "" "Metaclasses that override :c:member:`~PyTypeObject.tp_new` are not " "supported, except if ``tp_new`` is ``NULL``. (For backwards compatibility, " @@ -396,7 +396,7 @@ msgid "" "deprecated and in Python 3.14+ such metaclasses will not be supported.)" msgstr "" -#: c-api/type.rst:354 +#: c-api/type.rst:358 msgid "" "The *bases* argument can be used to specify base classes; it can either be " "only one class or a tuple of classes. If *bases* is ``NULL``, the " @@ -405,7 +405,7 @@ msgid "" "derives from :class:`object`." msgstr "" -#: c-api/type.rst:360 +#: c-api/type.rst:364 msgid "" "The *module* argument can be used to record the module in which the new " "class is defined. It must be a module object or ``NULL``. If not ``NULL``, " @@ -414,11 +414,11 @@ msgid "" "subclasses; it must be specified for each class individually." msgstr "" -#: c-api/type.rst:367 +#: c-api/type.rst:371 msgid "This function calls :c:func:`PyType_Ready` on the new type." msgstr "" -#: c-api/type.rst:369 +#: c-api/type.rst:373 msgid "" "Note that this function does *not* fully match the behavior of calling :py:" "class:`type() ` or using the :keyword:`class` statement. With user-" @@ -427,41 +427,41 @@ msgid "" "Specifically:" msgstr "" -#: c-api/type.rst:376 +#: c-api/type.rst:380 msgid "" ":py:meth:`~object.__new__` is not called on the new class (and it must be " "set to ``type.__new__``)." msgstr "" -#: c-api/type.rst:378 +#: c-api/type.rst:382 msgid ":py:meth:`~object.__init__` is not called on the new class." msgstr "" -#: c-api/type.rst:379 +#: c-api/type.rst:383 msgid ":py:meth:`~object.__init_subclass__` is not called on any bases." msgstr "" -#: c-api/type.rst:380 +#: c-api/type.rst:384 msgid ":py:meth:`~object.__set_name__` is not called on new descriptors." msgstr "" -#: c-api/type.rst:387 +#: c-api/type.rst:391 msgid "Equivalent to ``PyType_FromMetaclass(NULL, module, spec, bases)``." msgstr "" -#: c-api/type.rst:393 +#: c-api/type.rst:397 msgid "" "The function now accepts a single class as the *bases* argument and ``NULL`` " "as the ``tp_doc`` slot." msgstr "" -#: c-api/type.rst:416 +#: c-api/type.rst:420 msgid "" "The function now finds and uses a metaclass corresponding to the provided " "base classes. Previously, only :class:`type` instances were returned." msgstr "" -#: c-api/type.rst:419 c-api/type.rst:436 +#: c-api/type.rst:423 c-api/type.rst:440 msgid "" "The :c:member:`~PyTypeObject.tp_new` of the metaclass is *ignored*. which " "may result in incomplete initialization. Creating classes whose metaclass " @@ -469,42 +469,42 @@ msgid "" "it will be no longer allowed." msgstr "" -#: c-api/type.rst:410 +#: c-api/type.rst:414 msgid "Equivalent to ``PyType_FromMetaclass(NULL, NULL, spec, bases)``." msgstr "" -#: c-api/type.rst:428 +#: c-api/type.rst:432 msgid "Equivalent to ``PyType_FromMetaclass(NULL, NULL, spec, NULL)``." msgstr "" -#: c-api/type.rst:432 +#: c-api/type.rst:436 msgid "" "The function now finds and uses a metaclass corresponding to the base " "classes provided in *Py_tp_base[s]* slots. Previously, only :class:`type` " "instances were returned." msgstr "" -#: c-api/type.rst:453 +#: c-api/type.rst:457 msgid "Structure defining a type's behavior." msgstr "" -#: c-api/type.rst:457 +#: c-api/type.rst:461 msgid "Name of the type, used to set :c:member:`PyTypeObject.tp_name`." msgstr "" -#: c-api/type.rst:461 +#: c-api/type.rst:465 msgid "" "If positive, specifies the size of the instance in bytes. It is used to set :" "c:member:`PyTypeObject.tp_basicsize`." msgstr "" -#: c-api/type.rst:464 +#: c-api/type.rst:468 msgid "" "If zero, specifies that :c:member:`~PyTypeObject.tp_basicsize` should be " "inherited." msgstr "" -#: c-api/type.rst:467 +#: c-api/type.rst:471 msgid "" "If negative, the absolute value specifies how much space instances of the " "class need *in addition* to the superclass. Use :c:func:" @@ -514,17 +514,17 @@ msgid "" "requirements." msgstr "" -#: c-api/type.rst:477 +#: c-api/type.rst:481 msgid "Previously, this field could not be negative." msgstr "" -#: c-api/type.rst:481 +#: c-api/type.rst:485 msgid "" "Size of one element of a variable-size type, in bytes. Used to set :c:member:" "`PyTypeObject.tp_itemsize`. See ``tp_itemsize`` documentation for caveats." msgstr "" -#: c-api/type.rst:485 +#: c-api/type.rst:489 msgid "" "If zero, :c:member:`~PyTypeObject.tp_itemsize` is inherited. Extending " "arbitrary variable-sized classes is dangerous, since some types use a fixed " @@ -533,58 +533,59 @@ msgid "" "only possible in the following situations:" msgstr "" -#: c-api/type.rst:492 +#: c-api/type.rst:496 msgid "" -"The base is not variable-sized (its :c:member:`~PyTypeObject.tp_itemsize`)." +"The base is not variable-sized (its :c:member:`~PyTypeObject.tp_itemsize` is " +"zero)." msgstr "" -#: c-api/type.rst:494 +#: c-api/type.rst:498 msgid "" "The requested :c:member:`PyType_Spec.basicsize` is positive, suggesting that " "the memory layout of the base class is known." msgstr "" -#: c-api/type.rst:496 +#: c-api/type.rst:500 msgid "" "The requested :c:member:`PyType_Spec.basicsize` is zero, suggesting that the " "subclass does not access the instance's memory directly." msgstr "" -#: c-api/type.rst:499 +#: c-api/type.rst:503 msgid "With the :c:macro:`Py_TPFLAGS_ITEMS_AT_END` flag." msgstr "" -#: c-api/type.rst:503 +#: c-api/type.rst:507 msgid "Type flags, used to set :c:member:`PyTypeObject.tp_flags`." msgstr "" -#: c-api/type.rst:505 +#: c-api/type.rst:509 msgid "" "If the ``Py_TPFLAGS_HEAPTYPE`` flag is not set, :c:func:" "`PyType_FromSpecWithBases` sets it automatically." msgstr "" -#: c-api/type.rst:510 +#: c-api/type.rst:514 msgid "" "Array of :c:type:`PyType_Slot` structures. Terminated by the special slot " "value ``{0, NULL}``." msgstr "" -#: c-api/type.rst:513 +#: c-api/type.rst:517 msgid "Each slot ID should be specified at most once." msgstr "" -#: c-api/type.rst:523 +#: c-api/type.rst:527 msgid "" "Structure defining optional functionality of a type, containing a slot ID " "and a value pointer." msgstr "" -#: c-api/type.rst:528 +#: c-api/type.rst:532 msgid "A slot ID." msgstr "" -#: c-api/type.rst:530 +#: c-api/type.rst:534 msgid "" "Slot IDs are named like the field names of the structures :c:type:" "`PyTypeObject`, :c:type:`PyNumberMethods`, :c:type:`PySequenceMethods`, :c:" @@ -592,42 +593,42 @@ msgid "" "prefix. For example, use:" msgstr "" -#: c-api/type.rst:536 +#: c-api/type.rst:540 msgid "``Py_tp_dealloc`` to set :c:member:`PyTypeObject.tp_dealloc`" msgstr "" -#: c-api/type.rst:537 +#: c-api/type.rst:541 msgid "``Py_nb_add`` to set :c:member:`PyNumberMethods.nb_add`" msgstr "" -#: c-api/type.rst:538 +#: c-api/type.rst:542 msgid "``Py_sq_length`` to set :c:member:`PySequenceMethods.sq_length`" msgstr "" -#: c-api/type.rst:540 +#: c-api/type.rst:544 msgid "" "The following “offset” fields cannot be set using :c:type:`PyType_Slot`:" msgstr "" -#: c-api/type.rst:542 +#: c-api/type.rst:546 msgid "" ":c:member:`~PyTypeObject.tp_weaklistoffset` (use :c:macro:" "`Py_TPFLAGS_MANAGED_WEAKREF` instead if possible)" msgstr "" -#: c-api/type.rst:544 +#: c-api/type.rst:548 msgid "" ":c:member:`~PyTypeObject.tp_dictoffset` (use :c:macro:" "`Py_TPFLAGS_MANAGED_DICT` instead if possible)" msgstr "" -#: c-api/type.rst:546 +#: c-api/type.rst:550 msgid "" ":c:member:`~PyTypeObject.tp_vectorcall_offset` (use " "``\"__vectorcalloffset__\"`` in :ref:`PyMemberDef `)" msgstr "" -#: c-api/type.rst:550 +#: c-api/type.rst:554 msgid "" "If it is not possible to switch to a ``MANAGED`` flag (for example, for " "vectorcall or to support Python older than 3.12), specify the offset in :c:" @@ -635,48 +636,48 @@ msgid "" "documentation ` for details." msgstr "" -#: c-api/type.rst:556 +#: c-api/type.rst:560 msgid "The following fields cannot be set at all when creating a heap type:" msgstr "" -#: c-api/type.rst:558 +#: c-api/type.rst:562 msgid "" ":c:member:`~PyTypeObject.tp_vectorcall` (use :c:member:`~PyTypeObject." "tp_new` and/or :c:member:`~PyTypeObject.tp_init`)" msgstr "" -#: c-api/type.rst:562 +#: c-api/type.rst:566 msgid "" "Internal fields: :c:member:`~PyTypeObject.tp_dict`, :c:member:`~PyTypeObject." "tp_mro`, :c:member:`~PyTypeObject.tp_cache`, :c:member:`~PyTypeObject." "tp_subclasses`, and :c:member:`~PyTypeObject.tp_weaklist`." msgstr "" -#: c-api/type.rst:569 +#: c-api/type.rst:573 msgid "" "Setting :c:data:`Py_tp_bases` or :c:data:`Py_tp_base` may be problematic on " "some platforms. To avoid issues, use the *bases* argument of :c:func:" "`PyType_FromSpecWithBases` instead." msgstr "" -#: c-api/type.rst:574 +#: c-api/type.rst:578 msgid "Slots in :c:type:`PyBufferProcs` may be set in the unlimited API." msgstr "" -#: c-api/type.rst:577 +#: c-api/type.rst:581 msgid "" ":c:member:`~PyBufferProcs.bf_getbuffer` and :c:member:`~PyBufferProcs." "bf_releasebuffer` are now available under the :ref:`limited API `." msgstr "" -#: c-api/type.rst:584 +#: c-api/type.rst:588 msgid "" "The desired value of the slot. In most cases, this is a pointer to a " "function." msgstr "" -#: c-api/type.rst:587 +#: c-api/type.rst:591 msgid "Slots other than ``Py_tp_doc`` may not be ``NULL``." msgstr "" diff --git a/c-api/typehints.po b/c-api/typehints.po index 78f0e030d..5a454bbb9 100644 --- a/c-api/typehints.po +++ b/c-api/typehints.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -53,8 +53,8 @@ msgid "" "static PyMethodDef my_obj_methods[] = {\n" " // Other methods.\n" " ...\n" -" {\"__class_getitem__\", Py_GenericAlias, METH_O|METH_CLASS, \"See PEP " -"585\"}\n" +" {\"__class_getitem__\", Py_GenericAlias, METH_O|METH_CLASS, \"my_obj is " +"generic over its contained type\"}\n" " ...\n" "}" msgstr "" diff --git a/c-api/typeobj.po b/c-api/typeobj.po index 3a60db8d6..f5dcdeba2 100644 --- a/c-api/typeobj.po +++ b/c-api/typeobj.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1244,17 +1244,17 @@ msgid "" "instances *do* count as references." msgstr "" -#: c-api/typeobj.rst:527 c-api/typeobj.rst:588 c-api/typeobj.rst:744 -#: c-api/typeobj.rst:804 c-api/typeobj.rst:841 c-api/typeobj.rst:884 -#: c-api/typeobj.rst:908 c-api/typeobj.rst:967 c-api/typeobj.rst:1012 -#: c-api/typeobj.rst:1059 c-api/typeobj.rst:1114 c-api/typeobj.rst:1135 -#: c-api/typeobj.rst:1159 c-api/typeobj.rst:1200 c-api/typeobj.rst:1231 -#: c-api/typeobj.rst:1297 c-api/typeobj.rst:1337 c-api/typeobj.rst:1389 -#: c-api/typeobj.rst:1504 c-api/typeobj.rst:1643 c-api/typeobj.rst:1706 -#: c-api/typeobj.rst:1746 c-api/typeobj.rst:1779 c-api/typeobj.rst:1843 -#: c-api/typeobj.rst:1891 c-api/typeobj.rst:1966 c-api/typeobj.rst:2028 -#: c-api/typeobj.rst:2086 c-api/typeobj.rst:2129 c-api/typeobj.rst:2156 -#: c-api/typeobj.rst:2189 c-api/typeobj.rst:2249 +#: c-api/typeobj.rst:527 c-api/typeobj.rst:588 c-api/typeobj.rst:742 +#: c-api/typeobj.rst:802 c-api/typeobj.rst:839 c-api/typeobj.rst:882 +#: c-api/typeobj.rst:906 c-api/typeobj.rst:965 c-api/typeobj.rst:1010 +#: c-api/typeobj.rst:1057 c-api/typeobj.rst:1112 c-api/typeobj.rst:1133 +#: c-api/typeobj.rst:1157 c-api/typeobj.rst:1198 c-api/typeobj.rst:1229 +#: c-api/typeobj.rst:1298 c-api/typeobj.rst:1343 c-api/typeobj.rst:1395 +#: c-api/typeobj.rst:1443 c-api/typeobj.rst:1561 c-api/typeobj.rst:1700 +#: c-api/typeobj.rst:1763 c-api/typeobj.rst:1803 c-api/typeobj.rst:1836 +#: c-api/typeobj.rst:1900 c-api/typeobj.rst:1948 c-api/typeobj.rst:2023 +#: c-api/typeobj.rst:2085 c-api/typeobj.rst:2143 c-api/typeobj.rst:2186 +#: c-api/typeobj.rst:2213 c-api/typeobj.rst:2246 c-api/typeobj.rst:2306 msgid "**Inheritance:**" msgstr "" @@ -1286,8 +1286,8 @@ msgid "" "class. :c:func:`PyType_Ready` will not change this field if it is non-zero." msgstr "" -#: c-api/typeobj.rst:746 c-api/typeobj.rst:969 c-api/typeobj.rst:1708 -#: c-api/typeobj.rst:1873 c-api/typeobj.rst:1968 c-api/typeobj.rst:2228 +#: c-api/typeobj.rst:744 c-api/typeobj.rst:967 c-api/typeobj.rst:1765 +#: c-api/typeobj.rst:1930 c-api/typeobj.rst:2025 c-api/typeobj.rst:2285 msgid "This field is inherited by subtypes." msgstr "" @@ -1393,18 +1393,16 @@ msgid "" "argument, and store in the instance's :c:member:`~PyVarObject.ob_size` " "field. Note that the :c:member:`~PyVarObject.ob_size` field may later be " "used for other purposes. For example, :py:type:`int` instances use the bits " -"of :c:member:`~PyVarObject.ob_size` in an implementation-defined way; the " -"underlying storage and its size should be accessed using :c:func:" -"`PyLong_Export`." +"of :c:member:`~PyVarObject.ob_size` in an implementation-defined way." msgstr "" -#: c-api/typeobj.rst:620 +#: c-api/typeobj.rst:618 msgid "" "The :c:member:`~PyVarObject.ob_size` field should be accessed using the :c:" "func:`Py_SIZE()` and :c:func:`Py_SET_SIZE()` macros." msgstr "" -#: c-api/typeobj.rst:623 +#: c-api/typeobj.rst:621 msgid "" "Also, the presence of an :c:member:`~PyVarObject.ob_size` field in the " "instance layout doesn't mean that the instance structure is variable-length. " @@ -1414,13 +1412,13 @@ msgid "" "`PyList_Size` instead.)" msgstr "" -#: c-api/typeobj.rst:630 +#: c-api/typeobj.rst:628 msgid "" "The :c:member:`!tp_basicsize` includes size needed for data of the type's :c:" "member:`~PyTypeObject.tp_base`, plus any extra data needed by each instance." msgstr "" -#: c-api/typeobj.rst:634 +#: c-api/typeobj.rst:632 msgid "" "The correct way to set :c:member:`!tp_basicsize` is to use the ``sizeof`` " "operator on the struct used to declare the instance layout. This struct must " @@ -1429,7 +1427,7 @@ msgid "" "tp_basicsize`." msgstr "" -#: c-api/typeobj.rst:640 +#: c-api/typeobj.rst:638 msgid "" "Since every type is a subtype of :py:type:`object`, this struct must " "include :c:type:`PyObject` or :c:type:`PyVarObject` (depending on whether :c:" @@ -1438,23 +1436,23 @@ msgid "" "respectively." msgstr "" -#: c-api/typeobj.rst:646 +#: c-api/typeobj.rst:644 msgid "" "The basic size does not include the GC header size, as that header is not " "part of :c:macro:`PyObject_HEAD`." msgstr "" -#: c-api/typeobj.rst:649 +#: c-api/typeobj.rst:647 msgid "" "For cases where struct used to declare the base type is unknown, see :c:" "member:`PyType_Spec.basicsize` and :c:func:`PyType_FromMetaclass`." msgstr "" -#: c-api/typeobj.rst:652 +#: c-api/typeobj.rst:650 msgid "Notes about alignment:" msgstr "" -#: c-api/typeobj.rst:654 +#: c-api/typeobj.rst:652 msgid "" ":c:member:`!tp_basicsize` must be a multiple of ``_Alignof(PyObject)``. When " "using ``sizeof`` on a ``struct`` that includes :c:macro:`PyObject_HEAD`, as " @@ -1463,7 +1461,7 @@ msgid "" "you." msgstr "" -#: c-api/typeobj.rst:659 +#: c-api/typeobj.rst:657 msgid "" "If the variable items require a particular alignment, :c:member:`!" "tp_basicsize` and :c:member:`!tp_itemsize` must each be a multiple of that " @@ -1471,14 +1469,14 @@ msgid "" "your responsibility that both fields are a multiple of ``_Alignof(double)``." msgstr "" -#: c-api/typeobj.rst:668 +#: c-api/typeobj.rst:666 msgid "" "These fields are inherited separately by subtypes. (That is, if the field is " "set to zero, :c:func:`PyType_Ready` will copy the value from the base type, " "indicating that the instances do not need additional storage.)" msgstr "" -#: c-api/typeobj.rst:673 +#: c-api/typeobj.rst:671 msgid "" "If the base type has a non-zero :c:member:`~PyTypeObject.tp_itemsize`, it is " "generally not safe to set :c:member:`~PyTypeObject.tp_itemsize` to a " @@ -1486,7 +1484,7 @@ msgid "" "implementation of the base type)." msgstr "" -#: c-api/typeobj.rst:682 +#: c-api/typeobj.rst:680 msgid "" "A pointer to the instance destructor function. This function must be " "defined unless the type guarantees that its instances will never be " @@ -1494,11 +1492,11 @@ msgid "" "The function signature is::" msgstr "" -#: c-api/typeobj.rst:686 +#: c-api/typeobj.rst:684 msgid "void tp_dealloc(PyObject *self);" msgstr "" -#: c-api/typeobj.rst:688 +#: c-api/typeobj.rst:686 msgid "" "The destructor function is called by the :c:func:`Py_DECREF` and :c:func:" "`Py_XDECREF` macros when the new reference count is zero. At this point, " @@ -1516,14 +1514,14 @@ msgid "" "allocated using :c:macro:`PyObject_GC_New` or :c:macro:`PyObject_GC_NewVar`." msgstr "" -#: c-api/typeobj.rst:703 +#: c-api/typeobj.rst:701 msgid "" "If the type supports garbage collection (has the :c:macro:" "`Py_TPFLAGS_HAVE_GC` flag bit set), the destructor should call :c:func:" "`PyObject_GC_UnTrack` before clearing any member fields." msgstr "" -#: c-api/typeobj.rst:707 +#: c-api/typeobj.rst:705 msgid "" "static void foo_dealloc(foo_object *self) {\n" " PyObject_GC_UnTrack(self);\n" @@ -1532,7 +1530,7 @@ msgid "" "}" msgstr "" -#: c-api/typeobj.rst:715 +#: c-api/typeobj.rst:713 msgid "" "Finally, if the type is heap allocated (:c:macro:`Py_TPFLAGS_HEAPTYPE`), the " "deallocator should release the owned reference to its type object (via :c:" @@ -1540,7 +1538,7 @@ msgid "" "dangling pointers, the recommended way to achieve this is:" msgstr "" -#: c-api/typeobj.rst:721 +#: c-api/typeobj.rst:719 msgid "" "static void foo_dealloc(foo_object *self) {\n" " PyTypeObject *tp = Py_TYPE(self);\n" @@ -1550,7 +1548,7 @@ msgid "" "}" msgstr "" -#: c-api/typeobj.rst:732 +#: c-api/typeobj.rst:730 msgid "" "In a garbage collected Python, :c:member:`!tp_dealloc` may be called from " "any Python thread, not just the thread which created the object (if the " @@ -1563,28 +1561,28 @@ msgid "" "member:`!tp_dealloc` will not violate any assumptions of the library." msgstr "" -#: c-api/typeobj.rst:751 +#: c-api/typeobj.rst:749 msgid "" "An optional offset to a per-instance function that implements calling the " "object using the :ref:`vectorcall protocol `, a more efficient " "alternative of the simpler :c:member:`~PyTypeObject.tp_call`." msgstr "" -#: c-api/typeobj.rst:756 +#: c-api/typeobj.rst:754 msgid "" "This field is only used if the flag :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` is " "set. If so, this must be a positive integer containing the offset in the " "instance of a :c:type:`vectorcallfunc` pointer." msgstr "" -#: c-api/typeobj.rst:760 +#: c-api/typeobj.rst:758 msgid "" "The *vectorcallfunc* pointer may be ``NULL``, in which case the instance " "behaves as if :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` was not set: calling the " "instance falls back to :c:member:`~PyTypeObject.tp_call`." msgstr "" -#: c-api/typeobj.rst:764 +#: c-api/typeobj.rst:762 msgid "" "Any class that sets ``Py_TPFLAGS_HAVE_VECTORCALL`` must also set :c:member:" "`~PyTypeObject.tp_call` and make sure its behaviour is consistent with the " @@ -1592,13 +1590,13 @@ msgid "" "`PyVectorcall_Call`." msgstr "" -#: c-api/typeobj.rst:771 +#: c-api/typeobj.rst:769 msgid "" "Before version 3.8, this slot was named ``tp_print``. In Python 2.x, it was " "used for printing to a file. In Python 3.0 to 3.7, it was unused." msgstr "" -#: c-api/typeobj.rst:777 +#: c-api/typeobj.rst:775 msgid "" "Before version 3.12, it was not recommended for :ref:`mutable heap types " "` to implement the vectorcall protocol. When a user sets :attr:" @@ -1608,7 +1606,7 @@ msgid "" "`Py_TPFLAGS_HAVE_VECTORCALL` flag." msgstr "" -#: c-api/typeobj.rst:787 +#: c-api/typeobj.rst:785 msgid "" "This field is always inherited. However, the :c:macro:" "`Py_TPFLAGS_HAVE_VECTORCALL` flag is not always inherited. If it's not set, " @@ -1616,11 +1614,11 @@ msgid "" "func:`PyVectorcall_Call` is explicitly called." msgstr "" -#: c-api/typeobj.rst:798 +#: c-api/typeobj.rst:796 msgid "An optional pointer to the get-attribute-string function." msgstr "" -#: c-api/typeobj.rst:800 +#: c-api/typeobj.rst:798 msgid "" "This field is deprecated. When it is defined, it should point to a function " "that acts the same as the :c:member:`~PyTypeObject.tp_getattro` function, " @@ -1628,13 +1626,13 @@ msgid "" "attribute name." msgstr "" -#: c-api/typeobj.rst:1014 +#: c-api/typeobj.rst:1012 msgid "" "Group: :c:member:`~PyTypeObject.tp_getattr`, :c:member:`~PyTypeObject." "tp_getattro`" msgstr "" -#: c-api/typeobj.rst:808 +#: c-api/typeobj.rst:806 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_getattro`: a subtype inherits both :c:member:`~PyTypeObject.tp_getattr` " @@ -1643,12 +1641,12 @@ msgid "" "tp_getattro` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:1029 +#: c-api/typeobj.rst:1027 msgid "" "An optional pointer to the function for setting and deleting attributes." msgstr "" -#: c-api/typeobj.rst:819 +#: c-api/typeobj.rst:817 msgid "" "This field is deprecated. When it is defined, it should point to a function " "that acts the same as the :c:member:`~PyTypeObject.tp_setattro` function, " @@ -1656,13 +1654,13 @@ msgid "" "attribute name." msgstr "" -#: c-api/typeobj.rst:1042 +#: c-api/typeobj.rst:1040 msgid "" "Group: :c:member:`~PyTypeObject.tp_setattr`, :c:member:`~PyTypeObject." "tp_setattro`" msgstr "" -#: c-api/typeobj.rst:827 +#: c-api/typeobj.rst:825 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_setattro`: a subtype inherits both :c:member:`~PyTypeObject.tp_setattr` " @@ -1671,38 +1669,38 @@ msgid "" "tp_setattro` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:834 +#: c-api/typeobj.rst:832 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement :term:`awaitable` and :term:`asynchronous iterator` " "protocols at the C-level. See :ref:`async-structs` for details." msgstr "" -#: c-api/typeobj.rst:838 +#: c-api/typeobj.rst:836 msgid "Formerly known as ``tp_compare`` and ``tp_reserved``." msgstr "" -#: c-api/typeobj.rst:843 +#: c-api/typeobj.rst:841 msgid "" "The :c:member:`~PyTypeObject.tp_as_async` field is not inherited, but the " "contained fields are inherited individually." msgstr "" -#: c-api/typeobj.rst:853 +#: c-api/typeobj.rst:851 msgid "" "An optional pointer to a function that implements the built-in function :" "func:`repr`." msgstr "" -#: c-api/typeobj.rst:856 +#: c-api/typeobj.rst:854 msgid "The signature is the same as for :c:func:`PyObject_Repr`::" msgstr "" -#: c-api/typeobj.rst:858 +#: c-api/typeobj.rst:856 msgid "PyObject *tp_repr(PyObject *self);" msgstr "" -#: c-api/typeobj.rst:860 +#: c-api/typeobj.rst:858 msgid "" "The function must return a string or a Unicode object. Ideally, this " "function should return a string that, when passed to :func:`eval`, given a " @@ -1711,80 +1709,80 @@ msgid "" "``'>'`` from which both the type and the value of the object can be deduced." msgstr "" -#: c-api/typeobj.rst:952 c-api/typeobj.rst:1020 c-api/typeobj.rst:1089 -#: c-api/typeobj.rst:1686 c-api/typeobj.rst:1848 c-api/typeobj.rst:1970 -#: c-api/typeobj.rst:2034 c-api/typeobj.rst:2090 +#: c-api/typeobj.rst:950 c-api/typeobj.rst:1018 c-api/typeobj.rst:1087 +#: c-api/typeobj.rst:1743 c-api/typeobj.rst:1905 c-api/typeobj.rst:2027 +#: c-api/typeobj.rst:2091 c-api/typeobj.rst:2147 msgid "**Default:**" msgstr "" -#: c-api/typeobj.rst:873 +#: c-api/typeobj.rst:871 msgid "" "When this field is not set, a string of the form ``<%s object at %p>`` is " "returned, where ``%s`` is replaced by the type name, and ``%p`` by the " "object's memory address." msgstr "" -#: c-api/typeobj.rst:880 +#: c-api/typeobj.rst:878 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement the number protocol. These fields are documented " "in :ref:`number-structs`." msgstr "" -#: c-api/typeobj.rst:886 +#: c-api/typeobj.rst:884 msgid "" "The :c:member:`~PyTypeObject.tp_as_number` field is not inherited, but the " "contained fields are inherited individually." msgstr "" -#: c-api/typeobj.rst:892 +#: c-api/typeobj.rst:890 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement the sequence protocol. These fields are documented " "in :ref:`sequence-structs`." msgstr "" -#: c-api/typeobj.rst:898 +#: c-api/typeobj.rst:896 msgid "" "The :c:member:`~PyTypeObject.tp_as_sequence` field is not inherited, but the " "contained fields are inherited individually." msgstr "" -#: c-api/typeobj.rst:904 +#: c-api/typeobj.rst:902 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement the mapping protocol. These fields are documented " "in :ref:`mapping-structs`." msgstr "" -#: c-api/typeobj.rst:910 +#: c-api/typeobj.rst:908 msgid "" "The :c:member:`~PyTypeObject.tp_as_mapping` field is not inherited, but the " "contained fields are inherited individually." msgstr "" -#: c-api/typeobj.rst:920 +#: c-api/typeobj.rst:918 msgid "" "An optional pointer to a function that implements the built-in function :" "func:`hash`." msgstr "" -#: c-api/typeobj.rst:923 +#: c-api/typeobj.rst:921 msgid "The signature is the same as for :c:func:`PyObject_Hash`::" msgstr "" -#: c-api/typeobj.rst:925 +#: c-api/typeobj.rst:923 msgid "Py_hash_t tp_hash(PyObject *);" msgstr "" -#: c-api/typeobj.rst:927 +#: c-api/typeobj.rst:925 msgid "" "The value ``-1`` should not be returned as a normal return value; when an " "error occurs during the computation of the hash value, the function should " "set an exception and return ``-1``." msgstr "" -#: c-api/typeobj.rst:931 +#: c-api/typeobj.rst:929 msgid "" "When this field is not set (*and* :c:member:`~PyTypeObject.tp_richcompare` " "is not set), an attempt to take the hash of the object raises :exc:" @@ -1792,7 +1790,7 @@ msgid "" "`PyObject_HashNotImplemented`." msgstr "" -#: c-api/typeobj.rst:935 +#: c-api/typeobj.rst:933 msgid "" "This field can be set explicitly to :c:func:`PyObject_HashNotImplemented` to " "block inheritance of the hash method from a parent type. This is interpreted " @@ -1803,13 +1801,13 @@ msgid "" "`PyObject_HashNotImplemented`." msgstr "" -#: c-api/typeobj.rst:1645 +#: c-api/typeobj.rst:1702 msgid "" "Group: :c:member:`~PyTypeObject.tp_hash`, :c:member:`~PyTypeObject." "tp_richcompare`" msgstr "" -#: c-api/typeobj.rst:947 +#: c-api/typeobj.rst:945 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_richcompare`: a subtype inherits both of :c:member:`~PyTypeObject." @@ -1818,22 +1816,22 @@ msgid "" "are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:954 +#: c-api/typeobj.rst:952 msgid ":c:data:`PyBaseObject_Type` uses :c:func:`PyObject_GenericHash`." msgstr "" -#: c-api/typeobj.rst:961 +#: c-api/typeobj.rst:959 msgid "" "An optional pointer to a function that implements calling the object. This " "should be ``NULL`` if the object is not callable. The signature is the same " "as for :c:func:`PyObject_Call`::" msgstr "" -#: c-api/typeobj.rst:965 +#: c-api/typeobj.rst:963 msgid "PyObject *tp_call(PyObject *self, PyObject *args, PyObject *kwargs);" msgstr "" -#: c-api/typeobj.rst:976 +#: c-api/typeobj.rst:974 msgid "" "An optional pointer to a function that implements the built-in operation :" "func:`str`. (Note that :class:`str` is a type now, and :func:`str` calls " @@ -1842,15 +1840,15 @@ msgid "" "this handler.)" msgstr "" -#: c-api/typeobj.rst:981 +#: c-api/typeobj.rst:979 msgid "The signature is the same as for :c:func:`PyObject_Str`::" msgstr "" -#: c-api/typeobj.rst:983 +#: c-api/typeobj.rst:981 msgid "PyObject *tp_str(PyObject *self);" msgstr "" -#: c-api/typeobj.rst:985 +#: c-api/typeobj.rst:983 msgid "" "The function must return a string or a Unicode object. It should be a " "\"friendly\" string representation of the object, as this is the " @@ -1858,32 +1856,32 @@ msgid "" "function." msgstr "" -#: c-api/typeobj.rst:995 +#: c-api/typeobj.rst:993 msgid "" "When this field is not set, :c:func:`PyObject_Repr` is called to return a " "string representation." msgstr "" -#: c-api/typeobj.rst:1003 +#: c-api/typeobj.rst:1001 msgid "An optional pointer to the get-attribute function." msgstr "" -#: c-api/typeobj.rst:1005 +#: c-api/typeobj.rst:1003 msgid "The signature is the same as for :c:func:`PyObject_GetAttr`::" msgstr "" -#: c-api/typeobj.rst:1007 +#: c-api/typeobj.rst:1005 msgid "PyObject *tp_getattro(PyObject *self, PyObject *attr);" msgstr "" -#: c-api/typeobj.rst:1009 +#: c-api/typeobj.rst:1007 msgid "" "It is usually convenient to set this field to :c:func:" "`PyObject_GenericGetAttr`, which implements the normal way of looking for " "object attributes." msgstr "" -#: c-api/typeobj.rst:1016 +#: c-api/typeobj.rst:1014 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_getattr`: a subtype inherits both :c:member:`~PyTypeObject.tp_getattr` " @@ -1892,19 +1890,19 @@ msgid "" "tp_getattro` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:1022 +#: c-api/typeobj.rst:1020 msgid ":c:data:`PyBaseObject_Type` uses :c:func:`PyObject_GenericGetAttr`." msgstr "" -#: c-api/typeobj.rst:1031 +#: c-api/typeobj.rst:1029 msgid "The signature is the same as for :c:func:`PyObject_SetAttr`::" msgstr "" -#: c-api/typeobj.rst:1033 +#: c-api/typeobj.rst:1031 msgid "int tp_setattro(PyObject *self, PyObject *attr, PyObject *value);" msgstr "" -#: c-api/typeobj.rst:1035 +#: c-api/typeobj.rst:1033 msgid "" "In addition, setting *value* to ``NULL`` to delete an attribute must be " "supported. It is usually convenient to set this field to :c:func:" @@ -1912,7 +1910,7 @@ msgid "" "attributes." msgstr "" -#: c-api/typeobj.rst:1044 +#: c-api/typeobj.rst:1042 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_setattr`: a subtype inherits both :c:member:`~PyTypeObject.tp_setattr` " @@ -1921,24 +1919,24 @@ msgid "" "tp_setattro` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:1050 +#: c-api/typeobj.rst:1048 msgid ":c:data:`PyBaseObject_Type` uses :c:func:`PyObject_GenericSetAttr`." msgstr "" -#: c-api/typeobj.rst:1055 +#: c-api/typeobj.rst:1053 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement the buffer interface. These fields are documented " "in :ref:`buffer-structs`." msgstr "" -#: c-api/typeobj.rst:1061 +#: c-api/typeobj.rst:1059 msgid "" "The :c:member:`~PyTypeObject.tp_as_buffer` field is not inherited, but the " "contained fields are inherited individually." msgstr "" -#: c-api/typeobj.rst:1067 +#: c-api/typeobj.rst:1065 msgid "" "This field is a bit mask of various flags. Some flags indicate variant " "semantics for certain situations; others are used to indicate that certain " @@ -1950,7 +1948,7 @@ msgid "" "accessed and must be considered to have a zero or ``NULL`` value instead." msgstr "" -#: c-api/typeobj.rst:1077 +#: c-api/typeobj.rst:1075 msgid "" "Inheritance of this field is complicated. Most flag bits are inherited " "individually, i.e. if the base type has a flag bit set, the subtype inherits " @@ -1966,17 +1964,17 @@ msgid "" "*really* inherited individually?" msgstr "" -#: c-api/typeobj.rst:1091 +#: c-api/typeobj.rst:1089 msgid "" ":c:data:`PyBaseObject_Type` uses ``Py_TPFLAGS_DEFAULT | " "Py_TPFLAGS_BASETYPE``." msgstr "" -#: c-api/typeobj.rst:1094 +#: c-api/typeobj.rst:1092 msgid "**Bit Masks:**" msgstr "" -#: c-api/typeobj.rst:1098 +#: c-api/typeobj.rst:1096 msgid "" "The following bit masks are currently defined; these can be ORed together " "using the ``|`` operator to form the value of the :c:member:`~PyTypeObject." @@ -1985,7 +1983,7 @@ msgid "" "zero." msgstr "" -#: c-api/typeobj.rst:1105 +#: c-api/typeobj.rst:1103 msgid "" "This bit is set when the type object itself is allocated on the heap, for " "example, types created dynamically using :c:func:`PyType_FromSpec`. In this " @@ -1998,30 +1996,30 @@ msgid "" "reference cycle with their own module object." msgstr "" -#: c-api/typeobj.rst:1127 c-api/typeobj.rst:1147 c-api/typeobj.rst:1179 +#: c-api/typeobj.rst:1125 c-api/typeobj.rst:1145 c-api/typeobj.rst:1177 msgid "???" msgstr "" -#: c-api/typeobj.rst:1121 +#: c-api/typeobj.rst:1119 msgid "" "This bit is set when the type can be used as the base type of another type. " "If this bit is clear, the type cannot be subtyped (similar to a \"final\" " "class in Java)." msgstr "" -#: c-api/typeobj.rst:1132 +#: c-api/typeobj.rst:1130 msgid "" "This bit is set when the type object has been fully initialized by :c:func:" "`PyType_Ready`." msgstr "" -#: c-api/typeobj.rst:1142 +#: c-api/typeobj.rst:1140 msgid "" "This bit is set while :c:func:`PyType_Ready` is in the process of " "initializing the type object." msgstr "" -#: c-api/typeobj.rst:1152 +#: c-api/typeobj.rst:1150 msgid "" "This bit is set when the object supports garbage collection. If this bit is " "set, instances must be created using :c:macro:`PyObject_GC_New` and " @@ -2031,13 +2029,13 @@ msgid "" "tp_clear` are present in the type object." msgstr "" -#: c-api/typeobj.rst:1506 c-api/typeobj.rst:1582 +#: c-api/typeobj.rst:1563 c-api/typeobj.rst:1639 msgid "" "Group: :c:macro:`Py_TPFLAGS_HAVE_GC`, :c:member:`~PyTypeObject." "tp_traverse`, :c:member:`~PyTypeObject.tp_clear`" msgstr "" -#: c-api/typeobj.rst:1163 +#: c-api/typeobj.rst:1161 msgid "" "The :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is inherited together with the :c:" "member:`~PyTypeObject.tp_traverse` and :c:member:`~PyTypeObject.tp_clear` " @@ -2047,106 +2045,106 @@ msgid "" "values." msgstr "" -#: c-api/typeobj.rst:1173 +#: c-api/typeobj.rst:1171 msgid "" "This is a bitmask of all the bits that pertain to the existence of certain " "fields in the type object and its extension structures. Currently, it " "includes the following bits: :c:macro:`Py_TPFLAGS_HAVE_STACKLESS_EXTENSION`." msgstr "" -#: c-api/typeobj.rst:1184 +#: c-api/typeobj.rst:1182 msgid "This bit indicates that objects behave like unbound methods." msgstr "" -#: c-api/typeobj.rst:1186 +#: c-api/typeobj.rst:1184 msgid "If this flag is set for ``type(meth)``, then:" msgstr "" -#: c-api/typeobj.rst:1188 +#: c-api/typeobj.rst:1186 msgid "" "``meth.__get__(obj, cls)(*args, **kwds)`` (with ``obj`` not None) must be " "equivalent to ``meth(obj, *args, **kwds)``." msgstr "" -#: c-api/typeobj.rst:1191 +#: c-api/typeobj.rst:1189 msgid "" "``meth.__get__(None, cls)(*args, **kwds)`` must be equivalent to " "``meth(*args, **kwds)``." msgstr "" -#: c-api/typeobj.rst:1194 +#: c-api/typeobj.rst:1192 msgid "" "This flag enables an optimization for typical method calls like ``obj." "meth()``: it avoids creating a temporary \"bound method\" object for ``obj." "meth``." msgstr "" -#: c-api/typeobj.rst:1202 +#: c-api/typeobj.rst:1200 msgid "" "This flag is never inherited by types without the :c:macro:" "`Py_TPFLAGS_IMMUTABLETYPE` flag set. For extension types, it is inherited " "whenever :c:member:`~PyTypeObject.tp_descr_get` is inherited." msgstr "" -#: c-api/typeobj.rst:1208 +#: c-api/typeobj.rst:1206 msgid "" "This bit indicates that instances of the class have a :attr:`~object." "__dict__` attribute, and that the space for the dictionary is managed by the " "VM." msgstr "" -#: c-api/typeobj.rst:1211 +#: c-api/typeobj.rst:1209 msgid "If this flag is set, :c:macro:`Py_TPFLAGS_HAVE_GC` should also be set." msgstr "" -#: c-api/typeobj.rst:1213 +#: c-api/typeobj.rst:1211 msgid "" "The type traverse function must call :c:func:`PyObject_VisitManagedDict` and " "its clear function must call :c:func:`PyObject_ClearManagedDict`." msgstr "" -#: c-api/typeobj.rst:1220 +#: c-api/typeobj.rst:1218 msgid "" "This flag is inherited unless the :c:member:`~PyTypeObject.tp_dictoffset` " "field is set in a superclass." msgstr "" -#: c-api/typeobj.rst:1226 +#: c-api/typeobj.rst:1224 msgid "" "This bit indicates that instances of the class should be weakly " "referenceable." msgstr "" -#: c-api/typeobj.rst:1233 +#: c-api/typeobj.rst:1231 msgid "" "This flag is inherited unless the :c:member:`~PyTypeObject." "tp_weaklistoffset` field is set in a superclass." msgstr "" -#: c-api/typeobj.rst:1239 +#: c-api/typeobj.rst:1237 msgid "" "Only usable with variable-size types, i.e. ones with non-zero :c:member:" "`~PyTypeObject.tp_itemsize`." msgstr "" -#: c-api/typeobj.rst:1242 +#: c-api/typeobj.rst:1240 msgid "" "Indicates that the variable-sized portion of an instance of this type is at " "the end of the instance's memory area, at an offset of ``Py_TYPE(obj)-" ">tp_basicsize`` (which may be different in each subclass)." msgstr "" -#: c-api/typeobj.rst:1247 +#: c-api/typeobj.rst:1245 msgid "" "When setting this flag, be sure that all superclasses either use this memory " "layout, or are not variable-sized. Python does not check this." msgstr "" -#: c-api/typeobj.rst:1255 +#: c-api/typeobj.rst:1253 msgid "This flag is inherited." msgstr "" -#: c-api/typeobj.rst:1269 +#: c-api/typeobj.rst:1267 msgid "" "Functions such as :c:func:`PyLong_Check` will call :c:func:" "`PyType_FastSubclass` with one of these flags to quickly determine if a type " @@ -2157,90 +2155,100 @@ msgid "" "differently depending on what kind of check is used." msgstr "" -#: c-api/typeobj.rst:1280 +#: c-api/typeobj.rst:1278 msgid "" "This bit is set when the :c:member:`~PyTypeObject.tp_finalize` slot is " "present in the type structure." msgstr "" -#: c-api/typeobj.rst:1285 +#: c-api/typeobj.rst:1283 msgid "" "This flag isn't necessary anymore, as the interpreter assumes the :c:member:" "`~PyTypeObject.tp_finalize` slot is always present in the type structure." msgstr "" -#: c-api/typeobj.rst:1293 +#: c-api/typeobj.rst:1294 msgid "" "This bit is set when the class implements the :ref:`vectorcall protocol " "`. See :c:member:`~PyTypeObject.tp_vectorcall_offset` for " "details." msgstr "" -#: c-api/typeobj.rst:1299 +#: c-api/typeobj.rst:1300 msgid "" "This bit is inherited if :c:member:`~PyTypeObject.tp_call` is also inherited." msgstr "" -#: c-api/typeobj.rst:1306 +#: c-api/typeobj.rst:1303 +msgid "as ``_Py_TPFLAGS_HAVE_VECTORCALL``" +msgstr "" + +#: c-api/typeobj.rst:1307 +msgid "" +"Renamed to the current name, without the leading underscore. The old " +"provisional name is :term:`soft deprecated`." +msgstr "" + +#: c-api/typeobj.rst:1312 msgid "" "This flag is now removed from a class when the class's :py:meth:`~object." "__call__` method is reassigned." msgstr "" -#: c-api/typeobj.rst:1309 +#: c-api/typeobj.rst:1315 msgid "This flag can now be inherited by mutable classes." msgstr "" -#: c-api/typeobj.rst:1313 +#: c-api/typeobj.rst:1319 msgid "" "This bit is set for type objects that are immutable: type attributes cannot " "be set nor deleted." msgstr "" -#: c-api/typeobj.rst:1315 +#: c-api/typeobj.rst:1321 msgid "" ":c:func:`PyType_Ready` automatically applies this flag to :ref:`static types " "`." msgstr "" -#: c-api/typeobj.rst:1320 +#: c-api/typeobj.rst:1433 c-api/typeobj.rst:1445 msgid "This flag is not inherited." msgstr "" -#: c-api/typeobj.rst:1326 +#: c-api/typeobj.rst:1332 msgid "" "Disallow creating instances of the type: set :c:member:`~PyTypeObject." "tp_new` to NULL and don't create the ``__new__`` key in the type dictionary." msgstr "" -#: c-api/typeobj.rst:1330 +#: c-api/typeobj.rst:1336 msgid "" "The flag must be set before creating the type, not after. For example, it " "must be set before :c:func:`PyType_Ready` is called on the type." msgstr "" -#: c-api/typeobj.rst:1333 +#: c-api/typeobj.rst:1339 msgid "" "The flag is set automatically on :ref:`static types ` if :c:" "member:`~PyTypeObject.tp_base` is NULL or ``&PyBaseObject_Type`` and :c:" "member:`~PyTypeObject.tp_new` is NULL." msgstr "" -#: c-api/typeobj.rst:1339 +#: c-api/typeobj.rst:1345 msgid "" "This flag is not inherited. However, subclasses will not be instantiable " "unless they provide a non-NULL :c:member:`~PyTypeObject.tp_new` (which is " "only possible via the C API)." msgstr "" -#: c-api/typeobj.rst:1346 +#: c-api/typeobj.rst:1352 msgid "" "To disallow instantiating a class directly but allow instantiating its " "subclasses (e.g. for an :term:`abstract base class`), do not use this flag. " "Instead, make :c:member:`~PyTypeObject.tp_new` only succeed for subclasses." msgstr "" -#: c-api/typeobj.rst:1357 +#: c-api/typeobj.rst:1363 msgid "" "This bit indicates that instances of the class may match mapping patterns " "when used as the subject of a :keyword:`match` block. It is automatically " @@ -2248,23 +2256,23 @@ msgid "" "unset when registering :class:`collections.abc.Sequence`." msgstr "" -#: c-api/typeobj.rst:1386 +#: c-api/typeobj.rst:1392 msgid "" ":c:macro:`Py_TPFLAGS_MAPPING` and :c:macro:`Py_TPFLAGS_SEQUENCE` are " "mutually exclusive; it is an error to enable both flags simultaneously." msgstr "" -#: c-api/typeobj.rst:1369 +#: c-api/typeobj.rst:1375 msgid "" "This flag is inherited by types that do not already set :c:macro:" "`Py_TPFLAGS_SEQUENCE`." msgstr "" -#: c-api/typeobj.rst:1394 +#: c-api/typeobj.rst:1400 msgid ":pep:`634` -- Structural Pattern Matching: Specification" msgstr "" -#: c-api/typeobj.rst:1379 +#: c-api/typeobj.rst:1385 msgid "" "This bit indicates that instances of the class may match sequence patterns " "when used as the subject of a :keyword:`match` block. It is automatically " @@ -2272,53 +2280,93 @@ msgid "" "unset when registering :class:`collections.abc.Mapping`." msgstr "" -#: c-api/typeobj.rst:1391 +#: c-api/typeobj.rst:1397 msgid "" "This flag is inherited by types that do not already set :c:macro:" "`Py_TPFLAGS_MAPPING`." msgstr "" -#: c-api/typeobj.rst:1401 +#: c-api/typeobj.rst:1407 msgid "" "Internal. Do not set or unset this flag. To indicate that a class has " "changed call :c:func:`PyType_Modified`" msgstr "" -#: c-api/typeobj.rst:1405 +#: c-api/typeobj.rst:1411 msgid "" "This flag is present in header files, but is not be used. It will be removed " "in a future version of CPython" msgstr "" -#: c-api/typeobj.rst:1413 +#: c-api/typeobj.rst:1417 +msgid "" +"This is a :term:`soft deprecated` macro that does nothing. Historically, " +"this would indicate that the :c:member:`~PyTypeObject.tp_version_tag` field " +"was available and initialized." +msgstr "" + +#: c-api/typeobj.rst:1425 +msgid "" +"This bit indicates that instances of this type will have an \"inline " +"values\" array (containing the object's attributes) placed directly after " +"the end of the object." +msgstr "" + +#: c-api/typeobj.rst:1429 +msgid "This requires that :c:macro:`Py_TPFLAGS_HAVE_GC` is set." +msgstr "" + +#: c-api/typeobj.rst:1440 +msgid "" +"This bit indicates that this is an abstract type and therefore cannot be " +"instantiated." +msgstr "" + +#: c-api/typeobj.rst:1448 +msgid ":mod:`abc`" +msgstr "" + +#: c-api/typeobj.rst:1453 +msgid "" +"Internal. Do not set or unset this flag. Historically, this was a reserved " +"flag for use in Stackless Python." +msgstr "" + +#: c-api/typeobj.rst:1457 +msgid "" +"This flag is present in header files, but is not be used. This may be " +"removed in a future version of CPython." +msgstr "" + +#: c-api/typeobj.rst:1465 msgid "" "An optional pointer to a NUL-terminated C string giving the docstring for " "this type object. This is exposed as the :attr:`~type.__doc__` attribute on " "the type and instances of the type." msgstr "" -#: c-api/typeobj.rst:1419 +#: c-api/typeobj.rst:1471 msgid "This field is *not* inherited by subtypes." msgstr "" -#: c-api/typeobj.rst:1426 +#: c-api/typeobj.rst:1478 msgid "" "An optional pointer to a traversal function for the garbage collector. This " "is only used if the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is set. The " "signature is::" msgstr "" -#: c-api/typeobj.rst:1429 +#: c-api/typeobj.rst:1481 msgid "int tp_traverse(PyObject *self, visitproc visit, void *arg);" msgstr "" -#: c-api/typeobj.rst:1577 +#: c-api/typeobj.rst:1634 msgid "" "More information about Python's garbage collection scheme can be found in " "section :ref:`supporting-cycle-detection`." msgstr "" -#: c-api/typeobj.rst:1434 +#: c-api/typeobj.rst:1486 msgid "" "The :c:member:`~PyTypeObject.tp_traverse` pointer is used by the garbage " "collector to detect reference cycles. A typical implementation of a :c:" @@ -2328,7 +2376,7 @@ msgid "" "`!_thread` extension module::" msgstr "" -#: c-api/typeobj.rst:1440 +#: c-api/typeobj.rst:1492 msgid "" "static int\n" "local_traverse(localobject *self, visitproc visit, void *arg)\n" @@ -2340,7 +2388,7 @@ msgid "" "}" msgstr "" -#: c-api/typeobj.rst:1449 +#: c-api/typeobj.rst:1501 msgid "" "Note that :c:func:`Py_VISIT` is called only on those members that can " "participate in reference cycles. Although there is also a ``self->key`` " @@ -2348,47 +2396,47 @@ msgid "" "part of a reference cycle." msgstr "" -#: c-api/typeobj.rst:1453 +#: c-api/typeobj.rst:1505 msgid "" "On the other hand, even if you know a member can never be part of a cycle, " "as a debugging aid you may want to visit it anyway just so the :mod:`gc` " "module's :func:`~gc.get_referents` function will include it." msgstr "" -#: c-api/typeobj.rst:1457 +#: c-api/typeobj.rst:1509 msgid "" "Heap types (:c:macro:`Py_TPFLAGS_HEAPTYPE`) must visit their type with::" msgstr "" -#: c-api/typeobj.rst:1459 +#: c-api/typeobj.rst:1511 msgid "Py_VISIT(Py_TYPE(self));" msgstr "" -#: c-api/typeobj.rst:1461 +#: c-api/typeobj.rst:1513 msgid "" "It is only needed since Python 3.9. To support Python 3.8 and older, this " "line must be conditional::" msgstr "" -#: c-api/typeobj.rst:1464 +#: c-api/typeobj.rst:1516 msgid "" "#if PY_VERSION_HEX >= 0x03090000\n" " Py_VISIT(Py_TYPE(self));\n" "#endif" msgstr "" -#: c-api/typeobj.rst:1468 +#: c-api/typeobj.rst:1520 msgid "" "If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit is set in the :c:member:" "`~PyTypeObject.tp_flags` field, the traverse function must call :c:func:" "`PyObject_VisitManagedDict` like this::" msgstr "" -#: c-api/typeobj.rst:1472 +#: c-api/typeobj.rst:1524 msgid "PyObject_VisitManagedDict((PyObject*)self, visit, arg);" msgstr "" -#: c-api/typeobj.rst:1475 +#: c-api/typeobj.rst:1527 msgid "" "When implementing :c:member:`~PyTypeObject.tp_traverse`, only the members " "that the instance *owns* (by having :term:`strong references ` hold a reference to " "their type. Their traversal function must therefore either visit :c:func:" @@ -2417,14 +2472,14 @@ msgid "" "superclass). If they do not, the type object may not be garbage-collected." msgstr "" -#: c-api/typeobj.rst:1499 +#: c-api/typeobj.rst:1556 msgid "" "Heap-allocated types are expected to visit ``Py_TYPE(self)`` in " "``tp_traverse``. In earlier versions of Python, due to `bug 40217 `_, doing this may lead to crashes in subclasses." msgstr "" -#: c-api/typeobj.rst:1508 +#: c-api/typeobj.rst:1565 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_clear` and the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit: the flag bit, :c:" @@ -2432,18 +2487,18 @@ msgid "" "are all inherited from the base type if they are all zero in the subtype." msgstr "" -#: c-api/typeobj.rst:1518 +#: c-api/typeobj.rst:1575 msgid "" "An optional pointer to a clear function for the garbage collector. This is " "only used if the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is set. The " "signature is::" msgstr "" -#: c-api/typeobj.rst:1521 +#: c-api/typeobj.rst:1578 msgid "int tp_clear(PyObject *);" msgstr "" -#: c-api/typeobj.rst:1523 +#: c-api/typeobj.rst:1580 msgid "" "The :c:member:`~PyTypeObject.tp_clear` member function is used to break " "reference cycles in cyclic garbage detected by the garbage collector. Taken " @@ -2458,7 +2513,7 @@ msgid "" "good reason to avoid implementing :c:member:`~PyTypeObject.tp_clear`." msgstr "" -#: c-api/typeobj.rst:1533 +#: c-api/typeobj.rst:1590 msgid "" "Implementations of :c:member:`~PyTypeObject.tp_clear` should drop the " "instance's references to those of its members that may be Python objects, " @@ -2466,7 +2521,7 @@ msgid "" "example::" msgstr "" -#: c-api/typeobj.rst:1537 +#: c-api/typeobj.rst:1594 msgid "" "static int\n" "local_clear(localobject *self)\n" @@ -2479,7 +2534,7 @@ msgid "" "}" msgstr "" -#: c-api/typeobj.rst:1547 +#: c-api/typeobj.rst:1604 msgid "" "The :c:func:`Py_CLEAR` macro should be used, because clearing references is " "delicate: the reference to the contained object must not be released (via :" @@ -2494,18 +2549,18 @@ msgid "" "performs the operations in a safe order." msgstr "" -#: c-api/typeobj.rst:1559 +#: c-api/typeobj.rst:1616 msgid "" "If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit is set in the :c:member:" "`~PyTypeObject.tp_flags` field, the clear function must call :c:func:" "`PyObject_ClearManagedDict` like this::" msgstr "" -#: c-api/typeobj.rst:1563 +#: c-api/typeobj.rst:1620 msgid "PyObject_ClearManagedDict((PyObject*)self);" msgstr "" -#: c-api/typeobj.rst:1565 +#: c-api/typeobj.rst:1622 msgid "" "Note that :c:member:`~PyTypeObject.tp_clear` is not *always* called before " "an instance is deallocated. For example, when reference counting is enough " @@ -2513,7 +2568,7 @@ msgid "" "is not involved and :c:member:`~PyTypeObject.tp_dealloc` is called directly." msgstr "" -#: c-api/typeobj.rst:1571 +#: c-api/typeobj.rst:1628 msgid "" "Because the goal of :c:member:`~PyTypeObject.tp_clear` functions is to break " "reference cycles, it's not necessary to clear contained objects like Python " @@ -2523,7 +2578,7 @@ msgid "" "invoke :c:member:`~PyTypeObject.tp_clear`." msgstr "" -#: c-api/typeobj.rst:1584 +#: c-api/typeobj.rst:1641 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_traverse` and the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit: the flag bit, :" @@ -2531,22 +2586,22 @@ msgid "" "are all inherited from the base type if they are all zero in the subtype." msgstr "" -#: c-api/typeobj.rst:1594 +#: c-api/typeobj.rst:1651 msgid "" "An optional pointer to the rich comparison function, whose signature is::" msgstr "" -#: c-api/typeobj.rst:1596 +#: c-api/typeobj.rst:1653 msgid "PyObject *tp_richcompare(PyObject *self, PyObject *other, int op);" msgstr "" -#: c-api/typeobj.rst:1598 +#: c-api/typeobj.rst:1655 msgid "" "The first parameter is guaranteed to be an instance of the type that is " "defined by :c:type:`PyTypeObject`." msgstr "" -#: c-api/typeobj.rst:1601 +#: c-api/typeobj.rst:1658 msgid "" "The function should return the result of the comparison (usually ``Py_True`` " "or ``Py_False``). If the comparison is undefined, it must return " @@ -2554,50 +2609,50 @@ msgid "" "set an exception condition." msgstr "" -#: c-api/typeobj.rst:1606 +#: c-api/typeobj.rst:1663 msgid "" "The following constants are defined to be used as the third argument for :c:" "member:`~PyTypeObject.tp_richcompare` and for :c:func:`PyObject_RichCompare`:" msgstr "" -#: c-api/typeobj.rst:1612 +#: c-api/typeobj.rst:1669 msgid "Constant" msgstr "" -#: c-api/typeobj.rst:1612 +#: c-api/typeobj.rst:1669 msgid "Comparison" msgstr "" -#: c-api/typeobj.rst:1614 +#: c-api/typeobj.rst:1671 msgid "``<``" msgstr "" -#: c-api/typeobj.rst:1616 +#: c-api/typeobj.rst:1673 msgid "``<=``" msgstr "" -#: c-api/typeobj.rst:1618 +#: c-api/typeobj.rst:1675 msgid "``==``" msgstr "" -#: c-api/typeobj.rst:1620 +#: c-api/typeobj.rst:1677 msgid "``!=``" msgstr "" -#: c-api/typeobj.rst:1622 +#: c-api/typeobj.rst:1679 msgid "``>``" msgstr "" -#: c-api/typeobj.rst:1624 +#: c-api/typeobj.rst:1681 msgid "``>=``" msgstr "" -#: c-api/typeobj.rst:1627 +#: c-api/typeobj.rst:1684 msgid "" "The following macro is defined to ease writing rich comparison functions:" msgstr "" -#: c-api/typeobj.rst:1631 +#: c-api/typeobj.rst:1688 msgid "" "Return ``Py_True`` or ``Py_False`` from the function, depending on the " "result of a comparison. VAL_A and VAL_B must be orderable by C comparison " @@ -2605,15 +2660,15 @@ msgid "" "specifies the requested operation, as for :c:func:`PyObject_RichCompare`." msgstr "" -#: c-api/typeobj.rst:1637 +#: c-api/typeobj.rst:1694 msgid "The returned value is a new :term:`strong reference`." msgstr "" -#: c-api/typeobj.rst:1639 +#: c-api/typeobj.rst:1696 msgid "On error, sets an exception and returns ``NULL`` from the function." msgstr "" -#: c-api/typeobj.rst:1647 +#: c-api/typeobj.rst:1704 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_hash`: a subtype inherits :c:member:`~PyTypeObject.tp_richcompare` and :c:" @@ -2621,7 +2676,7 @@ msgid "" "tp_richcompare` and :c:member:`~PyTypeObject.tp_hash` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:1654 +#: c-api/typeobj.rst:1711 msgid "" ":c:data:`PyBaseObject_Type` provides a :c:member:`~PyTypeObject." "tp_richcompare` implementation, which may be inherited. However, if only :c:" @@ -2630,13 +2685,13 @@ msgid "" "comparisons." msgstr "" -#: c-api/typeobj.rst:1663 +#: c-api/typeobj.rst:1720 msgid "" "While this field is still supported, :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` " "should be used instead, if at all possible." msgstr "" -#: c-api/typeobj.rst:1666 +#: c-api/typeobj.rst:1723 msgid "" "If the instances of this type are weakly referenceable, this field is " "greater than zero and contains the offset in the instance structure of the " @@ -2646,19 +2701,19 @@ msgid "" "`PyObject*` which is initialized to ``NULL``." msgstr "" -#: c-api/typeobj.rst:1673 +#: c-api/typeobj.rst:1730 msgid "" "Do not confuse this field with :c:member:`~PyTypeObject.tp_weaklist`; that " "is the list head for weak references to the type object itself." msgstr "" -#: c-api/typeobj.rst:1676 +#: c-api/typeobj.rst:1733 msgid "" "It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit " "and :c:member:`~PyTypeObject.tp_weaklistoffset`." msgstr "" -#: c-api/typeobj.rst:1681 +#: c-api/typeobj.rst:1738 msgid "" "This field is inherited by subtypes, but see the rules listed below. A " "subtype may override this offset; this means that the subtype uses a " @@ -2667,7 +2722,7 @@ msgid "" "not be a problem." msgstr "" -#: c-api/typeobj.rst:1688 +#: c-api/typeobj.rst:1745 msgid "" "If the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit is set in the :c:member:" "`~PyTypeObject.tp_flags` field, then :c:member:`~PyTypeObject." @@ -2675,32 +2730,32 @@ msgid "" "unsafe to use this field." msgstr "" -#: c-api/typeobj.rst:1698 +#: c-api/typeobj.rst:1755 msgid "" "An optional pointer to a function that returns an :term:`iterator` for the " "object. Its presence normally signals that the instances of this type are :" "term:`iterable` (although sequences may be iterable without this function)." msgstr "" -#: c-api/typeobj.rst:1702 +#: c-api/typeobj.rst:1759 msgid "This function has the same signature as :c:func:`PyObject_GetIter`::" msgstr "" -#: c-api/typeobj.rst:1704 +#: c-api/typeobj.rst:1761 msgid "PyObject *tp_iter(PyObject *self);" msgstr "" -#: c-api/typeobj.rst:1715 +#: c-api/typeobj.rst:1772 msgid "" "An optional pointer to a function that returns the next item in an :term:" "`iterator`. The signature is::" msgstr "" -#: c-api/typeobj.rst:1718 +#: c-api/typeobj.rst:1775 msgid "PyObject *tp_iternext(PyObject *self);" msgstr "" -#: c-api/typeobj.rst:1720 +#: c-api/typeobj.rst:1777 msgid "" "When the iterator is exhausted, it must return ``NULL``; a :exc:" "`StopIteration` exception may or may not be set. When another error occurs, " @@ -2708,74 +2763,74 @@ msgid "" "this type are iterators." msgstr "" -#: c-api/typeobj.rst:1725 +#: c-api/typeobj.rst:1782 msgid "" "Iterator types should also define the :c:member:`~PyTypeObject.tp_iter` " "function, and that function should return the iterator instance itself (not " "a new iterator instance)." msgstr "" -#: c-api/typeobj.rst:1729 +#: c-api/typeobj.rst:1786 msgid "This function has the same signature as :c:func:`PyIter_Next`." msgstr "" -#: c-api/typeobj.rst:1740 +#: c-api/typeobj.rst:1797 msgid "" "An optional pointer to a static ``NULL``-terminated array of :c:type:" "`PyMethodDef` structures, declaring regular methods of this type." msgstr "" -#: c-api/typeobj.rst:1743 +#: c-api/typeobj.rst:1800 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a method descriptor." msgstr "" -#: c-api/typeobj.rst:1748 +#: c-api/typeobj.rst:1805 msgid "" "This field is not inherited by subtypes (methods are inherited through a " "different mechanism)." msgstr "" -#: c-api/typeobj.rst:1756 +#: c-api/typeobj.rst:1813 msgid "" "An optional pointer to a static ``NULL``-terminated array of :c:type:" "`PyMemberDef` structures, declaring regular data members (fields or slots) " "of instances of this type." msgstr "" -#: c-api/typeobj.rst:1760 +#: c-api/typeobj.rst:1817 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a member descriptor." msgstr "" -#: c-api/typeobj.rst:1765 +#: c-api/typeobj.rst:1822 msgid "" "This field is not inherited by subtypes (members are inherited through a " "different mechanism)." msgstr "" -#: c-api/typeobj.rst:1773 +#: c-api/typeobj.rst:1830 msgid "" "An optional pointer to a static ``NULL``-terminated array of :c:type:" "`PyGetSetDef` structures, declaring computed attributes of instances of this " "type." msgstr "" -#: c-api/typeobj.rst:1776 +#: c-api/typeobj.rst:1833 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a getset descriptor." msgstr "" -#: c-api/typeobj.rst:1781 +#: c-api/typeobj.rst:1838 msgid "" "This field is not inherited by subtypes (computed attributes are inherited " "through a different mechanism)." msgstr "" -#: c-api/typeobj.rst:1789 +#: c-api/typeobj.rst:1846 msgid "" "An optional pointer to a base type from which type properties are " "inherited. At this level, only single inheritance is supported; multiple " @@ -2783,7 +2838,7 @@ msgid "" "metatype." msgstr "" -#: c-api/typeobj.rst:1797 +#: c-api/typeobj.rst:1854 msgid "" "Slot initialization is subject to the rules of initializing globals. C99 " "requires the initializers to be \"address constants\". Function designators " @@ -2791,7 +2846,7 @@ msgid "" "valid C99 address constants." msgstr "" -#: c-api/typeobj.rst:1802 +#: c-api/typeobj.rst:1859 msgid "" "However, the unary '&' operator applied to a non-static variable like :c:" "data:`PyBaseObject_Type` is not required to produce an address constant. " @@ -2799,27 +2854,27 @@ msgid "" "strictly standard conforming in this particular behavior." msgstr "" -#: c-api/typeobj.rst:1808 +#: c-api/typeobj.rst:1865 msgid "" "Consequently, :c:member:`~PyTypeObject.tp_base` should be set in the " "extension module's init function." msgstr "" -#: c-api/typeobj.rst:1813 +#: c-api/typeobj.rst:1870 msgid "This field is not inherited by subtypes (obviously)." msgstr "" -#: c-api/typeobj.rst:1817 +#: c-api/typeobj.rst:1874 msgid "" "This field defaults to ``&PyBaseObject_Type`` (which to Python programmers " "is known as the type :class:`object`)." msgstr "" -#: c-api/typeobj.rst:1823 +#: c-api/typeobj.rst:1880 msgid "The type's dictionary is stored here by :c:func:`PyType_Ready`." msgstr "" -#: c-api/typeobj.rst:1825 +#: c-api/typeobj.rst:1882 msgid "" "This field should normally be initialized to ``NULL`` before PyType_Ready is " "called; it may also be initialized to a dictionary containing initial " @@ -2830,70 +2885,70 @@ msgid "" "be treated as read-only." msgstr "" -#: c-api/typeobj.rst:1833 +#: c-api/typeobj.rst:1890 msgid "" "Some types may not store their dictionary in this slot. Use :c:func:" "`PyType_GetDict` to retrieve the dictionary for an arbitrary type." msgstr "" -#: c-api/typeobj.rst:1839 +#: c-api/typeobj.rst:1896 msgid "" "Internals detail: For static builtin types, this is always ``NULL``. " "Instead, the dict for such types is stored on ``PyInterpreterState``. Use :c:" "func:`PyType_GetDict` to get the dict for an arbitrary type." msgstr "" -#: c-api/typeobj.rst:1845 +#: c-api/typeobj.rst:1902 msgid "" "This field is not inherited by subtypes (though the attributes defined in " "here are inherited through a different mechanism)." msgstr "" -#: c-api/typeobj.rst:1850 +#: c-api/typeobj.rst:1907 msgid "" "If this field is ``NULL``, :c:func:`PyType_Ready` will assign a new " "dictionary to it." msgstr "" -#: c-api/typeobj.rst:1855 +#: c-api/typeobj.rst:1912 msgid "" "It is not safe to use :c:func:`PyDict_SetItem` on or otherwise modify :c:" "member:`~PyTypeObject.tp_dict` with the dictionary C-API." msgstr "" -#: c-api/typeobj.rst:1863 +#: c-api/typeobj.rst:1920 msgid "An optional pointer to a \"descriptor get\" function." msgstr "" -#: c-api/typeobj.rst:1883 c-api/typeobj.rst:1981 c-api/typeobj.rst:2007 +#: c-api/typeobj.rst:1940 c-api/typeobj.rst:2038 c-api/typeobj.rst:2064 msgid "The function signature is::" msgstr "" -#: c-api/typeobj.rst:1867 +#: c-api/typeobj.rst:1924 msgid "PyObject * tp_descr_get(PyObject *self, PyObject *obj, PyObject *type);" msgstr "" -#: c-api/typeobj.rst:1880 +#: c-api/typeobj.rst:1937 msgid "" "An optional pointer to a function for setting and deleting a descriptor's " "value." msgstr "" -#: c-api/typeobj.rst:1885 +#: c-api/typeobj.rst:1942 msgid "int tp_descr_set(PyObject *self, PyObject *obj, PyObject *value);" msgstr "" -#: c-api/typeobj.rst:1887 +#: c-api/typeobj.rst:1944 msgid "The *value* argument is set to ``NULL`` to delete the value." msgstr "" -#: c-api/typeobj.rst:1898 +#: c-api/typeobj.rst:1955 msgid "" "While this field is still supported, :c:macro:`Py_TPFLAGS_MANAGED_DICT` " "should be used instead, if at all possible." msgstr "" -#: c-api/typeobj.rst:1901 +#: c-api/typeobj.rst:1958 msgid "" "If the instances of this type have a dictionary containing instance " "variables, this field is non-zero and contains the offset in the instances " @@ -2901,19 +2956,19 @@ msgid "" "func:`PyObject_GenericGetAttr`." msgstr "" -#: c-api/typeobj.rst:1906 +#: c-api/typeobj.rst:1963 msgid "" "Do not confuse this field with :c:member:`~PyTypeObject.tp_dict`; that is " "the dictionary for attributes of the type object itself." msgstr "" -#: c-api/typeobj.rst:1909 +#: c-api/typeobj.rst:1966 msgid "" "The value specifies the offset of the dictionary from the start of the " "instance structure." msgstr "" -#: c-api/typeobj.rst:1911 +#: c-api/typeobj.rst:1968 msgid "" "The :c:member:`~PyTypeObject.tp_dictoffset` should be regarded as write-" "only. To get the pointer to the dictionary call :c:func:" @@ -2922,13 +2977,13 @@ msgid "" "to call :c:func:`PyObject_GetAttr` when accessing an attribute on the object." msgstr "" -#: c-api/typeobj.rst:1917 +#: c-api/typeobj.rst:1974 msgid "" "It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit and :c:" "member:`~PyTypeObject.tp_dictoffset`." msgstr "" -#: c-api/typeobj.rst:1922 +#: c-api/typeobj.rst:1979 msgid "" "This field is inherited by subtypes. A subtype should not override this " "offset; doing so could be unsafe, if C code tries to access the dictionary " @@ -2936,25 +2991,25 @@ msgid "" "`Py_TPFLAGS_MANAGED_DICT`." msgstr "" -#: c-api/typeobj.rst:1929 +#: c-api/typeobj.rst:1986 msgid "" "This slot has no default. For :ref:`static types `, if the " "field is ``NULL`` then no :attr:`~object.__dict__` gets created for " "instances." msgstr "" -#: c-api/typeobj.rst:1932 +#: c-api/typeobj.rst:1989 msgid "" "If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit is set in the :c:member:" "`~PyTypeObject.tp_flags` field, then :c:member:`~PyTypeObject.tp_dictoffset` " "will be set to ``-1``, to indicate that it is unsafe to use this field." msgstr "" -#: c-api/typeobj.rst:1942 +#: c-api/typeobj.rst:1999 msgid "An optional pointer to an instance initialization function." msgstr "" -#: c-api/typeobj.rst:1944 +#: c-api/typeobj.rst:2001 msgid "" "This function corresponds to the :meth:`~object.__init__` method of " "classes. Like :meth:`!__init__`, it is possible to create an instance " @@ -2962,18 +3017,18 @@ msgid "" "instance by calling its :meth:`!__init__` method again." msgstr "" -#: c-api/typeobj.rst:1951 +#: c-api/typeobj.rst:2008 msgid "int tp_init(PyObject *self, PyObject *args, PyObject *kwds);" msgstr "" -#: c-api/typeobj.rst:1953 +#: c-api/typeobj.rst:2010 msgid "" "The self argument is the instance to be initialized; the *args* and *kwds* " "arguments represent positional and keyword arguments of the call to :meth:" "`~object.__init__`." msgstr "" -#: c-api/typeobj.rst:1957 +#: c-api/typeobj.rst:2014 msgid "" "The :c:member:`~PyTypeObject.tp_init` function, if not ``NULL``, is called " "when an instance is created normally by calling its type, after the type's :" @@ -2985,52 +3040,52 @@ msgid "" "subtype's :c:member:`~PyTypeObject.tp_init` is called." msgstr "" -#: c-api/typeobj.rst:1964 +#: c-api/typeobj.rst:2021 msgid "Returns ``0`` on success, ``-1`` and sets an exception on error." msgstr "" -#: c-api/typeobj.rst:1972 +#: c-api/typeobj.rst:2029 msgid "" "For :ref:`static types ` this field does not have a default." msgstr "" -#: c-api/typeobj.rst:1979 +#: c-api/typeobj.rst:2036 msgid "An optional pointer to an instance allocation function." msgstr "" -#: c-api/typeobj.rst:1983 +#: c-api/typeobj.rst:2040 msgid "PyObject *tp_alloc(PyTypeObject *self, Py_ssize_t nitems);" msgstr "" -#: c-api/typeobj.rst:1987 +#: c-api/typeobj.rst:2044 msgid "" "This field is inherited by static subtypes, but not by dynamic subtypes " "(subtypes created by a class statement)." msgstr "" -#: c-api/typeobj.rst:1992 +#: c-api/typeobj.rst:2049 msgid "" "For dynamic subtypes, this field is always set to :c:func:" "`PyType_GenericAlloc`, to force a standard heap allocation strategy." msgstr "" -#: c-api/typeobj.rst:1996 +#: c-api/typeobj.rst:2053 msgid "" "For static subtypes, :c:data:`PyBaseObject_Type` uses :c:func:" "`PyType_GenericAlloc`. That is the recommended value for all statically " "defined types." msgstr "" -#: c-api/typeobj.rst:2005 +#: c-api/typeobj.rst:2062 msgid "An optional pointer to an instance creation function." msgstr "" -#: c-api/typeobj.rst:2009 +#: c-api/typeobj.rst:2066 msgid "" "PyObject *tp_new(PyTypeObject *subtype, PyObject *args, PyObject *kwds);" msgstr "" -#: c-api/typeobj.rst:2011 +#: c-api/typeobj.rst:2068 msgid "" "The *subtype* argument is the type of the object being created; the *args* " "and *kwds* arguments represent positional and keyword arguments of the call " @@ -3039,7 +3094,7 @@ msgid "" "that type (but not an unrelated type)." msgstr "" -#: c-api/typeobj.rst:2017 +#: c-api/typeobj.rst:2074 msgid "" "The :c:member:`~PyTypeObject.tp_new` function should call ``subtype-" ">tp_alloc(subtype, nitems)`` to allocate space for the object, and then do " @@ -3051,20 +3106,20 @@ msgid "" "be deferred to :c:member:`~PyTypeObject.tp_init`." msgstr "" -#: c-api/typeobj.rst:2025 +#: c-api/typeobj.rst:2082 msgid "" "Set the :c:macro:`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag to disallow " "creating instances of the type in Python." msgstr "" -#: c-api/typeobj.rst:2030 +#: c-api/typeobj.rst:2087 msgid "" "This field is inherited by subtypes, except it is not inherited by :ref:" "`static types ` whose :c:member:`~PyTypeObject.tp_base` is " "``NULL`` or ``&PyBaseObject_Type``." msgstr "" -#: c-api/typeobj.rst:2036 +#: c-api/typeobj.rst:2093 msgid "" "For :ref:`static types ` this field has no default. This means " "if the slot is defined as ``NULL``, the type cannot be called to create new " @@ -3072,44 +3127,44 @@ msgid "" "factory function." msgstr "" -#: c-api/typeobj.rst:2046 +#: c-api/typeobj.rst:2103 msgid "" "An optional pointer to an instance deallocation function. Its signature is::" msgstr "" -#: c-api/typeobj.rst:2048 +#: c-api/typeobj.rst:2105 msgid "void tp_free(void *self);" msgstr "" -#: c-api/typeobj.rst:2050 +#: c-api/typeobj.rst:2107 msgid "" "An initializer that is compatible with this signature is :c:func:" "`PyObject_Free`." msgstr "" -#: c-api/typeobj.rst:2054 +#: c-api/typeobj.rst:2111 msgid "" "This field is inherited by static subtypes, but not by dynamic subtypes " "(subtypes created by a class statement)" msgstr "" -#: c-api/typeobj.rst:2059 +#: c-api/typeobj.rst:2116 msgid "" "In dynamic subtypes, this field is set to a deallocator suitable to match :c:" "func:`PyType_GenericAlloc` and the value of the :c:macro:" "`Py_TPFLAGS_HAVE_GC` flag bit." msgstr "" -#: c-api/typeobj.rst:2063 +#: c-api/typeobj.rst:2120 msgid "" "For static subtypes, :c:data:`PyBaseObject_Type` uses :c:func:`PyObject_Del`." msgstr "" -#: c-api/typeobj.rst:2070 +#: c-api/typeobj.rst:2127 msgid "An optional pointer to a function called by the garbage collector." msgstr "" -#: c-api/typeobj.rst:2072 +#: c-api/typeobj.rst:2129 msgid "" "The garbage collector needs to know whether a particular object is " "collectible or not. Normally, it is sufficient to look at the object's " @@ -3121,91 +3176,91 @@ msgid "" "instance. The signature is::" msgstr "" -#: c-api/typeobj.rst:2080 +#: c-api/typeobj.rst:2137 msgid "int tp_is_gc(PyObject *self);" msgstr "" -#: c-api/typeobj.rst:2082 +#: c-api/typeobj.rst:2139 msgid "" "(The only example of this are types themselves. The metatype, :c:data:" "`PyType_Type`, defines this function to distinguish between statically and :" "ref:`dynamically allocated types `.)" msgstr "" -#: c-api/typeobj.rst:2092 +#: c-api/typeobj.rst:2149 msgid "" "This slot has no default. If this field is ``NULL``, :c:macro:" "`Py_TPFLAGS_HAVE_GC` is used as the functional equivalent." msgstr "" -#: c-api/typeobj.rst:2100 +#: c-api/typeobj.rst:2157 msgid "Tuple of base types." msgstr "" -#: c-api/typeobj.rst:2126 +#: c-api/typeobj.rst:2183 msgid "" "This field should be set to ``NULL`` and treated as read-only. Python will " "fill it in when the type is :c:func:`initialized `." msgstr "" -#: c-api/typeobj.rst:2105 +#: c-api/typeobj.rst:2162 msgid "" "For dynamically created classes, the ``Py_tp_bases`` :c:type:`slot " "` can be used instead of the *bases* argument of :c:func:" "`PyType_FromSpecWithBases`. The argument form is preferred." msgstr "" -#: c-api/typeobj.rst:2112 +#: c-api/typeobj.rst:2169 msgid "" "Multiple inheritance does not work well for statically defined types. If you " "set ``tp_bases`` to a tuple, Python will not raise an error, but some slots " "will only be inherited from the first base." msgstr "" -#: c-api/typeobj.rst:2141 c-api/typeobj.rst:2175 c-api/typeobj.rst:2191 +#: c-api/typeobj.rst:2198 c-api/typeobj.rst:2232 c-api/typeobj.rst:2248 msgid "This field is not inherited." msgstr "" -#: c-api/typeobj.rst:2123 +#: c-api/typeobj.rst:2180 msgid "" "Tuple containing the expanded set of base types, starting with the type " "itself and ending with :class:`object`, in Method Resolution Order." msgstr "" -#: c-api/typeobj.rst:2131 +#: c-api/typeobj.rst:2188 msgid "" "This field is not inherited; it is calculated fresh by :c:func:" "`PyType_Ready`." msgstr "" -#: c-api/typeobj.rst:2137 +#: c-api/typeobj.rst:2194 msgid "Unused. Internal use only." msgstr "" -#: c-api/typeobj.rst:2146 +#: c-api/typeobj.rst:2203 msgid "" "A collection of subclasses. Internal use only. May be an invalid pointer." msgstr "" -#: c-api/typeobj.rst:2148 +#: c-api/typeobj.rst:2205 msgid "" "To get a list of subclasses, call the Python method :py:meth:`~type." "__subclasses__`." msgstr "" -#: c-api/typeobj.rst:2153 +#: c-api/typeobj.rst:2210 msgid "" "For some types, this field does not hold a valid :c:expr:`PyObject*`. The " "type was changed to :c:expr:`void*` to indicate this." msgstr "" -#: c-api/typeobj.rst:2163 +#: c-api/typeobj.rst:2220 msgid "" "Weak reference list head, for weak references to this type object. Not " "inherited. Internal use only." msgstr "" -#: c-api/typeobj.rst:2168 +#: c-api/typeobj.rst:2225 msgid "" "Internals detail: For the static builtin types this is always ``NULL``, even " "if weakrefs are added. Instead, the weakrefs for each are stored on " @@ -3213,27 +3268,27 @@ msgid "" "``_PyObject_GET_WEAKREFS_LISTPTR()`` macro to avoid the distinction." msgstr "" -#: c-api/typeobj.rst:2182 +#: c-api/typeobj.rst:2239 msgid "" "This field is deprecated. Use :c:member:`~PyTypeObject.tp_finalize` instead." msgstr "" -#: c-api/typeobj.rst:2187 +#: c-api/typeobj.rst:2244 msgid "Used to index into the method cache. Internal use only." msgstr "" -#: c-api/typeobj.rst:2198 +#: c-api/typeobj.rst:2255 msgid "" "An optional pointer to an instance finalization function. This is the C " "implementation of the :meth:`~object.__del__` special method. Its signature " "is::" msgstr "" -#: c-api/typeobj.rst:2202 +#: c-api/typeobj.rst:2259 msgid "void tp_finalize(PyObject *self);" msgstr "" -#: c-api/typeobj.rst:2204 +#: c-api/typeobj.rst:2261 msgid "" "If :c:member:`~PyTypeObject.tp_finalize` is set, the interpreter calls it " "once when finalizing an instance. It is called either from the garbage " @@ -3243,14 +3298,14 @@ msgid "" "object in a sane state." msgstr "" -#: c-api/typeobj.rst:2211 +#: c-api/typeobj.rst:2268 msgid "" ":c:member:`~PyTypeObject.tp_finalize` should not mutate the current " "exception status; therefore, a recommended way to write a non-trivial " "finalizer is::" msgstr "" -#: c-api/typeobj.rst:2214 +#: c-api/typeobj.rst:2271 msgid "" "static void\n" "local_finalize(PyObject *self)\n" @@ -3265,18 +3320,18 @@ msgid "" "}" msgstr "" -#: c-api/typeobj.rst:2234 +#: c-api/typeobj.rst:2291 msgid "" "Before version 3.8 it was necessary to set the :c:macro:" "`Py_TPFLAGS_HAVE_FINALIZE` flags bit in order for this field to be used. " "This is no longer required." msgstr "" -#: c-api/typeobj.rst:2238 +#: c-api/typeobj.rst:2295 msgid "\"Safe object finalization\" (:pep:`442`)" msgstr "" -#: c-api/typeobj.rst:2243 +#: c-api/typeobj.rst:2300 msgid "" "Vectorcall function to use for calls of this type object. In other words, it " "is used to implement :ref:`vectorcall ` for ``type.__call__``. " @@ -3284,65 +3339,65 @@ msgid "" "meth:`~object.__new__` and :meth:`~object.__init__` is used." msgstr "" -#: c-api/typeobj.rst:2251 +#: c-api/typeobj.rst:2308 msgid "This field is never inherited." msgstr "" -#: c-api/typeobj.rst:2253 +#: c-api/typeobj.rst:2310 msgid "(the field exists since 3.8 but it's only used since 3.9)" msgstr "" -#: c-api/typeobj.rst:2258 +#: c-api/typeobj.rst:2315 msgid "Internal. Do not use." msgstr "" -#: c-api/typeobj.rst:2266 +#: c-api/typeobj.rst:2323 msgid "Static Types" msgstr "" -#: c-api/typeobj.rst:2268 +#: c-api/typeobj.rst:2325 msgid "" "Traditionally, types defined in C code are *static*, that is, a static :c:" "type:`PyTypeObject` structure is defined directly in code and initialized " "using :c:func:`PyType_Ready`." msgstr "" -#: c-api/typeobj.rst:2272 +#: c-api/typeobj.rst:2329 msgid "" "This results in types that are limited relative to types defined in Python:" msgstr "" -#: c-api/typeobj.rst:2274 +#: c-api/typeobj.rst:2331 msgid "" "Static types are limited to one base, i.e. they cannot use multiple " "inheritance." msgstr "" -#: c-api/typeobj.rst:2276 +#: c-api/typeobj.rst:2333 msgid "" "Static type objects (but not necessarily their instances) are immutable. It " "is not possible to add or modify the type object's attributes from Python." msgstr "" -#: c-api/typeobj.rst:2278 +#: c-api/typeobj.rst:2335 msgid "" "Static type objects are shared across :ref:`sub-interpreters `, so they should not include any subinterpreter-" "specific state." msgstr "" -#: c-api/typeobj.rst:2282 +#: c-api/typeobj.rst:2339 msgid "" "Also, since :c:type:`PyTypeObject` is only part of the :ref:`Limited API " "` as an opaque struct, any extension modules using static " "types must be compiled for a specific Python minor version." msgstr "" -#: c-api/typeobj.rst:2290 +#: c-api/typeobj.rst:2347 msgid "Heap Types" msgstr "" -#: c-api/typeobj.rst:2292 +#: c-api/typeobj.rst:2349 msgid "" "An alternative to :ref:`static types ` is *heap-allocated " "types*, or *heap types* for short, which correspond closely to classes " @@ -3350,29 +3405,29 @@ msgid "" "`Py_TPFLAGS_HEAPTYPE` flag set." msgstr "" -#: c-api/typeobj.rst:2297 +#: c-api/typeobj.rst:2354 msgid "" "This is done by filling a :c:type:`PyType_Spec` structure and calling :c:" "func:`PyType_FromSpec`, :c:func:`PyType_FromSpecWithBases`, :c:func:" "`PyType_FromModuleAndSpec`, or :c:func:`PyType_FromMetaclass`." msgstr "" -#: c-api/typeobj.rst:2305 +#: c-api/typeobj.rst:2362 msgid "Number Object Structures" msgstr "" -#: c-api/typeobj.rst:2312 +#: c-api/typeobj.rst:2369 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the number protocol. Each function is used by the function of " "similar name documented in the :ref:`number` section." msgstr "" -#: c-api/typeobj.rst:2774 +#: c-api/typeobj.rst:2831 msgid "Here is the structure definition::" msgstr "" -#: c-api/typeobj.rst:2320 +#: c-api/typeobj.rst:2377 msgid "" "typedef struct {\n" " binaryfunc nb_add;\n" @@ -3418,7 +3473,7 @@ msgid "" "} PyNumberMethods;" msgstr "" -#: c-api/typeobj.rst:2365 +#: c-api/typeobj.rst:2422 msgid "" "Binary and ternary functions must check the type of all their operands, and " "implement the necessary conversions (at least one of the operands is an " @@ -3428,31 +3483,31 @@ msgid "" "and set an exception." msgstr "" -#: c-api/typeobj.rst:2374 +#: c-api/typeobj.rst:2431 msgid "" "The :c:member:`~PyNumberMethods.nb_reserved` field should always be " "``NULL``. It was previously called :c:member:`!nb_long`, and was renamed in " "Python 3.0.1." msgstr "" -#: c-api/typeobj.rst:2525 +#: c-api/typeobj.rst:2582 msgid "Mapping Object Structures" msgstr "" -#: c-api/typeobj.rst:2532 +#: c-api/typeobj.rst:2589 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the mapping protocol. It has three members:" msgstr "" -#: c-api/typeobj.rst:2539 +#: c-api/typeobj.rst:2596 msgid "" "This function is used by :c:func:`PyMapping_Size` and :c:func:" "`PyObject_Size`, and has the same signature. This slot may be set to " "``NULL`` if the object has no defined length." msgstr "" -#: c-api/typeobj.rst:2547 +#: c-api/typeobj.rst:2604 msgid "" "This function is used by :c:func:`PyObject_GetItem` and :c:func:" "`PySequence_GetSlice`, and has the same signature as :c:func:`!" @@ -3460,7 +3515,7 @@ msgid "" "`PyMapping_Check` function to return ``1``, it can be ``NULL`` otherwise." msgstr "" -#: c-api/typeobj.rst:2557 +#: c-api/typeobj.rst:2614 msgid "" "This function is used by :c:func:`PyObject_SetItem`, :c:func:" "`PyObject_DelItem`, :c:func:`PySequence_SetSlice` and :c:func:" @@ -3470,17 +3525,17 @@ msgid "" "deletion." msgstr "" -#: c-api/typeobj.rst:2568 +#: c-api/typeobj.rst:2625 msgid "Sequence Object Structures" msgstr "" -#: c-api/typeobj.rst:2575 +#: c-api/typeobj.rst:2632 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the sequence protocol." msgstr "" -#: c-api/typeobj.rst:2582 +#: c-api/typeobj.rst:2639 msgid "" "This function is used by :c:func:`PySequence_Size` and :c:func:" "`PyObject_Size`, and has the same signature. It is also used for handling " @@ -3488,21 +3543,21 @@ msgid "" "member:`~PySequenceMethods.sq_ass_item` slots." msgstr "" -#: c-api/typeobj.rst:2591 +#: c-api/typeobj.rst:2648 msgid "" "This function is used by :c:func:`PySequence_Concat` and has the same " "signature. It is also used by the ``+`` operator, after trying the numeric " "addition via the :c:member:`~PyNumberMethods.nb_add` slot." msgstr "" -#: c-api/typeobj.rst:2599 +#: c-api/typeobj.rst:2656 msgid "" "This function is used by :c:func:`PySequence_Repeat` and has the same " "signature. It is also used by the ``*`` operator, after trying numeric " "multiplication via the :c:member:`~PyNumberMethods.nb_multiply` slot." msgstr "" -#: c-api/typeobj.rst:2607 +#: c-api/typeobj.rst:2664 msgid "" "This function is used by :c:func:`PySequence_GetItem` and has the same " "signature. It is also used by :c:func:`PyObject_GetItem`, after trying the " @@ -3511,7 +3566,7 @@ msgid "" "``1``, it can be ``NULL`` otherwise." msgstr "" -#: c-api/typeobj.rst:2613 +#: c-api/typeobj.rst:2670 msgid "" "Negative indexes are handled as follows: if the :c:member:" "`~PySequenceMethods.sq_length` slot is filled, it is called and the sequence " @@ -3520,7 +3575,7 @@ msgid "" "index is passed as is to the function." msgstr "" -#: c-api/typeobj.rst:2622 +#: c-api/typeobj.rst:2679 msgid "" "This function is used by :c:func:`PySequence_SetItem` and has the same " "signature. It is also used by :c:func:`PyObject_SetItem` and :c:func:" @@ -3529,14 +3584,14 @@ msgid "" "``NULL`` if the object does not support item assignment and deletion." msgstr "" -#: c-api/typeobj.rst:2633 +#: c-api/typeobj.rst:2690 msgid "" "This function may be used by :c:func:`PySequence_Contains` and has the same " "signature. This slot may be left to ``NULL``, in this case :c:func:`!" "PySequence_Contains` simply traverses the sequence until it finds a match." msgstr "" -#: c-api/typeobj.rst:2642 +#: c-api/typeobj.rst:2699 msgid "" "This function is used by :c:func:`PySequence_InPlaceConcat` and has the same " "signature. It should modify its first operand, and return it. This slot " @@ -3546,7 +3601,7 @@ msgid "" "c:member:`~PyNumberMethods.nb_inplace_add` slot." msgstr "" -#: c-api/typeobj.rst:2653 +#: c-api/typeobj.rst:2710 msgid "" "This function is used by :c:func:`PySequence_InPlaceRepeat` and has the same " "signature. It should modify its first operand, and return it. This slot " @@ -3556,74 +3611,73 @@ msgid "" "via the :c:member:`~PyNumberMethods.nb_inplace_multiply` slot." msgstr "" -#: c-api/typeobj.rst:2664 +#: c-api/typeobj.rst:2721 msgid "Buffer Object Structures" msgstr "" -#: c-api/typeobj.rst:2672 +#: c-api/typeobj.rst:2729 msgid "" "This structure holds pointers to the functions required by the :ref:`Buffer " "protocol `. The protocol defines how an exporter object can " "expose its internal data to consumer objects." msgstr "" -#: c-api/typeobj.rst:2731 c-api/typeobj.rst:2800 c-api/typeobj.rst:2826 +#: c-api/typeobj.rst:2788 c-api/typeobj.rst:2857 c-api/typeobj.rst:2883 msgid "The signature of this function is::" msgstr "" -#: c-api/typeobj.rst:2682 +#: c-api/typeobj.rst:2739 msgid "int (PyObject *exporter, Py_buffer *view, int flags);" msgstr "" -#: c-api/typeobj.rst:2684 +#: c-api/typeobj.rst:2741 msgid "" "Handle a request to *exporter* to fill in *view* as specified by *flags*. " "Except for point (3), an implementation of this function MUST take these " "steps:" msgstr "" -#: c-api/typeobj.rst:2688 +#: c-api/typeobj.rst:2745 msgid "" -"Check if the request can be met. If not, raise :exc:`BufferError`, set :c:" -"expr:`view->obj` to ``NULL`` and return ``-1``." +"Check if the request can be met. If not, raise :exc:`BufferError`, set " +"``view->obj`` to ``NULL`` and return ``-1``." msgstr "" -#: c-api/typeobj.rst:2691 +#: c-api/typeobj.rst:2748 msgid "Fill in the requested fields." msgstr "" -#: c-api/typeobj.rst:2693 +#: c-api/typeobj.rst:2750 msgid "Increment an internal counter for the number of exports." msgstr "" -#: c-api/typeobj.rst:2695 -msgid "" -"Set :c:expr:`view->obj` to *exporter* and increment :c:expr:`view->obj`." +#: c-api/typeobj.rst:2752 +msgid "Set ``view->obj`` to *exporter* and increment ``view->obj``." msgstr "" -#: c-api/typeobj.rst:2697 +#: c-api/typeobj.rst:2754 msgid "Return ``0``." msgstr "" -#: c-api/typeobj.rst:2699 +#: c-api/typeobj.rst:2756 msgid "" "If *exporter* is part of a chain or tree of buffer providers, two main " "schemes can be used:" msgstr "" -#: c-api/typeobj.rst:2702 +#: c-api/typeobj.rst:2759 msgid "" -"Re-export: Each member of the tree acts as the exporting object and sets :c:" -"expr:`view->obj` to a new reference to itself." +"Re-export: Each member of the tree acts as the exporting object and sets " +"``view->obj`` to a new reference to itself." msgstr "" -#: c-api/typeobj.rst:2705 +#: c-api/typeobj.rst:2762 msgid "" "Redirect: The buffer request is redirected to the root object of the tree. " -"Here, :c:expr:`view->obj` will be a new reference to the root object." +"Here, ``view->obj`` will be a new reference to the root object." msgstr "" -#: c-api/typeobj.rst:2709 +#: c-api/typeobj.rst:2766 msgid "" "The individual fields of *view* are described in section :ref:`Buffer " "structure `, the rules how an exporter must react to " @@ -3631,7 +3685,7 @@ msgid "" "types>`." msgstr "" -#: c-api/typeobj.rst:2714 +#: c-api/typeobj.rst:2771 msgid "" "All memory pointed to in the :c:type:`Py_buffer` structure belongs to the " "exporter and must remain valid until there are no consumers left. :c:member:" @@ -3640,23 +3694,23 @@ msgid "" "internal` are read-only for the consumer." msgstr "" -#: c-api/typeobj.rst:2721 +#: c-api/typeobj.rst:2778 msgid "" ":c:func:`PyBuffer_FillInfo` provides an easy way of exposing a simple bytes " "buffer while dealing correctly with all request types." msgstr "" -#: c-api/typeobj.rst:2724 +#: c-api/typeobj.rst:2781 msgid "" ":c:func:`PyObject_GetBuffer` is the interface for the consumer that wraps " "this function." msgstr "" -#: c-api/typeobj.rst:2733 +#: c-api/typeobj.rst:2790 msgid "void (PyObject *exporter, Py_buffer *view);" msgstr "" -#: c-api/typeobj.rst:2735 +#: c-api/typeobj.rst:2792 msgid "" "Handle a request to release the resources of the buffer. If no resources " "need to be released, :c:member:`PyBufferProcs.bf_releasebuffer` may be " @@ -3664,15 +3718,15 @@ msgid "" "these optional steps:" msgstr "" -#: c-api/typeobj.rst:2740 +#: c-api/typeobj.rst:2797 msgid "Decrement an internal counter for the number of exports." msgstr "" -#: c-api/typeobj.rst:2742 +#: c-api/typeobj.rst:2799 msgid "If the counter is ``0``, free all memory associated with *view*." msgstr "" -#: c-api/typeobj.rst:2744 +#: c-api/typeobj.rst:2801 msgid "" "The exporter MUST use the :c:member:`~Py_buffer.internal` field to keep " "track of buffer-specific resources. This field is guaranteed to remain " @@ -3680,30 +3734,30 @@ msgid "" "*view* argument." msgstr "" -#: c-api/typeobj.rst:2750 +#: c-api/typeobj.rst:2807 msgid "" -"This function MUST NOT decrement :c:expr:`view->obj`, since that is done " +"This function MUST NOT decrement ``view->obj``, since that is done " "automatically in :c:func:`PyBuffer_Release` (this scheme is useful for " "breaking reference cycles)." msgstr "" -#: c-api/typeobj.rst:2755 +#: c-api/typeobj.rst:2812 msgid "" ":c:func:`PyBuffer_Release` is the interface for the consumer that wraps this " "function." msgstr "" -#: c-api/typeobj.rst:2763 +#: c-api/typeobj.rst:2820 msgid "Async Object Structures" msgstr "" -#: c-api/typeobj.rst:2771 +#: c-api/typeobj.rst:2828 msgid "" "This structure holds pointers to the functions required to implement :term:" "`awaitable` and :term:`asynchronous iterator` objects." msgstr "" -#: c-api/typeobj.rst:2776 +#: c-api/typeobj.rst:2833 msgid "" "typedef struct {\n" " unaryfunc am_await;\n" @@ -3713,61 +3767,61 @@ msgid "" "} PyAsyncMethods;" msgstr "" -#: c-api/typeobj.rst:2789 +#: c-api/typeobj.rst:2846 msgid "PyObject *am_await(PyObject *self);" msgstr "" -#: c-api/typeobj.rst:2791 +#: c-api/typeobj.rst:2848 msgid "" "The returned object must be an :term:`iterator`, i.e. :c:func:`PyIter_Check` " "must return ``1`` for it." msgstr "" -#: c-api/typeobj.rst:2794 +#: c-api/typeobj.rst:2851 msgid "" "This slot may be set to ``NULL`` if an object is not an :term:`awaitable`." msgstr "" -#: c-api/typeobj.rst:2802 +#: c-api/typeobj.rst:2859 msgid "PyObject *am_aiter(PyObject *self);" msgstr "" -#: c-api/typeobj.rst:2804 +#: c-api/typeobj.rst:2861 msgid "" "Must return an :term:`asynchronous iterator` object. See :meth:`~object." "__anext__` for details." msgstr "" -#: c-api/typeobj.rst:2807 +#: c-api/typeobj.rst:2864 msgid "" "This slot may be set to ``NULL`` if an object does not implement " "asynchronous iteration protocol." msgstr "" -#: c-api/typeobj.rst:2816 +#: c-api/typeobj.rst:2873 msgid "PyObject *am_anext(PyObject *self);" msgstr "" -#: c-api/typeobj.rst:2818 +#: c-api/typeobj.rst:2875 msgid "" "Must return an :term:`awaitable` object. See :meth:`~object.__anext__` for " "details. This slot may be set to ``NULL``." msgstr "" -#: c-api/typeobj.rst:2828 +#: c-api/typeobj.rst:2885 msgid "PySendResult am_send(PyObject *self, PyObject *arg, PyObject **result);" msgstr "" -#: c-api/typeobj.rst:2830 +#: c-api/typeobj.rst:2887 msgid "" "See :c:func:`PyIter_Send` for details. This slot may be set to ``NULL``." msgstr "" -#: c-api/typeobj.rst:2839 +#: c-api/typeobj.rst:2896 msgid "Slot Type typedefs" msgstr "" -#: c-api/typeobj.rst:2843 +#: c-api/typeobj.rst:2900 msgid "" "The purpose of this function is to separate memory allocation from memory " "initialization. It should return a pointer to a block of memory of adequate " @@ -3781,80 +3835,80 @@ msgid "" "length of the block should be :c:member:`~PyTypeObject.tp_basicsize`." msgstr "" -#: c-api/typeobj.rst:2853 +#: c-api/typeobj.rst:2910 msgid "" "This function should not do any other instance initialization, not even to " "allocate additional memory; that should be done by :c:member:`~PyTypeObject." "tp_new`." msgstr "" -#: c-api/typeobj.rst:2860 +#: c-api/typeobj.rst:2917 msgid "See :c:member:`~PyTypeObject.tp_free`." msgstr "" -#: c-api/typeobj.rst:2864 +#: c-api/typeobj.rst:2921 msgid "See :c:member:`~PyTypeObject.tp_new`." msgstr "" -#: c-api/typeobj.rst:2868 +#: c-api/typeobj.rst:2925 msgid "See :c:member:`~PyTypeObject.tp_init`." msgstr "" -#: c-api/typeobj.rst:2872 +#: c-api/typeobj.rst:2929 msgid "See :c:member:`~PyTypeObject.tp_repr`." msgstr "" -#: c-api/typeobj.rst:2885 +#: c-api/typeobj.rst:2942 msgid "Return the value of the named attribute for the object." msgstr "" -#: c-api/typeobj.rst:2891 +#: c-api/typeobj.rst:2948 msgid "" "Set the value of the named attribute for the object. The value argument is " "set to ``NULL`` to delete the attribute." msgstr "" -#: c-api/typeobj.rst:2887 +#: c-api/typeobj.rst:2944 msgid "See :c:member:`~PyTypeObject.tp_getattro`." msgstr "" -#: c-api/typeobj.rst:2894 +#: c-api/typeobj.rst:2951 msgid "See :c:member:`~PyTypeObject.tp_setattro`." msgstr "" -#: c-api/typeobj.rst:2898 +#: c-api/typeobj.rst:2955 msgid "See :c:member:`~PyTypeObject.tp_descr_get`." msgstr "" -#: c-api/typeobj.rst:2902 +#: c-api/typeobj.rst:2959 msgid "See :c:member:`~PyTypeObject.tp_descr_set`." msgstr "" -#: c-api/typeobj.rst:2906 +#: c-api/typeobj.rst:2963 msgid "See :c:member:`~PyTypeObject.tp_hash`." msgstr "" -#: c-api/typeobj.rst:2910 +#: c-api/typeobj.rst:2967 msgid "See :c:member:`~PyTypeObject.tp_richcompare`." msgstr "" -#: c-api/typeobj.rst:2914 +#: c-api/typeobj.rst:2971 msgid "See :c:member:`~PyTypeObject.tp_iter`." msgstr "" -#: c-api/typeobj.rst:2918 +#: c-api/typeobj.rst:2975 msgid "See :c:member:`~PyTypeObject.tp_iternext`." msgstr "" -#: c-api/typeobj.rst:2932 +#: c-api/typeobj.rst:2989 msgid "See :c:member:`~PyAsyncMethods.am_send`." msgstr "" -#: c-api/typeobj.rst:2948 +#: c-api/typeobj.rst:3005 msgid "Examples" msgstr "" -#: c-api/typeobj.rst:2950 +#: c-api/typeobj.rst:3007 msgid "" "The following are simple examples of Python type definitions. They include " "common usage you may encounter. Some demonstrate tricky corner cases. For " @@ -3862,11 +3916,11 @@ msgid "" "and :ref:`new-types-topics`." msgstr "" -#: c-api/typeobj.rst:2955 +#: c-api/typeobj.rst:3012 msgid "A basic :ref:`static type `::" msgstr "" -#: c-api/typeobj.rst:2957 +#: c-api/typeobj.rst:3014 msgid "" "typedef struct {\n" " PyObject_HEAD\n" @@ -3884,13 +3938,13 @@ msgid "" "};" msgstr "" -#: c-api/typeobj.rst:2972 +#: c-api/typeobj.rst:3029 msgid "" "You may also find older code (especially in the CPython code base) with a " "more verbose initializer::" msgstr "" -#: c-api/typeobj.rst:2975 +#: c-api/typeobj.rst:3032 msgid "" "static PyTypeObject MyObject_Type = {\n" " PyVarObject_HEAD_INIT(NULL, 0)\n" @@ -3934,11 +3988,11 @@ msgid "" "};" msgstr "" -#: c-api/typeobj.rst:3016 +#: c-api/typeobj.rst:3073 msgid "A type that supports weakrefs, instance dicts, and hashing::" msgstr "" -#: c-api/typeobj.rst:3018 +#: c-api/typeobj.rst:3075 msgid "" "typedef struct {\n" " PyObject_HEAD\n" @@ -3964,14 +4018,14 @@ msgid "" "};" msgstr "" -#: c-api/typeobj.rst:3041 +#: c-api/typeobj.rst:3098 msgid "" "A str subclass that cannot be subclassed and cannot be called to create " "instances (e.g. uses a separate factory func) using :c:macro:" "`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag::" msgstr "" -#: c-api/typeobj.rst:3045 +#: c-api/typeobj.rst:3102 msgid "" "typedef struct {\n" " PyUnicodeObject raw;\n" @@ -3989,12 +4043,12 @@ msgid "" "};" msgstr "" -#: c-api/typeobj.rst:3060 +#: c-api/typeobj.rst:3117 msgid "" "The simplest :ref:`static type ` with fixed-length instances::" msgstr "" -#: c-api/typeobj.rst:3062 +#: c-api/typeobj.rst:3119 msgid "" "typedef struct {\n" " PyObject_HEAD\n" @@ -4006,13 +4060,13 @@ msgid "" "};" msgstr "" -#: c-api/typeobj.rst:3071 +#: c-api/typeobj.rst:3128 msgid "" "The simplest :ref:`static type ` with variable-length " "instances::" msgstr "" -#: c-api/typeobj.rst:3073 +#: c-api/typeobj.rst:3130 msgid "" "typedef struct {\n" " PyObject_VAR_HEAD\n" @@ -4027,14 +4081,14 @@ msgid "" "};" msgstr "" -#: c-api/typeobj.rst:918 +#: c-api/typeobj.rst:916 msgid "built-in function" msgstr "" -#: c-api/typeobj.rst:851 +#: c-api/typeobj.rst:849 msgid "repr" msgstr "" -#: c-api/typeobj.rst:918 +#: c-api/typeobj.rst:916 msgid "hash" msgstr "" diff --git a/c-api/unicode.po b/c-api/unicode.po index 999fa8af9..384675e5d 100644 --- a/c-api/unicode.po +++ b/c-api/unicode.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -906,7 +906,7 @@ msgstr "" #: c-api/unicode.rst:685 msgid "" -"Return the number of written character, or return ``-1`` and raise an " +"Return the number of written characters, or return ``-1`` and raise an " "exception on error." msgstr "" @@ -1332,7 +1332,7 @@ msgid "" msgstr "" #: c-api/unicode.rst:1106 -msgid "The return type is now ``const char *`` rather of ``char *``." +msgid "The return type is now ``const char *`` rather than ``char *``." msgstr "" #: c-api/unicode.rst:1087 diff --git a/c-api/utilities.po b/c-api/utilities.po index 867121fa9..c40e28c2e 100644 --- a/c-api/utilities.po +++ b/c-api/utilities.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/c-api/veryhigh.po b/c-api/veryhigh.po index a41c16e72..55bbc0ff8 100644 --- a/c-api/veryhigh.po +++ b/c-api/veryhigh.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -224,7 +224,7 @@ msgid "" "objects *globals* and *locals* with the compiler flags specified by " "*flags*. *globals* must be a dictionary; *locals* can be any object that " "implements the mapping protocol. The parameter *start* specifies the start " -"symbol and must one of the :ref:`available start symbols `." +"symbol and must be one of the :ref:`available start symbols `." msgstr "" #: c-api/veryhigh.rst:196 diff --git a/c-api/weakref.po b/c-api/weakref.po index 8bc7614f1..a0df1de40 100644 --- a/c-api/weakref.po +++ b/c-api/weakref.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -60,8 +60,8 @@ msgid "" "a callable object that receives notification when *ob* is garbage collected; " "it should accept a single parameter, which will be the weak reference object " "itself. *callback* may also be ``None`` or ``NULL``. If *ob* is not a " -"weakly referenceable object, or if *callback* is not callable, ``None``, or " -"``NULL``, this will return ``NULL`` and raise :exc:`TypeError`." +"weakly referenceable object, this will raise :exc:`TypeError` and return " +"``NULL``." msgstr "" #: c-api/weakref.rst:65 @@ -78,8 +78,8 @@ msgid "" "can be a callable object that receives notification when *ob* is garbage " "collected; it should accept a single parameter, which will be the weak " "reference object itself. *callback* may also be ``None`` or ``NULL``. If " -"*ob* is not a weakly referenceable object, or if *callback* is not callable, " -"``None``, or ``NULL``, this will return ``NULL`` and raise :exc:`TypeError`." +"*ob* weakly referenceable object, this will raise :exc:`TypeError` and " +"return ``NULL``." msgstr "" #: c-api/weakref.rst:71 diff --git a/contents.po b/contents.po index e639c6779..a29bfb082 100644 --- a/contents.po +++ b/contents.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: 2024-04-24 22:37+0300\n" "Last-Translator: Panagiotis Skias \n" "Language-Team: PyGreece \n" diff --git a/copyright.po b/copyright.po index 6829c7f7f..9757490e7 100644 --- a/copyright.po +++ b/copyright.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: 2025-11-27 09:00+0200\n" "Last-Translator: Panagiotis Skias \n" "Language-Team: PyGreece \n" diff --git a/cpython b/cpython index 9756d8c63..9b2aca607 160000 --- a/cpython +++ b/cpython @@ -1 +1 @@ -Subproject commit 9756d8c63737042db611205b0c33c353d5dbd9c3 +Subproject commit 9b2aca607c4ee59204031be709350624194b7c47 diff --git a/deprecations/c-api-pending-removal-in-3.14.po b/deprecations/c-api-pending-removal-in-3.14.po index 7ff7ffe6b..601149c00 100644 --- a/deprecations/c-api-pending-removal-in-3.14.po +++ b/deprecations/c-api-pending-removal-in-3.14.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/deprecations/c-api-pending-removal-in-3.15.po b/deprecations/c-api-pending-removal-in-3.15.po index 595f133a3..20093fa1e 100644 --- a/deprecations/c-api-pending-removal-in-3.15.po +++ b/deprecations/c-api-pending-removal-in-3.15.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/deprecations/c-api-pending-removal-in-3.16.po b/deprecations/c-api-pending-removal-in-3.16.po index 059f2e0db..667fc4919 100644 --- a/deprecations/c-api-pending-removal-in-3.16.po +++ b/deprecations/c-api-pending-removal-in-3.16.po @@ -8,10 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\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/deprecations/c-api-pending-removal-in-future.po b/deprecations/c-api-pending-removal-in-future.po index 5deb4e93f..7ae21e0f2 100644 --- a/deprecations/c-api-pending-removal-in-future.po +++ b/deprecations/c-api-pending-removal-in-future.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/deprecations/index.po b/deprecations/index.po index 619fb0b69..eb099be75 100644 --- a/deprecations/index.po +++ b/deprecations/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -269,66 +269,53 @@ msgid "``load_module()`` method: use ``exec_module()`` instead." msgstr "" #: deprecations/pending-removal-in-3.15.rst:36 -msgid ":class:`locale`:" -msgstr "" - -#: deprecations/pending-removal-in-3.15.rst:38 -msgid "" -"The :func:`~locale.getdefaultlocale` function has been deprecated since " -"Python 3.11. Its removal was originally planned for Python 3.13 (:gh:" -"`90817`), but has been postponed to Python 3.15. Use :func:`~locale." -"getlocale`, :func:`~locale.setlocale`, and :func:`~locale.getencoding` " -"instead. (Contributed by Hugo van Kemenade in :gh:`111187`.)" -msgstr "" - -#: deprecations/pending-removal-in-3.15.rst:46 msgid ":mod:`pathlib`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:48 +#: deprecations/pending-removal-in-3.15.rst:38 msgid "" ":meth:`.PurePath.is_reserved` has been deprecated since Python 3.13. Use :" "func:`os.path.isreserved` to detect reserved paths on Windows." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:52 +#: deprecations/pending-removal-in-3.15.rst:42 msgid ":mod:`platform`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:54 +#: deprecations/pending-removal-in-3.15.rst:44 msgid "" ":func:`~platform.java_ver` has been deprecated since Python 3.13. This " "function is only useful for Jython support, has a confusing API, and is " "largely untested." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:58 +#: deprecations/pending-removal-in-3.15.rst:48 msgid ":mod:`sysconfig`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:60 +#: deprecations/pending-removal-in-3.15.rst:50 msgid "" "The *check_home* argument of :func:`sysconfig.is_python_build` has been " "deprecated since Python 3.12." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:63 +#: deprecations/pending-removal-in-3.15.rst:53 msgid ":mod:`threading`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:65 +#: deprecations/pending-removal-in-3.15.rst:55 msgid "" ":func:`~threading.RLock` will take no arguments in Python 3.15. Passing any " -"arguments has been deprecated since Python 3.14, as the Python version does " +"arguments has been deprecated since Python 3.14, as the Python version does " "not permit any arguments, but the C version allows any number of positional " "or keyword arguments, ignoring every argument." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:71 +#: deprecations/pending-removal-in-3.15.rst:61 msgid ":mod:`types`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:73 +#: deprecations/pending-removal-in-3.15.rst:63 msgid "" ":class:`types.CodeType`: Accessing :attr:`~codeobject.co_lnotab` was " "deprecated in :pep:`626` since 3.10 and was planned to be removed in 3.12, " @@ -336,12 +323,12 @@ msgid "" "in 3.15. (Contributed by Nikita Sobolev in :gh:`101866`.)" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:80 +#: deprecations/pending-removal-in-3.15.rst:70 #: deprecations/pending-removal-in-3.17.rst:26 msgid ":mod:`typing`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:82 +#: deprecations/pending-removal-in-3.15.rst:72 msgid "" "The undocumented keyword argument syntax for creating :class:`~typing." "NamedTuple` classes (e.g. ``Point = NamedTuple(\"Point\", x=int, y=int)``) " @@ -349,7 +336,7 @@ msgid "" "functional syntax instead." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:88 +#: deprecations/pending-removal-in-3.15.rst:78 msgid "" "When using the functional syntax of :class:`~typing.TypedDict`\\s, failing " "to pass a value to the *fields* parameter (``TD = TypedDict(\"TD\")``) or " @@ -358,18 +345,18 @@ msgid "" "TypedDict(\"TD\", {})`` to create a TypedDict with zero field." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:95 +#: deprecations/pending-removal-in-3.15.rst:85 msgid "" "The :func:`typing.no_type_check_decorator` decorator function has been " "deprecated since Python 3.13. After eight years in the :mod:`typing` module, " "it has yet to be supported by any major type checker." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:100 +#: deprecations/pending-removal-in-3.15.rst:90 msgid ":mod:`wave`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:102 +#: deprecations/pending-removal-in-3.15.rst:92 msgid "" "The :meth:`~wave.Wave_read.getmark`, :meth:`!setmark`, and :meth:`~wave." "Wave_read.getmarkers` methods of the :class:`~wave.Wave_read` and :class:" @@ -520,6 +507,22 @@ msgid "" "removal in Python 3.17." msgstr "" +#: deprecations/pending-removal-in-3.18.rst:2 +msgid "Pending removal in Python 3.18" +msgstr "" + +#: deprecations/pending-removal-in-3.18.rst:4 +msgid ":mod:`decimal`:" +msgstr "" + +#: deprecations/pending-removal-in-3.18.rst:6 +msgid "" +"The non-standard and undocumented :class:`~decimal.Decimal` format specifier " +"``'N'``, which is only supported in the :mod:`!decimal` module's C " +"implementation, has been deprecated since Python 3.13. (Contributed by " +"Serhiy Storchaka in :gh:`89902`.)" +msgstr "" + #: deprecations/c-api-pending-removal-in-future.rst:2 #: deprecations/pending-removal-in-future.rst:2 msgid "Pending Removal in Future Versions" @@ -858,7 +861,7 @@ msgid "" "`~zipimport.zipimporter.exec_module` instead." msgstr "" -#: deprecations/index.rst:15 +#: deprecations/index.rst:17 msgid "C API Deprecations" msgstr "" diff --git a/deprecations/pending-removal-in-3.13.po b/deprecations/pending-removal-in-3.13.po index a64e2e8f8..6dd0aefff 100644 --- a/deprecations/pending-removal-in-3.13.po +++ b/deprecations/pending-removal-in-3.13.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/deprecations/pending-removal-in-3.14.po b/deprecations/pending-removal-in-3.14.po index 8d1923b03..7c3fb8d5e 100644 --- a/deprecations/pending-removal-in-3.14.po +++ b/deprecations/pending-removal-in-3.14.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/deprecations/pending-removal-in-3.15.po b/deprecations/pending-removal-in-3.15.po index 1705d6d7a..eb0bb6d4e 100644 --- a/deprecations/pending-removal-in-3.15.po +++ b/deprecations/pending-removal-in-3.15.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -77,66 +77,53 @@ msgid "``load_module()`` method: use ``exec_module()`` instead." msgstr "" #: deprecations/pending-removal-in-3.15.rst:36 -msgid ":class:`locale`:" -msgstr "" - -#: deprecations/pending-removal-in-3.15.rst:38 -msgid "" -"The :func:`~locale.getdefaultlocale` function has been deprecated since " -"Python 3.11. Its removal was originally planned for Python 3.13 (:gh:" -"`90817`), but has been postponed to Python 3.15. Use :func:`~locale." -"getlocale`, :func:`~locale.setlocale`, and :func:`~locale.getencoding` " -"instead. (Contributed by Hugo van Kemenade in :gh:`111187`.)" -msgstr "" - -#: deprecations/pending-removal-in-3.15.rst:46 msgid ":mod:`pathlib`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:48 +#: deprecations/pending-removal-in-3.15.rst:38 msgid "" ":meth:`.PurePath.is_reserved` has been deprecated since Python 3.13. Use :" "func:`os.path.isreserved` to detect reserved paths on Windows." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:52 +#: deprecations/pending-removal-in-3.15.rst:42 msgid ":mod:`platform`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:54 +#: deprecations/pending-removal-in-3.15.rst:44 msgid "" ":func:`~platform.java_ver` has been deprecated since Python 3.13. This " "function is only useful for Jython support, has a confusing API, and is " "largely untested." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:58 +#: deprecations/pending-removal-in-3.15.rst:48 msgid ":mod:`sysconfig`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:60 +#: deprecations/pending-removal-in-3.15.rst:50 msgid "" "The *check_home* argument of :func:`sysconfig.is_python_build` has been " "deprecated since Python 3.12." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:63 +#: deprecations/pending-removal-in-3.15.rst:53 msgid ":mod:`threading`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:65 +#: deprecations/pending-removal-in-3.15.rst:55 msgid "" ":func:`~threading.RLock` will take no arguments in Python 3.15. Passing any " -"arguments has been deprecated since Python 3.14, as the Python version does " +"arguments has been deprecated since Python 3.14, as the Python version does " "not permit any arguments, but the C version allows any number of positional " "or keyword arguments, ignoring every argument." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:71 +#: deprecations/pending-removal-in-3.15.rst:61 msgid ":mod:`types`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:73 +#: deprecations/pending-removal-in-3.15.rst:63 msgid "" ":class:`types.CodeType`: Accessing :attr:`~codeobject.co_lnotab` was " "deprecated in :pep:`626` since 3.10 and was planned to be removed in 3.12, " @@ -144,11 +131,11 @@ msgid "" "in 3.15. (Contributed by Nikita Sobolev in :gh:`101866`.)" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:80 +#: deprecations/pending-removal-in-3.15.rst:70 msgid ":mod:`typing`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:82 +#: deprecations/pending-removal-in-3.15.rst:72 msgid "" "The undocumented keyword argument syntax for creating :class:`~typing." "NamedTuple` classes (e.g. ``Point = NamedTuple(\"Point\", x=int, y=int)``) " @@ -156,7 +143,7 @@ msgid "" "functional syntax instead." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:88 +#: deprecations/pending-removal-in-3.15.rst:78 msgid "" "When using the functional syntax of :class:`~typing.TypedDict`\\s, failing " "to pass a value to the *fields* parameter (``TD = TypedDict(\"TD\")``) or " @@ -165,18 +152,18 @@ msgid "" "TypedDict(\"TD\", {})`` to create a TypedDict with zero field." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:95 +#: deprecations/pending-removal-in-3.15.rst:85 msgid "" "The :func:`typing.no_type_check_decorator` decorator function has been " "deprecated since Python 3.13. After eight years in the :mod:`typing` module, " "it has yet to be supported by any major type checker." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:100 +#: deprecations/pending-removal-in-3.15.rst:90 msgid ":mod:`wave`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:102 +#: deprecations/pending-removal-in-3.15.rst:92 msgid "" "The :meth:`~wave.Wave_read.getmark`, :meth:`!setmark`, and :meth:`~wave." "Wave_read.getmarkers` methods of the :class:`~wave.Wave_read` and :class:" diff --git a/deprecations/pending-removal-in-3.16.po b/deprecations/pending-removal-in-3.16.po index b337f4a26..b3c716fc1 100644 --- a/deprecations/pending-removal-in-3.16.po +++ b/deprecations/pending-removal-in-3.16.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/deprecations/pending-removal-in-3.17.po b/deprecations/pending-removal-in-3.17.po index 72d479f54..35ab48442 100644 --- a/deprecations/pending-removal-in-3.17.po +++ b/deprecations/pending-removal-in-3.17.po @@ -8,10 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\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/deprecations/pending-removal-in-3.18.po b/deprecations/pending-removal-in-3.18.po new file mode 100644 index 000000000..9f4a8f4f8 --- /dev/null +++ b/deprecations/pending-removal-in-3.18.po @@ -0,0 +1,33 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001-2026, 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.13\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-07-18 13:46+0300\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" + +#: deprecations/pending-removal-in-3.18.rst:2 +msgid "Pending removal in Python 3.18" +msgstr "" + +#: deprecations/pending-removal-in-3.18.rst:4 +msgid ":mod:`decimal`:" +msgstr "" + +#: deprecations/pending-removal-in-3.18.rst:6 +msgid "" +"The non-standard and undocumented :class:`~decimal.Decimal` format specifier " +"``'N'``, which is only supported in the :mod:`!decimal` module's C " +"implementation, has been deprecated since Python 3.13. (Contributed by " +"Serhiy Storchaka in :gh:`89902`.)" +msgstr "" diff --git a/deprecations/pending-removal-in-future.po b/deprecations/pending-removal-in-future.po index 9e9522936..70735b97e 100644 --- a/deprecations/pending-removal-in-future.po +++ b/deprecations/pending-removal-in-future.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/distributing/index.po b/distributing/index.po index cfbb98520..15765956f 100644 --- a/distributing/index.po +++ b/distributing/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: 2024-11-25 20:18+0000\n" "Last-Translator: Artemis Leonardou \n" "Language-Team: PyGreece \n" diff --git a/extending/building.po b/extending/building.po index 76872795f..ca40dafb6 100644 --- a/extending/building.po +++ b/extending/building.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/extending/embedding.po b/extending/embedding.po index 968ae6d63..4a0ba3f97 100644 --- a/extending/embedding.po +++ b/extending/embedding.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/extending/extending.po b/extending/extending.po index 53a2247be..ecf8adfbd 100644 --- a/extending/extending.po +++ b/extending/extending.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -87,7 +87,7 @@ msgstr "" msgid "The first two lines of our file can be::" msgstr "" -#: extending/extending.rst:706 +#: extending/extending.rst:704 msgid "" "#define PY_SSIZE_T_CLEAN\n" "#include " @@ -674,7 +674,7 @@ msgstr "" #: extending/extending.rst:428 msgid "" "When embedding Python, the :c:func:`!PyInit_spam` function is not called " -"automatically unless there's an entry in the :c:data:`!PyImport_Inittab` " +"automatically unless there's an entry in the :c:data:`PyImport_Inittab` " "table. To add the module to the initialization table, use :c:func:" "`PyImport_AppendInittab`, optionally followed by an import of the module::" msgstr "" @@ -816,13 +816,12 @@ msgstr "" #: extending/extending.rst:547 msgid "" "Fortunately, the Python interpreter is easily called recursively, and there " -"is a standard interface to call a Python function. (I won't dwell on how to " -"call the Python parser with a particular string as input --- if you're " -"interested, have a look at the implementation of the :option:`-c` command " -"line option in :file:`Modules/main.c` from the Python source code.)" +"is a standard interface to call a Python function. (If you're interested in " +"how to call the Python parser with a particular string as input, see :ref:" +"`veryhigh`.)" msgstr "" -#: extending/extending.rst:553 +#: extending/extending.rst:551 msgid "" "Calling a Python function is easy. First, the Python program must somehow " "pass you the Python function object. You should provide a function (or some " @@ -832,7 +831,7 @@ msgid "" "function might be part of a module definition::" msgstr "" -#: extending/extending.rst:560 +#: extending/extending.rst:558 msgid "" "static PyObject *my_callback = NULL;\n" "\n" @@ -859,7 +858,7 @@ msgid "" "}" msgstr "" -#: extending/extending.rst:583 +#: extending/extending.rst:581 msgid "" "This function must be registered with the interpreter using the :c:macro:" "`METH_VARARGS` flag; this is described in section :ref:`methodtable`. The :" @@ -867,7 +866,7 @@ msgid "" "section :ref:`parsetuple`." msgstr "" -#: extending/extending.rst:588 +#: extending/extending.rst:586 msgid "" "The macros :c:func:`Py_XINCREF` and :c:func:`Py_XDECREF` increment/decrement " "the reference count of an object and are safe in the presence of ``NULL`` " @@ -875,7 +874,7 @@ msgid "" "info on them in section :ref:`refcounts`." msgstr "" -#: extending/extending.rst:595 +#: extending/extending.rst:593 msgid "" "Later, when it is time to call the function, you call the C function :c:func:" "`PyObject_CallObject`. This function has two arguments, both pointers to " @@ -887,7 +886,7 @@ msgid "" "or more format codes between parentheses. For example::" msgstr "" -#: extending/extending.rst:604 +#: extending/extending.rst:602 msgid "" "int arg;\n" "PyObject *arglist;\n" @@ -901,7 +900,7 @@ msgid "" "Py_DECREF(arglist);" msgstr "" -#: extending/extending.rst:615 +#: extending/extending.rst:613 msgid "" ":c:func:`PyObject_CallObject` returns a Python object pointer: this is the " "return value of the Python function. :c:func:`PyObject_CallObject` is " @@ -910,7 +909,7 @@ msgid "" "`Py_DECREF`\\ -ed immediately after the :c:func:`PyObject_CallObject` call." msgstr "" -#: extending/extending.rst:622 +#: extending/extending.rst:620 msgid "" "The return value of :c:func:`PyObject_CallObject` is \"new\": either it is a " "brand new object, or it is an existing object whose reference count has been " @@ -919,7 +918,7 @@ msgid "" "not interested in its value." msgstr "" -#: extending/extending.rst:628 +#: extending/extending.rst:626 msgid "" "Before you do this, however, it is important to check that the return value " "isn't ``NULL``. If it is, the Python function terminated by raising an " @@ -930,7 +929,7 @@ msgid "" "should be cleared by calling :c:func:`PyErr_Clear`. For example::" msgstr "" -#: extending/extending.rst:636 +#: extending/extending.rst:634 msgid "" "if (result == NULL)\n" " return NULL; /* Pass error back */\n" @@ -938,7 +937,7 @@ msgid "" "Py_DECREF(result);" msgstr "" -#: extending/extending.rst:641 +#: extending/extending.rst:639 msgid "" "Depending on the desired interface to the Python callback function, you may " "also have to provide an argument list to :c:func:`PyObject_CallObject`. In " @@ -950,7 +949,7 @@ msgid "" "you want to pass an integral event code, you might use the following code::" msgstr "" -#: extending/extending.rst:650 +#: extending/extending.rst:648 msgid "" "PyObject *arglist;\n" "...\n" @@ -963,7 +962,7 @@ msgid "" "Py_DECREF(result);" msgstr "" -#: extending/extending.rst:660 +#: extending/extending.rst:658 msgid "" "Note the placement of ``Py_DECREF(arglist)`` immediately after the call, " "before the error check! Also note that strictly speaking this code is not " @@ -971,14 +970,14 @@ msgid "" "checked." msgstr "" -#: extending/extending.rst:664 +#: extending/extending.rst:662 msgid "" "You may also call a function with keyword arguments by using :c:func:" "`PyObject_Call`, which supports arguments and keyword arguments. As in the " "above example, we use :c:func:`Py_BuildValue` to construct the dictionary. ::" msgstr "" -#: extending/extending.rst:668 +#: extending/extending.rst:666 msgid "" "PyObject *dict;\n" "...\n" @@ -991,19 +990,19 @@ msgid "" "Py_DECREF(result);" msgstr "" -#: extending/extending.rst:682 +#: extending/extending.rst:680 msgid "Extracting Parameters in Extension Functions" msgstr "" -#: extending/extending.rst:686 +#: extending/extending.rst:684 msgid "The :c:func:`PyArg_ParseTuple` function is declared as follows::" msgstr "" -#: extending/extending.rst:688 +#: extending/extending.rst:686 msgid "int PyArg_ParseTuple(PyObject *arg, const char *format, ...);" msgstr "" -#: extending/extending.rst:690 +#: extending/extending.rst:688 msgid "" "The *arg* argument must be a tuple object containing an argument list passed " "from Python to a C function. The *format* argument must be a format string, " @@ -1012,7 +1011,7 @@ msgid "" "whose type is determined by the format string." msgstr "" -#: extending/extending.rst:696 +#: extending/extending.rst:694 msgid "" "Note that while :c:func:`PyArg_ParseTuple` checks that the Python arguments " "have the required types, it cannot check the validity of the addresses of C " @@ -1020,17 +1019,17 @@ msgid "" "probably crash or at least overwrite random bits in memory. So be careful!" msgstr "" -#: extending/extending.rst:701 +#: extending/extending.rst:699 msgid "" "Note that any Python object references which are provided to the caller are " "*borrowed* references; do not decrement their reference count!" msgstr "" -#: extending/extending.rst:704 +#: extending/extending.rst:702 msgid "Some example calls::" msgstr "" -#: extending/extending.rst:711 +#: extending/extending.rst:709 msgid "" "int ok;\n" "int i, j;\n" @@ -1042,27 +1041,27 @@ msgid "" " /* Python call: f() */" msgstr "" -#: extending/extending.rst:722 +#: extending/extending.rst:720 msgid "" "ok = PyArg_ParseTuple(args, \"s\", &s); /* A string */\n" " /* Possible Python call: f('whoops!') */" msgstr "" -#: extending/extending.rst:727 +#: extending/extending.rst:725 msgid "" "ok = PyArg_ParseTuple(args, \"lls\", &k, &l, &s); /* Two longs and a string " "*/\n" " /* Possible Python call: f(1, 2, 'three') */" msgstr "" -#: extending/extending.rst:732 +#: extending/extending.rst:730 msgid "" "ok = PyArg_ParseTuple(args, \"(ii)s#\", &i, &j, &s, &size);\n" " /* A pair of ints and a string, whose size is also returned */\n" " /* Possible Python call: f((1, 2), 'three') */" msgstr "" -#: extending/extending.rst:738 +#: extending/extending.rst:736 msgid "" "{\n" " const char *file;\n" @@ -1077,7 +1076,7 @@ msgid "" "}" msgstr "" -#: extending/extending.rst:752 +#: extending/extending.rst:750 msgid "" "{\n" " int left, top, right, bottom, h, v;\n" @@ -1089,7 +1088,7 @@ msgid "" "}" msgstr "" -#: extending/extending.rst:763 +#: extending/extending.rst:761 msgid "" "{\n" " Py_complex c;\n" @@ -1099,23 +1098,23 @@ msgid "" "}" msgstr "" -#: extending/extending.rst:774 +#: extending/extending.rst:772 msgid "Keyword Parameters for Extension Functions" msgstr "" -#: extending/extending.rst:778 +#: extending/extending.rst:776 msgid "" "The :c:func:`PyArg_ParseTupleAndKeywords` function is declared as follows::" msgstr "" -#: extending/extending.rst:780 +#: extending/extending.rst:778 msgid "" "int PyArg_ParseTupleAndKeywords(PyObject *arg, PyObject *kwdict,\n" " const char *format, char * const " "*kwlist, ...);" msgstr "" -#: extending/extending.rst:783 +#: extending/extending.rst:781 msgid "" "The *arg* and *format* parameters are identical to those of the :c:func:" "`PyArg_ParseTuple` function. The *kwdict* parameter is the dictionary of " @@ -1127,20 +1126,20 @@ msgid "" "raises an appropriate exception." msgstr "" -#: extending/extending.rst:793 +#: extending/extending.rst:791 msgid "" "Nested tuples cannot be parsed when using keyword arguments! Keyword " "parameters passed in which are not present in the *kwlist* will cause :exc:" "`TypeError` to be raised." msgstr "" -#: extending/extending.rst:799 +#: extending/extending.rst:797 msgid "" "Here is an example module which uses keywords, based on an example by Geoff " "Philbrick (philbrick@hks.com)::" msgstr "" -#: extending/extending.rst:802 +#: extending/extending.rst:800 msgid "" "#define PY_SSIZE_T_CLEAN\n" "#include \n" @@ -1193,21 +1192,21 @@ msgid "" "}" msgstr "" -#: extending/extending.rst:853 +#: extending/extending.rst:851 msgid "Building Arbitrary Values" msgstr "" -#: extending/extending.rst:855 +#: extending/extending.rst:853 msgid "" "This function is the counterpart to :c:func:`PyArg_ParseTuple`. It is " "declared as follows::" msgstr "" -#: extending/extending.rst:858 +#: extending/extending.rst:856 msgid "PyObject *Py_BuildValue(const char *format, ...);" msgstr "" -#: extending/extending.rst:860 +#: extending/extending.rst:858 msgid "" "It recognizes a set of format units similar to the ones recognized by :c:" "func:`PyArg_ParseTuple`, but the arguments (which are input to the function, " @@ -1215,7 +1214,7 @@ msgid "" "object, suitable for returning from a C function called from Python." msgstr "" -#: extending/extending.rst:865 +#: extending/extending.rst:863 msgid "" "One difference with :c:func:`PyArg_ParseTuple`: while the latter requires " "its first argument to be a tuple (since Python argument lists are always " @@ -1227,12 +1226,12 @@ msgid "" "parenthesize the format string." msgstr "" -#: extending/extending.rst:873 +#: extending/extending.rst:871 msgid "" "Examples (to the left the call, to the right the resulting Python value):" msgstr "" -#: extending/extending.rst:875 +#: extending/extending.rst:873 msgid "" "Py_BuildValue(\"\") None\n" "Py_BuildValue(\"i\", 123) 123\n" @@ -1253,11 +1252,11 @@ msgid "" " 1, 2, 3, 4, 5, 6) (((1, 2), (3, 4)), (5, 6))" msgstr "" -#: extending/extending.rst:899 +#: extending/extending.rst:897 msgid "Reference Counts" msgstr "" -#: extending/extending.rst:901 +#: extending/extending.rst:899 msgid "" "In languages like C or C++, the programmer is responsible for dynamic " "allocation and deallocation of memory on the heap. In C, this is done using " @@ -1266,7 +1265,7 @@ msgid "" "restrict the following discussion to the C case." msgstr "" -#: extending/extending.rst:907 +#: extending/extending.rst:905 msgid "" "Every block of memory allocated with :c:func:`malloc` should eventually be " "returned to the pool of available memory by exactly one call to :c:func:" @@ -1281,7 +1280,7 @@ msgid "" "crashes." msgstr "" -#: extending/extending.rst:918 +#: extending/extending.rst:916 msgid "" "Common causes of memory leaks are unusual paths through the code. For " "instance, a function may allocate a block of memory, do some calculation, " @@ -1298,7 +1297,7 @@ msgid "" "of errors." msgstr "" -#: extending/extending.rst:931 +#: extending/extending.rst:929 msgid "" "Since Python makes heavy use of :c:func:`malloc` and :c:func:`free`, it " "needs a strategy to avoid memory leaks as well as the use of freed memory. " @@ -1309,11 +1308,11 @@ msgid "" "reference to the object has been deleted and the object is freed." msgstr "" -#: extending/extending.rst:939 +#: extending/extending.rst:937 msgid "" "An alternative strategy is called :dfn:`automatic garbage collection`. " "(Sometimes, reference counting is also referred to as a garbage collection " -"strategy, hence my use of \"automatic\" to distinguish the two.) The big " +"strategy, hence the use of \"automatic\" to distinguish the two.) The big " "advantage of automatic garbage collection is that the user doesn't need to " "call :c:func:`free` explicitly. (Another claimed advantage is an " "improvement in speed or memory usage --- this is no hard fact however.) The " @@ -1325,7 +1324,7 @@ msgid "" "with reference counts." msgstr "" -#: extending/extending.rst:951 +#: extending/extending.rst:949 msgid "" "While Python uses the traditional reference counting implementation, it also " "offers a cycle detector that works to detect reference cycles. This allows " @@ -1339,7 +1338,7 @@ msgid "" "though there are no further references to the cycle itself." msgstr "" -#: extending/extending.rst:962 +#: extending/extending.rst:960 msgid "" "The cycle detector is able to detect garbage cycles and can reclaim them. " "The :mod:`gc` module exposes a way to run the detector (the :func:`~gc." @@ -1347,11 +1346,11 @@ msgid "" "disable the detector at runtime." msgstr "" -#: extending/extending.rst:971 +#: extending/extending.rst:969 msgid "Reference Counting in Python" msgstr "" -#: extending/extending.rst:973 +#: extending/extending.rst:971 msgid "" "There are two macros, ``Py_INCREF(x)`` and ``Py_DECREF(x)``, which handle " "the incrementing and decrementing of the reference count. :c:func:" @@ -1362,7 +1361,7 @@ msgid "" "object." msgstr "" -#: extending/extending.rst:980 +#: extending/extending.rst:978 msgid "" "The big question now remains: when to use ``Py_INCREF(x)`` and " "``Py_DECREF(x)``? Let's first introduce some terms. Nobody \"owns\" an " @@ -1375,7 +1374,7 @@ msgid "" "reference creates a memory leak." msgstr "" -#: extending/extending.rst:989 +#: extending/extending.rst:987 msgid "" "It is also possible to :dfn:`borrow` [#]_ a reference to an object. The " "borrower of a reference should not call :c:func:`Py_DECREF`. The borrower " @@ -1384,7 +1383,7 @@ msgid "" "risks using freed memory and should be avoided completely [#]_." msgstr "" -#: extending/extending.rst:995 +#: extending/extending.rst:993 msgid "" "The advantage of borrowing over owning a reference is that you don't need to " "take care of disposing of the reference on all possible paths through the " @@ -1395,7 +1394,7 @@ msgid "" "borrowed has in fact disposed of it." msgstr "" -#: extending/extending.rst:1003 +#: extending/extending.rst:1001 msgid "" "A borrowed reference can be changed into an owned reference by calling :c:" "func:`Py_INCREF`. This does not affect the status of the owner from which " @@ -1404,18 +1403,18 @@ msgid "" "properly, as well as the previous owner)." msgstr "" -#: extending/extending.rst:1013 +#: extending/extending.rst:1011 msgid "Ownership Rules" msgstr "" -#: extending/extending.rst:1015 +#: extending/extending.rst:1013 msgid "" "Whenever an object reference is passed into or out of a function, it is part " "of the function's interface specification whether ownership is transferred " "with the reference or not." msgstr "" -#: extending/extending.rst:1019 +#: extending/extending.rst:1017 msgid "" "Most functions that return a reference to an object pass on ownership with " "the reference. In particular, all functions whose function it is to create " @@ -1426,7 +1425,7 @@ msgid "" "reference to a cached item." msgstr "" -#: extending/extending.rst:1027 +#: extending/extending.rst:1025 msgid "" "Many functions that extract objects from other objects also transfer " "ownership with the reference, for instance :c:func:" @@ -1437,14 +1436,14 @@ msgid "" "list or dictionary." msgstr "" -#: extending/extending.rst:1034 +#: extending/extending.rst:1032 msgid "" "The function :c:func:`PyImport_AddModule` also returns a borrowed reference, " "even though it may actually create the object it returns: this is possible " "because an owned reference to the object is stored in ``sys.modules``." msgstr "" -#: extending/extending.rst:1038 +#: extending/extending.rst:1036 msgid "" "When you pass an object reference into another function, in general, the " "function borrows the reference from you --- if it needs to store it, it will " @@ -1455,7 +1454,7 @@ msgid "" "don't take over ownership --- they are \"normal.\")" msgstr "" -#: extending/extending.rst:1046 +#: extending/extending.rst:1044 msgid "" "When a C function is called from Python, it borrows references to its " "arguments from the caller. The caller owns a reference to the object, so " @@ -1464,18 +1463,18 @@ msgid "" "turned into an owned reference by calling :c:func:`Py_INCREF`." msgstr "" -#: extending/extending.rst:1052 +#: extending/extending.rst:1050 msgid "" "The object reference returned from a C function that is called from Python " "must be an owned reference --- ownership is transferred from the function to " "its caller." msgstr "" -#: extending/extending.rst:1060 +#: extending/extending.rst:1058 msgid "Thin Ice" msgstr "" -#: extending/extending.rst:1062 +#: extending/extending.rst:1060 msgid "" "There are a few situations where seemingly harmless use of a borrowed " "reference can lead to problems. These all have to do with implicit " @@ -1483,14 +1482,14 @@ msgid "" "dispose of it." msgstr "" -#: extending/extending.rst:1066 +#: extending/extending.rst:1064 msgid "" "The first and most important case to know about is using :c:func:`Py_DECREF` " "on an unrelated object while borrowing a reference to a list item. For " "instance::" msgstr "" -#: extending/extending.rst:1069 +#: extending/extending.rst:1067 msgid "" "void\n" "bug(PyObject *list)\n" @@ -1502,14 +1501,14 @@ msgid "" "}" msgstr "" -#: extending/extending.rst:1078 +#: extending/extending.rst:1076 msgid "" "This function first borrows a reference to ``list[0]``, then replaces " "``list[1]`` with the value ``0``, and finally prints the borrowed reference. " "Looks harmless, right? But it's not!" msgstr "" -#: extending/extending.rst:1082 +#: extending/extending.rst:1080 msgid "" "Let's follow the control flow into :c:func:`PyList_SetItem`. The list owns " "references to all its items, so when item 1 is replaced, it has to dispose " @@ -1526,7 +1525,7 @@ msgid "" "`PyList_SetItem` call." msgstr "" -#: extending/extending.rst:1096 +#: extending/extending.rst:1094 msgid "" "Since it is written in Python, the :meth:`!__del__` method can execute " "arbitrary Python code. Could it perhaps do something to invalidate the " @@ -1537,13 +1536,13 @@ msgid "" "associated with it, thereby invalidating ``item``." msgstr "" -#: extending/extending.rst:1104 +#: extending/extending.rst:1102 msgid "" "The solution, once you know the source of the problem, is easy: temporarily " "increment the reference count. The correct version of the function reads::" msgstr "" -#: extending/extending.rst:1107 +#: extending/extending.rst:1105 msgid "" "void\n" "no_bug(PyObject *list)\n" @@ -1557,14 +1556,14 @@ msgid "" "}" msgstr "" -#: extending/extending.rst:1118 +#: extending/extending.rst:1116 msgid "" "This is a true story. An older version of Python contained variants of this " "bug and someone spent a considerable amount of time in a C debugger to " "figure out why his :meth:`!__del__` methods would fail..." msgstr "" -#: extending/extending.rst:1122 +#: extending/extending.rst:1120 msgid "" "The second case of problems with a borrowed reference is a variant involving " "threads. Normally, multiple threads in the Python interpreter can't get in " @@ -1577,7 +1576,7 @@ msgid "" "Obviously, the following function has the same problem as the previous one::" msgstr "" -#: extending/extending.rst:1132 +#: extending/extending.rst:1130 msgid "" "void\n" "bug(PyObject *list)\n" @@ -1590,11 +1589,11 @@ msgid "" "}" msgstr "" -#: extending/extending.rst:1146 +#: extending/extending.rst:1144 msgid "NULL Pointers" msgstr "" -#: extending/extending.rst:1148 +#: extending/extending.rst:1146 msgid "" "In general, functions that take object references as arguments do not expect " "you to pass them ``NULL`` pointers, and will dump core (or cause later core " @@ -1606,21 +1605,21 @@ msgid "" "more slowly." msgstr "" -#: extending/extending.rst:1156 +#: extending/extending.rst:1154 msgid "" "It is better to test for ``NULL`` only at the \"source:\" when a pointer " "that may be ``NULL`` is received, for example, from :c:func:`malloc` or from " "a function that may raise an exception." msgstr "" -#: extending/extending.rst:1160 +#: extending/extending.rst:1158 msgid "" "The macros :c:func:`Py_INCREF` and :c:func:`Py_DECREF` do not check for " "``NULL`` pointers --- however, their variants :c:func:`Py_XINCREF` and :c:" "func:`Py_XDECREF` do." msgstr "" -#: extending/extending.rst:1164 +#: extending/extending.rst:1162 msgid "" "The macros for checking for a particular object type (``Pytype_Check()``) " "don't check for ``NULL`` pointers --- again, there is much code that calls " @@ -1629,24 +1628,24 @@ msgid "" "variants with ``NULL`` checking." msgstr "" -#: extending/extending.rst:1170 +#: extending/extending.rst:1168 msgid "" "The C function calling mechanism guarantees that the argument list passed to " "C functions (``args`` in the examples) is never ``NULL`` --- in fact it " "guarantees that it is always a tuple [#]_." msgstr "" -#: extending/extending.rst:1174 +#: extending/extending.rst:1172 msgid "" "It is a severe error to ever let a ``NULL`` pointer \"escape\" to the Python " "user." msgstr "" -#: extending/extending.rst:1185 +#: extending/extending.rst:1183 msgid "Writing Extensions in C++" msgstr "" -#: extending/extending.rst:1187 +#: extending/extending.rst:1185 msgid "" "It is possible to write extension modules in C++. Some restrictions apply. " "If the main program (the Python interpreter) is compiled and linked by the C " @@ -1659,11 +1658,11 @@ msgid "" "(all recent C++ compilers define this symbol)." msgstr "" -#: extending/extending.rst:1201 +#: extending/extending.rst:1199 msgid "Providing a C API for an Extension Module" msgstr "" -#: extending/extending.rst:1206 +#: extending/extending.rst:1204 msgid "" "Many extension modules just provide new functions and types to be used from " "Python, but sometimes the code in an extension module can be useful for " @@ -1674,7 +1673,7 @@ msgid "" "functions for direct manipulation from other extension modules." msgstr "" -#: extending/extending.rst:1214 +#: extending/extending.rst:1212 msgid "" "At first sight this seems easy: just write the functions (without declaring " "them ``static``, of course), provide an appropriate header file, and " @@ -1690,7 +1689,7 @@ msgid "" "call might not have been loaded yet!" msgstr "" -#: extending/extending.rst:1226 +#: extending/extending.rst:1224 msgid "" "Portability therefore requires not to make any assumptions about symbol " "visibility. This means that all symbols in extension modules should be " @@ -1700,7 +1699,7 @@ msgid "" "accessible from other extension modules must be exported in a different way." msgstr "" -#: extending/extending.rst:1233 +#: extending/extending.rst:1231 msgid "" "Python provides a special mechanism to pass C-level information (pointers) " "from one extension module to another one: Capsules. A Capsule is a Python " @@ -1712,7 +1711,7 @@ msgid "" "the Capsule." msgstr "" -#: extending/extending.rst:1241 +#: extending/extending.rst:1239 msgid "" "There are many ways in which Capsules can be used to export the C API of an " "extension module. Each function could get its own Capsule, or all C API " @@ -1722,7 +1721,7 @@ msgid "" "client modules." msgstr "" -#: extending/extending.rst:1247 +#: extending/extending.rst:1245 msgid "" "Whichever method you choose, it's important to name your Capsules properly. " "The function :c:func:`PyCapsule_New` takes a name parameter (:c:expr:`const " @@ -1732,17 +1731,17 @@ msgid "" "from another." msgstr "" -#: extending/extending.rst:1254 +#: extending/extending.rst:1252 msgid "" "In particular, Capsules used to expose C APIs should be given a name " "following this convention::" msgstr "" -#: extending/extending.rst:1257 +#: extending/extending.rst:1255 msgid "modulename.attributename" msgstr "" -#: extending/extending.rst:1259 +#: extending/extending.rst:1257 msgid "" "The convenience function :c:func:`PyCapsule_Import` makes it easy to load a " "C API provided via a Capsule, but only if the Capsule's name matches this " @@ -1750,7 +1749,7 @@ msgid "" "the Capsule they load contains the correct C API." msgstr "" -#: extending/extending.rst:1264 +#: extending/extending.rst:1262 msgid "" "The following example demonstrates an approach that puts most of the burden " "on the writer of the exporting module, which is appropriate for commonly " @@ -1761,7 +1760,7 @@ msgid "" "modules only have to call this macro before accessing the C API." msgstr "" -#: extending/extending.rst:1272 +#: extending/extending.rst:1270 msgid "" "The exporting module is a modification of the :mod:`!spam` module from " "section :ref:`extending-simpleexample`. The function :func:`!spam.system` " @@ -1772,13 +1771,13 @@ msgid "" "modules." msgstr "" -#: extending/extending.rst:1279 +#: extending/extending.rst:1277 msgid "" "The function :c:func:`!PySpam_System` is a plain C function, declared " "``static`` like everything else::" msgstr "" -#: extending/extending.rst:1282 +#: extending/extending.rst:1280 msgid "" "static int\n" "PySpam_System(const char *command)\n" @@ -1787,11 +1786,11 @@ msgid "" "}" msgstr "" -#: extending/extending.rst:1288 +#: extending/extending.rst:1286 msgid "The function :c:func:`!spam_system` is modified in a trivial way::" msgstr "" -#: extending/extending.rst:1290 +#: extending/extending.rst:1288 msgid "" "static PyObject *\n" "spam_system(PyObject *self, PyObject *args)\n" @@ -1806,25 +1805,25 @@ msgid "" "}" msgstr "" -#: extending/extending.rst:1302 +#: extending/extending.rst:1300 msgid "In the beginning of the module, right after the line ::" msgstr "" -#: extending/extending.rst:1304 +#: extending/extending.rst:1302 msgid "#include " msgstr "" -#: extending/extending.rst:1306 +#: extending/extending.rst:1304 msgid "two more lines must be added::" msgstr "" -#: extending/extending.rst:1308 +#: extending/extending.rst:1306 msgid "" "#define SPAM_MODULE\n" "#include \"spammodule.h\"" msgstr "" -#: extending/extending.rst:1311 +#: extending/extending.rst:1309 msgid "" "The ``#define`` is used to tell the header file that it is being included in " "the exporting module, not a client module. Finally, the module's :c:data:" @@ -1832,7 +1831,7 @@ msgid "" "pointer array::" msgstr "" -#: extending/extending.rst:1315 +#: extending/extending.rst:1313 msgid "" "static int\n" "spam_module_exec(PyObject *m)\n" @@ -1855,19 +1854,19 @@ msgid "" "}" msgstr "" -#: extending/extending.rst:1334 +#: extending/extending.rst:1332 msgid "" "Note that ``PySpam_API`` is declared ``static``; otherwise the pointer array " "would disappear when :c:func:`!PyInit_spam` terminates!" msgstr "" -#: extending/extending.rst:1337 +#: extending/extending.rst:1335 msgid "" "The bulk of the work is in the header file :file:`spammodule.h`, which looks " "like this::" msgstr "" -#: extending/extending.rst:1340 +#: extending/extending.rst:1338 msgid "" "#ifndef Py_SPAMMODULE_H\n" "#define Py_SPAMMODULE_H\n" @@ -1919,14 +1918,14 @@ msgid "" "#endif /* !defined(Py_SPAMMODULE_H) */" msgstr "" -#: extending/extending.rst:1388 +#: extending/extending.rst:1386 msgid "" "All that a client module must do in order to have access to the function :c:" "func:`!PySpam_System` is to call the function (or rather macro) :c:func:`!" "import_spam` in its :c:data:`mod_exec ` function::" msgstr "" -#: extending/extending.rst:1392 +#: extending/extending.rst:1390 msgid "" "static int\n" "client_module_exec(PyObject *m)\n" @@ -1939,14 +1938,14 @@ msgid "" "}" msgstr "" -#: extending/extending.rst:1402 +#: extending/extending.rst:1400 msgid "" "The main disadvantage of this approach is that the file :file:`spammodule.h` " "is rather complicated. However, the basic structure is the same for each " "function that is exported, so it has to be learned only once." msgstr "" -#: extending/extending.rst:1406 +#: extending/extending.rst:1404 msgid "" "Finally it should be mentioned that Capsules offer additional functionality, " "which is especially useful for memory allocation and deallocation of the " @@ -1956,47 +1955,47 @@ msgid "" "in the Python source code distribution)." msgstr "" -#: extending/extending.rst:1414 +#: extending/extending.rst:1412 msgid "Footnotes" msgstr "" -#: extending/extending.rst:1415 +#: extending/extending.rst:1413 msgid "" "An interface for this function already exists in the standard module :mod:" "`os` --- it was chosen as a simple and straightforward example." msgstr "" -#: extending/extending.rst:1418 +#: extending/extending.rst:1416 msgid "" "The metaphor of \"borrowing\" a reference is not completely correct: the " "owner still has a copy of the reference." msgstr "" -#: extending/extending.rst:1421 +#: extending/extending.rst:1419 msgid "" "Checking that the reference count is at least 1 **does not work** --- the " "reference count itself could be in freed memory and may thus be reused for " "another object!" msgstr "" -#: extending/extending.rst:1425 +#: extending/extending.rst:1423 msgid "" "These guarantees don't hold when you use the \"old\" style calling " "convention --- this is still found in much existing code." msgstr "" -#: extending/extending.rst:593 +#: extending/extending.rst:591 msgid "PyObject_CallObject (C function)" msgstr "" -#: extending/extending.rst:684 +#: extending/extending.rst:682 msgid "PyArg_ParseTuple (C function)" msgstr "" -#: extending/extending.rst:776 +#: extending/extending.rst:774 msgid "PyArg_ParseTupleAndKeywords (C function)" msgstr "" -#: extending/extending.rst:797 +#: extending/extending.rst:795 msgid "Philbrick, Geoff" msgstr "" diff --git a/extending/index.po b/extending/index.po index 73e40582b..4bf2e8c69 100644 --- a/extending/index.po +++ b/extending/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/extending/newtypes.po b/extending/newtypes.po index db87b6a19..ad21a1eb5 100644 --- a/extending/newtypes.po +++ b/extending/newtypes.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/extending/newtypes_tutorial.po b/extending/newtypes_tutorial.po index f83b17e46..43a1d68d1 100644 --- a/extending/newtypes_tutorial.po +++ b/extending/newtypes_tutorial.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/extending/windows.po b/extending/windows.po index 4d9eefdab..72db76aea 100644 --- a/extending/windows.po +++ b/extending/windows.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/faq/design.po b/faq/design.po index 656f5152a..81bbdfb4f 100644 --- a/faq/design.po +++ b/faq/design.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -410,18 +410,20 @@ msgid "" "In general, structured switch statements execute one block of code when an " "expression has a particular value or set of values. Since Python 3.10 one " "can easily match literal values, or constants within a namespace, with a " -"``match ... case`` statement. An older alternative is a sequence of ``if... " -"elif... elif... else``." +"``match ... case`` statement. See :ref:`the specification ` and :ref:" +"`the tutorial ` for more information about :keyword:`match` " +"statements. An older alternative is a sequence of ``if... elif... elif... " +"else``." msgstr "" -#: faq/design.rst:268 +#: faq/design.rst:270 msgid "" "For cases where you need to choose from a very large number of " "possibilities, you can create a dictionary mapping case values to functions " "to call. For example::" msgstr "" -#: faq/design.rst:272 +#: faq/design.rst:274 msgid "" "functions = {'a': function_1,\n" " 'b': function_2,\n" @@ -431,13 +433,13 @@ msgid "" "func()" msgstr "" -#: faq/design.rst:279 +#: faq/design.rst:281 msgid "" "For calling methods on objects, you can simplify yet further by using the :" "func:`getattr` built-in to retrieve methods with a particular name::" msgstr "" -#: faq/design.rst:282 +#: faq/design.rst:284 msgid "" "class MyVisitor:\n" " def visit_a(self):\n" @@ -449,7 +451,7 @@ msgid "" " method()" msgstr "" -#: faq/design.rst:291 +#: faq/design.rst:293 msgid "" "It's suggested that you use a prefix for the method names, such as " "``visit_`` in this example. Without such a prefix, if values are coming " @@ -457,19 +459,19 @@ msgid "" "your object." msgstr "" -#: faq/design.rst:295 +#: faq/design.rst:297 msgid "" "Imitating switch with fallthrough, as with C's switch-case-default, is " "possible, much harder, and less needed." msgstr "" -#: faq/design.rst:300 +#: faq/design.rst:302 msgid "" "Can't you emulate threads in the interpreter instead of relying on an OS-" "specific thread implementation?" msgstr "" -#: faq/design.rst:302 +#: faq/design.rst:304 msgid "" "Answer 1: Unfortunately, the interpreter pushes at least one C stack frame " "for each Python stack frame. Also, extensions can call back into Python at " @@ -477,18 +479,18 @@ msgid "" "requires thread support for C." msgstr "" -#: faq/design.rst:307 +#: faq/design.rst:309 msgid "" "Answer 2: Fortunately, there is `Stackless Python `_, which has a completely redesigned " "interpreter loop that avoids the C stack." msgstr "" -#: faq/design.rst:312 +#: faq/design.rst:314 msgid "Why can't lambda expressions contain statements?" msgstr "" -#: faq/design.rst:314 +#: faq/design.rst:316 msgid "" "Python lambda expressions cannot contain statements because Python's " "syntactic framework can't handle statements nested inside expressions. " @@ -497,7 +499,7 @@ msgid "" "shorthand notation if you're too lazy to define a function." msgstr "" -#: faq/design.rst:320 +#: faq/design.rst:322 msgid "" "Functions are already first class objects in Python, and can be declared in " "a local scope. Therefore the only advantage of using a lambda instead of a " @@ -507,11 +509,11 @@ msgid "" "is assigned!" msgstr "" -#: faq/design.rst:328 +#: faq/design.rst:330 msgid "Can Python be compiled to machine code, C or some other language?" msgstr "" -#: faq/design.rst:330 +#: faq/design.rst:332 msgid "" "`Cython `_ compiles a modified version of Python with " "optional annotations into C extensions. `Nuitka `_ is " @@ -519,11 +521,11 @@ msgid "" "full Python language." msgstr "" -#: faq/design.rst:337 +#: faq/design.rst:339 msgid "How does Python manage memory?" msgstr "" -#: faq/design.rst:339 +#: faq/design.rst:341 msgid "" "The details of Python memory management depend on the implementation. The " "standard implementation of Python, :term:`CPython`, uses reference counting " @@ -534,7 +536,7 @@ msgid "" "statistics, and tune the collector's parameters." msgstr "" -#: faq/design.rst:347 +#: faq/design.rst:349 msgid "" "Other implementations (such as `Jython `_ or `PyPy " "`_), however, can rely on a different mechanism such as a " @@ -543,20 +545,20 @@ msgid "" "counting implementation." msgstr "" -#: faq/design.rst:353 +#: faq/design.rst:355 msgid "" "In some Python implementations, the following code (which is fine in " "CPython) will probably run out of file descriptors::" msgstr "" -#: faq/design.rst:356 +#: faq/design.rst:358 msgid "" "for file in very_long_list_of_files:\n" " f = open(file)\n" " c = f.read(1)" msgstr "" -#: faq/design.rst:360 +#: faq/design.rst:362 msgid "" "Indeed, using CPython's reference counting and destructor scheme, each new " "assignment to ``f`` closes the previous file. With a traditional GC, " @@ -564,25 +566,25 @@ msgid "" "and possibly long intervals." msgstr "" -#: faq/design.rst:365 +#: faq/design.rst:367 msgid "" "If you want to write code that will work with any Python implementation, you " "should explicitly close the file or use the :keyword:`with` statement; this " "will work regardless of memory management scheme::" msgstr "" -#: faq/design.rst:369 +#: faq/design.rst:371 msgid "" "for file in very_long_list_of_files:\n" " with open(file) as f:\n" " c = f.read(1)" msgstr "" -#: faq/design.rst:375 +#: faq/design.rst:377 msgid "Why doesn't CPython use a more traditional garbage collection scheme?" msgstr "" -#: faq/design.rst:377 +#: faq/design.rst:379 msgid "" "For one thing, this is not a C standard feature and hence it's not portable. " "(Yes, we know about the Boehm GC library. It has bits of assembler code for " @@ -591,7 +593,7 @@ msgid "" "Python to work with it.)" msgstr "" -#: faq/design.rst:383 +#: faq/design.rst:385 msgid "" "Traditional GC also becomes a problem when Python is embedded into other " "applications. While in a standalone Python it's fine to replace the " @@ -602,11 +604,11 @@ msgid "" "``free()`` properly." msgstr "" -#: faq/design.rst:392 +#: faq/design.rst:394 msgid "Why isn't all memory freed when CPython exits?" msgstr "" -#: faq/design.rst:394 +#: faq/design.rst:396 msgid "" "Objects referenced from the global namespaces of Python modules are not " "always deallocated when Python exits. This may happen if there are circular " @@ -616,17 +618,17 @@ msgid "" "exit and does try to destroy every single object." msgstr "" -#: faq/design.rst:401 +#: faq/design.rst:403 msgid "" "If you want to force Python to delete certain things on deallocation use " "the :mod:`atexit` module to run a function that will force those deletions." msgstr "" -#: faq/design.rst:406 +#: faq/design.rst:408 msgid "Why are there separate tuple and list data types?" msgstr "" -#: faq/design.rst:408 +#: faq/design.rst:410 msgid "" "Lists and tuples, while similar in many respects, are generally used in " "fundamentally different ways. Tuples can be thought of as being similar to " @@ -636,7 +638,7 @@ msgid "" "two or three numbers." msgstr "" -#: faq/design.rst:415 +#: faq/design.rst:417 msgid "" "Lists, on the other hand, are more like arrays in other languages. They " "tend to hold a varying number of objects all of which have the same type and " @@ -646,7 +648,7 @@ msgid "" "if you added another file or two to the directory." msgstr "" -#: faq/design.rst:423 +#: faq/design.rst:425 msgid "" "Tuples are immutable, meaning that once a tuple has been created, you can't " "replace any of its elements with a new value. Lists are mutable, meaning " @@ -655,11 +657,11 @@ msgid "" "as keys." msgstr "" -#: faq/design.rst:430 +#: faq/design.rst:432 msgid "How are lists implemented in CPython?" msgstr "" -#: faq/design.rst:432 +#: faq/design.rst:434 msgid "" "CPython's lists are really variable-length arrays, not Lisp-style linked " "lists. The implementation uses a contiguous array of references to other " @@ -667,13 +669,13 @@ msgid "" "head structure." msgstr "" -#: faq/design.rst:436 +#: faq/design.rst:438 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:439 +#: faq/design.rst:441 msgid "" "When items are appended or inserted, the array of references is resized. " "Some cleverness is applied to improve the performance of appending items " @@ -681,11 +683,11 @@ msgid "" "the next few times don't require an actual resize." msgstr "" -#: faq/design.rst:446 +#: faq/design.rst:448 msgid "How are dictionaries implemented in CPython?" msgstr "" -#: faq/design.rst:448 +#: faq/design.rst:450 msgid "" "CPython's dictionaries are implemented as resizable hash tables. Compared " "to B-trees, this gives better performance for lookup (the most common " @@ -693,7 +695,7 @@ msgid "" "simpler." msgstr "" -#: faq/design.rst:452 +#: faq/design.rst:454 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 " @@ -706,11 +708,11 @@ msgid "" "O notation -- to retrieve a key." msgstr "" -#: faq/design.rst:463 +#: faq/design.rst:465 msgid "Why must dictionary keys be immutable?" msgstr "" -#: faq/design.rst:465 +#: faq/design.rst:467 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 " @@ -723,7 +725,7 @@ msgid "" "would be different." msgstr "" -#: faq/design.rst:474 +#: faq/design.rst:476 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 " @@ -731,23 +733,23 @@ msgid "" "dictionary keys." msgstr "" -#: faq/design.rst:478 +#: faq/design.rst:480 msgid "Some unacceptable solutions that have been proposed:" msgstr "" -#: faq/design.rst:480 +#: faq/design.rst:482 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:483 +#: faq/design.rst:485 msgid "" "mydict = {[1, 2]: '12'}\n" "print(mydict[[1, 2]])" msgstr "" -#: faq/design.rst:486 +#: faq/design.rst:488 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 " @@ -755,14 +757,14 @@ msgid "" "`is`." msgstr "" -#: faq/design.rst:490 +#: faq/design.rst:492 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:494 +#: faq/design.rst:496 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 " @@ -770,7 +772,7 @@ msgid "" "every value in ``d.keys()`` is usable as a key of the dictionary." msgstr "" -#: faq/design.rst:499 +#: faq/design.rst:501 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 " @@ -780,7 +782,7 @@ msgid "" "loop." msgstr "" -#: faq/design.rst:505 +#: faq/design.rst:507 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 " @@ -790,7 +792,7 @@ msgid "" "the object is in the dictionary (or other structure). ::" msgstr "" -#: faq/design.rst:513 +#: faq/design.rst:515 msgid "" "class ListWrapper:\n" " def __init__(self, the_list):\n" @@ -810,14 +812,14 @@ msgid "" " return result" msgstr "" -#: faq/design.rst:530 +#: faq/design.rst:532 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:534 +#: faq/design.rst:536 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__() == " @@ -826,7 +828,7 @@ msgid "" "based structures will misbehave." msgstr "" -#: faq/design.rst:539 +#: faq/design.rst:541 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 " @@ -834,11 +836,11 @@ msgid "" "consequences of not meeting them correctly. Consider yourself warned." msgstr "" -#: faq/design.rst:546 +#: faq/design.rst:548 msgid "Why doesn't list.sort() return the sorted list?" msgstr "" -#: faq/design.rst:548 +#: faq/design.rst:550 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 " @@ -848,7 +850,7 @@ msgid "" "around." msgstr "" -#: faq/design.rst:554 +#: faq/design.rst:556 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 " @@ -856,17 +858,17 @@ msgid "" "dictionary in sorted order::" msgstr "" -#: faq/design.rst:559 +#: faq/design.rst:561 msgid "" "for key in sorted(mydict):\n" " ... # do whatever with mydict[key]..." msgstr "" -#: faq/design.rst:564 +#: faq/design.rst:566 msgid "How do you specify and enforce an interface spec in Python?" msgstr "" -#: faq/design.rst:566 +#: faq/design.rst:568 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 " @@ -874,7 +876,7 @@ msgid "" "helps in the construction of large programs." msgstr "" -#: faq/design.rst:571 +#: faq/design.rst:573 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` " @@ -884,13 +886,13 @@ msgid "" "`~collections.abc.MutableMapping`." msgstr "" -#: faq/design.rst:578 +#: faq/design.rst:580 msgid "" "For Python, many of the advantages of interface specifications can be " "obtained by an appropriate test discipline for components." msgstr "" -#: faq/design.rst:581 +#: faq/design.rst:583 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 " @@ -902,7 +904,7 @@ msgid "" "in a module." msgstr "" -#: faq/design.rst:589 +#: faq/design.rst:591 msgid "" "An appropriate testing discipline can help build large complex applications " "in Python as well as having interface specifications would. In fact, it can " @@ -914,7 +916,7 @@ msgid "" "test suite." msgstr "" -#: faq/design.rst:597 +#: faq/design.rst:599 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 " @@ -923,11 +925,11 @@ msgid "" "not write test cases at all." msgstr "" -#: faq/design.rst:605 +#: faq/design.rst:607 msgid "Why is there no goto?" msgstr "" -#: faq/design.rst:607 +#: faq/design.rst:609 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 " @@ -938,7 +940,7 @@ msgid "" "`continue` and :keyword:`break`)." msgstr "" -#: faq/design.rst:614 +#: faq/design.rst:616 msgid "" "One can also use exceptions to provide a \"structured goto\" that works even " "across function calls. Many feel that exceptions can conveniently emulate " @@ -946,7 +948,7 @@ msgid "" "other languages. For example::" msgstr "" -#: faq/design.rst:620 +#: faq/design.rst:622 msgid "" "class label(Exception): pass # declare a label\n" "\n" @@ -959,24 +961,24 @@ msgid "" "..." msgstr "" -#: faq/design.rst:630 +#: faq/design.rst:632 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:635 +#: faq/design.rst:637 msgid "Why can't raw strings (r-strings) end with a backslash?" msgstr "" -#: faq/design.rst:637 +#: faq/design.rst:639 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:641 +#: faq/design.rst:643 msgid "" "Raw strings were designed to ease creating input for processors (chiefly " "regular expression engines) that want to do their own backslash escape " @@ -986,51 +988,51 @@ msgid "" "rules work well when r-strings are used for their intended purpose." msgstr "" -#: faq/design.rst:648 +#: faq/design.rst:650 msgid "" "If you're trying to build Windows pathnames, note that all Windows system " "calls accept forward slashes too::" msgstr "" -#: faq/design.rst:651 +#: faq/design.rst:653 msgid "f = open(\"/mydir/file.txt\") # works fine!" msgstr "" -#: faq/design.rst:653 +#: faq/design.rst:655 msgid "" "If you're trying to build a pathname for a DOS command, try e.g. one of ::" msgstr "" -#: faq/design.rst:655 +#: faq/design.rst:657 msgid "" "dir = r\"\\this\\is\\my\\dos\\dir\" \"\\\\\"\n" "dir = r\"\\this\\is\\my\\dos\\dir\\ \"[:-1]\n" "dir = \"\\\\this\\\\is\\\\my\\\\dos\\\\dir\\\\\"" msgstr "" -#: faq/design.rst:661 +#: faq/design.rst:663 msgid "Why doesn't Python have a \"with\" statement for attribute assignments?" msgstr "" -#: faq/design.rst:663 +#: faq/design.rst:665 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:667 +#: faq/design.rst:669 msgid "" "with obj:\n" " a = 1 # equivalent to obj.a = 1\n" " total = total + 1 # obj.total = obj.total + 1" msgstr "" -#: faq/design.rst:671 +#: faq/design.rst:673 msgid "In Python, such a construct would be ambiguous." msgstr "" -#: faq/design.rst:673 +#: faq/design.rst:675 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 " @@ -1038,7 +1040,7 @@ msgid "" "*always* knows the scope of every variable at compile time." msgstr "" -#: faq/design.rst:678 +#: faq/design.rst:680 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 " @@ -1047,18 +1049,18 @@ msgid "" "one, or a member attribute?" msgstr "" -#: faq/design.rst:684 +#: faq/design.rst:686 msgid "For instance, take the following incomplete snippet::" msgstr "" -#: faq/design.rst:686 +#: faq/design.rst:688 msgid "" "def foo(a):\n" " with a:\n" " print(x)" msgstr "" -#: faq/design.rst:690 +#: faq/design.rst:692 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 " @@ -1067,25 +1069,25 @@ msgid "" "you see, the dynamic nature of Python makes such choices much harder." msgstr "" -#: faq/design.rst:696 +#: faq/design.rst:698 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:699 +#: faq/design.rst:701 msgid "" "function(args).mydict[index][index].a = 21\n" "function(args).mydict[index][index].b = 42\n" "function(args).mydict[index][index].c = 63" msgstr "" -#: faq/design.rst:703 +#: faq/design.rst:705 msgid "write this::" msgstr "" -#: faq/design.rst:705 +#: faq/design.rst:707 msgid "" "ref = function(args).mydict[index][index]\n" "ref.a = 21\n" @@ -1093,25 +1095,25 @@ msgid "" "ref.c = 63" msgstr "" -#: faq/design.rst:710 +#: faq/design.rst:712 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:714 +#: faq/design.rst:716 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:720 +#: faq/design.rst:722 msgid "Why don't generators support the with statement?" msgstr "" -#: faq/design.rst:722 +#: faq/design.rst:724 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 " @@ -1120,40 +1122,40 @@ msgid "" "`with` statement." msgstr "" -#: faq/design.rst:730 +#: faq/design.rst:732 msgid "Why are colons required for the if/while/def/class statements?" msgstr "" -#: faq/design.rst:732 +#: faq/design.rst:734 msgid "" "The colon is required primarily to enhance readability (one of the results " "of the experimental ABC language). Consider this::" msgstr "" -#: faq/design.rst:735 +#: faq/design.rst:737 msgid "" "if a == b\n" " print(a)" msgstr "" -#: faq/design.rst:738 +#: faq/design.rst:740 msgid "versus ::" msgstr "" -#: faq/design.rst:740 +#: faq/design.rst:742 msgid "" "if a == b:\n" " print(a)" msgstr "" -#: faq/design.rst:743 +#: faq/design.rst:745 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:746 +#: faq/design.rst:748 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 " @@ -1161,17 +1163,17 @@ msgid "" "the program text." msgstr "" -#: faq/design.rst:752 +#: faq/design.rst:754 msgid "Why does Python allow commas at the end of lists and tuples?" msgstr "" -#: faq/design.rst:754 +#: faq/design.rst:756 msgid "" "Python lets you add a trailing comma at the end of lists, tuples, and " "dictionaries::" msgstr "" -#: faq/design.rst:757 +#: faq/design.rst:759 msgid "" "[1, 2, 3,]\n" "('a', 'b', 'c',)\n" @@ -1181,11 +1183,11 @@ msgid "" "}" msgstr "" -#: faq/design.rst:765 +#: faq/design.rst:767 msgid "There are several reasons to allow this." msgstr "" -#: faq/design.rst:767 +#: faq/design.rst:769 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 " @@ -1193,13 +1195,13 @@ msgid "" "reordered without creating a syntax error." msgstr "" -#: faq/design.rst:772 +#: faq/design.rst:774 msgid "" "Accidentally omitting the comma can lead to errors that are hard to " "diagnose. For example::" msgstr "" -#: faq/design.rst:775 +#: faq/design.rst:777 msgid "" "x = [\n" " \"fee\",\n" @@ -1209,14 +1211,14 @@ msgid "" "]" msgstr "" -#: faq/design.rst:782 +#: faq/design.rst:784 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:785 +#: faq/design.rst:787 msgid "" "Allowing the trailing comma may also make programmatic code generation " "easier." diff --git a/faq/extending.po b/faq/extending.po index 500c85b88..20512904f 100644 --- a/faq/extending.po +++ b/faq/extending.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: 2025-11-27 09:00+0200\n" "Last-Translator: Panagiotis Skias \n" "Language-Team: PyGreece \n" diff --git a/faq/general.po b/faq/general.po index 1f72fc770..30034e05b 100644 --- a/faq/general.po +++ b/faq/general.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/faq/gui.po b/faq/gui.po index e021f5635..279b68d62 100644 --- a/faq/gui.po +++ b/faq/gui.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/faq/index.po b/faq/index.po index 61c0a651e..1bde6961c 100644 --- a/faq/index.po +++ b/faq/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: 2024-05-02 12:51+0000\n" "Last-Translator: Dimitrios Papadopoulos\n" "Language-Team: PyGreece \n" diff --git a/faq/installed.po b/faq/installed.po index 3037001fb..1eb38d0aa 100644 --- a/faq/installed.po +++ b/faq/installed.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: 2024-05-06 12:51+0000\n" "Last-Translator: Dimitrios Papadopoulos\n" "Language-Team: PyGreece \n" diff --git a/faq/library.po b/faq/library.po index 0b3016c9b..405ddd776 100644 --- a/faq/library.po +++ b/faq/library.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: 2025-11-21 09:35+0200\n" "Last-Translator: Panagiotis Skias \n" "Language-Team: PyGreece \n" diff --git a/faq/programming.po b/faq/programming.po index c3d34e555..d724513f0 100644 --- a/faq/programming.po +++ b/faq/programming.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: 2025-11-27 09:00+0200\n" "Last-Translator: Panagiotis Skias \n" "Language-Team: PyGreece \n" @@ -27,18 +27,19 @@ msgid "Contents" msgstr "Περιεχόμενα" #: faq/programming.rst:12 -msgid "General Questions" +#, fuzzy +msgid "General questions" msgstr "Γενικές Ερωτήσεις" #: faq/programming.rst:15 +#, fuzzy msgid "" -"Is there a source code level debugger with breakpoints, single-stepping, " -"etc.?" +"Is there a source code-level debugger with breakpoints and single-stepping?" msgstr "" "Υπάρχει πρόγραμμα εντοπισμού σφαλμάτων σε επίπεδο πηγαίου κώδικα με σημεία " "διακοπής , με ένα βήμα κλπ.;" -#: faq/programming.rst:58 +#: faq/programming.rst:56 msgid "Yes." msgstr "Ναι." @@ -65,10 +66,10 @@ msgstr "" "τον κώδικα για το pdb ως παράδειγμα." #: faq/programming.rst:27 +#, fuzzy msgid "" "The IDLE interactive development environment, which is part of the standard " -"Python distribution (normally available as `Tools/scripts/idle3 `_), includes a " +"Python distribution (normally available as :mod:`idlelib`), includes a " "graphical debugger." msgstr "" "Το διαδραστικό περιβάλλον ανάπτυξης IDLE, το οποίο αποτελεί μέρος της " @@ -76,7 +77,7 @@ msgstr "" "github.com/python/cpython/blob/main/Tools/scripts/idle3>`_), που " "περιλαμβάνει ένα γραφικό πρόγραμμα εντοπισμού σφαλμάτων." -#: faq/programming.rst:32 +#: faq/programming.rst:31 msgid "" "PythonWin is a Python IDE that includes a GUI debugger based on pdb. The " "PythonWin debugger colors breakpoints and has quite a few cool features such " @@ -93,7 +94,7 @@ msgstr "" "github.com/mhammond/pywin32>`_ έργου και ως μέρος της διανομής `ActivePython " "`_ ." -#: faq/programming.rst:39 +#: faq/programming.rst:38 msgid "" "`Eric `_ is an IDE built on PyQt and " "the Scintilla editing component." @@ -101,7 +102,7 @@ msgstr "" "Το `Eric `_ είναι ένα IDE που " "βασίζεται στο PyQt και το component επεξεργασίας Scintilla." -#: faq/programming.rst:42 +#: faq/programming.rst:41 msgid "" "`trepan3k `_ is a gdb-like " "debugger." @@ -109,7 +110,7 @@ msgstr "" "Το `trepan3k `_ είναι ένα " "πρόγραμμα εντοπισμού σφαλμάτων παρόμοιο με το gdb." -#: faq/programming.rst:44 +#: faq/programming.rst:43 msgid "" "`Visual Studio Code `_ is an IDE with " "debugging tools that integrates with version-control software." @@ -117,7 +118,7 @@ msgstr "" "Το `Visual Studio Code `_ είναι ένας IDE με " "εργαλεία εντοπισμού σφαλμάτων που ενσωματώνεται με λογισμικό ελέγχου έκδοσης." -#: faq/programming.rst:47 +#: faq/programming.rst:46 msgid "" "There are a number of commercial Python IDEs that include graphical " "debuggers. They include:" @@ -125,39 +126,38 @@ msgstr "" "Υπάρχει ένας αριθμός εμπορικών Python IDEs που περιλαμβάνουν γραφικούς " "εντοπισμούς σφαλμάτων. Αυτά περιλαμβάνουν:" -#: faq/programming.rst:50 +#: faq/programming.rst:49 msgid "`Wing IDE `_" msgstr "`Wing IDE `_" -#: faq/programming.rst:51 -msgid "`Komodo IDE `_" -msgstr "`Komodo IDE `_" - -#: faq/programming.rst:52 +#: faq/programming.rst:50 msgid "`PyCharm `_" msgstr "`PyCharm `_" -#: faq/programming.rst:56 +#: faq/programming.rst:54 msgid "Are there tools to help find bugs or perform static analysis?" msgstr "" "Υπάρχουν εργαλεία που βοηθούν στην εύρεση σφαλμάτων ή στην εκτέλεση στατικής " "ανάλυσης;" -#: faq/programming.rst:60 +#: faq/programming.rst:58 +#, fuzzy msgid "" -"`Pylint `_ and `Pyflakes " -"`_ do basic checking that will help you " -"catch bugs sooner." +"`Ruff `__, `Pylint `__ and `Pyflakes `__ do basic " +"checking that will help you catch bugs sooner." msgstr "" "`Pylint `_ και `Pyflakes " "`_ κάνουν βασικό έλεγχο που θα σας " "βοηθήσει να εντοπίσετε τα σφάλματα νωρίτερα." -#: faq/programming.rst:64 +#: faq/programming.rst:63 +#, fuzzy msgid "" -"Static type checkers such as `Mypy `_, `Pyre " -"`_, and `Pytype `_ can check type hints in Python source code." +"Static type checkers such as `mypy `__, `ty `__, `Pyrefly `__, and `pytype " +"`__ can check type hints in Python source " +"code." msgstr "" "Έλεγχοι στατικού τύπου όπως `Mypy `_, `Pyre `_, και `Pytype `_ μπορεί " @@ -183,12 +183,12 @@ msgstr "" "μαζί με ένα δυαδικό αρχείο Python για να παραχθεί ένα μόνο εκτελέσιμο." #: faq/programming.rst:81 +#, fuzzy msgid "" "One is to use the freeze tool, which is included in the Python source tree " -"as `Tools/freeze `_. It converts Python byte code to C arrays; with a C compiler you " -"can embed all your modules into a new program, which is then linked with the " -"standard Python modules." +"as :source:`Tools/freeze`. It converts Python byte code to C arrays; with a " +"C compiler you can embed all your modules into a new program, which is then " +"linked with the standard Python modules." msgstr "" "Το ένα είναι να χρησιμοποιήσετε το εργαλείο παγώματος, το οποίο " "περιλαμβάνεται στο δέντρο πηγαίου της Python ως `Tools/freeze `_ (macOS μόνο)" msgid "`py2exe `_ (Windows only)" msgstr "`py2exe `_ (Windows μόνο)" -#: faq/programming.rst:107 +#: faq/programming.rst:108 msgid "Are there coding standards or a style guide for Python programs?" msgstr "Υπάρχουν πρότυπα κωδικοποίησης ή οδηγός στυλ για προγράμματα Python;" -#: faq/programming.rst:109 +#: faq/programming.rst:110 msgid "" "Yes. The coding style required for standard library modules is documented " "as :pep:`8`." @@ -268,15 +268,16 @@ msgstr "" "Ναι. Το στυλ κωδικοποίησης που απαιτείται για τα τυπικά modules βιβλιοθήκης " "τεκμηριώνεται ως :pep:`8`." -#: faq/programming.rst:114 -msgid "Core Language" +#: faq/programming.rst:115 +#, fuzzy +msgid "Core language" msgstr "Βασική Γλώσσα" -#: faq/programming.rst:119 +#: faq/programming.rst:120 msgid "Why am I getting an UnboundLocalError when the variable has a value?" msgstr "Γιατί λαμβάνω ένα UnboundLocalError όταν η μεταβλητή έχει μια τιμή;" -#: faq/programming.rst:121 +#: faq/programming.rst:122 msgid "" "It can be a surprise to get the :exc:`UnboundLocalError` in previously " "working code when it is modified by adding an assignment statement somewhere " @@ -286,19 +287,19 @@ msgstr "" "λειτουργούσε προηγουμένως όταν τροποποιείται προσθέτοντας μια δήλωση " "εκχώρησης κάπου στο σώμα μιας συνάρτησης." -#: faq/programming.rst:125 +#: faq/programming.rst:126 msgid "This code:" msgstr "Αυτό ο κώδικας:" -#: faq/programming.rst:134 +#: faq/programming.rst:135 msgid "works, but this code:" msgstr "δουλεύει, αλλά αυτός ο κώδικας:" -#: faq/programming.rst:141 +#: faq/programming.rst:142 msgid "results in an :exc:`!UnboundLocalError`:" msgstr "καταλήγει σε ένα :exc:`!UnboundLocalError`:" -#: faq/programming.rst:148 +#: faq/programming.rst:149 msgid "" "This is because when you make an assignment to a variable in a scope, that " "variable becomes local to that scope and shadows any similarly named " @@ -314,7 +315,7 @@ msgstr "" "τοπική μεταβλητή. Κατά συνέπεια όταν η προηγούμενη ``print(x)`` επιχειρεί να " "εκτυπώσει την uninitialized τοπική μεταβλητή και προκύπτει σφάλμα." -#: faq/programming.rst:155 +#: faq/programming.rst:156 msgid "" "In the example above you can access the outer scope variable by declaring it " "global:" @@ -322,7 +323,7 @@ msgstr "" "Στο παραπάνω παράδειγμα, μπορείτε να αποκτήσετε πρόσβαση στη μεταβλητή " "εξωτερικού εύρους δηλώνοντας την ως καθολική::" -#: faq/programming.rst:167 +#: faq/programming.rst:168 msgid "" "This explicit declaration is required in order to remind you that (unlike " "the superficially analogous situation with class and instance variables) you " @@ -333,7 +334,7 @@ msgstr "" "στην πραγματικότητα τροποποιείτε την τιμή της μεταβλητής στο εξωτερικό " "πεδίο::" -#: faq/programming.rst:174 +#: faq/programming.rst:175 msgid "" "You can do a similar thing in a nested scope using the :keyword:`nonlocal` " "keyword:" @@ -341,13 +342,13 @@ msgstr "" "Μπορείτε να κάνετε κάτι παρόμοιο σε ένα ένθετο πεδίο χρησιμοποιώντας τη λέξη " "κλειδί :keyword:`nonlocal`:" -#: faq/programming.rst:192 +#: faq/programming.rst:193 msgid "What are the rules for local and global variables in Python?" msgstr "" "Ποιοι είναι οι κανόνες για τις τοπικές και τις καθολικές μεταβλητές στην " "Python;" -#: faq/programming.rst:194 +#: faq/programming.rst:195 msgid "" "In Python, variables that are only referenced inside a function are " "implicitly global. If a variable is assigned a value anywhere within the " @@ -359,7 +360,7 @@ msgstr "" "στο σώμα της συνάρτησης, θεωρείται ότι είναι τοπική, εκτός αν δηλωθεί ρητά " "ως καθολική." -#: faq/programming.rst:198 +#: faq/programming.rst:199 msgid "" "Though a bit surprising at first, a moment's consideration explains this. " "On one hand, requiring :keyword:`global` for assigned variables provides a " @@ -378,7 +379,7 @@ msgstr "" "ακαταστασία θα νικήσει την χρησιμότητα της δήλωσης ``global`` για τον " "εντοπισμό παρενεργειών." -#: faq/programming.rst:208 +#: faq/programming.rst:209 msgid "" "Why do lambdas defined in a loop with different values all return the same " "result?" @@ -386,15 +387,16 @@ msgstr "" "Γιατί τα lambdas που ορίζονται σε έναν βρόχο με διαφορετικές τιμές " "επιστρέφουν όλα το ίδιο αποτέλεσμα;" -#: faq/programming.rst:210 +#: faq/programming.rst:211 +#, fuzzy msgid "" "Assume you use a for loop to define a few different lambdas (or even plain " -"functions), e.g.::" +"functions), for example::" msgstr "" "Ας υποθέσουμε ότι χρησιμοποιείτε έναν βρόχο for για να ορίσετε μερικά " "διαφορετικά lambdas (ή ακόμα και απλές συναρτήσεις), π.χ.::" -#: faq/programming.rst:213 +#: faq/programming.rst:214 msgid "" ">>> squares = []\n" ">>> for x in range(5):\n" @@ -404,7 +406,7 @@ msgstr "" ">>> for x in range(5):\n" "... squares.append(lambda: x**2)" -#: faq/programming.rst:217 +#: faq/programming.rst:218 msgid "" "This gives you a list that contains 5 lambdas that calculate ``x**2``. You " "might expect that, when called, they would return, respectively, ``0``, " @@ -416,7 +418,7 @@ msgstr "" "αντίστοιχα, ``0``, ``1``, ``4``, ``9`` και ``16``. Ωστόσο, όταν δοκιμάσετε " "πραγματικά θα δείτε ότι όλα επιστρέφουν ``16``::" -#: faq/programming.rst:222 +#: faq/programming.rst:223 msgid "" ">>> squares[2]()\n" "16\n" @@ -428,13 +430,15 @@ msgstr "" ">>> squares[4]()\n" "16" -#: faq/programming.rst:227 +#: faq/programming.rst:228 +#, fuzzy msgid "" "This happens because ``x`` is not local to the lambdas, but is defined in " "the outer scope, and it is accessed when the lambda is called --- not when " "it is defined. At the end of the loop, the value of ``x`` is ``4``, so all " -"the functions now return ``4**2``, i.e. ``16``. You can also verify this by " -"changing the value of ``x`` and see how the results of the lambdas change::" +"the functions now return ``4**2``, that is ``16``. You can also verify this " +"by changing the value of ``x`` and see how the results of the lambdas " +"change::" msgstr "" "Αυτό συμβαίνει επειδή το ``x`` δεν είναι τοπικό για τα lambdas, αλλά " "ορίζεται στο εξωτερικό εύρος και είναι προσβάσιμο όταν το lambda καλείται " @@ -443,7 +447,7 @@ msgstr "" "Μπορείτε επίσης να το επαληθεύσετε αλλάζοντας την τιμή του ``x`` και δείτε " "πως αλλάζουν τα αποτελέσματα του lambda::" -#: faq/programming.rst:233 +#: faq/programming.rst:234 msgid "" ">>> x = 8\n" ">>> squares[2]()\n" @@ -453,7 +457,7 @@ msgstr "" ">>> squares[2]()\n" "64" -#: faq/programming.rst:237 +#: faq/programming.rst:238 msgid "" "In order to avoid this, you need to save the values in variables local to " "the lambdas, so that they don't rely on the value of the global ``x``::" @@ -462,7 +466,7 @@ msgstr "" "τοπικές στο lambda, έτσι ώστε να μην βασίζονται στην τιμή του καθολικού " "``x``::" -#: faq/programming.rst:240 +#: faq/programming.rst:241 msgid "" ">>> squares = []\n" ">>> for x in range(5):\n" @@ -472,7 +476,7 @@ msgstr "" ">>> for x in range(5):\n" "... squares.append(lambda n=x: n**2)" -#: faq/programming.rst:244 +#: faq/programming.rst:245 msgid "" "Here, ``n=x`` creates a new variable ``n`` local to the lambda and computed " "when the lambda is defined so that it has the same value that ``x`` had at " @@ -486,7 +490,7 @@ msgstr "" "θα είναι ``0`` στο πρώτο lambda, ``1`` στο δεύτερο , ``2`` στο τρίτο και " "ούτω καθεξής. Επομένως κάθε lambda θα επιστρέψει τώρα το σωστό αποτέλεσμα::" -#: faq/programming.rst:250 +#: faq/programming.rst:251 msgid "" ">>> squares[2]()\n" "4\n" @@ -498,7 +502,7 @@ msgstr "" ">>> squares[4]()\n" "16" -#: faq/programming.rst:255 +#: faq/programming.rst:256 msgid "" "Note that this behaviour is not peculiar to lambdas, but applies to regular " "functions too." @@ -506,11 +510,11 @@ msgstr "" "Σημειώστε ότι αυτή η συμπεριφορά δεν είναι ιδιόμορφη για το lambdas, αλλά " "ισχύει και για κανονικές λειτουργίες." -#: faq/programming.rst:260 +#: faq/programming.rst:261 msgid "How do I share global variables across modules?" msgstr "Πως μοιράζομαι καθολικές μεταβλητές σε modules;" -#: faq/programming.rst:262 +#: faq/programming.rst:263 msgid "" "The canonical way to share information across modules within a single " "program is to create a special module (often called config or cfg). Just " @@ -527,19 +531,19 @@ msgstr "" "αλλαγές που γίνονται στο αντικείμενο του module αντικατοπτρίζονται παντού. " "Για παράδειγμα:" -#: faq/programming.rst:268 +#: faq/programming.rst:269 msgid "config.py::" msgstr "config.py::" -#: faq/programming.rst:270 +#: faq/programming.rst:271 msgid "x = 0 # Default value of the 'x' configuration setting" msgstr "x = 0 # Default value of the 'x' configuration setting" -#: faq/programming.rst:272 +#: faq/programming.rst:273 msgid "mod.py::" msgstr "mod.py::" -#: faq/programming.rst:274 +#: faq/programming.rst:275 msgid "" "import config\n" "config.x = 1" @@ -547,11 +551,11 @@ msgstr "" "import config\n" "config.x = 1" -#: faq/programming.rst:277 +#: faq/programming.rst:278 msgid "main.py::" msgstr "main.py::" -#: faq/programming.rst:279 +#: faq/programming.rst:280 msgid "" "import config\n" "import mod\n" @@ -561,7 +565,7 @@ msgstr "" "import mod\n" "print(config.x)" -#: faq/programming.rst:283 +#: faq/programming.rst:284 msgid "" "Note that using a module is also the basis for implementing the singleton " "design pattern, for the same reason." @@ -569,12 +573,12 @@ msgstr "" "Λάβετε υπόψη ότι η χρήση ενός module είναι επίσης η βάση για την εφαρμογή " "του μοτίβου σχεδιασμού singleton, για τον ίδιο λόγο." -#: faq/programming.rst:288 +#: faq/programming.rst:289 msgid "What are the \"best practices\" for using import in a module?" msgstr "" "Ποιες είναι οι \"βέλτιστες πρακτικές\" για τη χρήση import σε ένα module;" -#: faq/programming.rst:290 +#: faq/programming.rst:291 msgid "" "In general, don't use ``from modulename import *``. Doing so clutters the " "importer's namespace, and makes it much harder for linters to detect " @@ -584,7 +588,7 @@ msgstr "" "δημιουργεί μια ακαταστασία στο importer's namespace, και καθιστά πιο δύσκολο " "για τα linters να εντοπίσουν απροσδιόριστα ονόματα." -#: faq/programming.rst:294 +#: faq/programming.rst:295 msgid "" "Import modules at the top of a file. Doing so makes it clear what other " "modules your code requires and avoids questions of whether the module name " @@ -598,32 +602,34 @@ msgstr "" "χρησιμοποιώντας πολλαπλά imports ανά γραμμής καταναλώνεται λιγότερος χώρος " "στην οθόνη." -#: faq/programming.rst:299 +#: faq/programming.rst:300 msgid "It's good practice if you import modules in the following order:" msgstr "Είναι καλή πρακτική εάν εισάγετε module με την ακόλουθη σειρά:" -#: faq/programming.rst:301 +#: faq/programming.rst:302 +#, fuzzy msgid "" -"standard library modules -- e.g. :mod:`sys`, :mod:`os`, :mod:`argparse`, :" +"standard library modules -- such as :mod:`sys`, :mod:`os`, :mod:`argparse`, :" "mod:`re`" msgstr "" "τυπικά module βιβλιοθήκης -- π.χ. :mod:`sys`, :mod:`os`, :mod:`argparse`, :" "mod:`re`" -#: faq/programming.rst:302 +#: faq/programming.rst:303 +#, fuzzy msgid "" "third-party library modules (anything installed in Python's site-packages " -"directory) -- e.g. :mod:`!dateutil`, :mod:`!requests`, :mod:`!PIL.Image`" +"directory) -- such as :pypi:`dateutil`, :pypi:`requests`, :pypi:`tzdata`" msgstr "" "module βιβλιοθήκης τρίτων (ό, τι είναι εγκατεστημένο στο κατάλογο site-" "packages της Python) -- π.χ. :mod:`!dateutil`, :mod:`! requests`, :mod:`!PIL." "Image`" -#: faq/programming.rst:304 +#: faq/programming.rst:305 msgid "locally developed modules" msgstr "τοπικά αναπτυγμένα modules" -#: faq/programming.rst:306 +#: faq/programming.rst:307 msgid "" "It is sometimes necessary to move imports to a function or class to avoid " "problems with circular imports. Gordon McMillan says:" @@ -632,7 +638,7 @@ msgstr "" "ή κλάση για να αποφευχθούν προβλήματα με τις κυκλικές εισαγωγές. Ο Gordon " "McMillan λέει:" -#: faq/programming.rst:309 +#: faq/programming.rst:310 msgid "" "Circular imports are fine where both modules use the \"import \" " "form of import. They fail when the 2nd module wants to grab a name out of " @@ -646,7 +652,7 @@ msgstr "" "είναι στο κορυφαίο επίπεδο. Αυτό συμβαίνει επειδή το πρώτο module είναι " "απασχολημένο με την εισαγωγή του 2ου." -#: faq/programming.rst:315 +#: faq/programming.rst:316 msgid "" "In this case, if the second module is only used in one function, then the " "import can easily be moved into that function. By the time the import is " @@ -659,7 +665,7 @@ msgstr "" "ολοκληρώσει την αρχικοποίηση, και το δεύτερο module μπορεί να κάνει την " "εισαγωγή του." -#: faq/programming.rst:320 +#: faq/programming.rst:321 msgid "" "It may also be necessary to move imports out of the top level of code if " "some of the modules are platform-specific. In that case, it may not even be " @@ -674,7 +680,7 @@ msgstr "" "περίπτωση, η εισαγωγή των σωστών modules στον αντίστοιχο κώδικα για " "συγκεκριμένη πλατφόρμα είναι μια καλή επιλογή." -#: faq/programming.rst:325 +#: faq/programming.rst:326 msgid "" "Only move imports into a local scope, such as inside a function definition, " "if it's necessary to solve a problem such as avoiding a circular import or " @@ -701,11 +707,11 @@ msgstr "" "ξεφύγει από το πεδίο εφαρμογής του, το module είναι πιθανώς διαθέσιμο στο :" "data:`sys.modules`." -#: faq/programming.rst:338 +#: faq/programming.rst:339 msgid "Why are default values shared between objects?" msgstr "Γιατί μοιράζονται οι προεπιλεγμένες τιμές μεταξύ των αντικειμένων;" -#: faq/programming.rst:340 +#: faq/programming.rst:341 msgid "" "This type of bug commonly bites neophyte programmers. Consider this " "function::" @@ -713,7 +719,7 @@ msgstr "" "Αυτός ο τύπος σφάλματος συνήθως δαγκώνει νεοφυείς προγραμματιστές. Σκεφτείτε " "αυτήν τη συνάρτηση::" -#: faq/programming.rst:342 +#: faq/programming.rst:343 msgid "" "def foo(mydict={}): # Danger: shared reference to one dict for all calls\n" " ... compute something ...\n" @@ -725,7 +731,7 @@ msgstr "" " mydict[key] = value\n" " return mydict" -#: faq/programming.rst:347 +#: faq/programming.rst:348 msgid "" "The first time you call this function, ``mydict`` contains a single item. " "The second time, ``mydict`` contains two items because when ``foo()`` begins " @@ -736,7 +742,7 @@ msgstr "" "γιατί όταν το ``foo()`` ξεκινά την εκτέλεση, το ``mydict`` ξεκινά με ένα " "αντικείμενο ήδη μέσα." -#: faq/programming.rst:351 +#: faq/programming.rst:352 msgid "" "It is often expected that a function call creates new objects for default " "values. This is not what happens. Default values are created exactly once, " @@ -750,7 +756,7 @@ msgstr "" "αντικείμενο αλλάξει, όπως το λεξικό σε αυτό το παράδειγμα, επόμενες κλήσεις " "στην συνάρτηση θα αναφέρονται σε αυτό το αλλαγμένο αντικείμενο." -#: faq/programming.rst:356 +#: faq/programming.rst:357 msgid "" "By definition, immutable objects such as numbers, strings, tuples, and " "``None``, are safe from change. Changes to mutable objects such as " @@ -760,7 +766,7 @@ msgstr "" "``None`` , είναι ασφαλή από αλλαγές. Οι αλλαγές σε μεταβλητά αντικείμενα " "όπως λεξικά, λίστες και παρουσίες κλάσεων μπορεί να οδηγήσουν σε σύγχυση." -#: faq/programming.rst:360 +#: faq/programming.rst:361 msgid "" "Because of this feature, it is good programming practice to not use mutable " "objects as default values. Instead, use ``None`` as the default value and " @@ -773,7 +779,7 @@ msgstr "" "ελέγξτε εάν η παράμετρος είναι ``None`` και δημιουργήστε μια νέα λίστα/" "λεξικά/ό,τι και αν είναι. Για παράδειγμα μην γράψετε::" -#: faq/programming.rst:365 +#: faq/programming.rst:366 msgid "" "def foo(mydict={}):\n" " ..." @@ -781,11 +787,11 @@ msgstr "" "def foo(mydict={}):\n" " ..." -#: faq/programming.rst:368 +#: faq/programming.rst:369 msgid "but::" msgstr "αλλά::" -#: faq/programming.rst:370 +#: faq/programming.rst:371 msgid "" "def foo(mydict=None):\n" " if mydict is None:\n" @@ -795,7 +801,7 @@ msgstr "" " if mydict is None:\n" " mydict = {} # create a new dict for local namespace" -#: faq/programming.rst:374 +#: faq/programming.rst:375 msgid "" "This feature can be useful. When you have a function that's time-consuming " "to compute, a common technique is to cache the parameters and the resulting " @@ -810,7 +816,7 @@ msgstr "" "ξανά η ίδια τιμή. Αυτό ονομάζεται \"memoizing\", και μπορεί να εφαρμοστεί ως " "εξής:" -#: faq/programming.rst:379 +#: faq/programming.rst:380 msgid "" "# Callers can only provide two parameters and optionally pass _cache by " "keyword\n" @@ -834,7 +840,7 @@ msgstr "" " _cache[(arg1, arg2)] = result # Store result in the cache\n" " return result" -#: faq/programming.rst:389 +#: faq/programming.rst:390 msgid "" "You could use a global variable containing a dictionary instead of the " "default value; it's a matter of taste." @@ -842,14 +848,14 @@ msgstr "" "Θα μπορούσατε να χρησιμοποιήσετε μια καθολική μεταβλητή που περιέχει ένα " "λεξικό αντί για την προεπιλεγμένη τιμή∙ Είναι θέμα γούστου." -#: faq/programming.rst:394 +#: faq/programming.rst:395 msgid "" "How can I pass optional or keyword parameters from one function to another?" msgstr "" "Πώς μπορώ να μεταβιβάσω προαιρετικές παραμέτρους ή παραμέτρους λέξεων-" "κλειδιών από τη μια συνάρτηση στην άλλη;" -#: faq/programming.rst:396 +#: faq/programming.rst:397 msgid "" "Collect the arguments using the ``*`` and ``**`` specifiers in the " "function's parameter list; this gives you the positional arguments as a " @@ -862,7 +868,7 @@ msgstr "" "μεταβιβάσετε αυτά τα ορίσματα κατά την κλήση άλλης συνάρτησης με τη χρήση " "των ``*`` και ``**``::" -#: faq/programming.rst:401 +#: faq/programming.rst:402 msgid "" "def f(x, *args, **kwargs):\n" " ...\n" @@ -876,11 +882,11 @@ msgstr "" " ...\n" " g(x, *args, **kwargs)" -#: faq/programming.rst:415 +#: faq/programming.rst:416 msgid "What is the difference between arguments and parameters?" msgstr "Ποια είναι η διαφορά μεταξύ ορισμάτων και παραμέτρων;" -#: faq/programming.rst:417 +#: faq/programming.rst:418 msgid "" ":term:`Parameters ` are defined by the names that appear in a " "function definition, whereas :term:`arguments ` are the values " @@ -894,7 +900,7 @@ msgstr "" "παράμετροι ορίζουν τι :term:`kind of arguments ` μπορεί να δεχτεί " "μια συνάρτηση. Για παράδειγμα δεδομένου του ορισμού της συνάρτησης::" -#: faq/programming.rst:423 +#: faq/programming.rst:424 msgid "" "def func(foo, bar=None, **kwargs):\n" " pass" @@ -902,7 +908,7 @@ msgstr "" "def func(foo, bar=None, **kwargs):\n" " pass" -#: faq/programming.rst:426 +#: faq/programming.rst:427 msgid "" "*foo*, *bar* and *kwargs* are parameters of ``func``. However, when calling " "``func``, for example::" @@ -910,23 +916,23 @@ msgstr "" "*foo*, *bar* και *kwargs* είναι παράμετροι της ``func``. Ωστόσο, όταν " "καλείται η ``func``, για παράδειγμα::" -#: faq/programming.rst:429 +#: faq/programming.rst:430 msgid "func(42, bar=314, extra=somevar)" msgstr "func(42, bar=314, extra=somevar)" -#: faq/programming.rst:431 +#: faq/programming.rst:432 msgid "the values ``42``, ``314``, and ``somevar`` are arguments." msgstr "οι τιμές ``42``, ``314``, και ``somevar`` είναι ορίσματα." -#: faq/programming.rst:435 +#: faq/programming.rst:436 msgid "Why did changing list 'y' also change list 'x'?" msgstr "Γιατί η αλλαγή της λίστας 'y' αλλάζει επίσης και τη λίστα 'x';" -#: faq/programming.rst:437 +#: faq/programming.rst:438 msgid "If you wrote code like::" msgstr "Αν γράψατε κώδικα όπως::" -#: faq/programming.rst:439 +#: faq/programming.rst:440 msgid "" ">>> x = []\n" ">>> y = x\n" @@ -944,18 +950,18 @@ msgstr "" ">>> x\n" "[10]" -#: faq/programming.rst:447 +#: faq/programming.rst:448 msgid "" "you might be wondering why appending an element to ``y`` changed ``x`` too." msgstr "" "μπορεί να αναρωτιέστε γιατί η προσθήκη ενός στοιχείου στο ``y`` άλλαξε " "επίσης το ``x``." -#: faq/programming.rst:449 +#: faq/programming.rst:450 msgid "There are two factors that produce this result:" msgstr "Υπάρχουν δύο παράγοντες που παράγουν αυτό το αποτέλεσμα:" -#: faq/programming.rst:451 +#: faq/programming.rst:452 msgid "" "Variables are simply names that refer to objects. Doing ``y = x`` doesn't " "create a copy of the list -- it creates a new variable ``y`` that refers to " @@ -968,14 +974,14 @@ msgstr "" "``x``. Αυτό σημαίνει ότι υπάρχει μόνο ένα αντικείμενο (η λίστα), και το " "``x`` και το ``y`` αναφέρονται σε αυτό." -#: faq/programming.rst:455 +#: faq/programming.rst:456 msgid "" "Lists are :term:`mutable`, which means that you can change their content." msgstr "" "Οι λίστες είναι :term:`mutable`, που σημαίνει ότι μπορείτε να αλλάξετε το " "περιεχόμενό τους." -#: faq/programming.rst:457 +#: faq/programming.rst:458 msgid "" "After the call to :meth:`~sequence.append`, the content of the mutable " "object has changed from ``[]`` to ``[10]``. Since both the variables refer " @@ -986,11 +992,11 @@ msgstr "" "μεταβλητές αναφέρονται στο ίδιο αντικείμενο, χρησιμοποιώντας οποιοδήποτε " "όνομα αποκτά πρόσβαση στην τροποποιημένη τιμή ``[10]``." -#: faq/programming.rst:461 +#: faq/programming.rst:462 msgid "If we instead assign an immutable object to ``x``::" msgstr "Αν αντιστοιχίσουμε ένα αμετάβλητο αντικείμενο σε ``x``::" -#: faq/programming.rst:463 +#: faq/programming.rst:464 msgid "" ">>> x = 5 # ints are immutable\n" ">>> y = x\n" @@ -1008,7 +1014,7 @@ msgstr "" ">>> y\n" "5" -#: faq/programming.rst:471 +#: faq/programming.rst:472 msgid "" "we can see that in this case ``x`` and ``y`` are not equal anymore. This is " "because integers are :term:`immutable`, and when we do ``x = x + 1`` we are " @@ -1027,7 +1033,7 @@ msgstr "" "and ``5``) και δύο μεταβλητές που αναφέρονται σε αυτά (``x`` τώρα αναφέρεται " "σε ``6`` αλλά ``y`` ακόμα αναφέρεται στο ``5``)." -#: faq/programming.rst:479 +#: faq/programming.rst:480 msgid "" "Some operations (for example ``y.append(10)`` and ``y.sort()``) mutate the " "object, whereas superficially similar operations (for example ``y = y + " @@ -1049,7 +1055,7 @@ msgstr "" "προκαλέσει το πρόγραμμά σας να δημιουργήσει ένα λάθος το οποίο " "διαγιγνώσκεται εύκολα." -#: faq/programming.rst:488 +#: faq/programming.rst:489 msgid "" "However, there is one class of operations where the same operation sometimes " "has different behaviors with different types: the augmented assignment " @@ -1065,14 +1071,15 @@ msgstr "" "extend([1, 2, 3])`` και μεταλλάσσει ``a_list``, ενώ το ``some_tuple += (1, " "2, 3)`` και ``some_int += 1`` δημιουργεί νέα αντικείμενα)." -#: faq/programming.rst:495 +#: faq/programming.rst:496 msgid "In other words:" msgstr "Με άλλα λόγια:" -#: faq/programming.rst:497 +#: faq/programming.rst:498 +#, fuzzy msgid "" -"If we have a mutable object (:class:`list`, :class:`dict`, :class:`set`, " -"etc.), we can use some specific operations to mutate it and all the " +"If we have a mutable object (such as :class:`list`, :class:`dict`, :class:" +"`set`), we can use some specific operations to mutate it and all the " "variables that refer to it will see the change." msgstr "" "Εάν έχουμε ένα μεταβλητό αντικείμενο (:class:`list`, :class:`dict`, :class:" @@ -1080,10 +1087,11 @@ msgstr "" "λειτουργίες για να το μεταλλάξουμε και όλες τις μεταβλητές που αναφέρονται " "σε αυτό θα δουν την αλλαγή." -#: faq/programming.rst:500 +#: faq/programming.rst:501 +#, fuzzy msgid "" -"If we have an immutable object (:class:`str`, :class:`int`, :class:`tuple`, " -"etc.), all the variables that refer to it will always see the same value, " +"If we have an immutable object (such as :class:`str`, :class:`int`, :class:" +"`tuple`), all the variables that refer to it will always see the same value, " "but operations that transform that value into a new value always return a " "new object." msgstr "" @@ -1092,7 +1100,7 @@ msgstr "" "την ίδια τιμή, αλλά οι λειτουργίες που θα μετατρέπουν αυτήν την τιμή σε μια " "νέα τιμή επιστρέφουν πάντα ένα νέο αντικείμενο." -#: faq/programming.rst:505 +#: faq/programming.rst:506 msgid "" "If you want to know if two variables refer to the same object or not, you " "can use the :keyword:`is` operator, or the built-in function :func:`id`." @@ -1101,17 +1109,18 @@ msgstr "" "ή όχι, μπορείτε να χρησιμοποιήσετε τον :keyword:`is` operator, ή την " "ενσωματωμένη συνάρτηση :func:`id`." -#: faq/programming.rst:510 +#: faq/programming.rst:511 msgid "How do I write a function with output parameters (call by reference)?" msgstr "" "Πως μπορώ να γράψω μια συνάρτηση με παραμέτρους εξόδου (κλήση με αναφορά);" -#: faq/programming.rst:512 +#: faq/programming.rst:513 +#, fuzzy msgid "" "Remember that arguments are passed by assignment in Python. Since " "assignment just creates references to objects, there's no alias between an " -"argument name in the caller and callee, and so no call-by-reference per se. " -"You can achieve the desired effect in a number of ways." +"argument name in the caller and callee, and consequently no call-by-" +"reference. You can achieve the desired effect in a number of ways." msgstr "" "Να θυμάστε ότι τα ορίσματα μεταβιβάζονται με ανάθεση στην Python. Εφόσον η " "εκχώρηση δημιουργεί απλώς αναφορές σε αντικείμενα, δεν υπάρχει ψευδώνυμο " @@ -1119,11 +1128,11 @@ msgstr "" "και επομένως δεν υπάρχει κλήση προς αναφορά από μόνη της. Μπορείτε να " "επιτύχετε το επιθυμητό αποτέλεσμα με διάφορους τρόπους." -#: faq/programming.rst:517 +#: faq/programming.rst:518 msgid "By returning a tuple of the results::" msgstr "Επιστρέφοντας μια πλειάδα των αποτελεσμάτων::" -#: faq/programming.rst:519 +#: faq/programming.rst:520 msgid "" ">>> def func1(a, b):\n" "... a = 'new-value' # a and b are local names\n" @@ -1143,23 +1152,23 @@ msgstr "" ">>> func1(x, y)\n" "('new-value', 100)" -#: faq/programming.rst:528 +#: faq/programming.rst:529 msgid "This is almost always the clearest solution." msgstr "Αυτή είναι σχεδόν πάντα η πιο ξεκάθαρη λύση." -#: faq/programming.rst:530 +#: faq/programming.rst:531 msgid "" "By using global variables. This isn't thread-safe, and is not recommended." msgstr "" "Χρησιμοποιώντας καθολικές μεταβλητές. Αυτό δεν είναι ασφαλές για νήμα και " "δεν συνίσταται." -#: faq/programming.rst:532 +#: faq/programming.rst:533 msgid "By passing a mutable (changeable in-place) object::" msgstr "" "Περνώντας ένα μεταβλητό (με δυνατότητα αλλαγής επί τόπου) αντικείμενο::" -#: faq/programming.rst:534 +#: faq/programming.rst:535 msgid "" ">>> def func2(a):\n" "... a[0] = 'new-value' # 'a' references a mutable list\n" @@ -1179,11 +1188,11 @@ msgstr "" ">>> args\n" "['new-value', 100]" -#: faq/programming.rst:543 +#: faq/programming.rst:544 msgid "By passing in a dictionary that gets mutated::" msgstr "Περνώντας σε ένα λεξικό που μεταλλάσσεται::" -#: faq/programming.rst:545 +#: faq/programming.rst:546 msgid "" ">>> def func3(args):\n" "... args['a'] = 'new-value' # args is a mutable dictionary\n" @@ -1203,11 +1212,11 @@ msgstr "" ">>> args\n" "{'a': 'new-value', 'b': 100}" -#: faq/programming.rst:554 +#: faq/programming.rst:555 msgid "Or bundle up values in a class instance::" msgstr "Ή ομαδοποιήστε τιμές σε μια παρουσία κλάσης::" -#: faq/programming.rst:556 +#: faq/programming.rst:557 msgid "" ">>> class Namespace:\n" "... def __init__(self, /, **args):\n" @@ -1237,21 +1246,21 @@ msgstr "" ">>> vars(args)\n" "{'a': 'new-value', 'b': 100}" -#: faq/programming.rst:571 +#: faq/programming.rst:572 msgid "There's almost never a good reason to get this complicated." msgstr "Δεν υπάρχει σχεδόν ποτέ καλός λόγος να γίνει αυτό περίπλοκο." -#: faq/programming.rst:573 +#: faq/programming.rst:574 msgid "Your best choice is to return a tuple containing the multiple results." msgstr "" "Η καλύτερη επιλογή σας είναι να επιστρέψετε μια πλειάδα που περιέχει " "πολλαπλά αποτελέσματα." -#: faq/programming.rst:577 +#: faq/programming.rst:578 msgid "How do you make a higher order function in Python?" msgstr "Πως δημιουργείτε μια συνάρτηση υψηλότερης τάξης στην Python;" -#: faq/programming.rst:579 +#: faq/programming.rst:580 msgid "" "You have two choices: you can use nested scopes or you can use callable " "objects. For example, suppose you wanted to define ``linear(a,b)`` which " @@ -1263,7 +1272,7 @@ msgstr "" "θέλετε να ορίσετε το ``linear(a,b)`` που επιστρέφει μια συνάρτηση ``f(x)`` " "που υπολογίζει την τιμή ``a*x+b``. Χρησιμοποιώντας ένθετα πεδία::" -#: faq/programming.rst:583 +#: faq/programming.rst:584 msgid "" "def linear(a, b):\n" " def result(x):\n" @@ -1275,11 +1284,11 @@ msgstr "" " return a * x + b\n" " return result" -#: faq/programming.rst:588 +#: faq/programming.rst:589 msgid "Or using a callable object::" msgstr "Ή χρησιμοποιώντας ένα callable αντικείμενο::" -#: faq/programming.rst:590 +#: faq/programming.rst:591 msgid "" "class linear:\n" "\n" @@ -1297,19 +1306,19 @@ msgstr "" " def __call__(self, x):\n" " return self.a * x + self.b" -#: faq/programming.rst:598 +#: faq/programming.rst:599 msgid "In both cases, ::" msgstr "Και στις δύο περιπτώσεις::" -#: faq/programming.rst:600 +#: faq/programming.rst:601 msgid "taxes = linear(0.3, 2)" msgstr "taxes = linear(0.3, 2)" -#: faq/programming.rst:602 +#: faq/programming.rst:603 msgid "gives a callable object where ``taxes(10e6) == 0.3 * 10e6 + 2``." msgstr "δίνει ένα callable αντικείμενο όπου ``taxes(10e6) == 0.3 * 10e6 + 2``." -#: faq/programming.rst:604 +#: faq/programming.rst:605 msgid "" "The callable object approach has the disadvantage that it is a bit slower " "and results in slightly longer code. However, note that a collection of " @@ -1320,7 +1329,7 @@ msgstr "" "συλλογή από callables μπορεί να μοιραστεί την υπογραφή τους μέσω " "κληρονομικότητας::" -#: faq/programming.rst:608 +#: faq/programming.rst:609 msgid "" "class exponential(linear):\n" " # __init__ inherited\n" @@ -1332,12 +1341,12 @@ msgstr "" " def __call__(self, x):\n" " return self.a * (x ** self.b)" -#: faq/programming.rst:613 +#: faq/programming.rst:614 msgid "Object can encapsulate state for several methods::" msgstr "" "Το αντικείμενο μπορεί να ενθυλακώσει την κατάσταση για πολλές μεθόδους::" -#: faq/programming.rst:615 +#: faq/programming.rst:616 msgid "" "class counter:\n" "\n" @@ -1371,7 +1380,7 @@ msgstr "" "count = counter()\n" "inc, dec, reset = count.up, count.down, count.set" -#: faq/programming.rst:631 +#: faq/programming.rst:632 msgid "" "Here ``inc()``, ``dec()`` and ``reset()`` act like functions which share the " "same counting variable." @@ -1379,11 +1388,11 @@ msgstr "" "Εδώ ``inc()``, ``dec()`` και ``reset()`` λειτουργούν σαν συναρτήσεις που " "μοιράζονται την ίδια μεταβλητή μέτρησης." -#: faq/programming.rst:636 +#: faq/programming.rst:637 msgid "How do I copy an object in Python?" msgstr "Πως μπορώ να αντιγράψω ένα αντικείμενο στην Python;" -#: faq/programming.rst:638 +#: faq/programming.rst:639 msgid "" "In general, try :func:`copy.copy` or :func:`copy.deepcopy` for the general " "case. Not all objects can be copied, but most can." @@ -1392,7 +1401,7 @@ msgstr "" "περίπτωση. Δεν μπορούν να αντιγραφούν όλα τα αντικείμενα, αλλά τα " "περισσότερα μπορούν." -#: faq/programming.rst:641 +#: faq/programming.rst:642 msgid "" "Some objects can be copied more easily. Dictionaries have a :meth:`~dict." "copy` method::" @@ -1400,23 +1409,23 @@ msgstr "" "Ορισμένα αντικείμενα μπορούν να αντιγραφούν πιο εύκολα. Τα λεξικά έχουν μία " "μέθοδο :meth:`~dict.copy`::" -#: faq/programming.rst:644 +#: faq/programming.rst:645 msgid "newdict = olddict.copy()" msgstr "newdict = olddict.copy()" -#: faq/programming.rst:646 +#: faq/programming.rst:647 msgid "Sequences can be copied by slicing::" msgstr "Οι ακολουθίες μπορούν να αντιγραφούν με τεμαχισμό::" -#: faq/programming.rst:648 +#: faq/programming.rst:649 msgid "new_l = l[:]" msgstr "new_l = l[:]" -#: faq/programming.rst:652 +#: faq/programming.rst:653 msgid "How can I find the methods or attributes of an object?" msgstr "Πως μπορώ να βρω τις μεθόδους ή τα χαρακτηριστικά ενός αντικειμένου;" -#: faq/programming.rst:654 +#: faq/programming.rst:655 msgid "" "For an instance ``x`` of a user-defined class, :func:`dir(x) ` returns " "an alphabetized list of the names containing the instance attributes and " @@ -1427,11 +1436,11 @@ msgstr "" "χαρακτηριστικά της οντότητας και τις μεθόδους και τα χαρακτηριστικά που " "ορίζονται από την κλάση του." -#: faq/programming.rst:660 +#: faq/programming.rst:661 msgid "How can my code discover the name of an object?" msgstr "Πως μπορεί ο κώδικας μου να ανακαλύψει το όνομα ενός αντικειμένου;" -#: faq/programming.rst:662 +#: faq/programming.rst:663 msgid "" "Generally speaking, it can't, because objects don't really have names. " "Essentially, assignment always binds a name to a value; the same is true of " @@ -1443,7 +1452,7 @@ msgstr "" "ίδιο ισχύει για τις δηλώσεις ``def`` και ``class``, αλλά σε αυτή την " "περίπτωση η τιμή είναι callable. Λάβετε υπόψη τον ακόλουθο κώδικα::" -#: faq/programming.rst:667 +#: faq/programming.rst:668 msgid "" ">>> class A:\n" "... pass\n" @@ -1467,7 +1476,7 @@ msgstr "" ">>> print(a)\n" "<__main__.A object at 0x16D07CC>" -#: faq/programming.rst:678 +#: faq/programming.rst:679 msgid "" "Arguably the class has a name: even though it is bound to two names and " "invoked through the name ``B`` the created instance is still reported as an " @@ -1481,7 +1490,7 @@ msgstr "" "αδύνατο να πούμε είτε το όνομα της οντότητας είναι ``a`` ή ``b``, καθώς και " "τα δύο ονόματα συνδέονται με την ίδια τιμή." -#: faq/programming.rst:683 +#: faq/programming.rst:684 msgid "" "Generally speaking it should not be necessary for your code to \"know the " "names\" of particular values. Unless you are deliberately writing " @@ -1493,7 +1502,7 @@ msgstr "" "ενδοσκοπικά (introspective) προγράμματα, αυτό είναι συνήθως μια ένδειξη ότι " "μια αλλαγή προσέγγισης μπορεί να είναι επωφελής." -#: faq/programming.rst:688 +#: faq/programming.rst:689 msgid "" "In comp.lang.python, Fredrik Lundh once gave an excellent analogy in answer " "to this question:" @@ -1501,7 +1510,7 @@ msgstr "" "Στο comp.lang.python, ο Fredrik Lundh έδωσε μια εξαιρετική αναλογία ως " "απάντηση σε αυτήν την ερώτηση:" -#: faq/programming.rst:691 +#: faq/programming.rst:692 msgid "" "The same way as you get the name of that cat you found on your porch: the " "cat (object) itself cannot tell you its name, and it doesn't really care -- " @@ -1514,7 +1523,7 @@ msgstr "" "λέγεται είναι να ρωτήσετε όλους τους γείτονές σας (namespaces) αν είναι η " "γάτα τους (αντικείμενο)..." -#: faq/programming.rst:696 +#: faq/programming.rst:697 msgid "" "....and don't be surprised if you'll find that it's known by many names, or " "no name at all!" @@ -1522,16 +1531,16 @@ msgstr "" "....και μην εκπλαγείτε αν διαπιστώσετε ότι είναι γνωστό με πολλά ονόματα, ή " "κανένα όνομα!" -#: faq/programming.rst:701 +#: faq/programming.rst:702 msgid "What's up with the comma operator's precedence?" msgstr "Τι συμβαίνει με την προτεραιότητα του τελεστή κόμματος;" -#: faq/programming.rst:703 +#: faq/programming.rst:704 msgid "Comma is not an operator in Python. Consider this session::" msgstr "" "Το κόμμα δεν είναι τελεστής στην Python. Σκεφτείτε αυτήν την συνεδρία::" -#: faq/programming.rst:705 +#: faq/programming.rst:706 msgid "" ">>> \"a\" in \"b\", \"a\"\n" "(False, 'a')" @@ -1539,7 +1548,7 @@ msgstr "" ">>> \"a\" in \"b\", \"a\"\n" "(False, 'a')" -#: faq/programming.rst:708 +#: faq/programming.rst:709 msgid "" "Since the comma is not an operator, but a separator between expressions the " "above is evaluated as if you had entered::" @@ -1547,37 +1556,38 @@ msgstr "" "Δεδομένου ότι το κόμμα δεν είναι τελεστής, αλλά διαχωριστικό μεταξύ των " "εκφράσεων, τα παραπάνω αξιολογούνται σαν να είχατε εισαγάγει::" -#: faq/programming.rst:711 +#: faq/programming.rst:712 msgid "(\"a\" in \"b\"), \"a\"" msgstr "(\"a\" in \"b\"), \"a\"" -#: faq/programming.rst:713 +#: faq/programming.rst:714 msgid "not::" msgstr "δεν::" -#: faq/programming.rst:715 +#: faq/programming.rst:716 msgid "\"a\" in (\"b\", \"a\")" msgstr "\"a\" in (\"b\", \"a\")" -#: faq/programming.rst:717 +#: faq/programming.rst:718 +#, fuzzy msgid "" -"The same is true of the various assignment operators (``=``, ``+=`` etc). " -"They are not truly operators but syntactic delimiters in assignment " +"The same is true of the various assignment operators (``=``, ``+=``, and so " +"on). They are not truly operators but syntactic delimiters in assignment " "statements." msgstr "" "Το ίδιο ισχύει για τους διάφορους τελεστές εκχώρησης (``=``, ``+=`` κλπ). " "Δεν είναι πραγματικά τελεστές αλλά συντακτικοί delimiters σε δηλώσεις " "εκχώρησης." -#: faq/programming.rst:722 +#: faq/programming.rst:723 msgid "Is there an equivalent of C's \"?:\" ternary operator?" msgstr "Υπάρχει ισοδύναμο του τριαδικού τελεστή \"?:\" της C;" -#: faq/programming.rst:724 +#: faq/programming.rst:725 msgid "Yes, there is. The syntax is as follows::" msgstr "Ναι υπάρχει, Η σύνταξη έχει ως εξής::" -#: faq/programming.rst:726 +#: faq/programming.rst:727 msgid "" "[on_true] if [expression] else [on_false]\n" "\n" @@ -1589,7 +1599,7 @@ msgstr "" "x, y = 50, 25\n" "small = x if x < y else y" -#: faq/programming.rst:731 +#: faq/programming.rst:732 msgid "" "Before this syntax was introduced in Python 2.5, a common idiom was to use " "logical operators::" @@ -1597,11 +1607,11 @@ msgstr "" "Πριν εισαχθεί αυτή η σύνταξη στην Python 2.5, ένα κοινό ιδίωμα ήταν η χρήση " "λογικών τελεστών::" -#: faq/programming.rst:734 +#: faq/programming.rst:735 msgid "[expression] and [on_true] or [on_false]" msgstr "[έκφραση] and [αληθές] or [ψευδές]" -#: faq/programming.rst:736 +#: faq/programming.rst:737 msgid "" "However, this idiom is unsafe, as it can give wrong results when *on_true* " "has a false boolean value. Therefore, it is always better to use the ``... " @@ -1611,11 +1621,11 @@ msgstr "" "αποτελέσματα όταν το *on_true* έχει ψευδή δυαδική τιμή. Επομένως, είναι " "πάντα καλύτερο να χρησιμοποιήσετε τη φόρμα ``... if ... else ...``." -#: faq/programming.rst:742 +#: faq/programming.rst:743 msgid "Is it possible to write obfuscated one-liners in Python?" msgstr "Είναι δυνατόν να γράψουμε ασαφή one-liners στην Python;" -#: faq/programming.rst:744 +#: faq/programming.rst:745 msgid "" "Yes. Usually this is done by nesting :keyword:`lambda` within :keyword:`!" "lambda`. See the following three examples, slightly adapted from Ulf " @@ -1625,7 +1635,7 @@ msgstr "" "keyword:`!lambda`. Δείτε τα ακόλουθα τρία παραδείγματα, ελαφρώς " "προσαρμοσμένα από τον Ulf Bartelt::" -#: faq/programming.rst:747 +#: faq/programming.rst:748 msgid "" "from functools import reduce\n" "\n" @@ -1677,15 +1687,15 @@ msgstr "" "# | |_________________ range on y axis\n" "# |____________________________ range on x axis" -#: faq/programming.rst:771 +#: faq/programming.rst:772 msgid "Don't try this at home, kids!" msgstr "Μην το δοκιμάσετε στο σπίτι, παιδιά!" -#: faq/programming.rst:777 +#: faq/programming.rst:778 msgid "What does the slash(/) in the parameter list of a function mean?" msgstr "Τι σημαίνει η κάθετος(/) στη λίστα παραμέτρων μιας συνάρτησης;" -#: faq/programming.rst:779 +#: faq/programming.rst:780 msgid "" "A slash in the argument list of a function denotes that the parameters prior " "to it are positional-only. Positional-only parameters are the ones without " @@ -1702,7 +1712,7 @@ msgstr "" "είναι μια συνάρτηση που δέχεται μόνο παραμέτρους θέσης. Η τεκμηρίωσή τους " "μοιάζει με αυτό::" -#: faq/programming.rst:786 +#: faq/programming.rst:787 msgid "" ">>> help(divmod)\n" "Help on built-in function divmod in module builtins:\n" @@ -1716,7 +1726,7 @@ msgstr "" "divmod(x, y, /)\n" " Return the tuple (x//y, x%y). Invariant: div*y + mod == x." -#: faq/programming.rst:792 +#: faq/programming.rst:793 msgid "" "The slash at the end of the parameter list means that both parameters are " "positional-only. Thus, calling :func:`divmod` with keyword arguments would " @@ -1726,7 +1736,7 @@ msgstr "" "είναι μόνο θέσης. Επομένως, η κλήση της :func:`divmod` με ορίσματα λέξεων " "κλειδιών θα οδηγούσε σε σφάλμα::" -#: faq/programming.rst:796 +#: faq/programming.rst:797 msgid "" ">>> divmod(x=3, y=4)\n" "Traceback (most recent call last):\n" @@ -1738,15 +1748,15 @@ msgstr "" " File \"\", line 1, in \n" "TypeError: divmod() takes no keyword arguments" -#: faq/programming.rst:803 +#: faq/programming.rst:804 msgid "Numbers and strings" msgstr "Αριθμοί και συμβολοσειρές" -#: faq/programming.rst:806 +#: faq/programming.rst:807 msgid "How do I specify hexadecimal and octal integers?" msgstr "Πώς προσδιορίζω δεκαεξαδικούς ή οκταδικούς ακέραιους αριθμούς;" -#: faq/programming.rst:808 +#: faq/programming.rst:809 msgid "" "To specify an octal digit, precede the octal value with a zero, and then a " "lower or uppercase \"o\". For example, to set the variable \"a\" to the " @@ -1757,7 +1767,7 @@ msgstr "" "τη μεταβλητή \"a\" στην οκταδική τιμή \"10\" (8 σε δεκαδικό), " "πληκτρολογήστε::" -#: faq/programming.rst:812 +#: faq/programming.rst:813 msgid "" ">>> a = 0o10\n" ">>> a\n" @@ -1767,7 +1777,7 @@ msgstr "" ">>> a\n" "8" -#: faq/programming.rst:816 +#: faq/programming.rst:817 msgid "" "Hexadecimal is just as easy. Simply precede the hexadecimal number with a " "zero, and then a lower or uppercase \"x\". Hexadecimal digits can be " @@ -1778,7 +1788,7 @@ msgstr "" "ψηφία μπορούν να καθοριστούν με πεζά ή κεφαλαία. Για παράδειγμα, στον " "διερμηνέα Python::" -#: faq/programming.rst:820 +#: faq/programming.rst:821 msgid "" ">>> a = 0xa5\n" ">>> a\n" @@ -1794,11 +1804,11 @@ msgstr "" ">>> b\n" "178" -#: faq/programming.rst:829 +#: faq/programming.rst:830 msgid "Why does -22 // 10 return -3?" msgstr "Γιατί το -22 // 10 επιστρέφει -3;" -#: faq/programming.rst:831 +#: faq/programming.rst:832 msgid "" "It's primarily driven by the desire that ``i % j`` have the same sign as " "``j``. If you want that, and also want::" @@ -1806,11 +1816,11 @@ msgstr "" "Οφείλεται κυρίως στην επιθυμία που το ``i % j`` να έχει το ίδιο πρόσημο με " "το ``j``. Εάν το θέλετε αυτό, και θέλετε επίσης::" -#: faq/programming.rst:834 +#: faq/programming.rst:835 msgid "i == (i // j) * j + (i % j)" msgstr "i == (i // j) * j + (i % j)" -#: faq/programming.rst:836 +#: faq/programming.rst:837 msgid "" "then integer division has to return the floor. C also requires that " "identity to hold, and then compilers that truncate ``i // j`` need to make " @@ -1821,7 +1831,7 @@ msgstr "" "μεταγλωττιστές που περικόπτουν το ``i // j`` πρέπει να κάνουν το ``i % j`` " "να έχει το ίδιο πρόσημο με το ``i``." -#: faq/programming.rst:840 +#: faq/programming.rst:841 msgid "" "There are few real use cases for ``i % j`` when ``j`` is negative. When " "``j`` is positive, there are many, and in virtually all of them it's more " @@ -1835,12 +1845,12 @@ msgstr "" "10 τι έλεγε πριν από 200 ώρες; ``-190 % 12 == 2`` είναι χρήσιμο∙ το ``-190 % " "12 == -10`` είναι ένα σφάλμα που περιμένει να δαγκώσει." -#: faq/programming.rst:848 +#: faq/programming.rst:849 msgid "How do I get int literal attribute instead of SyntaxError?" msgstr "" "Πώς μπορώ να πάρω το literal χαρακτηριστικό int αντί για το SyntaxError;" -#: faq/programming.rst:850 +#: faq/programming.rst:851 msgid "" "Trying to lookup an ``int`` literal attribute in the normal manner gives a :" "exc:`SyntaxError` because the period is seen as a decimal point::" @@ -1849,7 +1859,7 @@ msgstr "" "τρόπο δίνει ένα :exc:`SyntaxError` επειδή η περίοδος θεωρείται ως " "υποδιαστολή::" -#: faq/programming.rst:853 +#: faq/programming.rst:854 msgid "" ">>> 1.__class__\n" " File \"\", line 1\n" @@ -1863,7 +1873,7 @@ msgstr "" " ^\n" "SyntaxError: invalid decimal literal" -#: faq/programming.rst:859 +#: faq/programming.rst:860 msgid "" "The solution is to separate the literal from the period with either a space " "or parentheses." @@ -1871,22 +1881,23 @@ msgstr "" "Η λύση είναι να διαχωριστεί το literal από την τελεία είτε με κενό είτε με " "παρένθεση." -#: faq/programming.rst:869 +#: faq/programming.rst:870 msgid "How do I convert a string to a number?" msgstr "Πως μετατρέπω μια συμβολοσειρά σε έναν αριθμό;" -#: faq/programming.rst:871 +#: faq/programming.rst:872 +#, fuzzy msgid "" -"For integers, use the built-in :func:`int` type constructor, e.g. " +"For integers, use the built-in :func:`int` type constructor, for example, " "``int('144') == 144``. Similarly, :func:`float` converts to a floating-" -"point number, e.g. ``float('144') == 144.0``." +"point number, for example, ``float('144') == 144.0``." msgstr "" "Για ακέραιους αριθμούς, χρησιμοποιήστε τον ενσωματωμένο κατασκευαστή τύπου :" "func:`int` , π.χ. ``int('144') == 144``. Ομοίως, το :func:`float` " "μετατρέπει σε έναν αριθμός κινητής υποδιαστολής π.χ. ``float('144') == " "144.0``." -#: faq/programming.rst:875 +#: faq/programming.rst:876 msgid "" "By default, these interpret the number as decimal, so that ``int('0144') == " "144`` holds true, and ``int('0x144')`` raises :exc:`ValueError`. " @@ -1903,7 +1914,7 @@ msgstr "" "Python: ένα αρχικό '0o' υποδηλώνει οκταδικό , και το '0x' δείχνει έναν " "δεκαεξαδικό αριθμό." -#: faq/programming.rst:882 +#: faq/programming.rst:883 msgid "" "Do not use the built-in function :func:`eval` if all you need is to convert " "strings to numbers. :func:`eval` will be significantly slower and it " @@ -1920,29 +1931,31 @@ msgstr "" "``__import__('os').system(\"rm -rf $HOME\")`` το οποίο θα διαγράψει το home " "φάκελο." -#: faq/programming.rst:889 +#: faq/programming.rst:890 +#, fuzzy msgid "" ":func:`eval` also has the effect of interpreting numbers as Python " -"expressions, so that e.g. ``eval('09')`` gives a syntax error because Python " -"does not allow leading '0' in a decimal number (except '0')." +"expressions, so that, for example, ``eval('09')`` gives a syntax error " +"because Python does not allow leading '0' in a decimal number (except '0')." msgstr "" ":func:`eval` έχει επίσης ως αποτέλεσμα την ερμηνεία των αριθμών ως εκφράσεις " "Python, έτσι ώστε π.χ. το ``eval('09')`` δίνει ένα συντακτικό σφάλμα επειδή " "η Python δεν επιτρέπει την εισαγωγή του '0' σε έναν δεκαδικό αριθμό (εκτός " "'0')." -#: faq/programming.rst:895 +#: faq/programming.rst:896 msgid "How do I convert a number to a string?" msgstr "Πως μετατρέπω έναν αριθμό σε συμβολοσειρά;" -#: faq/programming.rst:897 +#: faq/programming.rst:898 +#, fuzzy msgid "" -"To convert, e.g., the number ``144`` to the string ``'144'``, use the built-" -"in type constructor :func:`str`. If you want a hexadecimal or octal " +"For example, to convert the number ``144`` to the string ``'144'``, use the " +"built-in type constructor :func:`str`. If you want a hexadecimal or octal " "representation, use the built-in functions :func:`hex` or :func:`oct`. For " "fancy formatting, see the :ref:`f-strings` and :ref:`formatstrings` " -"sections, e.g. ``\"{:04d}\".format(144)`` yields ``'0144'`` and ``\"{:.3f}\"." -"format(1.0/3.0)`` yields ``'0.333'``." +"sections. For example, ``\"{:04d}\".format(144)`` yields ``'0144'`` and " +"``\"{:.3f}\".format(1.0/3.0)`` yields ``'0.333'``." msgstr "" "Για να μετατρέψετε, πχ τον αριθμό ``144`` στη συμβολοσειρά ``'144'``, " "χρησιμοποιείστε τον ενσωματωμένο τύπο κατασκευής :func:`str`. Εάν θέλετε " @@ -1952,16 +1965,17 @@ msgstr "" "format(144)`` αποδίδει ``'0144'`` και ``\"{:.3f}\".format(1.0/3.0)`` " "αποδίδει ``'0.333'``." -#: faq/programming.rst:906 +#: faq/programming.rst:907 msgid "How do I modify a string in place?" msgstr "Πώς μπορώ να τροποποιήσω μια συμβολοσειρά στη θέση της;" -#: faq/programming.rst:908 +#: faq/programming.rst:909 +#, fuzzy msgid "" "You can't, because strings are immutable. In most situations, you should " "simply construct a new string from the various parts you want to assemble it " "from. However, if you need an object with the ability to modify in-place " -"unicode data, try using an :class:`io.StringIO` object or the :mod:`array` " +"Unicode data, try using an :class:`io.StringIO` object or the :mod:`array` " "module::" msgstr "" "Δεν μπορείτε, γιατί οι συμβολοσειρές είναι αμετάβλητες. Στις περισσότερες " @@ -1971,7 +1985,7 @@ msgstr "" "δοκιμάστε να χρησιμοποιήσετε ένα αντικείμενο :class:`io.StringIO` ή το " "module :mod:`array`::" -#: faq/programming.rst:914 +#: faq/programming.rst:915 msgid "" ">>> import io\n" ">>> s = \"Hello, world\"\n" @@ -2017,16 +2031,16 @@ msgstr "" ">>> a.tounicode()\n" "'yello, world'" -#: faq/programming.rst:938 +#: faq/programming.rst:939 msgid "How do I use strings to call functions/methods?" msgstr "" "Πως μπορώ να χρησιμοποιήσω συμβολοσειρές για να καλέσω συναρτήσεις/μεθόδους;" -#: faq/programming.rst:940 +#: faq/programming.rst:941 msgid "There are various techniques." msgstr "Υπάρχουν διάφορες τεχνικές." -#: faq/programming.rst:942 +#: faq/programming.rst:943 msgid "" "The best is to use a dictionary that maps strings to functions. The primary " "advantage of this technique is that the strings do not need to match the " @@ -2039,7 +2053,7 @@ msgstr "" "συναρτήσεων. Αυτή είναι επίσης η κύρια τεχνική που χρησιμοποιείται για την " "εξομοίωση μιας κατασκευής πεζών-κεφαλαίων::" -#: faq/programming.rst:947 +#: faq/programming.rst:948 msgid "" "def a():\n" " pass\n" @@ -2061,11 +2075,11 @@ msgstr "" "\n" "dispatch[get_input()]() # Note trailing parens to call function" -#: faq/programming.rst:957 +#: faq/programming.rst:958 msgid "Use the built-in function :func:`getattr`::" msgstr "Χρησιμοποιείστε την ενσωματωμένη συνάρτηση :func:`getattr`::" -#: faq/programming.rst:959 +#: faq/programming.rst:960 msgid "" "import foo\n" "getattr(foo, 'bar')()" @@ -2073,7 +2087,7 @@ msgstr "" "import foo\n" "getattr(foo, 'bar')()" -#: faq/programming.rst:962 +#: faq/programming.rst:963 msgid "" "Note that :func:`getattr` works on any object, including classes, class " "instances, modules, and so on." @@ -2081,12 +2095,12 @@ msgstr "" "Σημειώστε ότι το :func:`getattr` λειτουργεί σε οποιοδήποτε αντικείμενο, " "συμπεριλαμβανομένων κλάσεων, οντοτήτων κλάσεων, modules, και ούτω καθεξής." -#: faq/programming.rst:965 +#: faq/programming.rst:966 msgid "This is used in several places in the standard library, like this::" msgstr "" "Αυτό χρησιμοποιείται σε πολλά σημεία της τυπικής βιβλιοθήκης, όπως αυτό::" -#: faq/programming.rst:967 +#: faq/programming.rst:968 msgid "" "class Foo:\n" " def do_foo(self):\n" @@ -2108,12 +2122,12 @@ msgstr "" "f = getattr(foo_instance, 'do_' + opname)\n" "f()" -#: faq/programming.rst:978 +#: faq/programming.rst:979 msgid "Use :func:`locals` to resolve the function name::" msgstr "" "Χρησιμοποιήστε το :func:`locals` για να επιλύσετε το όνομα της συνάρτησης::" -#: faq/programming.rst:980 +#: faq/programming.rst:981 msgid "" "def myFunc():\n" " print(\"hello\")\n" @@ -2131,7 +2145,7 @@ msgstr "" "f = locals()[fname]\n" "f()" -#: faq/programming.rst:990 +#: faq/programming.rst:991 msgid "" "Is there an equivalent to Perl's ``chomp()`` for removing trailing newlines " "from strings?" @@ -2139,7 +2153,7 @@ msgstr "" "Υπάρχει ισοδύναμο με το Perl's ``chomp()`` για την αφαίρεση των νέων γραμμών " "από τις συμβολοσειρές;" -#: faq/programming.rst:992 +#: faq/programming.rst:993 msgid "" "You can use ``S.rstrip(\"\\r\\n\")`` to remove all occurrences of any line " "terminator from the end of the string ``S`` without removing other trailing " @@ -2153,7 +2167,7 @@ msgstr "" "αντιπροσωπεύει περισσότερες από μία γραμμές στο τέλος, οι terminators " "γραμμής για όλες τις κενές γραμμές θα αφαιρεθούν::" -#: faq/programming.rst:998 +#: faq/programming.rst:999 msgid "" ">>> lines = (\"line 1 \\r\\n\"\n" "... \"\\r\\n\"\n" @@ -2167,7 +2181,7 @@ msgstr "" ">>> lines.rstrip(\"\\n\\r\")\n" "'line 1 '" -#: faq/programming.rst:1004 +#: faq/programming.rst:1005 msgid "" "Since this is typically only desired when reading text one line at a time, " "using ``S.rstrip()`` this way works well." @@ -2175,15 +2189,15 @@ msgstr "" "Δεδομένου ότι αυτό είναι συνήθως επιθυμητό μόνο κατά την ανάγνωση κειμένου " "μία γραμμή τη φορά, η χρήση του ``S.rstrip()`` λειτουργεί καλά." -#: faq/programming.rst:1009 +#: faq/programming.rst:1010 msgid "Is there a ``scanf()`` or ``sscanf()`` equivalent?" msgstr "Υπάρχει αντίστοιχο ``scanf()`` ή ``sscanf()``;" -#: faq/programming.rst:1011 +#: faq/programming.rst:1012 msgid "Not as such." msgstr "Όχι ως τέτοιο." -#: faq/programming.rst:1013 +#: faq/programming.rst:1014 msgid "" "For simple input parsing, the easiest approach is usually to split the line " "into whitespace-delimited words using the :meth:`~str.split` method of " @@ -2200,7 +2214,7 @@ msgstr "" "προαιρετική παράμετρο \"sep\" που είναι χρήσιμη εάν η γραμμή χρησιμοποιεί " "κάτι διαφορετικό από κενό διάστημα ως διαχωριστικό." -#: faq/programming.rst:1019 +#: faq/programming.rst:1020 msgid "" "For more complicated input parsing, regular expressions are more powerful " "than C's ``sscanf`` and better suited for the task." @@ -2208,21 +2222,21 @@ msgstr "" "Για πιο περίπλοκη ανάλυση εισόδου, τα regular expressions είναι πιο ισχυρά " "από τις ``sscanf`` της C και είναι πιο κατάλληλες για την εργασία." -#: faq/programming.rst:1024 +#: faq/programming.rst:1025 msgid "What does ``UnicodeDecodeError`` or ``UnicodeEncodeError`` error mean?" msgstr "Τι σημαίνει το σφάλμα ``UnicodeDecodeError`` ή ``UnicodeEncodeError``;" -#: faq/programming.rst:1026 +#: faq/programming.rst:1027 msgid "See the :ref:`unicode-howto`." msgstr "Βλ το :ref:`unicode-howto`." -#: faq/programming.rst:1032 +#: faq/programming.rst:1033 msgid "Can I end a raw string with an odd number of backslashes?" msgstr "" "Μπορώ να τερματίσω μια ακατέργαστη συμβολοσειρά με περιττό αριθμό " "backslashes;" -#: faq/programming.rst:1034 +#: faq/programming.rst:1035 msgid "" "A raw string ending with an odd number of backslashes will escape the " "string's quote::" @@ -2230,7 +2244,7 @@ msgstr "" "Μια ακατέργαστη συμβολοσειρά που τελειώνει με περιττό αριθμό backslashes θα " "ξεφύγει από το απόσπασμα της συμβολοσειράς::" -#: faq/programming.rst:1036 +#: faq/programming.rst:1037 msgid "" ">>> r'C:\\this\\will\\not\\work\\'\n" " File \"\", line 1\n" @@ -2244,7 +2258,7 @@ msgstr "" " ^\n" "SyntaxError: unterminated string literal (detected at line 1)" -#: faq/programming.rst:1042 +#: faq/programming.rst:1043 msgid "" "There are several workarounds for this. One is to use regular strings and " "double the backslashes::" @@ -2252,7 +2266,7 @@ msgstr "" "Υπάρχουν αρκετές λύσεις για αυτό. Ο ένας είναι να χρησιμοποιήσετε κανονικές " "συμβολοσειρές και να διπλασιάσετε τα backslashes::" -#: faq/programming.rst:1045 +#: faq/programming.rst:1046 msgid "" ">>> 'C:\\\\this\\\\will\\\\work\\\\'\n" "'C:\\\\this\\\\will\\\\work\\\\'" @@ -2260,7 +2274,7 @@ msgstr "" ">>> 'C:\\\\this\\\\will\\\\work\\\\'\n" "'C:\\\\this\\\\will\\\\work\\\\'" -#: faq/programming.rst:1048 +#: faq/programming.rst:1049 msgid "" "Another is to concatenate a regular string containing an escaped backslash " "to the raw string::" @@ -2268,7 +2282,7 @@ msgstr "" "Ένα άλλο είναι να συνδέσετε μια κανονική συμβολοσειρά που περιέχει ένα " "escaped backslash στην ακατέργαστη συμβολοσειρά::" -#: faq/programming.rst:1051 +#: faq/programming.rst:1052 msgid "" ">>> r'C:\\this\\will\\work' '\\\\'\n" "'C:\\\\this\\\\will\\\\work\\\\'" @@ -2276,7 +2290,7 @@ msgstr "" ">>> r'C:\\this\\will\\work' '\\\\'\n" "'C:\\\\this\\\\will\\\\work\\\\'" -#: faq/programming.rst:1054 +#: faq/programming.rst:1055 msgid "" "It is also possible to use :func:`os.path.join` to append a backslash on " "Windows::" @@ -2284,7 +2298,7 @@ msgstr "" "Είναι επίσης δυνατό να χρησιμοποιήσετε το :func:`os.path.join` για να " "προσθέσετε ένα backslash στα Windows::" -#: faq/programming.rst:1056 +#: faq/programming.rst:1057 msgid "" ">>> os.path.join(r'C:\\this\\will\\work', '')\n" "'C:\\\\this\\\\will\\\\work\\\\'" @@ -2292,7 +2306,7 @@ msgstr "" ">>> os.path.join(r'C:\\this\\will\\work', '')\n" "'C:\\\\this\\\\will\\\\work\\\\'" -#: faq/programming.rst:1059 +#: faq/programming.rst:1060 msgid "" "Note that while a backslash will \"escape\" a quote for the purposes of " "determining where the raw string ends, no escaping occurs when interpreting " @@ -2305,7 +2319,7 @@ msgstr "" "Δηλαδή, το backslash παραμένει παρόν στην τιμή της ακατέργαστης " "συμβολοσειράς::" -#: faq/programming.rst:1064 +#: faq/programming.rst:1065 msgid "" ">>> r'backslash\\'preserved'\n" "\"backslash\\\\'preserved\"" @@ -2313,27 +2327,28 @@ msgstr "" ">>> r'backslash\\'preserved'\n" "\"backslash\\\\'preserved\"" -#: faq/programming.rst:1067 +#: faq/programming.rst:1068 msgid "Also see the specification in the :ref:`language reference `." msgstr "Δείτε επίσης την προδιαγραφή στην :ref:`language reference `." -#: faq/programming.rst:1070 +#: faq/programming.rst:1072 msgid "Performance" msgstr "Απόδοση" -#: faq/programming.rst:1073 +#: faq/programming.rst:1075 msgid "My program is too slow. How do I speed it up?" msgstr "Το πρόγραμμα μου είναι πολύ αργό. Πως μπορώ να το επιταχύνω;" -#: faq/programming.rst:1075 +#: faq/programming.rst:1077 +#, fuzzy msgid "" -"That's a tough one, in general. First, here are a list of things to " -"remember before diving further:" +"That's a tough one, in general. First, here is a list of things to remember " +"before diving further:" msgstr "" "Αυτό είναι δύσκολο, γενικά. Πρώτον, εδώ είναι μια λίστα με πράγματα που " "πρέπει να θυμάστε πριν βουτήξετε περαιτέρω::" -#: faq/programming.rst:1078 +#: faq/programming.rst:1080 msgid "" "Performance characteristics vary across Python implementations. This FAQ " "focuses on :term:`CPython`." @@ -2341,7 +2356,7 @@ msgstr "" "Τα χαρακτηριστικά απόδοσης διαφέρουν μεταξύ των υλοποιήσεων Python. Αυτή η " "FAQ εστιάζει στο :term:`CPython`." -#: faq/programming.rst:1080 +#: faq/programming.rst:1082 msgid "" "Behaviour can vary across operating systems, especially when talking about I/" "O or multi-threading." @@ -2349,7 +2364,7 @@ msgstr "" "Η συμπεριφορά μπορεί να διαφέρει μεταξύ των λειτουργικών συστημάτων, ειδικά " "όταν μιλάμε για I/O ή multi-threading." -#: faq/programming.rst:1082 +#: faq/programming.rst:1084 msgid "" "You should always find the hot spots in your program *before* attempting to " "optimize any code (see the :mod:`profile` module)." @@ -2358,7 +2373,7 @@ msgstr "" "επιχειρήσετε να βελτιστοποιήσετε οποιονδήποτε κώδικα (βλ. το module :mod:" "`profile`)." -#: faq/programming.rst:1084 +#: faq/programming.rst:1086 msgid "" "Writing benchmark scripts will allow you to iterate quickly when searching " "for improvements (see the :mod:`timeit` module)." @@ -2366,7 +2381,7 @@ msgstr "" "Η σύνταξη σεναρίων συγκριτικής αξιολόγησης θα σας επιτρέψει να κάνετε " "iterate γρήγορα κατά την αναζήτηση βελτιώσεων (βλ. το module :mod:`timeit`)." -#: faq/programming.rst:1086 +#: faq/programming.rst:1088 msgid "" "It is highly recommended to have good code coverage (through unit testing or " "any other technique) before potentially introducing regressions hidden in " @@ -2376,7 +2391,7 @@ msgstr "" "οποιασδήποτε άλλης τεχνικής) πριν από την πιθανή εισαγωγή κρυμμένων " "παλινδρομήσεων (regressions) σε εξελιγμένες βελτιστοποιήσεις." -#: faq/programming.rst:1090 +#: faq/programming.rst:1092 msgid "" "That being said, there are many tricks to speed up Python code. Here are " "some general principles which go a long way towards reaching acceptable " @@ -2386,7 +2401,7 @@ msgstr "" "Python. Ακολουθούν ορισμένες γενικές αρχές που βοηθούν πολύ στην επίτευξη " "αποδεκτών επιπέδων απόδοσης:" -#: faq/programming.rst:1094 +#: faq/programming.rst:1096 msgid "" "Making your algorithms faster (or changing to faster ones) can yield much " "larger benefits than trying to sprinkle micro-optimization tricks all over " @@ -2396,7 +2411,7 @@ msgstr "" "ταχύτερους) μπορεί να αποφέρει πολύ μεγαλύτερα οφέλη από το να προσπαθείτε " "να σκορπίσετε κόλπα μικρό βελτιστοποίησης σε όλο τον κώδικά σας." -#: faq/programming.rst:1098 +#: faq/programming.rst:1100 msgid "" "Use the right data structures. Study documentation for the :ref:`bltin-" "types` and the :mod:`collections` module." @@ -2404,7 +2419,7 @@ msgstr "" "Χρησιμοποιήστε τις σωστές δομές δεδομένων. Μελετήστε την τεκμηρίωση για το :" "ref:`bltin-types` και το module :mod:`collections`." -#: faq/programming.rst:1101 +#: faq/programming.rst:1103 msgid "" "When the standard library provides a primitive for doing something, it is " "likely (although not guaranteed) to be faster than any alternative you may " @@ -2423,7 +2438,7 @@ msgstr "" "ταξινόμηση (και δείτε το :ref:`sortinghowto` για παραδείγματα μέτριος " "προηγμένης χρήσης)." -#: faq/programming.rst:1109 +#: faq/programming.rst:1111 msgid "" "Abstractions tend to create indirections and force the interpreter to work " "more. If the levels of indirection outweigh the amount of useful work done, " @@ -2438,7 +2453,7 @@ msgstr "" "μορφή μικροσκοπικών συναρτήσεων ή μεθόδων (που είναι επίσης συχνά επιζήμια " "για την αναγνωσιμότητα)." -#: faq/programming.rst:1115 +#: faq/programming.rst:1117 msgid "" "If you have reached the limit of what pure Python can allow, there are tools " "to take you further away. For example, `Cython `_ can " @@ -2459,7 +2474,7 @@ msgstr "" "δεξιότητές σας στον προγραμματισμό C, μπορείτε επίσης να :ref:`write a C " "extension module ` μόνοι σας." -#: faq/programming.rst:1125 +#: faq/programming.rst:1127 msgid "" "The wiki page devoted to `performance tips `_." @@ -2467,13 +2482,13 @@ msgstr "" "Η σελίδα wiki που είναι αφιερωμένη σε `συμβουλές απόδοσης `_." -#: faq/programming.rst:1131 +#: faq/programming.rst:1134 msgid "What is the most efficient way to concatenate many strings together?" msgstr "" "Ποιος είναι ο πιο αποτελεσματικός τρόπος για να συνδέσετε πολλές " "συμβολοσειρές μεταξύ τους;" -#: faq/programming.rst:1133 +#: faq/programming.rst:1136 msgid "" ":class:`str` and :class:`bytes` objects are immutable, therefore " "concatenating many strings together is inefficient as each concatenation " @@ -2485,7 +2500,7 @@ msgstr "" "συνένωση δημιουργεί ένα νέο αντικείμενο. Στη γενική περίπτωση, το συνολικό " "κόστος χρόνου εκτέλεσης είναι τετραγωνικό στο συνολικό μήκος συμβολοσειράς." -#: faq/programming.rst:1138 +#: faq/programming.rst:1141 msgid "" "To accumulate many :class:`str` objects, the recommended idiom is to place " "them into a list and call :meth:`str.join` at the end::" @@ -2494,7 +2509,7 @@ msgstr "" "είναι να τα τοποθετήσετε σε μια λίστα και να καλέσετε το στο :meth:`str." "join` τέλος::" -#: faq/programming.rst:1141 +#: faq/programming.rst:1144 msgid "" "chunks = []\n" "for s in my_strings:\n" @@ -2506,13 +2521,14 @@ msgstr "" " chunks.append(s)\n" "result = ''.join(chunks)" -#: faq/programming.rst:1146 -msgid "(another reasonably efficient idiom is to use :class:`io.StringIO`)" +#: faq/programming.rst:1149 +#, fuzzy +msgid "(Another reasonably efficient idiom is to use :class:`io.StringIO`.)" msgstr "" "(ένα άλλο λογικά αποτελεσματικό ιδίωμα είναι να χρησιμοποιήσετε το :class:" "`io.StringIO`)" -#: faq/programming.rst:1148 +#: faq/programming.rst:1151 msgid "" "To accumulate many :class:`bytes` objects, the recommended idiom is to " "extend a :class:`bytearray` object using in-place concatenation (the ``+=`` " @@ -2522,7 +2538,7 @@ msgstr "" "είναι η επέκταση ενός αντικειμένου :class:`bytearray` χρησιμοποιώντας " "επιτόπια συνένωση (ο τελεστής ``+=``)::" -#: faq/programming.rst:1151 +#: faq/programming.rst:1154 msgid "" "result = bytearray()\n" "for b in my_bytes_objects:\n" @@ -2532,15 +2548,16 @@ msgstr "" "for b in my_bytes_objects:\n" " result += b" -#: faq/programming.rst:1157 -msgid "Sequences (Tuples/Lists)" +#: faq/programming.rst:1160 +#, fuzzy +msgid "Sequences (tuples/lists)" msgstr "Ακολουθίες (Πλειάδες/Λίστες)" -#: faq/programming.rst:1160 +#: faq/programming.rst:1163 msgid "How do I convert between tuples and lists?" msgstr "Πως μπορώ να κάνω μετατροπή μεταξύ πλειάδων και λιστών;" -#: faq/programming.rst:1162 +#: faq/programming.rst:1165 msgid "" "The type constructor ``tuple(seq)`` converts any sequence (actually, any " "iterable) into a tuple with the same items in the same order." @@ -2549,7 +2566,7 @@ msgstr "" "πραγματικότητα οποιοδήποτε iterable) σε πλειάδα με τα ίδια στοιχεία στην " "ίδια σειρά." -#: faq/programming.rst:1165 +#: faq/programming.rst:1168 msgid "" "For example, ``tuple([1, 2, 3])`` yields ``(1, 2, 3)`` and ``tuple('abc')`` " "yields ``('a', 'b', 'c')``. If the argument is a tuple, it does not make a " @@ -2562,7 +2579,7 @@ msgstr "" "φτηνό να καλέσετε το :func:`tuple` όταν δεν είστε σίγουροι ότι ένα " "αντικείμενο είναι ήδη πλειάδα." -#: faq/programming.rst:1170 +#: faq/programming.rst:1173 msgid "" "The type constructor ``list(seq)`` converts any sequence or iterable into a " "list with the same items in the same order. For example, ``list((1, 2, " @@ -2575,11 +2592,11 @@ msgstr "" "``['a', 'b', 'c']``. Αν το όρισμα είναι λίστα, δημιουργεί απλώς ένα " "αντίγραφο όπως θα έκανε το ``seq[:]``." -#: faq/programming.rst:1177 +#: faq/programming.rst:1180 msgid "What's a negative index?" msgstr "Τι είναι αρνητικός δείκτης;" -#: faq/programming.rst:1179 +#: faq/programming.rst:1182 msgid "" "Python sequences are indexed with positive numbers and negative numbers. " "For positive numbers 0 is the first index 1 is the second index and so " @@ -2593,7 +2610,7 @@ msgstr "" "και το -2 είναι ο προτελευταίος (δίπλα στο τελευταίο) δείκτης και ούτω " "καθεξής. Σκεφτείτε το ``seq[-n]`` ως το ίδιο με το ``seq[len(seq)-n]``." -#: faq/programming.rst:1184 +#: faq/programming.rst:1187 msgid "" "Using negative indices can be very convenient. For example ``S[:-1]`` is " "all of the string except for its last character, which is useful for " @@ -2604,15 +2621,15 @@ msgstr "" "οποίος είναι χρήσιμος για την αφαίρεση της νέας γραμμής που ακολουθεί μια " "συμβολοσειρά." -#: faq/programming.rst:1190 +#: faq/programming.rst:1193 msgid "How do I iterate over a sequence in reverse order?" msgstr "Πώς μπορώ να επαναλάβω μια ακολουθία με αντίστροφη σειρά;" -#: faq/programming.rst:1192 +#: faq/programming.rst:1195 msgid "Use the :func:`reversed` built-in function::" msgstr "Χρησιμοποιείστε την ενσωματωμένη συνάρτηση :func:`reversed`::" -#: faq/programming.rst:1194 +#: faq/programming.rst:1197 msgid "" "for x in reversed(sequence):\n" " ... # do something with x ..." @@ -2620,7 +2637,7 @@ msgstr "" "for x in reversed(sequence):\n" " ... # do something with x ..." -#: faq/programming.rst:1197 +#: faq/programming.rst:1200 msgid "" "This won't touch your original sequence, but build a new copy with reversed " "order to iterate over." @@ -2628,21 +2645,21 @@ msgstr "" "Αυτό δεν θα επηρεάσει την αρχική σας ακολουθία, αλλά δημιουργήστε ένα νέο " "αντίγραφο με αντίστροφη σειρά για επανάληψη." -#: faq/programming.rst:1202 +#: faq/programming.rst:1205 msgid "How do you remove duplicates from a list?" msgstr "Πως αφαιρείτε διπλότυπα από μια λίστα;" -#: faq/programming.rst:1204 +#: faq/programming.rst:1207 msgid "See the Python Cookbook for a long discussion of many ways to do this:" msgstr "" "Δείτε το Python Cookbook για μια μακρά συζήτηση σχετικά με πολλούς τρόπους " "για να το κάνετε αυτό:" -#: faq/programming.rst:1206 +#: faq/programming.rst:1209 msgid "https://code.activestate.com/recipes/52560/" msgstr "https://code.activestate.com/recipes/52560/" -#: faq/programming.rst:1208 +#: faq/programming.rst:1211 msgid "" "If you don't mind reordering the list, sort it and then scan from the end of " "the list, deleting duplicates as you go::" @@ -2650,7 +2667,7 @@ msgstr "" "Εάν δεν σας πειράζει να αναδιατάξετε τη λίστα, ταξινομήστε την και μετά " "σαρώστε από το τέλος της λίστας, διαγράφοντας τα διπλότυπα καθώς προχωράτε::" -#: faq/programming.rst:1211 +#: faq/programming.rst:1214 msgid "" "if mylist:\n" " mylist.sort()\n" @@ -2670,19 +2687,20 @@ msgstr "" " else:\n" " last = mylist[i]" -#: faq/programming.rst:1220 +#: faq/programming.rst:1223 +#, fuzzy msgid "" -"If all elements of the list may be used as set keys (i.e. they are all :term:" -"`hashable`) this is often faster ::" +"If all elements of the list may be used as set keys (that is, they are all :" +"term:`hashable`) this is often faster::" msgstr "" "Εάν όλα τα στοιχεία της λίστας μπορούν να χρησιμοποιηθούν ως κλειδιά συνόλου " "(δηλαδή είναι όλα τα :term:`hashable`) αυτό είναι συχνά πιο γρήγορο::" -#: faq/programming.rst:1223 +#: faq/programming.rst:1226 msgid "mylist = list(set(mylist))" msgstr "mylist = list(set(mylist))" -#: faq/programming.rst:1225 +#: faq/programming.rst:1228 msgid "" "This converts the list into a set, thereby removing duplicates, and then " "back into a list." @@ -2690,23 +2708,25 @@ msgstr "" "Αυτό μετατρέπει τη λίστα σε ένα σύνολο, αφαιρώντας έτσι τα διπλότυπα και στη " "συνέχεια ξανά σε λίστα." -#: faq/programming.rst:1230 -msgid "How do you remove multiple items from a list" +#: faq/programming.rst:1233 +#, fuzzy +msgid "How do you remove multiple items from a list?" msgstr "Πως αφαιρείτε πολλαπλά στοιχεία από μία λίστα" -#: faq/programming.rst:1232 +#: faq/programming.rst:1235 +#, fuzzy msgid "" "As with removing duplicates, explicitly iterating in reverse with a delete " "condition is one possibility. However, it is easier and faster to use slice " "replacement with an implicit or explicit forward iteration. Here are three " -"variations.::" +"variations::" msgstr "" "Όπως και με την κατάργηση των διπλότυπων, το ρητό iterating αντίστροφα με " "μια συνθήκη διαγραφής είναι μια πιθανότητα. Ωστόσο, είναι ευκολότερο και " "πιο γρήγορο να χρησιμοποιήσετε την αντικατάσταση τμημάτων με ένα έμμεσο ή " "ρητώς προς τα εμπρός iteration. Ακολουθούν τρεις παραλλαγές::" -#: faq/programming.rst:1237 +#: faq/programming.rst:1240 msgid "" "mylist[:] = filter(keep_function, mylist)\n" "mylist[:] = (x for x in mylist if keep_condition)\n" @@ -2716,23 +2736,23 @@ msgstr "" "mylist[:] = (x for x in mylist if keep_condition)\n" "mylist[:] = [x for x in mylist if keep_condition]" -#: faq/programming.rst:1241 +#: faq/programming.rst:1244 msgid "The list comprehension may be fastest." msgstr "Το comprehension της λίστας μπορεί να είναι ταχύτερο." -#: faq/programming.rst:1245 +#: faq/programming.rst:1248 msgid "How do you make an array in Python?" msgstr "Πως μπορείτε να φτιάξετε έναν πίνακα στην Python;" -#: faq/programming.rst:1247 +#: faq/programming.rst:1250 msgid "Use a list::" msgstr "Χρησιμοποιήστε μια λίστα::" -#: faq/programming.rst:1249 +#: faq/programming.rst:1252 msgid "[\"this\", 1, \"is\", \"an\", \"array\"]" msgstr "[\"αυτή\", 1, \"είναι\", \"μια\", \"λίστα\"]" -#: faq/programming.rst:1251 +#: faq/programming.rst:1254 msgid "" "Lists are equivalent to C or Pascal arrays in their time complexity; the " "primary difference is that a Python list can contain objects of many " @@ -2742,11 +2762,12 @@ msgstr "" "πολυπλοκότητα∙ η κύρια διαφορά είναι ότι μια λίστα Python μπορεί να περιέχει " "αντικείμενα πολλών διαφορετικών τύπων." -#: faq/programming.rst:1254 +#: faq/programming.rst:1257 +#, fuzzy msgid "" "The ``array`` module also provides methods for creating arrays of fixed " "types with compact representations, but they are slower to index than " -"lists. Also note that `NumPy `_ and other third party " +"lists. Also note that `NumPy `_ and other third-party " "packages define array-like structures with various characteristics as well." msgstr "" "Το module ``array`` παρέχει επίσης μεθόδους για τη δημιουργία πινάκων " @@ -2755,18 +2776,18 @@ msgstr "" "org/>`_ και άλλο πακέτα τρίτων, ορίζουν δομές τύπους array με διάφορα " "χαρακτηριστικά επίσης." -#: faq/programming.rst:1260 +#: faq/programming.rst:1263 msgid "" "To get Lisp-style linked lists, you can emulate *cons cells* using tuples::" msgstr "" "Για να λάβετε συνδεδεμένες λίστες τύπου Lisp, μπορείτε να εξομοιώσετε *cons " "κελιά* χρησιμοποιώντας πλειάδες::" -#: faq/programming.rst:1262 +#: faq/programming.rst:1265 msgid "lisp_list = (\"like\", (\"this\", (\"example\", None) ) )" msgstr "lisp_list = (\"όπως\", (\"αυτό\", (\"το παράδειγμα\", None) ) )" -#: faq/programming.rst:1264 +#: faq/programming.rst:1267 msgid "" "If mutability is desired, you could use lists instead of tuples. Here the " "analogue of a Lisp *car* is ``lisp_list[0]`` and the analogue of *cdr* is " @@ -2779,23 +2800,23 @@ msgstr "" "ότι πραγματικά χρειάζεται, γιατί είναι συνήθως πιο αργό και από τη χρήση " "λιστών Python." -#: faq/programming.rst:1273 +#: faq/programming.rst:1276 msgid "How do I create a multidimensional list?" msgstr "Πως φτιάχνω μια πολυδιάστατη λίστα;" -#: faq/programming.rst:1275 +#: faq/programming.rst:1278 msgid "You probably tried to make a multidimensional array like this::" msgstr "Μάλλον προσπαθήσατε να φτιάξετε έναν πολυδιάστατο πίνακα σαν αυτόν::" -#: faq/programming.rst:1277 +#: faq/programming.rst:1280 msgid ">>> A = [[None] * 2] * 3" msgstr ">>> A = [[None] * 2] * 3" -#: faq/programming.rst:1279 +#: faq/programming.rst:1282 msgid "This looks correct if you print it:" msgstr "Αυτό φαίνεται σωστό αν το εκτυπώσετε:" -#: faq/programming.rst:1285 +#: faq/programming.rst:1288 msgid "" ">>> A\n" "[[None, None], [None, None], [None, None]]" @@ -2803,11 +2824,11 @@ msgstr "" ">>> A\n" "[[None, None], [None, None], [None, None]]" -#: faq/programming.rst:1290 +#: faq/programming.rst:1293 msgid "But when you assign a value, it shows up in multiple places:" msgstr "Αλλά όταν εκχωρείτε μια τιμή, εμφανίζεται σε πολλά σημεία:" -#: faq/programming.rst:1296 +#: faq/programming.rst:1299 msgid "" ">>> A[0][0] = 5\n" ">>> A\n" @@ -2817,7 +2838,7 @@ msgstr "" ">>> A\n" "[[5, None], [5, None], [5, None]]" -#: faq/programming.rst:1302 +#: faq/programming.rst:1305 msgid "" "The reason is that replicating a list with ``*`` doesn't create copies, it " "only creates references to the existing objects. The ``*3`` creates a list " @@ -2830,7 +2851,7 @@ msgstr "" "αλλαγές σε μία σειρά θα εμφανίζονται σε όλες τις σειρές, κάτι που σχεδόν " "σίγουρα δεν είναι αυτό που θέλετε." -#: faq/programming.rst:1307 +#: faq/programming.rst:1310 msgid "" "The suggested approach is to create a list of the desired length first and " "then fill in each element with a newly created list::" @@ -2839,7 +2860,7 @@ msgstr "" "επιθυμητό μήκος και στη συνέχεια να συμπληρώσετε κάθε στοιχείο με μια νέα " "λίστα::" -#: faq/programming.rst:1310 +#: faq/programming.rst:1313 msgid "" "A = [None] * 3\n" "for i in range(3):\n" @@ -2849,7 +2870,7 @@ msgstr "" "for i in range(3):\n" " A[i] = [None] * 2" -#: faq/programming.rst:1314 +#: faq/programming.rst:1317 msgid "" "This generates a list containing 3 different lists of length two. You can " "also use a list comprehension::" @@ -2857,7 +2878,7 @@ msgstr "" "Αυτό δημιουργεί μια λίστα που περιέχει 3 διαφορετικές λίστες με μήκος δύο. " "Μπορείτε επίσης να χρησιμοποιήσετε ένα comprehension λίστας::" -#: faq/programming.rst:1317 +#: faq/programming.rst:1320 msgid "" "w, h = 2, 3\n" "A = [[None] * w for i in range(h)]" @@ -2865,7 +2886,7 @@ msgstr "" "w, h = 2, 3\n" "A = [[None] * w for i in range(h)]" -#: faq/programming.rst:1320 +#: faq/programming.rst:1323 msgid "" "Or, you can use an extension that provides a matrix datatype; `NumPy " "`_ is the best known." @@ -2874,22 +2895,23 @@ msgstr "" "δεδομένων μήτρας (matrix)∙ Το `NumPy `_ είναι το πιο " "γνωστό." -#: faq/programming.rst:1325 +#: faq/programming.rst:1328 msgid "How do I apply a method or function to a sequence of objects?" msgstr "" "Πώς μπορώ να εφαρμόσω μια μέθοδο ή μια συνάρτηση σε μια ακολουθία " "αντικειμένων;" -#: faq/programming.rst:1327 +#: faq/programming.rst:1330 +#, fuzzy msgid "" -"To call a method or function and accumulate the return values is a list, a :" +"To call a method or function and accumulate the return values in a list, a :" "term:`list comprehension` is an elegant solution::" msgstr "" "Για να καλέστε μια μέθοδο ή μια συνάρτηση και να συγκεντρώσετε τις " "επιστρεφόμενες τιμές είναι μια λίστα, ένα :term:`list comprehension` είναι " "μια κομψή λύση::" -#: faq/programming.rst:1330 +#: faq/programming.rst:1333 msgid "" "result = [obj.method() for obj in mylist]\n" "\n" @@ -2899,7 +2921,7 @@ msgstr "" "\n" "result = [function(obj) for obj in mylist]" -#: faq/programming.rst:1334 +#: faq/programming.rst:1337 msgid "" "To just run the method or function without saving the return values, a " "plain :keyword:`for` loop will suffice::" @@ -2907,7 +2929,7 @@ msgstr "" "Για να εκτελέσετε απλώς τη μέθοδο ή τη συνάρτηση χωρίς να αποθηκεύσετε τις " "επιστρεφόμενες τιμές, αρκεί ένας απλός βρόχος :keyword:`for`::" -#: faq/programming.rst:1337 +#: faq/programming.rst:1340 msgid "" "for obj in mylist:\n" " obj.method()\n" @@ -2921,14 +2943,14 @@ msgstr "" "for obj in mylist:\n" " function(obj)" -#: faq/programming.rst:1346 +#: faq/programming.rst:1350 msgid "" "Why does a_tuple[i] += ['item'] raise an exception when the addition works?" msgstr "" "Γιατί το a_tuple[i] += ['item'] δημιουργεί μια εξαίρεση όταν λειτουργεί η " "προσθήκη;" -#: faq/programming.rst:1348 +#: faq/programming.rst:1352 msgid "" "This is because of a combination of the fact that augmented assignment " "operators are *assignment* operators, and the difference between mutable and " @@ -2938,7 +2960,7 @@ msgstr "" "εκχώρησης είναι τελεστές *εκχώρησης* και της διαφοράς μεταξύ μεταβλητών και " "αμετάβλητων αντικειμένων στην Python." -#: faq/programming.rst:1352 +#: faq/programming.rst:1356 msgid "" "This discussion applies in general when augmented assignment operators are " "applied to elements of a tuple that point to mutable objects, but we'll use " @@ -2948,11 +2970,11 @@ msgstr "" "εφαρμόζονται σε στοιχεία μιας πλειάδας που δείχνουν σε μεταβλητά " "αντικείμενα, αλλά θα χρησιμοποιήσουμε ``list`` και ``+=`` ως υπόδειγμά μας." -#: faq/programming.rst:1356 +#: faq/programming.rst:1360 msgid "If you wrote::" msgstr "Εάν γράψετε::" -#: faq/programming.rst:1358 +#: faq/programming.rst:1362 msgid "" ">>> a_tuple = (1, 2)\n" ">>> a_tuple[0] += 1\n" @@ -2966,7 +2988,7 @@ msgstr "" " ...\n" "TypeError: 'tuple' object does not support item assignment" -#: faq/programming.rst:1364 +#: faq/programming.rst:1368 msgid "" "The reason for the exception should be immediately clear: ``1`` is added to " "the object ``a_tuple[0]`` points to (``1``), producing the result object, " @@ -2981,7 +3003,7 @@ msgstr "" "πλειάδας, λαμβάνουμε ένα σφάλμα επειδή δεν μπορούμε να αλλάξουμε αυτό που " "δείχνει ένα στοιχείο μιας πλειάδας." -#: faq/programming.rst:1370 +#: faq/programming.rst:1374 msgid "" "Under the covers, what this augmented assignment statement is doing is " "approximately this::" @@ -2989,7 +3011,7 @@ msgstr "" "Κάτω από τα καλύμματα, αυτό που κάνει αυτή η επαυξημένη δήλωση ανάθεσης " "είναι περίπου το εξής::" -#: faq/programming.rst:1373 +#: faq/programming.rst:1377 msgid "" ">>> result = a_tuple[0] + 1\n" ">>> a_tuple[0] = result\n" @@ -3003,7 +3025,7 @@ msgstr "" " ...\n" "TypeError: 'tuple' object does not support item assignment" -#: faq/programming.rst:1379 +#: faq/programming.rst:1383 msgid "" "It is the assignment part of the operation that produces the error, since a " "tuple is immutable." @@ -3011,11 +3033,11 @@ msgstr "" "Είναι το τμήμα ανάθεσης της λειτουργίας που παράγει το σφάλμα, αφού μια " "πλειάδα είναι αμετάβλητη." -#: faq/programming.rst:1382 +#: faq/programming.rst:1386 msgid "When you write something like::" msgstr "Όταν γράφετε κάτι σαν::" -#: faq/programming.rst:1384 +#: faq/programming.rst:1388 msgid "" ">>> a_tuple = (['foo'], 'bar')\n" ">>> a_tuple[0] += ['item']\n" @@ -3029,7 +3051,7 @@ msgstr "" " ...\n" "TypeError: 'tuple' object does not support item assignment" -#: faq/programming.rst:1390 +#: faq/programming.rst:1394 msgid "" "The exception is a bit more surprising, and even more surprising is the fact " "that even though there was an error, the append worked::" @@ -3037,7 +3059,7 @@ msgstr "" "Η εξαίρεση είναι λίγο πιο εκπληκτική, και ακόμη πιο εκπληκτικό είναι το " "γεγονός ότι παρόλο που υπήρχε ένα σφάλμα, το παράρτημα λειτούργησε::" -#: faq/programming.rst:1393 +#: faq/programming.rst:1397 msgid "" ">>> a_tuple[0]\n" "['foo', 'item']" @@ -3045,7 +3067,7 @@ msgstr "" ">>> a_tuple[0]\n" "['foo', 'item']" -#: faq/programming.rst:1396 +#: faq/programming.rst:1400 msgid "" "To see why this happens, you need to know that (a) if an object implements " "an :meth:`~object.__iadd__` magic method, it gets called when the ``+=`` " @@ -3063,7 +3085,7 @@ msgstr "" "λίστα και επιστρέφει τη λίστα. Για αυτό λέμε ότι για λίστες ``+=`` είναι " "μια \"συντομογραφία\" για :meth:`list.extend`::" -#: faq/programming.rst:1404 +#: faq/programming.rst:1408 msgid "" ">>> a_list = []\n" ">>> a_list += [1]\n" @@ -3075,11 +3097,11 @@ msgstr "" ">>> a_list\n" "[1]" -#: faq/programming.rst:1409 +#: faq/programming.rst:1413 msgid "This is equivalent to::" msgstr "Αυτό ισοδυναμεί με::" -#: faq/programming.rst:1411 +#: faq/programming.rst:1415 msgid "" ">>> result = a_list.__iadd__([1])\n" ">>> a_list = result" @@ -3087,7 +3109,7 @@ msgstr "" ">>> result = a_list.__iadd__([1])\n" ">>> a_list = result" -#: faq/programming.rst:1414 +#: faq/programming.rst:1418 msgid "" "The object pointed to by a_list has been mutated, and the pointer to the " "mutated object is assigned back to ``a_list``. The end result of the " @@ -3100,11 +3122,11 @@ msgstr "" "ίδιο αντικείμενο που το ``a_list`` έδειχνε προηγουμένως, αλλά η ανάθεση " "εξακολουθεί να γίνεται." -#: faq/programming.rst:1419 +#: faq/programming.rst:1423 msgid "Thus, in our tuple example what is happening is equivalent to::" msgstr "Έτσι, στο παράδειγμά μας, αυτό που συμβαίνει είναι ισοδύναμο με::" -#: faq/programming.rst:1421 +#: faq/programming.rst:1425 msgid "" ">>> result = a_tuple[0].__iadd__(['item'])\n" ">>> a_tuple[0] = result\n" @@ -3118,7 +3140,7 @@ msgstr "" " ...\n" "TypeError: 'tuple' object does not support item assignment" -#: faq/programming.rst:1427 +#: faq/programming.rst:1431 msgid "" "The :meth:`!__iadd__` succeeds, and thus the list is extended, but even " "though ``result`` points to the same object that ``a_tuple[0]`` already " @@ -3130,7 +3152,7 @@ msgstr "" "``a_tuple[0]``, αυτή η τελική ανάθεση εξακολουθεί να έχει ως αποτέλεσμα ένα " "λάθος, γιατί οι πλειάδες είναι αμετάβλητες." -#: faq/programming.rst:1433 +#: faq/programming.rst:1437 msgid "" "I want to do a complicated sort: can you do a Schwartzian Transform in " "Python?" @@ -3138,7 +3160,7 @@ msgstr "" "Θέλω να κάνω μια περίπλοκη ταξινόμηση: μπορείτε να κάνετε ένα Schwartzian " "Transform στην Python;" -#: faq/programming.rst:1435 +#: faq/programming.rst:1439 msgid "" "The technique, attributed to Randal Schwartz of the Perl community, sorts " "the elements of a list by a metric which maps each element to its \"sort " @@ -3150,7 +3172,7 @@ msgstr "" "στοιχείο στην \" τιμή ταξινόμησης\" του. Στην Python, χρησιμοποιήστε το " "όρισμα ``key`` για τη μέθοδο :meth:`list.sort`::" -#: faq/programming.rst:1439 +#: faq/programming.rst:1443 msgid "" "Isorted = L[:]\n" "Isorted.sort(key=lambda s: int(s[10:15]))" @@ -3158,52 +3180,29 @@ msgstr "" "Isorted = L[:]\n" "Isorted.sort(key=lambda s: int(s[10:15]))" -#: faq/programming.rst:1444 +#: faq/programming.rst:1448 msgid "How can I sort one list by values from another list?" msgstr "" "Πως μπορώ να ταξινομήσω μια λίστα με βάση τις τιμές από μια άλλη λίστα;" -#: faq/programming.rst:1446 +#: faq/programming.rst:1450 +#, fuzzy msgid "" "Merge them into an iterator of tuples, sort the resulting list, and then " -"pick out the element you want. ::" +"pick out the element you want." msgstr "" "Συγχωνεύστε τα σε έναν iterator πλειάδων, ταξινομήστε τη λίστα που προκύπτει " "και, στην συνέχεια επιλέξτε το στοιχείο που θέλετε. ::" -#: faq/programming.rst:1449 -msgid "" -">>> list1 = [\"what\", \"I'm\", \"sorting\", \"by\"]\n" -">>> list2 = [\"something\", \"else\", \"to\", \"sort\"]\n" -">>> pairs = zip(list1, list2)\n" -">>> pairs = sorted(pairs)\n" -">>> pairs\n" -"[(\"I'm\", 'else'), ('by', 'sort'), ('sorting', 'to'), ('what', " -"'something')]\n" -">>> result = [x[1] for x in pairs]\n" -">>> result\n" -"['else', 'sort', 'to', 'something']" -msgstr "" -">>> list1 = [\"τι\", \"κάνω\", \"ταξινόμηση\", \"με\"]\n" -">>> list2 = [\"κάτι\", \"διαφορετικό\", \"του\", \"ταξινομώ\"]\n" -">>> pairs = zip(list1, list2)\n" -">>> pairs = sorted(pairs)\n" -">>> pairs\n" -"[(\"Εγώ\", 'διαφορετικά'), ('από', 'ταξινομώ'), ('ταξινόμηση', 'σε'), ('τι', " -"'κάτι')]\n" -">>> result = [x[1] for x in pairs]\n" -">>> result\n" -"['διαφορετικά', 'ταξινομώ', 'με', 'κάτι']" - -#: faq/programming.rst:1461 +#: faq/programming.rst:1465 msgid "Objects" msgstr "Αντικείμενα" -#: faq/programming.rst:1464 +#: faq/programming.rst:1468 msgid "What is a class?" msgstr "Τι είναι μια κλάση;" -#: faq/programming.rst:1466 +#: faq/programming.rst:1470 msgid "" "A class is the particular object type created by executing a class " "statement. Class objects are used as templates to create instance objects, " @@ -3216,7 +3215,7 @@ msgstr "" "τα δεδομένα (χαρακτηριστικά) όσο και τον κώδικα (μεθόδους) ειδικά για έναν " "τύπο δεδομένων." -#: faq/programming.rst:1470 +#: faq/programming.rst:1474 msgid "" "A class can be based on one or more other classes, called its base " "class(es). It then inherits the attributes and methods of its base classes. " @@ -3234,11 +3233,11 @@ msgstr "" "``OutlookMailbox`` που χειρίζονται διάφορες συγκεκριμένες μορφές " "γραμματοκιβωτίου." -#: faq/programming.rst:1479 +#: faq/programming.rst:1483 msgid "What is a method?" msgstr "Τι είναι μια μέθοδος;" -#: faq/programming.rst:1481 +#: faq/programming.rst:1485 msgid "" "A method is a function on some object ``x`` that you normally call as ``x." "name(arguments...)``. Methods are defined as functions inside the class " @@ -3248,7 +3247,7 @@ msgstr "" "καλείτε ως ``x.name(ορίσματα...)``. Οι μέθοδοι ορίζονται ως συναρτήσεις " "εντός του ορισμού κλάσης::" -#: faq/programming.rst:1485 +#: faq/programming.rst:1489 msgid "" "class C:\n" " def meth(self, arg):\n" @@ -3258,11 +3257,11 @@ msgstr "" " def meth(self, arg):\n" " return arg * 2 + self.attribute" -#: faq/programming.rst:1491 +#: faq/programming.rst:1495 msgid "What is self?" msgstr "Τι είναι το self;" -#: faq/programming.rst:1493 +#: faq/programming.rst:1497 msgid "" "Self is merely a conventional name for the first argument of a method. A " "method defined as ``meth(self, a, b, c)`` should be called as ``x.meth(a, b, " @@ -3275,11 +3274,11 @@ msgstr "" "εμφανίζεται ο ορισμός∙ η καλούμενη μέθοδος θα ονομάζεται ``meth(x, a, b, " "c)``." -#: faq/programming.rst:1498 +#: faq/programming.rst:1502 msgid "See also :ref:`why-self`." msgstr "Βλ. επίσης :ref:`why-self`." -#: faq/programming.rst:1502 +#: faq/programming.rst:1506 msgid "" "How do I check if an object is an instance of a given class or of a subclass " "of it?" @@ -3287,14 +3286,15 @@ msgstr "" "Πώς μπορώ να ελέγξω εάν ένα αντικείμενο είναι μια οντότητα μιας δεδομένης " "κλάσης ή μιας υποκλάσης της;" -#: faq/programming.rst:1504 +#: faq/programming.rst:1508 +#, fuzzy msgid "" "Use the built-in function :func:`isinstance(obj, cls) `. You " "can check if an object is an instance of any of a number of classes by " -"providing a tuple instead of a single class, e.g. ``isinstance(obj, (class1, " -"class2, ...))``, and can also check whether an object is one of Python's " -"built-in types, e.g. ``isinstance(obj, str)`` or ``isinstance(obj, (int, " -"float, complex))``." +"providing a tuple instead of a single class, for example, ``isinstance(obj, " +"(class1, class2, ...))``, and can also check whether an object is one of " +"Python's built-in types, for example, ``isinstance(obj, str)`` or " +"``isinstance(obj, (int, float, complex))``." msgstr "" "Χρησιμοποιήστε την ενσωματωμένη συνάρτηση :func:`isinstance(obj, cls) " "`. Μπορείτε να ελέγξετε εάν ένα αντικείμενο είναι μια παρουσία " @@ -3304,12 +3304,14 @@ msgstr "" "ενσωματωμένους τύπους της Python, π.χ. ``isinstance(obj, str)`` ή " "``isinstance(obj, (int, float, complex))``." -#: faq/programming.rst:1511 +#: faq/programming.rst:1515 +#, fuzzy msgid "" "Note that :func:`isinstance` also checks for virtual inheritance from an :" "term:`abstract base class`. So, the test will return ``True`` for a " "registered class even if hasn't directly or indirectly inherited from it. " -"To test for \"true inheritance\", scan the :term:`MRO` of the class:" +"To test for \"true inheritance\", scan the :term:`method resolution order` " +"(MRO) of the class:" msgstr "" "Λάβετε υπόψη ότι το :func:`isinstance` ελέγχει επίσης για εικονική " "κληρονομικότητα από μια :term:`abstract base class`. Έτσι, η δοκιμή θα " @@ -3317,7 +3319,7 @@ msgstr "" "κληρονομήσει άμεσα ή έμμεσα από αυτό. Για να ελέγξετε μια \"αληθινή " "κληρονομικότητα\", σαρώστε το :term:`MRO` της κλάσης::" -#: faq/programming.rst:1516 +#: faq/programming.rst:1521 msgid "" "from collections.abc import Mapping\n" "\n" @@ -3339,7 +3341,7 @@ msgstr "" "\n" "Mapping.register(P)" -#: faq/programming.rst:1528 +#: faq/programming.rst:1533 msgid "" ">>> c = C()\n" ">>> isinstance(c, C) # direct\n" @@ -3372,7 +3374,7 @@ msgstr "" "# Test for \"true inheritance\"\n" ">>> Mapping in type(c).__mro__\n" -#: faq/programming.rst:1546 +#: faq/programming.rst:1551 msgid "" "Note that most programs do not use :func:`isinstance` on user-defined " "classes very often. If you are developing the classes yourself, a more " @@ -3389,7 +3391,7 @@ msgstr "" "διαφορετικό με βάση την κλάση που είναι, για παράδειγμα, εάν έχετε μια " "συνάρτηση που κάνει κάτι::" -#: faq/programming.rst:1553 +#: faq/programming.rst:1558 msgid "" "def search(obj):\n" " if isinstance(obj, Mailbox):\n" @@ -3405,7 +3407,7 @@ msgstr "" " ... # code to search a document\n" " elif ..." -#: faq/programming.rst:1560 +#: faq/programming.rst:1565 msgid "" "A better approach is to define a ``search()`` method on all the classes and " "just call it::" @@ -3413,7 +3415,7 @@ msgstr "" "Μια καλύτερη προσέγγιση είναι να ορίσετε μια μέθοδο ``search()`` σε όλες τις " "κλάσεις και απλώς να την καλέσετε::" -#: faq/programming.rst:1563 +#: faq/programming.rst:1568 msgid "" "class Mailbox:\n" " def search(self):\n" @@ -3435,13 +3437,14 @@ msgstr "" "\n" "obj.search()" -#: faq/programming.rst:1575 +#: faq/programming.rst:1580 msgid "What is delegation?" msgstr "Τι είναι το delegation;" -#: faq/programming.rst:1577 +#: faq/programming.rst:1582 +#, fuzzy msgid "" -"Delegation is an object oriented technique (also called a design pattern). " +"Delegation is an object-oriented technique (also called a design pattern). " "Let's say you have an object ``x`` and want to change the behaviour of just " "one of its methods. You can create a new class that provides a new " "implementation of the method you're interested in changing and delegates all " @@ -3454,7 +3457,7 @@ msgstr "" "σας ενδιαφέρει να αλλάξετε και εκχωρεί όλες τις άλλες μεθόδους στην " "αντίστοιχη μέθοδο του ``x``." -#: faq/programming.rst:1583 +#: faq/programming.rst:1588 msgid "" "Python programmers can easily implement delegation. For example, the " "following class implements a class that behaves like a file but converts all " @@ -3464,7 +3467,7 @@ msgstr "" "παράδειγμα, η ακόλουθη κλάση υλοποιεί μια κλάση που συμπεριφέρεται σαν " "αρχείο αλλά μετατρέπει όλα τα γραπτά δεδομένα σε κεφαλαία::" -#: faq/programming.rst:1587 +#: faq/programming.rst:1592 msgid "" "class UpperOut:\n" "\n" @@ -3488,7 +3491,7 @@ msgstr "" " def __getattr__(self, name):\n" " return getattr(self._outfile, name)" -#: faq/programming.rst:1598 +#: faq/programming.rst:1603 msgid "" "Here the ``UpperOut`` class redefines the ``write()`` method to convert the " "argument string to uppercase before calling the underlying ``self._outfile." @@ -3505,7 +3508,7 @@ msgstr "" "language reference ` για περισσότερες πληροφορίες σχετικά " "με τον έλεγχο της πρόσβασης." -#: faq/programming.rst:1605 +#: faq/programming.rst:1610 msgid "" "Note that for more general cases delegation can get trickier. When " "attributes must be set as well as retrieved, the class must define a :meth:" @@ -3519,7 +3522,7 @@ msgstr "" "πρέπει να το κάνει προσεκτικά. Η βασική υλοποίηση του :meth:`!__setattr__` " "είναι περίπου ισοδύναμο με το εξής::" -#: faq/programming.rst:1610 +#: faq/programming.rst:1615 msgid "" "class X:\n" " ...\n" @@ -3533,7 +3536,7 @@ msgstr "" " self.__dict__[name] = value\n" " ..." -#: faq/programming.rst:1616 +#: faq/programming.rst:1621 msgid "" "Many :meth:`~object.__setattr__` implementations call :meth:`!object." "__setattr__` to set an attribute on self without causing infinite recursion::" @@ -3542,7 +3545,7 @@ msgstr "" "__setattr__` για να θέσουν μια μεταβλητή στον εαυτό τους χωρίς να προκαλούν " "άπειρη αναδρομή." -#: faq/programming.rst:1619 +#: faq/programming.rst:1624 msgid "" "class X:\n" " def __setattr__(self, name, value):\n" @@ -3554,7 +3557,7 @@ msgstr "" " # Custom logic here...\n" " object.__setattr__(self, name, value)" -#: faq/programming.rst:1624 +#: faq/programming.rst:1629 msgid "" "Alternatively, it is possible to set attributes by inserting entries into :" "attr:`self.__dict__ ` directly." @@ -3562,7 +3565,7 @@ msgstr "" "Εναλλακτικά, είναι δυνατό να ορίσετε χαρακτηριστικά εισάγοντας καταχωρήσεις " "στο :attr:`self.__dict__ ` απευθείας." -#: faq/programming.rst:1629 +#: faq/programming.rst:1634 msgid "" "How do I call a method defined in a base class from a derived class that " "extends it?" @@ -3570,11 +3573,11 @@ msgstr "" "Πώς μπορώ να καλέσω μια μέθοδο που ορίζεται σε μια βασική κλάση από μια " "παράγωγη κλάση που την επεκτείνει;" -#: faq/programming.rst:1631 +#: faq/programming.rst:1636 msgid "Use the built-in :func:`super` function::" msgstr "Χρησιμοποιήστε την ενσωματωμένη συνάρτηση :func:`super`::" -#: faq/programming.rst:1633 +#: faq/programming.rst:1638 msgid "" "class Derived(Base):\n" " def meth(self):\n" @@ -3584,7 +3587,7 @@ msgstr "" " def meth(self):\n" " super().meth() # calls Base.meth" -#: faq/programming.rst:1637 +#: faq/programming.rst:1642 msgid "" "In the example, :func:`super` will automatically determine the instance from " "which it was called (the ``self`` value), look up the :term:`method " @@ -3596,18 +3599,19 @@ msgstr "" "order` (MRO) με ``type(self).__mro__``, και επιστρέψτε το επόμενο στη σειρά " "μετά το ``Derived`` στο MRO: ``Base``." -#: faq/programming.rst:1644 +#: faq/programming.rst:1649 msgid "How can I organize my code to make it easier to change the base class?" msgstr "" "Πως μπορώ να οργανώσω τον κώδικα μου προκειμένου να διευκολύνω την αλλαγή " "της βασικής κλάσης;" -#: faq/programming.rst:1646 +#: faq/programming.rst:1651 +#, fuzzy msgid "" "You could assign the base class to an alias and derive from the alias. Then " "all you have to change is the value assigned to the alias. Incidentally, " -"this trick is also handy if you want to decide dynamically (e.g. depending " -"on availability of resources) which base class to use. Example::" +"this trick is also handy if you want to decide dynamically (such as " +"depending on availability of resources) which base class to use. Example::" msgstr "" "Θα μπορούσατε να αντιστοιχίσετε τη βασική κλάση σε ένα ψευδώνυμο και να " "προκύψει το ψευδώνυμο. Στην συνέχεια, το μόνο που πρέπει να αλλάξετε είναι " @@ -3615,7 +3619,7 @@ msgstr "" "επίσης χρήσιμο εάν θέλετε να αποφασίσετε δυναμικά (π.χ. ανάλογα με την " "διαθεσιμότητα των πόρων) ποια βασική κλάση να χρησιμοποιήσετε Παράδειγμα::" -#: faq/programming.rst:1651 +#: faq/programming.rst:1656 msgid "" "class Base:\n" " ...\n" @@ -3633,11 +3637,11 @@ msgstr "" "class Derived(BaseAlias):\n" " ..." -#: faq/programming.rst:1661 +#: faq/programming.rst:1666 msgid "How do I create static class data and static class methods?" msgstr "Πως δημιουργώ δεδομένα στατικής κλάσης και μεθόδους στατικής κλάσης;" -#: faq/programming.rst:1663 +#: faq/programming.rst:1668 msgid "" "Both static data and static methods (in the sense of C++ or Java) are " "supported in Python." @@ -3645,7 +3649,7 @@ msgstr "" "Τόσο τα στατιστικά δεδομένα όσο και οι στατικές μέθοδοι (με την έννοια της C+" "+ ή της Java) υποστηρίζονται στην Python." -#: faq/programming.rst:1666 +#: faq/programming.rst:1671 msgid "" "For static data, simply define a class attribute. To assign a new value to " "the attribute, you have to explicitly use the class name in the assignment::" @@ -3654,7 +3658,7 @@ msgstr "" "εκχωρήσετε μια νέα τιμή στο χαρακτηριστικό, πρέπει να χρησιμοποιήσετε ρητά " "το όνομα κλάσης στην εκχώρηση::" -#: faq/programming.rst:1669 +#: faq/programming.rst:1674 msgid "" "class C:\n" " count = 0 # number of times C.__init__ called\n" @@ -3674,7 +3678,7 @@ msgstr "" " def getcount(self):\n" " return C.count # or return self.count" -#: faq/programming.rst:1678 +#: faq/programming.rst:1683 msgid "" "``c.count`` also refers to ``C.count`` for any ``c`` such that " "``isinstance(c, C)`` holds, unless overridden by ``c`` itself or by some " @@ -3685,7 +3689,7 @@ msgstr "" "``c`` ή από κάποια κλάση στη διαδρομή αναζήτησης της βασικής κλάσης από το " "``c.__class__`` πίσω στο ``C``." -#: faq/programming.rst:1682 +#: faq/programming.rst:1687 msgid "" "Caution: within a method of C, an assignment like ``self.count = 42`` " "creates a new and unrelated instance named \"count\" in ``self``'s own " @@ -3697,15 +3701,15 @@ msgstr "" "dict του ``self``. Επανασύνδεση μιας κλάσης-στατικής όνομα δεδομένων πρέπει " "πάντα να προσδιορίζει την κλάση είτε βρίσκεται μέσα σε μια μέθοδο είτε όχι::" -#: faq/programming.rst:1687 +#: faq/programming.rst:1692 msgid "C.count = 314" msgstr "C.count = 314" -#: faq/programming.rst:1689 +#: faq/programming.rst:1694 msgid "Static methods are possible::" msgstr "Οι στατικές μέθοδοι είναι δυνατές::" -#: faq/programming.rst:1691 +#: faq/programming.rst:1696 msgid "" "class C:\n" " @staticmethod\n" @@ -3719,7 +3723,7 @@ msgstr "" " # No 'self' parameter!\n" " ..." -#: faq/programming.rst:1697 +#: faq/programming.rst:1702 msgid "" "However, a far more straightforward way to get the effect of a static method " "is via a simple module-level function::" @@ -3727,7 +3731,7 @@ msgstr "" "Ωστόσο, ένας πολύ πιο απλός τρόπος για να λάβετε το αποτέλεσμα μιας στατικής " "μεθόδου είναι μέσω μιας απλής συνάρτησης σε επίπεδο μονάδας::" -#: faq/programming.rst:1700 +#: faq/programming.rst:1705 msgid "" "def getcount():\n" " return C.count" @@ -3735,7 +3739,7 @@ msgstr "" "def getcount():\n" " return C.count" -#: faq/programming.rst:1703 +#: faq/programming.rst:1708 msgid "" "If your code is structured so as to define one class (or tightly related " "class hierarchy) per module, this supplies the desired encapsulation." @@ -3744,11 +3748,11 @@ msgstr "" "συνδεδεμένη ιεραρχίας κλάσεων) ανά module, αυτό παρέχει την επιθυμητή " "ενθυλάκωση." -#: faq/programming.rst:1708 +#: faq/programming.rst:1713 msgid "How can I overload constructors (or methods) in Python?" msgstr "Πως μπορώ να υπερφορτώσω κατασκευαστές (ή μεθόδους) στην Python;" -#: faq/programming.rst:1710 +#: faq/programming.rst:1715 msgid "" "This answer actually applies to all methods, but the question usually comes " "up first in the context of constructors." @@ -3756,11 +3760,12 @@ msgstr "" "Αυτή η απάντηση ισχύει στην πραγματικότητα για όλες τις μεθόδους, αλλά η " "ερώτηση συνήθως εμφανίζεται πρώτη στο πλαίσιο των κατασκευαστών." -#: faq/programming.rst:1713 -msgid "In C++ you'd write" +#: faq/programming.rst:1718 +#, fuzzy +msgid "In C++ you'd write:" msgstr "Στην C++ θα γράφατε" -#: faq/programming.rst:1715 +#: faq/programming.rst:1720 msgid "" "class C {\n" " C() { cout << \"No arguments\\n\"; }\n" @@ -3772,7 +3777,7 @@ msgstr "" " C(int i) { cout << \"Argument is \" << i << \"\\n\"; }\n" "}" -#: faq/programming.rst:1722 +#: faq/programming.rst:1727 msgid "" "In Python you have to write a single constructor that catches all cases " "using default arguments. For example::" @@ -3780,7 +3785,7 @@ msgstr "" "Στην Python πρέπει να γράψετε έναν μοναδικό κατασκευαστή που να πιάνει όλες " "τις περιπτώσεις χρησιμοποιώντας προεπιλεγμένα ορίσματα. Για παράδειγμα::" -#: faq/programming.rst:1725 +#: faq/programming.rst:1730 msgid "" "class C:\n" " def __init__(self, i=None):\n" @@ -3796,17 +3801,18 @@ msgstr "" " else:\n" " print(\"Argument is\", i)" -#: faq/programming.rst:1732 +#: faq/programming.rst:1737 msgid "This is not entirely equivalent, but close enough in practice." msgstr "Αυτό δεν είναι εντελώς ισοδύναμο, αλλά αρκετά κοντά στην πράξη." -#: faq/programming.rst:1734 -msgid "You could also try a variable-length argument list, e.g. ::" +#: faq/programming.rst:1739 +#, fuzzy +msgid "You could also try a variable-length argument list, for example::" msgstr "" "Θα μπορούσατε επίσης να δοκιμάσετε μια λίστα ορισμάτων μεταβλητού μήκους, π." "χ. ::" -#: faq/programming.rst:1736 +#: faq/programming.rst:1741 msgid "" "def __init__(self, *args):\n" " ..." @@ -3814,17 +3820,17 @@ msgstr "" "def __init__(self, *args):\n" " ..." -#: faq/programming.rst:1739 +#: faq/programming.rst:1744 msgid "The same approach works for all method definitions." msgstr "Η ίδια προσέγγιση λειτουργεί για όλους τους ορισμούς μεθόδων." -#: faq/programming.rst:1743 +#: faq/programming.rst:1748 msgid "I try to use __spam and I get an error about _SomeClassName__spam." msgstr "" "Προσπαθώ να χρησιμοποιήσω __spam και λαμβάνω ένα σφάλμα σχετικά με το " "_SomeClassName__spam." -#: faq/programming.rst:1745 +#: faq/programming.rst:1750 msgid "" "Variable names with double leading underscores are \"mangled\" to provide a " "simple but effective way to define class private variables. Any identifier " @@ -3840,7 +3846,7 @@ msgstr "" "αντικαθίσταται μέσω κειμένου το ``_classname__spam``, όπου το ``classname`` " "είναι το τρέχον όνομα κλάσης με απογυμνωμένες τυχόν προηγούμενες παύλες." -#: faq/programming.rst:1751 +#: faq/programming.rst:1756 msgid "" "The identifier can be used unchanged within the class, but to access it " "outside the class, the mangled name must be used:" @@ -3849,7 +3855,7 @@ msgstr "" "για πρόσβαση σε αυτό εκτός της κλάσης, πρέπει να χρησιμοποιηθεί το " "παραμορφωμένο όνομα:" -#: faq/programming.rst:1754 +#: faq/programming.rst:1759 msgid "" "class A:\n" " def __one(self):\n" @@ -3875,7 +3881,7 @@ msgstr "" "\n" "four = 4 * A()._A__one()" -#: faq/programming.rst:1768 +#: faq/programming.rst:1773 msgid "" "In particular, this does not guarantee privacy since an outside user can " "still deliberately access the private attribute; many Python programmers " @@ -3886,7 +3892,7 @@ msgstr "" "προγραμματιστές Python δεν μπαίνουν ποτέ στον κόπο να χρησιμοποιήσουν " "ονόματα μεταβλητών." -#: faq/programming.rst:1774 +#: faq/programming.rst:1779 msgid "" "The :ref:`private name mangling specifications ` for " "details and special cases." @@ -3894,16 +3900,16 @@ msgstr "" "Οι :ref:`προδιαφραφές παραποίησης ιδιωτικού ονόματος ` για λεπτομέρειες και ειδικές περιπτώσεις.'" -#: faq/programming.rst:1778 +#: faq/programming.rst:1784 msgid "My class defines __del__ but it is not called when I delete the object." msgstr "" "Η κλάση μου ορίζει __del__ αλλά δεν καλείται όταν διαγράφω το αντικείμενο." -#: faq/programming.rst:1780 +#: faq/programming.rst:1786 msgid "There are several possible reasons for this." msgstr "Υπάρχουν διάφοροι πιθανοί λόγοι για αυτό." -#: faq/programming.rst:1782 +#: faq/programming.rst:1788 msgid "" "The :keyword:`del` statement does not necessarily call :meth:`~object." "__del__` -- it simply decrements the object's reference count, and if this " @@ -3913,18 +3919,19 @@ msgstr "" "απλώς μειώνει τον αριθμό αναφοράς του αντικειμένου, και αν αυτό φτάσει στο " "μηδέν καλείται το :meth:`!__del__`." -#: faq/programming.rst:1786 +#: faq/programming.rst:1792 +#, fuzzy msgid "" -"If your data structures contain circular links (e.g. a tree where each child " -"has a parent reference and each parent has a list of children) the reference " -"counts will never go back to zero. Once in a while Python runs an algorithm " -"to detect such cycles, but the garbage collector might run some time after " -"the last reference to your data structure vanishes, so your :meth:`!__del__` " -"method may be called at an inconvenient and random time. This is " -"inconvenient if you're trying to reproduce a problem. Worse, the order in " -"which object's :meth:`!__del__` methods are executed is arbitrary. You can " -"run :func:`gc.collect` to force a collection, but there *are* pathological " -"cases where objects will never be collected." +"If your data structures contain circular links (for example, a tree where " +"each child has a parent reference and each parent has a list of children) " +"the reference counts will never go back to zero. Once in a while Python " +"runs an algorithm to detect such cycles, but the garbage collector might run " +"some time after the last reference to your data structure vanishes, so your :" +"meth:`!__del__` method may be called at an inconvenient and random time. " +"This is inconvenient if you're trying to reproduce a problem. Worse, the " +"order in which object's :meth:`!__del__` methods are executed is arbitrary. " +"You can run :func:`gc.collect` to force a collection, but there *are* " +"pathological cases where objects will never be collected." msgstr "" "Εάν οι δομές δεδομένων σας περιέχουν κυκλικούς συνδέσμους (π.χ. ένα δέντρο " "όπου κάθε παιδί έχει μια αναφορά γονέα και κάθε γονέας έχει μια λίστα " @@ -3939,7 +3946,7 @@ msgstr "" "μια συλλογή, αλλά *υπάρχουν* παθολογικές περιπτώσεις όπου τα αντικείμενα δεν " "θα συλλεχθούν ποτέ." -#: faq/programming.rst:1797 +#: faq/programming.rst:1803 msgid "" "Despite the cycle collector, it's still a good idea to define an explicit " "``close()`` method on objects to be called whenever you're done with them. " @@ -3956,7 +3963,7 @@ msgstr "" "και το ``close()`` θα πρέπει να βεβαιωθεί ότι μπορεί να κληθεί περισσότερες " "από μία φορές για το ίδιο αντικείμενο." -#: faq/programming.rst:1804 +#: faq/programming.rst:1810 msgid "" "Another way to avoid cyclical references is to use the :mod:`weakref` " "module, which allows you to point to objects without incrementing their " @@ -3969,7 +3976,7 @@ msgstr "" "θα πρέπει να χρησιμοποιούν αδύναμες αναφορές για τις αναφορές γονέων και " "αδελφών ( αν τα χρειαστούν!)." -#: faq/programming.rst:1817 +#: faq/programming.rst:1823 msgid "" "Finally, if your :meth:`!__del__` method raises an exception, a warning " "message is printed to :data:`sys.stderr`." @@ -3977,12 +3984,12 @@ msgstr "" "Τέλος, εάν η μέθοδος :meth:`!__del__` εγείρει μια εξαίρεση, εκτυπώνεται ένα " "προειδοποιητικό μήνυμα στη διεύθυνση :data:`sys.stderr`." -#: faq/programming.rst:1822 +#: faq/programming.rst:1828 msgid "How do I get a list of all instances of a given class?" msgstr "" "Πως μπορώ να λάβω μια λίστα με όλες τις οντότητες μιας δεδομένης κλάσης;" -#: faq/programming.rst:1824 +#: faq/programming.rst:1830 msgid "" "Python does not keep track of all instances of a class (or of a built-in " "type). You can program the class's constructor to keep track of all " @@ -3993,11 +4000,11 @@ msgstr "" "κλάσης να παρακολουθεί όλες τις οντότητες διατηρώντας μια λίστα αδύναμων " "αναφορών σε κάθε παρουσία." -#: faq/programming.rst:1830 +#: faq/programming.rst:1836 msgid "Why does the result of ``id()`` appear to be not unique?" msgstr "Γιατί το αποτέλεσμα του ``id()`` φαίνεται να μην είναι μοναδικό;" -#: faq/programming.rst:1832 +#: faq/programming.rst:1838 msgid "" "The :func:`id` builtin returns an integer that is guaranteed to be unique " "during the lifetime of the object. Since in CPython, this is the object's " @@ -4012,7 +4019,7 @@ msgstr "" "αντικείμενο εκχωρείται στην ίδια θέση στη μνήμη. Αυτό φαίνεται από αυτό το " "παράδειγμα:" -#: faq/programming.rst:1843 +#: faq/programming.rst:1849 msgid "" "The two ids belong to different integer objects that are created before, and " "deleted immediately after execution of the ``id()`` call. To be sure that " @@ -4025,11 +4032,11 @@ msgstr "" "θέλετε να εξετάσετε είναι ακόμα ζωντανά, δημιουργήστε μια άλλη αναφορά στο " "αντικείμενο:" -#: faq/programming.rst:1856 +#: faq/programming.rst:1862 msgid "When can I rely on identity tests with the *is* operator?" msgstr "Πότε μπορώ να βασιστώ σε δοκιμές ταυτότητας με τον τελεστή *is*;" -#: faq/programming.rst:1858 +#: faq/programming.rst:1864 msgid "" "The ``is`` operator tests for object identity. The test ``a is b`` is " "equivalent to ``id(a) == id(b)``." @@ -4037,7 +4044,7 @@ msgstr "" "Ο τελεστής ``is`` ελέγχει την ταυτότητα του αντικειμένου. Η δοκιμή ``a is " "b`` ισοδυναμεί με ``id(a) == id(b)``." -#: faq/programming.rst:1861 +#: faq/programming.rst:1867 msgid "" "The most important property of an identity test is that an object is always " "identical to itself, ``a is a`` always returns ``True``. Identity tests are " @@ -4050,7 +4057,7 @@ msgstr "" "Και σε αντίθεση με τα τεστ ισότητας, τα τεστ ταυτότητας είναι εγγυημένα ότι " "θα επιστρέψουν ένα boolean ``True`` ή ``False``." -#: faq/programming.rst:1866 +#: faq/programming.rst:1872 msgid "" "However, identity tests can *only* be substituted for equality tests when " "object identity is assured. Generally, there are three circumstances where " @@ -4060,7 +4067,7 @@ msgstr "" "όταν είναι εξασφαλισμένη η ταυτότητα αντικειμένου. Γενικά, υπάρχουν τρεις " "περιπτώσεις όπου η ταυτότητα είναι εγγυημένη:" -#: faq/programming.rst:1870 +#: faq/programming.rst:1876 msgid "" "Assignments create new names but do not change object identity. After the " "assignment ``new = old``, it is guaranteed that ``new is old``." @@ -4069,7 +4076,7 @@ msgstr "" "αντικειμένου. Μετά την ανάθεση ``new = old``, είναι εγγυημένο ότι το ``new " "is old``." -#: faq/programming.rst:1873 +#: faq/programming.rst:1879 msgid "" "Putting an object in a container that stores object references does not " "change object identity. After the list assignment ``s[0] = x``, it is " @@ -4079,7 +4086,7 @@ msgstr "" "αντικειμένων δεν αλλάζει την ταυτότητα αντικειμένου. Μετά την ανάθεση " "λίστας ``s[0] = x``, είναι εγγυημένο ότι το ``s[0] is x``." -#: faq/programming.rst:1877 +#: faq/programming.rst:1883 msgid "" "If an object is a singleton, it means that only one instance of that object " "can exist. After the assignments ``a = None`` and ``b = None``, it is " @@ -4090,7 +4097,7 @@ msgstr "" "``b = None``, είναι εγγυημένο ότι το ``a is b`` επειδή το ``None`` είναι " "singleton." -#: faq/programming.rst:1881 +#: faq/programming.rst:1887 msgid "" "In most other circumstances, identity tests are inadvisable and equality " "tests are preferred. In particular, identity tests should not be used to " @@ -4102,11 +4109,12 @@ msgstr "" "να χρησιμοποιούνται για τον έλεγχο σταθερών όπως :class:`int` και :class:" "`str` που δεν είναι εγγυημένα singletons::" -#: faq/programming.rst:1886 +#: faq/programming.rst:1892 +#, fuzzy msgid "" -">>> a = 1000\n" -">>> b = 500\n" -">>> c = b + 500\n" +">>> a = 10_000_000\n" +">>> b = 5_000_000\n" +">>> c = b + 5_000_000\n" ">>> a is c\n" "False\n" "\n" @@ -4128,12 +4136,12 @@ msgstr "" ">>> a is c\n" "False" -#: faq/programming.rst:1898 +#: faq/programming.rst:1904 msgid "Likewise, new instances of mutable containers are never identical::" msgstr "" "Ομοίως, τα νέα στιγμιότυπα μεταβλητών κοντέινερ δεν είναι ποτέ πανομοιότυπα::" -#: faq/programming.rst:1900 +#: faq/programming.rst:1906 msgid "" ">>> a = []\n" ">>> b = []\n" @@ -4145,7 +4153,7 @@ msgstr "" ">>> a is b\n" "False" -#: faq/programming.rst:1905 +#: faq/programming.rst:1911 msgid "" "In the standard library code, you will see several common patterns for " "correctly using identity tests:" @@ -4153,7 +4161,7 @@ msgstr "" "Στον τυπικό κώδικα βιβλιοθήκης, θα δείτε πολλά κοινά μοτίβα για τη σωστή " "χρήση των δοκιμών ταυτότητας:" -#: faq/programming.rst:1908 +#: faq/programming.rst:1914 msgid "" "As recommended by :pep:`8`, an identity test is the preferred way to check " "for ``None``. This reads like plain English in code and avoids confusion " @@ -4164,7 +4172,7 @@ msgstr "" "αγγλικά στον κώδικα και αποφεύγεται η σύγχυση με άλλα αντικείμενα που μπορεί " "να έχουν τιμές boolean που αξιολογούνται ως ψευδείς." -#: faq/programming.rst:1912 +#: faq/programming.rst:1918 msgid "" "Detecting optional arguments can be tricky when ``None`` is a valid input " "value. In those situations, you can create a singleton sentinel object " @@ -4177,7 +4185,7 @@ msgstr "" "θα διαφέρει από άλλα αντικείμενα. Για παράδειγμα, δείτε πως μπορείτε να " "εφαρμόσετε μια μέθοδο που συμπεριφέρεται σαν :meth:`dict.pop`:" -#: faq/programming.rst:1917 +#: faq/programming.rst:1923 msgid "" "_sentinel = object()\n" "\n" @@ -4201,7 +4209,7 @@ msgstr "" " raise KeyError(key)\n" " return default" -#: faq/programming.rst:1930 +#: faq/programming.rst:1936 msgid "" "Container implementations sometimes need to augment equality tests with " "identity tests. This prevents the code from being confused by objects such " @@ -4211,7 +4219,7 @@ msgstr "" "ισότητας με δοκιμές ταυτότητας. Αυτό αποτρέπει τη σύγχυση του κώδικα από " "αντικείμενα όπως το ``float('NaN')`` που είναι ίσα με τα ίδια." -#: faq/programming.rst:1934 +#: faq/programming.rst:1940 msgid "" "For example, here is the implementation of :meth:`!collections.abc.Sequence." "__contains__`::" @@ -4219,7 +4227,7 @@ msgstr "" "Για παράδειγμα, εδώ είναι η υλοποίηση του :meth:`!collections.abc.Sequence." "__contains__`::" -#: faq/programming.rst:1937 +#: faq/programming.rst:1943 msgid "" "def __contains__(self, value):\n" " for v in self:\n" @@ -4233,14 +4241,14 @@ msgstr "" " return True\n" " return False" -#: faq/programming.rst:1945 +#: faq/programming.rst:1951 msgid "" "How can a subclass control what data is stored in an immutable instance?" msgstr "" "Πώς μπορεί μια υποκλάση να ελέγξει ποια δεδομένα αποθηκεύονται σε μια " "αμετάβλητη παρουσία;" -#: faq/programming.rst:1947 +#: faq/programming.rst:1953 msgid "" "When subclassing an immutable type, override the :meth:`~object.__new__` " "method instead of the :meth:`~object.__init__` method. The latter only runs " @@ -4252,7 +4260,7 @@ msgstr "" "εκτελείται μόνο αφού δημιουργηθεί μια παρουσία, η οποία είναι πολύ αργά για " "να αλλάζει δεδομένα σε μια αμετάβλητη περίπτωση." -#: faq/programming.rst:1952 +#: faq/programming.rst:1958 msgid "" "All of these immutable classes have a different signature than their parent " "class:" @@ -4260,11 +4268,12 @@ msgstr "" "Όλες αυτές οι αμετάβλητες κλάσεις έχουν διαφορετική υπογραφή από τη μητρική " "τους κλάση:" -#: faq/programming.rst:1955 +#: faq/programming.rst:1961 +#, fuzzy msgid "" -"from datetime import date\n" +"import datetime as dt\n" "\n" -"class FirstOfMonthDate(date):\n" +"class FirstOfMonthDate(dt.date):\n" " \"Always choose the first day of the month\"\n" " def __new__(cls, year, month, day):\n" " return super().__new__(cls, year, month, 1)\n" @@ -4304,11 +4313,11 @@ msgstr "" " s = ''.join([c for c in s if c.isalnum() or c == '-'])\n" " return super().__new__(cls, s)" -#: faq/programming.rst:1978 +#: faq/programming.rst:1984 msgid "The classes can be used like this:" msgstr "Οι κλάσεις μπορούν να χρησιμοποιηθούν έτσι:" -#: faq/programming.rst:1980 +#: faq/programming.rst:1986 msgid "" ">>> FirstOfMonthDate(2012, 2, 14)\n" "FirstOfMonthDate(2012, 2, 1)\n" @@ -4328,11 +4337,11 @@ msgstr "" ">>> TitleStr('Blog: Why Python Rocks')\n" "'blog-why-python-rocks'" -#: faq/programming.rst:1995 +#: faq/programming.rst:2001 msgid "How do I cache method calls?" msgstr "Πώς μπορώ να αποθηκεύσω τις κλήσεις μεθόδου στην κρυφή μνήμη;" -#: faq/programming.rst:1997 +#: faq/programming.rst:2003 msgid "" "The two principal tools for caching methods are :func:`functools." "cached_property` and :func:`functools.lru_cache`. The former stores results " @@ -4343,17 +4352,18 @@ msgstr "" "Το πρώτο αποθηκεύει τα αποτελέσματα σε επίπεδο παρουσίας και το δεύτερο σε " "επίπεδο κλάσης." -#: faq/programming.rst:2002 +#: faq/programming.rst:2008 +#, fuzzy msgid "" -"The *cached_property* approach only works with methods that do not take any " -"arguments. It does not create a reference to the instance. The cached " +"The ``cached_property`` approach only works with methods that do not take " +"any arguments. It does not create a reference to the instance. The cached " "method result will be kept only as long as the instance is alive." msgstr "" "Η προσέγγιση *cached_property* λειτουργεί μόνο με μεθόδους που δεν λαμβάνουν " "ορίσματα. Δεν δημιουργεί αναφορά στο στιγμιότυπο. Το αποτέλεσμα της cached " "μεθόδους θα διατηρηθεί μόνο όσο το στιγμιότυπο είναι ζωντανό." -#: faq/programming.rst:2006 +#: faq/programming.rst:2012 msgid "" "The advantage is that when an instance is no longer used, the cached method " "result will be released right away. The disadvantage is that if instances " @@ -4366,9 +4376,10 @@ msgstr "" "αποτελέσματα της συσσωρευμένης μεθόδου. Μπορούν να αναπτυχθούν χωρίς " "περιορισμούς." -#: faq/programming.rst:2011 +#: faq/programming.rst:2017 +#, fuzzy msgid "" -"The *lru_cache* approach works with methods that have :term:`hashable` " +"The ``lru_cache`` approach works with methods that have :term:`hashable` " "arguments. It creates a reference to the instance unless special efforts " "are made to pass in weak references." msgstr "" @@ -4376,7 +4387,7 @@ msgstr "" "`hashable`. Δημιουργεί μια αναφορά στο στιγμιότυπο, εκτός εάν καταβληθούν " "ειδικές προσπάθειες για να περάσει σε αδύναμες αναφορές." -#: faq/programming.rst:2015 +#: faq/programming.rst:2021 msgid "" "The advantage of the least recently used algorithm is that the cache is " "bounded by the specified *maxsize*. The disadvantage is that instances are " @@ -4387,11 +4398,11 @@ msgstr "" "είναι ότι τα στιγμιότυπα διατηρούνται ζωντανά έως ότου παλαιώσουν από την " "κρυφή μνήμη ή μέχρι να διαγραφεί η κρυφή μνήμη." -#: faq/programming.rst:2020 +#: faq/programming.rst:2026 msgid "This example shows the various techniques::" msgstr "Αυτό το παράδειγμα δείχνει τις διάφορες τεχνικές::" -#: faq/programming.rst:2022 +#: faq/programming.rst:2028 msgid "" "class Weather:\n" " \"Lookup weather information on a government website\"\n" @@ -4437,10 +4448,11 @@ msgstr "" " \"Rainfall on a given date\"\n" " # Depends on the station_id, date, and units." -#: faq/programming.rst:2044 +#: faq/programming.rst:2050 +#, fuzzy msgid "" "The above example assumes that the *station_id* never changes. If the " -"relevant instance attributes are mutable, the *cached_property* approach " +"relevant instance attributes are mutable, the ``cached_property`` approach " "can't be made to work because it cannot detect changes to the attributes." msgstr "" "Το παραπάνω παράδειγμα προϋποθέτει ότι το *station_id* δεν αλλάζει ποτέ. " @@ -4448,10 +4460,11 @@ msgstr "" "*cached_property* δεν μπορεί να λειτουργήσει επειδή δεν μπορεί να εντοπίσει " "αλλαγές στα χαρακτηριστικά." -#: faq/programming.rst:2049 +#: faq/programming.rst:2055 +#, fuzzy msgid "" -"To make the *lru_cache* approach work when the *station_id* is mutable, the " -"class needs to define the :meth:`~object.__eq__` and :meth:`~object." +"To make the ``lru_cache`` approach work when the *station_id* is mutable, " +"the class needs to define the :meth:`~object.__eq__` and :meth:`~object." "__hash__` methods so that the cache can detect relevant attribute updates::" msgstr "" "Για να λειτουργήσει η προσέγγιση *lru_cache* όταν το *station_id* είναι " @@ -4459,7 +4472,7 @@ msgstr "" "meth:`~object.__hash__` ώστε η κρυφή μνήμη να μπορεί να εντοπίσει σχετικές " "ενημερώσεις χαρακτηριστικών::" -#: faq/programming.rst:2053 +#: faq/programming.rst:2059 msgid "" "class Weather:\n" " \"Example with a mutable station identifier\"\n" @@ -4501,15 +4514,15 @@ msgstr "" " 'Rainfall on a given date'\n" " # Depends on the station_id, date, and units." -#: faq/programming.rst:2075 +#: faq/programming.rst:2081 msgid "Modules" msgstr "Modules" -#: faq/programming.rst:2078 +#: faq/programming.rst:2084 msgid "How do I create a .pyc file?" msgstr "Πως δημιουργώ ένα .pyc αρχείο;" -#: faq/programming.rst:2080 +#: faq/programming.rst:2086 msgid "" "When a module is imported for the first time (or when the source file has " "changed since the current compiled file was created) a ``.pyc`` file " @@ -4528,7 +4541,7 @@ msgstr "" "που εξαρτάται από το συγκεκριμένο δυαδικό αρχείο ``python`` που το " "δημιούργησε. (Βλ. :pep:`3147` για λεπτομέρειες.)" -#: faq/programming.rst:2088 +#: faq/programming.rst:2094 msgid "" "One reason that a ``.pyc`` file may not be created is a permissions problem " "with the directory containing the source file, meaning that the " @@ -4543,11 +4556,12 @@ msgstr "" "ένας χρήστης αλλά εκτελείται ως άλλος, όπως εάν δοκιμάζετε με έναν " "διακομιστή ιστού." -#: faq/programming.rst:2093 +#: faq/programming.rst:2099 +#, fuzzy msgid "" "Unless the :envvar:`PYTHONDONTWRITEBYTECODE` environment variable is set, " "creation of a .pyc file is automatic if you're importing a module and Python " -"has the ability (permissions, free space, etc...) to create a " +"has the ability (permissions, free space, and so on) to create a " "``__pycache__`` subdirectory and write the compiled module to that " "subdirectory." msgstr "" @@ -4557,9 +4571,10 @@ msgstr "" "χώρος, κ.λπ...) να δημιουργήσει ένα ``__pycache__`` υποκατάλογο και γράψτε " "το μεταγλωττισμένο module σε αυτόν τον υποκατάλογο." -#: faq/programming.rst:2098 +#: faq/programming.rst:2104 +#, fuzzy msgid "" -"Running Python on a top level script is not considered an import and no ``." +"Running Python on a top-level script is not considered an import and no ``." "pyc`` will be created. For example, if you have a top-level module ``foo." "py`` that imports another module ``xyz.py``, when you run ``foo`` (by typing " "``python foo.py`` as a shell command), a ``.pyc`` will be created for " @@ -4574,7 +4589,7 @@ msgstr "" "έχει εισαχθεί, αλλά δεν θα δημιουργηθεί αρχείο ``.pyc`` για το ``foo`` καθώς " "το ``foo.py`` δεν εισάγεται." -#: faq/programming.rst:2105 +#: faq/programming.rst:2111 msgid "" "If you need to create a ``.pyc`` file for ``foo`` -- that is, to create a ``." "pyc`` file for a module that is not imported -- you can, using the :mod:" @@ -4585,7 +4600,7 @@ msgstr "" "εισαχθεί -- μπορείτε, χρησιμοποιώντας τα modules :mod:`py_compile` και :mod:" "`compileall`." -#: faq/programming.rst:2109 +#: faq/programming.rst:2115 msgid "" "The :mod:`py_compile` module can manually compile any module. One way is to " "use the ``compile()`` function in that module interactively::" @@ -4594,7 +4609,7 @@ msgstr "" "module. Ένας τρόπος είναι να χρησιμοποιήσετε τη συνάρτηση ``compile()`` σε " "αυτήν την ενότητα διαδραστικά::" -#: faq/programming.rst:2112 +#: faq/programming.rst:2118 msgid "" ">>> import py_compile\n" ">>> py_compile.compile('foo.py')" @@ -4602,17 +4617,18 @@ msgstr "" ">>> import py_compile\n" ">>> py_compile.compile('foo.py')" -#: faq/programming.rst:2115 +#: faq/programming.rst:2121 +#, fuzzy msgid "" "This will write the ``.pyc`` to a ``__pycache__`` subdirectory in the same " "location as ``foo.py`` (or you can override that with the optional parameter " -"``cfile``)." +"*cfile*)." msgstr "" "Αυτό θα γράψει το ``.pyc`` σε έναν υποκατάλογο ``__pycache__`` στην ίδια " "θέση με το ``foo.py`` (ή μπορείτε να το παρακάμψετε με την προαιρετική " "παράμετρο ``cfile``)." -#: faq/programming.rst:2119 +#: faq/programming.rst:2125 msgid "" "You can also automatically compile all files in a directory or directories " "using the :mod:`compileall` module. You can do it from the shell prompt by " @@ -4624,15 +4640,15 @@ msgstr "" "από το shell prompt εκτελώντας το ``compileall.py`` και παρέχοντας τη " "διαδρομή ενός καταλόγου που περιέχει αρχεία Python για μεταγλώττιση::" -#: faq/programming.rst:2124 +#: faq/programming.rst:2130 msgid "python -m compileall ." msgstr "python -m compileall ." -#: faq/programming.rst:2128 +#: faq/programming.rst:2134 msgid "How do I find the current module name?" msgstr "Πως μπορώ να βρω το όνομα του τρέχοντος module;" -#: faq/programming.rst:2130 +#: faq/programming.rst:2136 msgid "" "A module can find out its own module name by looking at the predefined " "global variable ``__name__``. If this has the value ``'__main__'``, the " @@ -4647,7 +4663,7 @@ msgstr "" "γραμμής εντολών ή έναν αυτοέλεγχο και εκτελέστε αυτόν τον κώδικα μόνο αφού " "ελέγξετε το ``__name__``::" -#: faq/programming.rst:2136 +#: faq/programming.rst:2142 msgid "" "def main():\n" " print('Running test...')\n" @@ -4663,19 +4679,19 @@ msgstr "" "if __name__ == '__main__':\n" " main()" -#: faq/programming.rst:2145 +#: faq/programming.rst:2151 msgid "How can I have modules that mutually import each other?" msgstr "Πως μπορώ να έχω modules που εισάγουν αμοιβαία το ένα το άλλο;" -#: faq/programming.rst:2147 +#: faq/programming.rst:2153 msgid "Suppose you have the following modules:" msgstr "Υποθέστε ότι έχετε τα ακόλουθα modules::" -#: faq/programming.rst:2149 +#: faq/programming.rst:2155 msgid ":file:`foo.py`::" msgstr ":file:`foo.py`::" -#: faq/programming.rst:2151 +#: faq/programming.rst:2157 msgid "" "from bar import bar_var\n" "foo_var = 1" @@ -4683,11 +4699,11 @@ msgstr "" "from bar import bar_var\n" "foo_var = 1" -#: faq/programming.rst:2154 +#: faq/programming.rst:2160 msgid ":file:`bar.py`::" msgstr ":file:`bar.py`::" -#: faq/programming.rst:2156 +#: faq/programming.rst:2162 msgid "" "from foo import foo_var\n" "bar_var = 2" @@ -4695,35 +4711,35 @@ msgstr "" "from foo import foo_var\n" "bar_var = 2" -#: faq/programming.rst:2159 +#: faq/programming.rst:2165 msgid "The problem is that the interpreter will perform the following steps:" msgstr "Το πρόβλημα είναι ότι ο διερμηνέας θα εκτελέσει τα ακόλουθα βήματα:" -#: faq/programming.rst:2161 +#: faq/programming.rst:2167 msgid "main imports ``foo``" msgstr "main εισάγει ``foo``" -#: faq/programming.rst:2162 +#: faq/programming.rst:2168 msgid "Empty globals for ``foo`` are created" msgstr "Δημιουργούνται κενά καθολικά για το ``foo``" -#: faq/programming.rst:2163 +#: faq/programming.rst:2169 msgid "``foo`` is compiled and starts executing" msgstr "Το ``foo`` μεταγλωττίζεται και ξεκινά η εκτέλεση" -#: faq/programming.rst:2164 +#: faq/programming.rst:2170 msgid "``foo`` imports ``bar``" msgstr "``foo`` εισάγει ``bar``" -#: faq/programming.rst:2165 +#: faq/programming.rst:2171 msgid "Empty globals for ``bar`` are created" msgstr "Δημιουργούνται κενά καθολικά για ``bar``" -#: faq/programming.rst:2166 +#: faq/programming.rst:2172 msgid "``bar`` is compiled and starts executing" msgstr "Το ``bar`` μεταγλωττίζεται και αρχίζει να εκτελείται" -#: faq/programming.rst:2167 +#: faq/programming.rst:2173 msgid "" "``bar`` imports ``foo`` (which is a no-op since there already is a module " "named ``foo``)" @@ -4731,7 +4747,7 @@ msgstr "" "Το ``bar`` εισάγει το ``foo`` (το οποίο είναι απαγορευτικό, καθώς υπάρχει " "ήδη ένα module με το όνομα ``foo``)" -#: faq/programming.rst:2168 +#: faq/programming.rst:2174 msgid "" "The import mechanism tries to read ``foo_var`` from ``foo`` globals, to set " "``bar.foo_var = foo.foo_var``" @@ -4739,7 +4755,7 @@ msgstr "" "Ο μηχανισμός εισαγωγής προσπαθεί να διαβάσει το ``foo_var`` από τα παγκόσμια " "``foo``, για να ορίσει το ``bar.foo_var = foo.foo_var``" -#: faq/programming.rst:2170 +#: faq/programming.rst:2176 msgid "" "The last step fails, because Python isn't done with interpreting ``foo`` yet " "and the global symbol dictionary for ``foo`` is still empty." @@ -4748,7 +4764,7 @@ msgstr "" "την ερμηνεία του ``foo`` και το global λεξικό συμβόλων για το ``foo`` είναι " "ακόμα κενό." -#: faq/programming.rst:2173 +#: faq/programming.rst:2179 msgid "" "The same thing happens when you use ``import foo``, and then try to access " "``foo.foo_var`` in global code." @@ -4756,13 +4772,13 @@ msgstr "" "Το ίδιο συμβαίνει όταν χρησιμοποιείτε το ``import foo`` και, στη συνέχεια, " "προσπαθείτε να αποκτήσετε πρόσβαση στο ``foo.foo_var`` σε καθολικό κώδικα." -#: faq/programming.rst:2176 +#: faq/programming.rst:2182 msgid "There are (at least) three possible workarounds for this problem." msgstr "" "Υπάρχουν (τουλάχιστον) τρεις πιθανοί τρόποι αντιμετώπισης αυτού του " "προβλήματος." -#: faq/programming.rst:2178 +#: faq/programming.rst:2184 msgid "" "Guido van Rossum recommends avoiding all uses of ``from import ..." "``, and placing all code inside functions. Initializations of global " @@ -4776,14 +4792,14 @@ msgstr "" "χρησιμοποιηθούν μόνο σταθερές ή ενσωματωμένες συναρτήσεις. Αυτό σημαίνει " "ότι ένα εισαγόμενο module αναφέρεται ως ``.``." -#: faq/programming.rst:2183 +#: faq/programming.rst:2189 msgid "" "Jim Roskind suggests performing steps in the following order in each module:" msgstr "" "Ο Jim Roskind προτείνει να εκτελέσετε τα βήματα με την ακόλουθη σειρά σε " "κάθε module:" -#: faq/programming.rst:2185 +#: faq/programming.rst:2191 msgid "" "exports (globals, functions, and classes that don't need imported base " "classes)" @@ -4791,18 +4807,18 @@ msgstr "" "εξαγωγές (globals, συναρτήσεις, και κλάσεις που δεν χρειάζονται εισαγόμενες " "βασικές κλάσεις)" -#: faq/programming.rst:2187 +#: faq/programming.rst:2193 msgid "``import`` statements" msgstr "δηλώσεις ``import``" -#: faq/programming.rst:2188 +#: faq/programming.rst:2194 msgid "" "active code (including globals that are initialized from imported values)." msgstr "" "ενεργός κώδικας (συμπεριλαμβανομένων των καθολικών που αρχικοποιούνται από " "εισαγόμενες τιμές)." -#: faq/programming.rst:2190 +#: faq/programming.rst:2196 msgid "" "Van Rossum doesn't like this approach much because the imports appear in a " "strange place, but it does work." @@ -4810,7 +4826,7 @@ msgstr "" "Ο Van Rossum δεν αρέσει πολύ αυτή η προσέγγιση επειδή οι εισαγωγές " "εμφανίζονται σε ένα περίεργο μέρος, αλλά λειτουργεί." -#: faq/programming.rst:2193 +#: faq/programming.rst:2199 msgid "" "Matthias Urlichs recommends restructuring your code so that the recursive " "import is not necessary in the first place." @@ -4818,15 +4834,15 @@ msgstr "" "Ο Matthias Urlichs συνιστά την αναδιάρθρωση του κώδικά σας έτσι ώστε η " "αναδρομική εισαγωγή να μην είναι απαραίτητη εξαρχής." -#: faq/programming.rst:2196 +#: faq/programming.rst:2202 msgid "These solutions are not mutually exclusive." msgstr "Αυτές οι λύσεις δεν αλληλοαποκλείονται." -#: faq/programming.rst:2200 +#: faq/programming.rst:2206 msgid "__import__('x.y.z') returns ; how do I get z?" msgstr "__import__('x.y.z') επιστρέφει ∙ πως μπορώ να πάρω το z?" -#: faq/programming.rst:2202 +#: faq/programming.rst:2208 msgid "" "Consider using the convenience function :func:`~importlib.import_module` " "from :mod:`importlib` instead::" @@ -4834,11 +4850,11 @@ msgstr "" "Σκεφτείτε να χρησιμοποιήσετε τη συνάρτηση ευκολίας :func:`~importlib." "import_module` από το :mod:`importlib` αντί::" -#: faq/programming.rst:2205 +#: faq/programming.rst:2211 msgid "z = importlib.import_module('x.y.z')" msgstr "z = importlib.import_module('x.y.z')" -#: faq/programming.rst:2209 +#: faq/programming.rst:2215 msgid "" "When I edit an imported module and reimport it, the changes don't show up. " "Why does this happen?" @@ -4846,7 +4862,7 @@ msgstr "" "Όταν επεξεργάζομαι ένα module που έχει εισαχθεί και την επανεισάγω, οι " "αλλαγές δεν εμφανίζονται. Γιατί συμβαίνει αυτό;" -#: faq/programming.rst:2211 +#: faq/programming.rst:2217 msgid "" "For reasons of efficiency as well as consistency, Python only reads the " "module file on the first time a module is imported. If it didn't, in a " @@ -4861,7 +4877,7 @@ msgstr "" "αναλυθεί και θα αναλυθεί ξανά πολλές φορές. Για να αναγκάσετε τη εκ νέου " "ανάγνωση μιας αλλαγμένης ενότητας , κάντε το εξής::" -#: faq/programming.rst:2217 +#: faq/programming.rst:2223 msgid "" "import importlib\n" "import modname\n" @@ -4871,19 +4887,20 @@ msgstr "" "import modname\n" "importlib.reload(modname)" -#: faq/programming.rst:2221 +#: faq/programming.rst:2227 +#, fuzzy msgid "" "Warning: this technique is not 100% fool-proof. In particular, modules " -"containing statements like ::" +"containing statements like::" msgstr "" "Προειδοποίηση: αυτή η τεχνική δεν είναι 100% ασφαλής. Ειδικότερα, modules " "που περιέχουν δηλώσεις όπως ::" -#: faq/programming.rst:2224 +#: faq/programming.rst:2230 msgid "from modname import some_objects" msgstr "from modname import some_objects" -#: faq/programming.rst:2226 +#: faq/programming.rst:2232 msgid "" "will continue to work with the old version of the imported objects. If the " "module contains class definitions, existing class instances will *not* be " @@ -4896,7 +4913,7 @@ msgstr "" "ορισμό της νέας κλάσης. Αυτό μπορεί να οδηγήσει στην ακόλουθη παράδοξη " "συμπεριφορά::" -#: faq/programming.rst:2231 +#: faq/programming.rst:2237 msgid "" ">>> import importlib\n" ">>> import cls\n" @@ -4914,7 +4931,7 @@ msgstr "" ">>> isinstance(c, cls.C) # isinstance is false?!?\n" "False" -#: faq/programming.rst:2239 +#: faq/programming.rst:2245 msgid "" "The nature of the problem is made clear if you print out the \"identity\" of " "the class objects::" @@ -4922,7 +4939,7 @@ msgstr "" "Η φύση του προβλήματος καθίσταται σαφής εάν εκτυπώσετε την \"ταυτότητα\" των " "αντικειμένων κλάσης::" -#: faq/programming.rst:2242 +#: faq/programming.rst:2248 msgid "" ">>> hex(id(c.__class__))\n" "'0x7352a0'\n" @@ -4934,18 +4951,44 @@ msgstr "" ">>> hex(id(cls.C))\n" "'0x4198d0'" -#: faq/programming.rst:408 +#: faq/programming.rst:409 msgid "argument" msgstr "όρισμα" -#: faq/programming.rst:408 +#: faq/programming.rst:409 msgid "difference from parameter" msgstr "διαφορά από παράμετρο" -#: faq/programming.rst:408 +#: faq/programming.rst:409 msgid "parameter" msgstr "παράμετρος" -#: faq/programming.rst:408 +#: faq/programming.rst:409 msgid "difference from argument" msgstr "διαφορά από όρισμα" + +#~ msgid "`Komodo IDE `_" +#~ msgstr "`Komodo IDE `_" + +#~ msgid "" +#~ ">>> list1 = [\"what\", \"I'm\", \"sorting\", \"by\"]\n" +#~ ">>> list2 = [\"something\", \"else\", \"to\", \"sort\"]\n" +#~ ">>> pairs = zip(list1, list2)\n" +#~ ">>> pairs = sorted(pairs)\n" +#~ ">>> pairs\n" +#~ "[(\"I'm\", 'else'), ('by', 'sort'), ('sorting', 'to'), ('what', " +#~ "'something')]\n" +#~ ">>> result = [x[1] for x in pairs]\n" +#~ ">>> result\n" +#~ "['else', 'sort', 'to', 'something']" +#~ msgstr "" +#~ ">>> list1 = [\"τι\", \"κάνω\", \"ταξινόμηση\", \"με\"]\n" +#~ ">>> list2 = [\"κάτι\", \"διαφορετικό\", \"του\", \"ταξινομώ\"]\n" +#~ ">>> pairs = zip(list1, list2)\n" +#~ ">>> pairs = sorted(pairs)\n" +#~ ">>> pairs\n" +#~ "[(\"Εγώ\", 'διαφορετικά'), ('από', 'ταξινομώ'), ('ταξινόμηση', 'σε'), " +#~ "('τι', 'κάτι')]\n" +#~ ">>> result = [x[1] for x in pairs]\n" +#~ ">>> result\n" +#~ "['διαφορετικά', 'ταξινομώ', 'με', 'κάτι']" diff --git a/faq/windows.po b/faq/windows.po index 25ef723bb..514fd4169 100644 --- a/faq/windows.po +++ b/faq/windows.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: 2024-05-31 22:08+0300\n" "Last-Translator: Panagiotis Skias \n" "Language-Team: PyGreece \n" diff --git a/glossary.po b/glossary.po index 68197ea2c..8270e7068 100644 --- a/glossary.po +++ b/glossary.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: 2025-11-27 09:00+0200\n" "Last-Translator: Panagiotis Skias \n" "Language-Team: PyGreece \n" @@ -223,10 +223,25 @@ msgstr "ασύγχρονος generator" #: glossary.rst:93 msgid "" -"A function which returns an :term:`asynchronous generator iterator`. It " +"Informally used to mean either an :term:`asynchronous generator function` or " +"an :term:`asynchronous generator iterator`, depending on context. The " +"formal terms :term:`asynchronous generator function` and :term:`asynchronous " +"generator iterator` are uncommon in practice; \"asynchronous generator\" " +"alone is almost always sufficient." +msgstr "" + +#: glossary.rst:98 +#, fuzzy +msgid "asynchronous generator function" +msgstr "ασύγχρονος generator" + +#: glossary.rst:100 +#, fuzzy +msgid "" +"A function which returns an :term:`asynchronous generator iterator`. It " "looks like a coroutine function defined with :keyword:`async def` except " "that it contains :keyword:`yield` expressions for producing a series of " -"values usable in an :keyword:`async for` loop." +"values usable in an :keyword:`async for` loop. See :pep:`525`." msgstr "" "Μια συνάρτηση που επιστρέφει έναν :term:`asynchronous generator iterator`. " "Μοιάζει με μια συνάρτηση coroutine που ορίζεται με :keyword:`async def` " @@ -234,18 +249,7 @@ msgstr "" "σειράς τιμών που μπορούν να χρησιμοποιηθούν σε έναν :keyword:`async for` " "βρόχο." -#: glossary.rst:98 -msgid "" -"Usually refers to an asynchronous generator function, but may refer to an " -"*asynchronous generator iterator* in some contexts. In cases where the " -"intended meaning isn't clear, using the full terms avoids ambiguity." -msgstr "" -"Συνήθως αναφέρεται σε μια συνάρτηση ασύγχρονου generator, αλλά μπορεί να " -"αναφέρεται σε έναν *ασύγχρονο generator iterator* σε ορισμένα contexts. Σε " -"περιπτώσεις όπου το επιδιωκόμενο νόημα δεν είναι σαφές, με την χρήση των " -"πλήρων όρων αποφεύγεται η ασάφεια." - -#: glossary.rst:102 +#: glossary.rst:105 msgid "" "An asynchronous generator function may contain :keyword:`await` expressions " "as well as :keyword:`async for`, and :keyword:`async with` statements." @@ -253,17 +257,18 @@ msgstr "" "Μια συνάρτηση ασύγχρονου generator μπορεί να περιέχει εκφράσεις :keyword:" "`await` , καθώς και δηλώσεις :keyword:`async for`, και :keyword:`async with`." -#: glossary.rst:105 +#: glossary.rst:108 msgid "asynchronous generator iterator" msgstr "ασύγχρονος generator iterator" -#: glossary.rst:107 -msgid "An object created by an :term:`asynchronous generator` function." +#: glossary.rst:110 +#, fuzzy +msgid "An object created by an :term:`asynchronous generator function`." msgstr "" "Ένα αντικείμενο που δημιουργήθηκε από μια συνάρτηση :term:`asynchronous " "generator`." -#: glossary.rst:109 +#: glossary.rst:112 msgid "" "This is an :term:`asynchronous iterator` which when called using the :meth:" "`~object.__anext__` method returns an awaitable object which will execute " @@ -275,7 +280,7 @@ msgstr "" "αναμενόμενο αντικείμενο που θα εκτελέσει στο σώμα της συνάρτησης του " "ασύγχρονου generator μέχρι την επόμενη :keyword:`yield` έκφραση." -#: glossary.rst:114 +#: glossary.rst:117 msgid "" "Each :keyword:`yield` temporarily suspends processing, remembering the " "execution state (including local variables and pending try-statements). " @@ -290,11 +295,11 @@ msgstr "" "`~object.__anext__ `, συνεχίζει από εκεί που σταμάτησε. Βλ. :pep:`492` και :" "pep:`525`." -#: glossary.rst:119 +#: glossary.rst:122 msgid "asynchronous iterable" msgstr "ασύγχρονος iterable" -#: glossary.rst:121 +#: glossary.rst:124 msgid "" "An object, that can be used in an :keyword:`async for` statement. Must " "return an :term:`asynchronous iterator` from its :meth:`~object.__aiter__` " @@ -304,11 +309,11 @@ msgstr "" "for`. Πρέπει να επιστρέφει ένα :term:`asynchronous iterator` από την μέθοδο :" "meth:`~object.__aiter__`. Που εισήχθη από :pep:`492`." -#: glossary.rst:124 +#: glossary.rst:127 msgid "asynchronous iterator" msgstr "ασύγχρονος iterator" -#: glossary.rst:126 +#: glossary.rst:129 msgid "" "An object that implements the :meth:`~object.__aiter__` and :meth:`~object." "__anext__` methods. :meth:`~object.__anext__` must return an :term:" @@ -323,11 +328,25 @@ msgstr "" "__anext__` ενός ασύγχρονου iterator έως ότου εγείρει μια εξαίρεση :exc:" "`StopAsyncIteration`. Εισήχθη από :pep:`492`." -#: glossary.rst:131 +#: glossary.rst:134 +msgid "atomic operation" +msgstr "" + +#: glossary.rst:136 +msgid "" +"An operation that appears to execute as a single, indivisible step: no other " +"thread can observe it half-done, and its effects become visible all at " +"once. Python does not guarantee that high-level statements are atomic (for " +"example, ``x += 1`` performs multiple bytecode operations and is not " +"atomic). Atomicity is only guaranteed where explicitly documented. See " +"also :term:`race condition` and :term:`data race`." +msgstr "" + +#: glossary.rst:142 msgid "attribute" msgstr "χαρακτηριστικό" -#: glossary.rst:133 +#: glossary.rst:144 msgid "" "A value associated with an object which is usually referenced by name using " "dotted expressions. For example, if an object *o* has an attribute *a* it " @@ -337,7 +356,7 @@ msgstr "" "χρησιμοποιώντας εκφράσεις με κουκκίδες. Για παράδειγμα, εάν ένα αντικείμενο " "*o* έχει ένα χαρακτηριστικό *a* θα αναφέρεται ως *o.a*." -#: glossary.rst:138 +#: glossary.rst:149 msgid "" "It is possible to give an object an attribute whose name is not an " "identifier as defined by :ref:`identifiers`, for example using :func:" @@ -352,11 +371,11 @@ msgstr "" "χρησιμοποιώντας τις τελείες, και αντί αυτού θα πρέπει να ανακτηθεί " "χρησιμοποιώντας :func:`getattr`." -#: glossary.rst:143 +#: glossary.rst:154 msgid "awaitable" msgstr "awaitable" -#: glossary.rst:145 +#: glossary.rst:156 msgid "" "An object that can be used in an :keyword:`await` expression. Can be a :" "term:`coroutine` or an object with an :meth:`~object.__await__` method. See " @@ -366,11 +385,11 @@ msgstr "" "Μπορεί να είναι :term:`coroutine` ή ένα αντικείμενο με μια :meth:`~object." "__await__` μέθοδο. Βλ. επίσης :pep:`492`." -#: glossary.rst:148 +#: glossary.rst:159 msgid "BDFL" msgstr "BDFL" -#: glossary.rst:150 +#: glossary.rst:161 msgid "" "Benevolent Dictator For Life, a.k.a. `Guido van Rossum `_, Python's creator." @@ -379,11 +398,11 @@ msgstr "" "ζωής, δηλαδή `Guido van Rossum `_, ο " "δημιουργός της Python." -#: glossary.rst:152 +#: glossary.rst:163 msgid "binary file" msgstr "δυαδικό αρχείο" -#: glossary.rst:154 +#: glossary.rst:165 msgid "" "A :term:`file object` able to read and write :term:`bytes-like objects " "`. Examples of binary files are files opened in binary " @@ -397,7 +416,7 @@ msgstr "" "data:`sys.stdin.buffer `, :data:`sys.stdout.buffer `, " "και στιγμιοτύπων των :class:`io.BytesIO` και :class:`gzip.GzipFile`." -#: glossary.rst:161 +#: glossary.rst:172 msgid "" "See also :term:`text file` for a file object able to read and write :class:" "`str` objects." @@ -405,11 +424,11 @@ msgstr "" "Βλ. επίσης :term:`text file` για ένα αντικείμενο τύπου αρχείο ικανό να " "διαβάσει και να γράψει :class:`str` αντικείμενα." -#: glossary.rst:163 +#: glossary.rst:174 msgid "borrowed reference" msgstr "δανεική αναφορά" -#: glossary.rst:165 +#: glossary.rst:176 msgid "" "In Python's C API, a borrowed reference is a reference to an object, where " "the code using the object does not own the reference. It becomes a dangling " @@ -423,7 +442,7 @@ msgstr "" "αφαιρέσει το τελευταίο :term:`strong reference` από το αντικείμενο και έτσι " "να το καταστρέψει." -#: glossary.rst:171 +#: glossary.rst:182 msgid "" "Calling :c:func:`Py_INCREF` on the :term:`borrowed reference` is recommended " "to convert it to a :term:`strong reference` in-place, except when the object " @@ -438,11 +457,11 @@ msgstr "" "c:func:`Py_NewRef` μπορεί να χρησιμοποιηθεί ώστε να δημιουργηθεί ένα :term:" "`ισχυρή αναφορά `." -#: glossary.rst:176 +#: glossary.rst:187 msgid "bytes-like object" msgstr "bytes-like αντικείμενα" -#: glossary.rst:178 +#: glossary.rst:189 msgid "" "An object that supports the :ref:`bufferobjects` and can export a C-:term:" "`contiguous` buffer. This includes all :class:`bytes`, :class:`bytearray`, " @@ -459,7 +478,7 @@ msgstr "" "διαχειρίζονται δυαδικά δεδομένα' αυτά περιλαμβάνουν συμπίεση αποθήκευση σε " "δυαδικό αρχείο και αποστολή μέσω socket." -#: glossary.rst:185 +#: glossary.rst:196 msgid "" "Some operations need the binary data to be mutable. The documentation often " "refers to these as \"read-write bytes-like objects\". Example mutable " @@ -478,11 +497,11 @@ msgstr "" "αυτών περιέχουν :class:`bytes` και ένα :class:`memoryview` ενός :class:" "`bytes` αντικειμένου." -#: glossary.rst:193 +#: glossary.rst:204 msgid "bytecode" msgstr "bytecode" -#: glossary.rst:195 +#: glossary.rst:206 msgid "" "Python source code is compiled into bytecode, the internal representation of " "a Python program in the CPython interpreter. The bytecode is also cached in " @@ -504,7 +523,7 @@ msgstr "" "εικονικών μηχανών Python, ούτε να είναι σταθερά μεταξύ των εκδόσεων της " "Python." -#: glossary.rst:205 +#: glossary.rst:216 msgid "" "A list of bytecode instructions can be found in the documentation for :ref:" "`the dis module `." @@ -512,11 +531,11 @@ msgstr "" "Μια λίστα από οδηγίες σχετικά με τα bytecode μπορεί να βρεθεί στην " "τεκμηρίωση για :ref:`το module dis `." -#: glossary.rst:207 +#: glossary.rst:218 msgid "callable" msgstr "callable" -#: glossary.rst:209 +#: glossary.rst:220 msgid "" "A callable is an object that can be called, possibly with a set of arguments " "(see :term:`argument`), with the following syntax::" @@ -524,11 +543,11 @@ msgstr "" "Ένα callable είναι ένα αντικείμενο που μπορεί να καλεστεί, πιθανά με ένα " "σύνολο ορισμάτων (βλ. :term:`argument`), με την παρακάτω σύνταξη::" -#: glossary.rst:212 +#: glossary.rst:223 msgid "callable(argument1, argument2, argumentN)" msgstr "callable(argument1, argument2, argumentN)" -#: glossary.rst:214 +#: glossary.rst:225 msgid "" "A :term:`function`, and by extension a :term:`method`, is a callable. An " "instance of a class that implements the :meth:`~object.__call__` method is " @@ -538,11 +557,11 @@ msgstr "" "Ένα στιγμιότυπο μια κλάσης που υλοποιεί τη μέθοδο :meth:`~object.__call__` " "είναι επίσης callable." -#: glossary.rst:217 +#: glossary.rst:228 msgid "callback" msgstr "callback" -#: glossary.rst:219 +#: glossary.rst:230 msgid "" "A subroutine function which is passed as an argument to be executed at some " "point in the future." @@ -550,11 +569,11 @@ msgstr "" "Μια subroutine συνάρτηση η οποία μεταβιβάζεται ως όρισμα που θα εκτελεστεί " "κάποια στιγμή στο μέλλον." -#: glossary.rst:221 +#: glossary.rst:232 msgid "class" msgstr "κλάση" -#: glossary.rst:223 +#: glossary.rst:234 msgid "" "A template for creating user-defined objects. Class definitions normally " "contain method definitions which operate on instances of the class." @@ -563,11 +582,11 @@ msgstr "" "ορισμοί κλάσεων συνήθως περιέχουν ορισμούς μεθόδων που λειτουργούν σε " "στιγμιότυπα της κλάσης." -#: glossary.rst:226 +#: glossary.rst:237 msgid "class variable" msgstr "μεταβλητή κλάσης" -#: glossary.rst:228 +#: glossary.rst:239 msgid "" "A variable defined in a class and intended to be modified only at class " "level (i.e., not in an instance of the class)." @@ -575,11 +594,11 @@ msgstr "" "Μια μεταβλητή που ορίζεται σε μια κλάση και προορίζεται να τροποποιηθεί μόνο " "σε επίπεδο κλάσης (δηλ. όχι σε ένα στιγμιότυπο μιας κλάσης)." -#: glossary.rst:230 +#: glossary.rst:241 msgid "closure variable" msgstr "μεταβλητή κλεισίματος" -#: glossary.rst:232 +#: glossary.rst:243 msgid "" "A :term:`free variable` referenced from a :term:`nested scope` that is " "defined in an outer scope rather than being resolved at runtime from the " @@ -594,7 +613,7 @@ msgstr "" "εγγραφή, ή να θεωρηθεί ότι ορίζεται έμμεσα όταν η μεταβλητή χρησιμοποιείται " "μόνο για ανάγνωση." -#: glossary.rst:237 +#: glossary.rst:248 msgid "" "For example, in the ``inner`` function in the following code, both ``x`` and " "``print`` are :term:`free variables `, but only ``x`` is a " @@ -604,7 +623,7 @@ msgstr "" "και η ``print`` είναι :term:`free variables `, αλλά μόνο η " "``x`` είναι μια *μεταβλητή κλεισίματος*::" -#: glossary.rst:240 +#: glossary.rst:251 msgid "" "def outer():\n" " x = 0\n" @@ -622,7 +641,7 @@ msgstr "" " print(x)\n" " return inner" -#: glossary.rst:248 +#: glossary.rst:259 msgid "" "Due to the :attr:`codeobject.co_freevars` attribute (which, despite its " "name, only includes the names of closure variables rather than listing all " @@ -636,11 +655,11 @@ msgstr "" "φορές ο πιο γενικός όρος :term:`free variable` ακόμη και όταν γίνεται ειδική " "αναφορά σε μεταβλητές κλεισίματος." -#: glossary.rst:252 +#: glossary.rst:263 msgid "complex number" msgstr "μιγαδικός αριθμός" -#: glossary.rst:254 +#: glossary.rst:265 msgid "" "An extension of the familiar real number system in which all numbers are " "expressed as a sum of a real part and an imaginary part. Imaginary numbers " @@ -664,11 +683,38 @@ msgstr "" "προηγμένο μαθηματικό χαρακτηριστικό. εάν δεν γνωρίζετε την ανάγκη τους, " "είναι σχεδόν σίγουρο ότι μπορείτε να τα αγνοήσετε με ασφάλεια." -#: glossary.rst:264 +#: glossary.rst:275 +msgid "concurrency" +msgstr "" + +#: glossary.rst:277 +msgid "" +"The ability of a computer program to perform multiple tasks at the same " +"time. Python provides libraries for writing programs that make use of " +"different forms of concurrency. :mod:`asyncio` is a library for dealing " +"with asynchronous tasks and coroutines. :mod:`threading` provides access to " +"operating system threads and :mod:`multiprocessing` to operating system " +"processes. Multi-core processors can execute threads and processes on " +"different CPU cores at the same time (see :term:`parallelism`)." +msgstr "" + +#: glossary.rst:285 +msgid "concurrent modification" +msgstr "" + +#: glossary.rst:287 +msgid "" +"When multiple threads modify shared data at the same time. Concurrent " +"modification without proper synchronization can cause :term:`race conditions " +"`, and might also trigger a :term:`data race `, " +"data corruption, or both." +msgstr "" + +#: glossary.rst:291 msgid "context" msgstr "context" -#: glossary.rst:266 +#: glossary.rst:293 msgid "" "This term has different meanings depending on where and how it is used. Some " "common meanings:" @@ -676,7 +722,7 @@ msgstr "" "Αυτό ο όρος έχει διαφορετικές σημασίες ανάλογα με το πού και πώς " "χρησιμοποιείται. Μερικές κοινές έννοιες:" -#: glossary.rst:269 +#: glossary.rst:296 msgid "" "The temporary state or environment established by a :term:`context manager` " "via a :keyword:`with` statement." @@ -684,7 +730,7 @@ msgstr "" "Η προσωρινή κατάσταση ή το περιβάλλον που δημιουργείται από έναν :term:" "`context manager` μέσω μιας δήλωσης :keyword:`with`." -#: glossary.rst:271 +#: glossary.rst:298 msgid "" "The collection of key­value bindings associated with a particular :class:" "`contextvars.Context` object and accessed via :class:`~contextvars." @@ -695,18 +741,18 @@ msgstr "" "αντικειμένων :class:`~contextvars.ContextVar`. Βλ. επίσης :term:`context " "variable`." -#: glossary.rst:275 +#: glossary.rst:302 msgid "" "A :class:`contextvars.Context` object. Also see :term:`current context`." msgstr "" "Ένα αντικείμενο :class:`contextvars.Context`. Βλ. επίσης :term:`current " "context`." -#: glossary.rst:277 +#: glossary.rst:304 msgid "context management protocol" msgstr "πρωτόκολλο διαχείρισης περιβάλλοντος" -#: glossary.rst:279 +#: glossary.rst:306 msgid "" "The :meth:`~object.__enter__` and :meth:`~object.__exit__` methods called by " "the :keyword:`with` statement. See :pep:`343`." @@ -714,11 +760,11 @@ msgstr "" "Οι μέθοδοι :meth:`~object.__enter__` και :meth:`~object.__exit__` καλούνται " "από τη δήλωση :keyword:`with`. Βλ. :pep:`343`." -#: glossary.rst:281 +#: glossary.rst:308 msgid "context manager" msgstr "διαχειριστής context" -#: glossary.rst:283 +#: glossary.rst:310 msgid "" "An object which implements the :term:`context management protocol` and " "controls the environment seen in a :keyword:`with` statement. See :pep:" @@ -728,11 +774,11 @@ msgstr "" "ελέγχει το περιβάλλον που είσαι ορατό μέσα σε μια δήλωση :keyword:`with`. " "Βλ. :pep:`343`." -#: glossary.rst:286 +#: glossary.rst:313 msgid "context variable" msgstr "context μεταβλητή" -#: glossary.rst:288 +#: glossary.rst:315 msgid "" "A variable whose value depends on which context is the :term:`current " "context`. Values are accessed via :class:`contextvars.ContextVar` objects. " @@ -745,11 +791,11 @@ msgstr "" "κυρίως για να απομονώσουν την κατάσταση μεταξύ ταυτόχρονων ασύγχρονων " "εργασιών." -#: glossary.rst:292 +#: glossary.rst:319 msgid "contiguous" msgstr "contiguous" -#: glossary.rst:296 +#: glossary.rst:323 msgid "" "A buffer is considered contiguous exactly if it is either *C-contiguous* or " "*Fortran contiguous*. Zero-dimensional buffers are C and Fortran " @@ -768,11 +814,11 @@ msgstr "" "μνήμης. Ωστόσο, σε Fortran contiguous πίνακες, ο πρώτος δείκτης μεταβάλλεται " "πιο γρήγορα." -#: glossary.rst:304 +#: glossary.rst:331 msgid "coroutine" msgstr "coroutine" -#: glossary.rst:306 +#: glossary.rst:333 msgid "" "Coroutines are a more generalized form of subroutines. Subroutines are " "entered at one point and exited at another point. Coroutines can be " @@ -785,11 +831,11 @@ msgstr "" "Μπορούν να υλοποιήσουν με την δήλωση :keyword:`async def`. Βλ. επίσης :pep:" "`492`." -#: glossary.rst:311 +#: glossary.rst:338 msgid "coroutine function" msgstr "coroutine συνάρτηση" -#: glossary.rst:313 +#: glossary.rst:340 msgid "" "A function which returns a :term:`coroutine` object. A coroutine function " "may be defined with the :keyword:`async def` statement, and may contain :" @@ -801,11 +847,11 @@ msgstr "" "και μπορεί να περιέχει :keyword:`await`, :keyword:`async for`, και :keyword:" "`async with` λέξεις κλειδιά. Αυτές εισήχθησαν από το :pep:`492`." -#: glossary.rst:318 +#: glossary.rst:345 msgid "CPython" msgstr "CPython" -#: glossary.rst:320 +#: glossary.rst:347 msgid "" "The canonical implementation of the Python programming language, as " "distributed on `python.org `_. The term \"CPython\" " @@ -817,11 +863,11 @@ msgstr "" "όταν είναι απαραίτητο για την διάκριση αυτής της υλοποίησης από άλλες όπως η " "*Jython* ή η *IronPython*." -#: glossary.rst:324 +#: glossary.rst:351 msgid "current context" msgstr "τρέχον πλαίσιο" -#: glossary.rst:326 +#: glossary.rst:353 msgid "" "The :term:`context` (:class:`contextvars.Context` object) that is currently " "used by :class:`~contextvars.ContextVar` objects to access (get or set) the " @@ -838,11 +884,44 @@ msgstr "" "`asyncio`) συνδέουν κάθε εργασία με ένα συμφραζόμενο, το οποίο γίνεται το " "τρέχον συμφραζόμενο όποτε η εργασία ξεκινά ή συνεχίζει την εκτέλεση." -#: glossary.rst:332 +#: glossary.rst:359 +msgid "data race" +msgstr "" + +#: glossary.rst:361 +msgid "" +"A situation where multiple threads access the same memory location " +"concurrently, at least one of the accesses is a write, and the threads do " +"not use any synchronization to control their access. Data races lead to :" +"term:`non-deterministic` behavior and can cause data corruption. Proper use " +"of :term:`locks ` and other :term:`synchronization primitives " +"` prevents data races. Note that data races can " +"only happen in native code, but that :term:`native code` might be exposed in " +"a Python API. See also :term:`race condition` and :term:`thread-safe`." +msgstr "" + +#: glossary.rst:370 +msgid "deadlock" +msgstr "" + +#: glossary.rst:372 +msgid "" +"A situation in which two or more tasks (threads, processes, or coroutines) " +"wait indefinitely for each other to release resources or complete actions, " +"preventing any from making progress. For example, if thread A holds lock 1 " +"and waits for lock 2, while thread B holds lock 2 and waits for lock 1, both " +"threads will wait indefinitely. In Python this often arises from acquiring " +"multiple locks in conflicting orders or from circular join/await " +"dependencies. Deadlocks can be avoided by always acquiring multiple :term:" +"`locks ` in a consistent order. See also :term:`lock` and :term:" +"`reentrant`." +msgstr "" + +#: glossary.rst:381 msgid "decorator" msgstr "decorator" -#: glossary.rst:334 +#: glossary.rst:383 msgid "" "A function returning another function, usually applied as a function " "transformation using the ``@wrapper`` syntax. Common examples for " @@ -853,7 +932,7 @@ msgstr "" "Συνηθισμένα παραδείγματα για τους decorators είναι :func:`classmethod` και :" "func:`staticmethod`." -#: glossary.rst:338 +#: glossary.rst:387 msgid "" "The decorator syntax is merely syntactic sugar, the following two function " "definitions are semantically equivalent::" @@ -861,7 +940,7 @@ msgstr "" "Η σύνταξη του decorator είναι απλώς καλλωπιστική, οι ακόλουθοι δύο ορισμοί " "συναρτήσεων είναι σημασιολογικά ισοδύναμοι::" -#: glossary.rst:341 +#: glossary.rst:390 msgid "" "def f(arg):\n" " ...\n" @@ -879,7 +958,7 @@ msgstr "" "def f(arg):\n" " ..." -#: glossary.rst:349 +#: glossary.rst:398 msgid "" "The same concept exists for classes, but is less commonly used there. See " "the documentation for :ref:`function definitions ` and :ref:`class " @@ -889,11 +968,11 @@ msgstr "" "εκεί. Βλ. την τεκμηρίωση για :ref:`function definitions ` και :ref:" "`class definitions ` για περισσότερα σχετικά με τους decorators." -#: glossary.rst:352 +#: glossary.rst:401 msgid "descriptor" msgstr "descriptor" -#: glossary.rst:354 +#: glossary.rst:403 msgid "" "Any object which defines the methods :meth:`~object.__get__`, :meth:`~object." "__set__`, or :meth:`~object.__delete__`. When a class attribute is a " @@ -916,7 +995,7 @@ msgstr "" "αποτελεί την βάση για πολλά χαρακτηριστικά όπως συναρτήσεις, μεθόδους, " "ιδιότητες, μέθοδοι κλάσης στατικές μέθοδοι, και αναφορά σε σούπερ κλάσεις." -#: glossary.rst:365 +#: glossary.rst:414 msgid "" "For more information about descriptors' methods, see :ref:`descriptors` or " "the :ref:`Descriptor How To Guide `." @@ -925,11 +1004,11 @@ msgstr "" "see :ref:`descriptors` ή το :ref:`Πρακτικός οδηγός για τη χρήση του " "Descriptor `." -#: glossary.rst:367 +#: glossary.rst:416 msgid "dictionary" msgstr "λεξικό" -#: glossary.rst:369 +#: glossary.rst:418 msgid "" "An associative array, where arbitrary keys are mapped to values. The keys " "can be any object with :meth:`~object.__hash__` and :meth:`~object.__eq__` " @@ -939,11 +1018,11 @@ msgstr "" "τιμές. Τα κλειδιά μπορεί να είναι οποιοδήποτε αντικείμενο με μεθόδους :meth:" "`~object.__hash__` και :meth:`~object.__eq__`. Ονομάζεται ως hash στο Perl." -#: glossary.rst:373 +#: glossary.rst:422 msgid "dictionary comprehension" msgstr "κατανόηση λεξικού" -#: glossary.rst:375 +#: glossary.rst:424 msgid "" "A compact way to process all or part of the elements in an iterable and " "return a dictionary with the results. ``results = {n: n ** 2 for n in " @@ -956,11 +1035,11 @@ msgstr "" "κλειδί ``n`` που αντιστοιχίζεται με την τιμή ``n ** 2``. Βλ. :ref:" "`comprehensions`." -#: glossary.rst:379 +#: glossary.rst:428 msgid "dictionary view" msgstr "όψη λεξικού" -#: glossary.rst:381 +#: glossary.rst:430 msgid "" "The objects returned from :meth:`dict.keys`, :meth:`dict.values`, and :meth:" "`dict.items` are called dictionary views. They provide a dynamic view on the " @@ -975,11 +1054,11 @@ msgstr "" "όψη λεξικού να γίνει μια πλήρης λίστα χρησιμοποιήστε το ``list(dictview)``. " "Βλ. :ref:`dict-views`." -#: glossary.rst:387 +#: glossary.rst:436 msgid "docstring" msgstr "docstring" -#: glossary.rst:389 +#: glossary.rst:438 msgid "" "A string literal which appears as the first expression in a class, function " "or module. While ignored when the suite is executed, it is recognized by " @@ -994,11 +1073,11 @@ msgstr "" "περικλείει. Δεδομένου ότι είναι διαθέσιμο μέσω ενδοσκόπησης, το κανονικό " "μέρος για την τεκμηρίωση του αντικειμένου." -#: glossary.rst:395 +#: glossary.rst:444 msgid "duck-typing" msgstr "duck-typing" -#: glossary.rst:397 +#: glossary.rst:446 msgid "" "A programming style which does not look at an object's type to determine if " "it has the right interface; instead, the method or attribute is simply " @@ -1021,11 +1100,11 @@ msgstr "" "με :term:`abstract base classes `.) Αντί αυτού, συνήθως " "χρησιμοποιεί δοκιμές :func:`hasattr` ή προγραμματισμό :term:`EAFP`." -#: glossary.rst:406 +#: glossary.rst:455 msgid "dunder" msgstr "dunder" -#: glossary.rst:408 +#: glossary.rst:457 msgid "" "An informal short-hand for \"double underscore\", used when talking about a :" "term:`special method`. For example, ``__init__`` is often pronounced " @@ -1035,11 +1114,11 @@ msgstr "" "χρησιμοποιείται όταν μιλάμε για μια :term:`special method`. Για παράδειγμα, " "``__init__`` προφέρεται συχνά ως \"dunder init\"." -#: glossary.rst:411 +#: glossary.rst:460 msgid "EAFP" msgstr "EAFP" -#: glossary.rst:413 +#: glossary.rst:462 msgid "" "Easier to ask for forgiveness than permission. This common Python coding " "style assumes the existence of valid keys or attributes and catches " @@ -1056,11 +1135,11 @@ msgstr "" "αντίθεση με το στυλ που είναι :term:`LBYL` κοινό σε πολλές άλλες γλώσσες, " "όπως η C." -#: glossary.rst:419 +#: glossary.rst:468 msgid "expression" msgstr "έκφραση" -#: glossary.rst:421 +#: glossary.rst:470 msgid "" "A piece of syntax which can be evaluated to some value. In other words, an " "expression is an accumulation of expression elements like literals, names, " @@ -1078,11 +1157,11 @@ msgstr "" "μπορούν να χρησιμοποιηθούν ως εκφράσεις, όπως το :keyword:`while`. Οι " "αναθέσεις τιμών είναι επίσης δηλώσεις όχι εκφράσεις." -#: glossary.rst:428 +#: glossary.rst:477 msgid "extension module" msgstr "module επέκτασης" -#: glossary.rst:430 +#: glossary.rst:479 msgid "" "A module written in C or C++, using Python's C API to interact with the core " "and with user code." @@ -1090,11 +1169,11 @@ msgstr "" "Ένα module γραμμένο σε C ή C++, που χρησιμοποιείται από το C API της Python " "για να αλληλεπιδράσουν με τον πυρήνα και με τον κώδικα του χρήστη." -#: glossary.rst:432 +#: glossary.rst:481 msgid "f-string" msgstr "f-string" -#: glossary.rst:434 +#: glossary.rst:483 msgid "" "String literals prefixed with ``'f'`` or ``'F'`` are commonly called \"f-" "strings\" which is short for :ref:`formatted string literals `. " @@ -1104,11 +1183,11 @@ msgstr "" "ονομάζονται συνήθως \"f-strings\" που είναι συντομογραφία του :ref:" "`formatted string literals `. Βλ. επίσης :pep:`498`." -#: glossary.rst:437 +#: glossary.rst:486 msgid "file object" msgstr "αντικείμενο αρχείου" -#: glossary.rst:439 +#: glossary.rst:488 msgid "" "An object exposing a file-oriented API (with methods such as :meth:`!read` " "or :meth:`!write`) to an underlying resource. Depending on the way it was " @@ -1125,7 +1204,7 @@ msgstr "" "buffers, sockets, pipes, κλπ.). Αντικείμενο αρχείου ονομάζονται επίσης :dfn:" "`file-like objects` ή :dfn:`streams`." -#: glossary.rst:447 +#: glossary.rst:496 msgid "" "There are actually three categories of file objects: raw :term:`binary files " "`, buffered :term:`binary files ` and :term:`text " @@ -1139,19 +1218,19 @@ msgstr "" "στην ενότητα :mod:`io`. Ο κανονικός τρόπος για να δημιουργήσετε ένα " "αντικείμενο αρχείου είναι χρησιμοποιώντας την συνάρτηση :func:`open`." -#: glossary.rst:452 +#: glossary.rst:501 msgid "file-like object" msgstr "αντικείμενο που μοιάζει με αρχείο" -#: glossary.rst:454 +#: glossary.rst:503 msgid "A synonym for :term:`file object`." msgstr "Ένα συνώνυμο με το :term:`file object`." -#: glossary.rst:455 +#: glossary.rst:504 msgid "filesystem encoding and error handler" msgstr "κωδικοποίηση συστήματος αρχείων και χειριστής σφαλμάτων" -#: glossary.rst:457 +#: glossary.rst:506 msgid "" "Encoding and error handler used by Python to decode bytes from the operating " "system and encode Unicode to the operating system." @@ -1160,7 +1239,7 @@ msgstr "" "την αποκωδικοποίηση των bytes από το λειτουργικό σύστημα και την " "κωδικοποίηση σε Unicode για το λειτουργικό σύστημα." -#: glossary.rst:460 +#: glossary.rst:509 msgid "" "The filesystem encoding must guarantee to successfully decode all bytes " "below 128. If the file system encoding fails to provide this guarantee, API " @@ -1171,7 +1250,7 @@ msgstr "" "αρχείων δεν παρέχει αυτήν την εγγύηση, οι συναρτήσεις API μπορούν να " "εγείρουν ένα :exc:`UnicodeError`." -#: glossary.rst:464 +#: glossary.rst:513 msgid "" "The :func:`sys.getfilesystemencoding` and :func:`sys." "getfilesystemencodeerrors` functions can be used to get the filesystem " @@ -1181,7 +1260,7 @@ msgstr "" "getfilesystemencodeerrors` μπορούν να χρησιμοποιηθούν για να λάβετε την " "κωδικοποίηση του συστήματος αρχείων και του χειριστή σφαλμάτων." -#: glossary.rst:468 +#: glossary.rst:517 msgid "" "The :term:`filesystem encoding and error handler` are configured at Python " "startup by the :c:func:`PyConfig_Read` function: see :c:member:`~PyConfig." @@ -1193,15 +1272,15 @@ msgstr "" "`~PyConfig.filesystem_encoding` και :c:member:`~PyConfig.filesystem_errors` " "μέλη του :c:type:`PyConfig`." -#: glossary.rst:473 +#: glossary.rst:522 msgid "See also the :term:`locale encoding`." msgstr "Βλ. επίσης το :term:`locale encoding`." -#: glossary.rst:474 +#: glossary.rst:523 msgid "finder" msgstr "finder" -#: glossary.rst:476 +#: glossary.rst:525 msgid "" "An object that tries to find the :term:`loader` for a module that is being " "imported." @@ -1209,7 +1288,7 @@ msgstr "" "Ένα αντικείμενο που προσπαθεί να βρει το :term:`loader` για ένα module που " "εισήχθη." -#: glossary.rst:479 +#: glossary.rst:528 msgid "" "There are two types of finder: :term:`meta path finders ` " "for use with :data:`sys.meta_path`, and :term:`path entry finders ` για χρήση με :data:`sys.path_hooks`." -#: glossary.rst:483 +#: glossary.rst:532 msgid "" "See :ref:`finders-and-loaders` and :mod:`importlib` for much more detail." msgstr "" "Βλ. :ref:`finders-and-loaders` και :mod:`importlib` για περισσότερες " "λεπτομέρειες." -#: glossary.rst:484 +#: glossary.rst:533 msgid "floor division" msgstr "ακέραια διαίρεση" -#: glossary.rst:486 +#: glossary.rst:535 msgid "" "Mathematical division that rounds down to nearest integer. The floor " "division operator is ``//``. For example, the expression ``11 // 4`` " @@ -1245,11 +1324,11 @@ msgstr "" "4`` κάνει ``-3`` επειδή αυτή είναι η στρογγυλοποίηση *προς τα κάτω* του " "``-2.75``. Βλ. :pep:`238`." -#: glossary.rst:491 +#: glossary.rst:540 msgid "free threading" msgstr "δωρεάν νήμα" -#: glossary.rst:493 +#: glossary.rst:542 msgid "" "A threading model where multiple threads can run Python bytecode " "simultaneously within the same interpreter. This is in contrast to the :" @@ -1261,11 +1340,11 @@ msgstr "" "`global interpreter lock`, το οποίο επιτρέπει σε ένα μόνο νήμα να εκτελεί " "Python bytecode κάθε φορά. Δείτε το :pep:`703`." -#: glossary.rst:497 +#: glossary.rst:546 msgid "free variable" msgstr "δωρεάν μεταβλητή" -#: glossary.rst:499 +#: glossary.rst:548 msgid "" "Formally, as defined in the :ref:`language execution model `, a " "free variable is any variable used in a namespace which is not a local " @@ -1281,11 +1360,11 @@ msgstr "" "χαρακτηριστικού :attr:`codeobject.co_freevars`, ο όρος χρησιμοποιείται " "επίσης μερικές φορές ως συνώνυμο της :term:`closure variable`." -#: glossary.rst:504 +#: glossary.rst:553 msgid "function" msgstr "συνάρτηση" -#: glossary.rst:506 +#: glossary.rst:555 msgid "" "A series of statements which returns some value to a caller. It can also be " "passed zero or more :term:`arguments ` which may be used in the " @@ -1297,16 +1376,16 @@ msgstr "" "` που μπορεί να χρησιμοποιηθεί για την εκτέλεση. Βλ. επίσης τις " "ενότητες :term:`parameter`, :term:`method`, και the :ref:`function`." -#: glossary.rst:510 +#: glossary.rst:559 msgid "function annotation" msgstr "συνάρτηση annotation" -#: glossary.rst:512 +#: glossary.rst:561 msgid "An :term:`annotation` of a function parameter or return value." msgstr "" "Ένας :term:`annotation` μιας παραμέτρου συνάρτησης ή μιας τιμής επιστροφής." -#: glossary.rst:514 +#: glossary.rst:563 msgid "" "Function annotations are usually used for :term:`type hints `: " "for example, this function is expected to take two :class:`int` arguments " @@ -1317,7 +1396,7 @@ msgstr "" "ορίσματα :class:`int` και επίσης αναμένεται να έχει μία επιστρεφόμενη τιμή :" "class:`int`::" -#: glossary.rst:519 +#: glossary.rst:568 msgid "" "def sum_two_numbers(a: int, b: int) -> int:\n" " return a + b" @@ -1325,12 +1404,12 @@ msgstr "" "def sum_two_numbers(a: int, b: int) -> int:\n" " return a + b" -#: glossary.rst:522 +#: glossary.rst:571 msgid "Function annotation syntax is explained in section :ref:`function`." msgstr "" "Η σύνταξη συνάρτησης annotation αναλύεται στην ενότητα :ref:`function`." -#: glossary.rst:524 +#: glossary.rst:573 msgid "" "See :term:`variable annotation` and :pep:`484`, which describe this " "functionality. Also see :ref:`annotations-howto` for best practices on " @@ -1340,11 +1419,11 @@ msgstr "" "λειτουργικότητα. Επίσης βλ. :ref:`annotations-howto` για τις καλύτερες " "πρακτικές δουλεύοντας με annotations." -#: glossary.rst:528 +#: glossary.rst:577 msgid "__future__" msgstr "__future__" -#: glossary.rst:530 +#: glossary.rst:579 msgid "" "A :ref:`future statement `, ``from __future__ import ``, " "directs the compiler to compile the current module using syntax or semantics " @@ -1363,7 +1442,7 @@ msgstr "" "προστέθηκε για πρώτη φορά στην γλώσσα και πότε θα γίνει (ή έγινε) η " "προεπιλογή::" -#: glossary.rst:538 +#: glossary.rst:587 msgid "" ">>> import __future__\n" ">>> __future__.division\n" @@ -1373,11 +1452,11 @@ msgstr "" ">>> __future__.division\n" "_Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)" -#: glossary.rst:541 +#: glossary.rst:590 msgid "garbage collection" msgstr "συλλογή απορριμάτων" -#: glossary.rst:543 +#: glossary.rst:592 msgid "" "The process of freeing memory when it is not used anymore. Python performs " "garbage collection via reference counting and a cyclic garbage collector " @@ -1390,16 +1469,30 @@ msgstr "" "τους κύκλους αναφοράς. Ο συλλέκτης απορριμάτων μπορεί να ελεγχθεί " "χρησιμοποιώντας το module :mod:`gc`." -#: glossary.rst:549 +#: glossary.rst:598 msgid "generator" msgstr "generator" -#: glossary.rst:551 +#: glossary.rst:600 +msgid "" +"Informally used to mean either a :term:`generator function` or a :term:" +"`generator iterator`, depending on context. The formal terms :term:" +"`generator function` and :term:`generator iterator` are uncommon in " +"practice; \"generator\" alone is almost always sufficient." +msgstr "" + +#: glossary.rst:606 +#, fuzzy +msgid "generator function" +msgstr "γενική συνάρτηση" + +#: glossary.rst:608 +#, fuzzy msgid "" -"A function which returns a :term:`generator iterator`. It looks like a " -"normal function except that it contains :keyword:`yield` expressions for " -"producing a series of values usable in a for-loop or that can be retrieved " -"one at a time with the :func:`next` function." +"A function which returns a :term:`generator` object. It looks like a normal " +"function except that it contains :keyword:`yield` expressions for producing " +"a series of values usable in a :keyword:`for`\\-loop or that can be " +"retrieved one at a time with the :func:`next` function. See :ref:`yieldexpr`." msgstr "" "Μια συνάρτηση που επιστρέφει ένα :term:`generator iterator`. Μοιάζει με μια " "κανονική συνάρτηση εκτός από το ότι περιέχει εκφράσεις :keyword:`yield` για " @@ -1407,31 +1500,24 @@ msgstr "" "*for* ή που μπορούν να ανακτηθούν μία τη φορά με την συνάρτηση :func:`next` " "function." -#: glossary.rst:556 -msgid "" -"Usually refers to a generator function, but may refer to a *generator " -"iterator* in some contexts. In cases where the intended meaning isn't " -"clear, using the full terms avoids ambiguity." -msgstr "" -"Συνήθως αναφέρεται σε μια συνάρτηση generator, αλλά μπορεί να αναφέρεται σε " -"έναν *generator iterator* σε μερικά contexts. Σε περιπτώσεις όπου το " -"επιδιωκόμενο νόημα δεν είναι σαφές, η χρήση των πλήρων όρων αποφεύγει την " -"ασάφεια." - -#: glossary.rst:559 +#: glossary.rst:613 msgid "generator iterator" msgstr "generator iterator" -#: glossary.rst:561 -msgid "An object created by a :term:`generator` function." +#: glossary.rst:615 +#, fuzzy +msgid "" +"An object created by a :term:`generator function` or a :term:`generator " +"expression`." msgstr "Ένα αντικείμενο που δημιουργείται από μια συνάρτηση :term:`generator`." -#: glossary.rst:563 +#: glossary.rst:618 +#, fuzzy msgid "" "Each :keyword:`yield` temporarily suspends processing, remembering the " -"execution state (including local variables and pending try-statements). " -"When the *generator iterator* resumes, it picks up where it left off (in " -"contrast to functions which start fresh on every invocation)." +"execution state (including local variables and pending try-statements). When " +"the *generator iterator* resumes, it picks up where it left off (in contrast " +"to functions which start fresh on every invocation)." msgstr "" "Κάθε :keyword:`yield` αναστέλλει προσωρινά την επεξεργασία, θυμάται την " "κατάσταση εκτέλεσης (συμπεριλαμβανομένων των τοπικών μεταβλητών και των " @@ -1439,11 +1525,19 @@ msgstr "" "συνεχίζει από εκεί που σταμάτησε (σε αντίθεση με τις συναρτήσεις που " "ξεκινούν από την αρχή σε κάθε επίκληση)." -#: glossary.rst:570 +#: glossary.rst:623 +msgid "" +"Generator iterators also implement the :meth:`~generator.send` method to " +"send a value into the suspended generator, and the :meth:`~generator.throw` " +"method to raise an exception at the point where the generator was paused. " +"See :ref:`generator-methods`." +msgstr "" + +#: glossary.rst:629 msgid "generator expression" msgstr "generator έκφραση" -#: glossary.rst:572 +#: glossary.rst:631 msgid "" "An :term:`expression` that returns an :term:`iterator`. It looks like a " "normal expression followed by a :keyword:`!for` clause defining a loop " @@ -1455,7 +1549,7 @@ msgstr "" "μια μεταβλητή βρόχου, ένα εύρος και μια προαιρετική πρόταση :keyword:`!if`. " "Η συνδυασμένη έκφραση δημιουργεί τιμές για μια συνάρτηση εγκλεισμού::" -#: glossary.rst:577 +#: glossary.rst:636 msgid "" ">>> sum(i*i for i in range(10)) # sum of squares 0, 1, 4, ... 81\n" "285" @@ -1463,11 +1557,11 @@ msgstr "" ">>> sum(i*i for i in range(10)) # sum of squares 0, 1, 4, ... 81\n" "285" -#: glossary.rst:579 +#: glossary.rst:638 msgid "generic function" msgstr "γενική συνάρτηση" -#: glossary.rst:581 +#: glossary.rst:640 msgid "" "A function composed of multiple functions implementing the same operation " "for different types. Which implementation should be used during a call is " @@ -1478,7 +1572,7 @@ msgstr "" "χρησιμοποιηθεί κατά τη διάρκεια μια κλήσης καθορίζεται από τον αλγόριθμο " "αποστολής." -#: glossary.rst:585 +#: glossary.rst:644 msgid "" "See also the :term:`single dispatch` glossary entry, the :func:`functools." "singledispatch` decorator, and :pep:`443`." @@ -1486,11 +1580,11 @@ msgstr "" "Βλ. επίσης την καταχώρηση του :term:`single dispatch`, τον decorator :func:" "`functools.singledispatch` και :pep:`443`." -#: glossary.rst:587 +#: glossary.rst:646 msgid "generic type" msgstr "γενικός τύπος" -#: glossary.rst:589 +#: glossary.rst:648 msgid "" "A :term:`type` that can be parameterized; typically a :ref:`container " "class` such as :class:`list` or :class:`dict`. Used for :" @@ -1501,7 +1595,7 @@ msgstr "" "Χρησιμοποιείται για :term:`type hints ` και :term:`annotations " "`." -#: glossary.rst:594 +#: glossary.rst:653 msgid "" "For more details, see :ref:`generic alias types`, :pep:" "`483`, :pep:`484`, :pep:`585`, and the :mod:`typing` module." @@ -1510,19 +1604,19 @@ msgstr "" "genericalias>` :pep:`483`, :pep:`484`, :pep:`585`, και το module :mod:" "`typing`." -#: glossary.rst:596 +#: glossary.rst:655 msgid "GIL" msgstr "GIL" -#: glossary.rst:598 +#: glossary.rst:657 msgid "See :term:`global interpreter lock`." msgstr "Βλ. :term:`global interpreter lock`." -#: glossary.rst:599 +#: glossary.rst:658 msgid "global interpreter lock" msgstr "global interpreter lock" -#: glossary.rst:601 +#: glossary.rst:660 msgid "" "The mechanism used by the :term:`CPython` interpreter to assure that only " "one thread executes Python :term:`bytecode` at a time. This simplifies the " @@ -1541,7 +1635,7 @@ msgstr "" "του μεγάλου μέρους του παραλληλισμού που παρέχουν οι μηχανές πολλαπλών " "επεξεργαστών." -#: glossary.rst:610 +#: glossary.rst:669 msgid "" "However, some extension modules, either standard or third-party, are " "designed so as to release the GIL when doing computationally intensive tasks " @@ -1553,7 +1647,7 @@ msgstr "" "εντατικών υπολογισμών όπως συμπίεση ή κατακερματισμός. Επίσης, το GIL " "απελευθερώνεται πάντα όταν εκτελείτε I/O." -#: glossary.rst:615 +#: glossary.rst:674 msgid "" "As of Python 3.13, the GIL can be disabled using the :option:`--disable-gil` " "build configuration. After building Python with this option, code must be " @@ -1571,11 +1665,24 @@ msgstr "" "διευκολύνει τη χρήση των επεξεργαστών πολλαπλών πυρήνων με αποδοτικό τρόπο. " "Για περισσότερες λεπτομέρειες, δείτε το :pep:`703`." -#: glossary.rst:621 +#: glossary.rst:680 +msgid "global state" +msgstr "" + +#: glossary.rst:682 +msgid "" +"Data that is accessible throughout a program, such as module-level " +"variables, class variables, or C static variables in :term:`extension " +"modules `. In multi-threaded programs, global state " +"shared between threads typically requires synchronization to avoid :term:" +"`race conditions ` and :term:`data races `." +msgstr "" + +#: glossary.rst:688 msgid "hash-based pyc" msgstr "hash-based pyc" -#: glossary.rst:623 +#: glossary.rst:690 msgid "" "A bytecode cache file that uses the hash rather than the last-modified time " "of the corresponding source file to determine its validity. See :ref:`pyc-" @@ -1585,11 +1692,11 @@ msgstr "" "όχι τον χρόνο τροποποίησης του αντίστοιχου αρχείου προέλευσης για να " "προσδιορίσει την εγκυρότητα του. Βλ. :ref:`pyc-invalidation`." -#: glossary.rst:626 +#: glossary.rst:693 msgid "hashable" msgstr "hashable" -#: glossary.rst:628 +#: glossary.rst:695 msgid "" "An object is *hashable* if it has a hash value which never changes during " "its lifetime (it needs a :meth:`~object.__hash__` method), and can be " @@ -1603,7 +1710,7 @@ msgstr "" "που συγκρίνονται ως προς την ισότητα τους πρέπει να έχουν την ίδια τιμή " "κατακερματισμού." -#: glossary.rst:634 +#: glossary.rst:701 msgid "" "Hashability makes an object usable as a dictionary key and a set member, " "because these data structures use the hash value internally." @@ -1612,7 +1719,7 @@ msgstr "" "κλειδί λεξικού και ως μέλος ενός συνόλου, επειδή αυτές οι δομές δεδομένων " "χρησιμοποιούν τιμές κατακερματισμού." -#: glossary.rst:637 +#: glossary.rst:704 msgid "" "Most of Python's immutable built-in objects are hashable; mutable containers " "(such as lists or dictionaries) are not; immutable containers (such as " @@ -1629,11 +1736,11 @@ msgstr "" "μπορούν να κατακερματιστούν από προεπιλογή. Όλα συγκρίνονται άνισα εκτός από " "τον εαυτό τους) και η τιμή κατακερματισμού τους προέρχεται από το :func:`id`." -#: glossary.rst:644 +#: glossary.rst:711 msgid "IDLE" msgstr "IDLE" -#: glossary.rst:646 +#: glossary.rst:713 msgid "" "An Integrated Development and Learning Environment for Python. :ref:`idle` " "is a basic editor and interpreter environment which ships with the standard " @@ -1643,11 +1750,11 @@ msgstr "" "`idle` είναι ένα βασικό περιβάλλον επεξεργασίας και διερμηνέα που " "συνοδεύεται από την τυπική διανομή της Python." -#: glossary.rst:649 +#: glossary.rst:716 msgid "immortal" msgstr "Αθάνατο" -#: glossary.rst:651 +#: glossary.rst:718 msgid "" "*Immortal objects* are a CPython implementation detail introduced in :pep:" "`683`." @@ -1655,7 +1762,7 @@ msgstr "" "*Αθάνατα αντικείμενα* είναι μια λεπτομέρεια υλοποίησης της CPython που " "εισήχθη στην :pep:`683`." -#: glossary.rst:654 +#: glossary.rst:721 msgid "" "If an object is immortal, its :term:`reference count` is never modified, and " "therefore it is never deallocated while the interpreter is running. For " @@ -1665,17 +1772,20 @@ msgstr "" "τροποποιείται, και επομένως δεν εκχωρείται ποτέ ενώ εκτελείται ο διερμηνέας. " "Για παράδειγμα, :const:`True` και :const:`None` είναι αθάνατα στην CPython." -#: glossary.rst:657 +#: glossary.rst:724 msgid "immutable" msgstr "immutable" -#: glossary.rst:659 +#: glossary.rst:726 +#, fuzzy msgid "" "An object with a fixed value. Immutable objects include numbers, strings " "and tuples. Such an object cannot be altered. A new object has to be " "created if a different value has to be stored. They play an important role " "in places where a constant hash value is needed, for example as a key in a " -"dictionary." +"dictionary. Immutable objects are inherently :term:`thread-safe` because " +"their state cannot be modified after creation, eliminating concerns about " +"improperly synchronized :term:`concurrent modification`." msgstr "" "Ένα αντικείμενο με σταθερή τιμή. Τα αμετάβλητα αντικείμενα περιλαμβάνουν " "αριθμούς , συμβολοσειρές και πλειάδες. Ένα τέτοιο αντικείμενο δεν μπορεί να " @@ -1683,11 +1793,11 @@ msgstr "" "αποθηκευτεί μια διαφορετική τιμή. Παίζουν σημαντικό ρόλο σε μέρη όπου μια " "σταθερά απαιτείται, για παράδειγμα ως κλειδί σε ένα λεξικό." -#: glossary.rst:664 +#: glossary.rst:733 msgid "import path" msgstr "εισαγόμενο path" -#: glossary.rst:666 +#: glossary.rst:735 msgid "" "A list of locations (or :term:`path entries `) that are searched " "by the :term:`path based finder` for modules to import. During import, this " @@ -1700,11 +1810,11 @@ msgstr "" "από :data:`sys.path`, αλλά για τα υποπακέτα μπορεί επίσης να έρθει από το " "χαρακτηριστικό του πακέτου γονέα ``__path__``." -#: glossary.rst:671 +#: glossary.rst:740 msgid "importing" msgstr "εισαγωγή" -#: glossary.rst:673 +#: glossary.rst:742 msgid "" "The process by which Python code in one module is made available to Python " "code in another module." @@ -1712,11 +1822,11 @@ msgstr "" "Η διαδικασία κατά την οποία ο κώδικας της Python σε ένα module είναι " "διαθέσιμη στον κώδικα Python ενός άλλου module." -#: glossary.rst:675 +#: glossary.rst:744 msgid "importer" msgstr "εισαγωγέας" -#: glossary.rst:677 +#: glossary.rst:746 msgid "" "An object that both finds and loads a module; both a :term:`finder` and :" "term:`loader` object." @@ -1724,11 +1834,11 @@ msgstr "" "Ένα αντικείμενο μπορεί και να αναζητεί και να φορτώνει ένα module' και ένα :" "term:`finder` και :term:`loader` αντικείμενο." -#: glossary.rst:679 +#: glossary.rst:748 msgid "interactive" msgstr "διαδραστικός" -#: glossary.rst:681 +#: glossary.rst:750 msgid "" "Python has an interactive interpreter which means you can enter statements " "and expressions at the interpreter prompt, immediately execute them and see " @@ -1745,11 +1855,11 @@ msgstr "" "να εξετάστε modules και πακέτα (θυμηθείτε ``help(x)``). Για περισσότερα " "σχετικά με τη διαδραστική λειτουργία, δείτε :ref:`tut-interac`." -#: glossary.rst:688 +#: glossary.rst:757 msgid "interpreted" msgstr "interpreted" -#: glossary.rst:690 +#: glossary.rst:759 msgid "" "Python is an interpreted language, as opposed to a compiled one, though the " "distinction can be blurry because of the presence of the bytecode compiler. " @@ -1766,11 +1876,11 @@ msgstr "" "εντοπισμού σφαλμάτων από τις μεταγλωττισμένες, αν και τα προγράμματά τους " "γενικά εκτελούνται πιο αργά. Βλ. επίσης :term:`interactive`." -#: glossary.rst:697 +#: glossary.rst:766 msgid "interpreter shutdown" msgstr "τερματισμός λειτουργίας διερμηνέα" -#: glossary.rst:699 +#: glossary.rst:768 msgid "" "When asked to shut down, the Python interpreter enters a special phase where " "it gradually releases all allocated resources, such as modules and various " @@ -1792,7 +1902,7 @@ msgstr "" "βασίζεται ενδέχεται να μην λειτουργούν πλέον (συνήθη παραδείγματα είναι οι " "λειτουργικές μονάδες βιβλιοθήκης ή ο μηχανισμός ειδοποιήσεων)." -#: glossary.rst:708 +#: glossary.rst:777 msgid "" "The main reason for interpreter shutdown is that the ``__main__`` module or " "the script being run has finished executing." @@ -1800,11 +1910,11 @@ msgstr "" "Ο βασικός λόγος τερματισμού λειτουργίας του διερμηνέα είναι ότι το " "``__main__`` module ή ολοκληρώθηκε η εκτέλεση του κώδικα που έτρεχε." -#: glossary.rst:710 +#: glossary.rst:779 msgid "iterable" msgstr "iterable" -#: glossary.rst:712 +#: glossary.rst:781 msgid "" "An object capable of returning its members one at a time. Examples of " "iterables include all sequence types (such as :class:`list`, :class:`str`, " @@ -1821,7 +1931,7 @@ msgstr "" "__iter__` ή με μία μέθοδο :meth:`~object.__getitem__` που υλοποιεί τη " "σημασιολογία :term:`sequence`." -#: glossary.rst:720 +#: glossary.rst:789 msgid "" "Iterables can be used in a :keyword:`for` loop and in many other places " "where a sequence is needed (:func:`zip`, :func:`map`, ...). When an " @@ -1845,11 +1955,11 @@ msgstr "" "του βρόχου. Βλ. επίσης :term:`iterator`, :term:`sequence`, και :term:" "`generator`." -#: glossary.rst:730 +#: glossary.rst:799 msgid "iterator" msgstr "iterator" -#: glossary.rst:732 +#: glossary.rst:801 msgid "" "An object representing a stream of data. Repeated calls to the iterator's :" "meth:`~iterator.__next__` method (or passing it to the built-in function :" @@ -1884,26 +1994,28 @@ msgstr "" "εξαντλημένο αντικείμενο iterator που χρησιμοποιήθηκε στο προηγούμενο πέρασμα " "iteration , κάνοντας το να φαίνεται σαν ένα άδειο κοντέινερ." -#: glossary.rst:747 +#: glossary.rst:816 msgid "More information can be found in :ref:`typeiter`." msgstr "Περισσότερες πληροφορίες μπορούν να βρεθούν στο :ref:`typeiter`." -#: glossary.rst:751 +#: glossary.rst:820 +#, fuzzy msgid "" "CPython does not consistently apply the requirement that an iterator define :" -"meth:`~iterator.__iter__`. And also please note that the free-threading " -"CPython does not guarantee the thread-safety of iterator operations." +"meth:`~iterator.__iter__`. And also please note that :term:`free-threaded " +"` CPython does not guarantee :term:`thread-safe` behavior of " +"iterator operations." msgstr "" "Το CPython δεν εφαρμόζει με συνέπεια την απαίτηση να ορίζει ένας iterator :" "meth:`~iterator.__iter__`. Επίσης σημειώστε ότι η έκδοση CPython με ελεύθερη " "υποστήριξη νημάτων δεν εγγυάται την ασφάλεια νημάτων για διαδικασίες με " "iterators." -#: glossary.rst:756 +#: glossary.rst:826 msgid "key function" msgstr "συνάρτηση key" -#: glossary.rst:758 +#: glossary.rst:828 msgid "" "A key function or collation function is a callable that returns a value used " "for sorting or ordering. For example, :func:`locale.strxfrm` is used to " @@ -1915,7 +2027,7 @@ msgstr "" "κλειδιού ταξινόμησης που γνωρίζει τις συμβάσεις ταξινόμησης για " "συγκεκριμένες τοπικές ρυθμίσεις." -#: glossary.rst:763 +#: glossary.rst:833 msgid "" "A number of tools in Python accept key functions to control how elements are " "ordered or grouped. They include :func:`min`, :func:`max`, :func:`sorted`, :" @@ -1928,11 +2040,12 @@ msgstr "" "`heapq.merge`, :func:`heapq.nsmallest`, :func:`heapq. nlargest`, και :func:" "`itertools.groupby`." -#: glossary.rst:769 +#: glossary.rst:839 +#, fuzzy msgid "" "There are several ways to create a key function. For example. the :meth:" -"`str.lower` method can serve as a key function for case insensitive sorts. " -"Alternatively, a key function can be built from a :keyword:`lambda` " +"`str.casefold` method can serve as a key function for case insensitive " +"sorts. Alternatively, a key function can be built from a :keyword:`lambda` " "expression such as ``lambda r: (r[0], r[2])``. Also, :func:`operator." "attrgetter`, :func:`operator.itemgetter`, and :func:`operator.methodcaller` " "are three key function constructors. See the :ref:`Sorting HOW TO " @@ -1948,19 +2061,19 @@ msgstr "" "TO` για παραδείγματα δημιουργίας και χρήσης βασικών " "συναρτήσεων." -#: glossary.rst:776 +#: glossary.rst:846 msgid "keyword argument" msgstr "όρισμα keyword" -#: glossary.rst:1093 +#: glossary.rst:1226 msgid "See :term:`argument`." msgstr "Βλ. :term:`argument`." -#: glossary.rst:779 +#: glossary.rst:849 msgid "lambda" msgstr "lambda" -#: glossary.rst:781 +#: glossary.rst:851 msgid "" "An anonymous inline function consisting of a single :term:`expression` which " "is evaluated when the function is called. The syntax to create a lambda " @@ -1971,11 +2084,11 @@ msgstr "" "τη δημιουργία μιας συνάρτησης lambda είναι ``lambda [parameters]: " "expression``" -#: glossary.rst:784 +#: glossary.rst:854 msgid "LBYL" msgstr "LBYL" -#: glossary.rst:786 +#: glossary.rst:856 msgid "" "Look before you leap. This coding style explicitly tests for pre-conditions " "before making calls or lookups. This style contrasts with the :term:`EAFP` " @@ -1987,13 +2100,15 @@ msgstr "" "έρχεται σε αντίθεση με την προσέγγιση :term:`EAFP` και χαρακτηρίζεται από " "την παρουσία πολλών δηλώσεων :keyword:`if`." -#: glossary.rst:791 +#: glossary.rst:861 +#, fuzzy msgid "" -"In a multi-threaded environment, the LBYL approach can risk introducing a " -"race condition between \"the looking\" and \"the leaping\". For example, " -"the code, ``if key in mapping: return mapping[key]`` can fail if another " -"thread removes *key* from *mapping* after the test, but before the lookup. " -"This issue can be solved with locks or by using the EAFP approach." +"In a multi-threaded environment, the LBYL approach can risk introducing a :" +"term:`race condition` between \"the looking\" and \"the leaping\". For " +"example, the code, ``if key in mapping: return mapping[key]`` can fail if " +"another thread removes *key* from *mapping* after the test, but before the " +"lookup. This issue can be solved with :term:`locks ` or by using the :" +"term:`EAFP` approach. See also :term:`thread-safe`." msgstr "" "Σε ένα περιβάλλον πολλαπλών νημάτων, η προσέγγιση LBYL μπορεί να " "διακινδυνεύσει να εισάγει μια συνθήκη αγώνα μεταξύ \"the Looking\" και \"the " @@ -2002,19 +2117,19 @@ msgstr "" "το *mapping* μετά τη δοκιμή, αλλά πριν από την αναζήτηση. Αυτό το πρόβλημα " "μπορεί να λυθεί με κλειδώματα ή χρησιμοποιώντας την προσέγγιση EAFP." -#: glossary.rst:796 +#: glossary.rst:867 msgid "lexical analyzer" msgstr "λεξικός αναλυτής" -#: glossary.rst:799 +#: glossary.rst:870 msgid "Formal name for the *tokenizer*; see :term:`token`." msgstr "Επίσημη ονομασία για τον *tokenizer* · βλ. :term:`token`." -#: glossary.rst:800 +#: glossary.rst:871 msgid "list" msgstr "λίστα" -#: glossary.rst:802 +#: glossary.rst:873 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 " @@ -2024,11 +2139,11 @@ msgstr "" "περισσότερο με έναν πίνακα σε άλλες γλώσσες παρά με μια συνδεδεμένη λίστα, " "καθώς η πρόσβαση στα στοιχεί είναι *O*\\ (1)." -#: glossary.rst:805 +#: glossary.rst:876 msgid "list comprehension" msgstr "list comprehension" -#: glossary.rst:807 +#: glossary.rst:878 msgid "" "A compact way to process all or part of the elements in a sequence and " "return a list with the results. ``result = ['{:#04x}'.format(x) for x in " @@ -2043,11 +2158,46 @@ msgstr "" "από 0 έως 255. Η πρόταση :keyword:`if` είναι προαιρετική. Εάν παραλειφθεί, " "όλα τα στοιχεία στο ``range(256)`` υποβάλλονται σε επεξεργασία." -#: glossary.rst:813 +#: glossary.rst:884 +msgid "lock" +msgstr "" + +#: glossary.rst:886 +msgid "" +"A :term:`synchronization primitive` that allows only one thread at a time to " +"access a shared resource. A thread must acquire a lock before accessing the " +"protected resource and release it afterward. If a thread attempts to " +"acquire a lock that is already held by another thread, it will block until " +"the lock becomes available. Python's :mod:`threading` module provides :" +"class:`~threading.Lock` (a basic lock) and :class:`~threading.RLock` (a :" +"term:`reentrant` lock). Locks are used to prevent :term:`race conditions " +"` and ensure :term:`thread-safe` access to shared data. " +"Alternative design patterns to locks exist such as queues, producer/consumer " +"patterns, and thread-local state. See also :term:`deadlock`, and :term:" +"`reentrant`." +msgstr "" + +#: glossary.rst:897 +msgid "lock-free" +msgstr "" + +#: glossary.rst:899 +msgid "" +"An operation that does not acquire any :term:`lock` and uses atomic CPU " +"instructions to ensure correctness. Lock-free operations can execute " +"concurrently without blocking each other and cannot be blocked by operations " +"that hold locks. In :term:`free-threaded ` Python, built-in " +"types like :class:`dict` and :class:`list` provide lock-free read " +"operations, which means other threads may observe intermediate states during " +"multi-step modifications even when those modifications hold the :term:`per-" +"object lock`." +msgstr "" + +#: glossary.rst:907 msgid "loader" msgstr "loader" -#: glossary.rst:815 +#: glossary.rst:909 msgid "" "An object that loads a module. It must define the :meth:`!exec_module` and :" "meth:`!create_module` methods to implement the :class:`~importlib.abc." @@ -2059,23 +2209,23 @@ msgstr "" "class:`~importlib.abc.Loader`. Ένας loader συνήθως επιστρέφεται με ένα :term:" "`finder`. Δείτε επίσης:" -#: glossary.rst:821 +#: glossary.rst:915 msgid ":ref:`finders-and-loaders`" msgstr ":ref:`finders-and-loaders`" -#: glossary.rst:822 +#: glossary.rst:916 msgid ":class:`importlib.abc.Loader`" msgstr ":class:`importlib.abc.Loader`" -#: glossary.rst:823 +#: glossary.rst:917 msgid ":pep:`302`" msgstr ":pep:`302`" -#: glossary.rst:824 +#: glossary.rst:918 msgid "locale encoding" msgstr "τοπική κωδικοποίηση" -#: glossary.rst:826 +#: glossary.rst:920 msgid "" "On Unix, it is the encoding of the LC_CTYPE locale. It can be set with :func:" "`locale.setlocale(locale.LC_CTYPE, new_locale) `." @@ -2084,40 +2234,40 @@ msgstr "" "ρυθμιστεί με :func:`locale.setlocale(locale.LC_CTYPE, new_locale) `." -#: glossary.rst:829 +#: glossary.rst:923 msgid "On Windows, it is the ANSI code page (ex: ``\"cp1252\"``)." msgstr "Στα Windows, είναι η code page ANSI (π.χ. ``\"cp1252\"``)." -#: glossary.rst:831 +#: glossary.rst:925 msgid "" "On Android and VxWorks, Python uses ``\"utf-8\"`` as the locale encoding." msgstr "" "Στο Android και το VxWorks, η Python χρησιμοποιεί το ``\"utf-8\"`` ως τοπική " "κωδικοποίηση." -#: glossary.rst:833 +#: glossary.rst:927 msgid ":func:`locale.getencoding` can be used to get the locale encoding." msgstr "" ":func:`locale.getencoding` μπορεί να χρησιμοποιηθεί για την ανάκτηση της " "τοπικής κωδικοποίησης." -#: glossary.rst:835 +#: glossary.rst:929 msgid "See also the :term:`filesystem encoding and error handler`." msgstr "Βλ. επίσης το :term:`filesystem encoding and error handler`." -#: glossary.rst:836 +#: glossary.rst:930 msgid "magic method" msgstr "μαγική μέθοδος" -#: glossary.rst:840 +#: glossary.rst:934 msgid "An informal synonym for :term:`special method`." msgstr "Ένα άτυπο συνώνυμο για :term:`special method`." -#: glossary.rst:841 +#: glossary.rst:935 msgid "mapping" msgstr "mapping" -#: glossary.rst:843 +#: glossary.rst:937 msgid "" "A container object that supports arbitrary key lookups and implements the " "methods specified in the :class:`collections.abc.Mapping` or :class:" @@ -2133,11 +2283,11 @@ msgstr "" "class:`dict`, :class:`collections.defaultdict`, :class:`collections." "OrderedDict` και :class:`collections.Counter`." -#: glossary.rst:849 +#: glossary.rst:943 msgid "meta path finder" msgstr "meta path finder" -#: glossary.rst:851 +#: glossary.rst:945 msgid "" "A :term:`finder` returned by a search of :data:`sys.meta_path`. Meta path " "finders are related to, but different from :term:`path entry finders `." -#: glossary.rst:855 +#: glossary.rst:949 msgid "" "See :class:`importlib.abc.MetaPathFinder` for the methods that meta path " "finders implement." @@ -2155,11 +2305,11 @@ msgstr "" "Βλ. :class:`importlib.abc.MetaPathFinder` για τις μεθόδους που υλοποιούν οι " "meta path finders." -#: glossary.rst:857 +#: glossary.rst:951 msgid "metaclass" msgstr "μετα-κλάση" -#: glossary.rst:859 +#: glossary.rst:953 msgid "" "The class of a class. Class definitions create a class name, a class " "dictionary, and a list of base classes. The metaclass is responsible for " @@ -2183,15 +2333,15 @@ msgstr "" "ασφάλειας νημάτων, την παρακολούθηση δημιουργίας αντικειμένων, την υλοποίηση " "*singletons*, και πολλές άλλες εργασίες." -#: glossary.rst:869 +#: glossary.rst:963 msgid "More information can be found in :ref:`metaclasses`." msgstr "Περισσότερες πληροφορίες μπορούν να βρεθούν στο :ref:`metaclasses`." -#: glossary.rst:1244 +#: glossary.rst:1408 msgid "method" msgstr "μέθοδος" -#: glossary.rst:872 +#: glossary.rst:966 msgid "" "A function which is defined inside a class body. If called as an attribute " "of an instance of that class, the method will get the instance object as its " @@ -2203,11 +2353,11 @@ msgstr "" "αντικείμενο περίπτωσης ως πρώτο της :term:`argument` (το οποίο συνήθως " "ονομάζεται ``self``). Βλ. :term:`function` και :term:`nested scope`." -#: glossary.rst:876 +#: glossary.rst:970 msgid "method resolution order" msgstr "σειρά ανάλυσης μεθόδων" -#: glossary.rst:878 +#: glossary.rst:972 msgid "" "Method Resolution Order is the order in which base classes are searched for " "a member during lookup. See :ref:`python_2.3_mro` for details of the " @@ -2218,11 +2368,11 @@ msgstr "" "για λεπτομέρειες του αλγορίθμου που χρησιμοποιείται από τον διερμηνέα της " "Python από την έκδοση 2.3." -#: glossary.rst:881 +#: glossary.rst:975 msgid "module" msgstr "module" -#: glossary.rst:883 +#: glossary.rst:977 msgid "" "An object that serves as an organizational unit of Python code. Modules " "have a namespace containing arbitrary Python objects. Modules are loaded " @@ -2233,15 +2383,15 @@ msgstr "" "Python. Τα modules φορτώνονται στην Python με την διαδικασία :term:" "`importing`." -#: glossary.rst:887 +#: glossary.rst:981 msgid "See also :term:`package`." msgstr "Βλ. επίσης :term:`package`." -#: glossary.rst:888 +#: glossary.rst:982 msgid "module spec" msgstr "τεχνικές προδιαγραφές module" -#: glossary.rst:890 +#: glossary.rst:984 msgid "" "A namespace containing the import-related information used to load a module. " "An instance of :class:`importlib.machinery.ModuleSpec`." @@ -2250,35 +2400,36 @@ msgstr "" "που χρησιμοποιούνται για την φόρτωση ενός module. Μια περίπτωση του :class:" "`importlib.machinery.ModuleSpec`." -#: glossary.rst:893 +#: glossary.rst:987 msgid "See also :ref:`module-specs`." msgstr "Βλ. επίσης :ref:`module-specs`." -#: glossary.rst:894 +#: glossary.rst:988 msgid "MRO" msgstr "MRO" -#: glossary.rst:896 +#: glossary.rst:990 msgid "See :term:`method resolution order`." msgstr "Βλ. :term:`method resolution order`." -#: glossary.rst:897 +#: glossary.rst:991 msgid "mutable" msgstr "mutable" -#: glossary.rst:899 +#: glossary.rst:993 msgid "" -"Mutable objects can change their value but keep their :func:`id`. See also :" -"term:`immutable`." +"An :term:`object` with state that is allowed to change during the course of " +"the program. In multi-threaded programs, mutable objects that are shared " +"between threads require careful synchronization to avoid :term:`race " +"conditions `. See also :term:`immutable`, :term:`thread-" +"safe`, and :term:`concurrent modification`." msgstr "" -"Τα ευμετάβλητα αντικείμενα μπορούν να αλλάξουν τις τιμές αλλά να κρατήσουν " -"τα :func:`id`. Βλ. επίσης :term:`immutable`." -#: glossary.rst:901 +#: glossary.rst:998 msgid "named tuple" msgstr "named tuple" -#: glossary.rst:903 +#: glossary.rst:1000 msgid "" "The term \"named tuple\" applies to any type or class that inherits from " "tuple and whose indexable elements are also accessible using named " @@ -2289,7 +2440,7 @@ msgstr "" "ευρετηριοποιηθούν είναι προσβάσιμα χρησιμοποιώντας επώνυμα χαρακτηριστικά. " "Ο τύπος ή η κλάση μπορεί να έχει και άλλα χαρακτηριστικά." -#: glossary.rst:907 +#: glossary.rst:1004 msgid "" "Several built-in types are named tuples, including the values returned by :" "func:`time.localtime` and :func:`os.stat`. Another example is :data:`sys." @@ -2299,7 +2450,7 @@ msgstr "" "που επιστρέφονται από :func:`time.localtime` και :func:`os.stat`. Ένα άλλο " "παράδειγμα είναι το :data:`sys.float_info`::" -#: glossary.rst:911 +#: glossary.rst:1008 msgid "" ">>> sys.float_info[1] # indexed access\n" "1024\n" @@ -2315,7 +2466,7 @@ msgstr "" ">>> isinstance(sys.float_info, tuple) # kind of tuple\n" "True" -#: glossary.rst:918 +#: glossary.rst:1015 msgid "" "Some named tuples are built-in types (such as the above examples). " "Alternatively, a named tuple can be created from a regular class definition " @@ -2334,11 +2485,11 @@ msgstr "" "τελευταίες τεχνικές προσθέτουν επίσης μερικές επιπλέον μεθόδους που μπορεί " "να μην βρεθούν σε χειρόγραφες ή ενσωματωμένες πλειάδες με όνομα." -#: glossary.rst:926 +#: glossary.rst:1023 msgid "namespace" msgstr "namespace" -#: glossary.rst:928 +#: glossary.rst:1025 msgid "" "The place where a variable is stored. Namespaces are implemented as " "dictionaries. There are the local, global and built-in namespaces as well " @@ -2360,11 +2511,11 @@ msgstr "" "seed` ή :func:`itertools.islice` καθιστά σαφές ότι αυτές οι συναρτήσεις " "υλοποιούνται από τα module :mod:`random` και :mod:`itertools`, αντίστοιχα." -#: glossary.rst:938 +#: glossary.rst:1035 msgid "namespace package" msgstr "πακέτο namespace" -#: glossary.rst:940 +#: glossary.rst:1037 msgid "" "A :term:`package` which serves only as a container for subpackages. " "Namespace packages may have no physical representation, and specifically are " @@ -2375,7 +2526,7 @@ msgstr "" "συγκεκριμένα να μην είναι σαν ένα :term:`regular package` επειδή δεν έχουν " "το ``__init__.py`` αρχείο." -#: glossary.rst:945 +#: glossary.rst:1042 msgid "" "Namespace packages allow several individually installable packages to have a " "common parent package. Otherwise, it is recommended to use a :term:`regular " @@ -2385,22 +2536,36 @@ msgstr "" "εγκατάστασης μεμονωμένα να έχουν ένα κοινό γονικό πακέτο. Διαφορετικά, " "συνίσταται η χρήση ενός :term:`regular package`." -#: glossary.rst:948 +#: glossary.rst:1045 msgid "" "For more information, see :pep:`420` and :ref:`reference-namespace-package`." msgstr "" "Για περισσότερες πληροφορίες, δείτε το :pep:`420` και το :ref:`reference-" "namespace-package`." -#: glossary.rst:950 +#: glossary.rst:1047 msgid "See also :term:`module`." msgstr "Βλ. επίσης :term:`module`." -#: glossary.rst:951 +#: glossary.rst:1048 +#, fuzzy +msgid "native code" +msgstr "bytecode" + +#: glossary.rst:1050 +msgid "" +"Code that is compiled to machine instructions and runs directly on the " +"processor, as opposed to code that is interpreted or runs in a virtual " +"machine. In the context of Python, native code typically refers to C, C++, " +"Rust or Fortran code in :term:`extension modules ` that " +"can be called from Python. See also :term:`extension module`." +msgstr "" + +#: glossary.rst:1055 msgid "nested scope" msgstr "nested scope" -#: glossary.rst:953 +#: glossary.rst:1057 msgid "" "The ability to refer to a variable in an enclosing definition. For " "instance, a function defined inside another function can refer to variables " @@ -2417,11 +2582,11 @@ msgstr "" "Ομοίως, οι καθολικές μεταβλητές διαβάζουν και γράφουν στον καθολικό χώρο " "ονομάτων. Το :keyword:`nonlocal` επιτρέπει την εγγραφή σε εξωτερικά πεδία." -#: glossary.rst:960 +#: glossary.rst:1064 msgid "new-style class" msgstr "κλάση νέου στυλ" -#: glossary.rst:962 +#: glossary.rst:1066 msgid "" "Old name for the flavor of classes now used for all class objects. In " "earlier Python versions, only new-style classes could use Python's newer, " @@ -2434,11 +2599,25 @@ msgstr "" "όπως :attr:`~object.__slots__`, descriptors, ιδιότητες :meth:`~object." "__getattribute__`, μέθοδοι κλάσης, και στατικές μέθοδοι." -#: glossary.rst:967 +#: glossary.rst:1071 +msgid "non-deterministic" +msgstr "" + +#: glossary.rst:1073 +msgid "" +"Behavior where the outcome of a program can vary between executions with the " +"same inputs. In multi-threaded programs, non-deterministic behavior often " +"results from :term:`race conditions ` where the relative " +"timing or interleaving of threads affects the result. Proper synchronization " +"using :term:`locks ` and other :term:`synchronization primitives " +"` helps ensure deterministic behavior." +msgstr "" + +#: glossary.rst:1080 msgid "object" msgstr "αντικείμενο" -#: glossary.rst:969 +#: glossary.rst:1082 msgid "" "Any data with state (attributes or value) and defined behavior (methods). " "Also the ultimate base class of any :term:`new-style class`." @@ -2447,11 +2626,11 @@ msgstr "" "συμπεριφορά (μέθοδοι). Επίσης, η τελική βασική κλάση οποιασδήποτε :term:`new-" "style class`." -#: glossary.rst:972 +#: glossary.rst:1085 msgid "optimized scope" msgstr "βελτιστοποιημένο πεδίο ορατότητας (scope)" -#: glossary.rst:974 +#: glossary.rst:1087 msgid "" "A scope where target local variable names are reliably known to the compiler " "when the code is compiled, allowing optimization of read and write access to " @@ -2471,11 +2650,11 @@ msgstr "" "εκείνες που βασίζονται σε γνωστό σύνολο τοπικών και μη τοπικών μεταβλητών " "περιορίζονται σε βελτιστοποιημένα πεδία ορατότητας." -#: glossary.rst:981 +#: glossary.rst:1094 msgid "package" msgstr "πακέτο" -#: glossary.rst:983 +#: glossary.rst:1096 msgid "" "A Python :term:`module` which can contain submodules or recursively, " "subpackages. Technically, a package is a Python module with a ``__path__`` " @@ -2485,15 +2664,30 @@ msgstr "" "υποπακέτα. Τεχνικά, ένα πακέτο είναι μια λειτουργική μονάδα Python με ένα " "``__path__`` χαρακτηριστικό." -#: glossary.rst:987 +#: glossary.rst:1100 msgid "See also :term:`regular package` and :term:`namespace package`." msgstr "Βλ. επίσης :term:`regular package` και :term:`namespace package`." -#: glossary.rst:988 +#: glossary.rst:1101 +msgid "parallelism" +msgstr "" + +#: glossary.rst:1103 +msgid "" +"Executing multiple operations at the same time (e.g. on multiple CPU " +"cores). In Python builds with the :term:`global interpreter lock (GIL) " +"`, only one thread runs Python bytecode at a time, " +"so taking advantage of multiple CPU cores typically involves multiple " +"processes (e.g. :mod:`multiprocessing`) or native extensions that release " +"the GIL. In :term:`free-threaded ` Python, multiple Python " +"threads can run Python code simultaneously on different cores." +msgstr "" + +#: glossary.rst:1111 msgid "parameter" msgstr "παράμετρος" -#: glossary.rst:990 +#: glossary.rst:1113 msgid "" "A named entity in a :term:`function` (or method) definition that specifies " "an :term:`argument` (or in some cases, arguments) that the function can " @@ -2503,7 +2697,7 @@ msgstr "" "καθορίζει ένα :term:`argument` (ή σε ορισμένες περιπτώσεις, ορίσματα) που " "μπορεί να δεχθεί η συνάρτηση. Υπάρχουν πέντε είδη παραμέτρων:" -#: glossary.rst:994 +#: glossary.rst:1117 msgid "" ":dfn:`positional-or-keyword`: specifies an argument that can be passed " "either :term:`positionally ` or as a :term:`keyword argument " @@ -2515,11 +2709,11 @@ msgstr "" "`. Αυτό είναι το προεπιλεγμένο είδος παραμέτρου, για παράδειγμα " "*foo* και *bar* στα ακόλουθα::" -#: glossary.rst:999 +#: glossary.rst:1122 msgid "def func(foo, bar=None): ..." msgstr "def func(foo, bar=None): ..." -#: glossary.rst:1003 +#: glossary.rst:1126 msgid "" ":dfn:`positional-only`: specifies an argument that can be supplied only by " "position. Positional-only parameters can be defined by including a ``/`` " @@ -2531,11 +2725,11 @@ msgstr "" "χαρακτήρα ``/`` στη λίστα παραμέτρων του ορισμού συνάρτησης μετά από αυτές, " "για παράδειγμα *posonly1* και *posonly2* στα εξής::" -#: glossary.rst:1008 +#: glossary.rst:1131 msgid "def func(posonly1, posonly2, /, positional_or_keyword): ..." msgstr "def func(posonly1, posonly2, /, positional_or_keyword): ..." -#: glossary.rst:1012 +#: glossary.rst:1135 msgid "" ":dfn:`keyword-only`: specifies an argument that can be supplied only by " "keyword. Keyword-only parameters can be defined by including a single var-" @@ -2549,11 +2743,11 @@ msgstr "" "του ορισμού συνάρτησης πριν από αυτές, για παράδειγμα *kw_only1* και " "*kw_only2* στα ακόλουθα::" -#: glossary.rst:1018 +#: glossary.rst:1141 msgid "def func(arg, *, kw_only1, kw_only2): ..." msgstr "def func(arg, *, kw_only1, kw_only2): ..." -#: glossary.rst:1020 +#: glossary.rst:1143 msgid "" ":dfn:`var-positional`: specifies that an arbitrary sequence of positional " "arguments can be provided (in addition to any positional arguments already " @@ -2567,11 +2761,11 @@ msgstr "" "προσαρτώντας το όνομα της παραμέτρου με ``*``, για παράδειγμα *args* στα " "ακόλουθα::" -#: glossary.rst:1026 +#: glossary.rst:1149 msgid "def func(*args, **kwargs): ..." msgstr "def func(*args, **kwargs): ..." -#: glossary.rst:1028 +#: glossary.rst:1151 msgid "" ":dfn:`var-keyword`: specifies that arbitrarily many keyword arguments can be " "provided (in addition to any keyword arguments already accepted by other " @@ -2584,7 +2778,7 @@ msgstr "" "οριστεί προσαρτώντας το όνομα της παραμέτρου με ``**``, για παράδειγμα " "*kwargs* όπως παραπάνω." -#: glossary.rst:1034 +#: glossary.rst:1157 msgid "" "Parameters can specify both optional and required arguments, as well as " "default values for some optional arguments." @@ -2593,7 +2787,7 @@ msgstr "" "απαιτούμενα ορίσματα , καθώς και προεπιλεγμένες τιμές για ορισμένα " "προαιρετικά ορίσματα." -#: glossary.rst:1037 +#: glossary.rst:1160 msgid "" "See also the :term:`argument` glossary entry, the FAQ question on :ref:`the " "difference between arguments and parameters `, " @@ -2605,11 +2799,26 @@ msgstr "" "parameter>`, την κλάση :class:`inspect.Parameter`, την ενότητα :ref:" "`function` και :pep:`362`." -#: glossary.rst:1041 +#: glossary.rst:1164 +msgid "per-object lock" +msgstr "" + +#: glossary.rst:1166 +msgid "" +"A :term:`lock` associated with an individual object instance rather than a " +"global lock shared across all objects. In :term:`free-threaded ` Python, built-in types like :class:`dict` and :class:`list` use " +"per-object locks to allow concurrent operations on different objects while " +"serializing operations on the same object. Operations that hold the per-" +"object lock prevent other locking operations on the same object from " +"proceeding, but do not block :term:`lock-free` operations." +msgstr "" + +#: glossary.rst:1174 msgid "path entry" msgstr "path entry" -#: glossary.rst:1043 +#: glossary.rst:1176 msgid "" "A single location on the :term:`import path` which the :term:`path based " "finder` consults to find modules for importing." @@ -2617,11 +2826,11 @@ msgstr "" "Μια μεμονωμένη τοποθεσία στο :term:`import path` την οποία συμβουλεύεται ο :" "term:`path based finder` για να βρει modules για εισαγωγή." -#: glossary.rst:1045 +#: glossary.rst:1178 msgid "path entry finder" msgstr "path entry finder" -#: glossary.rst:1047 +#: glossary.rst:1180 msgid "" "A :term:`finder` returned by a callable on :data:`sys.path_hooks` (i.e. a :" "term:`path entry hook`) which knows how to locate modules given a :term:" @@ -2631,7 +2840,7 @@ msgstr "" "path_hooks` (δηλαδή ένα :term:`path entry hook`) που ξέρει πως να εντοπίζει " "modules με :term:`path entry`." -#: glossary.rst:1051 +#: glossary.rst:1184 msgid "" "See :class:`importlib.abc.PathEntryFinder` for the methods that path entry " "finders implement." @@ -2639,11 +2848,11 @@ msgstr "" "Βλ. :class:`importlib.abc.PathEntryFinder` για τις μεθόδους που ο entry " "finder διαδρομής υλοποιεί." -#: glossary.rst:1053 +#: glossary.rst:1186 msgid "path entry hook" msgstr "path entry hook" -#: glossary.rst:1055 +#: glossary.rst:1188 msgid "" "A callable on the :data:`sys.path_hooks` list which returns a :term:`path " "entry finder` if it knows how to find modules on a specific :term:`path " @@ -2653,11 +2862,11 @@ msgstr "" "term:`path entry finder` εάν ξέρει πως να βρίσκει module σε μια " "συγκεκριμένη :term:`path entry`." -#: glossary.rst:1058 +#: glossary.rst:1191 msgid "path based finder" msgstr "path based finder" -#: glossary.rst:1060 +#: glossary.rst:1193 msgid "" "One of the default :term:`meta path finders ` which " "searches an :term:`import path` for modules." @@ -2665,11 +2874,11 @@ msgstr "" "Ένα από τα προεπιλεγμένα :term:`meta path finders ` που " "αναζητά ένα :term:`import path` για modules." -#: glossary.rst:1062 +#: glossary.rst:1195 msgid "path-like object" msgstr "path-like αντικείμενο" -#: glossary.rst:1064 +#: glossary.rst:1197 msgid "" "An object representing a file system path. A path-like object is either a :" "class:`str` or :class:`bytes` object representing a path, or an object " @@ -2690,11 +2899,11 @@ msgstr "" "ενός αποτελέσματος :class:`str` ή :class:`bytes`, αντίστοιχα. Εισήχθη από " "τον :pep:`519`." -#: glossary.rst:1072 +#: glossary.rst:1205 msgid "PEP" msgstr "PEP" -#: glossary.rst:1074 +#: glossary.rst:1207 msgid "" "Python Enhancement Proposal. A PEP is a design document providing " "information to the Python community, or describing a new feature for Python " @@ -2707,7 +2916,7 @@ msgstr "" "μια συνοπτική τεχνική προδιαγραφή και μια λογική για τα προτεινόμενα " "χαρακτηριστικά." -#: glossary.rst:1080 +#: glossary.rst:1213 msgid "" "PEPs are intended to be the primary mechanisms for proposing major new " "features, for collecting community input on an issue, and for documenting " @@ -2721,15 +2930,15 @@ msgstr "" "στην Python. Ο συγγραφέας του PEP είναι υπεύθυνος για την οικοδόμηση " "συναίνεσης εντός της κοινότητας και την τεκμηρίωση αντίθετων απόψεων." -#: glossary.rst:1086 +#: glossary.rst:1219 msgid "See :pep:`1`." msgstr "Βλ. :pep:`1`." -#: glossary.rst:1087 +#: glossary.rst:1220 msgid "portion" msgstr "τμήμα" -#: glossary.rst:1089 +#: glossary.rst:1222 msgid "" "A set of files in a single directory (possibly stored in a zip file) that " "contribute to a namespace package, as defined in :pep:`420`." @@ -2738,15 +2947,15 @@ msgstr "" "αρχείο *zip*) που συμβάλλουν σε ένα namespace πακέτο, όπως ορίζεται στο :pep:" "`420`." -#: glossary.rst:1091 +#: glossary.rst:1224 msgid "positional argument" msgstr "όρισμα θέσης" -#: glossary.rst:1094 +#: glossary.rst:1227 msgid "provisional API" msgstr "provisional API" -#: glossary.rst:1096 +#: glossary.rst:1229 msgid "" "A provisional API is one which has been deliberately excluded from the " "standard library's backwards compatibility guarantees. While major changes " @@ -2765,7 +2974,7 @@ msgstr "" "αποκαλυφθούν σοβαρά θεμελιώδη ελαττώματα που παραλείφθηκαν πριν από τη " "συμπερίληψη του API." -#: glossary.rst:1105 +#: glossary.rst:1238 msgid "" "Even for provisional APIs, backwards incompatible changes are seen as a " "\"solution of last resort\" - every attempt will still be made to find a " @@ -2775,7 +2984,7 @@ msgstr "" "\"λύση έσχατης ανάγκης\"- θα εξακολουθεί να γίνεται κάθε προσπάθεια για να " "βρεθεί μια λύση backwards συμβατή σε τυχόν εντοπισμένα προβλήματα." -#: glossary.rst:1109 +#: glossary.rst:1242 msgid "" "This process allows the standard library to continue to evolve over time, " "without locking in problematic design errors for extended periods of time. " @@ -2786,19 +2995,19 @@ msgstr "" "σφάλματα σχεδιασμού για εκτεταμένες χρονικές περιόδους. Βλ. :pep:`411` για " "περισσότερες λεπτομέρειες." -#: glossary.rst:1112 +#: glossary.rst:1245 msgid "provisional package" msgstr "provisional πακέτο" -#: glossary.rst:1114 +#: glossary.rst:1247 msgid "See :term:`provisional API`." msgstr "Βλ. :term:`provisional API`." -#: glossary.rst:1115 +#: glossary.rst:1248 msgid "Python 3000" msgstr "Python 3000" -#: glossary.rst:1117 +#: glossary.rst:1250 msgid "" "Nickname for the Python 3.x release line (coined long ago when the release " "of version 3 was something in the distant future.) This is also abbreviated " @@ -2808,11 +3017,11 @@ msgstr "" "όταν η κυκλοφορία της έκδοσης 3 ήταν κάτι στο μακρινό μέλλον.) Αυτό " "ονομάζεται επίσης ως συντομογραφία \"Py3k\"." -#: glossary.rst:1120 +#: glossary.rst:1253 msgid "Pythonic" msgstr "Pythonic" -#: glossary.rst:1122 +#: glossary.rst:1255 msgid "" "An idea or piece of code which closely follows the most common idioms of the " "Python language, rather than implementing code using concepts common to " @@ -2829,7 +3038,7 @@ msgstr "" "κατασκευής, έτσι οι άνθρωποι που δεν είναι εξοικειωμένοι με την Python " "χρησιμοποιούν μερικές φορές έναν αριθμητικό μετρητή::" -#: glossary.rst:1129 +#: glossary.rst:1262 msgid "" "for i in range(len(food)):\n" " print(food[i])" @@ -2837,11 +3046,11 @@ msgstr "" "for i in range(len(food)):\n" " print(food[i])" -#: glossary.rst:1132 +#: glossary.rst:1265 msgid "As opposed to the cleaner, Pythonic method::" msgstr "Αντίθετα, μια πιο καθαρή μέθοδος Pythonic::" -#: glossary.rst:1134 +#: glossary.rst:1267 msgid "" "for piece in food:\n" " print(piece)" @@ -2849,11 +3058,11 @@ msgstr "" "for piece in food:\n" " print(piece)" -#: glossary.rst:1136 +#: glossary.rst:1269 msgid "qualified name" msgstr "αναγνωρισμένο όνομα" -#: glossary.rst:1138 +#: glossary.rst:1271 msgid "" "A dotted name showing the \"path\" from a module's global scope to a class, " "function or method defined in that module, as defined in :pep:`3155`. For " @@ -2865,7 +3074,7 @@ msgstr "" "ενότητα, όπως ορίζεται στο :pep:`3155`. Για συναρτήσεις και κλάσεις ανώτατου " "επιπέδου, το αναγνωρισμένο όνομα είναι ίδιο με το όνομα του αντικειμένου::" -#: glossary.rst:1143 +#: glossary.rst:1276 msgid "" ">>> class C:\n" "... class D:\n" @@ -2891,7 +3100,7 @@ msgstr "" ">>> C.D.meth.__qualname__\n" "'C.D.meth'" -#: glossary.rst:1155 +#: glossary.rst:1288 msgid "" "When used to refer to modules, the *fully qualified name* means the entire " "dotted path to the module, including any parent packages, e.g. ``email.mime." @@ -2901,7 +3110,7 @@ msgstr "" "όνομα* σημαίνει ολόκληρο το διακεκομμένο path προς το module, " "συμπεριλαμβανομένων τυχόν γονικών πακέτων π.χ. ``email.mime.text``::" -#: glossary.rst:1159 +#: glossary.rst:1292 msgid "" ">>> import email.mime.text\n" ">>> email.mime.text.__name__\n" @@ -2911,11 +3120,28 @@ msgstr "" ">>> email.mime.text.__name__\n" "'email.mime.text'" -#: glossary.rst:1162 +#: glossary.rst:1295 +#, fuzzy +msgid "race condition" +msgstr "συλλογή απορριμάτων" + +#: glossary.rst:1297 +msgid "" +"A condition of a program where the behavior depends on the relative timing " +"or ordering of events, particularly in multi-threaded programs. Race " +"conditions can lead to :term:`non-deterministic` behavior and bugs that are " +"difficult to reproduce. A :term:`data race` is a specific type of race " +"condition involving unsynchronized access to shared memory. The :term:" +"`LBYL` coding style is particularly susceptible to race conditions in multi-" +"threaded code. Using :term:`locks ` and other :term:`synchronization " +"primitives ` helps prevent race conditions." +msgstr "" + +#: glossary.rst:1307 msgid "reference count" msgstr "πλήθος αναφοράς" -#: glossary.rst:1164 +#: glossary.rst:1309 msgid "" "The number of references to an object. When the reference count of an " "object drops to zero, it is deallocated. Some objects are :term:`immortal` " @@ -2934,7 +3160,7 @@ msgstr "" "συνάρτηση :func:`sys.getrefcount` για να επιστρέψουν το πλήθος αναφοράς για " "ένα συγκεκριμένο αντικείμενο." -#: glossary.rst:1173 +#: glossary.rst:1318 msgid "" "In :term:`CPython`, reference counts are not considered to be stable or well-" "defined values; the number of references to an object, and how that number " @@ -2945,11 +3171,11 @@ msgstr "" "ο αριθμός επηρεάζεται από τον κώδικα της Python, μπορεί να είναι " "διαφορετικός μεταξύ εκδόσεων." -#: glossary.rst:1177 +#: glossary.rst:1322 msgid "regular package" msgstr "κανονικό πακέτο" -#: glossary.rst:1179 +#: glossary.rst:1324 msgid "" "A traditional :term:`package`, such as a directory containing an ``__init__." "py`` file." @@ -2957,15 +3183,48 @@ msgstr "" "Ένα παραδοσιακό :term:`package`, όπως ένας κατάλογος που περιέχει ένα " "``__init__.py`` αρχείο." -#: glossary.rst:1182 +#: glossary.rst:1327 msgid "See also :term:`namespace package`." msgstr "Βλ. επίσης :term:`namespace package`." -#: glossary.rst:1183 +#: glossary.rst:1328 +msgid "reentrant" +msgstr "" + +#: glossary.rst:1330 +msgid "" +"A property of a function or :term:`lock` that allows it to be called or " +"acquired multiple times by the same thread without causing errors or a :term:" +"`deadlock`." +msgstr "" + +#: glossary.rst:1334 +msgid "" +"For functions, reentrancy means the function can be safely called again " +"before a previous invocation has completed, which is important when " +"functions may be called recursively or from signal handlers. Thread-unsafe " +"functions may be :term:`non-deterministic` if they're called reentrantly in " +"a multithreaded program." +msgstr "" + +#: glossary.rst:1340 +msgid "" +"For locks, Python's :class:`threading.RLock` (reentrant lock) is reentrant, " +"meaning a thread that already holds the lock can acquire it again without " +"blocking. In contrast, :class:`threading.Lock` is not reentrant - " +"attempting to acquire it twice from the same thread will cause a deadlock." +msgstr "" + +#: glossary.rst:1346 +#, fuzzy +msgid "See also :term:`lock` and :term:`deadlock`." +msgstr "Βλ. επίσης :term:`regular package` και :term:`namespace package`." + +#: glossary.rst:1347 msgid "REPL" msgstr "REPL" -#: glossary.rst:1185 +#: glossary.rst:1349 msgid "" "An acronym for the \"read–eval–print loop\", another name for the :term:" "`interactive` interpreter shell." @@ -2973,11 +3232,11 @@ msgstr "" "Ακρωνύμιο του \"read–eval–print loop\", άλλη ονομασία για το :term:" "`interactive` περιβάλλον του διερμηνέα." -#: glossary.rst:1187 +#: glossary.rst:1351 msgid "__slots__" msgstr "__slots__" -#: glossary.rst:1189 +#: glossary.rst:1353 msgid "" "A declaration inside a class that saves memory by pre-declaring space for " "instance attributes and eliminating instance dictionaries. Though popular, " @@ -2991,11 +3250,11 @@ msgstr "" "σωστή και προορίζεται καλύτερα για σπάνιες περιπτώσεις όπου υπάρχει μεγάλος " "αριθμός στιγμιοτύπων σε μια εφαρμογή κρίσιμης-μνήμης." -#: glossary.rst:1194 +#: glossary.rst:1358 msgid "sequence" msgstr "ακολουθία" -#: glossary.rst:1196 +#: glossary.rst:1360 msgid "" "An :term:`iterable` which supports efficient element access using integer " "indices via the :meth:`~object.__getitem__` special method and defines a :" @@ -3016,7 +3275,7 @@ msgstr "" "ακολουθία επειδή οι αναζητήσεις χρησιμοποιούν αυθαίρετα :term:`hashable` " "κλειδιά παρά ακέραιοι." -#: glossary.rst:1205 +#: glossary.rst:1369 msgid "" "The :class:`collections.abc.Sequence` abstract base class defines a much " "richer interface that goes beyond just :meth:`~object.__getitem__` and :meth:" @@ -3035,11 +3294,11 @@ msgstr "" "περισσότερη τεκμηρίωση σχετικά με τις μεθόδους ακολουθίας γενικά, ανατρέξτε " "στο :ref:`Common Sequence Operations `." -#: glossary.rst:1215 +#: glossary.rst:1379 msgid "set comprehension" msgstr "set comprehension" -#: glossary.rst:1217 +#: glossary.rst:1381 msgid "" "A compact way to process all or part of the elements in an iterable and " "return a set with the results. ``results = {c for c in 'abracadabra' if c " @@ -3051,11 +3310,11 @@ msgstr "" "c in 'abracadabra' if c not in 'abc'}`` δημιουργεί το σύνολο συμβολοσειρών " "``{'r', 'd'}``. Βλ. :ref:`comprehensions`." -#: glossary.rst:1221 +#: glossary.rst:1385 msgid "single dispatch" msgstr "μοναδικό dispatch" -#: glossary.rst:1223 +#: glossary.rst:1387 msgid "" "A form of :term:`generic function` dispatch where the implementation is " "chosen based on the type of a single argument." @@ -3063,11 +3322,11 @@ msgstr "" "Μια μορφή dispatch :term:`generic function` όπου η υλοποίηση επιλέγεται με " "βάση τον τύπο ενός μεμονωμένου ορίσματος." -#: glossary.rst:1225 +#: glossary.rst:1389 msgid "slice" msgstr "slice" -#: glossary.rst:1227 +#: glossary.rst:1391 msgid "" "An object usually containing a portion of a :term:`sequence`. A slice is " "created using the subscript notation, ``[]`` with colons between numbers " @@ -3080,11 +3339,11 @@ msgstr "" "``variable_name[1:3:5]``. Η σημείωση αγκύλης (subscript) χρησιμοποιεί " "εσωτερικά αντικείμενα :class:`slice`." -#: glossary.rst:1231 +#: glossary.rst:1395 msgid "soft deprecated" msgstr "απαρχαιωμένη με ήπιο τρόπο" -#: glossary.rst:1233 +#: glossary.rst:1397 msgid "" "A soft deprecated API should not be used in new code, but it is safe for " "already existing code to use it. The API remains documented and tested, but " @@ -3094,7 +3353,7 @@ msgstr "" "κώδικα, αλλά είναι ασφαλές σε ήδη υπάρχοντα κώδικα να το χρησιμοποιεί. Το " "API παραμένει τεκμηριωμένο και δοκιμασμένο, αλλά δεν θα ενισχυθεί περαιτέρω." -#: glossary.rst:1237 +#: glossary.rst:1401 msgid "" "Soft deprecation, unlike normal deprecation, does not plan on removing the " "API and will not emit warnings." @@ -3102,7 +3361,7 @@ msgstr "" "Η κατάργηση με ήπιο τρόπο, σε αντίθεση με την κανονική κατάργηση, δεν " "σχεδιάζει την κατάργηση του API και δεν θα εκπέμπει ειδοποιήσεις" -#: glossary.rst:1240 +#: glossary.rst:1404 msgid "" "See `PEP 387: Soft Deprecation `_." @@ -3110,11 +3369,11 @@ msgstr "" "Δείτε `PEP 387: Soft Deprecation `_." -#: glossary.rst:1242 +#: glossary.rst:1406 msgid "special method" msgstr "ειδική μέθοδος" -#: glossary.rst:1246 +#: glossary.rst:1410 msgid "" "A method that is called implicitly by Python to execute a certain operation " "on a type, such as addition. Such methods have names starting and ending " @@ -3126,11 +3385,11 @@ msgstr "" "έχουνε ονόματα που ξεκινούν και τελειώνουν με διπλές κάτω παύλες. Οι ειδικές " "μέθοδοι τεκμηριώνονται στο :ref:`specialnames`." -#: glossary.rst:1250 +#: glossary.rst:1414 msgid "standard library" msgstr "τυπική βιβλιοθήκη" -#: glossary.rst:1252 +#: glossary.rst:1416 msgid "" "The collection of :term:`packages `, :term:`modules ` and :" "term:`extension modules ` distributed as a part of the " @@ -3144,7 +3403,7 @@ msgstr "" "διαφέρει ανάλογα με την πλατφόρμα, τις διαθέσιμες βιβλιοθήκες συστήματος ή " "άλλα κριτήρια. Η τεκμηρίωση μπορεί να βρεθεί στο :ref:`library-index`." -#: glossary.rst:1258 +#: glossary.rst:1422 msgid "" "See also :data:`sys.stdlib_module_names` for a list of all possible standard " "library module names." @@ -3152,11 +3411,11 @@ msgstr "" "Δείτε επίσης :data:`sys.stdlib_module_names` για μια λίστα με όλα τα πιθανά " "ονόματα μονάδων τυπικής βιβλιοθήκης." -#: glossary.rst:1260 +#: glossary.rst:1424 msgid "statement" msgstr "δήλωση" -#: glossary.rst:1262 +#: glossary.rst:1426 msgid "" "A statement is part of a suite (a \"block\" of code). A statement is either " "an :term:`expression` or one of several constructs with a keyword, such as :" @@ -3166,11 +3425,11 @@ msgstr "" "είναι είτε ένας :term:`expression` είτε μια από πολλές δομές με μια λέξη-" "κλειδί όπως :keyword:`if`, :keyword:`while` ή :keyword:`for`." -#: glossary.rst:1265 +#: glossary.rst:1429 msgid "static type checker" msgstr "ελεγκτής στατικού τύπου" -#: glossary.rst:1267 +#: glossary.rst:1431 msgid "" "An external tool that reads Python code and analyzes it, looking for issues " "such as incorrect types. See also :term:`type hints ` and the :" @@ -3180,19 +3439,35 @@ msgstr "" "αναζητώντας προβλήματα όπως λανθασμένοι τύποι. Βλ. επίσης :term:`type hints " "` και το module :mod:`typing`." -#: glossary.rst:1270 +#: glossary.rst:1434 msgid "stdlib" msgstr "stdlib" -#: glossary.rst:1272 +#: glossary.rst:1436 msgid "An abbreviation of :term:`standard library`." msgstr "Μια συντομογραφία του :term:`standard library`." -#: glossary.rst:1273 +#: glossary.rst:1437 +msgid "steal" +msgstr "" + +#: glossary.rst:1439 +msgid "" +"In Python's C API, \"*stealing*\" an argument means that ownership of the " +"argument is transferred to the called function. The caller must not use that " +"reference after the call. Generally, functions that \"steal\" an argument do " +"so even if they fail." +msgstr "" + +#: glossary.rst:1444 +msgid "See :ref:`api-refcountdetails` for a full explanation." +msgstr "" + +#: glossary.rst:1445 msgid "strong reference" msgstr "strong reference" -#: glossary.rst:1275 +#: glossary.rst:1447 msgid "" "In Python's C API, a strong reference is a reference to an object which is " "owned by the code holding the reference. The strong reference is taken by " @@ -3205,7 +3480,7 @@ msgstr "" "δημιουργείται και απελευθερώνεται με :c:func:`Py_DECREF` όταν διαγραφεί η " "αναφορά." -#: glossary.rst:1281 +#: glossary.rst:1453 msgid "" "The :c:func:`Py_NewRef` function can be used to create a strong reference to " "an object. Usually, the :c:func:`Py_DECREF` function must be called on the " @@ -3217,15 +3492,33 @@ msgstr "" "`Py_DECREF` πρέπει να καλείται στην ισχυρή αναφορά πριν βγει από το εύρος " "της ισχυρής αναφοράς, για να αποφευχθεί η διαρροή μιας αναφοράς." -#: glossary.rst:1286 +#: glossary.rst:1458 msgid "See also :term:`borrowed reference`." msgstr "Βλ. επίσης :term:`borrowed reference`." -#: glossary.rst:1287 +#: glossary.rst:1459 +msgid "synchronization primitive" +msgstr "" + +#: glossary.rst:1461 +msgid "" +"A basic building block for coordinating (synchronizing) the execution of " +"multiple threads to ensure :term:`thread-safe` access to shared resources. " +"Python's :mod:`threading` module provides several synchronization primitives " +"including :class:`~threading.Lock`, :class:`~threading.RLock`, :class:" +"`~threading.Semaphore`, :class:`~threading.Condition`, :class:`~threading." +"Event`, and :class:`~threading.Barrier`. Additionally, the :mod:`queue` " +"module provides multi-producer, multi-consumer queues that are especially " +"useful in multithreaded programs. These primitives help prevent :term:`race " +"conditions ` and coordinate thread execution. See also :" +"term:`lock`." +msgstr "" + +#: glossary.rst:1471 msgid "text encoding" msgstr "κωδικοποίηση κειμένου" -#: glossary.rst:1289 +#: glossary.rst:1473 msgid "" "A string in Python is a sequence of Unicode code points (in range " "``U+0000``--``U+10FFFF``). To store or transfer a string, it needs to be " @@ -3235,7 +3528,7 @@ msgstr "" "εύρος ``U+0000``--``U+10FFFF``). Για να αποθηκεύσετε ή να μεταφέρετε μια " "συμβολοσειρά, πρέπει να σειριοποιηθεί ως δυαδική ακολουθία." -#: glossary.rst:1293 +#: glossary.rst:1477 msgid "" "Serializing a string into a sequence of bytes is known as \"encoding\", and " "recreating the string from the sequence of bytes is known as \"decoding\"." @@ -3244,7 +3537,7 @@ msgstr "" "\"κωδικοποίηση\" , και η αναδημιουργία της συμβολοσειράς από την δυαδική " "ακολουθία είναι γνωστή ως \"αποκωδικοποίηση\"." -#: glossary.rst:1296 +#: glossary.rst:1480 msgid "" "There are a variety of different text serialization :ref:`codecs `, which are collectively referred to as \"text encodings\"." @@ -3253,11 +3546,11 @@ msgstr "" "`, οι οποίοι συλλογικά αναφέρονται ως \"κωδικοποιήσεις " "κειμένου\"." -#: glossary.rst:1299 +#: glossary.rst:1483 msgid "text file" msgstr "αρχείο κειμένου" -#: glossary.rst:1301 +#: glossary.rst:1485 msgid "" "A :term:`file object` able to read and write :class:`str` objects. Often, a " "text file actually accesses a byte-oriented datastream and handles the :term:" @@ -3272,7 +3565,7 @@ msgstr "" "κειμένου (``'r'`` ή ``'w'``), :data:`sys.stdin`, :data:`sys.stdout`, και " "στιγμιότυπα του :class:`io.StringIO`." -#: glossary.rst:1308 +#: glossary.rst:1492 msgid "" "See also :term:`binary file` for a file object able to read and write :term:" "`bytes-like objects `." @@ -3280,11 +3573,29 @@ msgstr "" "Βλ. επίσης :term:`binary file` για ένα αντικείμενο αρχείου με δυνατότητα " "ανάγνωσης και εγγραφής :term:`δυαδικά αντικείμενα `." -#: glossary.rst:1310 +#: glossary.rst:1494 +msgid "thread-safe" +msgstr "" + +#: glossary.rst:1496 +msgid "" +"A module, function, or class that behaves correctly when used by multiple " +"threads concurrently. Thread-safe code uses appropriate :term:" +"`synchronization primitives ` like :term:`locks " +"` to protect shared mutable state, or is designed to avoid shared " +"mutable state entirely. In the :term:`free-threaded ` " +"build, built-in types like :class:`dict`, :class:`list`, and :class:`set` " +"use internal locking to make many operations thread-safe, although thread " +"safety is not necessarily guaranteed. Code that is not thread-safe may " +"experience :term:`race conditions ` and :term:`data races " +"` when used in multi-threaded programs." +msgstr "" + +#: glossary.rst:1507 msgid "token" msgstr "λεκτικό σύμβολο (token)" -#: glossary.rst:1313 +#: glossary.rst:1510 msgid "" "A small unit of source code, generated by the :ref:`lexical analyzer " "` (also called the *tokenizer*). Names, numbers, strings, " @@ -3295,7 +3606,7 @@ msgstr "" "συμβολοσειρές, τελεστές αλλαγές γραμμής και παρόμοια στοιχεία αναπαρίστανται " "ως λεκτικά σύμβολα (tokens)." -#: glossary.rst:1318 +#: glossary.rst:1515 msgid "" "The :mod:`tokenize` module exposes Python's lexical analyzer. The :mod:" "`token` module contains information on the various types of tokens." @@ -3304,11 +3615,11 @@ msgstr "" "mod:`token` περιέχει πληροφορίες για τους διάφορους τύπους λεκτικών συμβόλων " "(tokens)." -#: glossary.rst:1321 +#: glossary.rst:1518 msgid "triple-quoted string" msgstr "συμβολοσειρά τριπλών εισαγωγικών" -#: glossary.rst:1323 +#: glossary.rst:1520 msgid "" "A string which is bound by three instances of either a quotation mark (\") " "or an apostrophe ('). While they don't provide any functionality not " @@ -3326,11 +3637,11 @@ msgstr "" "γραμμές χωρίς τη χρήση του χαρακτήρα συνέχεια, καθιστώντας τα ιδιαίτερα " "χρήσιμα κατά τη σύνταξη εγγράφων με συμβολοσειρές." -#: glossary.rst:1330 +#: glossary.rst:1527 msgid "type" msgstr "τύπος" -#: glossary.rst:1332 +#: glossary.rst:1529 msgid "" "The type of a Python object determines what kind of object it is; every " "object has a type. An object's type is accessible as its :attr:`~object." @@ -3341,17 +3652,17 @@ msgstr "" "το χαρακτηριστικό :attr:`~object.__class__` ή μπορεί να ανακτηθεί με " "``type(obj)``." -#: glossary.rst:1336 +#: glossary.rst:1533 msgid "type alias" msgstr "type alias" -#: glossary.rst:1338 +#: glossary.rst:1535 msgid "A synonym for a type, created by assigning the type to an identifier." msgstr "" "Ένα συνώνυμο για έναν τύπο, που δημιουργείται με την ανάθεση τύπου σε ένα " "αναγνωριστικό." -#: glossary.rst:1340 +#: glossary.rst:1537 msgid "" "Type aliases are useful for simplifying :term:`type hints `. For " "example::" @@ -3359,7 +3670,7 @@ msgstr "" "Τα type aliases είναι χρήσιμα για την απλοποίηση :term:`type alias `. Για παράδειγμα::" -#: glossary.rst:1343 +#: glossary.rst:1540 msgid "" "def remove_gray_shades(\n" " colors: list[tuple[int, int, int]]) -> list[tuple[int, int, int]]:\n" @@ -3369,11 +3680,11 @@ msgstr "" " colors: list[tuple[int, int, int]]) -> list[tuple[int, int, int]]:\n" " pass" -#: glossary.rst:1347 +#: glossary.rst:1544 msgid "could be made more readable like this::" msgstr "μπορεί να γίνει πιο ευανάγνωστο όπως::" -#: glossary.rst:1349 +#: glossary.rst:1546 msgid "" "Color = tuple[int, int, int]\n" "\n" @@ -3385,16 +3696,16 @@ msgstr "" "def remove_gray_shades(colors: list[Color]) -> list[Color]:\n" " pass" -#: glossary.rst:1368 +#: glossary.rst:1565 msgid "See :mod:`typing` and :pep:`484`, which describe this functionality." msgstr "" "Βλ. :mod:`typing` και :pep:`484`, που περιγράφει αυτήν την λειτουργικότητα." -#: glossary.rst:1355 +#: glossary.rst:1552 msgid "type hint" msgstr "type hint" -#: glossary.rst:1357 +#: glossary.rst:1554 msgid "" "An :term:`annotation` that specifies the expected type for a variable, a " "class attribute, or a function parameter or return value." @@ -3403,7 +3714,7 @@ msgstr "" "μεταβλητή, ένα χαρακτηριστικό κλάσης ή μια παράμετρο συνάρτησης ή τιμή " "επιστροφής." -#: glossary.rst:1360 +#: glossary.rst:1557 msgid "" "Type hints are optional and are not enforced by Python but they are useful " "to :term:`static type checkers `. They can also aid " @@ -3414,7 +3725,7 @@ msgstr "" "checker>`. Μπορούν επίσης να βοηθήσουν τους IDEs με τη συμπλήρωση και την " "αναδιαμόρφωση κώδικα." -#: glossary.rst:1364 +#: glossary.rst:1561 msgid "" "Type hints of global variables, class attributes, and functions, but not " "local variables, can be accessed using :func:`typing.get_type_hints`." @@ -3423,11 +3734,11 @@ msgstr "" "κλάσης και συναρτήσεις , αλλά όχι τοπικές μεταβλητές, μπορούν να " "προσπελαστούν χρησιμοποιώντας το :func:`typing.get_type_hints`." -#: glossary.rst:1369 +#: glossary.rst:1566 msgid "universal newlines" msgstr "καθολικές νέες γραμμές" -#: glossary.rst:1371 +#: glossary.rst:1568 msgid "" "A manner of interpreting text streams in which all of the following are " "recognized as ending a line: the Unix end-of-line convention ``'\\n'``, the " @@ -3441,22 +3752,22 @@ msgstr "" "Βλ. :pep:`278` και :pep:`3116`, καθώς και :func:`bytes.splitlines` για " "πρόσθετη χρήση." -#: glossary.rst:1376 +#: glossary.rst:1573 msgid "variable annotation" msgstr "annotation μεταβλητής" -#: glossary.rst:1378 +#: glossary.rst:1575 msgid "An :term:`annotation` of a variable or a class attribute." msgstr "Ένας :term:`annotation` μια μεταβλητής ή ενός χαρακτηριστικού κλάσης." -#: glossary.rst:1380 +#: glossary.rst:1577 msgid "" "When annotating a variable or a class attribute, assignment is optional::" msgstr "" "Όταν annotating μια μεταβλητή ή ένα χαρακτηριστικό κλάσης, η ανάθεση είναι " "προαιρετική::" -#: glossary.rst:1382 +#: glossary.rst:1579 msgid "" "class C:\n" " field: 'annotation'" @@ -3464,7 +3775,7 @@ msgstr "" "class C:\n" " field: 'annotation'" -#: glossary.rst:1385 +#: glossary.rst:1582 msgid "" "Variable annotations are usually used for :term:`type hints `: " "for example this variable is expected to take :class:`int` values::" @@ -3473,16 +3784,16 @@ msgstr "" "`: για παράδειγμα αυτή η μεταβλητή αναμένεται να λάβει τιμές :" "class:`int`::" -#: glossary.rst:1389 +#: glossary.rst:1586 msgid "count: int = 0" msgstr "count: int = 0" -#: glossary.rst:1391 +#: glossary.rst:1588 msgid "Variable annotation syntax is explained in section :ref:`annassign`." msgstr "" "Η σύνταξη annotation μεταβλητής περιγράφεται στην ενότητα :ref:`annassign`." -#: glossary.rst:1393 +#: glossary.rst:1590 msgid "" "See :term:`function annotation`, :pep:`484` and :pep:`526`, which describe " "this functionality. Also see :ref:`annotations-howto` for best practices on " @@ -3492,11 +3803,11 @@ msgstr "" "αυτή τη λειτουργία. Δείτε επίσης :ref:`annotations-howto` για βέλτιστες " "πρακτικές σχετικά με την εργασία με σχολιασμούς." -#: glossary.rst:1397 +#: glossary.rst:1594 msgid "virtual environment" msgstr "virtual environment" -#: glossary.rst:1399 +#: glossary.rst:1596 msgid "" "A cooperatively isolated runtime environment that allows Python users and " "applications to install and upgrade Python distribution packages without " @@ -3508,15 +3819,15 @@ msgstr "" "πακέτα διανομής Python χωρίς να παρεμβαίνουν στη συμπεριφορά άλλων εφαρμογών " "Python που εκτελούνται στο ίδιο σύστημα." -#: glossary.rst:1404 +#: glossary.rst:1601 msgid "See also :mod:`venv`." msgstr "Βλ. επίσης :mod:`venv`." -#: glossary.rst:1405 +#: glossary.rst:1602 msgid "virtual machine" msgstr "virtual machine" -#: glossary.rst:1407 +#: glossary.rst:1604 msgid "" "A computer defined entirely in software. Python's virtual machine executes " "the :term:`bytecode` emitted by the bytecode compiler." @@ -3525,11 +3836,11 @@ msgstr "" "της Python εκτελεί το :term:`bytecode` που εκπέμπεται από τον μεταγλωττιστή " "bytecode." -#: glossary.rst:1409 +#: glossary.rst:1606 msgid "walrus operator" msgstr "τελεστής walrus" -#: glossary.rst:1411 +#: glossary.rst:1608 msgid "" "A light-hearted way to refer to the :ref:`assignment expression ` operator ``:=`` because it looks a bit like a walrus if you " @@ -3539,11 +3850,11 @@ msgstr "" "`assignment expression ` ``:=`` επειδή μοιάζει λίγο " "με ένα θαλάσσιο ίππο αν γυρίσετε το κεφάλι σας." -#: glossary.rst:1414 +#: glossary.rst:1611 msgid "Zen of Python" msgstr "Zen της Python" -#: glossary.rst:1416 +#: glossary.rst:1613 msgid "" "Listing of Python design principles and philosophies that are helpful in " "understanding and using the language. The listing can be found by typing " @@ -3561,22 +3872,49 @@ msgstr "..." msgid "ellipsis literal" msgstr "γραμματική παράσταση αποσιωπητικών" -#: glossary.rst:294 +#: glossary.rst:321 msgid "C-contiguous" msgstr "C-contiguous" -#: glossary.rst:294 +#: glossary.rst:321 msgid "Fortran contiguous" msgstr "Fortran contiguous" -#: glossary.rst:838 +#: glossary.rst:932 msgid "magic" msgstr "magic" -#: glossary.rst:1244 +#: glossary.rst:1408 msgid "special" msgstr "special" +#~ msgid "" +#~ "Usually refers to an asynchronous generator function, but may refer to an " +#~ "*asynchronous generator iterator* in some contexts. In cases where the " +#~ "intended meaning isn't clear, using the full terms avoids ambiguity." +#~ msgstr "" +#~ "Συνήθως αναφέρεται σε μια συνάρτηση ασύγχρονου generator, αλλά μπορεί να " +#~ "αναφέρεται σε έναν *ασύγχρονο generator iterator* σε ορισμένα contexts. " +#~ "Σε περιπτώσεις όπου το επιδιωκόμενο νόημα δεν είναι σαφές, με την χρήση " +#~ "των πλήρων όρων αποφεύγεται η ασάφεια." + +#~ msgid "" +#~ "Usually refers to a generator function, but may refer to a *generator " +#~ "iterator* in some contexts. In cases where the intended meaning isn't " +#~ "clear, using the full terms avoids ambiguity." +#~ msgstr "" +#~ "Συνήθως αναφέρεται σε μια συνάρτηση generator, αλλά μπορεί να αναφέρεται " +#~ "σε έναν *generator iterator* σε μερικά contexts. Σε περιπτώσεις όπου το " +#~ "επιδιωκόμενο νόημα δεν είναι σαφές, η χρήση των πλήρων όρων αποφεύγει την " +#~ "ασάφεια." + +#~ msgid "" +#~ "Mutable objects can change their value but keep their :func:`id`. See " +#~ "also :term:`immutable`." +#~ msgstr "" +#~ "Τα ευμετάβλητα αντικείμενα μπορούν να αλλάξουν τις τιμές αλλά να " +#~ "κρατήσουν τα :func:`id`. Βλ. επίσης :term:`immutable`." + #~ msgid "The :const:`Ellipsis` built-in constant." #~ msgstr "Η ενσωματωμένη σταθερά :const:`Ellipsis`." diff --git a/howto/a-conceptual-overview-of-asyncio.po b/howto/a-conceptual-overview-of-asyncio.po index fc7387e16..1659485fb 100644 --- a/howto/a-conceptual-overview-of-asyncio.po +++ b/howto/a-conceptual-overview-of-asyncio.po @@ -8,10 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\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" @@ -190,7 +191,7 @@ msgid "" "The terms \"coroutine function\" and \"coroutine object\" are often " "conflated as coroutine. That can be confusing! In this article, coroutine " "specifically refers to a coroutine object, or more precisely, an instance " -"of :data:`types.CoroutineType` (native coroutine). Note that coroutines can " +"of :class:`types.CoroutineType` (native coroutine). Note that coroutines can " "also exist as instances of :class:`collections.abc.Coroutine` -- a " "distinction that matters for type checking." msgstr "" diff --git a/howto/annotations.po b/howto/annotations.po index 42c335336..3d8953435 100644 --- a/howto/annotations.po +++ b/howto/annotations.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/howto/argparse-optparse.po b/howto/argparse-optparse.po index 8c2bdb39e..25d265e0c 100644 --- a/howto/argparse-optparse.po +++ b/howto/argparse-optparse.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/howto/argparse.po b/howto/argparse.po index 5030a359f..9cea17c3b 100644 --- a/howto/argparse.po +++ b/howto/argparse.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/howto/clinic.po b/howto/clinic.po index d07214fa9..8284b11ab 100644 --- a/howto/clinic.po +++ b/howto/clinic.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/howto/cporting.po b/howto/cporting.po index 934d0ca38..44a1814ff 100644 --- a/howto/cporting.po +++ b/howto/cporting.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/howto/curses.po b/howto/curses.po index 9fb519a7c..49a2a8d96 100644 --- a/howto/curses.po +++ b/howto/curses.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -99,8 +99,9 @@ msgstr "" #: howto/curses.rst:58 msgid "" -"The Windows version of Python doesn't include the :mod:`curses` module. A " -"ported version called :pypi:`UniCurses` is available." +"The Windows version of Python doesn't include the :mod:`curses` module. The " +"third-party :pypi:`windows-curses` package provides the same interface on " +"Windows." msgstr "" #: howto/curses.rst:63 diff --git a/howto/descriptor.po b/howto/descriptor.po index 9f8ce35a3..c99b081ee 100644 --- a/howto/descriptor.po +++ b/howto/descriptor.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1743,7 +1743,7 @@ msgid "" "class Member:\n" "\n" " def __init__(self, name, clsname, offset):\n" -" 'Emulate PyMemberDef in Include/structmember.h'\n" +" 'Emulate PyMemberDef in Include/descrobject.h'\n" " # Also see descr_new() in Objects/descrobject.c\n" " self.name = name\n" " self.clsname = clsname\n" diff --git a/howto/enum.po b/howto/enum.po index d96a82420..0ab71eab1 100644 --- a/howto/enum.po +++ b/howto/enum.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -181,8 +181,8 @@ msgstr "" #: howto/enum.rst:108 msgid "" -">>> from datetime import date\n" -">>> Weekday.from_date(date.today())\n" +">>> import datetime as dt\n" +">>> Weekday.from_date(dt.date.today())\n" "" msgstr "" @@ -1449,138 +1449,30 @@ msgid "Finer Points" msgstr "" #: howto/enum.rst:971 -msgid "Supported ``__dunder__`` names" +msgid "Supported ``__dunder__`` and ``_sunder_`` names" msgstr "" #: howto/enum.rst:973 msgid "" -":attr:`~enum.EnumType.__members__` is a read-only ordered mapping of " -"``member_name``:``member`` items. It is only available on the class." +"The supported ``__dunder__`` and ``_sunder_`` names can be found in the :ref:" +"`Enum API documentation `." msgstr "" -#: howto/enum.rst:976 -msgid "" -":meth:`~object.__new__`, if specified, must create and return the enum " -"members; it is also a very good idea to set the member's :attr:`~Enum." -"_value_` appropriately. Once all the members are created it is no longer " -"used." -msgstr "" - -#: howto/enum.rst:982 -msgid "Supported ``_sunder_`` names" -msgstr "" - -#: howto/enum.rst:984 -msgid ":attr:`~Enum._name_` -- name of the member" -msgstr "" - -#: howto/enum.rst:985 -msgid ":attr:`~Enum._value_` -- value of the member; can be set in ``__new__``" -msgstr "" - -#: howto/enum.rst:986 -msgid "" -":meth:`~Enum._missing_` -- a lookup function used when a value is not found; " -"may be overridden" -msgstr "" - -#: howto/enum.rst:988 -msgid "" -":attr:`~Enum._ignore_` -- a list of names, either as a :class:`list` or a :" -"class:`str`, that will not be transformed into members, and will be removed " -"from the final class" -msgstr "" - -#: howto/enum.rst:991 -msgid "" -":meth:`~Enum._generate_next_value_` -- used to get an appropriate value for " -"an enum member; may be overridden" -msgstr "" - -#: howto/enum.rst:993 -msgid "" -":meth:`~Enum._add_alias_` -- adds a new name as an alias to an existing " -"member." -msgstr "" - -#: howto/enum.rst:995 -msgid "" -":meth:`~Enum._add_value_alias_` -- adds a new value as an alias to an " -"existing member. See `MultiValueEnum`_ for an example." -msgstr "" - -#: howto/enum.rst:1000 -msgid "" -"For standard :class:`Enum` classes the next value chosen is the highest " -"value seen incremented by one." -msgstr "" - -#: howto/enum.rst:1003 -msgid "" -"For :class:`Flag` classes the next value chosen will be the next highest " -"power-of-two." -msgstr "" - -#: howto/enum.rst:1006 -msgid "" -"Prior versions would use the last seen value instead of the highest value." -msgstr "" - -#: howto/enum.rst:1009 -msgid "``_missing_``, ``_order_``, ``_generate_next_value_``" -msgstr "" - -#: howto/enum.rst:1010 -msgid "``_ignore_``" -msgstr "" - -#: howto/enum.rst:1011 -msgid "``_add_alias_``, ``_add_value_alias_``" -msgstr "" - -#: howto/enum.rst:1013 -msgid "" -"To help keep Python 2 / Python 3 code in sync an :attr:`~Enum._order_` " -"attribute can be provided. It will be checked against the actual order of " -"the enumeration and raise an error if the two do not match::" -msgstr "" - -#: howto/enum.rst:1017 -msgid "" -">>> class Color(Enum):\n" -"... _order_ = 'RED GREEN BLUE'\n" -"... RED = 1\n" -"... BLUE = 3\n" -"... GREEN = 2\n" -"...\n" -"Traceback (most recent call last):\n" -"...\n" -"TypeError: member order does not match _order_:\n" -" ['RED', 'BLUE', 'GREEN']\n" -" ['RED', 'GREEN', 'BLUE']" -msgstr "" - -#: howto/enum.rst:1031 -msgid "" -"In Python 2 code the :attr:`~Enum._order_` attribute is necessary as " -"definition order is lost before it can be recorded." -msgstr "" - -#: howto/enum.rst:1036 +#: howto/enum.rst:977 msgid "_Private__names" msgstr "" -#: howto/enum.rst:1038 +#: howto/enum.rst:979 msgid "" ":ref:`Private names ` are not converted to enum " "members, but remain normal attributes." msgstr "" -#: howto/enum.rst:1045 +#: howto/enum.rst:986 msgid "``Enum`` member type" msgstr "" -#: howto/enum.rst:1047 +#: howto/enum.rst:988 msgid "" "Enum members are instances of their enum class, and are normally accessed as " "``EnumClass.member``. In certain situations, such as writing custom enum " @@ -1590,18 +1482,18 @@ msgid "" "strongly recommended." msgstr "" -#: howto/enum.rst:1058 +#: howto/enum.rst:999 msgid "Creating members that are mixed with other data types" msgstr "" -#: howto/enum.rst:1060 +#: howto/enum.rst:1001 msgid "" "When subclassing other data types, such as :class:`int` or :class:`str`, " "with an :class:`Enum`, all values after the ``=`` are passed to that data " "type's constructor. For example::" msgstr "" -#: howto/enum.rst:1064 +#: howto/enum.rst:1005 msgid "" ">>> class MyEnum(IntEnum): # help(int) -> int(x, base=10) -> integer\n" "... example = '11', 16 # so x='11' and base=16\n" @@ -1610,11 +1502,11 @@ msgid "" "17" msgstr "" -#: howto/enum.rst:1072 +#: howto/enum.rst:1013 msgid "Boolean value of ``Enum`` classes and members" msgstr "" -#: howto/enum.rst:1074 +#: howto/enum.rst:1015 msgid "" "Enum classes that are mixed with non-:class:`Enum` types (such as :class:" "`int`, :class:`str`, etc.) are evaluated according to the mixed-in type's " @@ -1623,28 +1515,28 @@ msgid "" "your class::" msgstr "" -#: howto/enum.rst:1080 +#: howto/enum.rst:1021 msgid "" "def __bool__(self):\n" " return bool(self.value)" msgstr "" -#: howto/enum.rst:1083 +#: howto/enum.rst:1024 msgid "Plain :class:`Enum` classes always evaluate as :data:`True`." msgstr "" -#: howto/enum.rst:1087 +#: howto/enum.rst:1028 msgid "``Enum`` classes with methods" msgstr "" -#: howto/enum.rst:1089 +#: howto/enum.rst:1030 msgid "" "If you give your enum subclass extra methods, like the `Planet`_ class " "below, those methods will show up in a :func:`dir` of the member, but not of " "the class::" msgstr "" -#: howto/enum.rst:1093 +#: howto/enum.rst:1034 msgid "" ">>> dir(Planet)\n" "['EARTH', 'JUPITER', 'MARS', 'MERCURY', 'NEPTUNE', 'SATURN', 'URANUS', " @@ -1654,17 +1546,17 @@ msgid "" "'surface_gravity', 'value']" msgstr "" -#: howto/enum.rst:1100 +#: howto/enum.rst:1041 msgid "Combining members of ``Flag``" msgstr "" -#: howto/enum.rst:1102 +#: howto/enum.rst:1043 msgid "" "Iterating over a combination of :class:`Flag` members will only return the " "members that are comprised of a single bit::" msgstr "" -#: howto/enum.rst:1105 +#: howto/enum.rst:1046 msgid "" ">>> class Color(Flag):\n" "... RED = auto()\n" @@ -1680,15 +1572,15 @@ msgid "" "" msgstr "" -#: howto/enum.rst:1120 +#: howto/enum.rst:1061 msgid "``Flag`` and ``IntFlag`` minutia" msgstr "" -#: howto/enum.rst:1122 +#: howto/enum.rst:1063 msgid "Using the following snippet for our examples::" msgstr "" -#: howto/enum.rst:1124 +#: howto/enum.rst:1065 msgid "" ">>> class Color(IntFlag):\n" "... BLACK = 0\n" @@ -1700,35 +1592,35 @@ msgid "" "..." msgstr "" -#: howto/enum.rst:1133 +#: howto/enum.rst:1074 msgid "the following are true:" msgstr "" -#: howto/enum.rst:1135 +#: howto/enum.rst:1076 msgid "single-bit flags are canonical" msgstr "" -#: howto/enum.rst:1136 +#: howto/enum.rst:1077 msgid "multi-bit and zero-bit flags are aliases" msgstr "" -#: howto/enum.rst:1137 +#: howto/enum.rst:1078 msgid "only canonical flags are returned during iteration::" msgstr "" -#: howto/enum.rst:1139 +#: howto/enum.rst:1080 msgid "" ">>> list(Color.WHITE)\n" "[, , ]" msgstr "" -#: howto/enum.rst:1142 +#: howto/enum.rst:1083 msgid "" "negating a flag or flag set returns a new flag/flag set with the " "corresponding positive integer value::" msgstr "" -#: howto/enum.rst:1145 +#: howto/enum.rst:1086 msgid "" ">>> Color.BLUE\n" "\n" @@ -1737,11 +1629,11 @@ msgid "" "" msgstr "" -#: howto/enum.rst:1151 +#: howto/enum.rst:1092 msgid "names of pseudo-flags are constructed from their members' names::" msgstr "" -#: howto/enum.rst:1153 +#: howto/enum.rst:1094 msgid "" ">>> (Color.RED | Color.GREEN).name\n" "'RED|GREEN'\n" @@ -1755,11 +1647,11 @@ msgid "" "True" msgstr "" -#: howto/enum.rst:1164 +#: howto/enum.rst:1105 msgid "multi-bit flags, aka aliases, can be returned from operations::" msgstr "" -#: howto/enum.rst:1166 +#: howto/enum.rst:1107 msgid "" ">>> Color.RED | Color.BLUE\n" "\n" @@ -1771,25 +1663,25 @@ msgid "" "" msgstr "" -#: howto/enum.rst:1175 +#: howto/enum.rst:1116 msgid "" "membership / containment checking: zero-valued flags are always considered " "to be contained::" msgstr "" -#: howto/enum.rst:1178 +#: howto/enum.rst:1119 msgid "" ">>> Color.BLACK in Color.WHITE\n" "True" msgstr "" -#: howto/enum.rst:1181 +#: howto/enum.rst:1122 msgid "" "otherwise, only if all bits of one flag are in the other flag will True be " "returned::" msgstr "" -#: howto/enum.rst:1184 +#: howto/enum.rst:1125 msgid "" ">>> Color.PURPLE in Color.WHITE\n" "True\n" @@ -1798,62 +1690,62 @@ msgid "" "False" msgstr "" -#: howto/enum.rst:1190 +#: howto/enum.rst:1131 msgid "" "There is a new boundary mechanism that controls how out-of-range / invalid " "bits are handled: ``STRICT``, ``CONFORM``, ``EJECT``, and ``KEEP``:" msgstr "" -#: howto/enum.rst:1193 +#: howto/enum.rst:1134 msgid "STRICT --> raises an exception when presented with invalid values" msgstr "" -#: howto/enum.rst:1194 +#: howto/enum.rst:1135 msgid "CONFORM --> discards any invalid bits" msgstr "" -#: howto/enum.rst:1195 +#: howto/enum.rst:1136 msgid "EJECT --> lose Flag status and become a normal int with the given value" msgstr "" -#: howto/enum.rst:1196 +#: howto/enum.rst:1137 msgid "KEEP --> keep the extra bits" msgstr "" -#: howto/enum.rst:1198 +#: howto/enum.rst:1139 msgid "keeps Flag status and extra bits" msgstr "" -#: howto/enum.rst:1199 +#: howto/enum.rst:1140 msgid "extra bits do not show up in iteration" msgstr "" -#: howto/enum.rst:1200 +#: howto/enum.rst:1141 msgid "extra bits do show up in repr() and str()" msgstr "" -#: howto/enum.rst:1202 +#: howto/enum.rst:1143 msgid "" "The default for Flag is ``STRICT``, the default for ``IntFlag`` is " "``EJECT``, and the default for ``_convert_`` is ``KEEP`` (see ``ssl." "Options`` for an example of when ``KEEP`` is needed)." msgstr "" -#: howto/enum.rst:1210 +#: howto/enum.rst:1151 msgid "How are Enums and Flags different?" msgstr "" -#: howto/enum.rst:1212 +#: howto/enum.rst:1153 msgid "" "Enums have a custom metaclass that affects many aspects of both derived :" "class:`Enum` classes and their instances (members)." msgstr "" -#: howto/enum.rst:1217 +#: howto/enum.rst:1158 msgid "Enum Classes" msgstr "" -#: howto/enum.rst:1219 +#: howto/enum.rst:1160 msgid "" "The :class:`EnumType` metaclass is responsible for providing the :meth:" "`~object.__contains__`, :meth:`~object.__dir__`, :meth:`~object.__iter__` " @@ -1865,11 +1757,11 @@ msgid "" "`~object.__repr__`)." msgstr "" -#: howto/enum.rst:1228 +#: howto/enum.rst:1169 msgid "Flag Classes" msgstr "" -#: howto/enum.rst:1230 +#: howto/enum.rst:1171 msgid "" "Flags have an expanded view of aliasing: to be canonical, the value of a " "flag needs to be a power-of-two value, and not a duplicate name. So, in " @@ -1878,11 +1770,11 @@ msgid "" "considered an alias." msgstr "" -#: howto/enum.rst:1236 +#: howto/enum.rst:1177 msgid "Enum Members (aka instances)" msgstr "" -#: howto/enum.rst:1238 +#: howto/enum.rst:1179 msgid "" "The most interesting thing about enum members is that they are singletons. :" "class:`EnumType` creates them all while it is creating the enum class " @@ -1891,55 +1783,55 @@ msgid "" "instances." msgstr "" -#: howto/enum.rst:1244 +#: howto/enum.rst:1185 msgid "Flag Members" msgstr "" -#: howto/enum.rst:1246 +#: howto/enum.rst:1187 msgid "" "Flag members can be iterated over just like the :class:`Flag` class, and " "only the canonical members will be returned. For example::" msgstr "" -#: howto/enum.rst:1249 +#: howto/enum.rst:1190 msgid "" ">>> list(Color)\n" "[, , ]" msgstr "" -#: howto/enum.rst:1252 +#: howto/enum.rst:1193 msgid "(Note that ``BLACK``, ``PURPLE``, and ``WHITE`` do not show up.)" msgstr "" -#: howto/enum.rst:1254 +#: howto/enum.rst:1195 msgid "" "Inverting a flag member returns the corresponding positive value, rather " "than a negative value --- for example::" msgstr "" -#: howto/enum.rst:1257 +#: howto/enum.rst:1198 msgid "" ">>> ~Color.RED\n" "" msgstr "" -#: howto/enum.rst:1260 +#: howto/enum.rst:1201 msgid "" "Flag members have a length corresponding to the number of power-of-two " "values they contain. For example::" msgstr "" -#: howto/enum.rst:1263 +#: howto/enum.rst:1204 msgid "" ">>> len(Color.PURPLE)\n" "2" msgstr "" -#: howto/enum.rst:1270 +#: howto/enum.rst:1211 msgid "Enum Cookbook" msgstr "" -#: howto/enum.rst:1273 +#: howto/enum.rst:1214 msgid "" "While :class:`Enum`, :class:`IntEnum`, :class:`StrEnum`, :class:`Flag`, and :" "class:`IntFlag` are expected to cover the majority of use-cases, they cannot " @@ -1947,50 +1839,50 @@ msgid "" "that can be used directly, or as examples for creating one's own." msgstr "" -#: howto/enum.rst:1280 +#: howto/enum.rst:1221 msgid "Omitting values" msgstr "" -#: howto/enum.rst:1282 +#: howto/enum.rst:1223 msgid "" "In many use-cases, one doesn't care what the actual value of an enumeration " "is. There are several ways to define this type of simple enumeration:" msgstr "" -#: howto/enum.rst:1285 +#: howto/enum.rst:1226 msgid "use instances of :class:`auto` for the value" msgstr "" -#: howto/enum.rst:1286 +#: howto/enum.rst:1227 msgid "use instances of :class:`object` as the value" msgstr "" -#: howto/enum.rst:1287 +#: howto/enum.rst:1228 msgid "use a descriptive string as the value" msgstr "" -#: howto/enum.rst:1288 +#: howto/enum.rst:1229 msgid "" "use a tuple as the value and a custom :meth:`~object.__new__` to replace the " "tuple with an :class:`int` value" msgstr "" -#: howto/enum.rst:1291 +#: howto/enum.rst:1232 msgid "" "Using any of these methods signifies to the user that these values are not " "important, and also enables one to add, remove, or reorder members without " "having to renumber the remaining members." msgstr "" -#: howto/enum.rst:1297 +#: howto/enum.rst:1238 msgid "Using :class:`auto`" msgstr "" -#: howto/enum.rst:1299 +#: howto/enum.rst:1240 msgid "Using :class:`auto` would look like::" msgstr "" -#: howto/enum.rst:1301 +#: howto/enum.rst:1242 msgid "" ">>> class Color(Enum):\n" "... RED = auto()\n" @@ -2001,15 +1893,15 @@ msgid "" "" msgstr "" -#: howto/enum.rst:1311 +#: howto/enum.rst:1252 msgid "Using :class:`object`" msgstr "" -#: howto/enum.rst:1313 +#: howto/enum.rst:1254 msgid "Using :class:`object` would look like::" msgstr "" -#: howto/enum.rst:1315 +#: howto/enum.rst:1256 msgid "" ">>> class Color(Enum):\n" "... RED = object()\n" @@ -2020,13 +1912,13 @@ msgid "" ">" msgstr "" -#: howto/enum.rst:1323 +#: howto/enum.rst:1264 msgid "" "This is also a good example of why you might want to write your own :meth:" "`~object.__repr__`::" msgstr "" -#: howto/enum.rst:1326 +#: howto/enum.rst:1267 msgid "" ">>> class Color(Enum):\n" "... RED = object()\n" @@ -2039,15 +1931,15 @@ msgid "" "" msgstr "" -#: howto/enum.rst:1339 +#: howto/enum.rst:1280 msgid "Using a descriptive string" msgstr "" -#: howto/enum.rst:1341 +#: howto/enum.rst:1282 msgid "Using a string as the value would look like::" msgstr "" -#: howto/enum.rst:1343 +#: howto/enum.rst:1284 msgid "" ">>> class Color(Enum):\n" "... RED = 'stop'\n" @@ -2058,15 +1950,15 @@ msgid "" "" msgstr "" -#: howto/enum.rst:1353 +#: howto/enum.rst:1294 msgid "Using a custom :meth:`~object.__new__`" msgstr "" -#: howto/enum.rst:1355 +#: howto/enum.rst:1296 msgid "Using an auto-numbering :meth:`~object.__new__` would look like::" msgstr "" -#: howto/enum.rst:1357 +#: howto/enum.rst:1298 msgid "" ">>> class AutoNumber(Enum):\n" "... def __new__(cls):\n" @@ -2084,13 +1976,13 @@ msgid "" "" msgstr "" -#: howto/enum.rst:1372 +#: howto/enum.rst:1313 msgid "" "To make a more general purpose ``AutoNumber``, add ``*args`` to the " "signature::" msgstr "" -#: howto/enum.rst:1374 +#: howto/enum.rst:1315 msgid "" ">>> class AutoNumber(Enum):\n" "... def __new__(cls, *args): # this is the only change from above\n" @@ -2101,13 +1993,13 @@ msgid "" "..." msgstr "" -#: howto/enum.rst:1382 +#: howto/enum.rst:1323 msgid "" "Then when you inherit from ``AutoNumber`` you can write your own " "``__init__`` to handle any extra arguments::" msgstr "" -#: howto/enum.rst:1385 +#: howto/enum.rst:1326 msgid "" ">>> class Swatch(AutoNumber):\n" "... def __init__(self, pantone='unknown'):\n" @@ -2124,35 +2016,35 @@ msgid "" "'unknown'" msgstr "" -#: howto/enum.rst:1401 +#: howto/enum.rst:1342 msgid "" "The :meth:`~object.__new__` method, if defined, is used during creation of " "the Enum members; it is then replaced by Enum's :meth:`~object.__new__` " "which is used after class creation for lookup of existing members." msgstr "" -#: howto/enum.rst:1407 +#: howto/enum.rst:1348 msgid "" "*Do not* call ``super().__new__()``, as the lookup-only ``__new__`` is the " "one that is found; instead, use the data type directly -- e.g.::" msgstr "" -#: howto/enum.rst:1410 +#: howto/enum.rst:1351 msgid "obj = int.__new__(cls, value)" msgstr "" -#: howto/enum.rst:1414 +#: howto/enum.rst:1355 msgid "OrderedEnum" msgstr "" -#: howto/enum.rst:1416 +#: howto/enum.rst:1357 msgid "" "An ordered enumeration that is not based on :class:`IntEnum` and so " "maintains the normal :class:`Enum` invariants (such as not being comparable " "to other enumerations)::" msgstr "" -#: howto/enum.rst:1420 +#: howto/enum.rst:1361 msgid "" ">>> class OrderedEnum(Enum):\n" "... def __ge__(self, other):\n" @@ -2183,17 +2075,17 @@ msgid "" "True" msgstr "" -#: howto/enum.rst:1450 +#: howto/enum.rst:1391 msgid "DuplicateFreeEnum" msgstr "" -#: howto/enum.rst:1452 +#: howto/enum.rst:1393 msgid "" "Raises an error if a duplicate member value is found instead of creating an " "alias::" msgstr "" -#: howto/enum.rst:1455 +#: howto/enum.rst:1396 msgid "" ">>> class DuplicateFreeEnum(Enum):\n" "... def __init__(self, *args):\n" @@ -2217,22 +2109,22 @@ msgid "" "ValueError: aliases not allowed in DuplicateFreeEnum: 'GRENE' --> 'GREEN'" msgstr "" -#: howto/enum.rst:1477 +#: howto/enum.rst:1418 msgid "" "This is a useful example for subclassing Enum to add or change other " "behaviors as well as disallowing aliases. If the only desired change is " "disallowing aliases, the :func:`unique` decorator can be used instead." msgstr "" -#: howto/enum.rst:1483 +#: howto/enum.rst:1425 msgid "MultiValueEnum" msgstr "" -#: howto/enum.rst:1485 +#: howto/enum.rst:1427 msgid "Supports having more than one value per member::" msgstr "" -#: howto/enum.rst:1487 +#: howto/enum.rst:1429 msgid "" ">>> class MultiValueEnum(Enum):\n" "... def __new__(cls, value, *values):\n" @@ -2252,17 +2144,17 @@ msgid "" "" msgstr "" -#: howto/enum.rst:1506 +#: howto/enum.rst:1448 msgid "Planet" msgstr "" -#: howto/enum.rst:1508 +#: howto/enum.rst:1450 msgid "" "If :meth:`~object.__new__` or :meth:`~object.__init__` is defined, the value " "of the enum member will be passed to those methods::" msgstr "" -#: howto/enum.rst:1511 +#: howto/enum.rst:1453 msgid "" ">>> class Planet(Enum):\n" "... MERCURY = (3.303e+23, 2.4397e6)\n" @@ -2288,18 +2180,18 @@ msgid "" "9.802652743337129" msgstr "" -#: howto/enum.rst:1537 +#: howto/enum.rst:1479 msgid "TimePeriod" msgstr "" -#: howto/enum.rst:1539 +#: howto/enum.rst:1481 msgid "An example to show the :attr:`~Enum._ignore_` attribute in use::" msgstr "" -#: howto/enum.rst:1541 +#: howto/enum.rst:1483 msgid "" -">>> from datetime import timedelta\n" -">>> class Period(timedelta, Enum):\n" +">>> import datetime as dt\n" +">>> class Period(dt.timedelta, Enum):\n" "... \"different lengths of time\"\n" "... _ignore_ = 'Period i'\n" "... Period = vars()\n" @@ -2314,11 +2206,11 @@ msgid "" "timedelta(days=366)>]" msgstr "" -#: howto/enum.rst:1558 +#: howto/enum.rst:1500 msgid "Subclassing EnumType" msgstr "" -#: howto/enum.rst:1560 +#: howto/enum.rst:1502 msgid "" "While most enum needs can be met by customizing :class:`Enum` subclasses, " "either with class decorators or custom functions, :class:`EnumType` can be " diff --git a/howto/free-threading-extensions.po b/howto/free-threading-extensions.po index e52e8bdd7..62a30110d 100644 --- a/howto/free-threading-extensions.po +++ b/howto/free-threading-extensions.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/howto/free-threading-python.po b/howto/free-threading-python.po index 0f44f0adb..f9b145762 100644 --- a/howto/free-threading-python.po +++ b/howto/free-threading-python.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/howto/functional.po b/howto/functional.po index ad66287d3..236e766f3 100644 --- a/howto/functional.po +++ b/howto/functional.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -26,7 +26,7 @@ msgid "Author" msgstr "" #: howto/functional.rst:7 -msgid "A. M. Kuchling" +msgid "\\A. M. Kuchling" msgstr "" #: howto/functional.rst:0 @@ -1455,7 +1455,7 @@ msgid "" ">>> functools.reduce(operator.concat, [])\n" "Traceback (most recent call last):\n" " ...\n" -"TypeError: reduce() of empty sequence with no initial value\n" +"TypeError: reduce() of empty iterable with no initial value\n" ">>> functools.reduce(operator.mul, [1, 2, 3], 1)\n" "6\n" ">>> functools.reduce(operator.mul, [], 1)\n" diff --git a/howto/gdb_helpers.po b/howto/gdb_helpers.po index ff2fdc17e..5f30aa451 100644 --- a/howto/gdb_helpers.po +++ b/howto/gdb_helpers.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/howto/index.po b/howto/index.po index d795e50e6..5219200b5 100644 --- a/howto/index.po +++ b/howto/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: 2025-11-27 09:00+0200\n" "Last-Translator: ALEXANDROS TZIORAS alextzioras23@gmail.com\n" "Language-Team: Language-Team: PyGreece \n" diff --git a/howto/instrumentation.po b/howto/instrumentation.po index 705f47fbe..7c433b15f 100644 --- a/howto/instrumentation.po +++ b/howto/instrumentation.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -488,21 +488,119 @@ msgid "" msgstr "" #: howto/instrumentation.rst:345 -msgid "SystemTap Tapsets" +msgid "C Entry Points" msgstr "" #: howto/instrumentation.rst:347 msgid "" +"To simplify triggering of DTrace markers, Python's C API comes with a number " +"of helper functions that mirror each static marker. On builds of Python " +"without DTrace enabled, these do nothing." +msgstr "" + +#: howto/instrumentation.rst:351 +msgid "" +"In general, it is not necessary to call these yourself, as Python will do it " +"for you." +msgstr "" + +#: howto/instrumentation.rst:358 +msgid "C API Function" +msgstr "" + +#: howto/instrumentation.rst:359 +msgid "Static Marker" +msgstr "" + +#: howto/instrumentation.rst:360 +msgid "Notes" +msgstr "" + +#: howto/instrumentation.rst:362 +msgid ":c:func:`!line`" +msgstr "" + +#: howto/instrumentation.rst:365 +msgid ":c:func:`!function__entry`" +msgstr "" + +#: howto/instrumentation.rst:368 +msgid ":c:func:`!function__return`" +msgstr "" + +#: howto/instrumentation.rst:371 +msgid ":c:func:`!gc__start`" +msgstr "" + +#: howto/instrumentation.rst:374 +msgid ":c:func:`!gc__done`" +msgstr "" + +#: howto/instrumentation.rst:377 +msgid ":c:func:`!instance__new__start`" +msgstr "" + +#: howto/instrumentation.rst:381 howto/instrumentation.rst:387 +msgid "Not used by Python" +msgstr "" + +#: howto/instrumentation.rst:380 +msgid ":c:func:`!instance__new__done`" +msgstr "" + +#: howto/instrumentation.rst:383 +msgid ":c:func:`!instance__delete__start`" +msgstr "" + +#: howto/instrumentation.rst:386 +msgid ":c:func:`!instance__delete__done`" +msgstr "" + +#: howto/instrumentation.rst:389 +msgid ":c:func:`!import__find__load__start`" +msgstr "" + +#: howto/instrumentation.rst:392 +msgid ":c:func:`!import__find__load__done`" +msgstr "" + +#: howto/instrumentation.rst:395 +msgid ":c:func:`!audit`" +msgstr "" + +#: howto/instrumentation.rst:400 +msgid "C Probing Checks" +msgstr "" + +#: howto/instrumentation.rst:415 +msgid "" +"All calls to ``PyDTrace`` functions must be guarded by a call to one of " +"these functions. This allows Python to minimize performance impact when " +"probing is disabled." +msgstr "" + +#: howto/instrumentation.rst:419 +msgid "" +"On builds without DTrace enabled, these functions do nothing and return " +"``0``." +msgstr "" + +#: howto/instrumentation.rst:423 +msgid "SystemTap Tapsets" +msgstr "" + +#: howto/instrumentation.rst:425 +msgid "" "The higher-level way to use the SystemTap integration is to use a " "\"tapset\": SystemTap's equivalent of a library, which hides some of the " "lower-level details of the static markers." msgstr "" -#: howto/instrumentation.rst:351 +#: howto/instrumentation.rst:429 msgid "Here is a tapset file, based on a non-shared build of CPython:" msgstr "" -#: howto/instrumentation.rst:353 +#: howto/instrumentation.rst:431 msgid "" "/*\n" " Provide a higher-level wrapping around the function__entry and\n" @@ -525,19 +623,19 @@ msgid "" "}" msgstr "" -#: howto/instrumentation.rst:374 +#: howto/instrumentation.rst:452 msgid "" "If this file is installed in SystemTap's tapset directory (e.g. ``/usr/share/" "systemtap/tapset``), then these additional probepoints become available:" msgstr "" -#: howto/instrumentation.rst:380 +#: howto/instrumentation.rst:458 msgid "" "This probe point indicates that execution of a Python function has begun. It " "is only triggered for pure-Python (bytecode) functions." msgstr "" -#: howto/instrumentation.rst:385 +#: howto/instrumentation.rst:463 msgid "" "This probe point is the converse of ``python.function.return``, and " "indicates that execution of a Python function has ended (either via " @@ -545,18 +643,18 @@ msgid "" "(bytecode) functions." msgstr "" -#: howto/instrumentation.rst:392 +#: howto/instrumentation.rst:470 msgid "Examples" msgstr "" -#: howto/instrumentation.rst:393 +#: howto/instrumentation.rst:471 msgid "" "This SystemTap script uses the tapset above to more cleanly implement the " "example given above of tracing the Python function-call hierarchy, without " "needing to directly name the static markers:" msgstr "" -#: howto/instrumentation.rst:397 +#: howto/instrumentation.rst:475 msgid "" "probe python.function.entry\n" "{\n" @@ -571,14 +669,14 @@ msgid "" "}" msgstr "" -#: howto/instrumentation.rst:412 +#: howto/instrumentation.rst:490 msgid "" "The following script uses the tapset above to provide a top-like view of all " "running CPython code, showing the top 20 most frequently entered bytecode " "frames, each second, across the whole system:" msgstr "" -#: howto/instrumentation.rst:416 +#: howto/instrumentation.rst:494 msgid "" "global fn_calls;\n" "\n" diff --git a/howto/ipaddress.po b/howto/ipaddress.po index bd3bf0efe..156719cc1 100644 --- a/howto/ipaddress.po +++ b/howto/ipaddress.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/howto/isolating-extensions.po b/howto/isolating-extensions.po index a09bbb349..1d6139f91 100644 --- a/howto/isolating-extensions.po +++ b/howto/isolating-extensions.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/howto/logging-cookbook.po b/howto/logging-cookbook.po index 4b55de1fa..eaccb79a9 100644 --- a/howto/logging-cookbook.po +++ b/howto/logging-cookbook.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -307,7 +307,7 @@ msgid "" "# tell the handler to use this format\n" "console.setFormatter(formatter)\n" "# add the handler to the root logger\n" -"logging.getLogger('').addHandler(console)\n" +"logging.getLogger().addHandler(console)\n" "\n" "# Now, we can log to the root logger, or any other logger. First the " "root...\n" @@ -808,7 +808,7 @@ msgstr "" msgid "" "import logging, logging.handlers\n" "\n" -"rootLogger = logging.getLogger('')\n" +"rootLogger = logging.getLogger()\n" "rootLogger.setLevel(logging.DEBUG)\n" "socketHandler = logging.handlers.SocketHandler('localhost',\n" " logging.handlers.DEFAULT_TCP_LOGGING_PORT)\n" @@ -1978,12 +1978,12 @@ msgid "" msgstr "" #: howto/logging-cookbook.rst:1540 -msgid "Deploying Web applications using Gunicorn and uWSGI" +msgid "Deploying web applications using Gunicorn and uWSGI" msgstr "" #: howto/logging-cookbook.rst:1542 msgid "" -"When deploying Web applications using `Gunicorn `_ or " +"When deploying web applications using `Gunicorn `_ or " "`uWSGI `_ (or similar), " "multiple worker processes are created to handle client requests. In such " "environments, avoid creating file-based handlers directly in your web " @@ -4517,7 +4517,6 @@ msgstr "" #: howto/logging-cookbook.rst:3607 msgid "" -"import datetime\n" "import logging\n" "import random\n" "import sys\n" @@ -4766,30 +4765,30 @@ msgid "" " main()" msgstr "" -#: howto/logging-cookbook.rst:3839 +#: howto/logging-cookbook.rst:3838 msgid "Logging to syslog with RFC5424 support" msgstr "" -#: howto/logging-cookbook.rst:3841 +#: howto/logging-cookbook.rst:3840 msgid "" "Although :rfc:`5424` dates from 2009, most syslog servers are configured by " "default to use the older :rfc:`3164`, which hails from 2001. When " "``logging`` was added to Python in 2003, it supported the earlier (and only " -"existing) protocol at the time. Since RFC5424 came out, as there has not " +"existing) protocol at the time. Since RFC 5424 came out, as there has not " "been widespread deployment of it in syslog servers, the :class:`~logging." "handlers.SysLogHandler` functionality has not been updated." msgstr "" -#: howto/logging-cookbook.rst:3848 +#: howto/logging-cookbook.rst:3847 msgid "" "RFC 5424 contains some useful features such as support for structured data, " "and if you need to be able to log to a syslog server with support for it, " "you can do so with a subclassed handler which looks something like this::" msgstr "" -#: howto/logging-cookbook.rst:3852 +#: howto/logging-cookbook.rst:3851 msgid "" -"import datetime\n" +"import datetime as dt\n" "import logging.handlers\n" "import re\n" "import socket\n" @@ -4807,8 +4806,7 @@ msgid "" "\n" " def format(self, record):\n" " version = 1\n" -" asctime = datetime.datetime.fromtimestamp(record.created)." -"isoformat()\n" +" asctime = dt.datetime.fromtimestamp(record.created).isoformat()\n" " m = self.tz_offset.match(time.strftime('%z'))\n" " has_offset = False\n" " if m and time.timezone:\n" @@ -4857,7 +4855,7 @@ msgid "" "{sdata} {msg}'" msgstr "" -#: howto/logging-cookbook.rst:3914 +#: howto/logging-cookbook.rst:3913 msgid "" "You'll need to be familiar with RFC 5424 to fully understand the above code, " "and it may be that you have slightly different needs (e.g. for how you pass " @@ -4866,7 +4864,7 @@ msgid "" "using something like this::" msgstr "" -#: howto/logging-cookbook.rst:3919 +#: howto/logging-cookbook.rst:3918 msgid "" "sd = {\n" " 'foo@12345': {'bar': 'baz', 'baz': 'bozz', 'fizz': r'buzz'},\n" @@ -4877,11 +4875,11 @@ msgid "" "logger.debug('Message %d', i, extra=extra)" msgstr "" -#: howto/logging-cookbook.rst:3928 +#: howto/logging-cookbook.rst:3927 msgid "How to treat a logger like an output stream" msgstr "" -#: howto/logging-cookbook.rst:3930 +#: howto/logging-cookbook.rst:3929 msgid "" "Sometimes, you need to interface to a third-party API which expects a file-" "like object to write to, but you want to direct the API's output to a " @@ -4889,7 +4887,7 @@ msgid "" "API. Here's a short script illustrating such a class:" msgstr "" -#: howto/logging-cookbook.rst:3935 +#: howto/logging-cookbook.rst:3934 msgid "" "import logging\n" "\n" @@ -4927,23 +4925,23 @@ msgid "" " main()" msgstr "" -#: howto/logging-cookbook.rst:3970 +#: howto/logging-cookbook.rst:3969 msgid "When this script is run, it prints" msgstr "" -#: howto/logging-cookbook.rst:3972 +#: howto/logging-cookbook.rst:3971 msgid "" "INFO:demo:An INFO message\n" "DEBUG:demo:A DEBUG message" msgstr "" -#: howto/logging-cookbook.rst:3977 +#: howto/logging-cookbook.rst:3976 msgid "" "You could also use ``LoggerWriter`` to redirect ``sys.stdout`` and ``sys." "stderr`` by doing something like this:" msgstr "" -#: howto/logging-cookbook.rst:3980 +#: howto/logging-cookbook.rst:3979 msgid "" "import sys\n" "\n" @@ -4951,7 +4949,7 @@ msgid "" "sys.stderr = LoggerWriter(logger, logging.WARNING)" msgstr "" -#: howto/logging-cookbook.rst:3987 +#: howto/logging-cookbook.rst:3986 msgid "" "You should do this *after* configuring logging for your needs. In the above " "example, the :func:`~logging.basicConfig` call does this (using the ``sys." @@ -4959,7 +4957,7 @@ msgid "" "Then, you'd get this kind of result:" msgstr "" -#: howto/logging-cookbook.rst:3992 +#: howto/logging-cookbook.rst:3991 msgid "" ">>> print('Foo')\n" "INFO:demo:Foo\n" @@ -4968,31 +4966,31 @@ msgid "" ">>>" msgstr "" -#: howto/logging-cookbook.rst:4000 +#: howto/logging-cookbook.rst:3999 msgid "" "Of course, the examples above show output according to the format used by :" "func:`~logging.basicConfig`, but you can use a different formatter when you " "configure logging." msgstr "" -#: howto/logging-cookbook.rst:4004 +#: howto/logging-cookbook.rst:4003 msgid "" "Note that with the above scheme, you are somewhat at the mercy of buffering " "and the sequence of write calls which you are intercepting. For example, " "with the definition of ``LoggerWriter`` above, if you have the snippet" msgstr "" -#: howto/logging-cookbook.rst:4008 +#: howto/logging-cookbook.rst:4007 msgid "" "sys.stderr = LoggerWriter(logger, logging.WARNING)\n" "1 / 0" msgstr "" -#: howto/logging-cookbook.rst:4013 +#: howto/logging-cookbook.rst:4012 msgid "then running the script results in" msgstr "" -#: howto/logging-cookbook.rst:4015 +#: howto/logging-cookbook.rst:4014 msgid "" "WARNING:demo:Traceback (most recent call last):\n" "\n" @@ -5011,7 +5009,7 @@ msgid "" "WARNING:demo:division by zero" msgstr "" -#: howto/logging-cookbook.rst:4031 +#: howto/logging-cookbook.rst:4030 msgid "" "As you can see, this output isn't ideal. That's because the underlying code " "which writes to ``sys.stderr`` makes multiple writes, each of which results " @@ -5021,7 +5019,7 @@ msgid "" "``LoggerWriter``:" msgstr "" -#: howto/logging-cookbook.rst:4037 +#: howto/logging-cookbook.rst:4036 msgid "" "class BufferingLoggerWriter(LoggerWriter):\n" " def __init__(self, logger, level):\n" @@ -5041,13 +5039,13 @@ msgid "" " self.logger.log(self.level, part)" msgstr "" -#: howto/logging-cookbook.rst:4056 +#: howto/logging-cookbook.rst:4055 msgid "" "This just buffers up stuff until a newline is seen, and then logs complete " "lines. With this approach, you get better output:" msgstr "" -#: howto/logging-cookbook.rst:4059 +#: howto/logging-cookbook.rst:4058 msgid "" "WARNING:demo:Traceback (most recent call last):\n" "WARNING:demo: File \"/home/runner/cookbook-loggerwriter/main.py\", line 55, " @@ -5059,11 +5057,11 @@ msgid "" "WARNING:demo:ZeroDivisionError: division by zero" msgstr "" -#: howto/logging-cookbook.rst:4069 +#: howto/logging-cookbook.rst:4068 msgid "How to uniformly handle newlines in logging output" msgstr "" -#: howto/logging-cookbook.rst:4071 +#: howto/logging-cookbook.rst:4070 msgid "" "Usually, messages that are logged (say to console or file) consist of a " "single line of text. However, sometimes there is a need to handle messages " @@ -5074,7 +5072,7 @@ msgid "" "handler mixin, as in the following snippet:" msgstr "" -#: howto/logging-cookbook.rst:4079 +#: howto/logging-cookbook.rst:4078 msgid "" "# Assume this is in a module mymixins.py\n" "import copy\n" @@ -5093,11 +5091,11 @@ msgid "" " super().emit(rec)" msgstr "" -#: howto/logging-cookbook.rst:4097 +#: howto/logging-cookbook.rst:4096 msgid "You can use the mixin as in the following script:" msgstr "" -#: howto/logging-cookbook.rst:4099 +#: howto/logging-cookbook.rst:4098 msgid "" "import logging\n" "\n" @@ -5119,11 +5117,11 @@ msgid "" "again')" msgstr "" -#: howto/logging-cookbook.rst:4118 +#: howto/logging-cookbook.rst:4117 msgid "The script, when run, prints something like:" msgstr "" -#: howto/logging-cookbook.rst:4120 +#: howto/logging-cookbook.rst:4119 msgid "" "2025-07-02 13:54:47,234 DEBUG Single line\n" "2025-07-02 13:54:47,234 DEBUG Multiple lines:\n" @@ -5134,14 +5132,14 @@ msgid "" "2025-07-02 13:54:47,234 DEBUG can't get fooled again" msgstr "" -#: howto/logging-cookbook.rst:4130 +#: howto/logging-cookbook.rst:4129 msgid "" "If, on the other hand, you are concerned about `log injection `_, you can use a formatter which " "escapes newlines, as per the following example:" msgstr "" -#: howto/logging-cookbook.rst:4134 +#: howto/logging-cookbook.rst:4133 msgid "" "import logging\n" "\n" @@ -5164,13 +5162,13 @@ msgid "" "again')" msgstr "" -#: howto/logging-cookbook.rst:4154 +#: howto/logging-cookbook.rst:4153 msgid "" "You can, of course, use whatever escaping scheme makes the most sense for " "you. The script, when run, should produce output like this:" msgstr "" -#: howto/logging-cookbook.rst:4157 +#: howto/logging-cookbook.rst:4156 msgid "" "2025-07-09 06:47:33,783 DEBUG Single line\n" "2025-07-09 06:47:33,783 DEBUG Multiple lines:\\nfool me once ...\n" @@ -5179,17 +5177,17 @@ msgid "" "fooled again" msgstr "" -#: howto/logging-cookbook.rst:4164 +#: howto/logging-cookbook.rst:4163 msgid "" "Escaping behaviour can't be the stdlib default , as it would break backwards " "compatibility." msgstr "" -#: howto/logging-cookbook.rst:4170 +#: howto/logging-cookbook.rst:4169 msgid "Patterns to avoid" msgstr "" -#: howto/logging-cookbook.rst:4172 +#: howto/logging-cookbook.rst:4171 msgid "" "Although the preceding sections have described ways of doing things you " "might need to do or deal with, it is worth mentioning some usage patterns " @@ -5197,11 +5195,11 @@ msgid "" "The following sections are in no particular order." msgstr "" -#: howto/logging-cookbook.rst:4178 +#: howto/logging-cookbook.rst:4177 msgid "Opening the same log file multiple times" msgstr "" -#: howto/logging-cookbook.rst:4180 +#: howto/logging-cookbook.rst:4179 msgid "" "On Windows, you will generally not be able to open the same file multiple " "times as this will lead to a \"file is in use by another process\" error. " @@ -5209,32 +5207,32 @@ msgid "" "file multiple times. This could be done accidentally, for example by:" msgstr "" -#: howto/logging-cookbook.rst:4185 +#: howto/logging-cookbook.rst:4184 msgid "" "Adding a file handler more than once which references the same file (e.g. by " "a copy/paste/forget-to-change error)." msgstr "" -#: howto/logging-cookbook.rst:4188 +#: howto/logging-cookbook.rst:4187 msgid "" "Opening two files that look different, as they have different names, but are " "the same because one is a symbolic link to the other." msgstr "" -#: howto/logging-cookbook.rst:4191 +#: howto/logging-cookbook.rst:4190 msgid "" "Forking a process, following which both parent and child have a reference to " "the same file. This might be through use of the :mod:`multiprocessing` " "module, for example." msgstr "" -#: howto/logging-cookbook.rst:4195 +#: howto/logging-cookbook.rst:4194 msgid "" "Opening a file multiple times might *appear* to work most of the time, but " "can lead to a number of problems in practice:" msgstr "" -#: howto/logging-cookbook.rst:4198 +#: howto/logging-cookbook.rst:4197 msgid "" "Logging output can be garbled because multiple threads or processes try to " "write to the same file. Although logging guards against concurrent use of " @@ -5243,7 +5241,7 @@ msgid "" "different handler instances which happen to point to the same file." msgstr "" -#: howto/logging-cookbook.rst:4204 +#: howto/logging-cookbook.rst:4203 msgid "" "An attempt to delete a file (e.g. during file rotation) silently fails, " "because there is another reference pointing to it. This can lead to " @@ -5253,17 +5251,17 @@ msgid "" "being supposedly in place." msgstr "" -#: howto/logging-cookbook.rst:4211 +#: howto/logging-cookbook.rst:4210 msgid "" "Use the techniques outlined in :ref:`multiple-processes` to circumvent such " "issues." msgstr "" -#: howto/logging-cookbook.rst:4215 +#: howto/logging-cookbook.rst:4214 msgid "Using loggers as attributes in a class or passing them as parameters" msgstr "" -#: howto/logging-cookbook.rst:4217 +#: howto/logging-cookbook.rst:4216 msgid "" "While there might be unusual cases where you'll need to do this, in general " "there is no point because loggers are singletons. Code can always access a " @@ -5274,13 +5272,13 @@ msgid "" "module (and not the class) is the unit of software decomposition." msgstr "" -#: howto/logging-cookbook.rst:4226 +#: howto/logging-cookbook.rst:4225 msgid "" "Adding handlers other than :class:`~logging.NullHandler` to a logger in a " "library" msgstr "" -#: howto/logging-cookbook.rst:4228 +#: howto/logging-cookbook.rst:4227 msgid "" "Configuring logging by adding handlers, formatters and filters is the " "responsibility of the application developer, not the library developer. If " @@ -5288,11 +5286,11 @@ msgid "" "your loggers other than a :class:`~logging.NullHandler` instance." msgstr "" -#: howto/logging-cookbook.rst:4234 +#: howto/logging-cookbook.rst:4233 msgid "Creating a lot of loggers" msgstr "" -#: howto/logging-cookbook.rst:4236 +#: howto/logging-cookbook.rst:4235 msgid "" "Loggers are singletons that are never freed during a script execution, and " "so creating lots of loggers will use up memory which can't then be freed. " @@ -5303,38 +5301,38 @@ msgid "" "occasionally slightly more fine-grained than that)." msgstr "" -#: howto/logging-cookbook.rst:4247 +#: howto/logging-cookbook.rst:4246 msgid "Other resources" msgstr "" -#: howto/logging-cookbook.rst:4251 +#: howto/logging-cookbook.rst:4250 msgid "Module :mod:`logging`" msgstr "" -#: howto/logging-cookbook.rst:4252 +#: howto/logging-cookbook.rst:4251 msgid "API reference for the logging module." msgstr "" -#: howto/logging-cookbook.rst:4254 +#: howto/logging-cookbook.rst:4253 msgid "Module :mod:`logging.config`" msgstr "" -#: howto/logging-cookbook.rst:4255 +#: howto/logging-cookbook.rst:4254 msgid "Configuration API for the logging module." msgstr "" -#: howto/logging-cookbook.rst:4257 +#: howto/logging-cookbook.rst:4256 msgid "Module :mod:`logging.handlers`" msgstr "" -#: howto/logging-cookbook.rst:4258 +#: howto/logging-cookbook.rst:4257 msgid "Useful handlers included with the logging module." msgstr "" -#: howto/logging-cookbook.rst:4260 +#: howto/logging-cookbook.rst:4259 msgid ":ref:`Basic Tutorial `" msgstr "" -#: howto/logging-cookbook.rst:4262 +#: howto/logging-cookbook.rst:4261 msgid ":ref:`Advanced Tutorial `" msgstr "" diff --git a/howto/logging.po b/howto/logging.po index 4a8ce5169..77375223f 100644 --- a/howto/logging.po +++ b/howto/logging.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -57,10 +57,10 @@ msgstr "" #: howto/logging.rst:30 msgid "" "You can access logging functionality by creating a logger via ``logger = " -"getLogger(__name__)``, and then calling the logger's :meth:`~Logger.debug`, :" -"meth:`~Logger.info`, :meth:`~Logger.warning`, :meth:`~Logger.error` and :" -"meth:`~Logger.critical` methods. To determine when to use logging, and to " -"see which logger methods to use when, see the table below. It states, for " +"logging.getLogger(__name__)``, and then calling the logger's :meth:`~Logger." +"debug`, :meth:`~Logger.info`, :meth:`~Logger.warning`, :meth:`~Logger.error` " +"and :meth:`~Logger.critical` methods. To determine when to use logging, and " +"to see which logger methods to use when, see the table below. It states, for " "each of a set of common tasks, the best tool to use for that task." msgstr "" diff --git a/howto/mro.po b/howto/mro.po index 00d91adf9..9934adc5f 100644 --- a/howto/mro.po +++ b/howto/mro.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -29,7 +29,7 @@ msgid "" msgstr "" #: howto/mro.rst:13 -msgid "By `Michele Simionato `__." +msgid "By `Michele Simionato `__." msgstr "" #: howto/mro.rst:0 diff --git a/howto/perf_profiling.po b/howto/perf_profiling.po index 59b70716d..cad5985a4 100644 --- a/howto/perf_profiling.po +++ b/howto/perf_profiling.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/howto/pyporting.po b/howto/pyporting.po index d2c2da1cf..2ed466aac 100644 --- a/howto/pyporting.po +++ b/howto/pyporting.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: 2024-12-06 13:40+0200\n" "Last-Translator: Marios Giannopoulos \n" "Language-Team: PyGreece \n" diff --git a/howto/regex.po b/howto/regex.po index 792f14c50..c825a2539 100644 --- a/howto/regex.po +++ b/howto/regex.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,7 +18,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: howto/regex.rst:5 -msgid "Regular Expression HOWTO" +msgid "Regular expression HOWTO" msgstr "" #: howto/regex.rst:0 @@ -80,7 +80,7 @@ msgid "" msgstr "" #: howto/regex.rst:51 -msgid "Simple Patterns" +msgid "Simple patterns" msgstr "" #: howto/regex.rst:53 @@ -98,7 +98,7 @@ msgid "" msgstr "" #: howto/regex.rst:63 -msgid "Matching Characters" +msgid "Matching characters" msgstr "" #: howto/regex.rst:65 @@ -269,7 +269,7 @@ msgid "" msgstr "" #: howto/regex.rst:163 -msgid "Repeating Things" +msgid "Repeating things" msgstr "" #: howto/regex.rst:165 @@ -385,7 +385,7 @@ msgid "" "a ``'d'``." msgstr "" -#: howto/regex.rst:213 +#: howto/regex.rst:209 msgid "6" msgstr "" @@ -397,6 +397,10 @@ msgstr "" msgid "Back up again, so that ``[bcd]*`` is only matching ``bc``." msgstr "" +#: howto/regex.rst:213 +msgid "7" +msgstr "" + #: howto/regex.rst:213 msgid "" "Try ``b`` again. This time the character at the current position is " @@ -463,7 +467,7 @@ msgid "" msgstr "" #: howto/regex.rst:259 -msgid "Using Regular Expressions" +msgid "Using regular expressions" msgstr "" #: howto/regex.rst:261 @@ -475,7 +479,7 @@ msgid "" msgstr "" #: howto/regex.rst:268 -msgid "Compiling Regular Expressions" +msgid "Compiling regular expressions" msgstr "" #: howto/regex.rst:270 @@ -522,7 +526,7 @@ msgid "" msgstr "" #: howto/regex.rst:299 -msgid "The Backslash Plague" +msgid "The backslash plague" msgstr "" #: howto/regex.rst:301 @@ -600,8 +604,8 @@ msgstr "" msgid "" "In addition, special escape sequences that are valid in regular expressions, " "but not valid as Python string literals, now result in a :exc:" -"`DeprecationWarning` and will eventually become a :exc:`SyntaxError`, which " -"means the sequences will be invalid if raw string notation or escaping the " +"`SyntaxWarning` and will eventually become a :exc:`SyntaxError`, which means " +"the sequences will be invalid if raw string notation or escaping the " "backslashes isn't used." msgstr "" @@ -634,7 +638,7 @@ msgid "``r\"\\w+\\s+\\1\"``" msgstr "" #: howto/regex.rst:355 -msgid "Performing Matches" +msgid "Performing matches" msgstr "" #: howto/regex.rst:357 @@ -674,7 +678,7 @@ msgid "``findall()``" msgstr "" #: howto/regex.rst:371 -msgid "Find all substrings where the RE matches, and returns them as a list." +msgid "Find all substrings where the RE matches, and return them as a list." msgstr "" #: howto/regex.rst:374 @@ -683,7 +687,7 @@ msgstr "" #: howto/regex.rst:374 msgid "" -"Find all substrings where the RE matches, and returns them as an :term:" +"Find all substrings where the RE matches, and return them as an :term:" "`iterator`." msgstr "" @@ -857,8 +861,8 @@ msgid "" "The ``r`` prefix, making the literal a raw string literal, is needed in this " "example because escape sequences in a normal \"cooked\" string literal that " "are not recognized by Python, as opposed to regular expressions, now result " -"in a :exc:`DeprecationWarning` and will eventually become a :exc:" -"`SyntaxError`. See :ref:`the-backslash-plague`." +"in a :exc:`SyntaxWarning` and will eventually become a :exc:`SyntaxError`. " +"See :ref:`the-backslash-plague`." msgstr "" #: howto/regex.rst:479 @@ -883,7 +887,7 @@ msgid "" msgstr "" #: howto/regex.rst:495 -msgid "Module-Level Functions" +msgid "Module-level functions" msgstr "" #: howto/regex.rst:497 @@ -921,7 +925,7 @@ msgid "" msgstr "" #: howto/regex.rst:522 -msgid "Compilation Flags" +msgid "Compilation flags" msgstr "" #: howto/regex.rst:526 @@ -1080,7 +1084,7 @@ msgid "" "the whitespace is in a character class or preceded by an unescaped " "backslash; this lets you organize and indent the RE more clearly. This flag " "also lets you put comments within a RE that will be ignored by the engine; " -"comments are marked by a ``'#'`` that's neither in a character class or " +"comments are marked by a ``'#'`` that's neither in a character class nor " "preceded by an unescaped backslash." msgstr "" @@ -1122,7 +1126,7 @@ msgid "" msgstr "" #: howto/regex.rst:673 -msgid "More Pattern Power" +msgid "More pattern power" msgstr "" #: howto/regex.rst:675 @@ -1133,7 +1137,7 @@ msgid "" msgstr "" #: howto/regex.rst:683 -msgid "More Metacharacters" +msgid "More metacharacters" msgstr "" #: howto/regex.rst:685 @@ -1459,7 +1463,7 @@ msgid "" msgstr "" #: howto/regex.rst:876 -msgid "Non-capturing and Named Groups" +msgid "Non-capturing and named groups" msgstr "" #: howto/regex.rst:878 @@ -1620,7 +1624,7 @@ msgid "" msgstr "" #: howto/regex.rst:980 -msgid "Lookahead Assertions" +msgid "Lookahead assertions" msgstr "" #: howto/regex.rst:982 @@ -1761,7 +1765,7 @@ msgid "``.*[.](?!bat$|exe$)[^.]*$``" msgstr "" #: howto/regex.rst:1062 -msgid "Modifying Strings" +msgid "Modifying strings" msgstr "" #: howto/regex.rst:1064 @@ -1800,7 +1804,7 @@ msgid "" msgstr "" #: howto/regex.rst:1084 -msgid "Splitting Strings" +msgid "Splitting strings" msgstr "" #: howto/regex.rst:1086 @@ -1874,7 +1878,7 @@ msgid "" msgstr "" #: howto/regex.rst:1138 -msgid "Search and Replace" +msgid "Search and replace" msgstr "" #: howto/regex.rst:1140 @@ -2028,7 +2032,7 @@ msgid "" msgstr "" #: howto/regex.rst:1237 -msgid "Common Problems" +msgid "Common problems" msgstr "" #: howto/regex.rst:1239 @@ -2040,7 +2044,7 @@ msgid "" msgstr "" #: howto/regex.rst:1245 -msgid "Use String Methods" +msgid "Use string methods" msgstr "" #: howto/regex.rst:1247 @@ -2139,7 +2143,7 @@ msgid "" msgstr "" #: howto/regex.rst:1311 -msgid "Greedy versus Non-Greedy" +msgid "Greedy versus non-greedy" msgstr "" #: howto/regex.rst:1313 @@ -2254,9 +2258,9 @@ msgstr "" #: howto/regex.rst:1387 msgid "" "Regular expressions are a complicated topic. Did this document help you " -"understand them? Were there parts that were unclear, or Problems you " +"understand them? Were there parts that were unclear, or problems you " "encountered that weren't covered here? If so, please send suggestions for " -"improvements to the author." +"improvements to the :ref:`issue tracker `." msgstr "" #: howto/regex.rst:1392 diff --git a/howto/sockets.po b/howto/sockets.po index b8e570c17..e6e05e3e8 100644 --- a/howto/sockets.po +++ b/howto/sockets.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/howto/sorting.po b/howto/sorting.po index d0be49730..30d72baf9 100644 --- a/howto/sorting.po +++ b/howto/sorting.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/howto/timerfd.po b/howto/timerfd.po index 9129e4bff..0062b575c 100644 --- a/howto/timerfd.po +++ b/howto/timerfd.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/howto/unicode.po b/howto/unicode.po index 9378917f2..88ea5847d 100644 --- a/howto/unicode.po +++ b/howto/unicode.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/howto/urllib2.po b/howto/urllib2.po index f43802cff..d0a49a164 100644 --- a/howto/urllib2.po +++ b/howto/urllib2.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -42,7 +42,7 @@ msgstr "" #: howto/urllib2.rst:18 msgid "" "`Basic Authentication `_" +"voidspace.org.uk/python/articles/authentication.shtml>`__" msgstr "" #: howto/urllib2.rst:20 diff --git a/installing/index.po b/installing/index.po index c48b21b34..f0047a336 100644 --- a/installing/index.po +++ b/installing/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,25 +18,17 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: installing/index.rst:7 -msgid "Installing Python Modules" -msgstr "" - -#: installing/index.rst:0 -msgid "Email" +msgid "Installing Python modules" msgstr "" #: installing/index.rst:9 -msgid "distutils-sig@python.org" -msgstr "" - -#: installing/index.rst:11 msgid "" "As a popular open source development project, Python has an active " "supporting community of contributors and users that also make their software " -"available for other Python developers to use under open source license terms." +"available for other Python developers to use under open-source license terms." msgstr "" -#: installing/index.rst:15 +#: installing/index.rst:13 msgid "" "This allows Python users to share and collaborate effectively, benefiting " "from the solutions others have already created to common (and sometimes even " @@ -44,14 +36,14 @@ msgid "" "the common pool." msgstr "" -#: installing/index.rst:20 +#: installing/index.rst:18 msgid "" "This guide covers the installation part of the process. For a guide to " "creating and sharing your own Python projects, refer to the `Python " "packaging user guide`_." msgstr "" -#: installing/index.rst:28 +#: installing/index.rst:26 msgid "" "For corporate and other institutional users, be aware that many " "organisations have their own policies around using and contributing to open " @@ -59,108 +51,95 @@ msgid "" "the distribution and installation tools provided with Python." msgstr "" -#: installing/index.rst:35 +#: installing/index.rst:33 msgid "Key terms" msgstr "" -#: installing/index.rst:37 +#: installing/index.rst:35 msgid "" -"``pip`` is the preferred installer program. Starting with Python 3.4, it is " -"included by default with the Python binary installers." +":program:`pip` is the preferred installer program. It is included by default " +"with the Python binary installers." msgstr "" -#: installing/index.rst:39 +#: installing/index.rst:37 msgid "" "A *virtual environment* is a semi-isolated Python environment that allows " "packages to be installed for use by a particular application, rather than " "being installed system wide." msgstr "" -#: installing/index.rst:42 +#: installing/index.rst:40 msgid "" -"``venv`` is the standard tool for creating virtual environments, and has " -"been part of Python since Python 3.3. Starting with Python 3.4, it defaults " -"to installing ``pip`` into all created virtual environments." +"``venv`` is the standard tool for creating virtual environments. It defaults " +"to installing :program:`pip` into all created virtual environments." msgstr "" -#: installing/index.rst:45 +#: installing/index.rst:42 msgid "" -"``virtualenv`` is a third party alternative (and predecessor) to ``venv``. " -"It allows virtual environments to be used on versions of Python prior to " -"3.4, which either don't provide ``venv`` at all, or aren't able to " -"automatically install ``pip`` into created environments." +"``virtualenv`` is a third-party alternative (and predecessor) to ``venv``." msgstr "" -#: installing/index.rst:49 +#: installing/index.rst:44 msgid "" -"The `Python Package Index `__ is a public repository of " -"open source licensed packages made available for use by other Python users." +"The `Python Package Index (PyPI) `__ is a public " +"repository of open source licensed packages made available for use by other " +"Python users." msgstr "" -#: installing/index.rst:52 +#: installing/index.rst:47 msgid "" -"the `Python Packaging Authority `__ is the group of " +"The `Python Packaging Authority `__ is the group of " "developers and documentation authors responsible for the maintenance and " "evolution of the standard packaging tools and the associated metadata and " "file format standards. They maintain a variety of tools, documentation, and " "issue trackers on `GitHub `__." msgstr "" -#: installing/index.rst:58 -msgid "" -"``distutils`` is the original build and distribution system first added to " -"the Python standard library in 1998. While direct use of ``distutils`` is " -"being phased out, it still laid the foundation for the current packaging and " -"distribution infrastructure, and it not only remains part of the standard " -"library, but its name lives on in other ways (such as the name of the " -"mailing list used to coordinate Python packaging standards development)." -msgstr "" - -#: installing/index.rst:66 +#: installing/index.rst:54 msgid "" "The use of ``venv`` is now recommended for creating virtual environments." msgstr "" -#: installing/index.rst:71 +#: installing/index.rst:59 msgid "" "`Python Packaging User Guide: Creating and using virtual environments " "`__" msgstr "" -#: installing/index.rst:76 +#: installing/index.rst:64 msgid "Basic usage" msgstr "" -#: installing/index.rst:78 +#: installing/index.rst:66 msgid "" "The standard packaging tools are all designed to be used from the command " "line." msgstr "" -#: installing/index.rst:81 +#: installing/index.rst:69 msgid "" "The following command will install the latest version of a module and its " -"dependencies from the Python Package Index::" +"dependencies from PyPI::" msgstr "" -#: installing/index.rst:84 +#: installing/index.rst:72 msgid "python -m pip install SomePackage" msgstr "" -#: installing/index.rst:88 +#: installing/index.rst:76 msgid "" "For POSIX users (including macOS and Linux users), the examples in this " "guide assume the use of a :term:`virtual environment`." msgstr "" -#: installing/index.rst:91 +#: installing/index.rst:79 msgid "" "For Windows users, the examples in this guide assume that the option to " "adjust the system PATH environment variable was selected when installing " "Python." msgstr "" -#: installing/index.rst:95 +#: installing/index.rst:83 msgid "" "It's also possible to specify an exact or minimum version directly on the " "command line. When using comparator operators such as ``>``, ``<`` or some " @@ -168,206 +147,185 @@ msgid "" "the version should be enclosed within double quotes::" msgstr "" -#: installing/index.rst:100 +#: installing/index.rst:88 msgid "" "python -m pip install SomePackage==1.0.4 # specific version\n" "python -m pip install \"SomePackage>=1.0.4\" # minimum version" msgstr "" -#: installing/index.rst:103 +#: installing/index.rst:91 msgid "" "Normally, if a suitable module is already installed, attempting to install " "it again will have no effect. Upgrading existing modules must be requested " "explicitly::" msgstr "" -#: installing/index.rst:107 +#: installing/index.rst:95 msgid "python -m pip install --upgrade SomePackage" msgstr "" -#: installing/index.rst:109 +#: installing/index.rst:97 msgid "" -"More information and resources regarding ``pip`` and its capabilities can be " -"found in the `Python Packaging User Guide `__." +"More information and resources regarding :program:`pip` and its capabilities " +"can be found in the `Python Packaging User Guide `__." msgstr "" -#: installing/index.rst:112 +#: installing/index.rst:100 msgid "" "Creation of virtual environments is done through the :mod:`venv` module. " "Installing packages into an active virtual environment uses the commands " "shown above." msgstr "" -#: installing/index.rst:118 +#: installing/index.rst:106 msgid "" "`Python Packaging User Guide: Installing Python Distribution Packages " "`__" msgstr "" -#: installing/index.rst:123 +#: installing/index.rst:111 msgid "How do I ...?" msgstr "" -#: installing/index.rst:125 +#: installing/index.rst:113 msgid "These are quick answers or links for some common tasks." msgstr "" -#: installing/index.rst:128 -msgid "... install ``pip`` in versions of Python prior to Python 3.4?" -msgstr "" - -#: installing/index.rst:130 -msgid "" -"Python only started bundling ``pip`` with Python 3.4. For earlier versions, " -"``pip`` needs to be \"bootstrapped\" as described in the Python Packaging " -"User Guide." -msgstr "" - -#: installing/index.rst:136 -msgid "" -"`Python Packaging User Guide: Requirements for Installing Packages `__" -msgstr "" - -#: installing/index.rst:143 +#: installing/index.rst:118 msgid "... install packages just for the current user?" msgstr "" -#: installing/index.rst:145 +#: installing/index.rst:120 msgid "" "Passing the ``--user`` option to ``python -m pip install`` will install a " "package just for the current user, rather than for all users of the system." msgstr "" -#: installing/index.rst:150 +#: installing/index.rst:125 msgid "... install scientific Python packages?" msgstr "" -#: installing/index.rst:152 +#: installing/index.rst:127 msgid "" "A number of scientific Python packages have complex binary dependencies, and " -"aren't currently easy to install using ``pip`` directly. At this point in " -"time, it will often be easier for users to install these packages by `other " -"means `__ rather than attempting to " -"install them with ``pip``." +"aren't currently easy to install using :program:`pip` directly. It will " +"often be easier for users to install these packages by `other means `__ rather than attempting to install them " +"with :program:`pip`." msgstr "" -#: installing/index.rst:160 +#: installing/index.rst:135 msgid "" "`Python Packaging User Guide: Installing Scientific Packages `__" msgstr "" -#: installing/index.rst:165 +#: installing/index.rst:140 msgid "... work with multiple versions of Python installed in parallel?" msgstr "" -#: installing/index.rst:167 +#: installing/index.rst:142 msgid "" "On Linux, macOS, and other POSIX systems, use the versioned Python commands " -"in combination with the ``-m`` switch to run the appropriate copy of " -"``pip``::" +"in combination with the ``-m`` switch to run the appropriate copy of :" +"program:`pip`::" msgstr "" -#: installing/index.rst:171 +#: installing/index.rst:146 msgid "" -"python2 -m pip install SomePackage # default Python 2\n" -"python2.7 -m pip install SomePackage # specifically Python 2.7\n" -"python3 -m pip install SomePackage # default Python 3\n" -"python3.4 -m pip install SomePackage # specifically Python 3.4" +"python3 -m pip install SomePackage # default Python 3\n" +"python3.14 -m pip install SomePackage # specifically Python 3.14" msgstr "" -#: installing/index.rst:176 -msgid "Appropriately versioned ``pip`` commands may also be available." +#: installing/index.rst:149 +msgid "Appropriately versioned :program:`pip` commands may also be available." msgstr "" -#: installing/index.rst:178 +#: installing/index.rst:151 msgid "" -"On Windows, use the ``py`` Python launcher in combination with the ``-m`` " -"switch::" +"On Windows, use the :program:`py` Python launcher in combination with the ``-" +"m`` switch::" msgstr "" -#: installing/index.rst:181 +#: installing/index.rst:154 msgid "" -"py -2 -m pip install SomePackage # default Python 2\n" -"py -2.7 -m pip install SomePackage # specifically Python 2.7\n" -"py -3 -m pip install SomePackage # default Python 3\n" -"py -3.4 -m pip install SomePackage # specifically Python 3.4" +"py -3 -m pip install SomePackage # default Python 3\n" +"py -3.14 -m pip install SomePackage # specifically Python 3.14" msgstr "" -#: installing/index.rst:195 +#: installing/index.rst:166 msgid "Common installation issues" msgstr "" -#: installing/index.rst:198 +#: installing/index.rst:169 msgid "Installing into the system Python on Linux" msgstr "" -#: installing/index.rst:200 +#: installing/index.rst:171 msgid "" "On Linux systems, a Python installation will typically be included as part " "of the distribution. Installing into this Python installation requires root " "access to the system, and may interfere with the operation of the system " "package manager and other components of the system if a component is " -"unexpectedly upgraded using ``pip``." +"unexpectedly upgraded using :program:`pip`." msgstr "" -#: installing/index.rst:206 +#: installing/index.rst:177 msgid "" "On such systems, it is often better to use a virtual environment or a per-" -"user installation when installing packages with ``pip``." +"user installation when installing packages with :program:`pip`." msgstr "" -#: installing/index.rst:211 +#: installing/index.rst:182 msgid "Pip not installed" msgstr "" -#: installing/index.rst:213 +#: installing/index.rst:184 msgid "" -"It is possible that ``pip`` does not get installed by default. One potential " -"fix is::" +"It is possible that :program:`pip` does not get installed by default. One " +"potential fix is::" msgstr "" -#: installing/index.rst:215 +#: installing/index.rst:186 msgid "python -m ensurepip --default-pip" msgstr "" -#: installing/index.rst:217 +#: installing/index.rst:188 msgid "" -"There are also additional resources for `installing pip. `__" +"and-wheel-are-up-to-date>`__." msgstr "" -#: installing/index.rst:222 +#: installing/index.rst:193 msgid "Installing binary extensions" msgstr "" -#: installing/index.rst:224 +#: installing/index.rst:195 msgid "" -"Python has typically relied heavily on source based distribution, with end " -"users being expected to compile extension modules from source as part of the " +"Python once relied heavily on source-based distribution, with end users " +"being expected to compile extension modules from source as part of the " "installation process." msgstr "" -#: installing/index.rst:228 +#: installing/index.rst:199 msgid "" -"With the introduction of support for the binary ``wheel`` format, and the " -"ability to publish wheels for at least Windows and macOS through the Python " -"Package Index, this problem is expected to diminish over time, as users are " -"more regularly able to install pre-built extensions rather than needing to " -"build them themselves." +"With the introduction of the binary wheel format, and the ability to publish " +"wheels through PyPI, this problem is diminishing, as users are more " +"regularly able to install pre-built extensions rather than needing to build " +"them themselves." msgstr "" -#: installing/index.rst:234 +#: installing/index.rst:204 msgid "" "Some of the solutions for installing `scientific software `__ that are not yet available as pre-built ``wheel`` " -"files may also help with obtaining other binary extensions without needing " -"to build them locally." +"python.org/science/>`__ that are not yet available as pre-built wheel files " +"may also help with obtaining other binary extensions without needing to " +"build them locally." msgstr "" -#: installing/index.rst:241 +#: installing/index.rst:211 msgid "" "`Python Packaging User Guide: Binary Extensions `__" diff --git a/library/__future__.po b/library/__future__.po index 60c84724a..2ec232ff5 100644 --- a/library/__future__.po +++ b/library/__future__.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/__main__.po b/library/__main__.po index 02163ad55..8b91ce076 100644 --- a/library/__main__.po +++ b/library/__main__.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/_thread.po b/library/_thread.po index 2d113585d..81b48e9b9 100644 --- a/library/_thread.po +++ b/library/_thread.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -48,21 +48,17 @@ msgid "This is now a synonym of the built-in :exc:`RuntimeError`." msgstr "" #: library/_thread.rst:41 -msgid "This is the type of lock objects." -msgstr "" - -#: library/_thread.rst:46 msgid "" "Start a new thread and return its identifier. The thread executes the " "function *function* with the argument list *args* (which must be a tuple). " "The optional *kwargs* argument specifies a dictionary of keyword arguments." msgstr "" -#: library/_thread.rst:50 +#: library/_thread.rst:45 msgid "When the function returns, the thread silently exits." msgstr "" -#: library/_thread.rst:52 +#: library/_thread.rst:47 msgid "" "When the function terminates with an unhandled exception, :func:`sys." "unraisablehook` is called to handle the exception. The *object* attribute of " @@ -70,65 +66,65 @@ msgid "" "then the thread exits (but other threads continue to run)." msgstr "" -#: library/_thread.rst:57 +#: library/_thread.rst:52 msgid "" "When the function raises a :exc:`SystemExit` exception, it is silently " "ignored." msgstr "" -#: library/_thread.rst:60 +#: library/_thread.rst:55 msgid "" "Raises an :ref:`auditing event ` ``_thread.start_new_thread`` with " "arguments ``function``, ``args``, ``kwargs``." msgstr "" -#: library/_thread.rst:62 +#: library/_thread.rst:57 msgid ":func:`sys.unraisablehook` is now used to handle unhandled exceptions." msgstr "" -#: library/_thread.rst:68 +#: library/_thread.rst:63 msgid "" "Simulate the effect of a signal arriving in the main thread. A thread can " "use this function to interrupt the main thread, though there is no guarantee " "that the interruption will happen immediately." msgstr "" -#: library/_thread.rst:72 +#: library/_thread.rst:67 msgid "" "If given, *signum* is the number of the signal to simulate. If *signum* is " "not given, :const:`signal.SIGINT` is simulated." msgstr "" -#: library/_thread.rst:75 +#: library/_thread.rst:70 msgid "" "If the given signal isn't handled by Python (it was set to :const:`signal." "SIG_DFL` or :const:`signal.SIG_IGN`), this function does nothing." msgstr "" -#: library/_thread.rst:79 +#: library/_thread.rst:74 msgid "The *signum* argument is added to customize the signal number." msgstr "" -#: library/_thread.rst:83 +#: library/_thread.rst:78 msgid "" "This does not emit the corresponding signal but schedules a call to the " "associated handler (if it exists). If you want to truly emit the signal, " "use :func:`signal.raise_signal`." msgstr "" -#: library/_thread.rst:90 +#: library/_thread.rst:85 msgid "" "Raise the :exc:`SystemExit` exception. When not caught, this will cause the " "thread to exit silently." msgstr "" -#: library/_thread.rst:104 +#: library/_thread.rst:99 msgid "" "Return a new lock object. Methods of locks are described below. The lock " "is initially unlocked." msgstr "" -#: library/_thread.rst:110 +#: library/_thread.rst:105 msgid "" "Return the 'thread identifier' of the current thread. This is a nonzero " "integer. Its value has no direct meaning; it is intended as a magic cookie " @@ -137,7 +133,7 @@ msgid "" "created." msgstr "" -#: library/_thread.rst:118 +#: library/_thread.rst:113 msgid "" "Return the native integral Thread ID of the current thread assigned by the " "kernel. This is a non-negative integer. Its value may be used to uniquely " @@ -145,15 +141,15 @@ msgid "" "after which the value may be recycled by the OS)." msgstr "" -#: library/_thread.rst:148 +#: library/_thread.rst:143 msgid "Availability" msgstr "" -#: library/_thread.rst:127 +#: library/_thread.rst:122 msgid "Added support for GNU/kFreeBSD." msgstr "" -#: library/_thread.rst:133 +#: library/_thread.rst:128 msgid "" "Return the thread stack size used when creating new threads. The optional " "*size* argument specifies the stack size to be used for subsequently created " @@ -172,22 +168,26 @@ msgid "" "information)." msgstr "" -#: library/_thread.rst:150 +#: library/_thread.rst:145 msgid "Unix platforms with POSIX threads support." msgstr "" -#: library/_thread.rst:155 +#: library/_thread.rst:150 msgid "" "The maximum value allowed for the *timeout* parameter of :meth:`Lock.acquire " "`. Specifying a timeout greater than this value will " "raise an :exc:`OverflowError`." msgstr "" -#: library/_thread.rst:162 +#: library/_thread.rst:166 +msgid "This is the type of lock objects." +msgstr "" + +#: library/_thread.rst:168 msgid "Lock objects have the following methods:" msgstr "" -#: library/_thread.rst:167 +#: library/_thread.rst:172 msgid "" "Without any optional argument, this method acquires the lock " "unconditionally, if necessary waiting until it is released by another thread " @@ -195,7 +195,7 @@ msgid "" "existence)." msgstr "" -#: library/_thread.rst:171 +#: library/_thread.rst:176 msgid "" "If the *blocking* argument is present, the action depends on its value: if " "it is false, the lock is only acquired if it can be acquired immediately " @@ -203,7 +203,7 @@ msgid "" "as above." msgstr "" -#: library/_thread.rst:176 +#: library/_thread.rst:181 msgid "" "If the floating-point *timeout* argument is present and positive, it " "specifies the maximum wait time in seconds before returning. A negative " @@ -211,39 +211,39 @@ msgid "" "*timeout* if *blocking* is false." msgstr "" -#: library/_thread.rst:181 +#: library/_thread.rst:186 msgid "" "The return value is ``True`` if the lock is acquired successfully, ``False`` " "if not." msgstr "" -#: library/_thread.rst:184 +#: library/_thread.rst:189 msgid "The *timeout* parameter is new." msgstr "" -#: library/_thread.rst:187 +#: library/_thread.rst:192 msgid "Lock acquires can now be interrupted by signals on POSIX." msgstr "" -#: library/_thread.rst:193 +#: library/_thread.rst:197 msgid "" "Releases the lock. The lock must have been acquired earlier, but not " "necessarily by the same thread." msgstr "" -#: library/_thread.rst:199 +#: library/_thread.rst:202 msgid "" "Return the status of the lock: ``True`` if it has been acquired by some " "thread, ``False`` if not." msgstr "" -#: library/_thread.rst:202 +#: library/_thread.rst:205 msgid "" "In addition to these methods, lock objects can also be used via the :keyword:" "`with` statement, e.g.::" msgstr "" -#: library/_thread.rst:205 +#: library/_thread.rst:208 msgid "" "import _thread\n" "\n" @@ -253,23 +253,23 @@ msgid "" " print(\"a_lock is locked while this executes\")" msgstr "" -#: library/_thread.rst:212 +#: library/_thread.rst:215 msgid "**Caveats:**" msgstr "" -#: library/_thread.rst:216 +#: library/_thread.rst:219 msgid "" "Interrupts always go to the main thread (the :exc:`KeyboardInterrupt` " "exception will be received by that thread.)" msgstr "" -#: library/_thread.rst:219 +#: library/_thread.rst:222 msgid "" "Calling :func:`sys.exit` or raising the :exc:`SystemExit` exception is " "equivalent to calling :func:`_thread.exit`." msgstr "" -#: library/_thread.rst:222 +#: library/_thread.rst:225 msgid "" "It is platform-dependent whether the :meth:`~threading.Lock.acquire` method " "on a lock can be interrupted (so that the :exc:`KeyboardInterrupt` exception " @@ -278,7 +278,7 @@ msgid "" "Windows." msgstr "" -#: library/_thread.rst:228 +#: library/_thread.rst:231 msgid "" "When the main thread exits, it is system defined whether the other threads " "survive. On most systems, they are killed without executing :keyword:" @@ -313,10 +313,10 @@ msgstr "" msgid "POSIX" msgstr "" -#: library/_thread.rst:214 +#: library/_thread.rst:217 msgid "module" msgstr "" -#: library/_thread.rst:214 +#: library/_thread.rst:217 msgid "signal" msgstr "" diff --git a/library/abc.po b/library/abc.po index 3af7374ba..f26a40a9b 100644 --- a/library/abc.po +++ b/library/abc.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/aifc.po b/library/aifc.po index 7f5940984..fa5c2a5a8 100644 --- a/library/aifc.po +++ b/library/aifc.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: 2024-12-23 14:33+0200\n" "Last-Translator: Marios Giannopoulos \n" "Language-Team: PyGreece \n" diff --git a/library/allos.po b/library/allos.po index fc5aca191..a545f8099 100644 --- a/library/allos.po +++ b/library/allos.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/archiving.po b/library/archiving.po index 88582b786..9b2c10d56 100644 --- a/library/archiving.po +++ b/library/archiving.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/argparse.po b/library/argparse.po index 830afa5b7..221938c31 100644 --- a/library/argparse.po +++ b/library/argparse.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -207,7 +207,7 @@ msgstr "" msgid "*exit_on_error* parameter was added." msgstr "" -#: library/argparse.rst:616 +#: library/argparse.rst:617 msgid "The following sections describe how each of these are used." msgstr "" @@ -605,24 +605,23 @@ msgstr "" #: library/argparse.rst:426 msgid "" -"Empty lines are treated as empty strings (``''``), which are allowed as " -"values but not as arguments. Empty lines that are read as arguments will " -"result in an \"unrecognized arguments\" error." +"Each line is treated as a single argument, so an empty line is read as an " +"empty string (``''``)." msgstr "" -#: library/argparse.rst:430 +#: library/argparse.rst:429 msgid "" ":class:`ArgumentParser` uses :term:`filesystem encoding and error handler` " "to read the file containing arguments." msgstr "" -#: library/argparse.rst:433 +#: library/argparse.rst:432 msgid "" "The ``fromfile_prefix_chars=`` argument defaults to ``None``, meaning that " "arguments will never be treated as file references." msgstr "" -#: library/argparse.rst:436 +#: library/argparse.rst:435 msgid "" ":class:`ArgumentParser` changed encoding and errors to read arguments files " "from default (e.g. :func:`locale.getpreferredencoding(False) >> parser = argparse.ArgumentParser(argument_default=argparse.SUPPRESS)\n" ">>> parser.add_argument('--foo')\n" @@ -658,22 +657,22 @@ msgid "" "Namespace()" msgstr "" -#: library/argparse.rst:466 +#: library/argparse.rst:465 msgid "allow_abbrev" msgstr "" -#: library/argparse.rst:468 +#: library/argparse.rst:467 msgid "" "Normally, when you pass an argument list to the :meth:`~ArgumentParser." "parse_args` method of an :class:`ArgumentParser`, it :ref:`recognizes " "abbreviations ` of long options." msgstr "" -#: library/argparse.rst:472 +#: library/argparse.rst:471 msgid "This feature can be disabled by setting ``allow_abbrev`` to ``False``::" msgstr "" -#: library/argparse.rst:474 +#: library/argparse.rst:473 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG', allow_abbrev=False)\n" ">>> parser.add_argument('--foobar', action='store_true')\n" @@ -683,11 +682,11 @@ msgid "" "PROG: error: unrecognized arguments: --foon" msgstr "" -#: library/argparse.rst:485 +#: library/argparse.rst:484 msgid "conflict_handler" msgstr "" -#: library/argparse.rst:487 +#: library/argparse.rst:486 msgid "" ":class:`ArgumentParser` objects do not allow two actions with the same " "option string. By default, :class:`ArgumentParser` objects raise an " @@ -695,7 +694,7 @@ msgid "" "that is already in use::" msgstr "" -#: library/argparse.rst:492 +#: library/argparse.rst:491 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('-f', '--foo', help='old foo help')\n" @@ -705,7 +704,7 @@ msgid "" "ArgumentError: argument --foo: conflicting option string(s): --foo" msgstr "" -#: library/argparse.rst:499 +#: library/argparse.rst:498 msgid "" "Sometimes (e.g. when using parents_) it may be useful to simply override any " "older arguments with the same option string. To get this behavior, the " @@ -713,7 +712,7 @@ msgid "" "of :class:`ArgumentParser`::" msgstr "" -#: library/argparse.rst:504 +#: library/argparse.rst:503 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG', " "conflict_handler='resolve')\n" @@ -728,7 +727,7 @@ msgid "" " --foo FOO new foo help" msgstr "" -#: library/argparse.rst:515 +#: library/argparse.rst:514 msgid "" "Note that :class:`ArgumentParser` objects only remove an action if all of " "its option strings are overridden. So, in the example above, the old ``-f/--" @@ -736,25 +735,25 @@ msgid "" "option string was overridden." msgstr "" -#: library/argparse.rst:522 +#: library/argparse.rst:521 msgid "add_help" msgstr "" -#: library/argparse.rst:524 +#: library/argparse.rst:523 msgid "" "By default, :class:`ArgumentParser` objects add an option which simply " "displays the parser's help message. If ``-h`` or ``--help`` is supplied at " "the command line, the :class:`!ArgumentParser` help will be printed." msgstr "" -#: library/argparse.rst:528 +#: library/argparse.rst:527 msgid "" "Occasionally, it may be useful to disable the addition of this help option. " "This can be achieved by passing ``False`` as the ``add_help=`` argument to :" "class:`ArgumentParser`::" msgstr "" -#: library/argparse.rst:532 +#: library/argparse.rst:531 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG', add_help=False)\n" ">>> parser.add_argument('--foo', help='foo help')\n" @@ -765,7 +764,7 @@ msgid "" " --foo FOO foo help" msgstr "" -#: library/argparse.rst:540 +#: library/argparse.rst:539 msgid "" "The help option is typically ``-h/--help``. The exception to this is if the " "``prefix_chars=`` is specified and does not include ``-``, in which case ``-" @@ -773,7 +772,7 @@ msgid "" "in ``prefix_chars`` is used to prefix the help options::" msgstr "" -#: library/argparse.rst:546 +#: library/argparse.rst:545 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG', prefix_chars='+/')\n" ">>> parser.print_help()\n" @@ -783,24 +782,24 @@ msgid "" " +h, ++help show this help message and exit" msgstr "" -#: library/argparse.rst:555 +#: library/argparse.rst:554 msgid "exit_on_error" msgstr "" -#: library/argparse.rst:557 +#: library/argparse.rst:556 msgid "" "Normally, when you pass an invalid argument list to the :meth:" "`~ArgumentParser.parse_args` method of an :class:`ArgumentParser`, it will " "print a *message* to :data:`sys.stderr` and exit with a status code of 2." msgstr "" -#: library/argparse.rst:561 +#: library/argparse.rst:560 msgid "" "If the user would like to catch errors manually, the feature can be enabled " "by setting ``exit_on_error`` to ``False``::" msgstr "" -#: library/argparse.rst:564 +#: library/argparse.rst:563 msgid "" ">>> parser = argparse.ArgumentParser(exit_on_error=False)\n" ">>> parser.add_argument('--integers', type=int)\n" @@ -815,81 +814,85 @@ msgid "" "Catching an argumentError" msgstr "" -#: library/argparse.rst:578 +#: library/argparse.rst:577 msgid "The add_argument() method" msgstr "" -#: library/argparse.rst:584 +#: library/argparse.rst:583 msgid "" "Define how a single command-line argument should be parsed. Each parameter " "has its own more detailed description below, but in short they are:" msgstr "" -#: library/argparse.rst:587 +#: library/argparse.rst:586 msgid "" "`name or flags`_ - Either a name or a list of option strings, e.g. ``'foo'`` " "or ``'-f', '--foo'``." msgstr "" -#: library/argparse.rst:590 +#: library/argparse.rst:589 msgid "" "action_ - The basic type of action to be taken when this argument is " "encountered at the command line." msgstr "" -#: library/argparse.rst:593 +#: library/argparse.rst:592 msgid "nargs_ - The number of command-line arguments that should be consumed." msgstr "" -#: library/argparse.rst:595 +#: library/argparse.rst:594 msgid "" "const_ - A constant value required by some action_ and nargs_ selections." msgstr "" -#: library/argparse.rst:597 +#: library/argparse.rst:596 msgid "" "default_ - The value produced if the argument is absent from the command " "line and if it is absent from the namespace object." msgstr "" -#: library/argparse.rst:600 +#: library/argparse.rst:599 msgid "" "type_ - The type to which the command-line argument should be converted." msgstr "" -#: library/argparse.rst:602 +#: library/argparse.rst:601 msgid "choices_ - A sequence of the allowable values for the argument." msgstr "" -#: library/argparse.rst:604 +#: library/argparse.rst:603 msgid "" "required_ - Whether or not the command-line option may be omitted (optionals " "only)." msgstr "" -#: library/argparse.rst:607 +#: library/argparse.rst:606 msgid "help_ - A brief description of what the argument does." msgstr "" -#: library/argparse.rst:609 +#: library/argparse.rst:608 msgid "metavar_ - A name for the argument in usage messages." msgstr "" -#: library/argparse.rst:611 +#: library/argparse.rst:610 msgid "" "dest_ - The name of the attribute to be added to the object returned by :" "meth:`parse_args`." msgstr "" -#: library/argparse.rst:614 +#: library/argparse.rst:613 msgid "deprecated_ - Whether or not use of the argument is deprecated." msgstr "" -#: library/argparse.rst:622 +#: library/argparse.rst:615 +msgid "The method returns an :class:`Action` object representing the argument." +msgstr "" + +#: library/argparse.rst:623 msgid "name or flags" msgstr "" -#: library/argparse.rst:624 +#: library/argparse.rst:625 msgid "" "The :meth:`~ArgumentParser.add_argument` method must know whether an " "optional argument, like ``-f`` or ``--foo``, or a positional argument, like " @@ -898,30 +901,30 @@ msgid "" "or a simple argument name." msgstr "" -#: library/argparse.rst:630 +#: library/argparse.rst:631 msgid "For example, an optional argument could be created like::" msgstr "" -#: library/argparse.rst:632 +#: library/argparse.rst:633 msgid ">>> parser.add_argument('-f', '--foo')" msgstr "" -#: library/argparse.rst:634 +#: library/argparse.rst:635 msgid "while a positional argument could be created like::" msgstr "" -#: library/argparse.rst:636 +#: library/argparse.rst:637 msgid ">>> parser.add_argument('bar')" msgstr "" -#: library/argparse.rst:638 +#: library/argparse.rst:639 msgid "" "When :meth:`~ArgumentParser.parse_args` is called, optional arguments will " "be identified by the ``-`` prefix, and the remaining arguments will be " "assumed to be positional::" msgstr "" -#: library/argparse.rst:642 +#: library/argparse.rst:643 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('-f', '--foo')\n" @@ -935,11 +938,11 @@ msgid "" "PROG: error: the following arguments are required: bar" msgstr "" -#: library/argparse.rst:657 +#: library/argparse.rst:658 msgid "action" msgstr "" -#: library/argparse.rst:659 +#: library/argparse.rst:660 msgid "" ":class:`ArgumentParser` objects associate command-line arguments with " "actions. These actions can do just about anything with the command-line " @@ -949,13 +952,13 @@ msgid "" "be handled. The supplied actions are:" msgstr "" -#: library/argparse.rst:665 +#: library/argparse.rst:666 msgid "" "``'store'`` - This just stores the argument's value. This is the default " "action." msgstr "" -#: library/argparse.rst:668 +#: library/argparse.rst:669 msgid "" "``'store_const'`` - This stores the value specified by the const_ keyword " "argument; note that the const_ keyword argument defaults to ``None``. The " @@ -963,7 +966,7 @@ msgid "" "specify some sort of flag. For example::" msgstr "" -#: library/argparse.rst:673 +#: library/argparse.rst:674 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', action='store_const', const=42)\n" @@ -971,15 +974,14 @@ msgid "" "Namespace(foo=42)" msgstr "" -#: library/argparse.rst:678 +#: library/argparse.rst:679 msgid "" "``'store_true'`` and ``'store_false'`` - These are special cases of " -"``'store_const'`` used for storing the values ``True`` and ``False`` " -"respectively. In addition, they create default values of ``False`` and " -"``True`` respectively::" +"``'store_const'`` that respectively store the values ``True`` and ``False`` " +"with default values of ``False`` and ``True``::" msgstr "" -#: library/argparse.rst:683 +#: library/argparse.rst:684 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', action='store_true')\n" @@ -989,7 +991,7 @@ msgid "" "Namespace(foo=True, bar=False, baz=True)" msgstr "" -#: library/argparse.rst:690 +#: library/argparse.rst:691 msgid "" "``'append'`` - This appends each argument value to a list. It is useful for " "allowing an option to be specified multiple times. If the default value is a " @@ -998,7 +1000,7 @@ msgid "" "values. Example usage::" msgstr "" -#: library/argparse.rst:696 +#: library/argparse.rst:697 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', action='append', default=['0'])\n" @@ -1006,16 +1008,15 @@ msgid "" "Namespace(foo=['0', '1', '2'])" msgstr "" -#: library/argparse.rst:701 +#: library/argparse.rst:702 msgid "" -"``'append_const'`` - This stores a list, and appends the value specified by " -"the const_ keyword argument to the list; note that the const_ keyword " -"argument defaults to ``None``. The ``'append_const'`` action is typically " -"useful when multiple arguments need to store constants to the same list. For " -"example::" +"``'append_const'`` - This appends the value specified by the const_ keyword " +"argument to a list; note that the const_ keyword argument defaults to " +"``None``. The ``'append_const'`` action is typically useful when multiple " +"arguments need to store constants to the same list. For example::" msgstr "" -#: library/argparse.rst:707 +#: library/argparse.rst:708 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--str', dest='types', action='append_const', " @@ -1026,16 +1027,16 @@ msgid "" "Namespace(types=[, ])" msgstr "" -#: library/argparse.rst:713 +#: library/argparse.rst:714 msgid "" -"``'extend'`` - This stores a list and appends each item from the multi-value " -"argument list to it. The ``'extend'`` action is typically used with the " -"nargs_ keyword argument value ``'+'`` or ``'*'``. Note that when nargs_ is " -"``None`` (the default) or ``'?'``, each character of the argument string " -"will be appended to the list. Example usage::" +"``'extend'`` - This appends each item from a multi-value argument to a list. " +"The ``'extend'`` action is typically used with the nargs_ keyword argument " +"value ``'+'`` or ``'*'``. Note that when nargs_ is ``None`` (the default) or " +"``'?'``, each character of the argument string will be appended to the list. " +"Example usage::" msgstr "" -#: library/argparse.rst:721 +#: library/argparse.rst:722 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument(\"--foo\", action=\"extend\", nargs=\"+\", " @@ -1045,13 +1046,13 @@ msgid "" "Namespace(foo=['f1', 'f2', 'f3', 'f4'])" msgstr "" -#: library/argparse.rst:728 +#: library/argparse.rst:729 msgid "" -"``'count'`` - This counts the number of times a keyword argument occurs. For " +"``'count'`` - This counts the number of times an argument occurs. For " "example, this is useful for increasing verbosity levels::" msgstr "" -#: library/argparse.rst:731 +#: library/argparse.rst:732 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--verbose', '-v', action='count', default=0)\n" @@ -1059,11 +1060,11 @@ msgid "" "Namespace(verbose=3)" msgstr "" -#: library/argparse.rst:736 +#: library/argparse.rst:737 msgid "Note, the *default* will be ``None`` unless explicitly set to *0*." msgstr "" -#: library/argparse.rst:738 +#: library/argparse.rst:739 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 " @@ -1071,14 +1072,14 @@ msgid "" "output is created." msgstr "" -#: library/argparse.rst:743 +#: library/argparse.rst:744 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:747 +#: library/argparse.rst:748 msgid "" ">>> import argparse\n" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" @@ -1088,7 +1089,7 @@ msgid "" "PROG 2.0" msgstr "" -#: library/argparse.rst:753 +#: library/argparse.rst:754 msgid "" "You may also specify an arbitrary action by passing an :class:`Action` " "subclass (e.g. :class:`BooleanOptionalAction`) or other object that " @@ -1097,7 +1098,7 @@ msgid "" "with non-zero ``nargs``) can be used with positional arguments." msgstr "" -#: library/argparse.rst:759 +#: library/argparse.rst:760 msgid "" "The recommended way to create a custom action is to extend :class:`Action`, " "overriding the :meth:`!__call__` method and optionally the :meth:`!__init__` " @@ -1106,11 +1107,11 @@ msgid "" "their registered name." msgstr "" -#: library/argparse.rst:764 +#: library/argparse.rst:765 msgid "An example of a custom action::" msgstr "" -#: library/argparse.rst:766 +#: library/argparse.rst:767 msgid "" ">>> class FooAction(argparse.Action):\n" "... def __init__(self, option_strings, dest, nargs=None, **kwargs):\n" @@ -1131,15 +1132,15 @@ msgid "" "Namespace(bar='1', foo='2')" msgstr "" -#: library/argparse.rst:784 +#: library/argparse.rst:785 msgid "For more details, see :class:`Action`." msgstr "" -#: library/argparse.rst:790 +#: library/argparse.rst:791 msgid "nargs" msgstr "" -#: library/argparse.rst:792 +#: library/argparse.rst:793 msgid "" ":class:`ArgumentParser` objects usually associate a single command-line " "argument with a single action to be taken. The ``nargs`` keyword argument " @@ -1148,13 +1149,13 @@ msgid "" "are:" msgstr "" -#: library/argparse.rst:797 +#: library/argparse.rst:798 msgid "" "``N`` (an integer). ``N`` arguments from the command line will be gathered " "together into a list. For example::" msgstr "" -#: library/argparse.rst:800 +#: library/argparse.rst:801 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', nargs=2)\n" @@ -1163,13 +1164,13 @@ msgid "" "Namespace(bar=['c'], foo=['a', 'b'])" msgstr "" -#: library/argparse.rst:806 +#: library/argparse.rst:807 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:811 +#: library/argparse.rst:812 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 " @@ -1179,7 +1180,7 @@ msgid "" "produced. Some examples to illustrate this::" msgstr "" -#: library/argparse.rst:818 +#: library/argparse.rst:819 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', nargs='?', const='c', default='d')\n" @@ -1192,13 +1193,13 @@ msgid "" "Namespace(bar='d', foo='d')" msgstr "" -#: library/argparse.rst:828 +#: library/argparse.rst:829 msgid "" "One of the more common uses of ``nargs='?'`` is to allow optional input and " "output files::" msgstr "" -#: library/argparse.rst:831 +#: library/argparse.rst:832 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('infile', nargs='?', type=argparse.FileType('r'),\n" @@ -1213,7 +1214,7 @@ msgid "" " outfile=<_io.TextIOWrapper name='' encoding='UTF-8'>)" msgstr "" -#: library/argparse.rst:845 +#: library/argparse.rst:846 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 " @@ -1221,7 +1222,7 @@ msgid "" "``nargs='*'`` is possible. For example::" msgstr "" -#: library/argparse.rst:850 +#: library/argparse.rst:851 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', nargs='*')\n" @@ -1231,14 +1232,14 @@ msgid "" "Namespace(bar=['1', '2'], baz=['a', 'b'], foo=['x', 'y'])" msgstr "" -#: library/argparse.rst:859 +#: library/argparse.rst:860 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:863 +#: library/argparse.rst:864 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('foo', nargs='+')\n" @@ -1249,7 +1250,7 @@ msgid "" "PROG: error: the following arguments are required: foo" msgstr "" -#: library/argparse.rst:871 +#: library/argparse.rst:872 msgid "" "If the ``nargs`` keyword argument is not provided, the number of arguments " "consumed is determined by the action_. Generally this means a single " @@ -1258,11 +1259,11 @@ msgid "" "``'store_const'``) set ``nargs=0``." msgstr "" -#: library/argparse.rst:881 +#: library/argparse.rst:882 msgid "const" msgstr "" -#: library/argparse.rst:883 +#: library/argparse.rst:884 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 " @@ -1270,7 +1271,7 @@ msgid "" "common uses of it are:" msgstr "" -#: library/argparse.rst:887 +#: library/argparse.rst:888 msgid "" "When :meth:`~ArgumentParser.add_argument` is called with " "``action='store_const'`` or ``action='append_const'``. These actions add " @@ -1280,7 +1281,7 @@ msgid "" "receive a default value of ``None``." msgstr "" -#: library/argparse.rst:895 +#: library/argparse.rst:896 msgid "" "When :meth:`~ArgumentParser.add_argument` is called with option strings " "(like ``-f`` or ``--foo``) and ``nargs='?'``. This creates an optional " @@ -1290,17 +1291,17 @@ msgid "" "See the nargs_ description for examples." msgstr "" -#: library/argparse.rst:902 +#: library/argparse.rst:903 msgid "" "``const=None`` by default, including when ``action='append_const'`` or " "``action='store_const'``." msgstr "" -#: library/argparse.rst:909 +#: library/argparse.rst:910 msgid "default" msgstr "" -#: library/argparse.rst:911 +#: library/argparse.rst:912 msgid "" "All optional arguments and some positional arguments may be omitted at the " "command line. The ``default`` keyword argument of :meth:`~ArgumentParser." @@ -1310,7 +1311,7 @@ msgid "" "command line::" msgstr "" -#: library/argparse.rst:918 +#: library/argparse.rst:919 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', default=42)\n" @@ -1320,13 +1321,13 @@ msgid "" "Namespace(foo=42)" msgstr "" -#: library/argparse.rst:925 +#: library/argparse.rst:926 msgid "" "If the target namespace already has an attribute set, the action *default* " "will not overwrite it::" msgstr "" -#: library/argparse.rst:928 +#: library/argparse.rst:929 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', default=42)\n" @@ -1334,7 +1335,7 @@ msgid "" "Namespace(foo=101)" msgstr "" -#: library/argparse.rst:933 +#: library/argparse.rst:934 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_ " @@ -1342,7 +1343,7 @@ msgid "" "`Namespace` return value. Otherwise, the parser uses the value as is::" msgstr "" -#: library/argparse.rst:938 +#: library/argparse.rst:939 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--length', default='10', type=int)\n" @@ -1351,13 +1352,13 @@ msgid "" "Namespace(length=10, width=10.5)" msgstr "" -#: library/argparse.rst:944 +#: library/argparse.rst:945 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:947 +#: library/argparse.rst:948 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('foo', nargs='?', default=42)\n" @@ -1367,20 +1368,27 @@ msgid "" "Namespace(foo=42)" msgstr "" -#: library/argparse.rst:954 +#: library/argparse.rst:955 +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:959 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:958 +#: library/argparse.rst:963 msgid "" "Providing ``default=argparse.SUPPRESS`` causes no attribute to be added if " "the command-line argument was not present::" msgstr "" -#: library/argparse.rst:961 +#: library/argparse.rst:966 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', default=argparse.SUPPRESS)\n" @@ -1390,11 +1398,11 @@ msgid "" "Namespace(foo='1')" msgstr "" -#: library/argparse.rst:972 +#: library/argparse.rst:977 msgid "type" msgstr "" -#: library/argparse.rst:974 +#: library/argparse.rst:979 msgid "" "By default, the parser reads command-line arguments in as simple strings. " "However, quite often the command-line string should instead be interpreted " @@ -1403,13 +1411,13 @@ msgid "" "checking and type conversions to be performed." msgstr "" -#: library/argparse.rst:980 +#: library/argparse.rst:985 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:983 +#: library/argparse.rst:988 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 " @@ -1418,11 +1426,11 @@ msgid "" "is displayed. Other exception types are not handled." msgstr "" -#: library/argparse.rst:989 +#: library/argparse.rst:994 msgid "Common built-in types and functions can be used as type converters:" msgstr "" -#: library/argparse.rst:991 +#: library/argparse.rst:996 msgid "" "import argparse\n" "import pathlib\n" @@ -1437,11 +1445,11 @@ msgid "" "parser.add_argument('datapath', type=pathlib.Path)" msgstr "" -#: library/argparse.rst:1004 +#: library/argparse.rst:1009 msgid "User defined functions can be used as well:" msgstr "" -#: library/argparse.rst:1006 +#: library/argparse.rst:1011 msgid "" ">>> def hyphenated(string):\n" "... return '-'.join([word[:4] for word in string.casefold().split()])\n" @@ -1452,14 +1460,28 @@ msgid "" "Namespace(short_title='\"the-tale-of-two-citi')" msgstr "" -#: library/argparse.rst:1016 +#: library/argparse.rst:1021 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." +"``True``. This is usually not what is desired::" +msgstr "" + +#: library/argparse.rst:1025 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> _ = parser.add_argument('--verbose', type=bool)\n" +">>> parser.parse_args(['--verbose', 'False'])\n" +"Namespace(verbose=True)" +msgstr "" + +#: library/argparse.rst:1030 +msgid "" +"See :class:`BooleanOptionalAction` or ``action='store_true'`` for common " +"alternatives." msgstr "" -#: library/argparse.rst:1020 +#: library/argparse.rst:1033 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 " @@ -1467,7 +1489,7 @@ msgid "" "management should be done downstream after the arguments are parsed." msgstr "" -#: library/argparse.rst:1025 +#: library/argparse.rst:1038 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." @@ -1475,7 +1497,7 @@ msgid "" "exception would not be handled at all." msgstr "" -#: library/argparse.rst:1030 +#: library/argparse.rst:1043 msgid "" "Even :class:`~argparse.FileType` has its limitations for use with the " "``type`` keyword. If one argument uses :class:`~argparse.FileType` and then " @@ -1485,17 +1507,17 @@ msgid "" "files." msgstr "" -#: library/argparse.rst:1037 +#: library/argparse.rst:1050 msgid "" "For type checkers that simply check against a fixed set of values, consider " "using the choices_ keyword instead." msgstr "" -#: library/argparse.rst:1044 +#: library/argparse.rst:1057 msgid "choices" msgstr "" -#: library/argparse.rst:1046 +#: library/argparse.rst:1059 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* " @@ -1504,7 +1526,7 @@ msgid "" "be displayed if the argument was not one of the acceptable values::" msgstr "" -#: library/argparse.rst:1052 +#: library/argparse.rst:1065 msgid "" ">>> parser = argparse.ArgumentParser(prog='game.py')\n" ">>> parser.add_argument('move', choices=['rock', 'paper', 'scissors'])\n" @@ -1516,33 +1538,33 @@ msgid "" "'paper', 'scissors')" msgstr "" -#: library/argparse.rst:1061 +#: library/argparse.rst:1074 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:1064 +#: library/argparse.rst:1077 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:1067 +#: library/argparse.rst:1080 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:1072 +#: library/argparse.rst:1085 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:1076 +#: library/argparse.rst:1089 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 " @@ -1550,11 +1572,11 @@ msgid "" "are many choices), just specify an explicit metavar_." msgstr "" -#: library/argparse.rst:1085 +#: library/argparse.rst:1098 msgid "required" msgstr "" -#: library/argparse.rst:1087 +#: library/argparse.rst:1100 msgid "" "In general, the :mod:`!argparse` module assumes that flags like ``-f`` and " "``--bar`` indicate *optional* arguments, which can always be omitted at the " @@ -1562,7 +1584,7 @@ msgid "" "the ``required=`` keyword argument to :meth:`~ArgumentParser.add_argument`::" msgstr "" -#: library/argparse.rst:1092 +#: library/argparse.rst:1105 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', required=True)\n" @@ -1573,24 +1595,24 @@ msgid "" ": error: the following arguments are required: --foo" msgstr "" -#: library/argparse.rst:1100 +#: library/argparse.rst:1113 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:1106 +#: library/argparse.rst:1119 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:1113 +#: library/argparse.rst:1126 msgid "help" msgstr "" -#: library/argparse.rst:1115 +#: library/argparse.rst:1128 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`` " @@ -1598,7 +1620,7 @@ msgid "" "each argument." msgstr "" -#: library/argparse.rst:1120 +#: library/argparse.rst:1133 msgid "" "The ``help`` strings can include various format specifiers to avoid " "repetition of things like the program name or the argument default_. The " @@ -1607,7 +1629,7 @@ msgid "" "``%(type)s``, etc.::" msgstr "" -#: library/argparse.rst:1125 +#: library/argparse.rst:1138 msgid "" ">>> parser = argparse.ArgumentParser(prog='frobble')\n" ">>> parser.add_argument('bar', nargs='?', type=int, default=42,\n" @@ -1622,19 +1644,19 @@ msgid "" " -h, --help show this help message and exit" msgstr "" -#: library/argparse.rst:1137 +#: library/argparse.rst:1150 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:1140 +#: library/argparse.rst:1153 msgid "" ":mod:`!argparse` supports silencing the help entry for certain options, by " "setting the ``help`` value to ``argparse.SUPPRESS``::" msgstr "" -#: library/argparse.rst:1143 +#: library/argparse.rst:1156 msgid "" ">>> parser = argparse.ArgumentParser(prog='frobble')\n" ">>> parser.add_argument('--foo', help=argparse.SUPPRESS)\n" @@ -1645,11 +1667,11 @@ msgid "" " -h, --help show this help message and exit" msgstr "" -#: library/argparse.rst:1155 +#: library/argparse.rst:1168 msgid "metavar" msgstr "" -#: library/argparse.rst:1157 +#: library/argparse.rst:1170 msgid "" "When :class:`ArgumentParser` generates help messages, it needs some way to " "refer to each expected argument. By default, :class:`!ArgumentParser` " @@ -1661,7 +1683,7 @@ msgid "" "command-line argument will be referred to as ``FOO``. An example::" msgstr "" -#: library/argparse.rst:1166 +#: library/argparse.rst:1179 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo')\n" @@ -1679,11 +1701,11 @@ msgid "" " --foo FOO" msgstr "" -#: library/argparse.rst:1181 +#: library/argparse.rst:1194 msgid "An alternative name can be specified with ``metavar``::" msgstr "" -#: library/argparse.rst:1183 +#: library/argparse.rst:1196 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', metavar='YYY')\n" @@ -1701,21 +1723,21 @@ msgid "" " --foo YYY" msgstr "" -#: library/argparse.rst:1198 +#: library/argparse.rst:1211 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:1202 +#: library/argparse.rst:1215 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:1206 +#: library/argparse.rst:1219 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('-x', nargs=2)\n" @@ -1729,11 +1751,11 @@ msgid "" " --foo bar baz" msgstr "" -#: library/argparse.rst:1221 +#: library/argparse.rst:1234 msgid "dest" msgstr "" -#: library/argparse.rst:1223 +#: library/argparse.rst:1236 msgid "" "Most :class:`ArgumentParser` actions add some value as an attribute of the " "object returned by :meth:`~ArgumentParser.parse_args`. The name of this " @@ -1743,7 +1765,7 @@ msgid "" "add_argument`::" msgstr "" -#: library/argparse.rst:1230 +#: library/argparse.rst:1243 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('bar')\n" @@ -1751,7 +1773,7 @@ msgid "" "Namespace(bar='XXX')" msgstr "" -#: library/argparse.rst:1235 +#: library/argparse.rst:1248 msgid "" "For optional argument actions, the value of ``dest`` is normally inferred " "from the option strings. :class:`ArgumentParser` generates the value of " @@ -1763,7 +1785,7 @@ msgid "" "below illustrate this behavior::" msgstr "" -#: library/argparse.rst:1244 +#: library/argparse.rst:1257 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('-f', '--foo-bar', '--foo')\n" @@ -1774,11 +1796,11 @@ msgid "" "Namespace(foo_bar='1', x='2')" msgstr "" -#: library/argparse.rst:1252 +#: library/argparse.rst:1265 msgid "``dest`` allows a custom attribute name to be provided::" msgstr "" -#: library/argparse.rst:1254 +#: library/argparse.rst:1267 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', dest='bar')\n" @@ -1786,11 +1808,20 @@ msgid "" "Namespace(bar='XXX')" msgstr "" -#: library/argparse.rst:1263 +#: library/argparse.rst:1272 +msgid "" +"Multiple arguments may share the same ``dest``. By default, the value from " +"the last such argument given on the command line wins. Use " +"``action='append'`` to collect values from all of them into a list instead. " +"For conflicting *option strings* rather than ``dest`` names, see " +"conflict_handler_." +msgstr "" + +#: library/argparse.rst:1280 msgid "deprecated" msgstr "" -#: library/argparse.rst:1265 +#: library/argparse.rst:1282 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 " @@ -1801,7 +1832,7 @@ msgid "" "will be printed to :data:`sys.stderr` when the argument is used::" msgstr "" -#: library/argparse.rst:1275 +#: library/argparse.rst:1292 msgid "" ">>> import argparse\n" ">>> parser = argparse.ArgumentParser(prog='snake.py')\n" @@ -1813,11 +1844,11 @@ msgid "" "Namespace(legs=4)" msgstr "" -#: library/argparse.rst:1288 +#: library/argparse.rst:1305 msgid "Action classes" msgstr "" -#: library/argparse.rst:1290 +#: library/argparse.rst:1307 msgid "" ":class:`!Action` classes implement the Action API, a callable which returns " "a callable which processes arguments from the command-line. Any object which " @@ -1825,7 +1856,7 @@ msgid "" "`~ArgumentParser.add_argument`." msgstr "" -#: library/argparse.rst:1299 +#: library/argparse.rst:1316 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 " @@ -1834,7 +1865,7 @@ msgid "" "`ArgumentParser.add_argument` except for the ``action`` itself." msgstr "" -#: library/argparse.rst:1305 +#: library/argparse.rst:1322 msgid "" "Instances of :class:`!Action` (or return value of any callable to the " "``action`` parameter) should have attributes :attr:`!dest`, :attr:`!" @@ -1843,46 +1874,46 @@ msgid "" "is to call :meth:`!Action.__init__`." msgstr "" -#: library/argparse.rst:1313 +#: library/argparse.rst:1330 msgid "" ":class:`!Action` instances should be callable, so subclasses must override " "the :meth:`!__call__` method, which should accept four parameters:" msgstr "" -#: library/argparse.rst:1316 +#: library/argparse.rst:1333 msgid "" "*parser* - The :class:`ArgumentParser` object which contains this action." msgstr "" -#: library/argparse.rst:1318 +#: library/argparse.rst:1335 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:1322 +#: library/argparse.rst:1339 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:1326 +#: library/argparse.rst:1343 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:1330 +#: library/argparse.rst:1347 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:1335 +#: library/argparse.rst:1352 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 " @@ -1890,7 +1921,7 @@ msgid "" "will be used." msgstr "" -#: library/argparse.rst:1341 +#: library/argparse.rst:1358 msgid "" "A subclass of :class:`Action` for handling boolean flags with positive and " "negative options. Adding a single argument such as ``--foo`` automatically " @@ -1898,7 +1929,7 @@ msgid "" "``False`` respectively::" msgstr "" -#: library/argparse.rst:1346 +#: library/argparse.rst:1363 msgid "" ">>> import argparse\n" ">>> parser = argparse.ArgumentParser()\n" @@ -1907,47 +1938,47 @@ msgid "" "Namespace(foo=False)" msgstr "" -#: library/argparse.rst:1356 +#: library/argparse.rst:1373 msgid "The parse_args() method" msgstr "" -#: library/argparse.rst:1360 +#: library/argparse.rst:1377 msgid "" "Convert argument strings to objects and assign them as attributes of the " "namespace. Return the populated namespace." msgstr "" -#: library/argparse.rst:1363 +#: library/argparse.rst:1380 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:1367 +#: library/argparse.rst:1384 msgid "" "args_ - List of strings to parse. The default is taken from :data:`sys." "argv`." msgstr "" -#: library/argparse.rst:1370 +#: library/argparse.rst:1387 msgid "" "namespace_ - An object to take the attributes. The default is a new empty :" "class:`Namespace` object." msgstr "" -#: library/argparse.rst:1375 +#: library/argparse.rst:1392 msgid "Option value syntax" msgstr "" -#: library/argparse.rst:1377 +#: library/argparse.rst:1394 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:1381 +#: library/argparse.rst:1398 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('-x')\n" @@ -1958,38 +1989,38 @@ msgid "" "Namespace(foo='FOO', x=None)" msgstr "" -#: library/argparse.rst:1389 +#: library/argparse.rst:1406 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:1393 +#: library/argparse.rst:1410 msgid "" ">>> parser.parse_args(['--foo=FOO'])\n" "Namespace(foo='FOO', x=None)" msgstr "" -#: library/argparse.rst:1396 +#: library/argparse.rst:1413 msgid "" "For short options (options only one character long), the option and its " "value can be concatenated::" msgstr "" -#: library/argparse.rst:1399 +#: library/argparse.rst:1416 msgid "" ">>> parser.parse_args(['-xX'])\n" "Namespace(foo=None, x='X')" msgstr "" -#: library/argparse.rst:1402 +#: library/argparse.rst:1419 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:1405 +#: library/argparse.rst:1422 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('-x', action='store_true')\n" @@ -1999,11 +2030,11 @@ msgid "" "Namespace(x=True, y=True, z='Z')" msgstr "" -#: library/argparse.rst:1414 +#: library/argparse.rst:1431 msgid "Invalid arguments" msgstr "" -#: library/argparse.rst:1416 +#: library/argparse.rst:1433 msgid "" "While parsing the command line, :meth:`~ArgumentParser.parse_args` checks " "for a variety of errors, including ambiguous options, invalid types, invalid " @@ -2011,7 +2042,7 @@ msgid "" "an error, it exits and prints the error along with a usage message::" msgstr "" -#: library/argparse.rst:1421 +#: library/argparse.rst:1438 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('--foo', type=int)\n" @@ -2033,11 +2064,11 @@ msgid "" "PROG: error: extra arguments found: badger" msgstr "" -#: library/argparse.rst:1442 +#: library/argparse.rst:1459 msgid "Arguments containing ``-``" msgstr "" -#: library/argparse.rst:1444 +#: library/argparse.rst:1461 msgid "" "The :meth:`~ArgumentParser.parse_args` method attempts to give errors " "whenever the user has clearly made a mistake, but some situations are " @@ -2049,7 +2080,7 @@ msgid "" "negative numbers::" msgstr "" -#: library/argparse.rst:1452 +#: library/argparse.rst:1469 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('-x')\n" @@ -2082,7 +2113,7 @@ msgid "" "PROG: error: argument -1: expected one argument" msgstr "" -#: library/argparse.rst:1482 +#: library/argparse.rst:1499 msgid "" "If you have positional arguments that must begin with ``-`` and don't look " "like negative numbers, you can insert the pseudo-argument ``'--'`` which " @@ -2090,30 +2121,30 @@ msgid "" "positional argument::" msgstr "" -#: library/argparse.rst:1487 +#: library/argparse.rst:1504 msgid "" ">>> parser.parse_args(['--', '-f'])\n" "Namespace(foo='-f', one=None)" msgstr "" -#: library/argparse.rst:1490 +#: library/argparse.rst:1507 msgid "" "See also :ref:`the argparse howto on ambiguous arguments ` for more details." msgstr "" -#: library/argparse.rst:1496 +#: library/argparse.rst:1513 msgid "Argument abbreviations (prefix matching)" msgstr "" -#: library/argparse.rst:1498 +#: library/argparse.rst:1515 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:1502 +#: library/argparse.rst:1519 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('-bacon')\n" @@ -2127,17 +2158,17 @@ msgid "" "PROG: error: ambiguous option: -ba could match -badger, -bacon" msgstr "" -#: library/argparse.rst:1513 +#: library/argparse.rst:1530 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:1519 +#: library/argparse.rst:1536 msgid "Beyond ``sys.argv``" msgstr "" -#: library/argparse.rst:1521 +#: library/argparse.rst:1538 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 " @@ -2145,7 +2176,7 @@ msgid "" "useful for testing at the interactive prompt::" msgstr "" -#: library/argparse.rst:1526 +#: library/argparse.rst:1543 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument(\n" @@ -2160,24 +2191,24 @@ msgid "" "Namespace(accumulate=, integers=[1, 2, 3, 4])" msgstr "" -#: library/argparse.rst:1541 +#: library/argparse.rst:1558 msgid "The Namespace object" msgstr "" -#: library/argparse.rst:1545 +#: library/argparse.rst:1562 msgid "" "Simple class used by default by :meth:`~ArgumentParser.parse_args` to create " "an object holding attributes and return it." msgstr "" -#: library/argparse.rst:1548 +#: library/argparse.rst:1565 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:1552 +#: library/argparse.rst:1569 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo')\n" @@ -2186,14 +2217,14 @@ msgid "" "{'foo': 'BAR'}" msgstr "" -#: library/argparse.rst:1558 +#: library/argparse.rst:1575 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:1562 +#: library/argparse.rst:1579 msgid "" ">>> class C:\n" "... pass\n" @@ -2206,15 +2237,15 @@ msgid "" "'BAR'" msgstr "" -#: library/argparse.rst:1574 +#: library/argparse.rst:1591 msgid "Other utilities" msgstr "" -#: library/argparse.rst:1577 -msgid "Sub-commands" +#: library/argparse.rst:1594 +msgid "Subcommands" msgstr "" -#: library/argparse.rst:1584 +#: library/argparse.rst:1601 msgid "" "Many programs split up their functionality into a number of subcommands, for " "example, the ``svn`` program can invoke subcommands like ``svn checkout``, " @@ -2229,69 +2260,69 @@ msgid "" "returns an :class:`!ArgumentParser` object that can be modified as usual." msgstr "" -#: library/argparse.rst:1596 +#: library/argparse.rst:1613 msgid "Description of parameters:" msgstr "" -#: library/argparse.rst:1598 +#: library/argparse.rst:1615 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:1602 +#: library/argparse.rst:1619 msgid "" "*description* - description for the sub-parser group in help output, by " "default ``None``" msgstr "" -#: library/argparse.rst:1605 +#: library/argparse.rst:1622 msgid "" -"*prog* - usage information that will be displayed with sub-command help, by " +"*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:1609 +#: library/argparse.rst:1626 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:1612 +#: library/argparse.rst:1629 msgid "" "action_ - the basic type of action to be taken when this argument is " "encountered at the command line" msgstr "" -#: library/argparse.rst:1615 +#: library/argparse.rst:1632 msgid "" -"dest_ - name of the attribute under which sub-command name will be stored; " -"by default ``None`` and no value is stored" +"dest_ - name of the attribute under which subcommand name will be stored; by " +"default ``None`` and no value is stored" msgstr "" -#: library/argparse.rst:1618 +#: library/argparse.rst:1635 msgid "" "required_ - Whether or not a subcommand must be provided, by default " "``False`` (added in 3.7)" msgstr "" -#: library/argparse.rst:1621 +#: library/argparse.rst:1638 msgid "help_ - help for sub-parser group in help output, by default ``None``" msgstr "" -#: library/argparse.rst:1623 +#: library/argparse.rst:1640 msgid "" "metavar_ - string presenting available subcommands in help; by default it is " "``None`` and presents subcommands in form {cmd1, cmd2, ..}" msgstr "" -#: library/argparse.rst:1626 +#: library/argparse.rst:1643 msgid "Some example usage::" msgstr "" -#: library/argparse.rst:1628 +#: library/argparse.rst:1645 msgid "" ">>> # create the top-level parser\n" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" @@ -2314,7 +2345,7 @@ msgid "" "Namespace(baz='Z', foo=True)" msgstr "" -#: library/argparse.rst:1647 +#: library/argparse.rst:1664 msgid "" "Note that the object returned by :meth:`parse_args` will only contain " "attributes for the main parser and the subparser that was selected by the " @@ -2324,7 +2355,15 @@ msgid "" "``baz`` attributes are present." msgstr "" -#: library/argparse.rst:1654 +#: library/argparse.rst:1671 +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 " +"won't be retained. Users should give them distinct ``dest`` values to keep " +"both." +msgstr "" + +#: library/argparse.rst:1676 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 " @@ -2333,7 +2372,7 @@ msgid "" "to :meth:`~_SubParsersAction.add_parser` as above.)" msgstr "" -#: library/argparse.rst:1662 +#: library/argparse.rst:1684 msgid "" ">>> parser.parse_args(['--help'])\n" "usage: PROG [-h] [--foo] {a,b} ...\n" @@ -2364,14 +2403,14 @@ msgid "" " --baz {X,Y,Z} baz help" msgstr "" -#: library/argparse.rst:1690 +#: library/argparse.rst:1712 msgid "" "The :meth:`add_subparsers` method also supports ``title`` and " "``description`` keyword arguments. When either is present, the subparser's " "commands will appear in their own group in the help output. For example::" msgstr "" -#: library/argparse.rst:1694 +#: library/argparse.rst:1716 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> subparsers = parser.add_subparsers(title='subcommands',\n" @@ -2391,7 +2430,7 @@ msgid "" " {foo,bar} additional help" msgstr "" -#: library/argparse.rst:1711 +#: library/argparse.rst:1733 msgid "" "Furthermore, :meth:`~_SubParsersAction.add_parser` supports an additional " "*aliases* argument, which allows multiple strings to refer to the same " @@ -2399,7 +2438,7 @@ msgid "" "``checkout``::" msgstr "" -#: library/argparse.rst:1716 +#: library/argparse.rst:1738 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> subparsers = parser.add_subparsers()\n" @@ -2409,13 +2448,13 @@ msgid "" "Namespace(foo='bar')" msgstr "" -#: library/argparse.rst:1723 +#: library/argparse.rst:1745 msgid "" ":meth:`~_SubParsersAction.add_parser` supports also an additional " "*deprecated* argument, which allows to deprecate the subparser." msgstr "" -#: library/argparse.rst:1737 +#: library/argparse.rst:1759 msgid "" "One particularly effective way of handling subcommands is to combine the use " "of the :meth:`add_subparsers` method with calls to :meth:`set_defaults` so " @@ -2423,7 +2462,7 @@ msgid "" "example::" msgstr "" -#: library/argparse.rst:1742 +#: library/argparse.rst:1764 msgid "" ">>> # subcommand functions\n" ">>> def foo(args):\n" @@ -2458,7 +2497,7 @@ msgid "" "((XYZYX))" msgstr "" -#: library/argparse.rst:1774 +#: library/argparse.rst:1796 msgid "" "This way, you can let :meth:`parse_args` do the job of calling the " "appropriate function after argument parsing is complete. Associating " @@ -2468,7 +2507,7 @@ msgid "" "argument to the :meth:`add_subparsers` call will work::" msgstr "" -#: library/argparse.rst:1781 +#: library/argparse.rst:1803 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> subparsers = parser.add_subparsers(dest='subparser_name')\n" @@ -2480,15 +2519,15 @@ msgid "" "Namespace(subparser_name='2', y='frobble')" msgstr "" -#: library/argparse.rst:1790 +#: library/argparse.rst:1812 msgid "New *required* keyword-only parameter." msgstr "" -#: library/argparse.rst:1795 +#: library/argparse.rst:1817 msgid "FileType objects" msgstr "" -#: library/argparse.rst:1799 +#: library/argparse.rst:1821 msgid "" "The :class:`FileType` factory creates objects that can be passed to the type " "argument of :meth:`ArgumentParser.add_argument`. Arguments that have :class:" @@ -2497,7 +2536,7 @@ msgid "" "the :func:`open` function for more details)::" msgstr "" -#: library/argparse.rst:1805 +#: library/argparse.rst:1827 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--raw', type=argparse.FileType('wb', 0))\n" @@ -2508,14 +2547,14 @@ msgid "" "raw=<_io.FileIO name='raw.dat' mode='wb'>)" msgstr "" -#: library/argparse.rst:1811 +#: library/argparse.rst:1833 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:1815 +#: library/argparse.rst:1837 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('infile', type=argparse.FileType('r'))\n" @@ -2523,15 +2562,15 @@ msgid "" "Namespace(infile=<_io.TextIOWrapper name='' encoding='UTF-8'>)" msgstr "" -#: library/argparse.rst:1820 -msgid "Added the *encodings* and *errors* parameters." +#: library/argparse.rst:1842 +msgid "Added the *encoding* and *errors* parameters." msgstr "" -#: library/argparse.rst:1825 +#: library/argparse.rst:1847 msgid "Argument groups" msgstr "" -#: library/argparse.rst:1830 +#: library/argparse.rst:1852 msgid "" "By default, :class:`ArgumentParser` groups command-line arguments into " "\"positional arguments\" and \"options\" when displaying help messages. When " @@ -2540,7 +2579,7 @@ msgid "" "method::" msgstr "" -#: library/argparse.rst:1836 +#: library/argparse.rst:1858 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG', add_help=False)\n" ">>> group = parser.add_argument_group('group')\n" @@ -2554,7 +2593,7 @@ msgid "" " --foo FOO foo help" msgstr "" -#: library/argparse.rst:1847 +#: library/argparse.rst:1869 msgid "" "The :meth:`add_argument_group` method returns an argument group object which " "has an :meth:`~ArgumentParser.add_argument` method just like a regular :" @@ -2565,7 +2604,7 @@ msgid "" "this display::" msgstr "" -#: library/argparse.rst:1855 +#: library/argparse.rst:1877 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG', add_help=False)\n" ">>> group1 = parser.add_argument_group('group1', 'group1 description')\n" @@ -2586,7 +2625,7 @@ msgid "" " --bar BAR bar help" msgstr "" -#: library/argparse.rst:1873 +#: library/argparse.rst:1895 msgid "" "The optional, keyword-only parameters argument_default_ and " "conflict_handler_ allow for finer-grained control of the behavior of the " @@ -2595,13 +2634,19 @@ msgid "" "rather than the entire parser." msgstr "" -#: library/argparse.rst:1878 +#: library/argparse.rst:1900 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:1881 +#: library/argparse.rst:1903 +msgid "" +"Within each argument group, arguments are displayed in help output in the " +"order in which they are added." +msgstr "" + +#: library/argparse.rst:1906 msgid "" "Calling :meth:`add_argument_group` on an argument group is deprecated. This " "feature was never supported and does not always work correctly. The function " @@ -2609,18 +2654,18 @@ msgid "" "future." msgstr "" -#: library/argparse.rst:1889 +#: library/argparse.rst:1914 msgid "Mutual exclusion" msgstr "" -#: library/argparse.rst:1893 +#: library/argparse.rst:1918 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:1897 +#: library/argparse.rst:1922 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> group = parser.add_mutually_exclusive_group()\n" @@ -2635,14 +2680,14 @@ msgid "" "PROG: error: argument --bar: not allowed with argument --foo" msgstr "" -#: library/argparse.rst:1909 +#: library/argparse.rst:1934 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:1913 +#: library/argparse.rst:1938 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> group = parser.add_mutually_exclusive_group(required=True)\n" @@ -2653,7 +2698,7 @@ msgid "" "PROG: error: one of the arguments --foo --bar is required" msgstr "" -#: library/argparse.rst:1921 +#: library/argparse.rst:1946 msgid "" "Note that currently mutually exclusive argument groups do not support the " "*title* and *description* arguments of :meth:`~ArgumentParser." @@ -2661,7 +2706,7 @@ msgid "" "argument group that has a title and description. For example::" msgstr "" -#: library/argparse.rst:1927 +#: library/argparse.rst:1952 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> group = parser.add_argument_group('Group title', 'Group description')\n" @@ -2681,7 +2726,7 @@ msgid "" " --bar BAR bar help" msgstr "" -#: library/argparse.rst:1944 +#: library/argparse.rst:1969 msgid "" "Calling :meth:`add_argument_group` or :meth:`add_mutually_exclusive_group` " "on a mutually exclusive group is deprecated. These features were never " @@ -2689,11 +2734,11 @@ msgid "" "by accident through inheritance and will be removed in the future." msgstr "" -#: library/argparse.rst:1952 +#: library/argparse.rst:1977 msgid "Parser defaults" msgstr "" -#: library/argparse.rst:1956 +#: library/argparse.rst:1981 msgid "" "Most of the time, the attributes of the object returned by :meth:" "`parse_args` will be fully determined by inspecting the command-line " @@ -2702,7 +2747,7 @@ msgid "" "command line to be added::" msgstr "" -#: library/argparse.rst:1962 +#: library/argparse.rst:1987 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('foo', type=int)\n" @@ -2711,7 +2756,7 @@ msgid "" "Namespace(bar=42, baz='badger', foo=736)" msgstr "" -#: library/argparse.rst:1968 +#: library/argparse.rst:1993 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 " @@ -2719,7 +2764,7 @@ msgid "" "used::" msgstr "" -#: library/argparse.rst:1972 +#: library/argparse.rst:1997 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', default='bar')\n" @@ -2728,20 +2773,20 @@ msgid "" "Namespace(foo='spam')" msgstr "" -#: library/argparse.rst:1978 +#: library/argparse.rst:2003 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:1984 +#: library/argparse.rst:2009 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:1988 +#: library/argparse.rst:2013 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', default='badger')\n" @@ -2749,54 +2794,54 @@ msgid "" "'badger'" msgstr "" -#: library/argparse.rst:1995 +#: library/argparse.rst:2020 msgid "Printing help" msgstr "" -#: library/argparse.rst:1997 +#: library/argparse.rst:2022 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:2003 +#: library/argparse.rst:2028 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:2009 +#: library/argparse.rst:2034 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:2013 +#: library/argparse.rst:2038 msgid "" "There are also variants of these methods that simply return a string instead " "of printing it:" msgstr "" -#: library/argparse.rst:2018 +#: library/argparse.rst:2043 msgid "" "Return a string containing a brief description of how the :class:" "`ArgumentParser` should be invoked on the command line." msgstr "" -#: library/argparse.rst:2023 +#: library/argparse.rst:2048 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:2028 +#: library/argparse.rst:2053 msgid "Partial parsing" msgstr "" -#: library/argparse.rst:2032 +#: library/argparse.rst:2057 msgid "" "Sometimes a script only needs to handle a specific set of command-line " "arguments, leaving any unrecognized arguments for another script or program. " @@ -2804,7 +2849,7 @@ msgid "" "useful." msgstr "" -#: library/argparse.rst:2037 +#: library/argparse.rst:2062 msgid "" "This method works similarly to :meth:`~ArgumentParser.parse_args`, but it " "does not raise an error for extra, unrecognized arguments. Instead, it " @@ -2812,7 +2857,7 @@ msgid "" "populated namespace and the list of any unrecognized arguments." msgstr "" -#: library/argparse.rst:2044 +#: library/argparse.rst:2069 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', action='store_true')\n" @@ -2821,7 +2866,7 @@ msgid "" "(Namespace(bar='BAR', foo=True), ['--badger', 'spam'])" msgstr "" -#: library/argparse.rst:2051 +#: library/argparse.rst:2076 msgid "" ":ref:`Prefix matching ` rules apply to :meth:" "`~ArgumentParser.parse_known_args`. The parser may consume an option even if " @@ -2829,11 +2874,11 @@ msgid "" "remaining arguments list." msgstr "" -#: library/argparse.rst:2058 +#: library/argparse.rst:2083 msgid "Customizing file parsing" msgstr "" -#: library/argparse.rst:2062 +#: library/argparse.rst:2087 msgid "" "Arguments that are read from a file (see the *fromfile_prefix_chars* keyword " "argument to the :class:`ArgumentParser` constructor) are read one argument " @@ -2841,38 +2886,44 @@ msgid "" "reading." msgstr "" -#: library/argparse.rst:2067 +#: library/argparse.rst:2092 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:2071 +#: library/argparse.rst:2096 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:2074 +#: library/argparse.rst:2099 msgid "" "class MyArgumentParser(argparse.ArgumentParser):\n" " def convert_arg_line_to_args(self, arg_line):\n" " return arg_line.split()" msgstr "" -#: library/argparse.rst:2080 +#: library/argparse.rst:2103 +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:2108 msgid "Exiting methods" msgstr "" -#: library/argparse.rst:2084 +#: library/argparse.rst:2112 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:2088 +#: library/argparse.rst:2116 msgid "" "class ErrorCatchingArgumentParser(argparse.ArgumentParser):\n" " def exit(self, status=0, message=None):\n" @@ -2881,17 +2932,17 @@ msgid "" " exit(status)" msgstr "" -#: library/argparse.rst:2096 +#: library/argparse.rst:2124 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:2101 +#: library/argparse.rst:2129 msgid "Intermixed parsing" msgstr "" -#: library/argparse.rst:2106 +#: library/argparse.rst:2134 msgid "" "A number of Unix commands allow the user to intermix optional arguments with " "positional arguments. The :meth:`~ArgumentParser.parse_intermixed_args` " @@ -2899,7 +2950,7 @@ msgid "" "parsing style." msgstr "" -#: library/argparse.rst:2111 +#: library/argparse.rst:2139 msgid "" "These parsers do not support all the :mod:`!argparse` features, and will " "raise exceptions if unsupported features are used. In particular, " @@ -2907,7 +2958,7 @@ msgid "" "positionals are not supported." msgstr "" -#: library/argparse.rst:2116 +#: library/argparse.rst:2144 msgid "" "The following example shows the difference between :meth:`~ArgumentParser." "parse_known_args` and :meth:`~ArgumentParser.parse_intermixed_args`: the " @@ -2915,7 +2966,7 @@ msgid "" "collects all the positionals into ``rest``. ::" msgstr "" -#: library/argparse.rst:2122 +#: library/argparse.rst:2150 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo')\n" @@ -2927,7 +2978,7 @@ msgid "" "Namespace(cmd='doit', foo='bar', rest=[1, 2, 3])" msgstr "" -#: library/argparse.rst:2131 +#: library/argparse.rst:2159 msgid "" ":meth:`~ArgumentParser.parse_known_intermixed_args` returns a two item tuple " "containing the populated namespace and the list of remaining argument " @@ -2935,11 +2986,11 @@ msgid "" "there are any remaining unparsed argument strings." msgstr "" -#: library/argparse.rst:2140 +#: library/argparse.rst:2168 msgid "Registering custom types or actions" msgstr "" -#: library/argparse.rst:2144 +#: library/argparse.rst:2172 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 " @@ -2947,7 +2998,7 @@ msgid "" "the type by their registered name instead of their callable name." msgstr "" -#: library/argparse.rst:2149 +#: library/argparse.rst:2177 msgid "" "The :meth:`!register` method accepts three arguments - a *registry_name*, " "specifying the internal registry where the object will be stored (e.g., " @@ -2955,12 +3006,12 @@ msgid "" "be registered, and object, the callable to be registered." msgstr "" -#: library/argparse.rst:2154 +#: library/argparse.rst:2182 msgid "" "The following example shows how to register a custom type with a parser::" msgstr "" -#: library/argparse.rst:2156 +#: library/argparse.rst:2184 msgid "" ">>> import argparse\n" ">>> parser = argparse.ArgumentParser()\n" @@ -2976,41 +3027,41 @@ msgid "" "PROG: error: argument --foo: invalid 'hexadecimal integer' value: '1.2'" msgstr "" -#: library/argparse.rst:2168 +#: library/argparse.rst:2196 msgid "Exceptions" msgstr "" -#: library/argparse.rst:2172 +#: library/argparse.rst:2200 msgid "An error from creating or using an argument (optional or positional)." msgstr "" -#: library/argparse.rst:2174 +#: library/argparse.rst:2202 msgid "" "The string value of this exception is the message, augmented with " "information about the argument that caused it." msgstr "" -#: library/argparse.rst:2179 +#: library/argparse.rst:2207 msgid "" "Raised when something goes wrong converting a command line string to a type." msgstr "" -#: library/argparse.rst:2183 +#: library/argparse.rst:2211 msgid "Guides and Tutorials" msgstr "" -#: library/argparse.rst:809 +#: library/argparse.rst:810 msgid "? (question mark)" msgstr "" -#: library/argparse.rst:843 library/argparse.rst:857 +#: library/argparse.rst:844 library/argparse.rst:858 msgid "in argparse module" msgstr "" -#: library/argparse.rst:843 +#: library/argparse.rst:844 msgid "* (asterisk)" msgstr "" -#: library/argparse.rst:857 +#: library/argparse.rst:858 msgid "+ (plus)" msgstr "" diff --git a/library/array.po b/library/array.po index 5fa917d0c..62109b28d 100644 --- a/library/array.po +++ b/library/array.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -25,10 +25,10 @@ msgstr "" msgid "" "This module defines an object type which can compactly represent an array of " "basic values: characters, integers, floating-point numbers. Arrays are " -"sequence types and behave very much like lists, except that the type of " -"objects stored in them is constrained. The type is specified at object " -"creation time by using a :dfn:`type code`, which is a single character. The " -"following type codes are defined:" +"mutable :term:`sequence` types and behave very much like lists, except that " +"the type of objects stored in them is constrained. The type is specified at " +"object creation time by using a :dfn:`type code`, which is a single " +"character. The following type codes are defined:" msgstr "" #: library/array.rst:19 @@ -253,33 +253,37 @@ msgstr "" #: library/array.rst:96 msgid "" -"Array objects support the ordinary sequence operations of indexing, slicing, " -"concatenation, and multiplication. When using slice assignment, the " -"assigned value must be an array object with the same type code; in all other " -"cases, :exc:`TypeError` is raised. Array objects also implement the buffer " -"interface, and may be used wherever :term:`bytes-like objects ` are supported." +"Array objects support the ordinary :ref:`mutable ` :term:" +"`sequence` operations of indexing, slicing, concatenation, and " +"multiplication. When using slice assignment, the assigned value must be an " +"array object with the same type code; in all other cases, :exc:`TypeError` " +"is raised. Array objects also implement the buffer interface, and may be " +"used wherever :term:`bytes-like objects ` are supported." msgstr "" #: library/array.rst:102 +msgid "Arrays are :ref:`generic ` over the type of their contents." +msgstr "" + +#: library/array.rst:104 msgid "" "Raises an :ref:`auditing event ` ``array.__new__`` with arguments " "``typecode``, ``initializer``." msgstr "" -#: library/array.rst:107 +#: library/array.rst:109 msgid "The typecode character used to create the array." msgstr "" -#: library/array.rst:112 +#: library/array.rst:114 msgid "The length in bytes of one array item in the internal representation." msgstr "" -#: library/array.rst:117 -msgid "Append a new item with value *x* to the end of the array." +#: library/array.rst:119 +msgid "Append a new item with the specified value to the end of the array." msgstr "" -#: library/array.rst:122 +#: library/array.rst:124 msgid "" "Return a tuple ``(address, length)`` giving the current memory address and " "the length in elements of the buffer used to hold array's contents. The " @@ -291,7 +295,7 @@ msgid "" "it." msgstr "" -#: library/array.rst:132 +#: library/array.rst:134 msgid "" "When using array objects from code written in C or C++ (the only way to " "effectively make use of this information), it makes more sense to use the " @@ -300,7 +304,7 @@ msgid "" "interface is documented in :ref:`bufferobjects`." msgstr "" -#: library/array.rst:141 +#: library/array.rst:143 msgid "" "\"Byteswap\" all items of the array. This is only supported for values " "which are 1, 2, 4, or 8 bytes in size; for other types of values, :exc:" @@ -308,11 +312,11 @@ msgid "" "written on a machine with a different byte order." msgstr "" -#: library/array.rst:149 -msgid "Return the number of occurrences of *x* in the array." +#: library/array.rst:151 +msgid "Return the number of occurrences of *value* in the array." msgstr "" -#: library/array.rst:154 +#: library/array.rst:156 msgid "" "Append items from *iterable* to the end of the array. If *iterable* is " "another array, it must have *exactly* the same type code; if not, :exc:" @@ -320,18 +324,18 @@ msgid "" "iterable and its elements must be the right type to be appended to the array." msgstr "" -#: library/array.rst:162 +#: library/array.rst:164 msgid "" "Appends items from the :term:`bytes-like object`, interpreting its content " "as an array of machine values (as if it had been read from a file using the :" "meth:`fromfile` method)." msgstr "" -#: library/array.rst:166 +#: library/array.rst:168 msgid ":meth:`!fromstring` is renamed to :meth:`frombytes` for clarity." msgstr "" -#: library/array.rst:172 +#: library/array.rst:174 msgid "" "Read *n* items (as machine values) from the :term:`file object` *f* and " "append them to the end of the array. If less than *n* items are available, :" @@ -339,13 +343,13 @@ msgid "" "inserted into the array." msgstr "" -#: library/array.rst:180 +#: library/array.rst:182 msgid "" "Append items from the list. This is equivalent to ``for x in list: a." "append(x)`` except that if there is a type error, the array is unchanged." msgstr "" -#: library/array.rst:186 +#: library/array.rst:188 msgid "" "Extends this array with data from the given Unicode string. The array must " "have type code ``'u'`` or ``'w'``; otherwise a :exc:`ValueError` is raised. " @@ -353,70 +357,70 @@ msgid "" "an array of some other type." msgstr "" -#: library/array.rst:194 +#: library/array.rst:196 msgid "" "Return the smallest *i* such that *i* is the index of the first occurrence " -"of *x* in the array. The optional arguments *start* and *stop* can be " -"specified to search for *x* within a subsection of the array. Raise :exc:" -"`ValueError` if *x* is not found." +"of *value* in the array. The optional arguments *start* and *stop* can be " +"specified to search for *value* within a subsection of the array. Raise :" +"exc:`ValueError` if *value* is not found." msgstr "" -#: library/array.rst:199 +#: library/array.rst:201 msgid "Added optional *start* and *stop* parameters." msgstr "" -#: library/array.rst:205 +#: library/array.rst:207 msgid "" -"Insert a new item with value *x* in the array before position *i*. Negative " +"Insert a new item *value* in the array before position *index*. Negative " "values are treated as being relative to the end of the array." msgstr "" -#: library/array.rst:211 +#: library/array.rst:213 msgid "" "Removes the item with the index *i* from the array and returns it. The " "optional argument defaults to ``-1``, so that by default the last item is " "removed and returned." msgstr "" -#: library/array.rst:218 -msgid "Remove the first occurrence of *x* from the array." +#: library/array.rst:220 +msgid "Remove the first occurrence of *value* from the array." msgstr "" -#: library/array.rst:223 +#: library/array.rst:225 msgid "Remove all elements from the array." msgstr "" -#: library/array.rst:230 +#: library/array.rst:232 msgid "Reverse the order of the items in the array." msgstr "" -#: library/array.rst:235 +#: library/array.rst:237 msgid "" "Convert the array to an array of machine values and return the bytes " "representation (the same sequence of bytes that would be written to a file " "by the :meth:`tofile` method.)" msgstr "" -#: library/array.rst:239 +#: library/array.rst:241 msgid ":meth:`!tostring` is renamed to :meth:`tobytes` for clarity." msgstr "" -#: library/array.rst:245 +#: library/array.rst:247 msgid "Write all items (as machine values) to the :term:`file object` *f*." msgstr "" -#: library/array.rst:250 +#: library/array.rst:252 msgid "Convert the array to an ordinary list with the same items." msgstr "" -#: library/array.rst:255 +#: library/array.rst:257 msgid "" "Convert the array to a Unicode string. The array must have a type ``'u'`` " "or ``'w'``; otherwise a :exc:`ValueError` is raised. Use ``array.tobytes()." "decode(enc)`` to obtain a Unicode string from an array of some other type." msgstr "" -#: library/array.rst:260 +#: library/array.rst:262 msgid "" "The string representation of array objects has the form ``array(typecode, " "initializer)``. The *initializer* is omitted if the array is empty, " @@ -429,7 +433,7 @@ msgid "" "Examples::" msgstr "" -#: library/array.rst:272 +#: library/array.rst:274 msgid "" "array('l')\n" "array('w', 'hello \\u2641')\n" @@ -437,19 +441,19 @@ msgid "" "array('d', [1.0, 2.0, 3.14, -inf, nan])" msgstr "" -#: library/array.rst:280 +#: library/array.rst:282 msgid "Module :mod:`struct`" msgstr "" -#: library/array.rst:281 +#: library/array.rst:283 msgid "Packing and unpacking of heterogeneous binary data." msgstr "" -#: library/array.rst:283 +#: library/array.rst:285 msgid "`NumPy `_" msgstr "" -#: library/array.rst:284 +#: library/array.rst:286 msgid "The NumPy package defines another array type." msgstr "" diff --git a/library/ast.po b/library/ast.po index a3328ce9b..f79159833 100644 --- a/library/ast.po +++ b/library/ast.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -354,20 +354,29 @@ msgstr "" #: library/ast.rst:139 msgid "" +"AST node constructors were changed to provide sensible defaults for omitted " +"fields: optional fields now default to ``None``, list fields default to an " +"empty list, and fields of type :class:`!ast.expr_context` default to :class:" +"`Load() `. Previously, omitted attributes would not exist on " +"constructed nodes (accessing them raised :exc:`AttributeError`)." +msgstr "" + +#: library/ast.rst:147 +msgid "" "Old classes :class:`!ast.Num`, :class:`!ast.Str`, :class:`!ast.Bytes`, :" "class:`!ast.NameConstant` and :class:`!ast.Ellipsis` are still available, " "but they will be removed in future Python releases. In the meantime, " "instantiating them will return an instance of a different class." msgstr "" -#: library/ast.rst:146 +#: library/ast.rst:154 msgid "" "Old classes :class:`!ast.Index` and :class:`!ast.ExtSlice` are still " "available, but they will be removed in future Python releases. In the " "meantime, instantiating them will return an instance of a different class." msgstr "" -#: library/ast.rst:153 +#: library/ast.rst:161 msgid "" "Previous versions of Python allowed the creation of AST nodes that were " "missing required fields. Similarly, AST node constructors allowed arbitrary " @@ -376,34 +385,34 @@ msgid "" "and will be removed in Python 3.15." msgstr "" -#: library/ast.rst:160 +#: library/ast.rst:168 msgid "" "The descriptions of the specific node classes displayed here were initially " "adapted from the fantastic `Green Tree Snakes `__ project and all its contributors." msgstr "" -#: library/ast.rst:169 +#: library/ast.rst:177 msgid "Root nodes" msgstr "" -#: library/ast.rst:173 +#: library/ast.rst:181 msgid "" "A Python module, as with :ref:`file input `. Node type generated " "by :func:`ast.parse` in the default ``\"exec\"`` *mode*." msgstr "" -#: library/ast.rst:176 +#: library/ast.rst:184 msgid "``body`` is a :class:`list` of the module's :ref:`ast-statements`." msgstr "" -#: library/ast.rst:178 +#: library/ast.rst:186 msgid "" "``type_ignores`` is a :class:`list` of the module's type ignore comments; " "see :func:`ast.parse` for more details." msgstr "" -#: library/ast.rst:181 +#: library/ast.rst:189 msgid "" ">>> print(ast.dump(ast.parse('x = 1'), indent=4))\n" "Module(\n" @@ -414,36 +423,36 @@ msgid "" " value=Constant(value=1))])" msgstr "" -#: library/ast.rst:194 +#: library/ast.rst:202 msgid "" "A single Python :ref:`expression input `. Node type " "generated by :func:`ast.parse` when *mode* is ``\"eval\"``." msgstr "" -#: library/ast.rst:197 +#: library/ast.rst:205 msgid "" "``body`` is a single node, one of the :ref:`expression types `." msgstr "" -#: library/ast.rst:270 +#: library/ast.rst:208 msgid "" ">>> print(ast.dump(ast.parse('123', mode='eval'), indent=4))\n" "Expression(\n" " body=Constant(value=123))" msgstr "" -#: library/ast.rst:209 +#: library/ast.rst:217 msgid "" "A single :ref:`interactive input `, like in :ref:`tut-interac`. " "Node type generated by :func:`ast.parse` when *mode* is ``\"single\"``." msgstr "" -#: library/ast.rst:212 +#: library/ast.rst:220 msgid "``body`` is a :class:`list` of :ref:`statement nodes `." msgstr "" -#: library/ast.rst:214 +#: library/ast.rst:222 msgid "" ">>> print(ast.dump(ast.parse('x = 1; y = 2', mode='single'), indent=4))\n" "Interactive(\n" @@ -458,34 +467,34 @@ msgid "" " value=Constant(value=2))])" msgstr "" -#: library/ast.rst:231 +#: library/ast.rst:239 msgid "" "A representation of an old-style type comments for functions, as Python " "versions prior to 3.5 didn't support :pep:`484` annotations. Node type " "generated by :func:`ast.parse` when *mode* is ``\"func_type\"``." msgstr "" -#: library/ast.rst:235 +#: library/ast.rst:243 msgid "Such type comments would look like this::" msgstr "" -#: library/ast.rst:237 +#: library/ast.rst:245 msgid "" "def sum_two_number(a, b):\n" " # type: (int, int) -> int\n" " return a + b" msgstr "" -#: library/ast.rst:241 +#: library/ast.rst:249 msgid "" "``argtypes`` is a :class:`list` of :ref:`expression nodes `." msgstr "" -#: library/ast.rst:243 +#: library/ast.rst:251 msgid "``returns`` is a single :ref:`expression node `." msgstr "" -#: library/ast.rst:245 +#: library/ast.rst:253 msgid "" ">>> print(ast.dump(ast.parse('(int, str) -> List[int]', mode='func_type'), " "indent=4))\n" @@ -499,11 +508,11 @@ msgid "" " ctx=Load()))" msgstr "" -#: library/ast.rst:261 +#: library/ast.rst:269 msgid "Literals" msgstr "" -#: library/ast.rst:265 +#: library/ast.rst:273 msgid "" "A constant value. The ``value`` attribute of the ``Constant`` literal " "contains the Python object it represents. The values represented can be " @@ -512,53 +521,70 @@ msgid "" "`Ellipsis`." msgstr "" -#: library/ast.rst:279 +#: library/ast.rst:278 +msgid "" +"The ``kind`` attribute is an optional string. For string literals with a " +"``u`` prefix, ``kind`` is set to ``'u'``. For all other constants, ``kind`` " +"is ``None``." +msgstr "" + +#: library/ast.rst:282 +msgid "" +">>> print(ast.dump(ast.parse('123', mode='eval'), indent=4))\n" +"Expression(\n" +" body=Constant(value=123))\n" +">>> print(ast.dump(ast.parse(\"u'hello'\", mode='eval'), indent=4))\n" +"Expression(\n" +" body=Constant(value='hello', kind='u'))" +msgstr "" + +#: library/ast.rst:294 msgid "" "Node representing a single formatting field in an f-string. If the string " "contains a single formatting field and nothing else the node can be isolated " "otherwise it appears in :class:`JoinedStr`." msgstr "" -#: library/ast.rst:283 +#: library/ast.rst:298 msgid "" "``value`` is any expression node (such as a literal, a variable, or a " "function call)." msgstr "" -#: library/ast.rst:285 +#: library/ast.rst:300 msgid "``conversion`` is an integer:" msgstr "" -#: library/ast.rst:287 +#: library/ast.rst:302 msgid "-1: no formatting" msgstr "" -#: library/ast.rst:288 +#: library/ast.rst:303 msgid "115: ``!s`` string formatting" msgstr "" -#: library/ast.rst:289 +#: library/ast.rst:304 msgid "114: ``!r`` repr formatting" msgstr "" -#: library/ast.rst:290 +#: library/ast.rst:305 msgid "97: ``!a`` ascii formatting" msgstr "" -#: library/ast.rst:292 +#: library/ast.rst:307 msgid "" "``format_spec`` is a :class:`JoinedStr` node representing the formatting of " "the value, or ``None`` if no format was specified. Both ``conversion`` and " "``format_spec`` can be set at the same time." msgstr "" -#: library/ast.rst:299 +#: library/ast.rst:314 msgid "" "An f-string, comprising a series of :class:`FormattedValue` and :class:" "`Constant` nodes." msgstr "" -#: library/ast.rst:302 +#: library/ast.rst:317 msgid "" ">>> print(ast.dump(ast.parse('f\"sin({a}) is {sin(a):.3}\"', mode='eval'), " "indent=4))\n" @@ -581,14 +607,14 @@ msgid "" " Constant(value='.3')]))]))" msgstr "" -#: library/ast.rst:327 +#: library/ast.rst:342 msgid "" "A list or tuple. ``elts`` holds a list of nodes representing the elements. " "``ctx`` is :class:`Store` if the container is an assignment target (i.e. " "``(x,y)=something``), and :class:`Load` otherwise." msgstr "" -#: library/ast.rst:331 +#: library/ast.rst:346 msgid "" ">>> print(ast.dump(ast.parse('[1, 2, 3]', mode='eval'), indent=4))\n" "Expression(\n" @@ -608,11 +634,11 @@ msgid "" " ctx=Load()))" msgstr "" -#: library/ast.rst:353 +#: library/ast.rst:368 msgid "A set. ``elts`` holds a list of nodes representing the set's elements." msgstr "" -#: library/ast.rst:355 +#: library/ast.rst:370 msgid "" ">>> print(ast.dump(ast.parse('{1, 2, 3}', mode='eval'), indent=4))\n" "Expression(\n" @@ -623,21 +649,21 @@ msgid "" " Constant(value=3)]))" msgstr "" -#: library/ast.rst:368 +#: library/ast.rst:383 msgid "" "A dictionary. ``keys`` and ``values`` hold lists of nodes representing the " "keys and the values respectively, in matching order (what would be returned " "when calling :code:`dictionary.keys()` and :code:`dictionary.values()`)." msgstr "" -#: library/ast.rst:372 +#: library/ast.rst:387 msgid "" "When doing dictionary unpacking using dictionary literals the expression to " "be expanded goes in the ``values`` list, with a ``None`` at the " "corresponding position in ``keys``." msgstr "" -#: library/ast.rst:376 +#: library/ast.rst:391 msgid "" ">>> print(ast.dump(ast.parse('{\"a\":1, **d}', mode='eval'), indent=4))\n" "Expression(\n" @@ -650,24 +676,24 @@ msgid "" " Name(id='d', ctx=Load())]))" msgstr "" -#: library/ast.rst:390 +#: library/ast.rst:405 msgid "Variables" msgstr "" -#: library/ast.rst:394 +#: library/ast.rst:409 msgid "" "A variable name. ``id`` holds the name as a string, and ``ctx`` is one of " "the following types." msgstr "" -#: library/ast.rst:402 +#: library/ast.rst:417 msgid "" "Variable references can be used to load the value of a variable, to assign a " "new value to it, or to delete it. Variable references are given a context to " "distinguish these cases." msgstr "" -#: library/ast.rst:406 +#: library/ast.rst:421 msgid "" ">>> print(ast.dump(ast.parse('a'), indent=4))\n" "Module(\n" @@ -691,14 +717,14 @@ msgid "" " Name(id='a', ctx=Del())])])" msgstr "" -#: library/ast.rst:432 +#: library/ast.rst:447 msgid "" "A ``*var`` variable reference. ``value`` holds the variable, typically a :" "class:`Name` node. This type must be used when building a :class:`Call` node " "with ``*args``." msgstr "" -#: library/ast.rst:436 +#: library/ast.rst:451 msgid "" ">>> print(ast.dump(ast.parse('a, *b = it'), indent=4))\n" "Module(\n" @@ -715,11 +741,11 @@ msgid "" " value=Name(id='it', ctx=Load()))])" msgstr "" -#: library/ast.rst:456 +#: library/ast.rst:471 msgid "Expressions" msgstr "" -#: library/ast.rst:460 +#: library/ast.rst:475 msgid "" "When an expression, such as a function call, appears as a statement by " "itself with its return value not used or stored, it is wrapped in this " @@ -728,7 +754,7 @@ msgid "" "`YieldFrom` node." msgstr "" -#: library/ast.rst:465 +#: library/ast.rst:480 msgid "" ">>> print(ast.dump(ast.parse('-a'), indent=4))\n" "Module(\n" @@ -739,19 +765,19 @@ msgid "" " operand=Name(id='a', ctx=Load())))])" msgstr "" -#: library/ast.rst:478 +#: library/ast.rst:493 msgid "" "A unary operation. ``op`` is the operator, and ``operand`` any expression " "node." msgstr "" -#: library/ast.rst:487 +#: library/ast.rst:502 msgid "" "Unary operator tokens. :class:`Not` is the ``not`` keyword, :class:`Invert` " "is the ``~`` operator." msgstr "" -#: library/ast.rst:490 +#: library/ast.rst:505 msgid "" ">>> print(ast.dump(ast.parse('not x', mode='eval'), indent=4))\n" "Expression(\n" @@ -760,13 +786,13 @@ msgid "" " operand=Name(id='x', ctx=Load())))" msgstr "" -#: library/ast.rst:501 +#: library/ast.rst:516 msgid "" "A binary operation (like addition or division). ``op`` is the operator, and " "``left`` and ``right`` are any expression nodes." msgstr "" -#: library/ast.rst:504 +#: library/ast.rst:519 msgid "" ">>> print(ast.dump(ast.parse('x + y', mode='eval'), indent=4))\n" "Expression(\n" @@ -776,11 +802,11 @@ msgid "" " right=Name(id='y', ctx=Load())))" msgstr "" -#: library/ast.rst:528 +#: library/ast.rst:543 msgid "Binary operator tokens." msgstr "" -#: library/ast.rst:533 +#: library/ast.rst:548 msgid "" "A boolean operation, 'or' or 'and'. ``op`` is :class:`Or` or :class:`And`. " "``values`` are the values involved. Consecutive operations with the same " @@ -788,11 +814,11 @@ msgid "" "values." msgstr "" -#: library/ast.rst:538 +#: library/ast.rst:553 msgid "This doesn't include ``not``, which is a :class:`UnaryOp`." msgstr "" -#: library/ast.rst:540 +#: library/ast.rst:555 msgid "" ">>> print(ast.dump(ast.parse('x or y', mode='eval'), indent=4))\n" "Expression(\n" @@ -803,18 +829,18 @@ msgid "" " Name(id='y', ctx=Load())]))" msgstr "" -#: library/ast.rst:554 +#: library/ast.rst:569 msgid "Boolean operator tokens." msgstr "" -#: library/ast.rst:559 +#: library/ast.rst:574 msgid "" "A comparison of two or more values. ``left`` is the first value in the " "comparison, ``ops`` the list of operators, and ``comparators`` the list of " "values after the first element in the comparison." msgstr "" -#: library/ast.rst:563 +#: library/ast.rst:578 msgid "" ">>> print(ast.dump(ast.parse('1 <= a < 10', mode='eval'), indent=4))\n" "Expression(\n" @@ -828,33 +854,33 @@ msgid "" " Constant(value=10)]))" msgstr "" -#: library/ast.rst:588 +#: library/ast.rst:603 msgid "Comparison operator tokens." msgstr "" -#: library/ast.rst:593 +#: library/ast.rst:608 msgid "" "A function call. ``func`` is the function, which will often be a :class:" "`Name` or :class:`Attribute` object. Of the arguments:" msgstr "" -#: library/ast.rst:596 +#: library/ast.rst:611 msgid "``args`` holds a list of the arguments passed by position." msgstr "" -#: library/ast.rst:597 +#: library/ast.rst:612 msgid "" "``keywords`` holds a list of :class:`.keyword` objects representing " "arguments passed by keyword." msgstr "" -#: library/ast.rst:600 +#: library/ast.rst:615 msgid "" "The ``args`` and ``keywords`` arguments are optional and default to empty " "lists." msgstr "" -#: library/ast.rst:602 +#: library/ast.rst:617 msgid "" ">>> print(ast.dump(ast.parse('func(a, b=c, *d, **e)', mode='eval'), " "indent=4))\n" @@ -874,19 +900,19 @@ msgid "" " value=Name(id='e', ctx=Load()))]))" msgstr "" -#: library/ast.rst:623 +#: library/ast.rst:638 msgid "" "A keyword argument to a function call or class definition. ``arg`` is a raw " "string of the parameter name, ``value`` is a node to pass in." msgstr "" -#: library/ast.rst:629 +#: library/ast.rst:644 msgid "" "An expression such as ``a if b else c``. Each field holds a single node, so " "in the following example, all three are :class:`Name` nodes." msgstr "" -#: library/ast.rst:632 +#: library/ast.rst:647 msgid "" ">>> print(ast.dump(ast.parse('a if b else c', mode='eval'), indent=4))\n" "Expression(\n" @@ -896,7 +922,7 @@ msgid "" " orelse=Name(id='c', ctx=Load())))" msgstr "" -#: library/ast.rst:644 +#: library/ast.rst:659 msgid "" "Attribute access, e.g. ``d.keys``. ``value`` is a node, typically a :class:" "`Name`. ``attr`` is a bare string giving the name of the attribute, and " @@ -904,7 +930,7 @@ msgid "" "the attribute is acted on." msgstr "" -#: library/ast.rst:649 +#: library/ast.rst:664 msgid "" ">>> print(ast.dump(ast.parse('snake.colour', mode='eval'), indent=4))\n" "Expression(\n" @@ -914,7 +940,7 @@ msgid "" " ctx=Load()))" msgstr "" -#: library/ast.rst:661 +#: library/ast.rst:676 msgid "" "A named expression. This AST node is produced by the assignment expressions " "operator (also known as the walrus operator). As opposed to the :class:" @@ -922,7 +948,7 @@ msgid "" "case both ``target`` and ``value`` must be single nodes." msgstr "" -#: library/ast.rst:666 +#: library/ast.rst:681 msgid "" ">>> print(ast.dump(ast.parse('(x := 4)', mode='eval'), indent=4))\n" "Expression(\n" @@ -931,11 +957,11 @@ msgid "" " value=Constant(value=4)))" msgstr "" -#: library/ast.rst:677 +#: library/ast.rst:692 msgid "Subscripting" msgstr "" -#: library/ast.rst:681 +#: library/ast.rst:696 msgid "" "A subscript, such as ``l[1]``. ``value`` is the subscripted object (usually " "sequence or mapping). ``slice`` is an index, slice or key. It can be a :" @@ -943,7 +969,7 @@ msgid "" "`Store` or :class:`Del` according to the action performed with the subscript." msgstr "" -#: library/ast.rst:687 +#: library/ast.rst:702 msgid "" ">>> print(ast.dump(ast.parse('l[1:2, 3]', mode='eval'), indent=4))\n" "Expression(\n" @@ -959,14 +985,14 @@ msgid "" " ctx=Load()))" msgstr "" -#: library/ast.rst:705 +#: library/ast.rst:720 msgid "" "Regular slicing (on the form ``lower:upper`` or ``lower:upper:step``). Can " "occur only inside the *slice* field of :class:`Subscript`, either directly " "or as an element of :class:`Tuple`." msgstr "" -#: library/ast.rst:709 +#: library/ast.rst:724 msgid "" ">>> print(ast.dump(ast.parse('l[1:2]', mode='eval'), indent=4))\n" "Expression(\n" @@ -978,22 +1004,22 @@ msgid "" " ctx=Load()))" msgstr "" -#: library/ast.rst:722 +#: library/ast.rst:737 msgid "Comprehensions" msgstr "" -#: library/ast.rst:729 +#: library/ast.rst:744 msgid "" "List and set comprehensions, generator expressions, and dictionary " "comprehensions. ``elt`` (or ``key`` and ``value``) is a single node " "representing the part that will be evaluated for each item." msgstr "" -#: library/ast.rst:733 +#: library/ast.rst:748 msgid "``generators`` is a list of :class:`comprehension` nodes." msgstr "" -#: library/ast.rst:735 +#: library/ast.rst:750 msgid "" ">>> print(ast.dump(\n" "... ast.parse('[x for x in numbers]', mode='eval'),\n" @@ -1037,7 +1063,7 @@ msgid "" " is_async=0)]))" msgstr "" -#: library/ast.rst:781 +#: library/ast.rst:796 msgid "" "One ``for`` clause in a comprehension. ``target`` is the reference to use " "for each element - typically a :class:`Name` or :class:`Tuple` node. " @@ -1045,13 +1071,13 @@ msgid "" "expressions: each ``for`` clause can have multiple ``ifs``." msgstr "" -#: library/ast.rst:786 +#: library/ast.rst:801 msgid "" "``is_async`` indicates a comprehension is asynchronous (using an ``async " "for`` instead of ``for``). The value is an integer (0 or 1)." msgstr "" -#: library/ast.rst:789 +#: library/ast.rst:804 msgid "" ">>> print(ast.dump(ast.parse('[ord(c) for line in file for c in line]', " "mode='eval'),\n" @@ -1112,29 +1138,29 @@ msgid "" " is_async=1)]))" msgstr "" -#: library/ast.rst:851 +#: library/ast.rst:866 msgid "Statements" msgstr "" -#: library/ast.rst:855 +#: library/ast.rst:870 msgid "" "An assignment. ``targets`` is a list of nodes, and ``value`` is a single " "node." msgstr "" -#: library/ast.rst:857 +#: library/ast.rst:872 msgid "" "Multiple nodes in ``targets`` represents assigning the same value to each. " "Unpacking is represented by putting a :class:`Tuple` or :class:`List` within " "``targets``." msgstr "" -#: library/ast.rst:1158 library/ast.rst:1918 +#: library/ast.rst:1173 library/ast.rst:1933 msgid "" "``type_comment`` is an optional string with the type annotation as a comment." msgstr "" -#: library/ast.rst:865 +#: library/ast.rst:880 msgid "" ">>> print(ast.dump(ast.parse('a = b = 1'), indent=4)) # Multiple assignment\n" "Module(\n" @@ -1158,7 +1184,7 @@ msgid "" " value=Name(id='c', ctx=Load()))])" msgstr "" -#: library/ast.rst:891 +#: library/ast.rst:906 msgid "" "An assignment with a type annotation. ``target`` is a single node and can be " "a :class:`Name`, an :class:`Attribute` or a :class:`Subscript`. " @@ -1166,7 +1192,7 @@ msgid "" "`Name` node. ``value`` is a single optional node." msgstr "" -#: library/ast.rst:896 +#: library/ast.rst:911 msgid "" "``simple`` is always either 0 (indicating a \"complex\" target) or 1 " "(indicating a \"simple\" target). A \"simple\" target consists solely of a :" @@ -1175,7 +1201,7 @@ msgid "" "`~object.__annotations__` dictionary of modules and classes." msgstr "" -#: library/ast.rst:902 +#: library/ast.rst:917 msgid "" ">>> print(ast.dump(ast.parse('c: int'), indent=4))\n" "Module(\n" @@ -1219,7 +1245,7 @@ msgid "" " simple=0)])" msgstr "" -#: library/ast.rst:946 +#: library/ast.rst:961 msgid "" "Augmented assignment, such as ``a += 1``. In the following example, " "``target`` is a :class:`Name` node for ``x`` (with the :class:`Store` " @@ -1227,13 +1253,13 @@ msgid "" "value for 1." msgstr "" -#: library/ast.rst:951 +#: library/ast.rst:966 msgid "" "The ``target`` attribute cannot be of class :class:`Tuple` or :class:`List`, " "unlike the targets of :class:`Assign`." msgstr "" -#: library/ast.rst:954 +#: library/ast.rst:969 msgid "" ">>> print(ast.dump(ast.parse('x += 2'), indent=4))\n" "Module(\n" @@ -1244,14 +1270,14 @@ msgid "" " value=Constant(value=2))])" msgstr "" -#: library/ast.rst:967 +#: library/ast.rst:982 msgid "" "A ``raise`` statement. ``exc`` is the exception object to be raised, " "normally a :class:`Call` or :class:`Name`, or ``None`` for a standalone " "``raise``. ``cause`` is the optional part for ``y`` in ``raise x from y``." msgstr "" -#: library/ast.rst:971 +#: library/ast.rst:986 msgid "" ">>> print(ast.dump(ast.parse('raise x from y'), indent=4))\n" "Module(\n" @@ -1261,13 +1287,13 @@ msgid "" " cause=Name(id='y', ctx=Load()))])" msgstr "" -#: library/ast.rst:983 +#: library/ast.rst:998 msgid "" "An assertion. ``test`` holds the condition, such as a :class:`Compare` node. " "``msg`` holds the failure message." msgstr "" -#: library/ast.rst:986 +#: library/ast.rst:1001 msgid "" ">>> print(ast.dump(ast.parse('assert x,y'), indent=4))\n" "Module(\n" @@ -1277,13 +1303,13 @@ msgid "" " msg=Name(id='y', ctx=Load()))])" msgstr "" -#: library/ast.rst:998 +#: library/ast.rst:1013 msgid "" "Represents a ``del`` statement. ``targets`` is a list of nodes, such as :" "class:`Name`, :class:`Attribute` or :class:`Subscript` nodes." msgstr "" -#: library/ast.rst:1001 +#: library/ast.rst:1016 msgid "" ">>> print(ast.dump(ast.parse('del x,y,z'), indent=4))\n" "Module(\n" @@ -1295,11 +1321,11 @@ msgid "" " Name(id='z', ctx=Del())])])" msgstr "" -#: library/ast.rst:1015 +#: library/ast.rst:1030 msgid "A ``pass`` statement." msgstr "" -#: library/ast.rst:1017 +#: library/ast.rst:1032 msgid "" ">>> print(ast.dump(ast.parse('pass'), indent=4))\n" "Module(\n" @@ -1307,7 +1333,7 @@ msgid "" " Pass()])" msgstr "" -#: library/ast.rst:1027 +#: library/ast.rst:1042 msgid "" "A :ref:`type alias ` created through the :keyword:`type` " "statement. ``name`` is the name of the alias, ``type_params`` is a list of :" @@ -1315,7 +1341,7 @@ msgid "" "type alias." msgstr "" -#: library/ast.rst:1032 +#: library/ast.rst:1047 msgid "" ">>> print(ast.dump(ast.parse('type Alias = int'), indent=4))\n" "Module(\n" @@ -1325,21 +1351,21 @@ msgid "" " value=Name(id='int', ctx=Load()))])" msgstr "" -#: library/ast.rst:1043 +#: library/ast.rst:1058 msgid "" "Other statements which are only applicable inside functions or loops are " "described in other sections." msgstr "" -#: library/ast.rst:1047 +#: library/ast.rst:1062 msgid "Imports" msgstr "" -#: library/ast.rst:1051 +#: library/ast.rst:1066 msgid "An import statement. ``names`` is a list of :class:`alias` nodes." msgstr "" -#: library/ast.rst:1053 +#: library/ast.rst:1068 msgid "" ">>> print(ast.dump(ast.parse('import x,y,z'), indent=4))\n" "Module(\n" @@ -1351,7 +1377,7 @@ msgid "" " alias(name='z')])])" msgstr "" -#: library/ast.rst:1067 +#: library/ast.rst:1082 msgid "" "Represents ``from x import y``. ``module`` is a raw string of the 'from' " "name, without any leading dots, or ``None`` for statements such as ``from . " @@ -1359,7 +1385,7 @@ msgid "" "import (0 means absolute import)." msgstr "" -#: library/ast.rst:1072 +#: library/ast.rst:1087 msgid "" ">>> print(ast.dump(ast.parse('from y import x,y,z'), indent=4))\n" "Module(\n" @@ -1373,13 +1399,13 @@ msgid "" " level=0)])" msgstr "" -#: library/ast.rst:1088 +#: library/ast.rst:1103 msgid "" "Both parameters are raw strings of the names. ``asname`` can be ``None`` if " "the regular name is to be used." msgstr "" -#: library/ast.rst:1091 +#: library/ast.rst:1106 msgid "" ">>> print(ast.dump(ast.parse('from ..foo.bar import a as b, c'), indent=4))\n" "Module(\n" @@ -1392,30 +1418,30 @@ msgid "" " level=2)])" msgstr "" -#: library/ast.rst:1104 +#: library/ast.rst:1119 msgid "Control flow" msgstr "" -#: library/ast.rst:1107 +#: library/ast.rst:1122 msgid "" "Optional clauses such as ``else`` are stored as an empty list if they're not " "present." msgstr "" -#: library/ast.rst:1112 +#: library/ast.rst:1127 msgid "" "An ``if`` statement. ``test`` holds a single node, such as a :class:" "`Compare` node. ``body`` and ``orelse`` each hold a list of nodes." msgstr "" -#: library/ast.rst:1115 +#: library/ast.rst:1130 msgid "" "``elif`` clauses don't have a special representation in the AST, but rather " "appear as extra :class:`If` nodes within the ``orelse`` section of the " "previous one." msgstr "" -#: library/ast.rst:1119 +#: library/ast.rst:1134 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... if x:\n" @@ -1443,7 +1469,7 @@ msgid "" " value=Constant(value=Ellipsis))])])])" msgstr "" -#: library/ast.rst:1149 +#: library/ast.rst:1164 msgid "" "A ``for`` loop. ``target`` holds the variable(s) the loop assigns to, as a " "single :class:`Name`, :class:`Tuple`, :class:`List`, :class:`Attribute` or :" @@ -1453,7 +1479,7 @@ msgid "" "via a ``break`` statement." msgstr "" -#: library/ast.rst:1160 +#: library/ast.rst:1175 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... for x in y:\n" @@ -1474,13 +1500,13 @@ msgid "" " value=Constant(value=Ellipsis))])])" msgstr "" -#: library/ast.rst:1183 +#: library/ast.rst:1198 msgid "" "A ``while`` loop. ``test`` holds the condition, such as a :class:`Compare` " "node." msgstr "" -#: library/ast.rst:1186 +#: library/ast.rst:1201 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... while x:\n" @@ -1500,11 +1526,11 @@ msgid "" " value=Constant(value=Ellipsis))])])" msgstr "" -#: library/ast.rst:1209 +#: library/ast.rst:1224 msgid "The ``break`` and ``continue`` statements." msgstr "" -#: library/ast.rst:1211 +#: library/ast.rst:1226 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\\\n" "... for a in b:\n" @@ -1533,13 +1559,13 @@ msgid "" " Continue()])])])" msgstr "" -#: library/ast.rst:1242 +#: library/ast.rst:1257 msgid "" "``try`` blocks. All attributes are list of nodes to execute, except for " "``handlers``, which is a list of :class:`ExceptHandler` nodes." msgstr "" -#: library/ast.rst:1245 +#: library/ast.rst:1260 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... try:\n" @@ -1579,14 +1605,14 @@ msgid "" " value=Constant(value=Ellipsis))])])" msgstr "" -#: library/ast.rst:1287 +#: library/ast.rst:1302 msgid "" "``try`` blocks which are followed by ``except*`` clauses. The attributes are " "the same as for :class:`Try` but the :class:`ExceptHandler` nodes in " "``handlers`` are interpreted as ``except*`` blocks rather then ``except``." msgstr "" -#: library/ast.rst:1291 +#: library/ast.rst:1306 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... try:\n" @@ -1608,7 +1634,7 @@ msgid "" " value=Constant(value=Ellipsis))])])])" msgstr "" -#: library/ast.rst:1316 +#: library/ast.rst:1331 msgid "" "A single ``except`` clause. ``type`` is the exception type it will match, " "typically a :class:`Name` node (or ``None`` for a catch-all ``except:`` " @@ -1616,7 +1642,7 @@ msgid "" "``None`` if the clause doesn't have ``as foo``. ``body`` is a list of nodes." msgstr "" -#: library/ast.rst:1321 +#: library/ast.rst:1336 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\\\n" "... try:\n" @@ -1640,14 +1666,14 @@ msgid "" " Pass()])])])" msgstr "" -#: library/ast.rst:1347 +#: library/ast.rst:1362 msgid "" "A ``with`` block. ``items`` is a list of :class:`withitem` nodes " "representing the context managers, and ``body`` is the indented block inside " "the context." msgstr "" -#: library/ast.rst:1357 +#: library/ast.rst:1372 msgid "" "A single context manager in a ``with`` block. ``context_expr`` is the " "context manager, often a :class:`Call` node. ``optional_vars`` is a :class:" @@ -1655,7 +1681,7 @@ msgid "" "if that isn't used." msgstr "" -#: library/ast.rst:1362 +#: library/ast.rst:1377 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\\\n" "... with a as b, c as d:\n" @@ -1680,18 +1706,18 @@ msgid "" " Name(id='d', ctx=Load())]))])])" msgstr "" -#: library/ast.rst:1388 +#: library/ast.rst:1403 msgid "Pattern matching" msgstr "" -#: library/ast.rst:1393 +#: library/ast.rst:1408 msgid "" "A ``match`` statement. ``subject`` holds the subject of the match (the " "object that is being matched against the cases) and ``cases`` contains an " "iterable of :class:`match_case` nodes with the different cases." msgstr "" -#: library/ast.rst:1401 +#: library/ast.rst:1416 msgid "" "A single case pattern in a ``match`` statement. ``pattern`` contains the " "match pattern that the subject will be matched against. Note that the :class:" @@ -1699,19 +1725,19 @@ msgid "" "expressions, even when they share the same syntax." msgstr "" -#: library/ast.rst:1406 +#: library/ast.rst:1421 msgid "" "The ``guard`` attribute contains an expression that will be evaluated if the " "pattern matches the subject." msgstr "" -#: library/ast.rst:1409 +#: library/ast.rst:1424 msgid "" "``body`` contains a list of nodes to execute if the pattern matches and the " "result of evaluating the guard expression is true." msgstr "" -#: library/ast.rst:1412 +#: library/ast.rst:1427 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... match x:\n" @@ -1746,7 +1772,7 @@ msgid "" " value=Constant(value=Ellipsis))])])])" msgstr "" -#: library/ast.rst:1450 +#: library/ast.rst:1465 msgid "" "A match literal or value pattern that compares by equality. ``value`` is an " "expression node. Permitted value nodes are restricted as described in the " @@ -1754,7 +1780,7 @@ msgid "" "equal to the evaluated value." msgstr "" -#: library/ast.rst:1455 +#: library/ast.rst:1470 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... match x:\n" @@ -1774,14 +1800,14 @@ msgid "" " value=Constant(value=Ellipsis))])])])" msgstr "" -#: library/ast.rst:1478 +#: library/ast.rst:1493 msgid "" "A match literal pattern that compares by identity. ``value`` is the " "singleton to be compared against: ``None``, ``True``, or ``False``. This " "pattern succeeds if the match subject is the given constant." msgstr "" -#: library/ast.rst:1482 +#: library/ast.rst:1497 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... match x:\n" @@ -1800,7 +1826,7 @@ msgid "" " value=Constant(value=Ellipsis))])])])" msgstr "" -#: library/ast.rst:1504 +#: library/ast.rst:1519 msgid "" "A match sequence pattern. ``patterns`` contains the patterns to be matched " "against the subject elements if the subject is a sequence. Matches a " @@ -1808,7 +1834,7 @@ msgid "" "otherwise matches a fixed length sequence." msgstr "" -#: library/ast.rst:1509 +#: library/ast.rst:1524 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... match x:\n" @@ -1832,7 +1858,7 @@ msgid "" " value=Constant(value=Ellipsis))])])])" msgstr "" -#: library/ast.rst:1536 +#: library/ast.rst:1551 msgid "" "Matches the rest of the sequence in a variable length match sequence " "pattern. If ``name`` is not ``None``, a list containing the remaining " @@ -1840,7 +1866,7 @@ msgid "" "successful." msgstr "" -#: library/ast.rst:1540 +#: library/ast.rst:1555 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... match x:\n" @@ -1874,7 +1900,7 @@ msgid "" " value=Constant(value=Ellipsis))])])])" msgstr "" -#: library/ast.rst:1577 +#: library/ast.rst:1592 msgid "" "A match mapping pattern. ``keys`` is a sequence of expression nodes. " "``patterns`` is a corresponding sequence of pattern nodes. ``rest`` is an " @@ -1883,7 +1909,7 @@ msgid "" "statement documentation." msgstr "" -#: library/ast.rst:1583 +#: library/ast.rst:1598 msgid "" "This pattern succeeds if the subject is a mapping, all evaluated key " "expressions are present in the mapping, and the value corresponding to each " @@ -1892,7 +1918,7 @@ msgid "" "overall mapping pattern is successful." msgstr "" -#: library/ast.rst:1589 +#: library/ast.rst:1604 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... match x:\n" @@ -1924,7 +1950,7 @@ msgid "" " value=Constant(value=Ellipsis))])])])" msgstr "" -#: library/ast.rst:1624 +#: library/ast.rst:1639 msgid "" "A match class pattern. ``cls`` is an expression giving the nominal class to " "be matched. ``patterns`` is a sequence of pattern nodes to be matched " @@ -1935,21 +1961,21 @@ msgid "" "pattern)." msgstr "" -#: library/ast.rst:1631 +#: library/ast.rst:1646 msgid "" "This pattern succeeds if the subject is an instance of the nominated class, " "all positional patterns match the corresponding class-defined attributes, " "and any specified keyword attributes match their corresponding pattern." msgstr "" -#: library/ast.rst:1635 +#: library/ast.rst:1650 msgid "" "Note: classes may define a property that returns self in order to match a " "pattern node against the instance being matched. Several builtin types are " "also matched that way, as described in the match statement documentation." msgstr "" -#: library/ast.rst:1639 +#: library/ast.rst:1654 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... match x:\n" @@ -1993,7 +2019,7 @@ msgid "" " value=Constant(value=Ellipsis))])])])" msgstr "" -#: library/ast.rst:1686 +#: library/ast.rst:1701 msgid "" "A match \"as-pattern\", capture pattern or wildcard pattern. ``pattern`` " "contains the match pattern that the subject will be matched against. If the " @@ -2001,14 +2027,14 @@ msgid "" "and will always succeed." msgstr "" -#: library/ast.rst:1691 +#: library/ast.rst:1706 msgid "" "The ``name`` attribute contains the name that will be bound if the pattern " "is successful. If ``name`` is ``None``, ``pattern`` must also be ``None`` " "and the node represents the wildcard pattern." msgstr "" -#: library/ast.rst:1695 +#: library/ast.rst:1710 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... match x:\n" @@ -2038,7 +2064,7 @@ msgid "" " value=Constant(value=Ellipsis))])])])" msgstr "" -#: library/ast.rst:1728 +#: library/ast.rst:1743 msgid "" "A match \"or-pattern\". An or-pattern matches each of its subpatterns in " "turn to the subject, until one succeeds. The or-pattern is then deemed to " @@ -2047,7 +2073,7 @@ msgid "" "matched against the subject." msgstr "" -#: library/ast.rst:1734 +#: library/ast.rst:1749 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... match x:\n" @@ -2071,17 +2097,17 @@ msgid "" " value=Constant(value=Ellipsis))])])])" msgstr "" -#: library/ast.rst:1761 +#: library/ast.rst:1776 msgid "Type annotations" msgstr "" -#: library/ast.rst:1765 +#: library/ast.rst:1780 msgid "" "A ``# type: ignore`` comment located at *lineno*. *tag* is the optional tag " "specified by the form ``# type: ignore ``." msgstr "" -#: library/ast.rst:1768 +#: library/ast.rst:1783 msgid "" ">>> print(ast.dump(ast.parse('x = 1 # type: ignore', type_comments=True), " "indent=4))\n" @@ -2106,24 +2132,24 @@ msgid "" " TypeIgnore(lineno=1, tag='[assignment]')])" msgstr "" -#: library/ast.rst:1791 +#: library/ast.rst:1806 msgid "" ":class:`!TypeIgnore` nodes are not generated when the *type_comments* " "parameter is set to ``False`` (default). See :func:`ast.parse` for more " "details." msgstr "" -#: library/ast.rst:1799 +#: library/ast.rst:1814 msgid "Type parameters" msgstr "" -#: library/ast.rst:1801 +#: library/ast.rst:1816 msgid "" ":ref:`Type parameters ` can exist on classes, functions, and " "type aliases." msgstr "" -#: library/ast.rst:1806 +#: library/ast.rst:1821 msgid "" "A :class:`typing.TypeVar`. ``name`` is the name of the type variable. " "``bound`` is the bound or constraints, if any. If ``bound`` is a :class:" @@ -2132,7 +2158,7 @@ msgid "" "default, this attribute will be set to ``None``." msgstr "" -#: library/ast.rst:1812 +#: library/ast.rst:1827 msgid "" ">>> print(ast.dump(ast.parse(\"type Alias[T: int = bool] = list[T]\"), " "indent=4))\n" @@ -2151,18 +2177,18 @@ msgid "" " ctx=Load()))])" msgstr "" -#: library/ast.rst:1866 library/ast.rst:1898 +#: library/ast.rst:1881 library/ast.rst:1913 msgid "Added the *default_value* parameter." msgstr "" -#: library/ast.rst:1836 +#: library/ast.rst:1851 msgid "" "A :class:`typing.ParamSpec`. ``name`` is the name of the parameter " "specification. ``default_value`` is the default value; if the :class:`!" "ParamSpec` has no default, this attribute will be set to ``None``." msgstr "" -#: library/ast.rst:1840 +#: library/ast.rst:1855 msgid "" ">>> print(ast.dump(ast.parse(\"type Alias[**P = [int, str]] = Callable[P, " "int]\"), indent=4))\n" @@ -2188,14 +2214,14 @@ msgid "" " ctx=Load()))])" msgstr "" -#: library/ast.rst:1871 +#: library/ast.rst:1886 msgid "" "A :class:`typing.TypeVarTuple`. ``name`` is the name of the type variable " "tuple. ``default_value`` is the default value; if the :class:`!TypeVarTuple` " "has no default, this attribute will be set to ``None``." msgstr "" -#: library/ast.rst:1875 +#: library/ast.rst:1890 msgid "" ">>> print(ast.dump(ast.parse(\"type Alias[*Ts = ()] = tuple[*Ts]\"), " "indent=4))\n" @@ -2218,51 +2244,51 @@ msgid "" " ctx=Load()))])" msgstr "" -#: library/ast.rst:1902 +#: library/ast.rst:1917 msgid "Function and class definitions" msgstr "" -#: library/ast.rst:1906 +#: library/ast.rst:1921 msgid "A function definition." msgstr "" -#: library/ast.rst:1908 +#: library/ast.rst:1923 msgid "``name`` is a raw string of the function name." msgstr "" -#: library/ast.rst:1909 +#: library/ast.rst:1924 msgid "``args`` is an :class:`arguments` node." msgstr "" -#: library/ast.rst:1910 +#: library/ast.rst:1925 msgid "``body`` is the list of nodes inside the function." msgstr "" -#: library/ast.rst:1911 +#: library/ast.rst:1926 msgid "" "``decorator_list`` is the list of decorators to be applied, stored outermost " "first (i.e. the first in the list will be applied last)." msgstr "" -#: library/ast.rst:1913 +#: library/ast.rst:1928 msgid "``returns`` is the return annotation." msgstr "" -#: library/ast.rst:2077 +#: library/ast.rst:2092 msgid "``type_params`` is a list of :ref:`type parameters `." msgstr "" -#: library/ast.rst:2104 library/ast.rst:2115 +#: library/ast.rst:2119 library/ast.rst:2130 msgid "Added ``type_params``." msgstr "" -#: library/ast.rst:1926 +#: library/ast.rst:1941 msgid "" "``lambda`` is a minimal function definition that can be used inside an " "expression. Unlike :class:`FunctionDef`, ``body`` holds a single node." msgstr "" -#: library/ast.rst:1929 +#: library/ast.rst:1944 msgid "" ">>> print(ast.dump(ast.parse('lambda x,y: ...'), indent=4))\n" "Module(\n" @@ -2276,46 +2302,46 @@ msgid "" " body=Constant(value=Ellipsis)))])" msgstr "" -#: library/ast.rst:1945 +#: library/ast.rst:1960 msgid "The arguments for a function." msgstr "" -#: library/ast.rst:1947 +#: library/ast.rst:1962 msgid "" "``posonlyargs``, ``args`` and ``kwonlyargs`` are lists of :class:`arg` nodes." msgstr "" -#: library/ast.rst:1948 +#: library/ast.rst:1963 msgid "" "``vararg`` and ``kwarg`` are single :class:`arg` nodes, referring to the " "``*args, **kwargs`` parameters." msgstr "" -#: library/ast.rst:1950 +#: library/ast.rst:1965 msgid "" "``kw_defaults`` is a list of default values for keyword-only arguments. If " "one is ``None``, the corresponding argument is required." msgstr "" -#: library/ast.rst:1952 +#: library/ast.rst:1967 msgid "" "``defaults`` is a list of default values for arguments that can be passed " "positionally. If there are fewer defaults, they correspond to the last n " "arguments." msgstr "" -#: library/ast.rst:1959 +#: library/ast.rst:1974 msgid "" "A single argument in a list. ``arg`` is a raw string of the argument name; " "``annotation`` is its annotation, such as a :class:`Name` node." msgstr "" -#: library/ast.rst:1964 +#: library/ast.rst:1979 msgid "" "``type_comment`` is an optional string with the type annotation as a comment" msgstr "" -#: library/ast.rst:1966 +#: library/ast.rst:1981 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\\\n" "... @decorator1\n" @@ -2354,11 +2380,11 @@ msgid "" " returns=Constant(value='return annotation'))])" msgstr "" -#: library/ast.rst:2006 +#: library/ast.rst:2021 msgid "A ``return`` statement." msgstr "" -#: library/ast.rst:2008 +#: library/ast.rst:2023 msgid "" ">>> print(ast.dump(ast.parse('return 4'), indent=4))\n" "Module(\n" @@ -2367,14 +2393,14 @@ msgid "" " value=Constant(value=4))])" msgstr "" -#: library/ast.rst:2020 +#: library/ast.rst:2035 msgid "" "A ``yield`` or ``yield from`` expression. Because these are expressions, " "they must be wrapped in an :class:`Expr` node if the value sent back is not " "used." msgstr "" -#: library/ast.rst:2023 +#: library/ast.rst:2038 msgid "" ">>> print(ast.dump(ast.parse('yield x'), indent=4))\n" "Module(\n" @@ -2391,12 +2417,12 @@ msgid "" " value=Name(id='x', ctx=Load())))])" msgstr "" -#: library/ast.rst:2043 +#: library/ast.rst:2058 msgid "" "``global`` and ``nonlocal`` statements. ``names`` is a list of raw strings." msgstr "" -#: library/ast.rst:2045 +#: library/ast.rst:2060 msgid "" ">>> print(ast.dump(ast.parse('global x,y,z'), indent=4))\n" "Module(\n" @@ -2417,36 +2443,36 @@ msgid "" " 'z'])])" msgstr "" -#: library/ast.rst:2068 +#: library/ast.rst:2083 msgid "A class definition." msgstr "" -#: library/ast.rst:2070 +#: library/ast.rst:2085 msgid "``name`` is a raw string for the class name" msgstr "" -#: library/ast.rst:2071 +#: library/ast.rst:2086 msgid "``bases`` is a list of nodes for explicitly specified base classes." msgstr "" -#: library/ast.rst:2072 +#: library/ast.rst:2087 msgid "" "``keywords`` is a list of :class:`.keyword` nodes, principally for " "'metaclass'. Other keywords will be passed to the metaclass, as per :pep:" "`3115`." msgstr "" -#: library/ast.rst:2074 +#: library/ast.rst:2089 msgid "" "``body`` is a list of nodes representing the code within the class " "definition." msgstr "" -#: library/ast.rst:2076 +#: library/ast.rst:2091 msgid "``decorator_list`` is a list of nodes, as in :class:`FunctionDef`." msgstr "" -#: library/ast.rst:2079 +#: library/ast.rst:2094 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\\\n" "... @decorator1\n" @@ -2472,23 +2498,23 @@ msgid "" " Name(id='decorator2', ctx=Load())])])" msgstr "" -#: library/ast.rst:2108 +#: library/ast.rst:2123 msgid "Async and await" msgstr "" -#: library/ast.rst:2112 +#: library/ast.rst:2127 msgid "" "An ``async def`` function definition. Has the same fields as :class:" "`FunctionDef`." msgstr "" -#: library/ast.rst:2121 +#: library/ast.rst:2136 msgid "" "An ``await`` expression. ``value`` is what it waits for. Only valid in the " "body of an :class:`AsyncFunctionDef`." msgstr "" -#: library/ast.rst:2124 +#: library/ast.rst:2139 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\\\n" "... async def f():\n" @@ -2506,14 +2532,14 @@ msgid "" " func=Name(id='other_func', ctx=Load()))))])])" msgstr "" -#: library/ast.rst:2145 +#: library/ast.rst:2160 msgid "" "``async for`` loops and ``async with`` context managers. They have the same " "fields as :class:`For` and :class:`With`, respectively. Only valid in the " "body of an :class:`AsyncFunctionDef`." msgstr "" -#: library/ast.rst:2150 +#: library/ast.rst:2165 msgid "" "When a string is parsed by :func:`ast.parse`, operator nodes (subclasses of :" "class:`ast.operator`, :class:`ast.unaryop`, :class:`ast.cmpop`, :class:`ast." @@ -2522,17 +2548,17 @@ msgid "" "same value (e.g. :class:`ast.Add`)." msgstr "" -#: library/ast.rst:2158 +#: library/ast.rst:2173 msgid ":mod:`ast` Helpers" msgstr "" -#: library/ast.rst:2160 +#: library/ast.rst:2175 msgid "" "Apart from the node classes, the :mod:`ast` module defines these utility " "functions and classes for traversing abstract syntax trees:" msgstr "" -#: library/ast.rst:2165 +#: library/ast.rst:2180 msgid "" "Parse the source into an AST node. Equivalent to ``compile(source, " "filename, mode, flags=FLAGS_VALUE, optimize=optimize)``, where " @@ -2540,7 +2566,7 @@ msgid "" "PyCF_OPTIMIZED_AST`` otherwise." msgstr "" -#: library/ast.rst:2170 +#: library/ast.rst:2185 msgid "" "If ``type_comments=True`` is given, the parser is modified to check and " "return type comments as specified by :pep:`484` and :pep:`526`. This is " @@ -2553,14 +2579,14 @@ msgid "" "empty list)." msgstr "" -#: library/ast.rst:2180 +#: library/ast.rst:2195 msgid "" "In addition, if ``mode`` is ``'func_type'``, the input syntax is modified to " "correspond to :pep:`484` \"signature type comments\", e.g. ``(str, int) -> " "List[str]``." msgstr "" -#: library/ast.rst:2184 +#: library/ast.rst:2199 msgid "" "Setting ``feature_version`` to a tuple ``(major, minor)`` will result in a " "\"best-effort\" attempt to parse using that Python version's grammar. For " @@ -2573,12 +2599,12 @@ msgid "" "``feature_version``." msgstr "" -#: library/ast.rst:2194 +#: library/ast.rst:2209 msgid "" "If source contains a null character (``\\0``), :exc:`ValueError` is raised." msgstr "" -#: library/ast.rst:2197 +#: library/ast.rst:2212 msgid "" "Note that successfully parsing source code into an AST object doesn't " "guarantee that the source code provided is valid Python code that can be " @@ -2588,49 +2614,49 @@ msgid "" "inside a function node)." msgstr "" -#: library/ast.rst:2204 +#: library/ast.rst:2219 msgid "" "In particular, :func:`ast.parse` won't do any scoping checks, which the " "compilation step does." msgstr "" -#: library/ast.rst:2208 +#: library/ast.rst:2223 msgid "" "It is possible to crash the Python interpreter with a sufficiently large/" "complex string due to stack depth limitations in Python's AST compiler." msgstr "" -#: library/ast.rst:2212 +#: library/ast.rst:2227 msgid "Added ``type_comments``, ``mode='func_type'`` and ``feature_version``." msgstr "" -#: library/ast.rst:2215 +#: library/ast.rst:2230 msgid "" "The minimum supported version for ``feature_version`` is now ``(3, 7)``. The " "``optimize`` argument was added." msgstr "" -#: library/ast.rst:2222 +#: library/ast.rst:2237 msgid "" "Unparse an :class:`ast.AST` object and generate a string with code that " "would produce an equivalent :class:`ast.AST` object if parsed back with :" "func:`ast.parse`." msgstr "" -#: library/ast.rst:2227 +#: library/ast.rst:2242 msgid "" "The produced code string will not necessarily be equal to the original code " "that generated the :class:`ast.AST` object (without any compiler " "optimizations, such as constant tuples/frozensets)." msgstr "" -#: library/ast.rst:2232 +#: library/ast.rst:2247 msgid "" "Trying to unparse a highly complex expression would result with :exc:" "`RecursionError`." msgstr "" -#: library/ast.rst:2240 +#: library/ast.rst:2255 msgid "" "Evaluate an expression node or a string containing only a Python literal or " "container display. The string or node provided may only consist of the " @@ -2638,14 +2664,14 @@ msgid "" "dicts, sets, booleans, ``None`` and ``Ellipsis``." msgstr "" -#: library/ast.rst:2245 +#: library/ast.rst:2260 msgid "" "This can be used for evaluating strings containing Python values without the " "need to parse the values oneself. It is not capable of evaluating " "arbitrarily complex expressions, for example involving operators or indexing." msgstr "" -#: library/ast.rst:2250 +#: library/ast.rst:2265 msgid "" "This function had been documented as \"safe\" in the past without defining " "what that meant. That was misleading. This is specifically designed not to " @@ -2657,31 +2683,31 @@ msgid "" "untrusted data is thus not recommended." msgstr "" -#: library/ast.rst:2260 +#: library/ast.rst:2275 msgid "" "It is possible to crash the Python interpreter due to stack depth " "limitations in Python's AST compiler." msgstr "" -#: library/ast.rst:2263 +#: library/ast.rst:2278 msgid "" "It can raise :exc:`ValueError`, :exc:`TypeError`, :exc:`SyntaxError`, :exc:" "`MemoryError` and :exc:`RecursionError` depending on the malformed input." msgstr "" -#: library/ast.rst:2267 +#: library/ast.rst:2282 msgid "Now allows bytes and set literals." msgstr "" -#: library/ast.rst:2270 +#: library/ast.rst:2285 msgid "Now supports creating empty sets with ``'set()'``." msgstr "" -#: library/ast.rst:2273 +#: library/ast.rst:2288 msgid "For string inputs, leading spaces and tabs are now stripped." msgstr "" -#: library/ast.rst:2279 +#: library/ast.rst:2294 msgid "" "Return the docstring of the given *node* (which must be a :class:" "`FunctionDef`, :class:`AsyncFunctionDef`, :class:`ClassDef`, or :class:" @@ -2689,11 +2715,11 @@ msgid "" "clean up the docstring's indentation with :func:`inspect.cleandoc`." msgstr "" -#: library/ast.rst:2285 +#: library/ast.rst:2300 msgid ":class:`AsyncFunctionDef` is now supported." msgstr "" -#: library/ast.rst:2291 +#: library/ast.rst:2306 msgid "" "Get source code segment of the *source* that generated *node*. If some " "location information (:attr:`~ast.AST.lineno`, :attr:`~ast.AST.end_lineno`, :" @@ -2701,13 +2727,13 @@ msgid "" "return ``None``." msgstr "" -#: library/ast.rst:2295 +#: library/ast.rst:2310 msgid "" "If *padded* is ``True``, the first line of a multi-line statement will be " "padded with spaces to match its original position." msgstr "" -#: library/ast.rst:2303 +#: library/ast.rst:2318 msgid "" "When you compile a node tree with :func:`compile`, the compiler expects :" "attr:`~ast.AST.lineno` and :attr:`~ast.AST.col_offset` attributes for every " @@ -2717,81 +2743,81 @@ msgid "" "starting at *node*." msgstr "" -#: library/ast.rst:2312 +#: library/ast.rst:2327 msgid "" "Increment the line number and end line number of each node in the tree " "starting at *node* by *n*. This is useful to \"move code\" to a different " "location in a file." msgstr "" -#: library/ast.rst:2319 +#: library/ast.rst:2334 msgid "" "Copy source location (:attr:`~ast.AST.lineno`, :attr:`~ast.AST.col_offset`, :" "attr:`~ast.AST.end_lineno`, and :attr:`~ast.AST.end_col_offset`) from " "*old_node* to *new_node* if possible, and return *new_node*." msgstr "" -#: library/ast.rst:2326 +#: library/ast.rst:2341 msgid "" "Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields`` " "that is present on *node*." msgstr "" -#: library/ast.rst:2332 +#: library/ast.rst:2347 msgid "" "Yield all direct child nodes of *node*, that is, all fields that are nodes " "and all items of fields that are lists of nodes." msgstr "" -#: library/ast.rst:2338 +#: library/ast.rst:2353 msgid "" "Recursively yield all descendant nodes in the tree starting at *node* " "(including *node* itself), in no specified order. This is useful if you " "only want to modify nodes in place and don't care about the context." msgstr "" -#: library/ast.rst:2345 +#: library/ast.rst:2360 msgid "" "A node visitor base class that walks the abstract syntax tree and calls a " "visitor function for every node found. This function may return a value " "which is forwarded by the :meth:`visit` method." msgstr "" -#: library/ast.rst:2349 +#: library/ast.rst:2364 msgid "" "This class is meant to be subclassed, with the subclass adding visitor " "methods." msgstr "" -#: library/ast.rst:2354 +#: library/ast.rst:2369 msgid "" "Visit a node. The default implementation calls the method called :samp:" "`self.visit_{classname}` where *classname* is the name of the node class, " "or :meth:`generic_visit` if that method doesn't exist." msgstr "" -#: library/ast.rst:2360 +#: library/ast.rst:2375 msgid "This visitor calls :meth:`visit` on all children of the node." msgstr "" -#: library/ast.rst:2362 +#: library/ast.rst:2377 msgid "" "Note that child nodes of nodes that have a custom visitor method won't be " "visited unless the visitor calls :meth:`generic_visit` or visits them itself." msgstr "" -#: library/ast.rst:2368 +#: library/ast.rst:2383 msgid "Handles all constant nodes." msgstr "" -#: library/ast.rst:2370 +#: library/ast.rst:2385 msgid "" "Don't use the :class:`NodeVisitor` if you want to apply changes to nodes " "during traversal. For this a special visitor exists (:class:" "`NodeTransformer`) that allows modifications." msgstr "" -#: library/ast.rst:2376 +#: library/ast.rst:2391 msgid "" "Methods :meth:`!visit_Num`, :meth:`!visit_Str`, :meth:`!visit_Bytes`, :meth:" "`!visit_NameConstant` and :meth:`!visit_Ellipsis` are deprecated now and " @@ -2799,13 +2825,13 @@ msgid "" "`visit_Constant` method to handle all constant nodes." msgstr "" -#: library/ast.rst:2384 +#: library/ast.rst:2399 msgid "" "A :class:`NodeVisitor` subclass that walks the abstract syntax tree and " "allows modification of nodes." msgstr "" -#: library/ast.rst:2387 +#: library/ast.rst:2402 msgid "" "The :class:`NodeTransformer` will walk the AST and use the return value of " "the visitor methods to replace or remove the old node. If the return value " @@ -2814,13 +2840,13 @@ msgid "" "may be the original node in which case no replacement takes place." msgstr "" -#: library/ast.rst:2393 +#: library/ast.rst:2408 msgid "" "Here is an example transformer that rewrites all occurrences of name lookups " "(``foo``) to ``data['foo']``::" msgstr "" -#: library/ast.rst:2396 +#: library/ast.rst:2411 msgid "" "class RewriteName(NodeTransformer):\n" "\n" @@ -2832,21 +2858,21 @@ msgid "" " )" msgstr "" -#: library/ast.rst:2405 +#: library/ast.rst:2420 msgid "" "Keep in mind that if the node you're operating on has child nodes you must " "either transform the child nodes yourself or call the :meth:`~ast." "NodeVisitor.generic_visit` method for the node first." msgstr "" -#: library/ast.rst:2409 +#: library/ast.rst:2424 msgid "" "For nodes that were part of a collection of statements (that applies to all " "statement nodes), the visitor may also return a list of nodes rather than " "just a single node." msgstr "" -#: library/ast.rst:2413 +#: library/ast.rst:2428 msgid "" "If :class:`NodeTransformer` introduces new nodes (that weren't part of " "original tree) without giving them location information (such as :attr:`~ast." @@ -2854,21 +2880,21 @@ msgid "" "sub-tree to recalculate the location information::" msgstr "" -#: library/ast.rst:2418 +#: library/ast.rst:2433 msgid "" "tree = ast.parse('foo', mode='eval')\n" "new_tree = fix_missing_locations(RewriteName().visit(tree))" msgstr "" -#: library/ast.rst:2421 +#: library/ast.rst:2436 msgid "Usually you use the transformer like this::" msgstr "" -#: library/ast.rst:2423 +#: library/ast.rst:2438 msgid "node = YourTransformer().visit(node)" msgstr "" -#: library/ast.rst:2428 +#: library/ast.rst:2443 msgid "" "Return a formatted dump of the tree in *node*. This is mainly useful for " "debugging purposes. If *annotate_fields* is true (by default), the returned " @@ -2879,7 +2905,7 @@ msgid "" "true." msgstr "" -#: library/ast.rst:2436 +#: library/ast.rst:2451 msgid "" "If *indent* is a non-negative integer or string, then the tree will be " "pretty-printed with that indent level. An indent level of 0, negative, or " @@ -2889,21 +2915,21 @@ msgid "" "string is used to indent each level." msgstr "" -#: library/ast.rst:2443 +#: library/ast.rst:2458 msgid "" "If *show_empty* is false (the default), optional empty lists will be omitted " "from the output. Optional ``None`` values are always omitted." msgstr "" -#: library/ast.rst:2447 +#: library/ast.rst:2462 msgid "Added the *indent* option." msgstr "" -#: library/ast.rst:2450 +#: library/ast.rst:2465 msgid "Added the *show_empty* option." msgstr "" -#: library/ast.rst:2453 +#: library/ast.rst:2468 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\\\n" "... async def f():\n" @@ -2931,93 +2957,93 @@ msgid "" " type_ignores=[])" msgstr "" -#: library/ast.rst:2484 +#: library/ast.rst:2499 msgid "Compiler Flags" msgstr "" -#: library/ast.rst:2486 +#: library/ast.rst:2501 msgid "" "The following flags may be passed to :func:`compile` in order to change " "effects on the compilation of a program:" msgstr "" -#: library/ast.rst:2491 +#: library/ast.rst:2506 msgid "" "Enables support for top-level ``await``, ``async for``, ``async with`` and " "async comprehensions." msgstr "" -#: library/ast.rst:2498 +#: library/ast.rst:2513 msgid "" "Generates and returns an abstract syntax tree instead of returning a " "compiled code object." msgstr "" -#: library/ast.rst:2503 +#: library/ast.rst:2518 msgid "" "The returned AST is optimized according to the *optimize* argument in :func:" "`compile` or :func:`ast.parse`." msgstr "" -#: library/ast.rst:2510 +#: library/ast.rst:2525 msgid "" "Enables support for :pep:`484` and :pep:`526` style type comments (``# type: " "``, ``# type: ignore ``)." msgstr "" -#: library/ast.rst:2519 +#: library/ast.rst:2534 msgid "Command-Line Usage" msgstr "" -#: library/ast.rst:2523 +#: library/ast.rst:2538 msgid "" "The :mod:`ast` module can be executed as a script from the command line. It " "is as simple as:" msgstr "" -#: library/ast.rst:2526 +#: library/ast.rst:2541 msgid "python -m ast [-m ] [-a] [infile]" msgstr "" -#: library/ast.rst:2530 +#: library/ast.rst:2545 msgid "The following options are accepted:" msgstr "" -#: library/ast.rst:2536 +#: library/ast.rst:2551 msgid "Show the help message and exit." msgstr "" -#: library/ast.rst:2541 +#: library/ast.rst:2556 msgid "" "Specify what kind of code must be compiled, like the *mode* argument in :" "func:`parse`." msgstr "" -#: library/ast.rst:2546 +#: library/ast.rst:2561 msgid "Don't parse type comments." msgstr "" -#: library/ast.rst:2550 +#: library/ast.rst:2565 msgid "Include attributes such as line numbers and column offsets." msgstr "" -#: library/ast.rst:2555 +#: library/ast.rst:2570 msgid "Indentation of nodes in AST (number of spaces)." msgstr "" -#: library/ast.rst:2557 +#: library/ast.rst:2572 msgid "" "If :file:`infile` is specified its contents are parsed to AST and dumped to " "stdout. Otherwise, the content is read from stdin." msgstr "" -#: library/ast.rst:2563 +#: library/ast.rst:2578 msgid "" "`Green Tree Snakes `_, an external " "documentation resource, has good details on working with Python ASTs." msgstr "" -#: library/ast.rst:2566 +#: library/ast.rst:2581 msgid "" "`ASTTokens `_ " "annotates Python ASTs with the positions of tokens and text in the source " @@ -3025,21 +3051,21 @@ msgid "" "transformations." msgstr "" -#: library/ast.rst:2571 +#: library/ast.rst:2586 msgid "" "`leoAst.py `_ unifies the token-based and parse-tree-based views of python programs " "by inserting two-way links between tokens and ast nodes." msgstr "" -#: library/ast.rst:2576 +#: library/ast.rst:2591 msgid "" "`LibCST `_ parses code as a Concrete Syntax " "Tree that looks like an ast tree and keeps all formatting details. It's " "useful for building automated refactoring (codemod) applications and linters." msgstr "" -#: library/ast.rst:2581 +#: library/ast.rst:2596 msgid "" "`Parso `_ is a Python parser that supports " "error recovery and round-trip parsing for different Python versions (in " diff --git a/library/asynchat.po b/library/asynchat.po index 936f84e20..53aab6c13 100644 --- a/library/asynchat.po +++ b/library/asynchat.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/asyncio-api-index.po b/library/asyncio-api-index.po index 6a89fe1dc..83b856409 100644 --- a/library/asyncio-api-index.po +++ b/library/asyncio-api-index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/asyncio-dev.po b/library/asyncio-dev.po index 000091794..62a6200ab 100644 --- a/library/asyncio-dev.po +++ b/library/asyncio-dev.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -256,7 +256,7 @@ msgid "" "asyncio.run(main())" msgstr "" -#: library/asyncio-dev.rst:217 +#: library/asyncio-dev.rst:217 library/asyncio-dev.rst:448 msgid "Output::" msgstr "" @@ -364,3 +364,293 @@ msgid "" " raise Exception(\"not consumed\")\n" "Exception: not consumed" msgstr "" + +#: library/asyncio-dev.rst:252 +msgid "Asynchronous generators best practices" +msgstr "" + +#: library/asyncio-dev.rst:254 +msgid "" +"Writing correct and efficient asyncio code requires awareness of certain " +"pitfalls. This section outlines essential best practices that can save you " +"hours of debugging." +msgstr "" + +#: library/asyncio-dev.rst:259 +msgid "Close asynchronous generators explicitly" +msgstr "" + +#: library/asyncio-dev.rst:261 +msgid "" +"It is recommended to manually close the :term:`asynchronous generator " +"`. If a generator exits early - for " +"example, due to an exception raised in the body of an ``async for`` loop - " +"its asynchronous cleanup code may run in an unexpected context. This can " +"occur after the tasks it depends on have completed, or during the event loop " +"shutdown when the async-generator's garbage collection hook is called." +msgstr "" + +#: library/asyncio-dev.rst:269 +msgid "" +"To avoid this, explicitly close the generator by calling its :meth:`~agen." +"aclose` method, or use the :func:`contextlib.aclosing` context manager::" +msgstr "" + +#: library/asyncio-dev.rst:273 +msgid "" +"import asyncio\n" +"import contextlib\n" +"\n" +"async def gen():\n" +" yield 1\n" +" yield 2\n" +"\n" +"async def func():\n" +" async with contextlib.aclosing(gen()) as g:\n" +" async for x in g:\n" +" break # Don't iterate until the end\n" +"\n" +"asyncio.run(func())" +msgstr "" + +#: library/asyncio-dev.rst:287 +msgid "" +"As noted above, the cleanup code for these asynchronous generators is " +"deferred. The following example demonstrates that the finalization of an " +"asynchronous generator can occur in an unexpected order::" +msgstr "" + +#: library/asyncio-dev.rst:291 +msgid "" +"import asyncio\n" +"work_done = False\n" +"\n" +"async def cursor():\n" +" try:\n" +" yield 1\n" +" finally:\n" +" assert work_done\n" +"\n" +"async def rows():\n" +" global work_done\n" +" try:\n" +" yield 2\n" +" finally:\n" +" await asyncio.sleep(0.1) # immitate some async work\n" +" work_done = True\n" +"\n" +"\n" +"async def main():\n" +" async for c in cursor():\n" +" async for r in rows():\n" +" break\n" +" break\n" +"\n" +"asyncio.run(main())" +msgstr "" + +#: library/asyncio-dev.rst:317 +msgid "For this example, we get the following output::" +msgstr "" + +#: library/asyncio-dev.rst:319 +msgid "" +"unhandled exception during asyncio.run() shutdown\n" +"task: ()> exception=AssertionError()>\n" +"Traceback (most recent call last):\n" +" File \"example.py\", line 6, in cursor\n" +" yield 1\n" +"asyncio.exceptions.CancelledError\n" +"\n" +"During handling of the above exception, another exception occurred:\n" +"\n" +"Traceback (most recent call last):\n" +" File \"example.py\", line 8, in cursor\n" +" assert work_done\n" +" ^^^^^^^^^\n" +"AssertionError" +msgstr "" + +#: library/asyncio-dev.rst:334 +msgid "" +"The ``cursor()`` asynchronous generator was finalized before the ``rows`` " +"generator - an unexpected behavior." +msgstr "" + +#: library/asyncio-dev.rst:337 +msgid "" +"The example can be fixed by explicitly closing the ``cursor`` and ``rows`` " +"async-generators::" +msgstr "" + +#: library/asyncio-dev.rst:340 +msgid "" +"async def main():\n" +" async with contextlib.aclosing(cursor()) as cursor_gen:\n" +" async for c in cursor_gen:\n" +" async with contextlib.aclosing(rows()) as rows_gen:\n" +" async for r in rows_gen:\n" +" break\n" +" break" +msgstr "" + +#: library/asyncio-dev.rst:350 +msgid "Create asynchronous generators only when the event loop is running" +msgstr "" + +#: library/asyncio-dev.rst:352 +msgid "" +"It is recommended to create :term:`asynchronous generators ` only after the event loop has been created." +msgstr "" + +#: library/asyncio-dev.rst:356 +msgid "" +"To ensure that asynchronous generators close reliably, the event loop uses " +"the :func:`sys.set_asyncgen_hooks` function to register callback functions. " +"These callbacks update the list of running asynchronous generators to keep " +"it in a consistent state." +msgstr "" + +#: library/asyncio-dev.rst:361 +msgid "" +"When the :meth:`loop.shutdown_asyncgens() ` " +"function is called, the running generators are stopped gracefully and the " +"list is cleared." +msgstr "" + +#: library/asyncio-dev.rst:365 +msgid "" +"The asynchronous generator invokes the corresponding system hook during its " +"first iteration. At the same time, the generator records that the hook has " +"been called and does not call it again." +msgstr "" + +#: library/asyncio-dev.rst:369 +msgid "" +"Therefore, if iteration begins before the event loop is created, the event " +"loop will not be able to add the generator to its list of active generators " +"because the hooks are set after the generator attempts to call them. " +"Consequently, the event loop will not be able to terminate the generator if " +"necessary." +msgstr "" + +#: library/asyncio-dev.rst:375 +msgid "Consider the following example::" +msgstr "" + +#: library/asyncio-dev.rst:377 +msgid "" +"import asyncio\n" +"\n" +"async def agenfn():\n" +" try:\n" +" yield 10\n" +" finally:\n" +" await asyncio.sleep(0)\n" +"\n" +"\n" +"with asyncio.Runner() as runner:\n" +" agen = agenfn()\n" +" print(runner.run(anext(agen)))\n" +" del agen" +msgstr "" + +#: library/asyncio-dev.rst:393 +msgid "" +"10\n" +"Exception ignored while closing generator :\n" +"Traceback (most recent call last):\n" +" File \"example.py\", line 13, in \n" +" del agen\n" +" ^^^^\n" +"RuntimeError: async generator ignored GeneratorExit" +msgstr "" + +#: library/asyncio-dev.rst:401 +msgid "This example can be fixed as follows::" +msgstr "" + +#: library/asyncio-dev.rst:403 +msgid "" +"import asyncio\n" +"\n" +"async def agenfn():\n" +" try:\n" +" yield 10\n" +" finally:\n" +" await asyncio.sleep(0)\n" +"\n" +"async def main():\n" +" agen = agenfn()\n" +" print(await anext(agen))\n" +" del agen\n" +"\n" +"asyncio.run(main())" +msgstr "" + +#: library/asyncio-dev.rst:420 +msgid "Avoid concurrent iteration and closure of the same generator" +msgstr "" + +#: library/asyncio-dev.rst:422 +msgid "" +"Async generators may be reentered while another :meth:`~agen.__anext__` / :" +"meth:`~agen.athrow` / :meth:`~agen.aclose` call is in progress. This may " +"lead to an inconsistent state of the async generator and can cause errors." +msgstr "" + +#: library/asyncio-dev.rst:427 +msgid "Let's consider the following example::" +msgstr "" + +#: library/asyncio-dev.rst:429 +msgid "" +"import asyncio\n" +"\n" +"async def consumer():\n" +" for idx in range(100):\n" +" await asyncio.sleep(0)\n" +" message = yield idx\n" +" print('received', message)\n" +"\n" +"async def amain():\n" +" agenerator = consumer()\n" +" await agenerator.asend(None)\n" +"\n" +" fa = asyncio.create_task(agenerator.asend('A'))\n" +" fb = asyncio.create_task(agenerator.asend('B'))\n" +" await fa\n" +" await fb\n" +"\n" +"asyncio.run(amain())" +msgstr "" + +#: library/asyncio-dev.rst:450 +msgid "" +"received A\n" +"Traceback (most recent call last):\n" +" File \"test.py\", line 38, in \n" +" asyncio.run(amain())\n" +" ~~~~~~~~~~~^^^^^^^^^\n" +" File \"Lib/asyncio/runners.py\", line 204, in run\n" +" return runner.run(main)\n" +" ~~~~~~~~~~^^^^^^\n" +" File \"Lib/asyncio/runners.py\", line 127, in run\n" +" return self._loop.run_until_complete(task)\n" +" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^\n" +" File \"Lib/asyncio/base_events.py\", line 719, in run_until_complete\n" +" return future.result()\n" +" ~~~~~~~~~~~~~^^\n" +" File \"test.py\", line 36, in amain\n" +" await fb\n" +"RuntimeError: anext(): asynchronous generator is already running" +msgstr "" + +#: library/asyncio-dev.rst:469 +msgid "" +"Therefore, it is recommended to avoid using asynchronous generators in " +"parallel tasks or across multiple event loops." +msgstr "" diff --git a/library/asyncio-eventloop.po b/library/asyncio-eventloop.po index a7e83c9ae..9ae382793 100644 --- a/library/asyncio-eventloop.po +++ b/library/asyncio-eventloop.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,7 +18,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: library/asyncio-eventloop.rst:8 -msgid "Event Loop" +msgid "Event loop" msgstr "" #: library/asyncio-eventloop.rst:10 @@ -159,7 +159,7 @@ msgid "" msgstr "" #: library/asyncio-eventloop.rst:103 -msgid "Event Loop Methods" +msgid "Event loop methods" msgstr "" #: library/asyncio-eventloop.rst:105 @@ -253,8 +253,8 @@ msgid "" "used." msgstr "" -#: library/asyncio-eventloop.rst:177 library/asyncio-eventloop.rst:1338 -#: library/asyncio-eventloop.rst:1793 +#: library/asyncio-eventloop.rst:177 library/asyncio-eventloop.rst:1381 +#: library/asyncio-eventloop.rst:1836 msgid "Example::" msgstr "" @@ -358,8 +358,8 @@ msgid "" "section of the documentation." msgstr "" -#: library/asyncio-eventloop.rst:251 library/asyncio-eventloop.rst:307 -#: library/asyncio-eventloop.rst:333 +#: library/asyncio-eventloop.rst:251 library/asyncio-eventloop.rst:308 +#: library/asyncio-eventloop.rst:334 msgid "" "The *context* keyword-only parameter was added. See :pep:`567` for more " "details." @@ -400,7 +400,7 @@ msgid "" "(can be either an int or a float)." msgstr "" -#: library/asyncio-eventloop.rst:286 library/asyncio-eventloop.rst:324 +#: library/asyncio-eventloop.rst:286 library/asyncio-eventloop.rst:325 msgid "" "An instance of :class:`asyncio.TimerHandle` is returned which can be used to " "cancel the callback." @@ -415,99 +415,99 @@ msgstr "" #: library/asyncio-eventloop.rst:293 msgid "" "The optional positional *args* will be passed to the callback when it is " -"called. If you want the callback to be called with keyword arguments use :" -"func:`functools.partial`." +"called. Use :func:`functools.partial` :ref:`to pass keyword arguments " +"` to *callback*." msgstr "" -#: library/asyncio-eventloop.rst:297 +#: library/asyncio-eventloop.rst:298 msgid "" "An optional keyword-only *context* argument allows specifying a custom :" "class:`contextvars.Context` for the *callback* to run in. The current " "context is used when no *context* is provided." msgstr "" -#: library/asyncio-eventloop.rst:303 +#: library/asyncio-eventloop.rst:304 msgid "" "For performance, callbacks scheduled with :meth:`loop.call_later` may run up " "to one clock-resolution early (see ``time.get_clock_info('monotonic')." "resolution``)." msgstr "" -#: library/asyncio-eventloop.rst:311 +#: library/asyncio-eventloop.rst:312 msgid "" "In Python 3.7 and earlier with the default event loop implementation, the " "*delay* could not exceed one day. This has been fixed in Python 3.8." msgstr "" -#: library/asyncio-eventloop.rst:318 +#: library/asyncio-eventloop.rst:319 msgid "" "Schedule *callback* to be called at the given absolute timestamp *when* (an " "int or a float), using the same time reference as :meth:`loop.time`." msgstr "" -#: library/asyncio-eventloop.rst:322 +#: library/asyncio-eventloop.rst:323 msgid "This method's behavior is the same as :meth:`call_later`." msgstr "" -#: library/asyncio-eventloop.rst:329 +#: library/asyncio-eventloop.rst:330 msgid "" "For performance, callbacks scheduled with :meth:`loop.call_at` may run up to " "one clock-resolution early (see ``time.get_clock_info('monotonic')." "resolution``)." msgstr "" -#: library/asyncio-eventloop.rst:337 +#: library/asyncio-eventloop.rst:338 msgid "" "In Python 3.7 and earlier with the default event loop implementation, the " "difference between *when* and the current time could not exceed one day. " "This has been fixed in Python 3.8." msgstr "" -#: library/asyncio-eventloop.rst:344 +#: library/asyncio-eventloop.rst:345 msgid "" "Return the current time, as a :class:`float` value, according to the event " "loop's internal monotonic clock." msgstr "" -#: library/asyncio-eventloop.rst:348 +#: library/asyncio-eventloop.rst:349 msgid "" "In Python 3.7 and earlier timeouts (relative *delay* or absolute *when*) " "should not exceed one day. This has been fixed in Python 3.8." msgstr "" -#: library/asyncio-eventloop.rst:354 +#: library/asyncio-eventloop.rst:355 msgid "The :func:`asyncio.sleep` function." msgstr "" -#: library/asyncio-eventloop.rst:358 -msgid "Creating Futures and Tasks" +#: library/asyncio-eventloop.rst:359 +msgid "Creating futures and tasks" msgstr "" -#: library/asyncio-eventloop.rst:362 +#: library/asyncio-eventloop.rst:363 msgid "Create an :class:`asyncio.Future` object attached to the event loop." msgstr "" -#: library/asyncio-eventloop.rst:364 +#: library/asyncio-eventloop.rst:365 msgid "" "This is the preferred way to create Futures in asyncio. This lets third-" "party event loops provide alternative implementations of the Future object " "(with better performance or instrumentation)." msgstr "" -#: library/asyncio-eventloop.rst:372 +#: library/asyncio-eventloop.rst:373 msgid "" "Schedule the execution of :ref:`coroutine ` *coro*. Return a :" "class:`Task` object." msgstr "" -#: library/asyncio-eventloop.rst:375 +#: library/asyncio-eventloop.rst:376 msgid "" "Third-party event loops can use their own subclass of :class:`Task` for " "interoperability. In this case, the result type is a subclass of :class:" "`Task`." msgstr "" -#: library/asyncio-eventloop.rst:379 +#: library/asyncio-eventloop.rst:380 msgid "" "The full function signature is largely the same as that of the :class:`Task` " "constructor (or factory) - all of the keyword arguments to this function are " @@ -515,45 +515,45 @@ msgid "" "``None``." msgstr "" -#: library/asyncio-eventloop.rst:384 +#: library/asyncio-eventloop.rst:385 msgid "" "If the *name* argument is provided and not ``None``, it is set as the name " "of the task using :meth:`Task.set_name`." msgstr "" -#: library/asyncio-eventloop.rst:387 +#: library/asyncio-eventloop.rst:388 msgid "" "An optional keyword-only *context* argument allows specifying a custom :" "class:`contextvars.Context` for the *coro* to run in. The current context " "copy is created when no *context* is provided." msgstr "" -#: library/asyncio-eventloop.rst:391 +#: library/asyncio-eventloop.rst:392 msgid "Added the *name* parameter." msgstr "" -#: library/asyncio-eventloop.rst:394 +#: library/asyncio-eventloop.rst:395 msgid "Added the *context* parameter." msgstr "" -#: library/asyncio-eventloop.rst:397 +#: library/asyncio-eventloop.rst:398 msgid "" "Added ``kwargs`` which passes on arbitrary extra parameters, including " "``name`` and ``context``." msgstr "" -#: library/asyncio-eventloop.rst:400 +#: library/asyncio-eventloop.rst:401 msgid "" "Rolled back the change that passes on *name* and *context* (if it is None), " "while still passing on other arbitrary keyword arguments (to avoid breaking " "backwards compatibility with 3.13.3)." msgstr "" -#: library/asyncio-eventloop.rst:406 +#: library/asyncio-eventloop.rst:407 msgid "Set a task factory that will be used by :meth:`loop.create_task`." msgstr "" -#: library/asyncio-eventloop.rst:409 +#: library/asyncio-eventloop.rst:410 msgid "" "If *factory* is ``None`` the default task factory will be set. Otherwise, " "*factory* must be a *callable* with the signature matching ``(loop, coro, " @@ -562,90 +562,90 @@ msgid "" "return a :class:`asyncio.Task`-compatible object." msgstr "" -#: library/asyncio-eventloop.rst:415 +#: library/asyncio-eventloop.rst:416 msgid "Required that all *kwargs* are passed on to :class:`asyncio.Task`." msgstr "" -#: library/asyncio-eventloop.rst:418 +#: library/asyncio-eventloop.rst:419 msgid "" "*name* is no longer passed to task factories. *context* is no longer passed " "to task factories if it is ``None``." msgstr "" -#: library/asyncio-eventloop.rst:424 +#: library/asyncio-eventloop.rst:425 msgid "Return a task factory or ``None`` if the default one is in use." msgstr "" -#: library/asyncio-eventloop.rst:428 +#: library/asyncio-eventloop.rst:429 msgid "Opening network connections" msgstr "" -#: library/asyncio-eventloop.rst:440 +#: library/asyncio-eventloop.rst:441 msgid "" "Open a streaming transport connection to a given address specified by *host* " "and *port*." msgstr "" -#: library/asyncio-eventloop.rst:443 +#: library/asyncio-eventloop.rst:444 msgid "" "The socket family can be either :py:const:`~socket.AF_INET` or :py:const:" "`~socket.AF_INET6` depending on *host* (or the *family* argument, if " "provided)." msgstr "" -#: library/asyncio-eventloop.rst:447 +#: library/asyncio-eventloop.rst:448 msgid "The socket type will be :py:const:`~socket.SOCK_STREAM`." msgstr "" -#: library/asyncio-eventloop.rst:449 library/asyncio-eventloop.rst:1248 -#: library/asyncio-eventloop.rst:1265 +#: library/asyncio-eventloop.rst:450 library/asyncio-eventloop.rst:1258 +#: library/asyncio-eventloop.rst:1277 msgid "" "*protocol_factory* must be a callable returning an :ref:`asyncio protocol " "` implementation." msgstr "" -#: library/asyncio-eventloop.rst:452 +#: library/asyncio-eventloop.rst:453 msgid "" "This method will try to establish the connection in the background. When " "successful, it returns a ``(transport, protocol)`` pair." msgstr "" -#: library/asyncio-eventloop.rst:455 +#: library/asyncio-eventloop.rst:456 msgid "The chronological synopsis of the underlying operation is as follows:" msgstr "" -#: library/asyncio-eventloop.rst:457 +#: library/asyncio-eventloop.rst:458 msgid "" "The connection is established and a :ref:`transport ` is " "created for it." msgstr "" -#: library/asyncio-eventloop.rst:460 +#: library/asyncio-eventloop.rst:461 msgid "" "*protocol_factory* is called without arguments and is expected to return a :" "ref:`protocol ` instance." msgstr "" -#: library/asyncio-eventloop.rst:463 +#: library/asyncio-eventloop.rst:464 msgid "" "The protocol instance is coupled with the transport by calling its :meth:" "`~BaseProtocol.connection_made` method." msgstr "" -#: library/asyncio-eventloop.rst:466 +#: library/asyncio-eventloop.rst:467 msgid "A ``(transport, protocol)`` tuple is returned on success." msgstr "" -#: library/asyncio-eventloop.rst:468 +#: library/asyncio-eventloop.rst:469 msgid "" "The created transport is an implementation-dependent bidirectional stream." msgstr "" -#: library/asyncio-eventloop.rst:471 library/asyncio-eventloop.rst:604 +#: library/asyncio-eventloop.rst:472 library/asyncio-eventloop.rst:605 msgid "Other arguments:" msgstr "" -#: library/asyncio-eventloop.rst:473 +#: library/asyncio-eventloop.rst:474 msgid "" "*ssl*: if given and not false, a SSL/TLS transport is created (by default a " "plain TCP transport is created). If *ssl* is a :class:`ssl.SSLContext` " @@ -654,11 +654,11 @@ msgid "" "is used." msgstr "" -#: library/asyncio-eventloop.rst:479 +#: library/asyncio-eventloop.rst:480 msgid ":ref:`SSL/TLS security considerations `" msgstr "" -#: library/asyncio-eventloop.rst:481 +#: library/asyncio-eventloop.rst:482 msgid "" "*server_hostname* sets or overrides the hostname that the target server's " "certificate will be matched against. Should only be passed if *ssl* is not " @@ -669,7 +669,7 @@ msgid "" "potential man-in-the-middle attacks)." msgstr "" -#: library/asyncio-eventloop.rst:489 +#: library/asyncio-eventloop.rst:490 msgid "" "*family*, *proto*, *flags* are the optional address family, protocol and " "flags to be passed through to getaddrinfo() for *host* resolution. If given, " @@ -677,7 +677,7 @@ msgid "" "constants." msgstr "" -#: library/asyncio-eventloop.rst:494 +#: library/asyncio-eventloop.rst:495 msgid "" "*happy_eyeballs_delay*, if given, enables Happy Eyeballs for this " "connection. It should be a floating-point number representing the amount of " @@ -687,7 +687,7 @@ msgid "" "the RFC is ``0.25`` (250 milliseconds)." msgstr "" -#: library/asyncio-eventloop.rst:502 +#: library/asyncio-eventloop.rst:503 msgid "" "*interleave* controls address reordering when a host name resolves to " "multiple IP addresses. If ``0`` or unspecified, no reordering is done, and " @@ -698,7 +698,7 @@ msgid "" "*happy_eyeballs_delay* is not specified, and ``1`` if it is." msgstr "" -#: library/asyncio-eventloop.rst:511 +#: library/asyncio-eventloop.rst:512 msgid "" "*sock*, if given, should be an existing, already connected :class:`socket." "socket` object to be used by the transport. If *sock* is given, none of " @@ -706,37 +706,37 @@ msgid "" "*interleave* and *local_addr* should be specified." msgstr "" -#: library/asyncio-eventloop.rst:519 library/asyncio-eventloop.rst:641 -#: library/asyncio-eventloop.rst:889 +#: library/asyncio-eventloop.rst:520 library/asyncio-eventloop.rst:642 +#: library/asyncio-eventloop.rst:890 msgid "" "The *sock* argument transfers ownership of the socket to the transport " "created. To close the socket, call the transport's :meth:`~asyncio." "BaseTransport.close` method." msgstr "" -#: library/asyncio-eventloop.rst:523 +#: library/asyncio-eventloop.rst:524 msgid "" "*local_addr*, if given, is a ``(local_host, local_port)`` tuple used to bind " "the socket locally. The *local_host* and *local_port* are looked up using " "``getaddrinfo()``, similarly to *host* and *port*." msgstr "" -#: library/asyncio-eventloop.rst:527 library/asyncio-eventloop.rst:985 +#: library/asyncio-eventloop.rst:528 library/asyncio-eventloop.rst:986 msgid "" "*ssl_handshake_timeout* is (for a TLS connection) the time in seconds to " "wait for the TLS handshake to complete before aborting the connection. " "``60.0`` seconds if ``None`` (default)." msgstr "" -#: library/asyncio-eventloop.rst:531 library/asyncio-eventloop.rst:796 -#: library/asyncio-eventloop.rst:900 library/asyncio-eventloop.rst:989 +#: library/asyncio-eventloop.rst:532 library/asyncio-eventloop.rst:797 +#: library/asyncio-eventloop.rst:901 library/asyncio-eventloop.rst:990 msgid "" "*ssl_shutdown_timeout* is the time in seconds to wait for the SSL shutdown " "to complete before aborting the connection. ``30.0`` seconds if ``None`` " "(default)." msgstr "" -#: library/asyncio-eventloop.rst:535 +#: library/asyncio-eventloop.rst:536 msgid "" "*all_errors* determines what exceptions are raised when a connection cannot " "be created. By default, only a single ``Exception`` is raised: the first " @@ -746,25 +746,25 @@ msgid "" "(even if there is only one)." msgstr "" -#: library/asyncio-eventloop.rst:545 library/asyncio-eventloop.rst:808 +#: library/asyncio-eventloop.rst:546 library/asyncio-eventloop.rst:809 msgid "Added support for SSL/TLS in :class:`ProactorEventLoop`." msgstr "" -#: library/asyncio-eventloop.rst:549 +#: library/asyncio-eventloop.rst:550 msgid "" "The socket option :ref:`socket.TCP_NODELAY ` is set " "by default for all TCP connections." msgstr "" -#: library/asyncio-eventloop.rst:554 library/asyncio-eventloop.rst:910 +#: library/asyncio-eventloop.rst:555 library/asyncio-eventloop.rst:911 msgid "Added the *ssl_handshake_timeout* parameter." msgstr "" -#: library/asyncio-eventloop.rst:558 +#: library/asyncio-eventloop.rst:559 msgid "Added the *happy_eyeballs_delay* and *interleave* parameters." msgstr "" -#: library/asyncio-eventloop.rst:560 +#: library/asyncio-eventloop.rst:561 msgid "" "Happy Eyeballs Algorithm: Success with Dual-Stack Hosts. When a server's " "IPv4 path and protocol are working, but the server's IPv6 path and protocol " @@ -775,74 +775,74 @@ msgid "" "visible delay and provides an algorithm." msgstr "" -#: library/asyncio-eventloop.rst:569 +#: library/asyncio-eventloop.rst:570 msgid "For more information: https://datatracker.ietf.org/doc/html/rfc6555" msgstr "" -#: library/asyncio-eventloop.rst:573 library/asyncio-eventloop.rst:705 -#: library/asyncio-eventloop.rst:822 library/asyncio-eventloop.rst:862 -#: library/asyncio-eventloop.rst:914 library/asyncio-eventloop.rst:997 +#: library/asyncio-eventloop.rst:574 library/asyncio-eventloop.rst:706 +#: library/asyncio-eventloop.rst:823 library/asyncio-eventloop.rst:863 +#: library/asyncio-eventloop.rst:915 library/asyncio-eventloop.rst:998 msgid "Added the *ssl_shutdown_timeout* parameter." msgstr "" -#: library/asyncio-eventloop.rst:575 +#: library/asyncio-eventloop.rst:576 msgid "*all_errors* was added." msgstr "" -#: library/asyncio-eventloop.rst:580 +#: library/asyncio-eventloop.rst:581 msgid "" "The :func:`open_connection` function is a high-level alternative API. It " "returns a pair of (:class:`StreamReader`, :class:`StreamWriter`) that can be " "used directly in async/await code." msgstr "" -#: library/asyncio-eventloop.rst:591 +#: library/asyncio-eventloop.rst:592 msgid "Create a datagram connection." msgstr "" -#: library/asyncio-eventloop.rst:593 +#: library/asyncio-eventloop.rst:594 msgid "" "The socket family can be either :py:const:`~socket.AF_INET`, :py:const:" "`~socket.AF_INET6`, or :py:const:`~socket.AF_UNIX`, depending on *host* (or " "the *family* argument, if provided)." msgstr "" -#: library/asyncio-eventloop.rst:597 +#: library/asyncio-eventloop.rst:598 msgid "The socket type will be :py:const:`~socket.SOCK_DGRAM`." msgstr "" -#: library/asyncio-eventloop.rst:599 library/asyncio-eventloop.rst:732 -#: library/asyncio-eventloop.rst:881 +#: library/asyncio-eventloop.rst:600 library/asyncio-eventloop.rst:733 +#: library/asyncio-eventloop.rst:882 msgid "" "*protocol_factory* must be a callable returning a :ref:`protocol ` implementation." msgstr "" -#: library/asyncio-eventloop.rst:602 library/asyncio-eventloop.rst:687 +#: library/asyncio-eventloop.rst:603 library/asyncio-eventloop.rst:688 msgid "A tuple of ``(transport, protocol)`` is returned on success." msgstr "" -#: library/asyncio-eventloop.rst:606 +#: library/asyncio-eventloop.rst:607 msgid "" "*local_addr*, if given, is a ``(local_host, local_port)`` tuple used to bind " "the socket locally. The *local_host* and *local_port* are looked up using :" "meth:`getaddrinfo`." msgstr "" -#: library/asyncio-eventloop.rst:612 +#: library/asyncio-eventloop.rst:613 msgid "" "On Windows, when using the proactor event loop with ``local_addr=None``, an :" "exc:`OSError` with :attr:`!errno.WSAEINVAL` will be raised when running it." msgstr "" -#: library/asyncio-eventloop.rst:616 +#: library/asyncio-eventloop.rst:617 msgid "" "*remote_addr*, if given, is a ``(remote_host, remote_port)`` tuple used to " "connect the socket to a remote address. The *remote_host* and *remote_port* " "are looked up using :meth:`getaddrinfo`." msgstr "" -#: library/asyncio-eventloop.rst:620 +#: library/asyncio-eventloop.rst:621 msgid "" "*family*, *proto*, *flags* are the optional address family, protocol and " "flags to be passed through to :meth:`getaddrinfo` for *host* resolution. If " @@ -850,7 +850,7 @@ msgid "" "module constants." msgstr "" -#: library/asyncio-eventloop.rst:625 +#: library/asyncio-eventloop.rst:626 msgid "" "*reuse_port* tells the kernel to allow this endpoint to be bound to the same " "port as other existing endpoints are bound to, so long as they all set this " @@ -859,13 +859,13 @@ msgid "" "is not defined then this capability is unsupported." msgstr "" -#: library/asyncio-eventloop.rst:631 +#: library/asyncio-eventloop.rst:632 msgid "" "*allow_broadcast* tells the kernel to allow this endpoint to send messages " "to the broadcast address." msgstr "" -#: library/asyncio-eventloop.rst:634 +#: library/asyncio-eventloop.rst:635 msgid "" "*sock* can optionally be specified in order to use a preexisting, already " "connected, :class:`socket.socket` object to be used by the transport. If " @@ -873,37 +873,37 @@ msgid "" "`None`)." msgstr "" -#: library/asyncio-eventloop.rst:645 +#: library/asyncio-eventloop.rst:646 msgid "" "See :ref:`UDP echo client protocol ` and :" "ref:`UDP echo server protocol ` examples." msgstr "" -#: library/asyncio-eventloop.rst:648 +#: library/asyncio-eventloop.rst:649 msgid "" "The *family*, *proto*, *flags*, *reuse_address*, *reuse_port*, " "*allow_broadcast*, and *sock* parameters were added." msgstr "" -#: library/asyncio-eventloop.rst:652 +#: library/asyncio-eventloop.rst:653 msgid "Added support for Windows." msgstr "" -#: library/asyncio-eventloop.rst:655 +#: library/asyncio-eventloop.rst:656 msgid "" "The *reuse_address* parameter is no longer supported, as using :ref:`socket." "SO_REUSEADDR ` poses a significant security concern " "for UDP. Explicitly passing ``reuse_address=True`` will raise an exception." msgstr "" -#: library/asyncio-eventloop.rst:661 +#: library/asyncio-eventloop.rst:662 msgid "" "When multiple processes with differing UIDs assign sockets to an identical " "UDP socket address with ``SO_REUSEADDR``, incoming packets can become " "randomly distributed among the sockets." msgstr "" -#: library/asyncio-eventloop.rst:665 +#: library/asyncio-eventloop.rst:666 msgid "" "For supported platforms, *reuse_port* can be used as a replacement for " "similar functionality. With *reuse_port*, :ref:`socket.SO_REUSEPORT ` is set by default " "for all TCP connections." msgstr "" -#: library/asyncio-eventloop.rst:826 +#: library/asyncio-eventloop.rst:827 msgid "" "The :func:`start_server` function is a higher-level alternative API that " "returns a pair of :class:`StreamReader` and :class:`StreamWriter` that can " "be used in an async/await code." msgstr "" -#: library/asyncio-eventloop.rst:838 +#: library/asyncio-eventloop.rst:839 msgid "" "Similar to :meth:`loop.create_server` but works with the :py:const:`~socket." "AF_UNIX` socket family." msgstr "" -#: library/asyncio-eventloop.rst:841 +#: library/asyncio-eventloop.rst:842 msgid "" "*path* is the name of a Unix domain socket, and is required, unless a *sock* " "argument is provided. Abstract Unix sockets, :class:`str`, :class:`bytes`, " "and :class:`~pathlib.Path` paths are supported." msgstr "" -#: library/asyncio-eventloop.rst:846 +#: library/asyncio-eventloop.rst:847 msgid "" "If *cleanup_socket* is true then the Unix socket will automatically be " "removed from the filesystem when the server is closed, unless the socket has " "been replaced after the server has been created." msgstr "" -#: library/asyncio-eventloop.rst:850 +#: library/asyncio-eventloop.rst:851 msgid "" "See the documentation of the :meth:`loop.create_server` method for " "information about arguments to this method." msgstr "" -#: library/asyncio-eventloop.rst:857 +#: library/asyncio-eventloop.rst:858 msgid "" "Added the *ssl_handshake_timeout* and *start_serving* parameters. The *path* " "parameter can now be a :class:`~pathlib.Path` object." msgstr "" -#: library/asyncio-eventloop.rst:866 +#: library/asyncio-eventloop.rst:867 msgid "Added the *cleanup_socket* parameter." msgstr "" -#: library/asyncio-eventloop.rst:874 +#: library/asyncio-eventloop.rst:875 msgid "Wrap an already accepted connection into a transport/protocol pair." msgstr "" -#: library/asyncio-eventloop.rst:876 +#: library/asyncio-eventloop.rst:877 msgid "" "This method can be used by servers that accept connections outside of " "asyncio but that use asyncio to handle them." msgstr "" -#: library/asyncio-eventloop.rst:879 library/asyncio-eventloop.rst:971 +#: library/asyncio-eventloop.rst:880 library/asyncio-eventloop.rst:972 msgid "Parameters:" msgstr "" -#: library/asyncio-eventloop.rst:884 +#: library/asyncio-eventloop.rst:885 msgid "" "*sock* is a preexisting socket object returned from :meth:`socket.accept " "`." msgstr "" -#: library/asyncio-eventloop.rst:893 +#: library/asyncio-eventloop.rst:894 msgid "" "*ssl* can be set to an :class:`~ssl.SSLContext` to enable SSL over the " "accepted connections." msgstr "" -#: library/asyncio-eventloop.rst:896 +#: library/asyncio-eventloop.rst:897 msgid "" "*ssl_handshake_timeout* is (for an SSL connection) the time in seconds to " "wait for the SSL handshake to complete before aborting the connection. " "``60.0`` seconds if ``None`` (default)." msgstr "" -#: library/asyncio-eventloop.rst:904 +#: library/asyncio-eventloop.rst:905 msgid "Returns a ``(transport, protocol)`` pair." msgstr "" -#: library/asyncio-eventloop.rst:918 +#: library/asyncio-eventloop.rst:919 msgid "Transferring files" msgstr "" -#: library/asyncio-eventloop.rst:924 +#: library/asyncio-eventloop.rst:925 msgid "" "Send a *file* over a *transport*. Return the total number of bytes sent." msgstr "" -#: library/asyncio-eventloop.rst:927 +#: library/asyncio-eventloop.rst:928 msgid "The method uses high-performance :meth:`os.sendfile` if available." msgstr "" -#: library/asyncio-eventloop.rst:929 +#: library/asyncio-eventloop.rst:930 msgid "*file* must be a regular file object opened in binary mode." msgstr "" -#: library/asyncio-eventloop.rst:931 library/asyncio-eventloop.rst:1192 +#: library/asyncio-eventloop.rst:932 library/asyncio-eventloop.rst:1202 msgid "" "*offset* tells from where to start reading the file. If specified, *count* " "is the total number of bytes to transmit as opposed to sending the file " @@ -1194,35 +1194,35 @@ msgid "" "obtain the actual number of bytes sent." msgstr "" -#: library/asyncio-eventloop.rst:938 +#: library/asyncio-eventloop.rst:939 msgid "" "*fallback* set to ``True`` makes asyncio to manually read and send the file " "when the platform does not support the sendfile system call (e.g. Windows or " "SSL socket on Unix)." msgstr "" -#: library/asyncio-eventloop.rst:942 +#: library/asyncio-eventloop.rst:943 msgid "" "Raise :exc:`SendfileNotAvailableError` if the system does not support the " "*sendfile* syscall and *fallback* is ``False``." msgstr "" -#: library/asyncio-eventloop.rst:949 -msgid "TLS Upgrade" +#: library/asyncio-eventloop.rst:950 +msgid "TLS upgrade" msgstr "" -#: library/asyncio-eventloop.rst:957 +#: library/asyncio-eventloop.rst:958 msgid "Upgrade an existing transport-based connection to TLS." msgstr "" -#: library/asyncio-eventloop.rst:959 +#: library/asyncio-eventloop.rst:960 msgid "" "Create a TLS coder/decoder instance and insert it between the *transport* " "and the *protocol*. The coder/decoder implements both *transport*-facing " "protocol and *protocol*-facing transport." msgstr "" -#: library/asyncio-eventloop.rst:963 +#: library/asyncio-eventloop.rst:964 msgid "" "Return the created two-interface instance. After *await*, the *protocol* " "must stop using the original *transport* and communicate with the returned " @@ -1230,85 +1230,86 @@ msgid "" "exchanges extra TLS session packets with *transport*." msgstr "" -#: library/asyncio-eventloop.rst:968 +#: library/asyncio-eventloop.rst:969 msgid "" "In some situations (e.g. when the passed transport is already closing) this " "may return ``None``." msgstr "" -#: library/asyncio-eventloop.rst:973 +#: library/asyncio-eventloop.rst:974 msgid "" "*transport* and *protocol* instances that methods like :meth:`~loop." "create_server` and :meth:`~loop.create_connection` return." msgstr "" -#: library/asyncio-eventloop.rst:977 +#: library/asyncio-eventloop.rst:978 msgid "*sslcontext*: a configured instance of :class:`~ssl.SSLContext`." msgstr "" -#: library/asyncio-eventloop.rst:979 +#: library/asyncio-eventloop.rst:980 msgid "" "*server_side* pass ``True`` when a server-side connection is being upgraded " "(like the one created by :meth:`~loop.create_server`)." msgstr "" -#: library/asyncio-eventloop.rst:982 +#: library/asyncio-eventloop.rst:983 msgid "" "*server_hostname*: sets or overrides the host name that the target server's " "certificate will be matched against." msgstr "" -#: library/asyncio-eventloop.rst:1002 +#: library/asyncio-eventloop.rst:1003 msgid "Watching file descriptors" msgstr "" -#: library/asyncio-eventloop.rst:1006 +#: library/asyncio-eventloop.rst:1007 msgid "" "Start monitoring the *fd* file descriptor for read availability and invoke " "*callback* with the specified arguments once *fd* is available for reading." msgstr "" -#: library/asyncio-eventloop.rst:1010 library/asyncio-eventloop.rst:1024 +#: library/asyncio-eventloop.rst:1011 library/asyncio-eventloop.rst:1025 msgid "" "Any preexisting callback registered for *fd* is cancelled and replaced by " "*callback*." msgstr "" -#: library/asyncio-eventloop.rst:1015 +#: library/asyncio-eventloop.rst:1016 msgid "" "Stop monitoring the *fd* file descriptor for read availability. Returns " "``True`` if *fd* was previously being monitored for reads." msgstr "" -#: library/asyncio-eventloop.rst:1020 +#: library/asyncio-eventloop.rst:1021 msgid "" "Start monitoring the *fd* file descriptor for write availability and invoke " -"*callback* with the specified arguments once *fd* is available for writing." +"*callback* with the specified arguments *args* once *fd* is available for " +"writing." msgstr "" -#: library/asyncio-eventloop.rst:1027 library/asyncio-eventloop.rst:1305 +#: library/asyncio-eventloop.rst:1028 library/asyncio-eventloop.rst:1347 msgid "" "Use :func:`functools.partial` :ref:`to pass keyword arguments ` to *callback*." msgstr "" -#: library/asyncio-eventloop.rst:1032 +#: library/asyncio-eventloop.rst:1033 msgid "" "Stop monitoring the *fd* file descriptor for write availability. Returns " "``True`` if *fd* was previously being monitored for writes." msgstr "" -#: library/asyncio-eventloop.rst:1035 +#: library/asyncio-eventloop.rst:1036 msgid "" "See also :ref:`Platform Support ` section for some " "limitations of these methods." msgstr "" -#: library/asyncio-eventloop.rst:1040 +#: library/asyncio-eventloop.rst:1041 msgid "Working with socket objects directly" msgstr "" -#: library/asyncio-eventloop.rst:1042 +#: library/asyncio-eventloop.rst:1043 msgid "" "In general, protocol implementations that use transport-based APIs such as :" "meth:`loop.create_connection` and :meth:`loop.create_server` are faster than " @@ -1317,68 +1318,68 @@ msgid "" "socket` objects directly is more convenient." msgstr "" -#: library/asyncio-eventloop.rst:1052 +#: library/asyncio-eventloop.rst:1053 msgid "" "Receive up to *nbytes* from *sock*. Asynchronous version of :meth:`socket." "recv() `." msgstr "" -#: library/asyncio-eventloop.rst:1055 +#: library/asyncio-eventloop.rst:1056 msgid "Return the received data as a bytes object." msgstr "" -#: library/asyncio-eventloop.rst:1057 library/asyncio-eventloop.rst:1072 -#: library/asyncio-eventloop.rst:1084 library/asyncio-eventloop.rst:1097 -#: library/asyncio-eventloop.rst:1113 library/asyncio-eventloop.rst:1129 -#: library/asyncio-eventloop.rst:1140 library/asyncio-eventloop.rst:1167 -#: library/asyncio-eventloop.rst:1206 +#: library/asyncio-eventloop.rst:1058 library/asyncio-eventloop.rst:1073 +#: library/asyncio-eventloop.rst:1085 library/asyncio-eventloop.rst:1098 +#: library/asyncio-eventloop.rst:1114 library/asyncio-eventloop.rst:1130 +#: library/asyncio-eventloop.rst:1141 library/asyncio-eventloop.rst:1177 +#: library/asyncio-eventloop.rst:1216 msgid "*sock* must be a non-blocking socket." msgstr "" -#: library/asyncio-eventloop.rst:1059 +#: library/asyncio-eventloop.rst:1060 msgid "" "Even though this method was always documented as a coroutine method, " "releases before Python 3.7 returned a :class:`Future`. Since Python 3.7 this " "is an ``async def`` method." msgstr "" -#: library/asyncio-eventloop.rst:1067 +#: library/asyncio-eventloop.rst:1068 msgid "" "Receive data from *sock* into the *buf* buffer. Modeled after the blocking :" "meth:`socket.recv_into() ` method." msgstr "" -#: library/asyncio-eventloop.rst:1070 +#: library/asyncio-eventloop.rst:1071 msgid "Return the number of bytes written to the buffer." msgstr "" -#: library/asyncio-eventloop.rst:1079 +#: library/asyncio-eventloop.rst:1080 msgid "" "Receive a datagram of up to *bufsize* from *sock*. Asynchronous version of :" "meth:`socket.recvfrom() `." msgstr "" -#: library/asyncio-eventloop.rst:1082 +#: library/asyncio-eventloop.rst:1083 msgid "Return a tuple of (received data, remote address)." msgstr "" -#: library/asyncio-eventloop.rst:1091 +#: library/asyncio-eventloop.rst:1092 msgid "" "Receive a datagram of up to *nbytes* from *sock* into *buf*. Asynchronous " "version of :meth:`socket.recvfrom_into() `." msgstr "" -#: library/asyncio-eventloop.rst:1095 +#: library/asyncio-eventloop.rst:1096 msgid "Return a tuple of (number of bytes received, remote address)." msgstr "" -#: library/asyncio-eventloop.rst:1104 +#: library/asyncio-eventloop.rst:1105 msgid "" "Send *data* to the *sock* socket. Asynchronous version of :meth:`socket." "sendall() `." msgstr "" -#: library/asyncio-eventloop.rst:1107 +#: library/asyncio-eventloop.rst:1108 msgid "" "This method continues to send to the socket until either all data in *data* " "has been sent or an error occurs. ``None`` is returned on success. On " @@ -1387,53 +1388,68 @@ msgid "" "the connection." msgstr "" -#: library/asyncio-eventloop.rst:1115 library/asyncio-eventloop.rst:1169 +#: library/asyncio-eventloop.rst:1116 library/asyncio-eventloop.rst:1179 msgid "" "Even though the method was always documented as a coroutine method, before " "Python 3.7 it returned a :class:`Future`. Since Python 3.7, this is an " "``async def`` method." msgstr "" -#: library/asyncio-eventloop.rst:1123 +#: library/asyncio-eventloop.rst:1124 msgid "" "Send a datagram from *sock* to *address*. Asynchronous version of :meth:" "`socket.sendto() `." msgstr "" -#: library/asyncio-eventloop.rst:1127 +#: library/asyncio-eventloop.rst:1128 msgid "Return the number of bytes sent." msgstr "" -#: library/asyncio-eventloop.rst:1136 +#: library/asyncio-eventloop.rst:1137 msgid "Connect *sock* to a remote socket at *address*." msgstr "" -#: library/asyncio-eventloop.rst:1138 +#: library/asyncio-eventloop.rst:1139 msgid "" "Asynchronous version of :meth:`socket.connect() `." msgstr "" -#: library/asyncio-eventloop.rst:1142 +#: library/asyncio-eventloop.rst:1143 +msgid "" +"With :class:`SelectorEventLoop`, *address* does not need to be resolved: " +"for :const:`~socket.AF_INET` and :const:`~socket.AF_INET6` sockets, " +"``sock_connect`` first checks whether *address* is already resolved by " +"calling :func:`socket.inet_pton`, and uses :meth:`loop.getaddrinfo` to " +"resolve it if it is not." +msgstr "" + +#: library/asyncio-eventloop.rst:1149 +msgid "" +":class:`ProactorEventLoop`, the default event loop on Windows, does not " +"resolve *address*. The host must already be a numeric IP address; passing a " +"host name raises :exc:`OSError`. Resolve the address with :meth:`loop." +"getaddrinfo` first, or use :meth:`loop.create_connection`, which resolves " +"the address on every platform." +msgstr "" + +#: library/asyncio-eventloop.rst:1155 msgid "" -"``address`` no longer needs to be resolved. ``sock_connect`` will try to " -"check if the *address* is already resolved by calling :func:`socket." -"inet_pton`. If not, :meth:`loop.getaddrinfo` will be used to resolve the " -"*address*." +"With :class:`SelectorEventLoop`, ``address`` no longer needs to be resolved." msgstr "" -#: library/asyncio-eventloop.rst:1151 +#: library/asyncio-eventloop.rst:1161 msgid "" ":meth:`loop.create_connection` and :func:`asyncio.open_connection() " "`." msgstr "" -#: library/asyncio-eventloop.rst:1158 +#: library/asyncio-eventloop.rst:1168 msgid "" "Accept a connection. Modeled after the blocking :meth:`socket.accept() " "` method." msgstr "" -#: library/asyncio-eventloop.rst:1161 +#: library/asyncio-eventloop.rst:1171 msgid "" "The socket must be bound to an address and listening for connections. The " "return value is a pair ``(conn, address)`` where *conn* is a *new* socket " @@ -1441,57 +1457,57 @@ msgid "" "the address bound to the socket on the other end of the connection." msgstr "" -#: library/asyncio-eventloop.rst:1176 +#: library/asyncio-eventloop.rst:1186 msgid ":meth:`loop.create_server` and :func:`start_server`." msgstr "" -#: library/asyncio-eventloop.rst:1182 +#: library/asyncio-eventloop.rst:1192 msgid "" "Send a file using high-performance :mod:`os.sendfile` if possible. Return " "the total number of bytes sent." msgstr "" -#: library/asyncio-eventloop.rst:1185 +#: library/asyncio-eventloop.rst:1195 msgid "" "Asynchronous version of :meth:`socket.sendfile() `." msgstr "" -#: library/asyncio-eventloop.rst:1187 +#: library/asyncio-eventloop.rst:1197 msgid "" "*sock* must be a non-blocking :const:`socket.SOCK_STREAM` :class:`~socket." "socket`." msgstr "" -#: library/asyncio-eventloop.rst:1190 +#: library/asyncio-eventloop.rst:1200 msgid "*file* must be a regular file object open in binary mode." msgstr "" -#: library/asyncio-eventloop.rst:1199 +#: library/asyncio-eventloop.rst:1209 msgid "" "*fallback*, when set to ``True``, makes asyncio manually read and send the " "file when the platform does not support the sendfile syscall (e.g. Windows " "or SSL socket on Unix)." msgstr "" -#: library/asyncio-eventloop.rst:1203 +#: library/asyncio-eventloop.rst:1213 msgid "" "Raise :exc:`SendfileNotAvailableError` if the system does not support " "*sendfile* syscall and *fallback* is ``False``." msgstr "" -#: library/asyncio-eventloop.rst:1212 +#: library/asyncio-eventloop.rst:1222 msgid "DNS" msgstr "" -#: library/asyncio-eventloop.rst:1218 +#: library/asyncio-eventloop.rst:1228 msgid "Asynchronous version of :meth:`socket.getaddrinfo`." msgstr "" -#: library/asyncio-eventloop.rst:1223 +#: library/asyncio-eventloop.rst:1233 msgid "Asynchronous version of :meth:`socket.getnameinfo`." msgstr "" -#: library/asyncio-eventloop.rst:1226 +#: library/asyncio-eventloop.rst:1236 msgid "" "Both *getaddrinfo* and *getnameinfo* internally utilize their synchronous " "versions through the loop's default thread pool executor. When this executor " @@ -1501,7 +1517,7 @@ msgid "" "executor with a larger number of workers." msgstr "" -#: library/asyncio-eventloop.rst:1233 +#: library/asyncio-eventloop.rst:1243 msgid "" "Both *getaddrinfo* and *getnameinfo* methods were always documented to " "return a coroutine, but prior to Python 3.7 they were, in fact, returning :" @@ -1509,66 +1525,111 @@ msgid "" "coroutines." msgstr "" -#: library/asyncio-eventloop.rst:1241 +#: library/asyncio-eventloop.rst:1251 msgid "Working with pipes" msgstr "" -#: library/asyncio-eventloop.rst:1246 +#: library/asyncio-eventloop.rst:1256 msgid "Register the read end of *pipe* in the event loop." msgstr "" -#: library/asyncio-eventloop.rst:1251 -msgid "*pipe* is a :term:`file-like object `." +#: library/asyncio-eventloop.rst:1261 library/asyncio-eventloop.rst:1280 +msgid "" +"*pipe* is a :term:`file-like object `. See :ref:`Supported " +"pipe objects ` for the objects supported as *pipe*." msgstr "" -#: library/asyncio-eventloop.rst:1253 +#: library/asyncio-eventloop.rst:1265 msgid "" "Return pair ``(transport, protocol)``, where *transport* supports the :class:" "`ReadTransport` interface and *protocol* is an object instantiated by the " "*protocol_factory*." msgstr "" -#: library/asyncio-eventloop.rst:1257 library/asyncio-eventloop.rst:1274 +#: library/asyncio-eventloop.rst:1269 library/asyncio-eventloop.rst:1288 msgid "" "With :class:`SelectorEventLoop` event loop, the *pipe* is set to non-" "blocking mode." msgstr "" -#: library/asyncio-eventloop.rst:1263 +#: library/asyncio-eventloop.rst:1275 msgid "Register the write end of *pipe* in the event loop." msgstr "" -#: library/asyncio-eventloop.rst:1268 -msgid "*pipe* is :term:`file-like object `." -msgstr "" - -#: library/asyncio-eventloop.rst:1270 +#: library/asyncio-eventloop.rst:1284 msgid "" "Return pair ``(transport, protocol)``, where *transport* supports :class:" "`WriteTransport` interface and *protocol* is an object instantiated by the " "*protocol_factory*." msgstr "" -#: library/asyncio-eventloop.rst:1279 +#: library/asyncio-eventloop.rst:1294 +msgid "Supported pipe objects" +msgstr "" + +#: library/asyncio-eventloop.rst:1295 +msgid "" +"These methods only work with objects the operating system can poll for " +"readiness or perform overlapped I/O on. Regular files on disk are **not** " +"supported on any platform. There is no asynchronous file I/O in asyncio; " +"use :meth:`loop.run_in_executor` to read and write regular files without " +"blocking the event loop." +msgstr "" + +#: library/asyncio-eventloop.rst:1301 +msgid "" +"On Unix, with :class:`SelectorEventLoop`, *pipe* must wrap one of the " +"following:" +msgstr "" + +#: library/asyncio-eventloop.rst:1304 +msgid "" +"a pipe, such as an end of an :func:`os.pipe` pair or a FIFO created with :" +"func:`os.mkfifo`;" +msgstr "" + +#: library/asyncio-eventloop.rst:1306 +msgid "a socket;" +msgstr "" + +#: library/asyncio-eventloop.rst:1307 +msgid "a character device, such as a terminal." +msgstr "" + +#: library/asyncio-eventloop.rst:1309 +msgid "" +"On Windows, where only :class:`ProactorEventLoop` implements these methods, " +"*pipe* must wrap a handle opened for overlapped I/O (that is, created with " +"the ``FILE_FLAG_OVERLAPPED`` flag), since the handle has to be associated " +"with an I/O completion port. Handles that were not opened for overlapped I/" +"O are rejected. In particular, the standard streams (:data:`sys.stdin`, :" +"data:`sys.stdout` and :data:`sys.stderr`), console handles, and the pipes " +"created by :func:`os.pipe` are **not** opened for overlapped I/O and " +"therefore cannot be used with these methods." +msgstr "" + +#: library/asyncio-eventloop.rst:1320 msgid "" ":class:`SelectorEventLoop` does not support the above methods on Windows. " "Use :class:`ProactorEventLoop` instead for Windows." msgstr "" -#: library/asyncio-eventloop.rst:1284 +#: library/asyncio-eventloop.rst:1325 msgid "" "The :meth:`loop.subprocess_exec` and :meth:`loop.subprocess_shell` methods." msgstr "" -#: library/asyncio-eventloop.rst:1289 +#: library/asyncio-eventloop.rst:1330 msgid "Unix signals" msgstr "" -#: library/asyncio-eventloop.rst:1295 -msgid "Set *callback* as the handler for the *signum* signal." +#: library/asyncio-eventloop.rst:1336 +msgid "" +"Set *callback* as the handler for the *signum* signal, passing *args* as " +"positional arguments." msgstr "" -#: library/asyncio-eventloop.rst:1297 +#: library/asyncio-eventloop.rst:1339 msgid "" "The callback will be invoked by *loop*, along with other queued callbacks " "and runnable coroutines of that event loop. Unlike signal handlers " @@ -1576,40 +1637,42 @@ msgid "" "function is allowed to interact with the event loop." msgstr "" -#: library/asyncio-eventloop.rst:1302 +#: library/asyncio-eventloop.rst:1344 msgid "" "Raise :exc:`ValueError` if the signal number is invalid or uncatchable. " "Raise :exc:`RuntimeError` if there is a problem setting up the handler." msgstr "" -#: library/asyncio-eventloop.rst:1308 +#: library/asyncio-eventloop.rst:1350 msgid "" "Like :func:`signal.signal`, this function must be invoked in the main thread." msgstr "" -#: library/asyncio-eventloop.rst:1313 +#: library/asyncio-eventloop.rst:1355 msgid "Remove the handler for the *sig* signal." msgstr "" -#: library/asyncio-eventloop.rst:1315 +#: library/asyncio-eventloop.rst:1357 msgid "" "Return ``True`` if the signal handler was removed, or ``False`` if no " "handler was set for the given signal." msgstr "" -#: library/asyncio-eventloop.rst:1322 +#: library/asyncio-eventloop.rst:1364 msgid "The :mod:`signal` module." msgstr "" -#: library/asyncio-eventloop.rst:1326 +#: library/asyncio-eventloop.rst:1368 msgid "Executing code in thread or process pools" msgstr "" -#: library/asyncio-eventloop.rst:1330 -msgid "Arrange for *func* to be called in the specified executor." +#: library/asyncio-eventloop.rst:1372 +msgid "" +"Arrange for *func* to be called in the specified executor passing *args* as " +"positional arguments." msgstr "" -#: library/asyncio-eventloop.rst:1332 +#: library/asyncio-eventloop.rst:1375 msgid "" "The *executor* argument should be an :class:`concurrent.futures.Executor` " "instance. The default executor is used if *executor* is ``None``. The " @@ -1618,7 +1681,7 @@ msgid "" "and used by :func:`run_in_executor` if needed." msgstr "" -#: library/asyncio-eventloop.rst:1340 +#: library/asyncio-eventloop.rst:1383 msgid "" "import asyncio\n" "import concurrent.futures\n" @@ -1661,7 +1724,7 @@ msgid "" " asyncio.run(main())" msgstr "" -#: library/asyncio-eventloop.rst:1380 +#: library/asyncio-eventloop.rst:1423 msgid "" "Note that the entry point guard (``if __name__ == '__main__'``) is required " "for option 3 due to the peculiarities of :mod:`multiprocessing`, which is " @@ -1669,17 +1732,17 @@ msgid "" "importing of main module `." msgstr "" -#: library/asyncio-eventloop.rst:1385 +#: library/asyncio-eventloop.rst:1428 msgid "This method returns a :class:`asyncio.Future` object." msgstr "" -#: library/asyncio-eventloop.rst:1387 +#: library/asyncio-eventloop.rst:1430 msgid "" "Use :func:`functools.partial` :ref:`to pass keyword arguments ` to *func*." msgstr "" -#: library/asyncio-eventloop.rst:1390 +#: library/asyncio-eventloop.rst:1433 msgid "" ":meth:`loop.run_in_executor` no longer configures the ``max_workers`` of the " "thread pool executor it creates, instead leaving it up to the thread pool " @@ -1687,32 +1750,32 @@ msgid "" "default." msgstr "" -#: library/asyncio-eventloop.rst:1399 +#: library/asyncio-eventloop.rst:1442 msgid "" "Set *executor* as the default executor used by :meth:`run_in_executor`. " "*executor* must be an instance of :class:`~concurrent.futures." "ThreadPoolExecutor`." msgstr "" -#: library/asyncio-eventloop.rst:1403 +#: library/asyncio-eventloop.rst:1446 msgid "" "*executor* must be an instance of :class:`~concurrent.futures." "ThreadPoolExecutor`." msgstr "" -#: library/asyncio-eventloop.rst:1409 -msgid "Error Handling API" +#: library/asyncio-eventloop.rst:1452 +msgid "Error handling API" msgstr "" -#: library/asyncio-eventloop.rst:1411 +#: library/asyncio-eventloop.rst:1454 msgid "Allows customizing how exceptions are handled in the event loop." msgstr "" -#: library/asyncio-eventloop.rst:1415 +#: library/asyncio-eventloop.rst:1458 msgid "Set *handler* as the new event loop exception handler." msgstr "" -#: library/asyncio-eventloop.rst:1417 +#: library/asyncio-eventloop.rst:1460 msgid "" "If *handler* is ``None``, the default exception handler will be set. " "Otherwise, *handler* must be a callable with the signature matching ``(loop, " @@ -1721,190 +1784,190 @@ msgid "" "(see :meth:`call_exception_handler` documentation for details about context)." msgstr "" -#: library/asyncio-eventloop.rst:1425 +#: library/asyncio-eventloop.rst:1468 msgid "" "If the handler is called on behalf of a :class:`~asyncio.Task` or :class:" "`~asyncio.Handle`, it is run in the :class:`contextvars.Context` of that " "task or callback handle." msgstr "" -#: library/asyncio-eventloop.rst:1431 +#: library/asyncio-eventloop.rst:1474 msgid "" "The handler may be called in the :class:`~contextvars.Context` of the task " "or handle where the exception originated." msgstr "" -#: library/asyncio-eventloop.rst:1436 +#: library/asyncio-eventloop.rst:1479 msgid "" "Return the current exception handler, or ``None`` if no custom exception " "handler was set." msgstr "" -#: library/asyncio-eventloop.rst:1443 +#: library/asyncio-eventloop.rst:1486 msgid "Default exception handler." msgstr "" -#: library/asyncio-eventloop.rst:1445 +#: library/asyncio-eventloop.rst:1488 msgid "" "This is called when an exception occurs and no exception handler is set. " "This can be called by a custom exception handler that wants to defer to the " "default handler behavior." msgstr "" -#: library/asyncio-eventloop.rst:1449 +#: library/asyncio-eventloop.rst:1492 msgid "" "*context* parameter has the same meaning as in :meth:" "`call_exception_handler`." msgstr "" -#: library/asyncio-eventloop.rst:1454 +#: library/asyncio-eventloop.rst:1497 msgid "Call the current event loop exception handler." msgstr "" -#: library/asyncio-eventloop.rst:1456 +#: library/asyncio-eventloop.rst:1499 msgid "" "*context* is a ``dict`` object containing the following keys (new keys may " "be introduced in future Python versions):" msgstr "" -#: library/asyncio-eventloop.rst:1459 +#: library/asyncio-eventloop.rst:1502 msgid "'message': Error message;" msgstr "" -#: library/asyncio-eventloop.rst:1460 +#: library/asyncio-eventloop.rst:1503 msgid "'exception' (optional): Exception object;" msgstr "" -#: library/asyncio-eventloop.rst:1461 +#: library/asyncio-eventloop.rst:1504 msgid "'future' (optional): :class:`asyncio.Future` instance;" msgstr "" -#: library/asyncio-eventloop.rst:1462 +#: library/asyncio-eventloop.rst:1505 msgid "'task' (optional): :class:`asyncio.Task` instance;" msgstr "" -#: library/asyncio-eventloop.rst:1463 +#: library/asyncio-eventloop.rst:1506 msgid "'handle' (optional): :class:`asyncio.Handle` instance;" msgstr "" -#: library/asyncio-eventloop.rst:1464 +#: library/asyncio-eventloop.rst:1507 msgid "'protocol' (optional): :ref:`Protocol ` instance;" msgstr "" -#: library/asyncio-eventloop.rst:1465 +#: library/asyncio-eventloop.rst:1508 msgid "'transport' (optional): :ref:`Transport ` instance;" msgstr "" -#: library/asyncio-eventloop.rst:1466 +#: library/asyncio-eventloop.rst:1509 msgid "'socket' (optional): :class:`socket.socket` instance;" msgstr "" -#: library/asyncio-eventloop.rst:1467 +#: library/asyncio-eventloop.rst:1510 msgid "'source_traceback' (optional): Traceback of the source;" msgstr "" -#: library/asyncio-eventloop.rst:1468 +#: library/asyncio-eventloop.rst:1511 msgid "'handle_traceback' (optional): Traceback of the handle;" msgstr "" -#: library/asyncio-eventloop.rst:1469 +#: library/asyncio-eventloop.rst:1512 msgid "'asyncgen' (optional): Asynchronous generator that caused" msgstr "" -#: library/asyncio-eventloop.rst:1470 +#: library/asyncio-eventloop.rst:1513 msgid "the exception." msgstr "" -#: library/asyncio-eventloop.rst:1474 +#: library/asyncio-eventloop.rst:1517 msgid "" "This method should not be overloaded in subclassed event loops. For custom " "exception handling, use the :meth:`set_exception_handler` method." msgstr "" -#: library/asyncio-eventloop.rst:1479 +#: library/asyncio-eventloop.rst:1522 msgid "Enabling debug mode" msgstr "" -#: library/asyncio-eventloop.rst:1483 +#: library/asyncio-eventloop.rst:1526 msgid "Get the debug mode (:class:`bool`) of the event loop." msgstr "" -#: library/asyncio-eventloop.rst:1485 +#: library/asyncio-eventloop.rst:1528 msgid "" "The default value is ``True`` if the environment variable :envvar:" "`PYTHONASYNCIODEBUG` is set to a non-empty string, ``False`` otherwise." msgstr "" -#: library/asyncio-eventloop.rst:1491 +#: library/asyncio-eventloop.rst:1534 msgid "Set the debug mode of the event loop." msgstr "" -#: library/asyncio-eventloop.rst:1495 +#: library/asyncio-eventloop.rst:1538 msgid "" "The new :ref:`Python Development Mode ` can now also be used to " "enable the debug mode." msgstr "" -#: library/asyncio-eventloop.rst:1500 +#: library/asyncio-eventloop.rst:1543 msgid "" "This attribute can be used to set the minimum execution duration in seconds " "that is considered \"slow\". When debug mode is enabled, \"slow\" callbacks " "are logged." msgstr "" -#: library/asyncio-eventloop.rst:1504 +#: library/asyncio-eventloop.rst:1547 msgid "Default value is 100 milliseconds." msgstr "" -#: library/asyncio-eventloop.rst:1508 +#: library/asyncio-eventloop.rst:1551 msgid "The :ref:`debug mode of asyncio `." msgstr "" -#: library/asyncio-eventloop.rst:1512 -msgid "Running Subprocesses" +#: library/asyncio-eventloop.rst:1555 +msgid "Running subprocesses" msgstr "" -#: library/asyncio-eventloop.rst:1514 +#: library/asyncio-eventloop.rst:1557 msgid "" "Methods described in this subsections are low-level. In regular async/await " "code consider using the high-level :func:`asyncio.create_subprocess_shell` " "and :func:`asyncio.create_subprocess_exec` convenience functions instead." msgstr "" -#: library/asyncio-eventloop.rst:1521 +#: library/asyncio-eventloop.rst:1564 msgid "" "On Windows, the default event loop :class:`ProactorEventLoop` supports " "subprocesses, whereas :class:`SelectorEventLoop` does not. See :ref:" "`Subprocess Support on Windows ` for details." msgstr "" -#: library/asyncio-eventloop.rst:1533 +#: library/asyncio-eventloop.rst:1576 msgid "" "Create a subprocess from one or more string arguments specified by *args*." msgstr "" -#: library/asyncio-eventloop.rst:1536 +#: library/asyncio-eventloop.rst:1579 msgid "*args* must be a list of strings represented by:" msgstr "" -#: library/asyncio-eventloop.rst:1538 +#: library/asyncio-eventloop.rst:1581 msgid ":class:`str`;" msgstr "" -#: library/asyncio-eventloop.rst:1539 +#: library/asyncio-eventloop.rst:1582 msgid "" "or :class:`bytes`, encoded to the :ref:`filesystem encoding `." msgstr "" -#: library/asyncio-eventloop.rst:1542 +#: library/asyncio-eventloop.rst:1585 msgid "" "The first string specifies the program executable, and the remaining strings " "specify the arguments. Together, string arguments form the ``argv`` of the " "program." msgstr "" -#: library/asyncio-eventloop.rst:1546 +#: library/asyncio-eventloop.rst:1589 msgid "" "This is similar to the standard library :class:`subprocess.Popen` class " "called with ``shell=False`` and the list of strings passed as the first " @@ -1912,81 +1975,81 @@ msgid "" "which is list of strings, *subprocess_exec* takes multiple string arguments." msgstr "" -#: library/asyncio-eventloop.rst:1552 +#: library/asyncio-eventloop.rst:1595 msgid "" "The *protocol_factory* must be a callable returning a subclass of the :class:" "`asyncio.SubprocessProtocol` class." msgstr "" -#: library/asyncio-eventloop.rst:1555 +#: library/asyncio-eventloop.rst:1598 msgid "Other parameters:" msgstr "" -#: library/asyncio-eventloop.rst:1557 +#: library/asyncio-eventloop.rst:1600 msgid "*stdin* can be any of these:" msgstr "" -#: library/asyncio-eventloop.rst:1559 library/asyncio-eventloop.rst:1570 -#: library/asyncio-eventloop.rst:1580 +#: library/asyncio-eventloop.rst:1602 library/asyncio-eventloop.rst:1613 +#: library/asyncio-eventloop.rst:1623 msgid "a file-like object" msgstr "" -#: library/asyncio-eventloop.rst:1560 +#: library/asyncio-eventloop.rst:1603 msgid "" "an existing file descriptor (a positive integer), for example those created " "with :meth:`os.pipe`" msgstr "" -#: library/asyncio-eventloop.rst:1561 library/asyncio-eventloop.rst:1571 -#: library/asyncio-eventloop.rst:1581 +#: library/asyncio-eventloop.rst:1604 library/asyncio-eventloop.rst:1614 +#: library/asyncio-eventloop.rst:1624 msgid "" "the :const:`subprocess.PIPE` constant (default) which will create a new pipe " "and connect it," msgstr "" -#: library/asyncio-eventloop.rst:1563 library/asyncio-eventloop.rst:1573 -#: library/asyncio-eventloop.rst:1583 +#: library/asyncio-eventloop.rst:1606 library/asyncio-eventloop.rst:1616 +#: library/asyncio-eventloop.rst:1626 msgid "" "the value ``None`` which will make the subprocess inherit the file " "descriptor from this process" msgstr "" -#: library/asyncio-eventloop.rst:1565 library/asyncio-eventloop.rst:1575 -#: library/asyncio-eventloop.rst:1585 +#: library/asyncio-eventloop.rst:1608 library/asyncio-eventloop.rst:1618 +#: library/asyncio-eventloop.rst:1628 msgid "" "the :const:`subprocess.DEVNULL` constant which indicates that the special :" "data:`os.devnull` file will be used" msgstr "" -#: library/asyncio-eventloop.rst:1568 +#: library/asyncio-eventloop.rst:1611 msgid "*stdout* can be any of these:" msgstr "" -#: library/asyncio-eventloop.rst:1578 +#: library/asyncio-eventloop.rst:1621 msgid "*stderr* can be any of these:" msgstr "" -#: library/asyncio-eventloop.rst:1587 +#: library/asyncio-eventloop.rst:1630 msgid "" "the :const:`subprocess.STDOUT` constant which will connect the standard " "error stream to the process' standard output stream" msgstr "" -#: library/asyncio-eventloop.rst:1590 +#: library/asyncio-eventloop.rst:1633 msgid "" "All other keyword arguments are passed to :class:`subprocess.Popen` without " "interpretation, except for *bufsize*, *universal_newlines*, *shell*, *text*, " "*encoding* and *errors*, which should not be specified at all." msgstr "" -#: library/asyncio-eventloop.rst:1595 +#: library/asyncio-eventloop.rst:1638 msgid "" "The ``asyncio`` subprocess API does not support decoding the streams as " "text. :func:`bytes.decode` can be used to convert the bytes returned from " "the stream to text." msgstr "" -#: library/asyncio-eventloop.rst:1599 +#: library/asyncio-eventloop.rst:1642 msgid "" "If a file-like object passed as *stdin*, *stdout* or *stderr* represents a " "pipe, then the other side of this pipe should be registered with :meth:" @@ -1994,58 +2057,58 @@ msgid "" "the event loop." msgstr "" -#: library/asyncio-eventloop.rst:1604 +#: library/asyncio-eventloop.rst:1647 msgid "" "See the constructor of the :class:`subprocess.Popen` class for documentation " "on other arguments." msgstr "" -#: library/asyncio-eventloop.rst:1607 +#: library/asyncio-eventloop.rst:1650 msgid "" "Returns a pair of ``(transport, protocol)``, where *transport* conforms to " "the :class:`asyncio.SubprocessTransport` base class and *protocol* is an " "object instantiated by the *protocol_factory*." msgstr "" -#: library/asyncio-eventloop.rst:1611 library/asyncio-eventloop.rst:1637 +#: library/asyncio-eventloop.rst:1654 library/asyncio-eventloop.rst:1680 msgid "" "If the transport is closed or is garbage collected, the child process is " "killed if it is still running." msgstr "" -#: library/asyncio-eventloop.rst:1619 +#: library/asyncio-eventloop.rst:1662 msgid "" "Create a subprocess from *cmd*, which can be a :class:`str` or a :class:" "`bytes` string encoded to the :ref:`filesystem encoding `, using the platform's \"shell\" syntax." msgstr "" -#: library/asyncio-eventloop.rst:1624 +#: library/asyncio-eventloop.rst:1667 msgid "" "This is similar to the standard library :class:`subprocess.Popen` class " "called with ``shell=True``." msgstr "" -#: library/asyncio-eventloop.rst:1627 +#: library/asyncio-eventloop.rst:1670 msgid "" "The *protocol_factory* must be a callable returning a subclass of the :class:" "`SubprocessProtocol` class." msgstr "" -#: library/asyncio-eventloop.rst:1630 +#: library/asyncio-eventloop.rst:1673 msgid "" "See :meth:`~loop.subprocess_exec` for more details about the remaining " "arguments." msgstr "" -#: library/asyncio-eventloop.rst:1633 +#: library/asyncio-eventloop.rst:1676 msgid "" "Returns a pair of ``(transport, protocol)``, where *transport* conforms to " "the :class:`SubprocessTransport` base class and *protocol* is an object " "instantiated by the *protocol_factory*." msgstr "" -#: library/asyncio-eventloop.rst:1641 +#: library/asyncio-eventloop.rst:1684 msgid "" "It is the application's responsibility to ensure that all whitespace and " "special characters are quoted appropriately to avoid `shell injection " @@ -2055,74 +2118,74 @@ msgid "" "used to construct shell commands." msgstr "" -#: library/asyncio-eventloop.rst:1650 -msgid "Callback Handles" +#: library/asyncio-eventloop.rst:1693 +msgid "Callback handles" msgstr "" -#: library/asyncio-eventloop.rst:1654 +#: library/asyncio-eventloop.rst:1697 msgid "" "A callback wrapper object returned by :meth:`loop.call_soon`, :meth:`loop." "call_soon_threadsafe`." msgstr "" -#: library/asyncio-eventloop.rst:1659 +#: library/asyncio-eventloop.rst:1702 msgid "" "Return the :class:`contextvars.Context` object associated with the handle." msgstr "" -#: library/asyncio-eventloop.rst:1666 +#: library/asyncio-eventloop.rst:1709 msgid "" "Cancel the callback. If the callback has already been canceled or executed, " "this method has no effect." msgstr "" -#: library/asyncio-eventloop.rst:1671 +#: library/asyncio-eventloop.rst:1714 msgid "Return ``True`` if the callback was cancelled." msgstr "" -#: library/asyncio-eventloop.rst:1677 +#: library/asyncio-eventloop.rst:1720 msgid "" "A callback wrapper object returned by :meth:`loop.call_later`, and :meth:" "`loop.call_at`." msgstr "" -#: library/asyncio-eventloop.rst:1680 +#: library/asyncio-eventloop.rst:1723 msgid "This class is a subclass of :class:`Handle`." msgstr "" -#: library/asyncio-eventloop.rst:1684 +#: library/asyncio-eventloop.rst:1727 msgid "Return a scheduled callback time as :class:`float` seconds." msgstr "" -#: library/asyncio-eventloop.rst:1686 +#: library/asyncio-eventloop.rst:1729 msgid "" "The time is an absolute timestamp, using the same time reference as :meth:" "`loop.time`." msgstr "" -#: library/asyncio-eventloop.rst:1693 -msgid "Server Objects" +#: library/asyncio-eventloop.rst:1736 +msgid "Server objects" msgstr "" -#: library/asyncio-eventloop.rst:1695 +#: library/asyncio-eventloop.rst:1738 msgid "" "Server objects are created by :meth:`loop.create_server`, :meth:`loop." "create_unix_server`, :func:`start_server`, and :func:`start_unix_server` " "functions." msgstr "" -#: library/asyncio-eventloop.rst:1699 +#: library/asyncio-eventloop.rst:1742 msgid "Do not instantiate the :class:`Server` class directly." msgstr "" -#: library/asyncio-eventloop.rst:1703 +#: library/asyncio-eventloop.rst:1746 msgid "" "*Server* objects are asynchronous context managers. When used in an ``async " "with`` statement, it's guaranteed that the Server object is closed and not " "accepting new connections when the ``async with`` statement is completed::" msgstr "" -#: library/asyncio-eventloop.rst:1708 +#: library/asyncio-eventloop.rst:1751 msgid "" "srv = await loop.create_server(...)\n" "\n" @@ -2132,81 +2195,81 @@ msgid "" "# At this point, srv is closed and no longer accepts new connections." msgstr "" -#: library/asyncio-eventloop.rst:1716 +#: library/asyncio-eventloop.rst:1759 msgid "Server object is an asynchronous context manager since Python 3.7." msgstr "" -#: library/asyncio-eventloop.rst:1719 +#: library/asyncio-eventloop.rst:1762 msgid "" "This class was exposed publicly as ``asyncio.Server`` in Python 3.9.11, " "3.10.3 and 3.11." msgstr "" -#: library/asyncio-eventloop.rst:1724 +#: library/asyncio-eventloop.rst:1767 msgid "" "Stop serving: close listening sockets and set the :attr:`sockets` attribute " "to ``None``." msgstr "" -#: library/asyncio-eventloop.rst:1727 +#: library/asyncio-eventloop.rst:1770 msgid "" "The sockets that represent existing incoming client connections are left " "open." msgstr "" -#: library/asyncio-eventloop.rst:1730 +#: library/asyncio-eventloop.rst:1773 msgid "" "The server is closed asynchronously; use the :meth:`wait_closed` coroutine " "to wait until the server is closed (and no more connections are active)." msgstr "" -#: library/asyncio-eventloop.rst:1736 +#: library/asyncio-eventloop.rst:1779 msgid "Close all existing incoming client connections." msgstr "" -#: library/asyncio-eventloop.rst:1738 +#: library/asyncio-eventloop.rst:1781 msgid "" "Calls :meth:`~asyncio.BaseTransport.close` on all associated transports." msgstr "" -#: library/asyncio-eventloop.rst:1741 +#: library/asyncio-eventloop.rst:1784 msgid "" ":meth:`close` should be called before :meth:`close_clients` when closing the " "server to avoid races with new clients connecting." msgstr "" -#: library/asyncio-eventloop.rst:1748 +#: library/asyncio-eventloop.rst:1791 msgid "" "Close all existing incoming client connections immediately, without waiting " "for pending operations to complete." msgstr "" -#: library/asyncio-eventloop.rst:1751 +#: library/asyncio-eventloop.rst:1794 msgid "" "Calls :meth:`~asyncio.WriteTransport.abort` on all associated transports." msgstr "" -#: library/asyncio-eventloop.rst:1754 +#: library/asyncio-eventloop.rst:1797 msgid "" ":meth:`close` should be called before :meth:`abort_clients` when closing the " "server to avoid races with new clients connecting." msgstr "" -#: library/asyncio-eventloop.rst:1761 +#: library/asyncio-eventloop.rst:1804 msgid "Return the event loop associated with the server object." msgstr "" -#: library/asyncio-eventloop.rst:1768 +#: library/asyncio-eventloop.rst:1811 msgid "Start accepting connections." msgstr "" -#: library/asyncio-eventloop.rst:1770 +#: library/asyncio-eventloop.rst:1813 msgid "" "This method is idempotent, so it can be called when the server is already " "serving." msgstr "" -#: library/asyncio-eventloop.rst:1773 +#: library/asyncio-eventloop.rst:1816 msgid "" "The *start_serving* keyword-only parameter to :meth:`loop.create_server` " "and :meth:`asyncio.start_server` allows creating a Server object that is not " @@ -2215,19 +2278,19 @@ msgid "" "accepting connections." msgstr "" -#: library/asyncio-eventloop.rst:1785 +#: library/asyncio-eventloop.rst:1828 msgid "" "Start accepting connections until the coroutine is cancelled. Cancellation " "of ``serve_forever`` task causes the server to be closed." msgstr "" -#: library/asyncio-eventloop.rst:1789 +#: library/asyncio-eventloop.rst:1832 msgid "" "This method can be called if the server is already accepting connections. " "Only one ``serve_forever`` task can exist per one *Server* object." msgstr "" -#: library/asyncio-eventloop.rst:1795 +#: library/asyncio-eventloop.rst:1838 msgid "" "async def client_connected(reader, writer):\n" " # Communicate with the client with\n" @@ -2242,56 +2305,56 @@ msgid "" "asyncio.run(main('127.0.0.1', 0))" msgstr "" -#: library/asyncio-eventloop.rst:1811 +#: library/asyncio-eventloop.rst:1854 msgid "Return ``True`` if the server is accepting new connections." msgstr "" -#: library/asyncio-eventloop.rst:1818 +#: library/asyncio-eventloop.rst:1861 msgid "" "Wait until the :meth:`close` method completes and all active connections " "have finished." msgstr "" -#: library/asyncio-eventloop.rst:1823 +#: library/asyncio-eventloop.rst:1866 msgid "" "List of socket-like objects, ``asyncio.trsock.TransportSocket``, which the " "server is listening on." msgstr "" -#: library/asyncio-eventloop.rst:1826 +#: library/asyncio-eventloop.rst:1869 msgid "" "Prior to Python 3.7 ``Server.sockets`` used to return an internal list of " "server sockets directly. In 3.7 a copy of that list is returned." msgstr "" -#: library/asyncio-eventloop.rst:1836 -msgid "Event Loop Implementations" +#: library/asyncio-eventloop.rst:1879 +msgid "Event loop implementations" msgstr "" -#: library/asyncio-eventloop.rst:1838 +#: library/asyncio-eventloop.rst:1881 msgid "" "asyncio ships with two different event loop implementations: :class:" "`SelectorEventLoop` and :class:`ProactorEventLoop`." msgstr "" -#: library/asyncio-eventloop.rst:1841 +#: library/asyncio-eventloop.rst:1884 msgid "By default asyncio is configured to use :class:`EventLoop`." msgstr "" -#: library/asyncio-eventloop.rst:1846 +#: library/asyncio-eventloop.rst:1889 msgid "" "A subclass of :class:`AbstractEventLoop` based on the :mod:`selectors` " "module." msgstr "" -#: library/asyncio-eventloop.rst:1849 +#: library/asyncio-eventloop.rst:1892 msgid "" "Uses the most efficient *selector* available for the given platform. It is " "also possible to manually configure the exact selector implementation to be " "used::" msgstr "" -#: library/asyncio-eventloop.rst:1853 +#: library/asyncio-eventloop.rst:1896 msgid "" "import asyncio\n" "import selectors\n" @@ -2304,45 +2367,45 @@ msgid "" "asyncio.set_event_loop_policy(MyPolicy())" msgstr "" -#: library/asyncio-eventloop.rst:1869 +#: library/asyncio-eventloop.rst:1912 msgid "" "A subclass of :class:`AbstractEventLoop` for Windows that uses \"I/O " "Completion Ports\" (IOCP)." msgstr "" -#: library/asyncio-eventloop.rst:1875 +#: library/asyncio-eventloop.rst:1918 msgid "" "`MSDN documentation on I/O Completion Ports `_." msgstr "" -#: library/asyncio-eventloop.rst:1880 +#: library/asyncio-eventloop.rst:1923 msgid "" "An alias to the most efficient available subclass of :class:" "`AbstractEventLoop` for the given platform." msgstr "" -#: library/asyncio-eventloop.rst:1883 +#: library/asyncio-eventloop.rst:1926 msgid "" "It is an alias to :class:`SelectorEventLoop` on Unix and :class:" "`ProactorEventLoop` on Windows." msgstr "" -#: library/asyncio-eventloop.rst:1889 +#: library/asyncio-eventloop.rst:1932 msgid "Abstract base class for asyncio-compliant event loops." msgstr "" -#: library/asyncio-eventloop.rst:1891 +#: library/asyncio-eventloop.rst:1934 msgid "" "The :ref:`asyncio-event-loop-methods` section lists all methods that an " "alternative implementation of ``AbstractEventLoop`` should have defined." msgstr "" -#: library/asyncio-eventloop.rst:1897 +#: library/asyncio-eventloop.rst:1940 msgid "Examples" msgstr "" -#: library/asyncio-eventloop.rst:1899 +#: library/asyncio-eventloop.rst:1942 msgid "" "Note that all examples in this section **purposefully** show how to use the " "low-level event loop APIs, such as :meth:`loop.run_forever` and :meth:`loop." @@ -2350,17 +2413,17 @@ msgid "" "consider using the high-level functions like :func:`asyncio.run`." msgstr "" -#: library/asyncio-eventloop.rst:1909 +#: library/asyncio-eventloop.rst:1952 msgid "Hello World with call_soon()" msgstr "" -#: library/asyncio-eventloop.rst:1911 +#: library/asyncio-eventloop.rst:1954 msgid "" "An example using the :meth:`loop.call_soon` method to schedule a callback. " "The callback displays ``\"Hello World\"`` and then stops the event loop::" msgstr "" -#: library/asyncio-eventloop.rst:1915 +#: library/asyncio-eventloop.rst:1958 msgid "" "import asyncio\n" "\n" @@ -2381,30 +2444,30 @@ msgid "" " loop.close()" msgstr "" -#: library/asyncio-eventloop.rst:1935 +#: library/asyncio-eventloop.rst:1978 msgid "" "A similar :ref:`Hello World ` example created with a coroutine " "and the :func:`run` function." msgstr "" -#: library/asyncio-eventloop.rst:1942 +#: library/asyncio-eventloop.rst:1985 msgid "Display the current date with call_later()" msgstr "" -#: library/asyncio-eventloop.rst:1944 +#: library/asyncio-eventloop.rst:1987 msgid "" "An example of a callback displaying the current date every second. The " "callback uses the :meth:`loop.call_later` method to reschedule itself after " "5 seconds, and then stops the event loop::" msgstr "" -#: library/asyncio-eventloop.rst:1948 +#: library/asyncio-eventloop.rst:1991 msgid "" "import asyncio\n" -"import datetime\n" +"import datetime as dt\n" "\n" "def display_date(end_time, loop):\n" -" print(datetime.datetime.now())\n" +" print(dt.datetime.now())\n" " if (loop.time() + 1.0) < end_time:\n" " loop.call_later(1, display_date, end_time, loop)\n" " else:\n" @@ -2423,23 +2486,23 @@ msgid "" " loop.close()" msgstr "" -#: library/asyncio-eventloop.rst:1972 +#: library/asyncio-eventloop.rst:2015 msgid "" "A similar :ref:`current date ` example created with a " "coroutine and the :func:`run` function." msgstr "" -#: library/asyncio-eventloop.rst:1979 +#: library/asyncio-eventloop.rst:2022 msgid "Watch a file descriptor for read events" msgstr "" -#: library/asyncio-eventloop.rst:1981 +#: library/asyncio-eventloop.rst:2024 msgid "" "Wait until a file descriptor received some data using the :meth:`loop." "add_reader` method and then close the event loop::" msgstr "" -#: library/asyncio-eventloop.rst:1984 +#: library/asyncio-eventloop.rst:2027 msgid "" "import asyncio\n" "from socket import socketpair\n" @@ -2475,33 +2538,33 @@ msgid "" " loop.close()" msgstr "" -#: library/asyncio-eventloop.rst:2019 +#: library/asyncio-eventloop.rst:2062 msgid "" "A similar :ref:`example ` using " "transports, protocols, and the :meth:`loop.create_connection` method." msgstr "" -#: library/asyncio-eventloop.rst:2023 +#: library/asyncio-eventloop.rst:2066 msgid "" "Another similar :ref:`example ` " "using the high-level :func:`asyncio.open_connection` function and streams." msgstr "" -#: library/asyncio-eventloop.rst:2031 +#: library/asyncio-eventloop.rst:2074 msgid "Set signal handlers for SIGINT and SIGTERM" msgstr "" -#: library/asyncio-eventloop.rst:2033 -msgid "(This ``signals`` example only works on Unix.)" +#: library/asyncio-eventloop.rst:2076 +msgid "(This ``signal`` example only works on Unix.)" msgstr "" -#: library/asyncio-eventloop.rst:2035 +#: library/asyncio-eventloop.rst:2078 msgid "" "Register handlers for signals :const:`~signal.SIGINT` and :const:`~signal." "SIGTERM` using the :meth:`loop.add_signal_handler` method::" msgstr "" -#: library/asyncio-eventloop.rst:2038 +#: library/asyncio-eventloop.rst:2081 msgid "" "import asyncio\n" "import functools\n" diff --git a/library/asyncio-exceptions.po b/library/asyncio-exceptions.po index 10ea59fe8..ee3526be4 100644 --- a/library/asyncio-exceptions.po +++ b/library/asyncio-exceptions.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/asyncio-extending.po b/library/asyncio-extending.po index 4e7edc805..b922e4985 100644 --- a/library/asyncio-extending.po +++ b/library/asyncio-extending.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/asyncio-future.po b/library/asyncio-future.po index a41a880e3..3bbb50b63 100644 --- a/library/asyncio-future.po +++ b/library/asyncio-future.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -147,174 +147,184 @@ msgid "" msgstr "" #: library/asyncio-future.rst:103 +msgid "Futures are :ref:`generic ` over the type of their results." +msgstr "" + +#: library/asyncio-future.rst:105 msgid "Added support for the :mod:`contextvars` module." msgstr "" -#: library/asyncio-future.rst:106 +#: library/asyncio-future.rst:108 msgid "" "Deprecation warning is emitted if *loop* is not specified and there is no " "running event loop." msgstr "" -#: library/asyncio-future.rst:112 +#: library/asyncio-future.rst:114 msgid "Return the result of the Future." msgstr "" -#: library/asyncio-future.rst:114 +#: library/asyncio-future.rst:116 msgid "" "If the Future is *done* and has a result set by the :meth:`set_result` " "method, the result value is returned." msgstr "" -#: library/asyncio-future.rst:117 +#: library/asyncio-future.rst:119 msgid "" "If the Future is *done* and has an exception set by the :meth:" "`set_exception` method, this method raises the exception." msgstr "" -#: library/asyncio-future.rst:208 +#: library/asyncio-future.rst:214 msgid "" "If the Future has been *cancelled*, this method raises a :exc:" "`CancelledError` exception." msgstr "" -#: library/asyncio-future.rst:123 +#: library/asyncio-future.rst:125 msgid "" "If the Future's result isn't yet available, this method raises an :exc:" "`InvalidStateError` exception." msgstr "" -#: library/asyncio-future.rst:128 +#: library/asyncio-future.rst:130 msgid "Mark the Future as *done* and set its result." msgstr "" -#: library/asyncio-future.rst:137 +#: library/asyncio-future.rst:139 msgid "" "Raises an :exc:`InvalidStateError` error if the Future is already *done*." msgstr "" -#: library/asyncio-future.rst:135 +#: library/asyncio-future.rst:137 msgid "Mark the Future as *done* and set an exception." msgstr "" -#: library/asyncio-future.rst:142 +#: library/asyncio-future.rst:144 msgid "Return ``True`` if the Future is *done*." msgstr "" -#: library/asyncio-future.rst:144 +#: library/asyncio-future.rst:146 msgid "" "A Future is *done* if it was *cancelled* or if it has a result or an " "exception set with :meth:`set_result` or :meth:`set_exception` calls." msgstr "" -#: library/asyncio-future.rst:150 +#: library/asyncio-future.rst:152 msgid "Return ``True`` if the Future was *cancelled*." msgstr "" -#: library/asyncio-future.rst:152 +#: library/asyncio-future.rst:154 msgid "" "The method is usually used to check if a Future is not *cancelled* before " "setting a result or an exception for it::" msgstr "" -#: library/asyncio-future.rst:155 +#: library/asyncio-future.rst:157 msgid "" "if not fut.cancelled():\n" " fut.set_result(42)" msgstr "" -#: library/asyncio-future.rst:160 +#: library/asyncio-future.rst:162 msgid "Add a callback to be run when the Future is *done*." msgstr "" -#: library/asyncio-future.rst:162 +#: library/asyncio-future.rst:164 msgid "The *callback* is called with the Future object as its only argument." msgstr "" -#: library/asyncio-future.rst:165 +#: library/asyncio-future.rst:167 msgid "" "If the Future is already *done* when this method is called, the callback is " "scheduled with :meth:`loop.call_soon`." msgstr "" -#: library/asyncio-future.rst:168 +#: library/asyncio-future.rst:170 msgid "" "An optional keyword-only *context* argument allows specifying a custom :" "class:`contextvars.Context` for the *callback* to run in. The current " "context is used when no *context* is provided." msgstr "" -#: library/asyncio-future.rst:172 +#: library/asyncio-future.rst:174 msgid "" ":func:`functools.partial` can be used to pass parameters to the callback, e." "g.::" msgstr "" -#: library/asyncio-future.rst:175 +#: library/asyncio-future.rst:177 msgid "" "# Call 'print(\"Future:\", fut)' when \"fut\" is done.\n" "fut.add_done_callback(\n" " functools.partial(print, \"Future:\"))" msgstr "" -#: library/asyncio-future.rst:179 +#: library/asyncio-future.rst:181 msgid "" "The *context* keyword-only parameter was added. See :pep:`567` for more " "details." msgstr "" -#: library/asyncio-future.rst:185 +#: library/asyncio-future.rst:187 msgid "Remove *callback* from the callbacks list." msgstr "" -#: library/asyncio-future.rst:187 +#: library/asyncio-future.rst:189 msgid "" "Returns the number of callbacks removed, which is typically 1, unless a " "callback was added more than once." msgstr "" -#: library/asyncio-future.rst:192 +#: library/asyncio-future.rst:194 msgid "Cancel the Future and schedule callbacks." msgstr "" -#: library/asyncio-future.rst:194 +#: library/asyncio-future.rst:196 msgid "" "If the Future is already *done* or *cancelled*, return ``False``. Otherwise, " "change the Future's state to *cancelled*, schedule the callbacks, and return " "``True``." msgstr "" -#: library/asyncio-future.rst:198 +#: library/asyncio-future.rst:200 +msgid "" +"The optional string argument *msg* is passed as the argument to the :exc:" +"`CancelledError` exception raised when a cancelled Future is awaited." +msgstr "" + +#: library/asyncio-future.rst:204 msgid "Added the *msg* parameter." msgstr "" -#: library/asyncio-future.rst:203 +#: library/asyncio-future.rst:209 msgid "Return the exception that was set on this Future." msgstr "" -#: library/asyncio-future.rst:205 +#: library/asyncio-future.rst:211 msgid "" "The exception (or ``None`` if no exception was set) is returned only if the " "Future is *done*." msgstr "" -#: library/asyncio-future.rst:211 +#: library/asyncio-future.rst:217 msgid "" "If the Future isn't *done* yet, this method raises an :exc:" "`InvalidStateError` exception." msgstr "" -#: library/asyncio-future.rst:216 +#: library/asyncio-future.rst:222 msgid "Return the event loop the Future object is bound to." msgstr "" -#: library/asyncio-future.rst:223 +#: library/asyncio-future.rst:229 msgid "" "This example creates a Future object, creates and schedules an asynchronous " "Task to set result for the Future, and waits until the Future has a result::" msgstr "" -#: library/asyncio-future.rst:227 +#: library/asyncio-future.rst:233 msgid "" "async def set_after(fut, delay, value):\n" " # Sleep for *delay* seconds.\n" @@ -345,43 +355,43 @@ msgid "" "asyncio.run(main())" msgstr "" -#: library/asyncio-future.rst:258 +#: library/asyncio-future.rst:264 msgid "" "The Future object was designed to mimic :class:`concurrent.futures.Future`. " "Key differences include:" msgstr "" -#: library/asyncio-future.rst:261 +#: library/asyncio-future.rst:267 msgid "" "unlike asyncio Futures, :class:`concurrent.futures.Future` instances cannot " "be awaited." msgstr "" -#: library/asyncio-future.rst:264 +#: library/asyncio-future.rst:270 msgid "" ":meth:`asyncio.Future.result` and :meth:`asyncio.Future.exception` do not " "accept the *timeout* argument." msgstr "" -#: library/asyncio-future.rst:267 +#: library/asyncio-future.rst:273 msgid "" ":meth:`asyncio.Future.result` and :meth:`asyncio.Future.exception` raise an :" "exc:`InvalidStateError` exception when the Future is not *done*." msgstr "" -#: library/asyncio-future.rst:271 +#: library/asyncio-future.rst:277 msgid "" "Callbacks registered with :meth:`asyncio.Future.add_done_callback` are not " "called immediately. They are scheduled with :meth:`loop.call_soon` instead." msgstr "" -#: library/asyncio-future.rst:275 +#: library/asyncio-future.rst:281 msgid "" "asyncio Future is not compatible with the :func:`concurrent.futures.wait` " "and :func:`concurrent.futures.as_completed` functions." msgstr "" -#: library/asyncio-future.rst:279 +#: library/asyncio-future.rst:285 msgid "" ":meth:`asyncio.Future.cancel` accepts an optional ``msg`` argument, but :" "meth:`concurrent.futures.Future.cancel` does not." diff --git a/library/asyncio-llapi-index.po b/library/asyncio-llapi-index.po index e970ea402..5c6fbf69c 100644 --- a/library/asyncio-llapi-index.po +++ b/library/asyncio-llapi-index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/asyncio-platforms.po b/library/asyncio-platforms.po index 1d00085f1..9a2ca6855 100644 --- a/library/asyncio-platforms.po +++ b/library/asyncio-platforms.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -38,76 +38,90 @@ msgid "" "monitor file I/O." msgstr "" -#: library/asyncio-platforms.rst:24 +#: library/asyncio-platforms.rst:22 +msgid "" +":meth:`loop.connect_read_pipe` and :meth:`loop.connect_write_pipe` cannot be " +"used with regular files. See :ref:`Supported pipe objects ` for the objects that are accepted on each platform." +msgstr "" + +#: library/asyncio-platforms.rst:29 msgid "Windows" msgstr "" -#: library/asyncio-platforms.rst:26 +#: library/asyncio-platforms.rst:31 msgid "" "**Source code:** :source:`Lib/asyncio/proactor_events.py`, :source:`Lib/" "asyncio/windows_events.py`, :source:`Lib/asyncio/windows_utils.py`" msgstr "" -#: library/asyncio-platforms.rst:34 +#: library/asyncio-platforms.rst:39 msgid "On Windows, :class:`ProactorEventLoop` is now the default event loop." msgstr "" -#: library/asyncio-platforms.rst:36 +#: library/asyncio-platforms.rst:41 msgid "All event loops on Windows do not support the following methods:" msgstr "" -#: library/asyncio-platforms.rst:38 +#: library/asyncio-platforms.rst:43 msgid "" ":meth:`loop.create_unix_connection` and :meth:`loop.create_unix_server` are " "not supported. The :const:`socket.AF_UNIX` socket family is specific to Unix." msgstr "" -#: library/asyncio-platforms.rst:42 +#: library/asyncio-platforms.rst:47 msgid "" ":meth:`loop.add_signal_handler` and :meth:`loop.remove_signal_handler` are " "not supported." msgstr "" -#: library/asyncio-platforms.rst:45 +#: library/asyncio-platforms.rst:50 msgid ":class:`SelectorEventLoop` has the following limitations:" msgstr "" -#: library/asyncio-platforms.rst:47 +#: library/asyncio-platforms.rst:52 msgid "" ":class:`~selectors.SelectSelector` is used to wait on socket events: it " "supports sockets and is limited to 512 sockets." msgstr "" -#: library/asyncio-platforms.rst:50 +#: library/asyncio-platforms.rst:55 msgid "" ":meth:`loop.add_reader` and :meth:`loop.add_writer` only accept socket " "handles (e.g. pipe file descriptors are not supported)." msgstr "" -#: library/asyncio-platforms.rst:53 +#: library/asyncio-platforms.rst:58 msgid "" "Pipes are not supported, so the :meth:`loop.connect_read_pipe` and :meth:" "`loop.connect_write_pipe` methods are not implemented." msgstr "" -#: library/asyncio-platforms.rst:56 +#: library/asyncio-platforms.rst:61 msgid "" ":ref:`Subprocesses ` are not supported, i.e. :meth:`loop." "subprocess_exec` and :meth:`loop.subprocess_shell` methods are not " "implemented." msgstr "" -#: library/asyncio-platforms.rst:60 +#: library/asyncio-platforms.rst:65 msgid ":class:`ProactorEventLoop` has the following limitations:" msgstr "" -#: library/asyncio-platforms.rst:62 +#: library/asyncio-platforms.rst:67 msgid "" "The :meth:`loop.add_reader` and :meth:`loop.add_writer` methods are not " "supported." msgstr "" -#: library/asyncio-platforms.rst:65 +#: library/asyncio-platforms.rst:70 +msgid "" +":meth:`loop.connect_read_pipe` and :meth:`loop.connect_write_pipe` only " +"accept a handle opened for overlapped I/O. See :ref:`Supported pipe objects " +"` for which objects are supported." +msgstr "" + +#: library/asyncio-platforms.rst:74 msgid "" "The resolution of the monotonic clock on Windows is usually around 15.6 " "milliseconds. The best resolution is 0.5 milliseconds. The resolution " @@ -115,36 +129,36 @@ msgid "" "wiki/High_Precision_Event_Timer>`_) and on the Windows configuration." msgstr "" -#: library/asyncio-platforms.rst:75 +#: library/asyncio-platforms.rst:84 msgid "Subprocess Support on Windows" msgstr "" -#: library/asyncio-platforms.rst:77 +#: library/asyncio-platforms.rst:86 msgid "" "On Windows, the default event loop :class:`ProactorEventLoop` supports " "subprocesses, whereas :class:`SelectorEventLoop` does not." msgstr "" -#: library/asyncio-platforms.rst:80 +#: library/asyncio-platforms.rst:89 msgid "" "The :meth:`policy.set_child_watcher() ` function is also not supported, as :class:" "`ProactorEventLoop` has a different mechanism to watch child processes." msgstr "" -#: library/asyncio-platforms.rst:87 +#: library/asyncio-platforms.rst:96 msgid "macOS" msgstr "" -#: library/asyncio-platforms.rst:89 +#: library/asyncio-platforms.rst:98 msgid "Modern macOS versions are fully supported." msgstr "" -#: library/asyncio-platforms.rst:92 +#: library/asyncio-platforms.rst:101 msgid "macOS <= 10.8" msgstr "" -#: library/asyncio-platforms.rst:93 +#: library/asyncio-platforms.rst:102 msgid "" "On macOS 10.6, 10.7 and 10.8, the default event loop uses :class:`selectors." "KqueueSelector`, which does not support character devices on these " @@ -153,7 +167,7 @@ msgid "" "support character devices on these older versions of macOS. Example::" msgstr "" -#: library/asyncio-platforms.rst:100 +#: library/asyncio-platforms.rst:109 msgid "" "import asyncio\n" "import selectors\n" diff --git a/library/asyncio-policy.po b/library/asyncio-policy.po index 8f965555c..b56a37c51 100644 --- a/library/asyncio-policy.po +++ b/library/asyncio-policy.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/asyncio-protocol.po b/library/asyncio-protocol.po index 671baf6f9..6ae259645 100644 --- a/library/asyncio-protocol.po +++ b/library/asyncio-protocol.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1320,7 +1320,7 @@ msgid "" " # low-level APIs.\n" " loop = asyncio.get_running_loop()\n" "\n" -" code = 'import datetime; print(datetime.datetime.now())'\n" +" code = 'import datetime as dt; print(dt.datetime.now())'\n" " exit_future = asyncio.Future(loop=loop)\n" "\n" " # Create the subprocess controlled by DateProtocol;\n" diff --git a/library/asyncio-queue.po b/library/asyncio-queue.po index 07d2271f4..354c649ce 100644 --- a/library/asyncio-queue.po +++ b/library/asyncio-queue.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: 2025-11-27 09:00+0200\n" "Last-Translator: Marios Giannopoulos \n" "Language-Team: PyGreece \n" @@ -128,13 +128,19 @@ msgstr "" "Επιστρέφει ένα αντικείμενο, αν είναι άμεσα διαθέσιμο, αλλιώς κάνε raise την :" "exc:`QueueEmpty`." -#: library/asyncio-queue.rst:77 +#: library/asyncio-queue.rst:74 +#, fuzzy +msgid "" +"Raises :exc:`QueueShutDown` if the queue has been shut down and is empty." +msgstr "Κάνει raise μια :exc:`QueueShutDown` αν η ουρά έχει τερματιστεί." + +#: library/asyncio-queue.rst:79 msgid "Block until all items in the queue have been received and processed." msgstr "" "Αποκλείει μέχρι να ληφθούν και να υποβληθούν σε επεξεργασία όλα τα στοιχεία " "στην ουρά." -#: library/asyncio-queue.rst:79 +#: library/asyncio-queue.rst:81 msgid "" "The count of unfinished tasks goes up whenever an item is added to the " "queue. The count goes down whenever a consumer coroutine calls :meth:" @@ -148,7 +154,7 @@ msgstr "" "λήφθηκε και η εργασία πάνω του έχει ολοκληρωθεί. Όταν ο αριθμός των " "ατελείωτων εργασιών μειωθεί στο μηδέν, η μέθοδος :meth:`join` αποδεσμεύεται." -#: library/asyncio-queue.rst:88 +#: library/asyncio-queue.rst:90 msgid "" "Put an item into the queue. If the queue is full, wait until a free slot is " "available before adding the item." @@ -156,40 +162,41 @@ msgstr "" "Τοποθετεί ένα αντικείμενο στην ουρά. Αν η ουρά είναι γεμάτη, περιμένετε " "μέχρι να είναι διαθέσιμη μια ελεύθερη θέση, πριν προσθέσετε το αντικείμενο." -#: library/asyncio-queue.rst:91 +#: library/asyncio-queue.rst:101 msgid "Raises :exc:`QueueShutDown` if the queue has been shut down." msgstr "Κάνει raise μια :exc:`QueueShutDown` αν η ουρά έχει τερματιστεί." -#: library/asyncio-queue.rst:95 +#: library/asyncio-queue.rst:97 msgid "Put an item into the queue without blocking." msgstr "Τοποθετεί ένα αντικείμενο στην ουρά χωρίς να μπλοκάρει." -#: library/asyncio-queue.rst:97 +#: library/asyncio-queue.rst:99 msgid "If no free slot is immediately available, raise :exc:`QueueFull`." msgstr "" "Αν δεν είναι διαθέσιμη μια ελεύθερη θέση αμέσως, γίνεται raise η :exc:" "`QueueFull`." -#: library/asyncio-queue.rst:101 +#: library/asyncio-queue.rst:105 msgid "Return the number of items in the queue." msgstr "Επιστρέφει τον αριθμό των αντικειμένων στην ουρά." -#: library/asyncio-queue.rst:105 +#: library/asyncio-queue.rst:109 msgid "Put a :class:`Queue` instance into a shutdown mode." msgstr "Τοποθετεί μια παρουσία της :class:`Queue` σε λειτουργία τερματισμού." -#: library/asyncio-queue.rst:107 +#: library/asyncio-queue.rst:111 +#, fuzzy msgid "" "The queue can no longer grow. Future calls to :meth:`~Queue.put` raise :exc:" "`QueueShutDown`. Currently blocked callers of :meth:`~Queue.put` will be " -"unblocked and will raise :exc:`QueueShutDown` in the formerly blocked thread." +"unblocked and will raise :exc:`QueueShutDown` in the formerly awaiting task." msgstr "" "Η ουρά δεν μπορεί πλέον να μεγαλώσει. Μελλοντικές κλήσεις της :meth:`~Queue." "put` κάνουν raise την :exc:`QueueShutDown`. Οι τρέχοντες αποκλεισμένοι " "καλούντες της :meth:`~Queue.put` θα αποδεσμευτούν και θα κάνουν raise την :" "exc:`QueueShutDown` στο νήμα που ήταν προηγουμένως αποκλεισμένο." -#: library/asyncio-queue.rst:112 +#: library/asyncio-queue.rst:116 msgid "" "If *immediate* is false (the default), the queue can be wound down normally " "with :meth:`~Queue.get` calls to extract tasks that have already been loaded." @@ -198,7 +205,7 @@ msgstr "" "κανονικά με κλήσεις :meth:`~Queue.get` για να εξαχθούν εργασίες που έχουν " "ήδη φορτωθεί." -#: library/asyncio-queue.rst:116 +#: library/asyncio-queue.rst:120 msgid "" "And if :meth:`~Queue.task_done` is called for each remaining task, a " "pending :meth:`~Queue.join` will be unblocked normally." @@ -206,7 +213,7 @@ msgstr "" "Και αν η :meth:`~Queue.task_done` κληθεί για κάθε εναπομείνασα εργασία, μια " "εκκρεμής κλήση της :meth:`~Queue.join` θα αποδεσμευτεί κανονικά." -#: library/asyncio-queue.rst:119 +#: library/asyncio-queue.rst:123 msgid "" "Once the queue is empty, future calls to :meth:`~Queue.get` will raise :exc:" "`QueueShutDown`." @@ -214,7 +221,7 @@ msgstr "" "Μόλις η ουρά είναι κενή, μελλοντικές κλήσεις της :meth:`~Queue.get` θα " "κάνουν raise την :exc:`QueueShutDown`." -#: library/asyncio-queue.rst:122 +#: library/asyncio-queue.rst:126 msgid "" "If *immediate* is true, the queue is terminated immediately. The queue is " "drained to be completely empty and the count of unfinished tasks is reduced " @@ -230,7 +237,7 @@ msgstr "" "αποκλεισμένοι καλούντες της :meth:`~Queue.get` αποδεσμεύονται και θα κάνουν " "raise την :exc:`QueueShutDown` επειδή η ουρά είναι κενή." -#: library/asyncio-queue.rst:130 +#: library/asyncio-queue.rst:134 msgid "" "Use caution when using :meth:`~Queue.join` with *immediate* set to true. " "This unblocks the join even when no work has been done on the tasks, " @@ -241,12 +248,12 @@ msgstr "" "έχει γίνει καμία εργασία στις εργασίες, παραβιάζοντας το συνηθισμένο " "αμετάβλητο για την ένωση μιας ουράς." -#: library/asyncio-queue.rst:138 +#: library/asyncio-queue.rst:142 msgid "Indicate that a formerly enqueued work item is complete." msgstr "" "Υποδεικνύει ότι μια εργασία που είχε προστεθεί στην ουρά έχει ολοκληρωθεί." -#: library/asyncio-queue.rst:140 +#: library/asyncio-queue.rst:144 msgid "" "Used by queue consumers. For each :meth:`~Queue.get` used to fetch a work " "item, a subsequent call to :meth:`task_done` tells the queue that the " @@ -257,7 +264,7 @@ msgstr "" "`task_done` ενημερώνει την ουρά ότι η επεξεργασία της εργασίας έχει " "ολοκληρωθεί." -#: library/asyncio-queue.rst:144 +#: library/asyncio-queue.rst:148 msgid "" "If a :meth:`join` is currently blocking, it will resume when all items have " "been processed (meaning that a :meth:`task_done` call was received for every " @@ -268,7 +275,7 @@ msgstr "" "meth:`task_done` για κάθε αντικείμενο που είχε προστεθεί με :meth:`~Queue." "put` στην ουρά)." -#: library/asyncio-queue.rst:149 +#: library/asyncio-queue.rst:153 msgid "" "Raises :exc:`ValueError` if called more times than there were items placed " "in the queue." @@ -276,11 +283,11 @@ msgstr "" "Κάνει raise την :exc:`ValueError` εάν κληθεί περισσότερες φορές από όσες τα " "αντικείμενα που είχαν τοποθετηθεί στην ουρά." -#: library/asyncio-queue.rst:154 +#: library/asyncio-queue.rst:158 msgid "Priority Queue" msgstr "Σειρά Προτεραιότητας" -#: library/asyncio-queue.rst:158 +#: library/asyncio-queue.rst:162 msgid "" "A variant of :class:`Queue`; retrieves entries in priority order (lowest " "first)." @@ -288,15 +295,15 @@ msgstr "" "Μια παραλλαγή της :class:`Queue`; η οποία ανακτά τις καταχωρήσεις με σειρά " "προτεραιότητας (οι χαμηλότερες πρώτες)." -#: library/asyncio-queue.rst:161 +#: library/asyncio-queue.rst:165 msgid "Entries are typically tuples of the form ``(priority_number, data)``." msgstr "Οι καταχωρήσεις είναι συνήθως της μορφής ``(priority_number, data)``." -#: library/asyncio-queue.rst:166 +#: library/asyncio-queue.rst:170 msgid "LIFO Queue" msgstr "Ουρά LIFO" -#: library/asyncio-queue.rst:170 +#: library/asyncio-queue.rst:174 msgid "" "A variant of :class:`Queue` that retrieves most recently added entries first " "(last in, first out)." @@ -304,11 +311,11 @@ msgstr "" "Μια παραλλαγή της κλάσης :class:`Queue` που ανακτά τις πιο πρόσφατα " "προστιθέμενες καταχωρίσεις πρώτες (με τη λογική τελευταίος μέσα, πρώτος έξω)." -#: library/asyncio-queue.rst:175 +#: library/asyncio-queue.rst:179 msgid "Exceptions" msgstr "Εξαιρέσεις" -#: library/asyncio-queue.rst:179 +#: library/asyncio-queue.rst:183 msgid "" "This exception is raised when the :meth:`~Queue.get_nowait` method is called " "on an empty queue." @@ -316,7 +323,7 @@ msgstr "" "Αυτή η εξαίρεση γίνεται raise όταν η μέθοδος :meth:`~Queue.get_nowait` " "καλείται σε μια άδεια ουρά." -#: library/asyncio-queue.rst:185 +#: library/asyncio-queue.rst:189 msgid "" "Exception raised when the :meth:`~Queue.put_nowait` method is called on a " "queue that has reached its *maxsize*." @@ -324,26 +331,28 @@ msgstr "" "Εξαίρεση που γίνεται raise όταν η μέθοδος :meth:`~Queue.put_nowait` καλείται " "σε μια ουρά που έχει φτάσει στο *maxsize* της." -#: library/asyncio-queue.rst:191 +#: library/asyncio-queue.rst:195 +#, fuzzy msgid "" -"Exception raised when :meth:`~Queue.put` or :meth:`~Queue.get` is called on " -"a queue which has been shut down." +"Exception raised when :meth:`~Queue.put`, :meth:`~Queue.put_nowait`, :meth:" +"`~Queue.get` or :meth:`~Queue.get_nowait` is called on a queue which has " +"been shut down." msgstr "" "Εξαίρεση που γίνεται raise όταν η μέθοδος :meth:`~Queue.put` ή :meth:`~Queue." "get` καλείται σε μια ουρά που έχει τερματιστεί." -#: library/asyncio-queue.rst:198 +#: library/asyncio-queue.rst:203 msgid "Examples" msgstr "Παραδείγματα" -#: library/asyncio-queue.rst:202 +#: library/asyncio-queue.rst:207 msgid "" "Queues can be used to distribute workload between several concurrent tasks::" msgstr "" "Οι ουρές μπορούν να χρησιμοποιηθούν για τη διανομή εργασίας μεταξύ αρκετών " "παράλληλων εργασιών::" -#: library/asyncio-queue.rst:205 +#: library/asyncio-queue.rst:210 msgid "" "import asyncio\n" "import random\n" diff --git a/library/asyncio-runner.po b/library/asyncio-runner.po index 33399db75..0eb15bc58 100644 --- a/library/asyncio-runner.po +++ b/library/asyncio-runner.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/asyncio-stream.po b/library/asyncio-stream.po index 5d72bb050..bffc19ea2 100644 --- a/library/asyncio-stream.po +++ b/library/asyncio-stream.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/asyncio-subprocess.po b/library/asyncio-subprocess.po index fed255225..de6923b6b 100644 --- a/library/asyncio-subprocess.po +++ b/library/asyncio-subprocess.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -418,79 +418,88 @@ msgstr "" #: library/asyncio-subprocess.rst:314 msgid "" -"A negative value ``-N`` indicates that the child was terminated by signal " +"For processes created with :func:`~asyncio.create_subprocess_exec`, a " +"negative value ``-N`` indicates that the child was terminated by signal " "``N`` (POSIX only)." msgstr "" -#: library/asyncio-subprocess.rst:321 +#: library/asyncio-subprocess.rst:318 +msgid "" +"For processes created with :func:`~asyncio.create_subprocess_shell`, the " +"return code reflects the exit status of the shell itself (e.g. ``/bin/sh``), " +"which may map signals to codes such as ``128+N``. See the documentation of " +"the shell (for example, the Bash manual's Exit Status) for details." +msgstr "" + +#: library/asyncio-subprocess.rst:329 msgid "Subprocess and Threads" msgstr "" -#: library/asyncio-subprocess.rst:323 +#: library/asyncio-subprocess.rst:331 msgid "" "Standard asyncio event loop supports running subprocesses from different " "threads by default." msgstr "" -#: library/asyncio-subprocess.rst:326 +#: library/asyncio-subprocess.rst:334 msgid "" "On Windows subprocesses are provided by :class:`ProactorEventLoop` only " "(default), :class:`SelectorEventLoop` has no subprocess support." msgstr "" -#: library/asyncio-subprocess.rst:329 +#: library/asyncio-subprocess.rst:337 msgid "" "On UNIX *child watchers* are used for subprocess finish waiting, see :ref:" "`asyncio-watchers` for more info." msgstr "" -#: library/asyncio-subprocess.rst:335 +#: library/asyncio-subprocess.rst:343 msgid "" "UNIX switched to use :class:`ThreadedChildWatcher` for spawning subprocesses " "from different threads without any limitation." msgstr "" -#: library/asyncio-subprocess.rst:338 +#: library/asyncio-subprocess.rst:346 msgid "" "Spawning a subprocess with *inactive* current child watcher raises :exc:" "`RuntimeError`." msgstr "" -#: library/asyncio-subprocess.rst:341 +#: library/asyncio-subprocess.rst:349 msgid "" "Note that alternative event loop implementations might have own limitations; " "please refer to their documentation." msgstr "" -#: library/asyncio-subprocess.rst:346 +#: library/asyncio-subprocess.rst:354 msgid "" "The :ref:`Concurrency and multithreading in asyncio ` section." msgstr "" -#: library/asyncio-subprocess.rst:351 +#: library/asyncio-subprocess.rst:359 msgid "Examples" msgstr "" -#: library/asyncio-subprocess.rst:353 +#: library/asyncio-subprocess.rst:361 msgid "" "An example using the :class:`~asyncio.subprocess.Process` class to control a " "subprocess and the :class:`StreamReader` class to read from its standard " "output." msgstr "" -#: library/asyncio-subprocess.rst:359 +#: library/asyncio-subprocess.rst:367 msgid "" "The subprocess is created by the :func:`create_subprocess_exec` function::" msgstr "" -#: library/asyncio-subprocess.rst:362 +#: library/asyncio-subprocess.rst:370 msgid "" "import asyncio\n" "import sys\n" "\n" "async def get_date():\n" -" code = 'import datetime; print(datetime.datetime.now())'\n" +" code = 'import datetime as dt; print(dt.datetime.now())'\n" "\n" " # Create the subprocess; redirect the standard output\n" " # into a pipe.\n" @@ -510,7 +519,7 @@ msgid "" "print(f\"Current date: {date}\")" msgstr "" -#: library/asyncio-subprocess.rst:386 +#: library/asyncio-subprocess.rst:394 msgid "" "See also the :ref:`same example ` written " "using low-level APIs." diff --git a/library/asyncio-sync.po b/library/asyncio-sync.po index a4a7a5a29..e2fd16d17 100644 --- a/library/asyncio-sync.po +++ b/library/asyncio-sync.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/asyncio-task.po b/library/asyncio-task.po index 296ddce77..b619fcb01 100644 --- a/library/asyncio-task.po +++ b/library/asyncio-task.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,7 +18,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: library/asyncio-task.rst:6 -msgid "Coroutines and Tasks" +msgid "Coroutines and tasks" msgstr "" #: library/asyncio-task.rst:8 @@ -335,7 +335,7 @@ msgid "" msgstr "" #: library/asyncio-task.rst:235 -msgid "Creating Tasks" +msgid "Creating tasks" msgstr "" #: library/asyncio-task.rst:237 @@ -399,16 +399,16 @@ msgid "" " task.add_done_callback(background_tasks.discard)" msgstr "" -#: library/asyncio-task.rst:1193 +#: library/asyncio-task.rst:1206 msgid "Added the *name* parameter." msgstr "" -#: library/asyncio-task.rst:1200 +#: library/asyncio-task.rst:1213 msgid "Added the *context* parameter." msgstr "" #: library/asyncio-task.rst:295 -msgid "Task Cancellation" +msgid "Task cancellation" msgstr "" #: library/asyncio-task.rst:297 @@ -438,7 +438,7 @@ msgid "" msgstr "" #: library/asyncio-task.rst:319 -msgid "Task Groups" +msgid "Task groups" msgstr "" #: library/asyncio-task.rst:321 @@ -466,8 +466,8 @@ msgstr "" msgid "Close the given coroutine if the task group is not active." msgstr "" -#: library/asyncio-task.rst:551 library/asyncio-task.rst:782 -#: library/asyncio-task.rst:849 +#: library/asyncio-task.rst:551 library/asyncio-task.rst:785 +#: library/asyncio-task.rst:852 msgid "Example::" msgstr "" @@ -563,7 +563,7 @@ msgid "" msgstr "" #: library/asyncio-task.rst:418 -msgid "Terminating a Task Group" +msgid "Terminating a task group" msgstr "" #: library/asyncio-task.rst:420 @@ -651,13 +651,13 @@ msgstr "" #: library/asyncio-task.rst:487 msgid "" "import asyncio\n" -"import datetime\n" +"import datetime as dt\n" "\n" "async def display_date():\n" " loop = asyncio.get_running_loop()\n" " end_time = loop.time() + 5.0\n" " while True:\n" -" print(datetime.datetime.now())\n" +" print(dt.datetime.now())\n" " if (loop.time() + 1.0) >= end_time:\n" " break\n" " await asyncio.sleep(1)\n" @@ -665,8 +665,8 @@ msgid "" "asyncio.run(display_date())" msgstr "" -#: library/asyncio-task.rst:600 library/asyncio-task.rst:874 -#: library/asyncio-task.rst:986 +#: library/asyncio-task.rst:600 library/asyncio-task.rst:877 +#: library/asyncio-task.rst:996 msgid "Removed the *loop* parameter." msgstr "" @@ -675,7 +675,7 @@ msgid "Raises :exc:`ValueError` if *delay* is :data:`~math.nan`." msgstr "" #: library/asyncio-task.rst:510 -msgid "Running Tasks Concurrently" +msgid "Running tasks concurrently" msgstr "" #: library/asyncio-task.rst:514 @@ -732,7 +732,7 @@ msgid "" "safety guarantees than *gather* for scheduling a nesting of subtasks: if a " "task (or a subtask, a task scheduled by a task) raises an exception, " "*TaskGroup* will, while *gather* will not, cancel the remaining scheduled " -"tasks)." +"tasks." msgstr "" #: library/asyncio-task.rst:553 @@ -797,7 +797,7 @@ msgid "" msgstr "" #: library/asyncio-task.rst:612 -msgid "Eager Task Factory" +msgid "Eager task factory" msgstr "" #: library/asyncio-task.rst:616 @@ -851,7 +851,7 @@ msgid "" msgstr "" #: library/asyncio-task.rst:655 -msgid "Shielding From Cancellation" +msgid "Shielding from cancellation" msgstr "" #: library/asyncio-task.rst:659 @@ -860,7 +860,7 @@ msgid "" "`cancelled `." msgstr "" -#: library/asyncio-task.rst:829 +#: library/asyncio-task.rst:832 msgid "If *aw* is a coroutine it is automatically scheduled as a Task." msgstr "" @@ -1002,34 +1002,40 @@ msgstr "" #: library/asyncio-task.rst:761 msgid "" +"Prefer using :func:`asyncio.timeout` or :func:`asyncio.timeout_at` rather " +"than instantiating :class:`!Timeout` directly." +msgstr "" + +#: library/asyncio-task.rst:764 +msgid "" "``when`` should be an absolute time at which the context should time out, as " "measured by the event loop's clock:" msgstr "" -#: library/asyncio-task.rst:764 +#: library/asyncio-task.rst:767 msgid "If ``when`` is ``None``, the timeout will never trigger." msgstr "" -#: library/asyncio-task.rst:765 +#: library/asyncio-task.rst:768 msgid "" "If ``when < loop.time()``, the timeout will trigger on the next iteration of " "the event loop." msgstr "" -#: library/asyncio-task.rst:770 +#: library/asyncio-task.rst:773 msgid "" "Return the current deadline, or ``None`` if the current deadline is not set." msgstr "" -#: library/asyncio-task.rst:775 +#: library/asyncio-task.rst:778 msgid "Reschedule the timeout." msgstr "" -#: library/asyncio-task.rst:779 +#: library/asyncio-task.rst:782 msgid "Return whether the context manager has exceeded its deadline (expired)." msgstr "" -#: library/asyncio-task.rst:784 +#: library/asyncio-task.rst:787 msgid "" "async def main():\n" " try:\n" @@ -1047,17 +1053,17 @@ msgid "" " print(\"Looks like we haven't finished on time.\")" msgstr "" -#: library/asyncio-task.rst:799 +#: library/asyncio-task.rst:802 msgid "Timeout context managers can be safely nested." msgstr "" -#: library/asyncio-task.rst:805 +#: library/asyncio-task.rst:808 msgid "" "Similar to :func:`asyncio.timeout`, except *when* is the absolute time to " "stop waiting, or ``None``." msgstr "" -#: library/asyncio-task.rst:810 +#: library/asyncio-task.rst:813 msgid "" "async def main():\n" " loop = get_running_loop()\n" @@ -1071,41 +1077,41 @@ msgid "" " print(\"This statement will run regardless.\")" msgstr "" -#: library/asyncio-task.rst:826 +#: library/asyncio-task.rst:829 msgid "" "Wait for the *aw* :ref:`awaitable ` to complete with a " "timeout." msgstr "" -#: library/asyncio-task.rst:831 +#: library/asyncio-task.rst:834 msgid "" "*timeout* can either be ``None`` or a float or int number of seconds to wait " "for. If *timeout* is ``None``, block until the future completes." msgstr "" -#: library/asyncio-task.rst:835 +#: library/asyncio-task.rst:838 msgid "" "If a timeout occurs, it cancels the task and raises :exc:`TimeoutError`." msgstr "" -#: library/asyncio-task.rst:838 +#: library/asyncio-task.rst:841 msgid "" "To avoid the task :meth:`cancellation `, wrap it in :func:" "`shield`." msgstr "" -#: library/asyncio-task.rst:841 +#: library/asyncio-task.rst:844 msgid "" "The function will wait until the future is actually cancelled, so the total " "wait time may exceed the *timeout*. If an exception happens during " "cancellation, it is propagated." msgstr "" -#: library/asyncio-task.rst:845 +#: library/asyncio-task.rst:848 msgid "If the wait is cancelled, the future *aw* is also cancelled." msgstr "" -#: library/asyncio-task.rst:851 +#: library/asyncio-task.rst:854 msgid "" "async def eternity():\n" " # Sleep for one hour\n" @@ -1126,107 +1132,113 @@ msgid "" "# timeout!" msgstr "" -#: library/asyncio-task.rst:869 +#: library/asyncio-task.rst:872 msgid "" "When *aw* is cancelled due to a timeout, ``wait_for`` waits for *aw* to be " "cancelled. Previously, it raised :exc:`TimeoutError` immediately." msgstr "" -#: library/asyncio-task.rst:877 +#: library/asyncio-task.rst:880 msgid "Raises :exc:`TimeoutError` instead of :exc:`asyncio.TimeoutError`." msgstr "" -#: library/asyncio-task.rst:882 -msgid "Waiting Primitives" +#: library/asyncio-task.rst:885 +msgid "Waiting primitives" msgstr "" -#: library/asyncio-task.rst:887 +#: library/asyncio-task.rst:890 msgid "" "Run :class:`~asyncio.Future` and :class:`~asyncio.Task` instances in the " "*aws* iterable concurrently and block until the condition specified by " "*return_when*." msgstr "" -#: library/asyncio-task.rst:891 +#: library/asyncio-task.rst:894 msgid "The *aws* iterable must not be empty." msgstr "" -#: library/asyncio-task.rst:893 +#: library/asyncio-task.rst:896 msgid "Returns two sets of Tasks/Futures: ``(done, pending)``." msgstr "" -#: library/asyncio-task.rst:895 +#: library/asyncio-task.rst:898 msgid "Usage::" msgstr "" -#: library/asyncio-task.rst:897 +#: library/asyncio-task.rst:900 msgid "done, pending = await asyncio.wait(aws)" msgstr "" -#: library/asyncio-task.rst:899 +#: library/asyncio-task.rst:902 msgid "" "*timeout* (a float or int), if specified, can be used to control the maximum " "number of seconds to wait before returning." msgstr "" -#: library/asyncio-task.rst:902 +#: library/asyncio-task.rst:905 msgid "" "Note that this function does not raise :exc:`TimeoutError`. Futures or Tasks " "that aren't done when the timeout occurs are simply returned in the second " "set." msgstr "" -#: library/asyncio-task.rst:906 +#: library/asyncio-task.rst:909 msgid "" "*return_when* indicates when this function should return. It must be one of " "the following constants:" msgstr "" -#: library/asyncio-task.rst:912 +#: library/asyncio-task.rst:915 msgid "Constant" msgstr "" -#: library/asyncio-task.rst:913 +#: library/asyncio-task.rst:916 msgid "Description" msgstr "" -#: library/asyncio-task.rst:916 +#: library/asyncio-task.rst:919 msgid "The function will return when any future finishes or is cancelled." msgstr "" -#: library/asyncio-task.rst:919 +#: library/asyncio-task.rst:922 msgid "" "The function will return when any future finishes by raising an exception. " "If no future raises an exception then it is equivalent to :const:" "`ALL_COMPLETED`." msgstr "" -#: library/asyncio-task.rst:924 +#: library/asyncio-task.rst:927 msgid "The function will return when all futures finish or are cancelled." msgstr "" -#: library/asyncio-task.rst:926 +#: library/asyncio-task.rst:929 msgid "" "Unlike :func:`~asyncio.wait_for`, ``wait()`` does not cancel the futures " "when a timeout occurs." msgstr "" #: library/asyncio-task.rst:932 +msgid "" +"If ``wait()`` is cancelled, the futures in *aws* are not cancelled and " +"continue to run." +msgstr "" + +#: library/asyncio-task.rst:938 msgid "Passing coroutine objects to ``wait()`` directly is forbidden." msgstr "" -#: library/asyncio-task.rst:993 +#: library/asyncio-task.rst:1003 msgid "Added support for generators yielding tasks." msgstr "" -#: library/asyncio-task.rst:941 +#: library/asyncio-task.rst:947 msgid "" "Run :ref:`awaitable objects ` in the *aws* iterable " "concurrently. The returned object can be iterated to obtain the results of " "the awaitables as they finish." msgstr "" -#: library/asyncio-task.rst:945 +#: library/asyncio-task.rst:951 msgid "" "The object returned by ``as_completed()`` can be iterated as an :term:" "`asynchronous iterator` or a plain :term:`iterator`. When asynchronous " @@ -1235,7 +1247,7 @@ msgid "" "tasks with their results. Example::" msgstr "" -#: library/asyncio-task.rst:951 +#: library/asyncio-task.rst:957 msgid "" "ipv4_connect = create_task(open_connection(\"127.0.0.1\", 80))\n" "ipv6_connect = create_task(open_connection(\"::1\", 80))\n" @@ -1252,20 +1264,20 @@ msgid "" " print(\"IPv4 connection established.\")" msgstr "" -#: library/asyncio-task.rst:965 +#: library/asyncio-task.rst:971 msgid "" "During asynchronous iteration, implicitly-created tasks will be yielded for " "supplied awaitables that aren't tasks or futures." msgstr "" -#: library/asyncio-task.rst:968 +#: library/asyncio-task.rst:974 msgid "" "When used as a plain iterator, each iteration yields a new coroutine that " "returns the result or raises the exception of the next completed awaitable. " "This pattern is compatible with Python versions older than 3.13::" msgstr "" -#: library/asyncio-task.rst:972 +#: library/asyncio-task.rst:978 msgid "" "ipv4_connect = create_task(open_connection(\"127.0.0.1\", 80))\n" "ipv6_connect = create_task(open_connection(\"::1\", 80))\n" @@ -1278,34 +1290,41 @@ msgid "" " reader, writer = await next_connect" msgstr "" -#: library/asyncio-task.rst:982 +#: library/asyncio-task.rst:988 msgid "" "A :exc:`TimeoutError` is raised if the timeout occurs before all awaitables " "are done. This is raised by the ``async for`` loop during asynchronous " "iteration or by the coroutines yielded during plain iteration." msgstr "" -#: library/asyncio-task.rst:989 +#: library/asyncio-task.rst:992 +msgid "" +"``as_completed()`` does not cancel the tasks running the supplied " +"awaitables: if a timeout occurs or the iteration is cancelled, the remaining " +"tasks continue to run." +msgstr "" + +#: library/asyncio-task.rst:999 msgid "" "Deprecation warning is emitted if not all awaitable objects in the *aws* " "iterable are Future-like objects and there is no running event loop." msgstr "" -#: library/asyncio-task.rst:996 +#: library/asyncio-task.rst:1006 msgid "" "The result can now be used as either an :term:`asynchronous iterator` or as " "a plain :term:`iterator` (previously it was only a plain iterator)." msgstr "" -#: library/asyncio-task.rst:1002 -msgid "Running in Threads" +#: library/asyncio-task.rst:1012 +msgid "Running in threads" msgstr "" -#: library/asyncio-task.rst:1007 +#: library/asyncio-task.rst:1017 msgid "Asynchronously run function *func* in a separate thread." msgstr "" -#: library/asyncio-task.rst:1009 +#: library/asyncio-task.rst:1019 msgid "" "Any \\*args and \\*\\*kwargs supplied for this function are directly passed " "to *func*. Also, the current :class:`contextvars.Context` is propagated, " @@ -1313,19 +1332,19 @@ msgid "" "separate thread." msgstr "" -#: library/asyncio-task.rst:1014 +#: library/asyncio-task.rst:1024 msgid "" "Return a coroutine that can be awaited to get the eventual result of *func*." msgstr "" -#: library/asyncio-task.rst:1016 +#: library/asyncio-task.rst:1026 msgid "" "This coroutine function is primarily intended to be used for executing IO-" "bound functions/methods that would otherwise block the event loop if they " "were run in the main thread. For example::" msgstr "" -#: library/asyncio-task.rst:1020 +#: library/asyncio-task.rst:1030 msgid "" "def blocking_io():\n" " print(f\"start blocking_io at {time.strftime('%X')}\")\n" @@ -1354,7 +1373,7 @@ msgid "" "# finished main at 19:50:54" msgstr "" -#: library/asyncio-task.rst:1046 +#: library/asyncio-task.rst:1056 msgid "" "Directly calling ``blocking_io()`` in any coroutine would block the event " "loop for its duration, resulting in an additional 1 second of run time. " @@ -1362,7 +1381,7 @@ msgid "" "thread without blocking the event loop." msgstr "" -#: library/asyncio-task.rst:1053 +#: library/asyncio-task.rst:1063 msgid "" "Due to the :term:`GIL`, ``asyncio.to_thread()`` can typically only be used " "to make IO-bound functions non-blocking. However, for extension modules that " @@ -1370,27 +1389,27 @@ msgid "" "``asyncio.to_thread()`` can also be used for CPU-bound functions." msgstr "" -#: library/asyncio-task.rst:1062 -msgid "Scheduling From Other Threads" +#: library/asyncio-task.rst:1072 +msgid "Scheduling from other threads" msgstr "" -#: library/asyncio-task.rst:1066 +#: library/asyncio-task.rst:1076 msgid "Submit a coroutine to the given event loop. Thread-safe." msgstr "" -#: library/asyncio-task.rst:1068 +#: library/asyncio-task.rst:1078 msgid "" "Return a :class:`concurrent.futures.Future` to wait for the result from " "another OS thread." msgstr "" -#: library/asyncio-task.rst:1071 +#: library/asyncio-task.rst:1081 msgid "" "This function is meant to be called from a different OS thread than the one " "where the event loop is running. Example::" msgstr "" -#: library/asyncio-task.rst:1074 +#: library/asyncio-task.rst:1084 msgid "" "# Create a coroutine\n" "coro = asyncio.sleep(1, result=3)\n" @@ -1402,13 +1421,13 @@ msgid "" "assert future.result(timeout) == 3" msgstr "" -#: library/asyncio-task.rst:1083 +#: library/asyncio-task.rst:1093 msgid "" "If an exception is raised in the coroutine, the returned Future will be " "notified. It can also be used to cancel the task in the event loop::" msgstr "" -#: library/asyncio-task.rst:1087 +#: library/asyncio-task.rst:1097 msgid "" "try:\n" " result = future.result(timeout)\n" @@ -1421,59 +1440,59 @@ msgid "" " print(f'The coroutine returned: {result!r}')" msgstr "" -#: library/asyncio-task.rst:1097 +#: library/asyncio-task.rst:1107 msgid "" "See the :ref:`concurrency and multithreading ` " "section of the documentation." msgstr "" -#: library/asyncio-task.rst:1100 +#: library/asyncio-task.rst:1110 msgid "" "Unlike other asyncio functions this function requires the *loop* argument to " "be passed explicitly." msgstr "" -#: library/asyncio-task.rst:1107 +#: library/asyncio-task.rst:1117 msgid "Introspection" msgstr "" -#: library/asyncio-task.rst:1112 +#: library/asyncio-task.rst:1122 msgid "" "Return the currently running :class:`Task` instance, or ``None`` if no task " "is running." msgstr "" -#: library/asyncio-task.rst:1115 +#: library/asyncio-task.rst:1125 msgid "" "If *loop* is ``None`` :func:`get_running_loop` is used to get the current " "loop." msgstr "" -#: library/asyncio-task.rst:1123 +#: library/asyncio-task.rst:1133 msgid "Return a set of not yet finished :class:`Task` objects run by the loop." msgstr "" -#: library/asyncio-task.rst:1126 +#: library/asyncio-task.rst:1136 msgid "" "If *loop* is ``None``, :func:`get_running_loop` is used for getting current " "loop." msgstr "" -#: library/asyncio-task.rst:1134 +#: library/asyncio-task.rst:1144 msgid "Return ``True`` if *obj* is a coroutine object." msgstr "" -#: library/asyncio-task.rst:1141 -msgid "Task Object" +#: library/asyncio-task.rst:1151 +msgid "Task object" msgstr "" -#: library/asyncio-task.rst:1145 +#: library/asyncio-task.rst:1155 msgid "" "A :class:`Future-like ` object that runs a Python :ref:`coroutine " "`. Not thread-safe." msgstr "" -#: library/asyncio-task.rst:1148 +#: library/asyncio-task.rst:1158 msgid "" "Tasks are used to run coroutines in event loops. If a coroutine awaits on a " "Future, the Task suspends the execution of the coroutine and waits for the " @@ -1481,21 +1500,21 @@ msgid "" "wrapped coroutine resumes." msgstr "" -#: library/asyncio-task.rst:1154 +#: library/asyncio-task.rst:1164 msgid "" "Event loops use cooperative scheduling: an event loop runs one Task at a " "time. While a Task awaits for the completion of a Future, the event loop " "runs other Tasks, callbacks, or performs IO operations." msgstr "" -#: library/asyncio-task.rst:1159 +#: library/asyncio-task.rst:1169 msgid "" "Use the high-level :func:`asyncio.create_task` function to create Tasks, or " "the low-level :meth:`loop.create_task` or :func:`ensure_future` functions. " "Manual instantiation of Tasks is discouraged." msgstr "" -#: library/asyncio-task.rst:1164 +#: library/asyncio-task.rst:1174 msgid "" "To cancel a running Task use the :meth:`cancel` method. Calling it will " "cause the Task to throw a :exc:`CancelledError` exception into the wrapped " @@ -1503,20 +1522,20 @@ msgid "" "cancellation, the Future object will be cancelled." msgstr "" -#: library/asyncio-task.rst:1169 +#: library/asyncio-task.rst:1179 msgid "" ":meth:`cancelled` can be used to check if the Task was cancelled. The method " "returns ``True`` if the wrapped coroutine did not suppress the :exc:" "`CancelledError` exception and was actually cancelled." msgstr "" -#: library/asyncio-task.rst:1174 +#: library/asyncio-task.rst:1184 msgid "" ":class:`asyncio.Task` inherits from :class:`Future` all of its APIs except :" "meth:`Future.set_result` and :meth:`Future.set_exception`." msgstr "" -#: library/asyncio-task.rst:1178 +#: library/asyncio-task.rst:1188 msgid "" "An optional keyword-only *context* argument allows specifying a custom :" "class:`contextvars.Context` for the *coro* to run in. If no *context* is " @@ -1524,7 +1543,7 @@ msgid "" "in the copied context." msgstr "" -#: library/asyncio-task.rst:1183 +#: library/asyncio-task.rst:1193 msgid "" "An optional keyword-only *eager_start* argument allows eagerly starting the " "execution of the :class:`asyncio.Task` at task creation time. If set to " @@ -1534,96 +1553,102 @@ msgid "" "eagerly and will skip scheduling to the event loop." msgstr "" -#: library/asyncio-task.rst:1190 +#: library/asyncio-task.rst:1200 +msgid "" +"Tasks are :ref:`generic ` over the return type of their wrapped " +"coroutines." +msgstr "" + +#: library/asyncio-task.rst:1203 msgid "Added support for the :mod:`contextvars` module." msgstr "" -#: library/asyncio-task.rst:1196 +#: library/asyncio-task.rst:1209 msgid "" "Deprecation warning is emitted if *loop* is not specified and there is no " "running event loop." msgstr "" -#: library/asyncio-task.rst:1203 +#: library/asyncio-task.rst:1216 msgid "Added the *eager_start* parameter." msgstr "" -#: library/asyncio-task.rst:1208 +#: library/asyncio-task.rst:1221 msgid "Return ``True`` if the Task is *done*." msgstr "" -#: library/asyncio-task.rst:1210 +#: library/asyncio-task.rst:1223 msgid "" "A Task is *done* when the wrapped coroutine either returned a value, raised " "an exception, or the Task was cancelled." msgstr "" -#: library/asyncio-task.rst:1215 +#: library/asyncio-task.rst:1228 msgid "Return the result of the Task." msgstr "" -#: library/asyncio-task.rst:1217 +#: library/asyncio-task.rst:1230 msgid "" "If the Task is *done*, the result of the wrapped coroutine is returned (or " "if the coroutine raised an exception, that exception is re-raised.)" msgstr "" -#: library/asyncio-task.rst:1235 +#: library/asyncio-task.rst:1248 msgid "" "If the Task has been *cancelled*, this method raises a :exc:`CancelledError` " "exception." msgstr "" -#: library/asyncio-task.rst:1224 +#: library/asyncio-task.rst:1237 msgid "" "If the Task's result isn't yet available, this method raises an :exc:" "`InvalidStateError` exception." msgstr "" -#: library/asyncio-task.rst:1229 +#: library/asyncio-task.rst:1242 msgid "Return the exception of the Task." msgstr "" -#: library/asyncio-task.rst:1231 +#: library/asyncio-task.rst:1244 msgid "" "If the wrapped coroutine raised an exception that exception is returned. If " "the wrapped coroutine returned normally this method returns ``None``." msgstr "" -#: library/asyncio-task.rst:1238 +#: library/asyncio-task.rst:1251 msgid "" "If the Task isn't *done* yet, this method raises an :exc:`InvalidStateError` " "exception." msgstr "" -#: library/asyncio-task.rst:1243 +#: library/asyncio-task.rst:1256 msgid "Add a callback to be run when the Task is *done*." msgstr "" -#: library/asyncio-task.rst:1254 +#: library/asyncio-task.rst:1267 msgid "This method should only be used in low-level callback-based code." msgstr "" -#: library/asyncio-task.rst:1247 +#: library/asyncio-task.rst:1260 msgid "" "See the documentation of :meth:`Future.add_done_callback` for more details." msgstr "" -#: library/asyncio-task.rst:1252 +#: library/asyncio-task.rst:1265 msgid "Remove *callback* from the callbacks list." msgstr "" -#: library/asyncio-task.rst:1256 +#: library/asyncio-task.rst:1269 msgid "" "See the documentation of :meth:`Future.remove_done_callback` for more " "details." msgstr "" -#: library/asyncio-task.rst:1261 +#: library/asyncio-task.rst:1274 msgid "Return the list of stack frames for this Task." msgstr "" -#: library/asyncio-task.rst:1263 +#: library/asyncio-task.rst:1276 msgid "" "If the wrapped coroutine is not done, this returns the stack where it is " "suspended. If the coroutine has completed successfully or was cancelled, " @@ -1631,15 +1656,15 @@ msgid "" "this returns the list of traceback frames." msgstr "" -#: library/asyncio-task.rst:1269 +#: library/asyncio-task.rst:1282 msgid "The frames are always ordered from oldest to newest." msgstr "" -#: library/asyncio-task.rst:1271 +#: library/asyncio-task.rst:1284 msgid "Only one stack frame is returned for a suspended coroutine." msgstr "" -#: library/asyncio-task.rst:1273 +#: library/asyncio-task.rst:1286 msgid "" "The optional *limit* argument sets the maximum number of frames to return; " "by default all available frames are returned. The ordering of the returned " @@ -1648,87 +1673,87 @@ msgid "" "are returned. (This matches the behavior of the traceback module.)" msgstr "" -#: library/asyncio-task.rst:1282 +#: library/asyncio-task.rst:1295 msgid "Print the stack or traceback for this Task." msgstr "" -#: library/asyncio-task.rst:1284 +#: library/asyncio-task.rst:1297 msgid "" "This produces output similar to that of the traceback module for the frames " "retrieved by :meth:`get_stack`." msgstr "" -#: library/asyncio-task.rst:1287 +#: library/asyncio-task.rst:1300 msgid "The *limit* argument is passed to :meth:`get_stack` directly." msgstr "" -#: library/asyncio-task.rst:1289 +#: library/asyncio-task.rst:1302 msgid "" "The *file* argument is an I/O stream to which the output is written; by " "default output is written to :data:`sys.stdout`." msgstr "" -#: library/asyncio-task.rst:1294 +#: library/asyncio-task.rst:1307 msgid "Return the coroutine object wrapped by the :class:`Task`." msgstr "" -#: library/asyncio-task.rst:1298 +#: library/asyncio-task.rst:1311 msgid "" "This will return ``None`` for Tasks which have already completed eagerly. " "See the :ref:`Eager Task Factory `." msgstr "" -#: library/asyncio-task.rst:1305 +#: library/asyncio-task.rst:1318 msgid "Newly added eager task execution means result may be ``None``." msgstr "" -#: library/asyncio-task.rst:1309 +#: library/asyncio-task.rst:1322 msgid "" "Return the :class:`contextvars.Context` object associated with the task." msgstr "" -#: library/asyncio-task.rst:1316 +#: library/asyncio-task.rst:1329 msgid "Return the name of the Task." msgstr "" -#: library/asyncio-task.rst:1318 +#: library/asyncio-task.rst:1331 msgid "" "If no name has been explicitly assigned to the Task, the default asyncio " "Task implementation generates a default name during instantiation." msgstr "" -#: library/asyncio-task.rst:1326 +#: library/asyncio-task.rst:1339 msgid "Set the name of the Task." msgstr "" -#: library/asyncio-task.rst:1328 +#: library/asyncio-task.rst:1341 msgid "" "The *value* argument can be any object, which is then converted to a string." msgstr "" -#: library/asyncio-task.rst:1331 +#: library/asyncio-task.rst:1344 msgid "" "In the default Task implementation, the name will be visible in the :func:" "`repr` output of a task object." msgstr "" -#: library/asyncio-task.rst:1338 +#: library/asyncio-task.rst:1351 msgid "Request the Task to be cancelled." msgstr "" -#: library/asyncio-task.rst:1340 +#: library/asyncio-task.rst:1353 msgid "" "If the Task is already *done* or *cancelled*, return ``False``, otherwise, " "return ``True``." msgstr "" -#: library/asyncio-task.rst:1343 +#: library/asyncio-task.rst:1356 msgid "" "The method arranges for a :exc:`CancelledError` exception to be thrown into " "the wrapped coroutine on the next cycle of the event loop." msgstr "" -#: library/asyncio-task.rst:1346 +#: library/asyncio-task.rst:1359 msgid "" "The coroutine then has a chance to clean up or even deny the request by " "suppressing the exception with a :keyword:`try` ... ... ``except " @@ -1740,21 +1765,21 @@ msgid "" "addition to catching the exception." msgstr "" -#: library/asyncio-task.rst:1356 +#: library/asyncio-task.rst:1369 msgid "Added the *msg* parameter." msgstr "" -#: library/asyncio-task.rst:1359 +#: library/asyncio-task.rst:1372 msgid "The ``msg`` parameter is propagated from cancelled task to its awaiter." msgstr "" -#: library/asyncio-task.rst:1364 +#: library/asyncio-task.rst:1377 msgid "" "The following example illustrates how coroutines can intercept the " "cancellation request::" msgstr "" -#: library/asyncio-task.rst:1367 +#: library/asyncio-task.rst:1380 msgid "" "async def cancel_me():\n" " print('cancel_me(): before sleep')\n" @@ -1791,32 +1816,32 @@ msgid "" "# main(): cancel_me is cancelled now" msgstr "" -#: library/asyncio-task.rst:1403 +#: library/asyncio-task.rst:1416 msgid "Return ``True`` if the Task is *cancelled*." msgstr "" -#: library/asyncio-task.rst:1405 +#: library/asyncio-task.rst:1418 msgid "" "The Task is *cancelled* when the cancellation was requested with :meth:" "`cancel` and the wrapped coroutine propagated the :exc:`CancelledError` " "exception thrown into it." msgstr "" -#: library/asyncio-task.rst:1411 +#: library/asyncio-task.rst:1424 msgid "Decrement the count of cancellation requests to this Task." msgstr "" -#: library/asyncio-task.rst:1413 +#: library/asyncio-task.rst:1426 msgid "Returns the remaining number of cancellation requests." msgstr "" -#: library/asyncio-task.rst:1415 +#: library/asyncio-task.rst:1428 msgid "" "Note that once execution of a cancelled task completed, further calls to :" "meth:`uncancel` are ineffective." msgstr "" -#: library/asyncio-task.rst:1420 +#: library/asyncio-task.rst:1433 msgid "" "This method is used by asyncio's internals and isn't expected to be used by " "end-user code. In particular, if a Task gets successfully uncancelled, this " @@ -1825,7 +1850,7 @@ msgid "" "respective structured block. For example::" msgstr "" -#: library/asyncio-task.rst:1427 +#: library/asyncio-task.rst:1440 msgid "" "async def make_request_with_timeout():\n" " try:\n" @@ -1839,7 +1864,7 @@ msgid "" " await unrelated_code()" msgstr "" -#: library/asyncio-task.rst:1438 +#: library/asyncio-task.rst:1451 msgid "" "While the block with ``make_request()`` and ``make_another_request()`` might " "get cancelled due to the timeout, ``unrelated_code()`` should continue " @@ -1848,14 +1873,14 @@ msgid "" "similar fashion." msgstr "" -#: library/asyncio-task.rst:1444 +#: library/asyncio-task.rst:1457 msgid "" "If end-user code is, for some reason, suppressing cancellation by catching :" "exc:`CancelledError`, it needs to call this method to remove the " "cancellation state." msgstr "" -#: library/asyncio-task.rst:1448 +#: library/asyncio-task.rst:1461 msgid "" "When this method decrements the cancellation count to zero, the method " "checks if a previous :meth:`cancel` call had arranged for :exc:" @@ -1864,17 +1889,17 @@ msgid "" "``_must_cancel`` flag)." msgstr "" -#: library/asyncio-task.rst:1454 +#: library/asyncio-task.rst:1467 msgid "Changed to rescind pending cancellation requests upon reaching zero." msgstr "" -#: library/asyncio-task.rst:1459 +#: library/asyncio-task.rst:1472 msgid "" "Return the number of pending cancellation requests to this Task, i.e., the " "number of calls to :meth:`cancel` less the number of :meth:`uncancel` calls." msgstr "" -#: library/asyncio-task.rst:1463 +#: library/asyncio-task.rst:1476 msgid "" "Note that if this number is greater than zero but the Task is still " "executing, :meth:`cancelled` will still return ``False``. This is because " @@ -1883,7 +1908,7 @@ msgid "" "to zero." msgstr "" -#: library/asyncio-task.rst:1469 +#: library/asyncio-task.rst:1482 msgid "" "This method is used by asyncio's internals and isn't expected to be used by " "end-user code. See :meth:`uncancel` for more details." diff --git a/library/asyncio.po b/library/asyncio.po index b2ad7bf9f..86d768099 100644 --- a/library/asyncio.po +++ b/library/asyncio.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/asyncore.po b/library/asyncore.po index e6e1af0f4..edb1998d0 100644 --- a/library/asyncore.po +++ b/library/asyncore.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/atexit.po b/library/atexit.po index e5c239b79..e37c37504 100644 --- a/library/atexit.po +++ b/library/atexit.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/audioop.po b/library/audioop.po index 72dbff41f..d4ae6f2f6 100644 --- a/library/audioop.po +++ b/library/audioop.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/audit_events.po b/library/audit_events.po index bda7fd6c1..c4e608bad 100644 --- a/library/audit_events.po +++ b/library/audit_events.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/base64.po b/library/base64.po index 342f0254d..41447d622 100644 --- a/library/base64.po +++ b/library/base64.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -30,11 +30,12 @@ msgid "" "This module provides functions for encoding binary data to printable ASCII " "characters and decoding such encodings back to binary data. This includes " "the :ref:`encodings specified in ` :rfc:`4648` (Base64, " -"Base32 and Base16) and the non-standard :ref:`Base85 encodings `." +"Base32 and Base16), the :ref:`Base85 encoding ` specified in " +"`PDF 2.0 `_, and non-standard " +"variants of Base85 used elsewhere." msgstr "" -#: library/base64.rst:22 +#: library/base64.rst:24 msgid "" "There are two interfaces provided by this module. The modern interface " "supports encoding :term:`bytes-like objects ` to ASCII :" @@ -43,7 +44,7 @@ msgid "" "defined in :rfc:`4648` (normal, and URL- and filesystem-safe) are supported." msgstr "" -#: library/base64.rst:28 +#: library/base64.rst:30 msgid "" "The :ref:`legacy interface ` does not support decoding from " "strings, but it does provide functions for encoding and decoding to and " @@ -53,37 +54,37 @@ msgid "" "want to be looking at the :mod:`email` package instead." msgstr "" -#: library/base64.rst:36 +#: library/base64.rst:38 msgid "" "ASCII-only Unicode strings are now accepted by the decoding functions of the " "modern interface." msgstr "" -#: library/base64.rst:40 +#: library/base64.rst:42 msgid "" "Any :term:`bytes-like objects ` are now accepted by all " "encoding and decoding functions in this module. Ascii85/Base85 support " "added." msgstr "" -#: library/base64.rst:48 +#: library/base64.rst:50 msgid "RFC 4648 Encodings" msgstr "" -#: library/base64.rst:50 +#: library/base64.rst:52 msgid "" "The :rfc:`4648` encodings are suitable for encoding binary data so that it " "can be safely sent by email, used as parts of URLs, or included as part of " "an HTTP POST request." msgstr "" -#: library/base64.rst:56 +#: library/base64.rst:58 msgid "" "Encode the :term:`bytes-like object` *s* using Base64 and return the " "encoded :class:`bytes`." msgstr "" -#: library/base64.rst:59 +#: library/base64.rst:61 msgid "" "Optional *altchars* must be a :term:`bytes-like object` of length 2 which " "specifies an alternative alphabet for the ``+`` and ``/`` characters. This " @@ -92,32 +93,32 @@ msgid "" "used." msgstr "" -#: library/base64.rst:64 +#: library/base64.rst:66 msgid "" "May assert or raise a :exc:`ValueError` if the length of *altchars* is not " "2. Raises a :exc:`TypeError` if *altchars* is not a :term:`bytes-like " "object`." msgstr "" -#: library/base64.rst:70 +#: library/base64.rst:72 msgid "" "Decode the Base64 encoded :term:`bytes-like object` or ASCII string *s* and " "return the decoded :class:`bytes`." msgstr "" -#: library/base64.rst:73 +#: library/base64.rst:75 msgid "" "Optional *altchars* must be a :term:`bytes-like object` or ASCII string of " "length 2 which specifies the alternative alphabet used instead of the ``+`` " "and ``/`` characters." msgstr "" -#: library/base64.rst:77 +#: library/base64.rst:79 msgid "" "A :exc:`binascii.Error` exception is raised if *s* is incorrectly padded." msgstr "" -#: library/base64.rst:80 +#: library/base64.rst:82 msgid "" "If *validate* is ``False`` (the default), characters that are neither in the " "normal base-64 alphabet nor the alternative alphabet are discarded prior to " @@ -125,30 +126,30 @@ msgid "" "in the input result in a :exc:`binascii.Error`." msgstr "" -#: library/base64.rst:86 +#: library/base64.rst:88 msgid "" "For more information about the strict base64 check, see :func:`binascii." "a2b_base64`" msgstr "" -#: library/base64.rst:88 +#: library/base64.rst:90 msgid "" "May assert or raise a :exc:`ValueError` if the length of *altchars* is not 2." msgstr "" -#: library/base64.rst:92 +#: library/base64.rst:94 msgid "" "Encode :term:`bytes-like object` *s* using the standard Base64 alphabet and " "return the encoded :class:`bytes`." msgstr "" -#: library/base64.rst:98 +#: library/base64.rst:100 msgid "" "Decode :term:`bytes-like object` or ASCII string *s* using the standard " "Base64 alphabet and return the decoded :class:`bytes`." msgstr "" -#: library/base64.rst:104 +#: library/base64.rst:106 msgid "" "Encode :term:`bytes-like object` *s* using the URL- and filesystem-safe " "alphabet, which substitutes ``-`` instead of ``+`` and ``_`` instead of ``/" @@ -156,7 +157,7 @@ msgid "" "The result can still contain ``=``." msgstr "" -#: library/base64.rst:113 +#: library/base64.rst:115 msgid "" "Decode :term:`bytes-like object` or ASCII string *s* using the URL- and " "filesystem-safe alphabet, which substitutes ``-`` instead of ``+`` and ``_`` " @@ -164,25 +165,25 @@ msgid "" "class:`bytes`." msgstr "" -#: library/base64.rst:122 +#: library/base64.rst:124 msgid "" "Encode the :term:`bytes-like object` *s* using Base32 and return the " "encoded :class:`bytes`." msgstr "" -#: library/base64.rst:128 +#: library/base64.rst:130 msgid "" "Decode the Base32 encoded :term:`bytes-like object` or ASCII string *s* and " "return the decoded :class:`bytes`." msgstr "" -#: library/base64.rst:179 +#: library/base64.rst:181 msgid "" "Optional *casefold* is a flag specifying whether a lowercase alphabet is " "acceptable as input. For security purposes, the default is ``False``." msgstr "" -#: library/base64.rst:135 +#: library/base64.rst:137 msgid "" ":rfc:`4648` allows for optional mapping of the digit 0 (zero) to the letter " "O (oh), and for optional mapping of the digit 1 (one) to either the letter I " @@ -193,25 +194,25 @@ msgid "" "input." msgstr "" -#: library/base64.rst:183 +#: library/base64.rst:185 msgid "" "A :exc:`binascii.Error` is raised if *s* is incorrectly padded or if there " "are non-alphabet characters present in the input." msgstr "" -#: library/base64.rst:149 +#: library/base64.rst:151 msgid "" "Similar to :func:`b32encode` but uses the Extended Hex Alphabet, as defined " "in :rfc:`4648`." msgstr "" -#: library/base64.rst:157 +#: library/base64.rst:159 msgid "" "Similar to :func:`b32decode` but uses the Extended Hex Alphabet, as defined " "in :rfc:`4648`." msgstr "" -#: library/base64.rst:160 +#: library/base64.rst:162 msgid "" "This version does not allow the digit 0 (zero) to the letter O (oh) and " "digit 1 (one) to either the letter I (eye) or letter L (el) mappings, all " @@ -219,159 +220,183 @@ msgid "" "interchangeable." msgstr "" -#: library/base64.rst:170 +#: library/base64.rst:172 msgid "" "Encode the :term:`bytes-like object` *s* using Base16 and return the " "encoded :class:`bytes`." msgstr "" -#: library/base64.rst:176 +#: library/base64.rst:178 msgid "" "Decode the Base16 encoded :term:`bytes-like object` or ASCII string *s* and " "return the decoded :class:`bytes`." msgstr "" -#: library/base64.rst:190 +#: library/base64.rst:192 msgid "Base85 Encodings" msgstr "" -#: library/base64.rst:192 +#: library/base64.rst:194 msgid "" -"Base85 encoding is not formally specified but rather a de facto standard, " -"thus different systems perform the encoding differently." +"Base85 encoding is a family of algorithms which represent four bytes using " +"five ASCII characters. Originally implemented in the Unix ``btoa(1)`` " +"utility, a version of it was later adopted by Adobe in the PostScript " +"language and is standardized in PDF 2.0 (ISO 32000-2). This version, in both " +"its ``btoa`` and PDF variants, is implemented by :func:`a85encode`." msgstr "" -#: library/base64.rst:195 +#: library/base64.rst:201 msgid "" -"The :func:`a85encode` and :func:`b85encode` functions in this module are two " -"implementations of the de facto standard. You should call the function with " -"the Base85 implementation used by the software you intend to work with." +"A separate version, using a different output character set, was defined as " +"an April Fool's joke in :rfc:`1924` but is now used by Git and other " +"software. This version is implemented by :func:`b85encode`." msgstr "" -#: library/base64.rst:199 +#: library/base64.rst:205 msgid "" -"The two functions present in this module differ in how they handle the " -"following:" +"Finally, a third version, using yet another output character set designed " +"for safe inclusion in programming language strings, is defined by ZeroMQ and " +"implemented here by :func:`z85encode`." msgstr "" -#: library/base64.rst:201 -msgid "Whether to include enclosing ``<~`` and ``~>`` markers" +#: library/base64.rst:209 +msgid "" +"The functions present in this module differ in how they handle the following:" +msgstr "" + +#: library/base64.rst:211 +msgid "Whether to include and expect enclosing ``<~`` and ``~>`` markers." msgstr "" -#: library/base64.rst:202 -msgid "Whether to include newline characters" +#: library/base64.rst:212 +msgid "Whether to fold the input into multiple lines." msgstr "" -#: library/base64.rst:203 -msgid "The set of ASCII characters used for encoding" +#: library/base64.rst:213 +msgid "The set of ASCII characters used for encoding." +msgstr "" + +#: library/base64.rst:214 +msgid "Compact encodings of sequences of spaces and null bytes." msgstr "" -#: library/base64.rst:204 -msgid "Handling of null bytes" +#: library/base64.rst:215 +msgid "The encoding of zero-padding bytes applied to the input." msgstr "" -#: library/base64.rst:206 +#: library/base64.rst:217 msgid "" "Refer to the documentation of the individual functions for more information." msgstr "" -#: library/base64.rst:210 +#: library/base64.rst:221 msgid "" "Encode the :term:`bytes-like object` *b* using Ascii85 and return the " "encoded :class:`bytes`." msgstr "" -#: library/base64.rst:213 +#: library/base64.rst:224 msgid "" "*foldspaces* is an optional flag that uses the special short sequence 'y' " "instead of 4 consecutive spaces (ASCII 0x20) as supported by 'btoa'. This " -"feature is not supported by the \"standard\" Ascii85 encoding." +"feature is not supported by the standard encoding used in PDF." msgstr "" -#: library/base64.rst:217 +#: library/base64.rst:228 msgid "" "*wrapcol* controls whether the output should have newline (``b'\\n'``) " "characters added to it. If this is non-zero, each output line will be at " "most this many characters long, excluding the trailing newline." msgstr "" -#: library/base64.rst:221 +#: library/base64.rst:232 msgid "" -"*pad* controls whether the input is padded to a multiple of 4 before " -"encoding. Note that the ``btoa`` implementation always pads." +"*pad* controls whether zero-padding applied to the end of the input is fully " +"retained in the output encoding, as done by ``btoa``, producing an exact " +"multiple of 5 bytes of output. This is not part of the standard encoding " +"used in PDF, as it does not preserve the length of the data." msgstr "" -#: library/base64.rst:224 +#: library/base64.rst:238 msgid "" "*adobe* controls whether the encoded byte sequence is framed with ``<~`` and " -"``~>``, which is used by the Adobe implementation." +"``~>``, as in a PostScript base-85 string literal. Note that while " +"ASCII85Decode streams in PDF documents *must* be terminated with ``~>``, " +"they *must not* use a leading ``<~``." msgstr "" -#: library/base64.rst:232 +#: library/base64.rst:248 msgid "" "Decode the Ascii85 encoded :term:`bytes-like object` or ASCII string *b* and " "return the decoded :class:`bytes`." msgstr "" -#: library/base64.rst:235 +#: library/base64.rst:251 msgid "" "*foldspaces* is a flag that specifies whether the 'y' short sequence should " "be accepted as shorthand for 4 consecutive spaces (ASCII 0x20). This feature " -"is not supported by the \"standard\" Ascii85 encoding." +"is not supported by the standard Ascii85 encoding used in PDF and PostScript." msgstr "" -#: library/base64.rst:239 +#: library/base64.rst:256 msgid "" -"*adobe* controls whether the input sequence is in Adobe Ascii85 format (i.e. " -"is framed with <~ and ~>)." +"*adobe* controls whether the ``<~`` and ``~>`` markers are present. While " +"the leading ``<~`` is not required, the input must end with ``~>``, or a :" +"exc:`ValueError` is raised." msgstr "" -#: library/base64.rst:242 +#: library/base64.rst:260 msgid "" -"*ignorechars* should be a :term:`bytes-like object` or ASCII string " -"containing characters to ignore from the input. This should only contain " -"whitespace characters, and by default contains all whitespace characters in " -"ASCII." +"*ignorechars* should be a byte string containing characters to ignore from " +"the input. This should only contain whitespace characters, and by default " +"contains all whitespace characters in ASCII." msgstr "" -#: library/base64.rst:252 +#: library/base64.rst:269 msgid "" "Encode the :term:`bytes-like object` *b* using base85 (as used in e.g. git-" "style binary diffs) and return the encoded :class:`bytes`." msgstr "" -#: library/base64.rst:255 +#: library/base64.rst:272 msgid "" -"If *pad* is true, the input is padded with ``b'\\0'`` so its length is a " -"multiple of 4 bytes before encoding." +"The input is padded with ``b'\\0'`` so its length is a multiple of 4 bytes " +"before encoding. If *pad* is true, all the resulting characters are " +"retained in the output, which will always be a multiple of 5 bytes, and thus " +"the length of the data may not be preserved on decoding." msgstr "" -#: library/base64.rst:263 +#: library/base64.rst:283 msgid "" "Decode the base85-encoded :term:`bytes-like object` or ASCII string *b* and " -"return the decoded :class:`bytes`. Padding is implicitly removed, if " -"necessary." +"return the decoded :class:`bytes`." msgstr "" -#: library/base64.rst:272 +#: library/base64.rst:291 msgid "" "Encode the :term:`bytes-like object` *s* using Z85 (as used in ZeroMQ) and " -"return the encoded :class:`bytes`. See `Z85 specification `_ for more information." +"return the encoded :class:`bytes`." msgstr "" -#: library/base64.rst:281 +#: library/base64.rst:294 +msgid "" +"The `ZeroMQ specification `_ requires the " +"length of Z85-encoded data to be a multiple of 5 bytes. To produce compliant " +"data frames, you must pad the input data to this function to a multiple of 4 " +"bytes." +msgstr "" + +#: library/base64.rst:304 msgid "" "Decode the Z85-encoded :term:`bytes-like object` or ASCII string *s* and " -"return the decoded :class:`bytes`. See `Z85 specification `_ for more information." +"return the decoded :class:`bytes`." msgstr "" -#: library/base64.rst:291 +#: library/base64.rst:313 msgid "Legacy Interface" msgstr "" -#: library/base64.rst:295 +#: library/base64.rst:317 msgid "" "Decode the contents of the binary *input* file and write the resulting " "binary data to the *output* file. *input* and *output* must be :term:`file " @@ -379,13 +404,13 @@ msgid "" "returns an empty bytes object." msgstr "" -#: library/base64.rst:303 +#: library/base64.rst:325 msgid "" "Decode the :term:`bytes-like object` *s*, which must contain one or more " "lines of base64 encoded data, and return the decoded :class:`bytes`." msgstr "" -#: library/base64.rst:311 +#: library/base64.rst:333 msgid "" "Encode the contents of the binary *input* file and write the resulting " "base64 encoded data to the *output* file. *input* and *output* must be :term:" @@ -395,7 +420,7 @@ msgid "" "the output always ends with a newline, as per :rfc:`2045` (MIME)." msgstr "" -#: library/base64.rst:321 +#: library/base64.rst:343 msgid "" "Encode the :term:`bytes-like object` *s*, which can contain arbitrary binary " "data, and return :class:`bytes` containing the base64-encoded data, with " @@ -403,43 +428,66 @@ msgid "" "that there is a trailing newline, as per :rfc:`2045` (MIME)." msgstr "" -#: library/base64.rst:329 +#: library/base64.rst:351 msgid "An example usage of the module:" msgstr "" -#: library/base64.rst:342 +#: library/base64.rst:364 msgid "Security Considerations" msgstr "" -#: library/base64.rst:344 +#: library/base64.rst:366 msgid "" "A new security considerations section was added to :rfc:`4648` (section 12); " "it's recommended to review the security section for any code deployed to " "production." msgstr "" -#: library/base64.rst:349 +#: library/base64.rst:371 msgid "Module :mod:`binascii`" msgstr "" -#: library/base64.rst:350 +#: library/base64.rst:372 msgid "" "Support module containing ASCII-to-binary and binary-to-ASCII conversions." msgstr "" -#: library/base64.rst:352 +#: library/base64.rst:374 msgid "" ":rfc:`1521` - MIME (Multipurpose Internet Mail Extensions) Part One: " "Mechanisms for Specifying and Describing the Format of Internet Message " "Bodies" msgstr "" -#: library/base64.rst:353 +#: library/base64.rst:375 msgid "" "Section 5.2, \"Base64 Content-Transfer-Encoding,\" provides the definition " "of the base64 encoding." msgstr "" +#: library/base64.rst:378 +msgid "" +"`ISO 32000-2 Portable document format - Part 2: PDF 2.0 `_" +msgstr "" + +#: library/base64.rst:379 +msgid "" +"Section 7.4.3, \"ASCII85Decode Filter,\" provides the definition of the " +"Ascii85 encoding used in PDF and PostScript, including the output character " +"set and the details of data length preservation using zero-padding and " +"partial output groups." +msgstr "" + +#: library/base64.rst:384 +msgid "`ZeroMQ RFC 32/Z85 `_" +msgstr "" + +#: library/base64.rst:385 +msgid "" +"The \"Formal Specification\" section provides the character set used in Z85." +msgstr "" + #: library/base64.rst:10 msgid "base64" msgstr "" diff --git a/library/bdb.po b/library/bdb.po index fed24136b..9cb602427 100644 --- a/library/bdb.po +++ b/library/bdb.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/binary.po b/library/binary.po index cdc8b4dd4..6c0fd217e 100644 --- a/library/binary.po +++ b/library/binary.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/binascii.po b/library/binascii.po index 0e20bdebf..6015c3217 100644 --- a/library/binascii.po +++ b/library/binascii.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/bisect.po b/library/bisect.po index cb2a7cbbc..883499d94 100644 --- a/library/bisect.po +++ b/library/bisect.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -256,9 +256,9 @@ msgstr "" #: library/bisect.rst:206 msgid "" -">>> def grade(score, breakpoints=[60, 70, 80, 90], grades='FDCBA'):\n" -"... i = bisect(breakpoints, score)\n" -"... return grades[i]\n" +">>> def grade(score):\n" +"... i = bisect([60, 70, 80, 90], score)\n" +"... return \"FDCBA\"[i]\n" "...\n" ">>> [grade(score) for score in [33, 99, 77, 70, 89, 90, 100]]\n" "['F', 'A', 'C', 'C', 'B', 'A', 'A']" diff --git a/library/builtins.po b/library/builtins.po index e91f57c74..2b59406cd 100644 --- a/library/builtins.po +++ b/library/builtins.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/bz2.po b/library/bz2.po index 5c103e001..3d1349f1b 100644 --- a/library/bz2.po +++ b/library/bz2.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/calendar.po b/library/calendar.po index 2b0c45b3b..6b9f4b278 100644 --- a/library/calendar.po +++ b/library/calendar.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -85,7 +85,7 @@ msgstr "" #: library/calendar.rst:59 msgid "" -"Set the first weekday to *firstweekday*, passed as an :class:`int` (0--6)" +"Set the first weekday to *firstweekday*, passed as an :class:`int` (0--6)." msgstr "" #: library/calendar.rst:61 @@ -94,7 +94,7 @@ msgstr "" #: library/calendar.rst:65 msgid "" -"Return an iterator for the week day numbers that will be used for one week. " +"Return an iterator for the weekday numbers that will be used for one week. " "The first value from the iterator will be the same as the value of the :attr:" "`~Calendar.firstweekday` property." msgstr "" @@ -120,7 +120,7 @@ msgid "" "Return an iterator for the month *month* in the year *year* similar to :meth:" "`itermonthdates`, but not restricted by the :class:`datetime.date` range. " "Days returned will be tuples consisting of a day of the month number and a " -"week day number." +"weekday number." msgstr "" #: library/calendar.rst:96 @@ -447,7 +447,7 @@ msgstr "" #: library/calendar.rst:403 msgid "" -"Returns weekday of first day of the month and number of days in month, for " +"Returns weekday of first day of the month and number of days in month, for " "the specified *year* and *month*." msgstr "" @@ -484,7 +484,7 @@ msgid "" "An unrelated but handy function that takes a time tuple such as returned by " "the :func:`~time.gmtime` function in the :mod:`time` module, and returns the " "corresponding Unix timestamp value, assuming an epoch of 1970, and the POSIX " -"encoding. In fact, :func:`time.gmtime` and :func:`timegm` are each others' " +"encoding. In fact, :func:`time.gmtime` and :func:`timegm` are each other's " "inverse." msgstr "" @@ -550,64 +550,70 @@ msgstr "" #: library/calendar.rst:542 msgid "" -"A subclass of :exc:`ValueError`, raised when the given month number is " -"outside of the range 1-12 (inclusive)." +"A subclass of :exc:`ValueError` and :exc:`IndexError`, raised when the given " +"month number is outside of the range 1-12 (inclusive)." msgstr "" -#: library/calendar.rst:547 -msgid "The invalid month number." +#: library/calendar.rst:545 +msgid "" +":exc:`IllegalMonthError` is now also a subclass of :exc:`ValueError`. New " +"code should avoid catching :exc:`IndexError`." msgstr "" #: library/calendar.rst:552 +msgid "The invalid month number." +msgstr "" + +#: library/calendar.rst:557 msgid "" "A subclass of :exc:`ValueError`, raised when the given weekday number is " "outside of the range 0-6 (inclusive)." msgstr "" -#: library/calendar.rst:557 +#: library/calendar.rst:562 msgid "The invalid weekday number." msgstr "" -#: library/calendar.rst:562 +#: library/calendar.rst:567 msgid "Module :mod:`datetime`" msgstr "" -#: library/calendar.rst:563 +#: library/calendar.rst:568 msgid "" "Object-oriented interface to dates and times with similar functionality to " "the :mod:`time` module." msgstr "" -#: library/calendar.rst:566 +#: library/calendar.rst:571 msgid "Module :mod:`time`" msgstr "" -#: library/calendar.rst:567 +#: library/calendar.rst:572 msgid "Low-level time related functions." msgstr "" -#: library/calendar.rst:573 +#: library/calendar.rst:578 msgid "Command-Line Usage" msgstr "" -#: library/calendar.rst:577 +#: library/calendar.rst:582 msgid "" "The :mod:`calendar` module can be executed as a script from the command line " "to interactively print a calendar." msgstr "" -#: library/calendar.rst:580 +#: library/calendar.rst:585 msgid "" "python -m calendar [-h] [-L LOCALE] [-e ENCODING] [-t {text,html}]\n" " [-w WIDTH] [-l LINES] [-s SPACING] [-m MONTHS] [-c CSS]\n" " [-f FIRST_WEEKDAY] [year] [month]" msgstr "" -#: library/calendar.rst:587 +#: library/calendar.rst:592 msgid "For example, to print a calendar for the year 2000:" msgstr "" -#: library/calendar.rst:589 +#: library/calendar.rst:594 msgid "" "$ python -m calendar 2000\n" " 2000\n" @@ -648,76 +654,76 @@ msgid "" "30 31" msgstr "" -#: library/calendar.rst:630 +#: library/calendar.rst:635 msgid "The following options are accepted:" msgstr "" -#: library/calendar.rst:637 +#: library/calendar.rst:642 msgid "Show the help message and exit." msgstr "" -#: library/calendar.rst:642 +#: library/calendar.rst:647 msgid "The locale to use for month and weekday names. Defaults to English." msgstr "" -#: library/calendar.rst:648 +#: library/calendar.rst:653 msgid "" "The encoding to use for output. :option:`--encoding` is required if :option:" "`--locale` is set." msgstr "" -#: library/calendar.rst:654 +#: library/calendar.rst:659 msgid "Print the calendar to the terminal as text, or as an HTML document." msgstr "" -#: library/calendar.rst:660 +#: library/calendar.rst:665 msgid "" "The weekday to start each week. Must be a number between 0 (Monday) and 6 " "(Sunday). Defaults to 0." msgstr "" -#: library/calendar.rst:668 +#: library/calendar.rst:673 msgid "The year to print the calendar for. Defaults to the current year." msgstr "" -#: library/calendar.rst:674 +#: library/calendar.rst:679 msgid "" "The month of the specified :option:`year` to print the calendar for. Must be " "a number between 1 and 12, and may only be used in text mode. Defaults to " "printing a calendar for the full year." msgstr "" -#: library/calendar.rst:680 +#: library/calendar.rst:685 msgid "*Text-mode options:*" msgstr "" -#: library/calendar.rst:684 +#: library/calendar.rst:689 msgid "" "The width of the date column in terminal columns. The date is printed " "centred in the column. Any value lower than 2 is ignored. Defaults to 2." msgstr "" -#: library/calendar.rst:692 +#: library/calendar.rst:697 msgid "" "The number of lines for each week in terminal rows. The date is printed top-" "aligned. Any value lower than 1 is ignored. Defaults to 1." msgstr "" -#: library/calendar.rst:700 +#: library/calendar.rst:705 msgid "" "The space between months in columns. Any value lower than 2 is ignored. " "Defaults to 6." msgstr "" -#: library/calendar.rst:707 +#: library/calendar.rst:712 msgid "The number of months printed per row. Defaults to 3." msgstr "" -#: library/calendar.rst:711 +#: library/calendar.rst:716 msgid "*HTML-mode options:*" msgstr "" -#: library/calendar.rst:715 +#: library/calendar.rst:720 msgid "" "The path of a CSS stylesheet to use for the calendar. This must either be " "relative to the generated HTML, or an absolute HTTP or ``file:///`` URL." diff --git a/library/cgi.po b/library/cgi.po index e5071c811..89882170d 100644 --- a/library/cgi.po +++ b/library/cgi.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/cgitb.po b/library/cgitb.po index ebf17bc58..15c6ce4f1 100644 --- a/library/cgitb.po +++ b/library/cgitb.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/chunk.po b/library/chunk.po index 69525deac..f1b35847c 100644 --- a/library/chunk.po +++ b/library/chunk.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/cmath.po b/library/cmath.po index c5fc06efd..6ac002c84 100644 --- a/library/cmath.po +++ b/library/cmath.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/cmd.po b/library/cmd.po index 31eb488ec..246e35e9a 100644 --- a/library/cmd.po +++ b/library/cmd.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/cmdline.po b/library/cmdline.po index fb8514f0d..30d142307 100644 --- a/library/cmdline.po +++ b/library/cmdline.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/cmdlinelibs.po b/library/cmdlinelibs.po index e926399e1..1f199dc80 100644 --- a/library/cmdlinelibs.po +++ b/library/cmdlinelibs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/code.po b/library/code.po index c22ec20ba..45e1acbbe 100644 --- a/library/code.po +++ b/library/code.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/codecs.po b/library/codecs.po index 019d92c9f..4befdf415 100644 --- a/library/codecs.po +++ b/library/codecs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -391,7 +391,7 @@ msgstr "" msgid "Value" msgstr "" -#: library/codecs.rst:395 library/codecs.rst:1365 library/codecs.rst:1522 +#: library/codecs.rst:395 library/codecs.rst:1365 library/codecs.rst:1530 msgid "Meaning" msgstr "" @@ -1405,11 +1405,11 @@ msgstr "" msgid "an IBM PC code page, which is ASCII compatible" msgstr "" -#: library/codecs.rst:1365 library/codecs.rst:1522 +#: library/codecs.rst:1365 library/codecs.rst:1530 msgid "Codec" msgstr "" -#: library/codecs.rst:1365 library/codecs.rst:1522 +#: library/codecs.rst:1365 library/codecs.rst:1530 msgid "Aliases" msgstr "" @@ -1583,7 +1583,7 @@ msgid "cp858" msgstr "" #: library/codecs.rst:1147 -msgid "858, IBM858" +msgid "858, IBM00858" msgstr "" #: library/codecs.rst:1149 @@ -1748,7 +1748,7 @@ msgid "cp1140" msgstr "" #: library/codecs.rst:1184 -msgid "ibm1140" +msgid "IBM01140" msgstr "" #: library/codecs.rst:1186 @@ -2378,181 +2378,187 @@ msgstr "" msgid "Implement :rfc:`3492`. Stateful codecs are not supported." msgstr "" -#: library/codecs.rst:1389 +#: library/codecs.rst:1391 +msgid "" +"The decoding and encoding algorithms scale poorly, so limit the length of " +"untrusted input." +msgstr "" + +#: library/codecs.rst:1397 msgid "raw_unicode_escape" msgstr "" -#: library/codecs.rst:1389 +#: library/codecs.rst:1397 msgid "" "Latin-1 encoding with :samp:`\\\\u{XXXX}` and :samp:`\\\\U{XXXXXXXX}` for " "other code points. Existing backslashes are not escaped in any way. It is " "used in the Python pickle protocol." msgstr "" -#: library/codecs.rst:1399 +#: library/codecs.rst:1407 msgid "undefined" msgstr "" -#: library/codecs.rst:1399 +#: library/codecs.rst:1407 msgid "This Codec should only be used for testing purposes." msgstr "" -#: library/codecs.rst:1403 +#: library/codecs.rst:1411 msgid "" "Raise an exception for all conversions, even empty strings. The error " "handler is ignored." msgstr "" -#: library/codecs.rst:1408 +#: library/codecs.rst:1416 msgid "unicode_escape" msgstr "" -#: library/codecs.rst:1408 +#: library/codecs.rst:1416 msgid "" "Encoding suitable as the contents of a Unicode literal in ASCII-encoded " "Python source code, except that quotes are not escaped. Decode from Latin-1 " "source code. Beware that Python source code actually uses UTF-8 by default." msgstr "" -#: library/codecs.rst:1420 +#: library/codecs.rst:1428 msgid "\"unicode_internal\" codec is removed." msgstr "" -#: library/codecs.rst:1427 +#: library/codecs.rst:1435 msgid "Binary Transforms" msgstr "" -#: library/codecs.rst:1429 +#: library/codecs.rst:1437 msgid "" "The following codecs provide binary transforms: :term:`bytes-like object` " "to :class:`bytes` mappings. They are not supported by :meth:`bytes.decode` " "(which only produces :class:`str` output)." msgstr "" -#: library/codecs.rst:1437 +#: library/codecs.rst:1445 msgid "Encoder / decoder" msgstr "" -#: library/codecs.rst:1439 +#: library/codecs.rst:1447 msgid "base64_codec [#b64]_" msgstr "" -#: library/codecs.rst:1439 +#: library/codecs.rst:1447 msgid "base64, base_64" msgstr "" -#: library/codecs.rst:1439 +#: library/codecs.rst:1447 msgid "" "Convert the operand to multiline MIME base64 (the result always includes a " "trailing ``'\\n'``)." msgstr "" -#: library/codecs.rst:1444 +#: library/codecs.rst:1452 msgid "" "accepts any :term:`bytes-like object` as input for encoding and decoding" msgstr "" -#: library/codecs.rst:1439 +#: library/codecs.rst:1447 msgid ":meth:`base64.encodebytes` / :meth:`base64.decodebytes`" msgstr "" -#: library/codecs.rst:1450 +#: library/codecs.rst:1458 msgid "bz2_codec" msgstr "" -#: library/codecs.rst:1450 +#: library/codecs.rst:1458 msgid "bz2" msgstr "" -#: library/codecs.rst:1450 +#: library/codecs.rst:1458 msgid "Compress the operand using bz2." msgstr "" -#: library/codecs.rst:1450 +#: library/codecs.rst:1458 msgid ":meth:`bz2.compress` / :meth:`bz2.decompress`" msgstr "" -#: library/codecs.rst:1453 +#: library/codecs.rst:1461 msgid "hex_codec" msgstr "" -#: library/codecs.rst:1453 +#: library/codecs.rst:1461 msgid "hex" msgstr "" -#: library/codecs.rst:1453 +#: library/codecs.rst:1461 msgid "" "Convert the operand to hexadecimal representation, with two digits per byte." msgstr "" -#: library/codecs.rst:1453 +#: library/codecs.rst:1461 msgid ":meth:`binascii.b2a_hex` / :meth:`binascii.a2b_hex`" msgstr "" -#: library/codecs.rst:1458 +#: library/codecs.rst:1466 msgid "quopri_codec" msgstr "" -#: library/codecs.rst:1458 +#: library/codecs.rst:1466 msgid "quopri, quotedprintable, quoted_printable" msgstr "" -#: library/codecs.rst:1458 +#: library/codecs.rst:1466 msgid "Convert the operand to MIME quoted printable." msgstr "" -#: library/codecs.rst:1458 +#: library/codecs.rst:1466 msgid ":meth:`quopri.encode` with ``quotetabs=True`` / :meth:`quopri.decode`" msgstr "" -#: library/codecs.rst:1462 +#: library/codecs.rst:1470 msgid "uu_codec" msgstr "" -#: library/codecs.rst:1462 +#: library/codecs.rst:1470 msgid "uu" msgstr "" -#: library/codecs.rst:1462 +#: library/codecs.rst:1470 msgid "Convert the operand using uuencode." msgstr "" -#: library/codecs.rst:1465 +#: library/codecs.rst:1473 msgid "zlib_codec" msgstr "" -#: library/codecs.rst:1465 +#: library/codecs.rst:1473 msgid "zip, zlib" msgstr "" -#: library/codecs.rst:1465 +#: library/codecs.rst:1473 msgid "Compress the operand using gzip." msgstr "" -#: library/codecs.rst:1465 +#: library/codecs.rst:1473 msgid ":meth:`zlib.compress` / :meth:`zlib.decompress`" msgstr "" -#: library/codecs.rst:1469 +#: library/codecs.rst:1477 msgid "" "In addition to :term:`bytes-like objects `, " "``'base64_codec'`` also accepts ASCII-only instances of :class:`str` for " "decoding" msgstr "" -#: library/codecs.rst:1473 +#: library/codecs.rst:1481 msgid "Restoration of the binary transforms." msgstr "" -#: library/codecs.rst:1476 +#: library/codecs.rst:1484 msgid "Restoration of the aliases for the binary transforms." msgstr "" -#: library/codecs.rst:1483 +#: library/codecs.rst:1491 msgid "Standalone Codec Functions" msgstr "" -#: library/codecs.rst:1485 +#: library/codecs.rst:1493 msgid "" "The following functions provide encoding and decoding functionality similar " "to codecs, but are not available as named codecs through :func:`codecs." @@ -2561,74 +2567,74 @@ msgid "" "removed in Python 3." msgstr "" -#: library/codecs.rst:1492 +#: library/codecs.rst:1500 msgid "" "Encode *input* using escape sequences. Similar to how :func:`repr` on bytes " "produces escaped byte values." msgstr "" -#: library/codecs.rst:1495 +#: library/codecs.rst:1503 msgid "*input* must be a :class:`bytes` object." msgstr "" -#: library/codecs.rst:1506 +#: library/codecs.rst:1514 msgid "" "Returns a tuple ``(output, length)`` where *output* is a :class:`bytes` " "object and *length* is the number of bytes consumed." msgstr "" -#: library/codecs.rst:1502 +#: library/codecs.rst:1510 msgid "Decode *input* from escape sequences back to the original bytes." msgstr "" -#: library/codecs.rst:1504 +#: library/codecs.rst:1512 msgid "*input* must be a :term:`bytes-like object`." msgstr "" -#: library/codecs.rst:1513 +#: library/codecs.rst:1521 msgid "Text Transforms" msgstr "" -#: library/codecs.rst:1515 +#: library/codecs.rst:1523 msgid "" "The following codec provides a text transform: a :class:`str` to :class:" "`str` mapping. It is not supported by :meth:`str.encode` (which only " "produces :class:`bytes` output)." msgstr "" -#: library/codecs.rst:1524 +#: library/codecs.rst:1532 msgid "rot_13" msgstr "" -#: library/codecs.rst:1524 +#: library/codecs.rst:1532 msgid "rot13" msgstr "" -#: library/codecs.rst:1524 +#: library/codecs.rst:1532 msgid "Return the Caesar-cypher encryption of the operand." msgstr "" -#: library/codecs.rst:1529 +#: library/codecs.rst:1537 msgid "Restoration of the ``rot_13`` text transform." msgstr "" -#: library/codecs.rst:1532 +#: library/codecs.rst:1540 msgid "Restoration of the ``rot13`` alias." msgstr "" -#: library/codecs.rst:1537 +#: library/codecs.rst:1545 msgid ":mod:`encodings` --- Encodings package" msgstr "" -#: library/codecs.rst:1542 +#: library/codecs.rst:1550 msgid "This module implements the following functions:" msgstr "" -#: library/codecs.rst:1546 +#: library/codecs.rst:1554 msgid "Normalize encoding name *encoding*." msgstr "" -#: library/codecs.rst:1548 +#: library/codecs.rst:1556 msgid "" "Normalization works as follows: all non-alphanumeric characters except the " "dot used for Python package names are collapsed and replaced with a single " @@ -2636,23 +2642,23 @@ msgid "" "-;#'`` becomes ``'_'``." msgstr "" -#: library/codecs.rst:1553 +#: library/codecs.rst:1561 msgid "Note that *encoding* should be ASCII only." msgstr "" -#: library/codecs.rst:1557 +#: library/codecs.rst:1565 msgid "" "The following function should not be used directly, except for testing " "purposes; :func:`codecs.lookup` should be used instead." msgstr "" -#: library/codecs.rst:1563 +#: library/codecs.rst:1571 msgid "" "Search for the codec module corresponding to the given encoding name " "*encoding*." msgstr "" -#: library/codecs.rst:1566 +#: library/codecs.rst:1574 msgid "" "This function first normalizes the *encoding* using :func:" "`normalize_encoding`, then looks for a corresponding alias. It attempts to " @@ -2662,26 +2668,26 @@ msgid "" "the codec is cached and returned." msgstr "" -#: library/codecs.rst:1573 +#: library/codecs.rst:1581 msgid "" "If the codec module defines a ``getaliases()`` function any returned aliases " "are registered for future use." msgstr "" -#: library/codecs.rst:1577 +#: library/codecs.rst:1585 msgid "This module implements the following exception:" msgstr "" -#: library/codecs.rst:1581 +#: library/codecs.rst:1589 msgid "Raised when a codec is invalid or incompatible." msgstr "" -#: library/codecs.rst:1585 +#: library/codecs.rst:1593 msgid "" ":mod:`encodings.idna` --- Internationalized Domain Names in Applications" msgstr "" -#: library/codecs.rst:1591 +#: library/codecs.rst:1599 msgid "" "This module implements :rfc:`3490` (Internationalized Domain Names in " "Applications) and :rfc:`3492` (Nameprep: A Stringprep Profile for " @@ -2689,13 +2695,13 @@ msgid "" "encoding and :mod:`stringprep`." msgstr "" -#: library/codecs.rst:1596 +#: library/codecs.rst:1604 msgid "" "If you need the IDNA 2008 standard from :rfc:`5891` and :rfc:`5895`, use the " "third-party :pypi:`idna` module." msgstr "" -#: library/codecs.rst:1599 +#: library/codecs.rst:1607 msgid "" "These RFCs together define a protocol to support non-ASCII characters in " "domain names. A domain name containing non-ASCII characters (such as ``www." @@ -2709,7 +2715,7 @@ msgid "" "presenting them to the user." msgstr "" -#: library/codecs.rst:1610 +#: library/codecs.rst:1618 msgid "" "Python supports this conversion in several ways: the ``idna`` codec " "performs conversion between Unicode and ACE, separating an input string into " @@ -2726,14 +2732,14 @@ msgid "" "sends that field at all)." msgstr "" -#: library/codecs.rst:1623 +#: library/codecs.rst:1631 msgid "" "When receiving host names from the wire (such as in reverse name lookup), no " "automatic conversion to Unicode is performed: applications wishing to " "present such host names to the user should decode them to Unicode." msgstr "" -#: library/codecs.rst:1627 +#: library/codecs.rst:1635 msgid "" "The module :mod:`encodings.idna` also implements the nameprep procedure, " "which performs certain normalizations on host names, to achieve case-" @@ -2741,49 +2747,49 @@ msgid "" "characters. The nameprep functions can be used directly if desired." msgstr "" -#: library/codecs.rst:1635 +#: library/codecs.rst:1643 msgid "" "Return the nameprepped version of *label*. The implementation currently " "assumes query strings, so ``AllowUnassigned`` is true." msgstr "" -#: library/codecs.rst:1641 +#: library/codecs.rst:1649 msgid "" "Convert a label to ASCII, as specified in :rfc:`3490`. ``UseSTD3ASCIIRules`` " "is assumed to be false." msgstr "" -#: library/codecs.rst:1647 +#: library/codecs.rst:1655 msgid "Convert a label to Unicode, as specified in :rfc:`3490`." msgstr "" -#: library/codecs.rst:1651 +#: library/codecs.rst:1659 msgid ":mod:`encodings.mbcs` --- Windows ANSI codepage" msgstr "" -#: library/codecs.rst:1656 +#: library/codecs.rst:1664 msgid "This module implements the ANSI codepage (CP_ACP)." msgstr "" -#: library/codecs.rst:1658 +#: library/codecs.rst:1666 msgid "Availability" msgstr "" -#: library/codecs.rst:1660 +#: library/codecs.rst:1668 msgid "" "Before 3.2, the *errors* argument was ignored; ``'replace'`` was always used " "to encode, and ``'ignore'`` to decode." msgstr "" -#: library/codecs.rst:1664 +#: library/codecs.rst:1672 msgid "Support any error handler." msgstr "" -#: library/codecs.rst:1669 +#: library/codecs.rst:1677 msgid ":mod:`encodings.utf_8_sig` --- UTF-8 codec with BOM signature" msgstr "" -#: library/codecs.rst:1675 +#: library/codecs.rst:1683 msgid "" "This module implements a variant of the UTF-8 codec. On encoding, a UTF-8 " "encoded BOM will be prepended to the UTF-8 encoded bytes. For the stateful " diff --git a/library/codeop.po b/library/codeop.po index a27044907..7694624d4 100644 --- a/library/codeop.po +++ b/library/codeop.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/collections.abc.po b/library/collections.abc.po index f3d19bb24..31160e99a 100644 --- a/library/collections.abc.po +++ b/library/collections.abc.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: 2025-11-27 09:00+0200\n" "Last-Translator: Marios Giannopoulos \n" "Language-Team: PyGreece \n" @@ -1004,11 +1004,12 @@ msgstr "" "ακολουθήσουν αυτόματα." #: library/collections.abc.rst:459 +#, fuzzy msgid "" "The :class:`Set` mixin provides a :meth:`!_hash` method to compute a hash " "value for the set; however, :meth:`~object.__hash__` is not defined because " "not all sets are :term:`hashable` or immutable. To add set hashability " -"using mixins, inherit from both :meth:`Set` and :meth:`Hashable`, then " +"using mixins, inherit from both :class:`Set` and :class:`Hashable`, then " "define ``__hash__ = Set._hash``." msgstr "" "Το mixin :class:`Set` παρέχει τη μέθοδο :meth:`!_hash` για να υπολογίσει μια " diff --git a/library/collections.po b/library/collections.po index 0c3259b98..17ce9ae47 100644 --- a/library/collections.po +++ b/library/collections.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -389,7 +389,7 @@ msgid "" " ('you', 554), ('a', 546), ('my', 514), ('hamlet', 471), ('in', 451)]" msgstr "" -#: library/collections.rst:245 +#: library/collections.rst:247 msgid "" "A :class:`Counter` is a :class:`dict` subclass for counting :term:`hashable` " "objects. It is a collection where elements are stored as dictionary keys and " @@ -398,25 +398,25 @@ msgid "" "is similar to bags or multisets in other languages." msgstr "" -#: library/collections.rst:251 +#: library/collections.rst:253 msgid "" "Elements are counted from an *iterable* or initialized from another " "*mapping* (or counter):" msgstr "" -#: library/collections.rst:259 +#: library/collections.rst:261 msgid "" "Counter objects have a dictionary interface except that they return a zero " "count for missing items instead of raising a :exc:`KeyError`:" msgstr "" -#: library/collections.rst:266 +#: library/collections.rst:268 msgid "" "Setting a count to zero does not remove an element from a counter. Use " "``del`` to remove it entirely:" msgstr "" -#: library/collections.rst:274 +#: library/collections.rst:276 msgid "" "As a :class:`dict` subclass, :class:`Counter` inherited the capability to " "remember insertion order. Math operations on *Counter* objects also " @@ -425,20 +425,20 @@ msgid "" "right operand." msgstr "" -#: library/collections.rst:280 +#: library/collections.rst:282 msgid "" "Counter objects support additional methods beyond those available for all " "dictionaries:" msgstr "" -#: library/collections.rst:285 +#: library/collections.rst:287 msgid "" "Return an iterator over elements repeating each as many times as its count. " "Elements are returned in the order first encountered. If an element's count " "is less than one, :meth:`elements` will ignore it." msgstr "" -#: library/collections.rst:295 +#: library/collections.rst:297 msgid "" "Return a list of the *n* most common elements and their counts from the most " "common to the least. If *n* is omitted or ``None``, :meth:`most_common` " @@ -446,28 +446,28 @@ msgid "" "ordered in the order first encountered:" msgstr "" -#: library/collections.rst:305 +#: library/collections.rst:309 msgid "" "Elements are subtracted from an *iterable* or from another *mapping* (or " "counter). Like :meth:`dict.update` but subtracts counts instead of " "replacing them. Both inputs and outputs may be zero or negative." msgstr "" -#: library/collections.rst:319 +#: library/collections.rst:323 msgid "Compute the sum of the counts." msgstr "" -#: library/collections.rst:327 +#: library/collections.rst:331 msgid "" "The usual dictionary methods are available for :class:`Counter` objects " "except for two which work differently for counters." msgstr "" -#: library/collections.rst:332 +#: library/collections.rst:336 msgid "This class method is not implemented for :class:`Counter` objects." msgstr "" -#: library/collections.rst:336 +#: library/collections.rst:342 msgid "" "Elements are counted from an *iterable* or added-in from another *mapping* " "(or counter). Like :meth:`dict.update` but adds counts instead of replacing " @@ -475,7 +475,7 @@ msgid "" "sequence of ``(key, value)`` pairs." msgstr "" -#: library/collections.rst:341 +#: library/collections.rst:347 msgid "" "Counters support rich comparison operators for equality, subset, and " "superset relationships: ``==``, ``!=``, ``<``, ``<=``, ``>``, ``>=``. All of " @@ -483,22 +483,22 @@ msgid "" "``Counter(a=1) == Counter(a=1, b=0)`` returns true." msgstr "" -#: library/collections.rst:346 +#: library/collections.rst:352 msgid "Rich comparison operations were added." msgstr "" -#: library/collections.rst:349 +#: library/collections.rst:355 msgid "" "In equality tests, missing elements are treated as having zero counts. " "Formerly, ``Counter(a=3)`` and ``Counter(a=3, b=0)`` were considered " "distinct." msgstr "" -#: library/collections.rst:354 +#: library/collections.rst:360 msgid "Common patterns for working with :class:`Counter` objects::" msgstr "" -#: library/collections.rst:356 +#: library/collections.rst:362 msgid "" "c.total() # total of all counts\n" "c.clear() # reset all counts\n" @@ -511,7 +511,7 @@ msgid "" "+c # remove zero and negative counts" msgstr "" -#: library/collections.rst:366 +#: library/collections.rst:372 msgid "" "Several mathematical operations are provided for combining :class:`Counter` " "objects to produce multisets (counters that have counts greater than zero). " @@ -522,7 +522,7 @@ msgid "" "but the output will exclude results with counts of zero or less." msgstr "" -#: library/collections.rst:374 +#: library/collections.rst:380 msgid "" ">>> c = Counter(a=3, b=1)\n" ">>> d = Counter(a=1, b=2)\n" @@ -540,18 +540,18 @@ msgid "" "False" msgstr "" -#: library/collections.rst:391 +#: library/collections.rst:397 msgid "" "Unary addition and subtraction are shortcuts for adding an empty counter or " "subtracting from an empty counter." msgstr "" -#: library/collections.rst:400 +#: library/collections.rst:406 msgid "" "Added support for unary plus, unary minus, and in-place multiset operations." msgstr "" -#: library/collections.rst:405 +#: library/collections.rst:411 msgid "" "Counters were primarily designed to work with positive integers to represent " "running counts; however, care was taken to not unnecessarily preclude use " @@ -559,20 +559,20 @@ msgid "" "this section documents the minimum range and type restrictions." msgstr "" -#: library/collections.rst:410 +#: library/collections.rst:416 msgid "" "The :class:`Counter` class itself is a dictionary subclass with no " "restrictions on its keys and values. The values are intended to be numbers " "representing counts, but you *could* store anything in the value field." msgstr "" -#: library/collections.rst:414 +#: library/collections.rst:420 msgid "" "The :meth:`~Counter.most_common` method requires only that the values be " "orderable." msgstr "" -#: library/collections.rst:416 +#: library/collections.rst:422 msgid "" "For in-place operations such as ``c[key] += 1``, the value type need only " "support addition and subtraction. So fractions, floats, and decimals would " @@ -581,7 +581,7 @@ msgid "" "zero values for both inputs and outputs." msgstr "" -#: library/collections.rst:422 +#: library/collections.rst:428 msgid "" "The multiset methods are designed only for use cases with positive values. " "The inputs may be negative or zero, but only outputs with positive values " @@ -589,59 +589,59 @@ msgid "" "support addition, subtraction, and comparison." msgstr "" -#: library/collections.rst:427 +#: library/collections.rst:433 msgid "" "The :meth:`~Counter.elements` method requires integer counts. It ignores " "zero and negative counts." msgstr "" -#: library/collections.rst:432 +#: library/collections.rst:438 msgid "" "`Bag class `_ in Smalltalk." msgstr "" -#: library/collections.rst:435 +#: library/collections.rst:441 msgid "" "Wikipedia entry for `Multisets `_." msgstr "" -#: library/collections.rst:437 +#: library/collections.rst:443 msgid "" "`C++ multisets `_ tutorial with examples." msgstr "" -#: library/collections.rst:440 +#: library/collections.rst:446 msgid "" "For mathematical operations on multisets and their use cases, see *Knuth, " "Donald. The Art of Computer Programming Volume II, Section 4.6.3, Exercise " "19*." msgstr "" -#: library/collections.rst:444 +#: library/collections.rst:450 msgid "" "To enumerate all distinct multisets of a given size over a given set of " "elements, see :func:`itertools.combinations_with_replacement`::" msgstr "" -#: library/collections.rst:447 +#: library/collections.rst:453 msgid "" "map(Counter, combinations_with_replacement('ABC', 2)) # --> AA AB AC BB BC CC" msgstr "" -#: library/collections.rst:451 +#: library/collections.rst:457 msgid ":class:`deque` objects" msgstr "" -#: library/collections.rst:455 +#: library/collections.rst:461 msgid "" "Returns a new deque object initialized left-to-right (using :meth:`append`) " "with data from *iterable*. If *iterable* is not specified, the new deque is " "empty." msgstr "" -#: library/collections.rst:458 +#: library/collections.rst:464 msgid "" "Deques are a generalization of stacks and queues (the name is pronounced " "\"deck\" and is short for \"double-ended queue\"). Deques support thread-" @@ -649,7 +649,7 @@ msgid "" "approximately the same *O*\\ (1) performance in either direction." msgstr "" -#: library/collections.rst:463 +#: library/collections.rst:469 msgid "" "Though :class:`list` objects support similar operations, they are optimized " "for fast fixed-length operations and incur *O*\\ (*n*) memory movement costs " @@ -657,7 +657,7 @@ msgid "" "and position of the underlying data representation." msgstr "" -#: library/collections.rst:469 +#: library/collections.rst:475 msgid "" "If *maxlen* is not specified or is ``None``, deques may grow to an arbitrary " "length. Otherwise, the deque is bounded to the specified maximum length. " @@ -668,104 +668,108 @@ msgid "" "only the most recent activity is of interest." msgstr "" -#: library/collections.rst:478 +#: library/collections.rst:483 +msgid "Deques are :ref:`generic ` over the type of their contents." +msgstr "" + +#: library/collections.rst:486 msgid "Deque objects support the following methods:" msgstr "" -#: library/collections.rst:482 -msgid "Add *x* to the right side of the deque." +#: library/collections.rst:490 +msgid "Add *item* to the right side of the deque." msgstr "" -#: library/collections.rst:487 -msgid "Add *x* to the left side of the deque." +#: library/collections.rst:495 +msgid "Add *item* to the left side of the deque." msgstr "" -#: library/collections.rst:492 +#: library/collections.rst:500 msgid "Remove all elements from the deque leaving it with length 0." msgstr "" -#: library/collections.rst:497 +#: library/collections.rst:505 msgid "Create a shallow copy of the deque." msgstr "" -#: library/collections.rst:504 -msgid "Count the number of deque elements equal to *x*." +#: library/collections.rst:512 +msgid "Count the number of deque elements equal to *value*." msgstr "" -#: library/collections.rst:511 +#: library/collections.rst:519 msgid "" "Extend the right side of the deque by appending elements from the iterable " "argument." msgstr "" -#: library/collections.rst:517 +#: library/collections.rst:525 msgid "" "Extend the left side of the deque by appending elements from *iterable*. " "Note, the series of left appends results in reversing the order of elements " "in the iterable argument." msgstr "" -#: library/collections.rst:524 +#: library/collections.rst:532 msgid "" -"Return the position of *x* in the deque (at or after index *start* and " +"Return the position of *value* in the deque (at or after index *start* and " "before index *stop*). Returns the first match or raises :exc:`ValueError` " "if not found." msgstr "" -#: library/collections.rst:533 -msgid "Insert *x* into the deque at position *i*." +#: library/collections.rst:541 +msgid "Insert *value* into the deque at position *index*." msgstr "" -#: library/collections.rst:535 +#: library/collections.rst:543 msgid "" "If the insertion would cause a bounded deque to grow beyond *maxlen*, an :" "exc:`IndexError` is raised." msgstr "" -#: library/collections.rst:543 +#: library/collections.rst:551 msgid "" "Remove and return an element from the right side of the deque. If no " "elements are present, raises an :exc:`IndexError`." msgstr "" -#: library/collections.rst:549 +#: library/collections.rst:557 msgid "" "Remove and return an element from the left side of the deque. If no elements " "are present, raises an :exc:`IndexError`." msgstr "" -#: library/collections.rst:555 +#: library/collections.rst:563 msgid "" "Remove the first occurrence of *value*. If not found, raises a :exc:" "`ValueError`." msgstr "" -#: library/collections.rst:561 +#: library/collections.rst:569 msgid "Reverse the elements of the deque in-place and then return ``None``." msgstr "" -#: library/collections.rst:568 +#: library/collections.rst:576 msgid "" "Rotate the deque *n* steps to the right. If *n* is negative, rotate to the " "left." msgstr "" -#: library/collections.rst:571 +#: library/collections.rst:579 msgid "" "When the deque is not empty, rotating one step to the right is equivalent to " "``d.appendleft(d.pop())``, and rotating one step to the left is equivalent " "to ``d.append(d.popleft())``." msgstr "" -#: library/collections.rst:576 +#: library/collections.rst:584 msgid "Deque objects also provide one read-only attribute:" msgstr "" -#: library/collections.rst:580 +#: library/collections.rst:588 msgid "Maximum size of a deque or ``None`` if unbounded." msgstr "" -#: library/collections.rst:585 +#: library/collections.rst:593 msgid "" "In addition to the above, deques support iteration, pickling, ``len(d)``, " "``reversed(d)``, ``copy.copy(d)``, ``copy.deepcopy(d)``, membership testing " @@ -775,17 +779,17 @@ msgid "" "instead." msgstr "" -#: library/collections.rst:591 +#: library/collections.rst:599 msgid "" "Starting in version 3.5, deques support ``__add__()``, ``__mul__()``, and " "``__imul__()``." msgstr "" -#: library/collections.rst:594 +#: library/collections.rst:602 msgid "Example:" msgstr "" -#: library/collections.rst:596 +#: library/collections.rst:604 msgid "" ">>> from collections import deque\n" ">>> d = deque('ghi') # make a new deque with three items\n" @@ -841,21 +845,21 @@ msgid "" "deque(['c', 'b', 'a'])" msgstr "" -#: library/collections.rst:651 +#: library/collections.rst:659 msgid ":class:`deque` Recipes" msgstr "" -#: library/collections.rst:653 +#: library/collections.rst:661 msgid "This section shows various approaches to working with deques." msgstr "" -#: library/collections.rst:655 +#: library/collections.rst:663 msgid "" "Bounded length deques provide functionality similar to the ``tail`` filter " "in Unix::" msgstr "" -#: library/collections.rst:658 +#: library/collections.rst:666 msgid "" "def tail(filename, n=10):\n" " 'Return the last n lines of a file'\n" @@ -863,13 +867,13 @@ msgid "" " return deque(f, n)" msgstr "" -#: library/collections.rst:663 +#: library/collections.rst:671 msgid "" "Another approach to using deques is to maintain a sequence of recently added " "elements by appending to the right and popping to the left::" msgstr "" -#: library/collections.rst:666 +#: library/collections.rst:674 msgid "" "def moving_average(iterable, n=3):\n" " # moving_average([40, 30, 50, 46, 39, 44]) --> 40.0 42.0 45.0 43.0\n" @@ -884,7 +888,7 @@ msgid "" " yield s / n" msgstr "" -#: library/collections.rst:678 +#: library/collections.rst:686 msgid "" "A `round-robin scheduler `_ can be implemented with input iterators stored in a :" @@ -894,7 +898,7 @@ msgid "" "rotate` method::" msgstr "" -#: library/collections.rst:685 +#: library/collections.rst:693 msgid "" "def roundrobin(*iterables):\n" " \"roundrobin('ABC', 'D', 'EF') --> A D E B F C\"\n" @@ -909,14 +913,14 @@ msgid "" " iterators.popleft()" msgstr "" -#: library/collections.rst:697 +#: library/collections.rst:705 msgid "" "The :meth:`~deque.rotate` method provides a way to implement :class:`deque` " "slicing and deletion. For example, a pure Python implementation of ``del " "d[n]`` relies on the ``rotate()`` method to position elements to be popped::" msgstr "" -#: library/collections.rst:701 +#: library/collections.rst:709 msgid "" "def delete_nth(d, n):\n" " d.rotate(-n)\n" @@ -924,7 +928,7 @@ msgid "" " d.rotate(n)" msgstr "" -#: library/collections.rst:706 +#: library/collections.rst:714 msgid "" "To implement :class:`deque` slicing, use a similar approach applying :meth:" "`~deque.rotate` to bring a target element to the left side of the deque. " @@ -934,11 +938,11 @@ msgid "" "as ``dup``, ``drop``, ``swap``, ``over``, ``pick``, ``rot``, and ``roll``." msgstr "" -#: library/collections.rst:716 +#: library/collections.rst:724 msgid ":class:`defaultdict` objects" msgstr "" -#: library/collections.rst:720 +#: library/collections.rst:730 msgid "" "Return a new dictionary-like object. :class:`defaultdict` is a subclass of " "the built-in :class:`dict` class. It overrides one method and adds one " @@ -946,7 +950,7 @@ msgid "" "the :class:`dict` class and is not documented here." msgstr "" -#: library/collections.rst:725 +#: library/collections.rst:735 msgid "" "The first argument provides the initial value for the :attr:" "`default_factory` attribute; it defaults to ``None``. All remaining " @@ -954,39 +958,45 @@ msgid "" "constructor, including keyword arguments." msgstr "" -#: library/collections.rst:731 +#: library/collections.rst:740 +msgid "" +":class:`!defaultdict`\\s are :ref:`generic ` over two types, " +"signifying (respectively) the types of the dictionary's keys and values." +msgstr "" + +#: library/collections.rst:744 msgid "" ":class:`defaultdict` objects support the following method in addition to the " "standard :class:`dict` operations:" msgstr "" -#: library/collections.rst:736 +#: library/collections.rst:749 msgid "" "If the :attr:`default_factory` attribute is ``None``, this raises a :exc:" "`KeyError` exception with the *key* as argument." msgstr "" -#: library/collections.rst:739 +#: library/collections.rst:752 msgid "" "If :attr:`default_factory` is not ``None``, it is called without arguments " "to provide a default value for the given *key*, this value is inserted in " "the dictionary for the *key*, and returned." msgstr "" -#: library/collections.rst:743 +#: library/collections.rst:756 msgid "" "If calling :attr:`default_factory` raises an exception this exception is " "propagated unchanged." msgstr "" -#: library/collections.rst:746 +#: library/collections.rst:759 msgid "" "This method is called by the :meth:`~object.__getitem__` method of the :" "class:`dict` class when the requested key is not found; whatever it returns " "or raises is then returned or raised by :meth:`~object.__getitem__`." msgstr "" -#: library/collections.rst:750 +#: library/collections.rst:763 msgid "" "Note that :meth:`__missing__` is *not* called for any operations besides :" "meth:`~object.__getitem__`. This means that :meth:`~dict.get` will, like " @@ -994,33 +1004,33 @@ msgid "" "`default_factory`." msgstr "" -#: library/collections.rst:756 +#: library/collections.rst:769 msgid ":class:`defaultdict` objects support the following instance variable:" msgstr "" -#: library/collections.rst:761 +#: library/collections.rst:774 msgid "" -"This attribute is used by the :meth:`__missing__` method; it is initialized " -"from the first argument to the constructor, if present, or to ``None``, if " -"absent." +"This attribute is used by the :meth:`~defaultdict.__missing__` method; it is " +"initialized from the first argument to the constructor, if present, or to " +"``None``, if absent." msgstr "" -#: library/collections.rst:1192 +#: library/collections.rst:1207 msgid "" "Added merge (``|``) and update (``|=``) operators, specified in :pep:`584`." msgstr "" -#: library/collections.rst:771 +#: library/collections.rst:784 msgid ":class:`defaultdict` Examples" msgstr "" -#: library/collections.rst:773 +#: library/collections.rst:786 msgid "" "Using :class:`list` as the :attr:`~defaultdict.default_factory`, it is easy " "to group a sequence of key-value pairs into a dictionary of lists:" msgstr "" -#: library/collections.rst:784 +#: library/collections.rst:797 msgid "" "When each key is encountered for the first time, it is not already in the " "mapping; so an entry is automatically created using the :attr:`~defaultdict." @@ -1032,14 +1042,14 @@ msgid "" "using :meth:`dict.setdefault`:" msgstr "" -#: library/collections.rst:799 +#: library/collections.rst:812 msgid "" "Setting the :attr:`~defaultdict.default_factory` to :class:`int` makes the :" "class:`defaultdict` useful for counting (like a bag or multiset in other " "languages):" msgstr "" -#: library/collections.rst:811 +#: library/collections.rst:824 msgid "" "When a letter is first encountered, it is missing from the mapping, so the :" "attr:`~defaultdict.default_factory` function calls :func:`int` to supply a " @@ -1047,7 +1057,7 @@ msgid "" "each letter." msgstr "" -#: library/collections.rst:815 +#: library/collections.rst:828 msgid "" "The function :func:`int` which always returns zero is just a special case of " "constant functions. A faster and more flexible way to create constant " @@ -1055,17 +1065,17 @@ msgid "" "(not just zero):" msgstr "" -#: library/collections.rst:828 +#: library/collections.rst:841 msgid "" "Setting the :attr:`~defaultdict.default_factory` to :class:`set` makes the :" "class:`defaultdict` useful for building a dictionary of sets:" msgstr "" -#: library/collections.rst:841 +#: library/collections.rst:854 msgid ":func:`namedtuple` Factory Function for Tuples with Named Fields" msgstr "" -#: library/collections.rst:843 +#: library/collections.rst:856 msgid "" "Named tuples assign meaning to each position in a tuple and allow for more " "readable, self-documenting code. They can be used wherever regular tuples " @@ -1073,7 +1083,7 @@ msgid "" "position index." msgstr "" -#: library/collections.rst:849 +#: library/collections.rst:862 msgid "" "Returns a new tuple subclass named *typename*. The new subclass is used to " "create tuple-like objects that have fields accessible by attribute lookup as " @@ -1083,14 +1093,14 @@ msgid "" "format." msgstr "" -#: library/collections.rst:856 +#: library/collections.rst:869 msgid "" "The *field_names* are a sequence of strings such as ``['x', 'y']``. " "Alternatively, *field_names* can be a single string with each fieldname " "separated by whitespace and/or commas, for example ``'x y'`` or ``'x, y'``." msgstr "" -#: library/collections.rst:860 +#: library/collections.rst:873 msgid "" "Any valid Python identifier may be used for a fieldname except for names " "starting with an underscore. Valid identifiers consist of letters, digits, " @@ -1098,7 +1108,7 @@ msgid "" "mod:`keyword` such as *class*, *for*, *return*, *global*, *pass*, or *raise*." msgstr "" -#: library/collections.rst:866 +#: library/collections.rst:879 msgid "" "If *rename* is true, invalid fieldnames are automatically replaced with " "positional names. For example, ``['abc', 'def', 'ghi', 'abc']`` is " @@ -1106,7 +1116,7 @@ msgid "" "and the duplicate fieldname ``abc``." msgstr "" -#: library/collections.rst:871 +#: library/collections.rst:884 msgid "" "*defaults* can be ``None`` or an :term:`iterable` of default values. Since " "fields with a default value must come after any fields without a default, " @@ -1116,49 +1126,49 @@ msgid "" "will default to ``2``." msgstr "" -#: library/collections.rst:878 +#: library/collections.rst:891 msgid "" "If *module* is defined, the :attr:`~type.__module__` attribute of the named " "tuple is set to that value." msgstr "" -#: library/collections.rst:881 +#: library/collections.rst:894 msgid "" "Named tuple instances do not have per-instance dictionaries, so they are " "lightweight and require no more memory than regular tuples." msgstr "" -#: library/collections.rst:884 +#: library/collections.rst:897 msgid "" "To support pickling, the named tuple class should be assigned to a variable " "that matches *typename*." msgstr "" -#: library/collections.rst:887 +#: library/collections.rst:900 msgid "Added support for *rename*." msgstr "" -#: library/collections.rst:890 +#: library/collections.rst:903 msgid "" "The *verbose* and *rename* parameters became :ref:`keyword-only arguments " "`." msgstr "" -#: library/collections.rst:894 +#: library/collections.rst:907 msgid "Added the *module* parameter." msgstr "" -#: library/collections.rst:897 +#: library/collections.rst:910 msgid "Removed the *verbose* parameter and the :attr:`!_source` attribute." msgstr "" -#: library/collections.rst:900 +#: library/collections.rst:913 msgid "" "Added the *defaults* parameter and the :attr:`~somenamedtuple." "_field_defaults` attribute." msgstr "" -#: library/collections.rst:904 +#: library/collections.rst:917 msgid "" ">>> # Basic example\n" ">>> Point = namedtuple('Point', ['x', 'y'])\n" @@ -1175,13 +1185,13 @@ msgid "" "Point(x=11, y=22)" msgstr "" -#: library/collections.rst:920 +#: library/collections.rst:933 msgid "" "Named tuples are especially useful for assigning field names to result " "tuples returned by the :mod:`csv` or :mod:`sqlite3` modules::" msgstr "" -#: library/collections.rst:923 +#: library/collections.rst:936 msgid "" "EmployeeRecord = namedtuple('EmployeeRecord', 'name, age, title, department, " "paygrade')\n" @@ -1200,43 +1210,43 @@ msgid "" " print(emp.name, emp.title)" msgstr "" -#: library/collections.rst:936 +#: library/collections.rst:949 msgid "" "In addition to the methods inherited from tuples, named tuples support three " "additional methods and two attributes. To prevent conflicts with field " "names, the method and attribute names start with an underscore." msgstr "" -#: library/collections.rst:942 +#: library/collections.rst:955 msgid "" "Class method that makes a new instance from an existing sequence or iterable." msgstr "" -#: library/collections.rst:944 +#: library/collections.rst:957 msgid "" ">>> t = [11, 22]\n" ">>> Point._make(t)\n" "Point(x=11, y=22)" msgstr "" -#: library/collections.rst:952 +#: library/collections.rst:965 msgid "" "Return a new :class:`dict` which maps field names to their corresponding " "values:" msgstr "" -#: library/collections.rst:955 +#: library/collections.rst:968 msgid "" ">>> p = Point(x=11, y=22)\n" ">>> p._asdict()\n" "{'x': 11, 'y': 22}" msgstr "" -#: library/collections.rst:961 +#: library/collections.rst:974 msgid "Returns an :class:`OrderedDict` instead of a regular :class:`dict`." msgstr "" -#: library/collections.rst:964 +#: library/collections.rst:977 msgid "" "Returns a regular :class:`dict` instead of an :class:`OrderedDict`. As of " "Python 3.7, regular dicts are guaranteed to be ordered. If the extra " @@ -1244,13 +1254,13 @@ msgid "" "to cast the result to the desired type: ``OrderedDict(nt._asdict())``." msgstr "" -#: library/collections.rst:973 +#: library/collections.rst:986 msgid "" "Return a new instance of the named tuple replacing specified fields with new " "values::" msgstr "" -#: library/collections.rst:976 +#: library/collections.rst:989 msgid "" ">>> p = Point(x=11, y=22)\n" ">>> p._replace(x=33)\n" @@ -1261,24 +1271,24 @@ msgid "" "timestamp=time.now())" msgstr "" -#: library/collections.rst:983 +#: library/collections.rst:996 msgid "" "Named tuples are also supported by generic function :func:`copy.replace`." msgstr "" -#: library/collections.rst:985 +#: library/collections.rst:998 msgid "" "Raise :exc:`TypeError` instead of :exc:`ValueError` for invalid keyword " "arguments." msgstr "" -#: library/collections.rst:991 +#: library/collections.rst:1004 msgid "" "Tuple of strings listing the field names. Useful for introspection and for " "creating new named tuple types from existing named tuples." msgstr "" -#: library/collections.rst:994 +#: library/collections.rst:1007 msgid "" ">>> p._fields # view the field names\n" "('x', 'y')\n" @@ -1289,11 +1299,11 @@ msgid "" "Pixel(x=11, y=22, red=128, green=255, blue=0)" msgstr "" -#: library/collections.rst:1006 +#: library/collections.rst:1019 msgid "Dictionary mapping field names to default values." msgstr "" -#: library/collections.rst:1008 +#: library/collections.rst:1021 msgid "" ">>> Account = namedtuple('Account', ['type', 'balance'], defaults=[0])\n" ">>> Account._field_defaults\n" @@ -1302,26 +1312,26 @@ msgid "" "Account(type='premium', balance=0)" msgstr "" -#: library/collections.rst:1016 +#: library/collections.rst:1029 msgid "" "To retrieve a field whose name is stored in a string, use the :func:" "`getattr` function:" msgstr "" -#: library/collections.rst:1022 +#: library/collections.rst:1035 msgid "" "To convert a dictionary to a named tuple, use the double-star-operator (as " "described in :ref:`tut-unpacking-arguments`):" msgstr "" -#: library/collections.rst:1029 +#: library/collections.rst:1042 msgid "" "Since a named tuple is a regular Python class, it is easy to add or change " "functionality with a subclass. Here is how to add a calculated field and a " "fixed-width print format:" msgstr "" -#: library/collections.rst:1033 +#: library/collections.rst:1046 msgid "" ">>> class Point(namedtuple('Point', ['x', 'y'])):\n" "... __slots__ = ()\n" @@ -1338,38 +1348,38 @@ msgid "" "Point: x=14.000 y= 0.714 hypot=14.018" msgstr "" -#: library/collections.rst:1048 +#: library/collections.rst:1061 msgid "" "The subclass shown above sets ``__slots__`` to an empty tuple. This helps " "keep memory requirements low by preventing the creation of instance " "dictionaries." msgstr "" -#: library/collections.rst:1051 +#: library/collections.rst:1064 msgid "" "Subclassing is not useful for adding new, stored fields. Instead, simply " "create a new named tuple type from the :attr:`~somenamedtuple._fields` " "attribute:" msgstr "" -#: library/collections.rst:1056 +#: library/collections.rst:1069 msgid "" "Docstrings can be customized by making direct assignments to the ``__doc__`` " "fields:" msgstr "" -#: library/collections.rst:1065 +#: library/collections.rst:1078 msgid "Property docstrings became writeable." msgstr "" -#: library/collections.rst:1070 +#: library/collections.rst:1083 msgid "" "See :class:`typing.NamedTuple` for a way to add type hints for named " "tuples. It also provides an elegant notation using the :keyword:`class` " "keyword::" msgstr "" -#: library/collections.rst:1074 +#: library/collections.rst:1087 msgid "" "class Component(NamedTuple):\n" " part_number: int\n" @@ -1377,23 +1387,23 @@ msgid "" " description: Optional[str] = None" msgstr "" -#: library/collections.rst:1079 +#: library/collections.rst:1092 msgid "" "See :meth:`types.SimpleNamespace` for a mutable namespace based on an " "underlying dictionary instead of a tuple." msgstr "" -#: library/collections.rst:1082 +#: library/collections.rst:1095 msgid "" "The :mod:`dataclasses` module provides a decorator and functions for " "automatically adding generated special methods to user-defined classes." msgstr "" -#: library/collections.rst:1087 +#: library/collections.rst:1100 msgid ":class:`OrderedDict` objects" msgstr "" -#: library/collections.rst:1089 +#: library/collections.rst:1102 msgid "" "Ordered dictionaries are just like regular dictionaries but have some extra " "capabilities relating to ordering operations. They have become less " @@ -1401,93 +1411,93 @@ msgid "" "remember insertion order (this new behavior became guaranteed in Python 3.7)." msgstr "" -#: library/collections.rst:1095 +#: library/collections.rst:1108 msgid "Some differences from :class:`dict` still remain:" msgstr "" -#: library/collections.rst:1097 +#: library/collections.rst:1110 msgid "" "The regular :class:`dict` was designed to be very good at mapping " "operations. Tracking insertion order was secondary." msgstr "" -#: library/collections.rst:1100 +#: library/collections.rst:1113 msgid "" "The :class:`OrderedDict` was designed to be good at reordering operations. " "Space efficiency, iteration speed, and the performance of update operations " "were secondary." msgstr "" -#: library/collections.rst:1104 +#: library/collections.rst:1117 msgid "" "The :class:`OrderedDict` algorithm can handle frequent reordering operations " "better than :class:`dict`. As shown in the recipes below, this makes it " "suitable for implementing various kinds of LRU caches." msgstr "" -#: library/collections.rst:1108 +#: library/collections.rst:1121 msgid "" "The equality operation for :class:`OrderedDict` checks for matching order." msgstr "" -#: library/collections.rst:1110 +#: library/collections.rst:1123 msgid "" "A regular :class:`dict` can emulate the order sensitive equality test with " "``p == q and all(k1 == k2 for k1, k2 in zip(p, q))``." msgstr "" -#: library/collections.rst:1113 +#: library/collections.rst:1126 msgid "" "The :meth:`~OrderedDict.popitem` method of :class:`OrderedDict` has a " "different signature. It accepts an optional argument to specify which item " "is popped." msgstr "" -#: library/collections.rst:1116 +#: library/collections.rst:1129 msgid "" "A regular :class:`dict` can emulate OrderedDict's ``od.popitem(last=True)`` " "with ``d.popitem()`` which is guaranteed to pop the rightmost (last) item." msgstr "" -#: library/collections.rst:1119 +#: library/collections.rst:1132 msgid "" "A regular :class:`dict` can emulate OrderedDict's ``od.popitem(last=False)`` " "with ``(k := next(iter(d)), d.pop(k))`` which will return and remove the " "leftmost (first) item if it exists." msgstr "" -#: library/collections.rst:1123 +#: library/collections.rst:1136 msgid "" ":class:`OrderedDict` has a :meth:`~OrderedDict.move_to_end` method to " "efficiently reposition an element to an endpoint." msgstr "" -#: library/collections.rst:1126 +#: library/collections.rst:1139 msgid "" "A regular :class:`dict` can emulate OrderedDict's ``od.move_to_end(k, " "last=True)`` with ``d[k] = d.pop(k)`` which will move the key and its " "associated value to the rightmost (last) position." msgstr "" -#: library/collections.rst:1130 +#: library/collections.rst:1143 msgid "" "A regular :class:`dict` does not have an efficient equivalent for " "OrderedDict's ``od.move_to_end(k, last=False)`` which moves the key and its " "associated value to the leftmost (first) position." msgstr "" -#: library/collections.rst:1134 +#: library/collections.rst:1147 msgid "" "Until Python 3.8, :class:`dict` lacked a :meth:`~object.__reversed__` method." msgstr "" -#: library/collections.rst:1139 +#: library/collections.rst:1154 msgid "" "Return an instance of a :class:`dict` subclass that has methods specialized " "for rearranging dictionary order." msgstr "" -#: library/collections.rst:1146 +#: library/collections.rst:1161 msgid "" "The :meth:`popitem` method for ordered dictionaries returns and removes a " "(key, value) pair. The pairs are returned in :abbr:`LIFO (last-in, first-" @@ -1495,14 +1505,14 @@ msgid "" "false." msgstr "" -#: library/collections.rst:1153 +#: library/collections.rst:1168 msgid "" "Move an existing *key* to either end of an ordered dictionary. The item is " "moved to the right end if *last* is true (the default) or to the beginning " "if *last* is false. Raises :exc:`KeyError` if the *key* does not exist:" msgstr "" -#: library/collections.rst:1158 +#: library/collections.rst:1173 msgid "" ">>> d = OrderedDict.fromkeys('abcde')\n" ">>> d.move_to_end('b')\n" @@ -1513,19 +1523,19 @@ msgid "" "'bacde'" msgstr "" -#: library/collections.rst:1170 +#: library/collections.rst:1185 msgid "" "In addition to the usual mapping methods, ordered dictionaries also support " "reverse iteration using :func:`reversed`." msgstr "" -#: library/collections.rst:1175 +#: library/collections.rst:1190 msgid "" "Equality tests between :class:`OrderedDict` objects are order-sensitive and " "are roughly equivalent to ``list(od1.items())==list(od2.items())``." msgstr "" -#: library/collections.rst:1178 +#: library/collections.rst:1193 msgid "" "Equality tests between :class:`OrderedDict` objects and other :class:" "`~collections.abc.Mapping` objects are order-insensitive like regular " @@ -1533,24 +1543,24 @@ msgid "" "anywhere a regular dictionary is used." msgstr "" -#: library/collections.rst:1183 +#: library/collections.rst:1198 msgid "" "The items, keys, and values :term:`views ` of :class:" "`OrderedDict` now support reverse iteration using :func:`reversed`." msgstr "" -#: library/collections.rst:1187 +#: library/collections.rst:1202 msgid "" "With the acceptance of :pep:`468`, order is retained for keyword arguments " "passed to the :class:`OrderedDict` constructor and its :meth:`~dict.update` " "method." msgstr "" -#: library/collections.rst:1197 +#: library/collections.rst:1212 msgid ":class:`OrderedDict` Examples and Recipes" msgstr "" -#: library/collections.rst:1199 +#: library/collections.rst:1214 msgid "" "It is straightforward to create an ordered dictionary variant that remembers " "the order the keys were *last* inserted. If a new entry overwrites an " @@ -1558,7 +1568,7 @@ msgid "" "end::" msgstr "" -#: library/collections.rst:1204 +#: library/collections.rst:1219 msgid "" "class LastUpdatedOrderedDict(OrderedDict):\n" " 'Store items in the order the keys were last added'\n" @@ -1568,16 +1578,16 @@ msgid "" " self.move_to_end(key)" msgstr "" -#: library/collections.rst:1211 +#: library/collections.rst:1226 msgid "" "An :class:`OrderedDict` would also be useful for implementing variants of :" "func:`functools.lru_cache`:" msgstr "" -#: library/collections.rst:1214 +#: library/collections.rst:1229 msgid "" "from collections import OrderedDict\n" -"from time import time\n" +"from time import monotonic\n" "\n" "class TimeBoundedLRU:\n" " \"LRU Cache that invalidates and refreshes old entries.\"\n" @@ -1592,16 +1602,16 @@ msgid "" " if args in self.cache:\n" " self.cache.move_to_end(args)\n" " timestamp, result = self.cache[args]\n" -" if time() - timestamp <= self.maxage:\n" +" if monotonic() - timestamp <= self.maxage:\n" " return result\n" " result = self.func(*args)\n" -" self.cache[args] = time(), result\n" +" self.cache[args] = monotonic(), result\n" " if len(self.cache) > self.maxsize:\n" " self.cache.popitem(last=False)\n" " return result" msgstr "" -#: library/collections.rst:1241 +#: library/collections.rst:1256 msgid "" "class MultiHitLRUCache:\n" " \"\"\" LRU cache that defers caching a result until\n" @@ -1639,11 +1649,11 @@ msgid "" " return result" msgstr "" -#: library/collections.rst:1310 +#: library/collections.rst:1325 msgid ":class:`UserDict` objects" msgstr "" -#: library/collections.rst:1312 +#: library/collections.rst:1327 msgid "" "The class, :class:`UserDict` acts as a wrapper around dictionary objects. " "The need for this class has been partially supplanted by the ability to " @@ -1651,31 +1661,30 @@ msgid "" "work with because the underlying dictionary is accessible as an attribute." msgstr "" -#: library/collections.rst:1320 +#: library/collections.rst:1337 msgid "" "Class that simulates a dictionary. The instance's contents are kept in a " "regular dictionary, which is accessible via the :attr:`data` attribute of :" -"class:`UserDict` instances. If *initialdata* is provided, :attr:`data` is " -"initialized with its contents; note that a reference to *initialdata* will " -"not be kept, allowing it to be used for other purposes." +"class:`!UserDict` instances. If arguments are provided, they are used to " +"initialize :attr:`data`, like a regular dictionary." msgstr "" -#: library/collections.rst:1326 +#: library/collections.rst:1342 msgid "" -"In addition to supporting the methods and operations of mappings, :class:" -"`UserDict` instances provide the following attribute:" +"In addition to supporting the methods and operations of mappings, :class:`!" +"UserDict` instances provide the following attribute:" msgstr "" -#: library/collections.rst:1331 +#: library/collections.rst:1347 msgid "" "A real dictionary used to store the contents of the :class:`UserDict` class." msgstr "" -#: library/collections.rst:1337 +#: library/collections.rst:1353 msgid ":class:`UserList` objects" msgstr "" -#: library/collections.rst:1339 +#: library/collections.rst:1355 msgid "" "This class acts as a wrapper around list objects. It is a useful base class " "for your own list-like classes which can inherit from them and override " @@ -1683,14 +1692,14 @@ msgid "" "lists." msgstr "" -#: library/collections.rst:1344 +#: library/collections.rst:1360 msgid "" "The need for this class has been partially supplanted by the ability to " "subclass directly from :class:`list`; however, this class can be easier to " "work with because the underlying list is accessible as an attribute." msgstr "" -#: library/collections.rst:1350 +#: library/collections.rst:1366 msgid "" "Class that simulates a list. The instance's contents are kept in a regular " "list, which is accessible via the :attr:`data` attribute of :class:" @@ -1699,19 +1708,19 @@ msgid "" "for example a real Python list or a :class:`UserList` object." msgstr "" -#: library/collections.rst:1356 +#: library/collections.rst:1372 msgid "" "In addition to supporting the methods and operations of mutable sequences, :" "class:`UserList` instances provide the following attribute:" msgstr "" -#: library/collections.rst:1361 +#: library/collections.rst:1377 msgid "" "A real :class:`list` object used to store the contents of the :class:" "`UserList` class." msgstr "" -#: library/collections.rst:1364 +#: library/collections.rst:1380 msgid "" "**Subclassing requirements:** Subclasses of :class:`UserList` are expected " "to offer a constructor which can be called with either no arguments or one " @@ -1721,7 +1730,7 @@ msgid "" "object used as a data source." msgstr "" -#: library/collections.rst:1371 +#: library/collections.rst:1387 msgid "" "If a derived class does not wish to comply with this requirement, all of the " "special methods supported by this class will need to be overridden; please " @@ -1729,11 +1738,11 @@ msgid "" "provided in that case." msgstr "" -#: library/collections.rst:1377 +#: library/collections.rst:1393 msgid ":class:`UserString` objects" msgstr "" -#: library/collections.rst:1379 +#: library/collections.rst:1395 msgid "" "The class, :class:`UserString` acts as a wrapper around string objects. The " "need for this class has been partially supplanted by the ability to subclass " @@ -1741,7 +1750,7 @@ msgid "" "because the underlying string is accessible as an attribute." msgstr "" -#: library/collections.rst:1387 +#: library/collections.rst:1403 msgid "" "Class that simulates a string object. The instance's content is kept in a " "regular string object, which is accessible via the :attr:`data` attribute " @@ -1750,19 +1759,19 @@ msgid "" "converted into a string using the built-in :func:`str` function." msgstr "" -#: library/collections.rst:1394 +#: library/collections.rst:1410 msgid "" "In addition to supporting the methods and operations of strings, :class:" "`UserString` instances provide the following attribute:" msgstr "" -#: library/collections.rst:1399 +#: library/collections.rst:1415 msgid "" "A real :class:`str` object used to store the contents of the :class:" "`UserString` class." msgstr "" -#: library/collections.rst:1402 +#: library/collections.rst:1418 msgid "" "New methods ``__getnewargs__``, ``__rmod__``, ``casefold``, ``format_map``, " "``isprintable``, and ``maketrans``." diff --git a/library/colorsys.po b/library/colorsys.po index d293d9824..e0a372ea2 100644 --- a/library/colorsys.po +++ b/library/colorsys.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/compileall.po b/library/compileall.po index fcaabe021..661fef8f2 100644 --- a/library/compileall.po +++ b/library/compileall.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/concurrency.po b/library/concurrency.po index 9b522b6bd..b346c2e91 100644 --- a/library/concurrency.po +++ b/library/concurrency.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/concurrent.futures.po b/library/concurrent.futures.po index 7e921594f..f37ce98da 100644 --- a/library/concurrent.futures.po +++ b/library/concurrent.futures.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -41,6 +41,14 @@ msgid "" "by the abstract :class:`Executor` class." msgstr "" +#: library/concurrent.futures.rst:22 +msgid "" +":class:`concurrent.futures.Future` must not be confused with :class:`asyncio." +"Future`, which is designed for use with :mod:`asyncio` tasks and coroutines. " +"See the :doc:`asyncio's Future ` documentation for a " +"detailed comparison of the two." +msgstr "" + #: includes/wasm-notavail.rst:3 msgid "Availability" msgstr "" @@ -51,45 +59,45 @@ msgid "" "availability` for more information." msgstr "" -#: library/concurrent.futures.rst:25 +#: library/concurrent.futures.rst:30 msgid "Executor Objects" msgstr "" -#: library/concurrent.futures.rst:29 +#: library/concurrent.futures.rst:34 msgid "" "An abstract class that provides methods to execute calls asynchronously. It " "should not be used directly, but through its concrete subclasses." msgstr "" -#: library/concurrent.futures.rst:34 +#: library/concurrent.futures.rst:39 msgid "" "Schedules the callable, *fn*, to be executed as ``fn(*args, **kwargs)`` and " "returns a :class:`Future` object representing the execution of the " "callable. ::" msgstr "" -#: library/concurrent.futures.rst:38 +#: library/concurrent.futures.rst:43 msgid "" "with ThreadPoolExecutor(max_workers=1) as executor:\n" " future = executor.submit(pow, 323, 1235)\n" " print(future.result())" msgstr "" -#: library/concurrent.futures.rst:44 +#: library/concurrent.futures.rst:49 msgid "Similar to :func:`map(fn, *iterables) ` except:" msgstr "" -#: library/concurrent.futures.rst:46 +#: library/concurrent.futures.rst:51 msgid "the *iterables* are collected immediately rather than lazily;" msgstr "" -#: library/concurrent.futures.rst:48 +#: library/concurrent.futures.rst:53 msgid "" "*fn* is executed asynchronously and several calls to *fn* may be made " "concurrently." msgstr "" -#: library/concurrent.futures.rst:51 +#: library/concurrent.futures.rst:56 msgid "" "The returned iterator raises a :exc:`TimeoutError` if :meth:`~iterator." "__next__` is called and the result isn't available after *timeout* seconds " @@ -98,13 +106,13 @@ msgid "" "wait time." msgstr "" -#: library/concurrent.futures.rst:57 +#: library/concurrent.futures.rst:62 msgid "" "If a *fn* call raises an exception, then that exception will be raised when " "its value is retrieved from the iterator." msgstr "" -#: library/concurrent.futures.rst:60 +#: library/concurrent.futures.rst:65 msgid "" "When using :class:`ProcessPoolExecutor`, this method chops *iterables* into " "a number of chunks which it submits to the pool as separate tasks. The " @@ -114,11 +122,11 @@ msgid "" "size of 1. With :class:`ThreadPoolExecutor`, *chunksize* has no effect." msgstr "" -#: library/concurrent.futures.rst:68 +#: library/concurrent.futures.rst:73 msgid "Added the *chunksize* argument." msgstr "" -#: library/concurrent.futures.rst:73 +#: library/concurrent.futures.rst:78 msgid "" "Signal the executor that it should free any resources that it is using when " "the currently pending futures are done executing. Calls to :meth:`Executor." @@ -126,7 +134,7 @@ msgid "" "`RuntimeError`." msgstr "" -#: library/concurrent.futures.rst:78 +#: library/concurrent.futures.rst:83 msgid "" "If *wait* is ``True`` then this method will not return until all the pending " "futures are done executing and the resources associated with the executor " @@ -137,21 +145,21 @@ msgid "" "are done executing." msgstr "" -#: library/concurrent.futures.rst:86 +#: library/concurrent.futures.rst:91 msgid "" "If *cancel_futures* is ``True``, this method will cancel all pending futures " "that the executor has not started running. Any futures that are completed or " "running won't be cancelled, regardless of the value of *cancel_futures*." msgstr "" -#: library/concurrent.futures.rst:91 +#: library/concurrent.futures.rst:96 msgid "" "If both *cancel_futures* and *wait* are ``True``, all futures that the " "executor has started running will be completed prior to this method " "returning. The remaining futures are cancelled." msgstr "" -#: library/concurrent.futures.rst:95 +#: library/concurrent.futures.rst:100 msgid "" "You can avoid having to call this method explicitly if you use the executor " "as a :term:`context manager` via the :keyword:`with` statement, which will " @@ -159,7 +167,7 @@ msgid "" "called with *wait* set to ``True``)::" msgstr "" -#: library/concurrent.futures.rst:100 +#: library/concurrent.futures.rst:105 msgid "" "import shutil\n" "with ThreadPoolExecutor(max_workers=4) as e:\n" @@ -169,27 +177,27 @@ msgid "" " e.submit(shutil.copy, 'src4.txt', 'dest4.txt')" msgstr "" -#: library/concurrent.futures.rst:107 +#: library/concurrent.futures.rst:112 msgid "Added *cancel_futures*." msgstr "" -#: library/concurrent.futures.rst:112 +#: library/concurrent.futures.rst:117 msgid "ThreadPoolExecutor" msgstr "" -#: library/concurrent.futures.rst:114 +#: library/concurrent.futures.rst:119 msgid "" ":class:`ThreadPoolExecutor` is an :class:`Executor` subclass that uses a " "pool of threads to execute calls asynchronously." msgstr "" -#: library/concurrent.futures.rst:117 +#: library/concurrent.futures.rst:122 msgid "" "Deadlocks can occur when the callable associated with a :class:`Future` " "waits on the results of another :class:`Future`. For example::" msgstr "" -#: library/concurrent.futures.rst:120 +#: library/concurrent.futures.rst:125 msgid "" "import time\n" "def wait_on_b():\n" @@ -208,11 +216,11 @@ msgid "" "b = executor.submit(wait_on_a)" msgstr "" -#: library/concurrent.futures.rst:136 +#: library/concurrent.futures.rst:141 msgid "And::" msgstr "" -#: library/concurrent.futures.rst:138 +#: library/concurrent.futures.rst:143 msgid "" "def wait_on_future():\n" " f = executor.submit(pow, 5, 2)\n" @@ -221,16 +229,18 @@ msgid "" " print(f.result())\n" "\n" "executor = ThreadPoolExecutor(max_workers=1)\n" -"executor.submit(wait_on_future)" +"future = executor.submit(wait_on_future)\n" +"# Note: calling future.result() would also cause a deadlock because\n" +"# the single worker thread is already waiting for wait_on_future()." msgstr "" -#: library/concurrent.futures.rst:150 +#: library/concurrent.futures.rst:157 msgid "" "An :class:`Executor` subclass that uses a pool of at most *max_workers* " "threads to execute calls asynchronously." msgstr "" -#: library/concurrent.futures.rst:153 +#: library/concurrent.futures.rst:160 msgid "" "All threads enqueued to ``ThreadPoolExecutor`` will be joined before the " "interpreter can exit. Note that the exit handler which does this is executed " @@ -240,7 +250,7 @@ msgid "" "``ThreadPoolExecutor`` not be used for long-running tasks." msgstr "" -#: library/concurrent.futures.rst:160 +#: library/concurrent.futures.rst:167 msgid "" "*initializer* is an optional callable that is called at the start of each " "worker thread; *initargs* is a tuple of arguments passed to the " @@ -249,7 +259,7 @@ msgid "" "well as any attempt to submit more jobs to the pool." msgstr "" -#: library/concurrent.futures.rst:166 +#: library/concurrent.futures.rst:173 msgid "" "If *max_workers* is ``None`` or not given, it will default to the number of " "processors on the machine, multiplied by ``5``, assuming that :class:" @@ -258,18 +268,18 @@ msgid "" "`ProcessPoolExecutor`." msgstr "" -#: library/concurrent.futures.rst:174 +#: library/concurrent.futures.rst:181 msgid "" "Added the *thread_name_prefix* parameter to allow users to control the :" "class:`threading.Thread` names for worker threads created by the pool for " "easier debugging." msgstr "" -#: library/concurrent.futures.rst:179 library/concurrent.futures.rst:292 +#: library/concurrent.futures.rst:186 library/concurrent.futures.rst:299 msgid "Added the *initializer* and *initargs* arguments." msgstr "" -#: library/concurrent.futures.rst:182 +#: library/concurrent.futures.rst:189 msgid "" "Default value of *max_workers* is changed to ``min(32, os.cpu_count() + " "4)``. This default value preserves at least 5 workers for I/O bound tasks. " @@ -277,23 +287,23 @@ msgid "" "And it avoids using very large resources implicitly on many-core machines." msgstr "" -#: library/concurrent.futures.rst:188 +#: library/concurrent.futures.rst:195 msgid "" "ThreadPoolExecutor now reuses idle worker threads before starting " "*max_workers* worker threads too." msgstr "" -#: library/concurrent.futures.rst:191 +#: library/concurrent.futures.rst:198 msgid "" "Default value of *max_workers* is changed to ``min(32, (os." "process_cpu_count() or 1) + 4)``." msgstr "" -#: library/concurrent.futures.rst:199 +#: library/concurrent.futures.rst:206 msgid "ThreadPoolExecutor Example" msgstr "" -#: library/concurrent.futures.rst:202 +#: library/concurrent.futures.rst:209 msgid "" "import concurrent.futures\n" "import urllib.request\n" @@ -324,11 +334,11 @@ msgid "" " print('%r page is %d bytes' % (url, len(data)))" msgstr "" -#: library/concurrent.futures.rst:231 +#: library/concurrent.futures.rst:238 msgid "ProcessPoolExecutor" msgstr "" -#: library/concurrent.futures.rst:233 +#: library/concurrent.futures.rst:240 msgid "" "The :class:`ProcessPoolExecutor` class is an :class:`Executor` subclass that " "uses a pool of processes to execute calls asynchronously. :class:" @@ -338,20 +348,20 @@ msgid "" "returned." msgstr "" -#: library/concurrent.futures.rst:240 +#: library/concurrent.futures.rst:247 msgid "" "The ``__main__`` module must be importable by worker subprocesses. This " "means that :class:`ProcessPoolExecutor` will not work in the interactive " "interpreter." msgstr "" -#: library/concurrent.futures.rst:243 +#: library/concurrent.futures.rst:250 msgid "" "Calling :class:`Executor` or :class:`Future` methods from a callable " "submitted to a :class:`ProcessPoolExecutor` will result in deadlock." msgstr "" -#: library/concurrent.futures.rst:246 +#: library/concurrent.futures.rst:253 msgid "" "Note that the restrictions on functions and arguments needing to picklable " "as per :class:`multiprocessing.Process` apply when using :meth:`~Executor." @@ -359,7 +369,7 @@ msgid "" "function defined in a REPL or a lambda should not be expected to work." msgstr "" -#: library/concurrent.futures.rst:253 +#: library/concurrent.futures.rst:260 msgid "" "An :class:`Executor` subclass that executes calls asynchronously using a " "pool of at most *max_workers* processes. If *max_workers* is ``None`` or " @@ -374,7 +384,7 @@ msgid "" "`multiprocessing-start-methods`." msgstr "" -#: library/concurrent.futures.rst:267 +#: library/concurrent.futures.rst:274 msgid "" "*initializer* is an optional callable that is called at the start of each " "worker process; *initargs* is a tuple of arguments passed to the " @@ -383,7 +393,7 @@ msgid "" "well as any attempt to submit more jobs to the pool." msgstr "" -#: library/concurrent.futures.rst:273 +#: library/concurrent.futures.rst:280 msgid "" "*max_tasks_per_child* is an optional argument that specifies the maximum " "number of tasks a single process can execute before it will exit and be " @@ -394,7 +404,7 @@ msgid "" "with the \"fork\" start method." msgstr "" -#: library/concurrent.futures.rst:281 +#: library/concurrent.futures.rst:288 msgid "" "When one of the worker processes terminates abruptly, a :exc:`~concurrent." "futures.process.BrokenProcessPool` error is now raised. Previously, " @@ -402,13 +412,13 @@ msgid "" "often freeze or deadlock." msgstr "" -#: library/concurrent.futures.rst:288 +#: library/concurrent.futures.rst:295 msgid "" "The *mp_context* argument was added to allow users to control the " "start_method for worker processes created by the pool." msgstr "" -#: library/concurrent.futures.rst:295 +#: library/concurrent.futures.rst:302 msgid "" "The default :mod:`multiprocessing` start method (see :ref:`multiprocessing-" "start-methods`) will change away from *fork* in Python 3.14. Code that " @@ -417,13 +427,13 @@ msgid "" "get_context(\"fork\")`` parameter." msgstr "" -#: library/concurrent.futures.rst:302 +#: library/concurrent.futures.rst:309 msgid "" "The *max_tasks_per_child* argument was added to allow users to control the " "lifetime of workers in the pool." msgstr "" -#: library/concurrent.futures.rst:306 +#: library/concurrent.futures.rst:313 msgid "" "On POSIX systems, if your application has multiple threads and the :mod:" "`multiprocessing` context uses the ``\"fork\"`` start method: The :func:`os." @@ -432,17 +442,24 @@ msgid "" "start method. See the :func:`os.fork` documentation for further explanation." msgstr "" -#: library/concurrent.futures.rst:314 +#: library/concurrent.futures.rst:321 msgid "" "*max_workers* uses :func:`os.process_cpu_count` by default, instead of :func:" "`os.cpu_count`." msgstr "" -#: library/concurrent.futures.rst:321 +#: library/concurrent.futures.rst:325 +msgid "" +"Fixed a deadlock (:gh:`115634`) where the executor could hang after a worker " +"process exited upon reaching its *max_tasks_per_child* limit while tasks " +"remained queued." +msgstr "" + +#: library/concurrent.futures.rst:333 msgid "ProcessPoolExecutor Example" msgstr "" -#: library/concurrent.futures.rst:324 +#: library/concurrent.futures.rst:336 msgid "" "import concurrent.futures\n" "import math\n" @@ -478,24 +495,24 @@ msgid "" " main()" msgstr "" -#: library/concurrent.futures.rst:359 +#: library/concurrent.futures.rst:371 msgid "Future Objects" msgstr "" -#: library/concurrent.futures.rst:361 +#: library/concurrent.futures.rst:373 msgid "" "The :class:`Future` class encapsulates the asynchronous execution of a " "callable. :class:`Future` instances are created by :meth:`Executor.submit`." msgstr "" -#: library/concurrent.futures.rst:366 +#: library/concurrent.futures.rst:378 msgid "" "Encapsulates the asynchronous execution of a callable. :class:`Future` " "instances are created by :meth:`Executor.submit` and should not be created " "directly except for testing." msgstr "" -#: library/concurrent.futures.rst:372 +#: library/concurrent.futures.rst:384 msgid "" "Attempt to cancel the call. If the call is currently being executed or " "finished running and cannot be cancelled then the method will return " @@ -503,22 +520,22 @@ msgid "" "``True``." msgstr "" -#: library/concurrent.futures.rst:379 +#: library/concurrent.futures.rst:391 msgid "Return ``True`` if the call was successfully cancelled." msgstr "" -#: library/concurrent.futures.rst:383 +#: library/concurrent.futures.rst:395 msgid "" "Return ``True`` if the call is currently being executed and cannot be " "cancelled." msgstr "" -#: library/concurrent.futures.rst:388 +#: library/concurrent.futures.rst:400 msgid "" "Return ``True`` if the call was successfully cancelled or finished running." msgstr "" -#: library/concurrent.futures.rst:393 +#: library/concurrent.futures.rst:405 msgid "" "Return the value returned by the call. If the call hasn't yet completed then " "this method will wait up to *timeout* seconds. If the call hasn't completed " @@ -527,18 +544,18 @@ msgid "" "no limit to the wait time." msgstr "" -#: library/concurrent.futures.rst:400 library/concurrent.futures.rst:414 +#: library/concurrent.futures.rst:412 library/concurrent.futures.rst:426 msgid "" "If the future is cancelled before completing then :exc:`.CancelledError` " "will be raised." msgstr "" -#: library/concurrent.futures.rst:403 +#: library/concurrent.futures.rst:415 msgid "" "If the call raised an exception, this method will raise the same exception." msgstr "" -#: library/concurrent.futures.rst:407 +#: library/concurrent.futures.rst:419 msgid "" "Return the exception raised by the call. If the call hasn't yet completed " "then this method will wait up to *timeout* seconds. If the call hasn't " @@ -547,18 +564,18 @@ msgid "" "``None``, there is no limit to the wait time." msgstr "" -#: library/concurrent.futures.rst:417 +#: library/concurrent.futures.rst:429 msgid "If the call completed without raising, ``None`` is returned." msgstr "" -#: library/concurrent.futures.rst:421 +#: library/concurrent.futures.rst:433 msgid "" "Attaches the callable *fn* to the future. *fn* will be called, with the " "future as its only argument, when the future is cancelled or finishes " "running." msgstr "" -#: library/concurrent.futures.rst:425 +#: library/concurrent.futures.rst:437 msgid "" "Added callables are called in the order that they were added and are always " "called in a thread belonging to the process that added them. If the " @@ -567,26 +584,26 @@ msgid "" "behavior is undefined." msgstr "" -#: library/concurrent.futures.rst:431 +#: library/concurrent.futures.rst:443 msgid "" "If the future has already completed or been cancelled, *fn* will be called " "immediately." msgstr "" -#: library/concurrent.futures.rst:434 +#: library/concurrent.futures.rst:446 msgid "" "The following :class:`Future` methods are meant for use in unit tests and :" "class:`Executor` implementations." msgstr "" -#: library/concurrent.futures.rst:439 +#: library/concurrent.futures.rst:451 msgid "" "This method should only be called by :class:`Executor` implementations " "before executing the work associated with the :class:`Future` and by unit " "tests." msgstr "" -#: library/concurrent.futures.rst:443 +#: library/concurrent.futures.rst:455 msgid "" "If the method returns ``False`` then the :class:`Future` was cancelled, i." "e. :meth:`Future.cancel` was called and returned ``True``. Any threads " @@ -594,47 +611,47 @@ msgid "" "or :func:`wait`) will be woken up." msgstr "" -#: library/concurrent.futures.rst:448 +#: library/concurrent.futures.rst:460 msgid "" "If the method returns ``True`` then the :class:`Future` was not cancelled " "and has been put in the running state, i.e. calls to :meth:`Future.running` " "will return ``True``." msgstr "" -#: library/concurrent.futures.rst:452 +#: library/concurrent.futures.rst:464 msgid "" "This method can only be called once and cannot be called after :meth:`Future." "set_result` or :meth:`Future.set_exception` have been called." msgstr "" -#: library/concurrent.futures.rst:458 +#: library/concurrent.futures.rst:470 msgid "" "Sets the result of the work associated with the :class:`Future` to *result*." msgstr "" -#: library/concurrent.futures.rst:461 library/concurrent.futures.rst:474 +#: library/concurrent.futures.rst:473 library/concurrent.futures.rst:486 msgid "" "This method should only be used by :class:`Executor` implementations and " "unit tests." msgstr "" -#: library/concurrent.futures.rst:464 library/concurrent.futures.rst:477 +#: library/concurrent.futures.rst:476 library/concurrent.futures.rst:489 msgid "" "This method raises :exc:`concurrent.futures.InvalidStateError` if the :class:" "`Future` is already done." msgstr "" -#: library/concurrent.futures.rst:471 +#: library/concurrent.futures.rst:483 msgid "" "Sets the result of the work associated with the :class:`Future` to the :" "class:`Exception` *exception*." msgstr "" -#: library/concurrent.futures.rst:483 +#: library/concurrent.futures.rst:495 msgid "Module Functions" msgstr "" -#: library/concurrent.futures.rst:487 +#: library/concurrent.futures.rst:499 msgid "" "Wait for the :class:`Future` instances (possibly created by different :class:" "`Executor` instances) given by *fs* to complete. Duplicate futures given to " @@ -645,43 +662,43 @@ msgid "" "running futures)." msgstr "" -#: library/concurrent.futures.rst:495 +#: library/concurrent.futures.rst:507 msgid "" "*timeout* can be used to control the maximum number of seconds to wait " "before returning. *timeout* can be an int or float. If *timeout* is not " "specified or ``None``, there is no limit to the wait time." msgstr "" -#: library/concurrent.futures.rst:499 +#: library/concurrent.futures.rst:511 msgid "" "*return_when* indicates when this function should return. It must be one of " "the following constants:" msgstr "" -#: library/concurrent.futures.rst:505 +#: library/concurrent.futures.rst:517 msgid "Constant" msgstr "" -#: library/concurrent.futures.rst:506 +#: library/concurrent.futures.rst:518 msgid "Description" msgstr "" -#: library/concurrent.futures.rst:509 +#: library/concurrent.futures.rst:521 msgid "The function will return when any future finishes or is cancelled." msgstr "" -#: library/concurrent.futures.rst:512 +#: library/concurrent.futures.rst:524 msgid "" "The function will return when any future finishes by raising an exception. " "If no future raises an exception then it is equivalent to :const:" "`ALL_COMPLETED`." msgstr "" -#: library/concurrent.futures.rst:517 +#: library/concurrent.futures.rst:529 msgid "The function will return when all futures finish or are cancelled." msgstr "" -#: library/concurrent.futures.rst:521 +#: library/concurrent.futures.rst:533 msgid "" "Returns an iterator over the :class:`Future` instances (possibly created by " "different :class:`Executor` instances) given by *fs* that yields futures as " @@ -694,55 +711,55 @@ msgid "" "*timeout* is not specified or ``None``, there is no limit to the wait time." msgstr "" -#: library/concurrent.futures.rst:534 +#: library/concurrent.futures.rst:546 msgid ":pep:`3148` -- futures - execute computations asynchronously" msgstr "" -#: library/concurrent.futures.rst:535 +#: library/concurrent.futures.rst:547 msgid "" "The proposal which described this feature for inclusion in the Python " "standard library." msgstr "" -#: library/concurrent.futures.rst:540 +#: library/concurrent.futures.rst:552 msgid "Exception classes" msgstr "" -#: library/concurrent.futures.rst:546 +#: library/concurrent.futures.rst:558 msgid "Raised when a future is cancelled." msgstr "" -#: library/concurrent.futures.rst:550 +#: library/concurrent.futures.rst:562 msgid "" "A deprecated alias of :exc:`TimeoutError`, raised when a future operation " "exceeds the given timeout." msgstr "" -#: library/concurrent.futures.rst:555 +#: library/concurrent.futures.rst:567 msgid "This class was made an alias of :exc:`TimeoutError`." msgstr "" -#: library/concurrent.futures.rst:560 +#: library/concurrent.futures.rst:572 msgid "" "Derived from :exc:`RuntimeError`, this exception class is raised when an " "executor is broken for some reason, and cannot be used to submit or execute " "new tasks." msgstr "" -#: library/concurrent.futures.rst:568 +#: library/concurrent.futures.rst:580 msgid "" "Raised when an operation is performed on a future that is not allowed in the " "current state." msgstr "" -#: library/concurrent.futures.rst:577 +#: library/concurrent.futures.rst:589 msgid "" "Derived from :exc:`~concurrent.futures.BrokenExecutor`, this exception class " "is raised when one of the workers of a :class:`~concurrent.futures." "ThreadPoolExecutor` has failed initializing." msgstr "" -#: library/concurrent.futures.rst:588 +#: library/concurrent.futures.rst:600 msgid "" "Derived from :exc:`~concurrent.futures.BrokenExecutor` (formerly :exc:" "`RuntimeError`), this exception class is raised when one of the workers of " diff --git a/library/concurrent.po b/library/concurrent.po index 43aadafb9..9075242e9 100644 --- a/library/concurrent.po +++ b/library/concurrent.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/configparser.po b/library/configparser.po index 81be92d7b..8958e67f2 100644 --- a/library/configparser.po +++ b/library/configparser.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/constants.po b/library/constants.po index 840c3b887..0622f73c5 100644 --- a/library/constants.po +++ b/library/constants.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -42,7 +42,7 @@ msgid "" "An object frequently used to represent the absence of a value, as when " "default arguments are not passed to a function. Assignments to ``None`` are " "illegal and raise a :exc:`SyntaxError`. ``None`` is the sole instance of " -"the :data:`~types.NoneType` type." +"the :class:`~types.NoneType` type." msgstr "" #: library/constants.rst:30 @@ -53,7 +53,7 @@ msgid "" "implemented with respect to the other type; may be returned by the in-place " "binary special methods (e.g. :meth:`~object.__imul__`, :meth:`~object." "__iand__`, etc.) for the same purpose. It should not be evaluated in a " -"boolean context. :data:`!NotImplemented` is the sole instance of the :data:" +"boolean context. :data:`!NotImplemented` is the sole instance of the :class:" "`types.NotImplementedType` type." msgstr "" @@ -91,7 +91,7 @@ msgid "" "The same as the ellipsis literal \"``...``\", an object frequently used to " "indicate that something is omitted. Assignment to ``Ellipsis`` is possible, " "but assignment to ``...`` raises a :exc:`SyntaxError`. ``Ellipsis`` is the " -"sole instance of the :data:`types.EllipsisType` type." +"sole instance of the :class:`types.EllipsisType` type." msgstr "" #: library/constants.rst:73 diff --git a/library/contextlib.po b/library/contextlib.po index 08c14ffb6..5305bf003 100644 --- a/library/contextlib.po +++ b/library/contextlib.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -43,20 +43,20 @@ msgstr "" #: library/contextlib.rst:23 msgid "" -"An :term:`abstract base class` for classes that implement :meth:`object." -"__enter__` and :meth:`object.__exit__`. A default implementation for :meth:" -"`object.__enter__` is provided which returns ``self`` while :meth:`object." +"An :term:`abstract base class` for classes that implement :meth:`~object." +"__enter__` and :meth:`~object.__exit__`. A default implementation for :meth:" +"`~object.__enter__` is provided which returns ``self`` while :meth:`~object." "__exit__` is an abstract method which by default returns ``None``. See also " "the definition of :ref:`typecontextmanager`." msgstr "" #: library/contextlib.rst:34 msgid "" -"An :term:`abstract base class` for classes that implement :meth:`object." -"__aenter__` and :meth:`object.__aexit__`. A default implementation for :meth:" -"`object.__aenter__` is provided which returns ``self`` while :meth:`object." -"__aexit__` is an abstract method which by default returns ``None``. See also " -"the definition of :ref:`async-context-managers`." +"An :term:`abstract base class` for classes that implement :meth:`~object." +"__aenter__` and :meth:`~object.__aexit__`. A default implementation for :" +"meth:`~object.__aenter__` is provided which returns ``self`` while :meth:" +"`~object.__aexit__` is an abstract method which by default returns ``None``. " +"See also the definition of :ref:`async-context-managers`." msgstr "" #: library/contextlib.rst:46 @@ -311,9 +311,9 @@ msgstr "" #: library/contextlib.rst:231 msgid "" -"Return a context manager that returns *enter_result* from ``__enter__``, but " -"otherwise does nothing. It is intended to be used as a stand-in for an " -"optional context manager, for example::" +"Return a context manager that returns *enter_result* from :meth:`~object." +"__enter__`, but otherwise does nothing. It is intended to be used as a stand-" +"in for an optional context manager, for example::" msgstr "" #: library/contextlib.rst:235 @@ -454,9 +454,9 @@ msgstr "" msgid "" "For example, the output of :func:`help` normally is sent to *sys.stdout*. " "You can capture that output in a string by redirecting the output to an :" -"class:`io.StringIO` object. The replacement stream is returned from the " -"``__enter__`` method and so is available as the target of the :keyword:" -"`with` statement::" +"class:`io.StringIO` object. The replacement stream is returned from the :" +"meth:`~object.__enter__` method and so is available as the target of the :" +"keyword:`with` statement::" msgstr "" #: library/contextlib.rst:341 @@ -526,22 +526,23 @@ msgstr "" #: library/contextlib.rst:398 msgid "" -"Context managers inheriting from ``ContextDecorator`` have to implement " -"``__enter__`` and ``__exit__`` as normal. ``__exit__`` retains its optional " -"exception handling even when used as a decorator." +"Context managers inheriting from ``ContextDecorator`` have to implement :" +"meth:`~object.__enter__` and :meth:`~object.__exit__` as normal. " +"``__exit__`` retains its optional exception handling even when used as a " +"decorator." msgstr "" -#: library/contextlib.rst:402 +#: library/contextlib.rst:403 msgid "" "``ContextDecorator`` is used by :func:`contextmanager`, so you get this " "functionality automatically." msgstr "" -#: library/contextlib.rst:405 +#: library/contextlib.rst:406 msgid "Example of ``ContextDecorator``::" msgstr "" -#: library/contextlib.rst:407 +#: library/contextlib.rst:408 msgid "" "from contextlib import ContextDecorator\n" "\n" @@ -555,11 +556,11 @@ msgid "" " return False" msgstr "" -#: library/contextlib.rst:490 +#: library/contextlib.rst:491 msgid "The class can then be used like this::" msgstr "" -#: library/contextlib.rst:420 +#: library/contextlib.rst:421 msgid "" ">>> @mycontext()\n" "... def function():\n" @@ -578,42 +579,42 @@ msgid "" "Finishing" msgstr "" -#: library/contextlib.rst:436 +#: library/contextlib.rst:437 msgid "" "This change is just syntactic sugar for any construct of the following form::" msgstr "" -#: library/contextlib.rst:438 +#: library/contextlib.rst:439 msgid "" "def f():\n" " with cm():\n" " # Do stuff" msgstr "" -#: library/contextlib.rst:442 +#: library/contextlib.rst:443 msgid "``ContextDecorator`` lets you instead write::" msgstr "" -#: library/contextlib.rst:444 +#: library/contextlib.rst:445 msgid "" "@cm()\n" "def f():\n" " # Do stuff" msgstr "" -#: library/contextlib.rst:448 +#: library/contextlib.rst:449 msgid "" "It makes it clear that the ``cm`` applies to the whole function, rather than " "just a piece of it (and saving an indentation level is nice, too)." msgstr "" -#: library/contextlib.rst:451 +#: library/contextlib.rst:452 msgid "" "Existing context managers that already have a base class can be extended by " "using ``ContextDecorator`` as a mixin class::" msgstr "" -#: library/contextlib.rst:454 +#: library/contextlib.rst:455 msgid "" "from contextlib import ContextDecorator\n" "\n" @@ -625,7 +626,7 @@ msgid "" " return False" msgstr "" -#: library/contextlib.rst:464 +#: library/contextlib.rst:465 msgid "" "As the decorated function must be able to be called multiple times, the " "underlying context manager must support use in multiple :keyword:`with` " @@ -633,16 +634,16 @@ msgid "" "explicit :keyword:`!with` statement inside the function should be used." msgstr "" -#: library/contextlib.rst:474 +#: library/contextlib.rst:475 msgid "" "Similar to :class:`ContextDecorator` but only for asynchronous functions." msgstr "" -#: library/contextlib.rst:476 +#: library/contextlib.rst:477 msgid "Example of ``AsyncContextDecorator``::" msgstr "" -#: library/contextlib.rst:478 +#: library/contextlib.rst:479 msgid "" "from asyncio import run\n" "from contextlib import AsyncContextDecorator\n" @@ -657,7 +658,7 @@ msgid "" " return False" msgstr "" -#: library/contextlib.rst:492 +#: library/contextlib.rst:493 msgid "" ">>> @mycontext()\n" "... async def function():\n" @@ -678,20 +679,20 @@ msgid "" "Finishing" msgstr "" -#: library/contextlib.rst:515 +#: library/contextlib.rst:516 msgid "" "A context manager that is designed to make it easy to programmatically " "combine other context managers and cleanup functions, especially those that " "are optional or otherwise driven by input data." msgstr "" -#: library/contextlib.rst:519 +#: library/contextlib.rst:520 msgid "" "For example, a set of files may easily be handled in a single with statement " "as follows::" msgstr "" -#: library/contextlib.rst:522 +#: library/contextlib.rst:523 msgid "" "with ExitStack() as stack:\n" " files = [stack.enter_context(open(fname)) for fname in filenames]\n" @@ -700,13 +701,13 @@ msgid "" " # in the list raise an exception" msgstr "" -#: library/contextlib.rst:528 +#: library/contextlib.rst:529 msgid "" "The :meth:`~object.__enter__` method returns the :class:`ExitStack` " "instance, and performs no additional operations." msgstr "" -#: library/contextlib.rst:531 +#: library/contextlib.rst:532 msgid "" "Each instance maintains a stack of registered callbacks that are called in " "reverse order when the instance is closed (either explicitly or implicitly " @@ -714,14 +715,14 @@ msgid "" "invoked implicitly when the context stack instance is garbage collected." msgstr "" -#: library/contextlib.rst:536 +#: library/contextlib.rst:537 msgid "" "This stack model is used so that context managers that acquire their " "resources in their ``__init__`` method (such as file objects) can be handled " "correctly." msgstr "" -#: library/contextlib.rst:540 +#: library/contextlib.rst:541 msgid "" "Since registered callbacks are invoked in the reverse order of registration, " "this ends up behaving as if multiple nested :keyword:`with` statements had " @@ -731,7 +732,7 @@ msgid "" "updated state." msgstr "" -#: library/contextlib.rst:547 +#: library/contextlib.rst:548 msgid "" "This is a relatively low level API that takes care of the details of " "correctly unwinding the stack of exit callbacks. It provides a suitable " @@ -739,76 +740,76 @@ msgid "" "in application specific ways." msgstr "" -#: library/contextlib.rst:556 +#: library/contextlib.rst:557 msgid "" "Enters a new context manager and adds its :meth:`~object.__exit__` method to " "the callback stack. The return value is the result of the context manager's " "own :meth:`~object.__enter__` method." msgstr "" -#: library/contextlib.rst:560 +#: library/contextlib.rst:561 msgid "" "These context managers may suppress exceptions just as they normally would " "if used directly as part of a :keyword:`with` statement." msgstr "" -#: library/contextlib.rst:563 +#: library/contextlib.rst:564 msgid "" "Raises :exc:`TypeError` instead of :exc:`AttributeError` if *cm* is not a " "context manager." msgstr "" -#: library/contextlib.rst:569 +#: library/contextlib.rst:570 msgid "" "Adds a context manager's :meth:`~object.__exit__` method to the callback " "stack." msgstr "" -#: library/contextlib.rst:571 +#: library/contextlib.rst:572 msgid "" "As ``__enter__`` is *not* invoked, this method can be used to cover part of " "an :meth:`~object.__enter__` implementation with a context manager's own :" "meth:`~object.__exit__` method." msgstr "" -#: library/contextlib.rst:575 +#: library/contextlib.rst:576 msgid "" "If passed an object that is not a context manager, this method assumes it is " "a callback with the same signature as a context manager's :meth:`~object." "__exit__` method and adds it directly to the callback stack." msgstr "" -#: library/contextlib.rst:579 +#: library/contextlib.rst:580 msgid "" "By returning true values, these callbacks can suppress exceptions the same " "way context manager :meth:`~object.__exit__` methods can." msgstr "" -#: library/contextlib.rst:582 +#: library/contextlib.rst:583 msgid "" "The passed in object is returned from the function, allowing this method to " "be used as a function decorator." msgstr "" -#: library/contextlib.rst:587 +#: library/contextlib.rst:588 msgid "" "Accepts an arbitrary callback function and arguments and adds it to the " "callback stack." msgstr "" -#: library/contextlib.rst:590 +#: library/contextlib.rst:591 msgid "" "Unlike the other methods, callbacks added this way cannot suppress " "exceptions (as they are never passed the exception details)." msgstr "" -#: library/contextlib.rst:593 +#: library/contextlib.rst:594 msgid "" "The passed in callback is returned from the function, allowing this method " "to be used as a function decorator." msgstr "" -#: library/contextlib.rst:598 +#: library/contextlib.rst:599 msgid "" "Transfers the callback stack to a fresh :class:`ExitStack` instance and " "returns it. No callbacks are invoked by this operation - instead, they will " @@ -816,13 +817,13 @@ msgid "" "at the end of a :keyword:`with` statement)." msgstr "" -#: library/contextlib.rst:603 +#: library/contextlib.rst:604 msgid "" "For example, a group of files can be opened as an \"all or nothing\" " "operation as follows::" msgstr "" -#: library/contextlib.rst:606 +#: library/contextlib.rst:607 msgid "" "with ExitStack() as stack:\n" " files = [stack.enter_context(open(fname)) for fname in filenames]\n" @@ -834,57 +835,57 @@ msgid "" " # close_files() can then be invoked explicitly to close them all." msgstr "" -#: library/contextlib.rst:617 +#: library/contextlib.rst:618 msgid "" "Immediately unwinds the callback stack, invoking callbacks in the reverse " "order of registration. For any context managers and exit callbacks " "registered, the arguments passed in will indicate that no exception occurred." msgstr "" -#: library/contextlib.rst:624 +#: library/contextlib.rst:625 msgid "" "An :ref:`asynchronous context manager `, similar to :" "class:`ExitStack`, that supports combining both synchronous and asynchronous " "context managers, as well as having coroutines for cleanup logic." msgstr "" -#: library/contextlib.rst:629 +#: library/contextlib.rst:630 msgid "" "The :meth:`~ExitStack.close` method is not implemented; :meth:`aclose` must " "be used instead." msgstr "" -#: library/contextlib.rst:635 +#: library/contextlib.rst:636 msgid "" "Similar to :meth:`ExitStack.enter_context` but expects an asynchronous " "context manager." msgstr "" -#: library/contextlib.rst:638 +#: library/contextlib.rst:639 msgid "" "Raises :exc:`TypeError` instead of :exc:`AttributeError` if *cm* is not an " "asynchronous context manager." msgstr "" -#: library/contextlib.rst:644 +#: library/contextlib.rst:645 msgid "" "Similar to :meth:`ExitStack.push` but expects either an asynchronous context " "manager or a coroutine function." msgstr "" -#: library/contextlib.rst:649 +#: library/contextlib.rst:650 msgid "Similar to :meth:`ExitStack.callback` but expects a coroutine function." msgstr "" -#: library/contextlib.rst:654 +#: library/contextlib.rst:655 msgid "Similar to :meth:`ExitStack.close` but properly handles awaitables." msgstr "" -#: library/contextlib.rst:656 +#: library/contextlib.rst:657 msgid "Continuing the example for :func:`asynccontextmanager`::" msgstr "" -#: library/contextlib.rst:658 +#: library/contextlib.rst:659 msgid "" "async with AsyncExitStack() as stack:\n" " connections = [await stack.enter_async_context(get_connection())\n" @@ -894,21 +895,21 @@ msgid "" " # later in the list raise an exception." msgstr "" -#: library/contextlib.rst:668 +#: library/contextlib.rst:669 msgid "Examples and Recipes" msgstr "" -#: library/contextlib.rst:670 +#: library/contextlib.rst:671 msgid "" "This section describes some examples and recipes for making effective use of " "the tools provided by :mod:`contextlib`." msgstr "" -#: library/contextlib.rst:675 +#: library/contextlib.rst:676 msgid "Supporting a variable number of context managers" msgstr "" -#: library/contextlib.rst:677 +#: library/contextlib.rst:678 msgid "" "The primary use case for :class:`ExitStack` is the one given in the class " "documentation: supporting a variable number of context managers and other " @@ -918,7 +919,7 @@ msgid "" "of the context managers being optional::" msgstr "" -#: library/contextlib.rst:684 +#: library/contextlib.rst:685 msgid "" "with ExitStack() as stack:\n" " for resource in resources:\n" @@ -929,27 +930,28 @@ msgid "" " # Perform operations that use the acquired resources" msgstr "" -#: library/contextlib.rst:692 +#: library/contextlib.rst:693 msgid "" "As shown, :class:`ExitStack` also makes it quite easy to use :keyword:`with` " "statements to manage arbitrary resources that don't natively support the " "context management protocol." msgstr "" -#: library/contextlib.rst:698 +#: library/contextlib.rst:699 msgid "Catching exceptions from ``__enter__`` methods" msgstr "" -#: library/contextlib.rst:700 +#: library/contextlib.rst:701 msgid "" -"It is occasionally desirable to catch exceptions from an ``__enter__`` " -"method implementation, *without* inadvertently catching exceptions from the :" -"keyword:`with` statement body or the context manager's ``__exit__`` method. " -"By using :class:`ExitStack` the steps in the context management protocol can " -"be separated slightly in order to allow this::" +"It is occasionally desirable to catch exceptions from an :meth:`~object." +"__enter__` method implementation, *without* inadvertently catching " +"exceptions from the :keyword:`with` statement body or the context manager's :" +"meth:`~object.__exit__` method. By using :class:`ExitStack` the steps in the " +"context management protocol can be separated slightly in order to allow " +"this::" msgstr "" -#: library/contextlib.rst:706 +#: library/contextlib.rst:707 msgid "" "stack = ExitStack()\n" "try:\n" @@ -961,7 +963,7 @@ msgid "" " # Handle normal case" msgstr "" -#: library/contextlib.rst:715 +#: library/contextlib.rst:716 msgid "" "Actually needing to do this is likely to indicate that the underlying API " "should be providing a direct resource management interface for use with :" @@ -972,25 +974,25 @@ msgid "" "`with` statement." msgstr "" -#: library/contextlib.rst:725 +#: library/contextlib.rst:726 msgid "Cleaning up in an ``__enter__`` implementation" msgstr "" -#: library/contextlib.rst:727 +#: library/contextlib.rst:728 msgid "" "As noted in the documentation of :meth:`ExitStack.push`, this method can be " "useful in cleaning up an already allocated resource if later steps in the :" "meth:`~object.__enter__` implementation fail." msgstr "" -#: library/contextlib.rst:731 +#: library/contextlib.rst:732 msgid "" "Here's an example of doing this for a context manager that accepts resource " "acquisition and release functions, along with an optional validation " "function, and maps them to the context management protocol::" msgstr "" -#: library/contextlib.rst:735 +#: library/contextlib.rst:736 msgid "" "from contextlib import contextmanager, AbstractContextManager, ExitStack\n" "\n" @@ -1028,11 +1030,11 @@ msgid "" " self.release_resource()" msgstr "" -#: library/contextlib.rst:771 +#: library/contextlib.rst:772 msgid "Replacing any use of ``try-finally`` and flag variables" msgstr "" -#: library/contextlib.rst:773 +#: library/contextlib.rst:774 msgid "" "A pattern you will sometimes see is a ``try-finally`` statement with a flag " "variable to indicate whether or not the body of the ``finally`` clause " @@ -1040,7 +1042,7 @@ msgid "" "by using an ``except`` clause instead), it looks something like this::" msgstr "" -#: library/contextlib.rst:778 +#: library/contextlib.rst:779 msgid "" "cleanup_needed = True\n" "try:\n" @@ -1052,21 +1054,21 @@ msgid "" " cleanup_resources()" msgstr "" -#: library/contextlib.rst:787 +#: library/contextlib.rst:788 msgid "" "As with any ``try`` statement based code, this can cause problems for " "development and review, because the setup code and the cleanup code can end " "up being separated by arbitrarily long sections of code." msgstr "" -#: library/contextlib.rst:791 +#: library/contextlib.rst:792 msgid "" ":class:`ExitStack` makes it possible to instead register a callback for " "execution at the end of a ``with`` statement, and then later decide to skip " "executing that callback::" msgstr "" -#: library/contextlib.rst:795 +#: library/contextlib.rst:796 msgid "" "from contextlib import ExitStack\n" "\n" @@ -1077,19 +1079,19 @@ msgid "" " stack.pop_all()" msgstr "" -#: library/contextlib.rst:803 +#: library/contextlib.rst:804 msgid "" "This allows the intended cleanup behaviour to be made explicit up front, " "rather than requiring a separate flag variable." msgstr "" -#: library/contextlib.rst:806 +#: library/contextlib.rst:807 msgid "" "If a particular application uses this pattern a lot, it can be simplified " "even further by means of a small helper class::" msgstr "" -#: library/contextlib.rst:809 +#: library/contextlib.rst:810 msgid "" "from contextlib import ExitStack\n" "\n" @@ -1107,14 +1109,14 @@ msgid "" " cb.cancel()" msgstr "" -#: library/contextlib.rst:824 +#: library/contextlib.rst:825 msgid "" "If the resource cleanup isn't already neatly bundled into a standalone " "function, then it is still possible to use the decorator form of :meth:" "`ExitStack.callback` to declare the resource cleanup in advance::" msgstr "" -#: library/contextlib.rst:829 +#: library/contextlib.rst:830 msgid "" "from contextlib import ExitStack\n" "\n" @@ -1127,24 +1129,24 @@ msgid "" " stack.pop_all()" msgstr "" -#: library/contextlib.rst:839 +#: library/contextlib.rst:840 msgid "" "Due to the way the decorator protocol works, a callback function declared " "this way cannot take any parameters. Instead, any resources to be released " "must be accessed as closure variables." msgstr "" -#: library/contextlib.rst:845 +#: library/contextlib.rst:846 msgid "Using a context manager as a function decorator" msgstr "" -#: library/contextlib.rst:847 +#: library/contextlib.rst:848 msgid "" ":class:`ContextDecorator` makes it possible to use a context manager in both " "an ordinary ``with`` statement and also as a function decorator." msgstr "" -#: library/contextlib.rst:850 +#: library/contextlib.rst:851 msgid "" "For example, it is sometimes useful to wrap functions or groups of " "statements with a logger that can track the time of entry and time of exit. " @@ -1153,7 +1155,7 @@ msgid "" "in a single definition::" msgstr "" -#: library/contextlib.rst:856 +#: library/contextlib.rst:857 msgid "" "from contextlib import ContextDecorator\n" "import logging\n" @@ -1171,22 +1173,22 @@ msgid "" " logging.info('Exiting: %s', self.name)" msgstr "" -#: library/contextlib.rst:871 +#: library/contextlib.rst:872 msgid "Instances of this class can be used as both a context manager::" msgstr "" -#: library/contextlib.rst:873 +#: library/contextlib.rst:874 msgid "" "with track_entry_and_exit('widget loader'):\n" " print('Some time consuming activity goes here')\n" " load_widget()" msgstr "" -#: library/contextlib.rst:877 +#: library/contextlib.rst:878 msgid "And also as a function decorator::" msgstr "" -#: library/contextlib.rst:879 +#: library/contextlib.rst:880 msgid "" "@track_entry_and_exit('widget loader')\n" "def activity():\n" @@ -1194,7 +1196,7 @@ msgid "" " load_widget()" msgstr "" -#: library/contextlib.rst:884 +#: library/contextlib.rst:885 msgid "" "Note that there is one additional limitation when using context managers as " "function decorators: there's no way to access the return value of :meth:" @@ -1202,21 +1204,21 @@ msgid "" "use an explicit ``with`` statement." msgstr "" -#: library/contextlib.rst:891 +#: library/contextlib.rst:892 msgid ":pep:`343` - The \"with\" statement" msgstr "" -#: library/contextlib.rst:892 +#: library/contextlib.rst:893 msgid "" "The specification, background, and examples for the Python :keyword:`with` " "statement." msgstr "" -#: library/contextlib.rst:898 +#: library/contextlib.rst:899 msgid "Single use, reusable and reentrant context managers" msgstr "" -#: library/contextlib.rst:900 +#: library/contextlib.rst:901 msgid "" "Most context managers are written in a way that means they can only be used " "effectively in a :keyword:`with` statement once. These single use context " @@ -1224,28 +1226,28 @@ msgid "" "them a second time will trigger an exception or otherwise not work correctly." msgstr "" -#: library/contextlib.rst:906 +#: library/contextlib.rst:907 msgid "" "This common limitation means that it is generally advisable to create " "context managers directly in the header of the :keyword:`with` statement " "where they are used (as shown in all of the usage examples above)." msgstr "" -#: library/contextlib.rst:910 +#: library/contextlib.rst:911 msgid "" "Files are an example of effectively single use context managers, since the " "first :keyword:`with` statement will close the file, preventing any further " "IO operations using that file object." msgstr "" -#: library/contextlib.rst:914 +#: library/contextlib.rst:915 msgid "" "Context managers created using :func:`contextmanager` are also single use " "context managers, and will complain about the underlying generator failing " "to yield if an attempt is made to use them a second time::" msgstr "" -#: library/contextlib.rst:918 +#: library/contextlib.rst:919 msgid "" ">>> from contextlib import contextmanager\n" ">>> @contextmanager\n" @@ -1268,11 +1270,11 @@ msgid "" "RuntimeError: generator didn't yield" msgstr "" -#: library/contextlib.rst:942 +#: library/contextlib.rst:943 msgid "Reentrant context managers" msgstr "" -#: library/contextlib.rst:944 +#: library/contextlib.rst:945 msgid "" "More sophisticated context managers may be \"reentrant\". These context " "managers can not only be used in multiple :keyword:`with` statements, but " @@ -1280,14 +1282,14 @@ msgid "" "the same context manager." msgstr "" -#: library/contextlib.rst:949 +#: library/contextlib.rst:950 msgid "" ":class:`threading.RLock` is an example of a reentrant context manager, as " "are :func:`suppress`, :func:`redirect_stdout`, and :func:`chdir`. Here's a " "very simple example of reentrant use::" msgstr "" -#: library/contextlib.rst:953 +#: library/contextlib.rst:954 msgid "" ">>> from contextlib import redirect_stdout\n" ">>> from io import StringIO\n" @@ -1305,14 +1307,14 @@ msgid "" "This is also written to the stream" msgstr "" -#: library/contextlib.rst:968 +#: library/contextlib.rst:969 msgid "" "Real world examples of reentrancy are more likely to involve multiple " "functions calling each other and hence be far more complicated than this " "example." msgstr "" -#: library/contextlib.rst:972 +#: library/contextlib.rst:973 msgid "" "Note also that being reentrant is *not* the same thing as being thread " "safe. :func:`redirect_stdout`, for example, is definitely not thread safe, " @@ -1320,11 +1322,11 @@ msgid "" "stdout` to a different stream." msgstr "" -#: library/contextlib.rst:981 +#: library/contextlib.rst:982 msgid "Reusable context managers" msgstr "" -#: library/contextlib.rst:983 +#: library/contextlib.rst:984 msgid "" "Distinct from both single use and reentrant context managers are " "\"reusable\" context managers (or, to be completely explicit, \"reusable, " @@ -1334,21 +1336,21 @@ msgid "" "manager instance has already been used in a containing with statement." msgstr "" -#: library/contextlib.rst:990 +#: library/contextlib.rst:991 msgid "" ":class:`threading.Lock` is an example of a reusable, but not reentrant, " "context manager (for a reentrant lock, it is necessary to use :class:" "`threading.RLock` instead)." msgstr "" -#: library/contextlib.rst:994 +#: library/contextlib.rst:995 msgid "" "Another example of a reusable, but not reentrant, context manager is :class:" "`ExitStack`, as it invokes *all* currently registered callbacks when leaving " "any with statement, regardless of where those callbacks were added::" msgstr "" -#: library/contextlib.rst:999 +#: library/contextlib.rst:1000 msgid "" ">>> from contextlib import ExitStack\n" ">>> stack = ExitStack()\n" @@ -1377,7 +1379,7 @@ msgid "" "Leaving outer context" msgstr "" -#: library/contextlib.rst:1025 +#: library/contextlib.rst:1026 msgid "" "As the output from the example shows, reusing a single stack object across " "multiple with statements works correctly, but attempting to nest them will " @@ -1385,13 +1387,13 @@ msgid "" "which is unlikely to be desirable behaviour." msgstr "" -#: library/contextlib.rst:1030 +#: library/contextlib.rst:1031 msgid "" "Using separate :class:`ExitStack` instances instead of reusing a single " "instance avoids that problem::" msgstr "" -#: library/contextlib.rst:1033 +#: library/contextlib.rst:1034 msgid "" ">>> from contextlib import ExitStack\n" ">>> with ExitStack() as outer_stack:\n" diff --git a/library/contextvars.po b/library/contextvars.po index e5008e55a..5675cb57f 100644 --- a/library/contextvars.po +++ b/library/contextvars.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -73,62 +73,68 @@ msgid "" "garbage collected." msgstr "" -#: library/contextvars.rst:49 +#: library/contextvars.rst:47 +msgid "" +":class:`!ContextVar`\\s are :ref:`generic ` over the type of their " +"contained value." +msgstr "" + +#: library/contextvars.rst:52 msgid "The name of the variable. This is a read-only property." msgstr "" -#: library/contextvars.rst:55 +#: library/contextvars.rst:58 msgid "Return a value for the context variable for the current context." msgstr "" -#: library/contextvars.rst:57 +#: library/contextvars.rst:60 msgid "" "If there is no value for the variable in the current context, the method " "will:" msgstr "" -#: library/contextvars.rst:60 +#: library/contextvars.rst:63 msgid "" "return the value of the *default* argument of the method, if provided; or" msgstr "" -#: library/contextvars.rst:63 +#: library/contextvars.rst:66 msgid "" "return the default value for the context variable, if it was created with " "one; or" msgstr "" -#: library/contextvars.rst:66 +#: library/contextvars.rst:69 msgid "raise a :exc:`LookupError`." msgstr "" -#: library/contextvars.rst:70 +#: library/contextvars.rst:73 msgid "" "Call to set a new value for the context variable in the current context." msgstr "" -#: library/contextvars.rst:73 +#: library/contextvars.rst:76 msgid "" "The required *value* argument is the new value for the context variable." msgstr "" -#: library/contextvars.rst:76 +#: library/contextvars.rst:79 msgid "" "Returns a :class:`~contextvars.Token` object that can be used to restore the " "variable to its previous value via the :meth:`ContextVar.reset` method." msgstr "" -#: library/contextvars.rst:82 +#: library/contextvars.rst:85 msgid "" "Reset the context variable to the value it had before the :meth:`ContextVar." "set` that created the *token* was used." msgstr "" -#: library/contextvars.rst:85 +#: library/contextvars.rst:88 msgid "For example::" msgstr "" -#: library/contextvars.rst:87 +#: library/contextvars.rst:90 msgid "" "var = ContextVar('var')\n" "\n" @@ -141,67 +147,78 @@ msgid "" msgstr "" #: library/contextvars.rst:99 +msgid "The same *token* cannot be used twice." +msgstr "" + +#: library/contextvars.rst:104 msgid "" "*Token* objects are returned by the :meth:`ContextVar.set` method. They can " "be passed to the :meth:`ContextVar.reset` method to revert the value of the " -"variable to what it was before the corresponding *set*." +"variable to what it was before the corresponding *set*. A single token " +"cannot reset a context variable more than once." +msgstr "" + +#: library/contextvars.rst:109 +msgid "" +"Tokens are :ref:`generic ` over the same type as the :class:" +"`ContextVar` which created them." msgstr "" -#: library/contextvars.rst:106 +#: library/contextvars.rst:114 msgid "" "A read-only property. Points to the :class:`ContextVar` object that created " "the token." msgstr "" -#: library/contextvars.rst:111 +#: library/contextvars.rst:119 msgid "" "A read-only property. Set to the value the variable had before the :meth:" "`ContextVar.set` method call that created the token. It points to :attr:" "`Token.MISSING` if the variable was not set before the call." msgstr "" -#: library/contextvars.rst:118 +#: library/contextvars.rst:126 msgid "A marker object used by :attr:`Token.old_value`." msgstr "" -#: library/contextvars.rst:122 +#: library/contextvars.rst:130 msgid "Manual Context Management" msgstr "" -#: library/contextvars.rst:126 +#: library/contextvars.rst:134 msgid "Returns a copy of the current :class:`~contextvars.Context` object." msgstr "" -#: library/contextvars.rst:128 +#: library/contextvars.rst:136 msgid "" "The following snippet gets a copy of the current context and prints all " "variables and their values that are set in it::" msgstr "" -#: library/contextvars.rst:131 +#: library/contextvars.rst:139 msgid "" "ctx: Context = copy_context()\n" "print(list(ctx.items()))" msgstr "" -#: library/contextvars.rst:134 +#: library/contextvars.rst:142 msgid "" "The function has an *O*\\ (1) complexity, i.e. works equally fast for " "contexts with a few context variables and for contexts that have a lot of " "them." msgstr "" -#: library/contextvars.rst:141 +#: library/contextvars.rst:149 msgid "A mapping of :class:`ContextVars ` to their values." msgstr "" -#: library/contextvars.rst:143 +#: library/contextvars.rst:151 msgid "" "``Context()`` creates an empty context with no values in it. To get a copy " "of the current context use the :func:`~contextvars.copy_context` function." msgstr "" -#: library/contextvars.rst:147 +#: library/contextvars.rst:155 msgid "" "Each thread has its own effective stack of :class:`!Context` objects. The :" "term:`current context` is the :class:`!Context` object at the top of the " @@ -209,14 +226,14 @@ msgid "" "considered to be *entered*." msgstr "" -#: library/contextvars.rst:152 +#: library/contextvars.rst:160 msgid "" "*Entering* a context, which can be done by calling its :meth:`~Context.run` " "method, makes the context the current context by pushing it onto the top of " "the current thread's context stack." msgstr "" -#: library/contextvars.rst:156 +#: library/contextvars.rst:164 msgid "" "*Exiting* from the current context, which can be done by returning from the " "callback passed to the :meth:`~Context.run` method, restores the current " @@ -224,24 +241,24 @@ msgid "" "off the top of the context stack." msgstr "" -#: library/contextvars.rst:161 +#: library/contextvars.rst:169 msgid "" "Since each thread has its own context stack, :class:`ContextVar` objects " "behave in a similar fashion to :func:`threading.local` when values are " "assigned in different threads." msgstr "" -#: library/contextvars.rst:165 +#: library/contextvars.rst:173 msgid "" "Attempting to enter an already entered context, including contexts entered " "in other threads, raises a :exc:`RuntimeError`." msgstr "" -#: library/contextvars.rst:168 +#: library/contextvars.rst:176 msgid "After exiting a context, it can later be re-entered (from any thread)." msgstr "" -#: library/contextvars.rst:170 +#: library/contextvars.rst:178 msgid "" "Any changes to :class:`ContextVar` values via the :meth:`ContextVar.set` " "method are recorded in the current context. The :meth:`ContextVar.get` " @@ -251,22 +268,22 @@ msgid "" "the context)." msgstr "" -#: library/contextvars.rst:177 +#: library/contextvars.rst:185 msgid "Context implements the :class:`collections.abc.Mapping` interface." msgstr "" -#: library/contextvars.rst:181 +#: library/contextvars.rst:189 msgid "" "Enters the Context, executes ``callable(*args, **kwargs)``, then exits the " "Context. Returns *callable*'s return value, or propagates an exception if " "one occurred." msgstr "" -#: library/contextvars.rst:185 +#: library/contextvars.rst:193 msgid "Example:" msgstr "" -#: library/contextvars.rst:187 +#: library/contextvars.rst:195 msgid "" "import contextvars\n" "\n" @@ -300,55 +317,55 @@ msgid "" "print(var.get()) # 'spam'" msgstr "" -#: library/contextvars.rst:233 +#: library/contextvars.rst:241 msgid "Return a shallow copy of the context object." msgstr "" -#: library/contextvars.rst:237 +#: library/contextvars.rst:245 msgid "" "Return ``True`` if the *context* has a value for *var* set; return ``False`` " "otherwise." msgstr "" -#: library/contextvars.rst:242 +#: library/contextvars.rst:250 msgid "" "Return the value of the *var* :class:`ContextVar` variable. If the variable " "is not set in the context object, a :exc:`KeyError` is raised." msgstr "" -#: library/contextvars.rst:248 +#: library/contextvars.rst:256 msgid "" "Return the value for *var* if *var* has the value in the context object. " "Return *default* otherwise. If *default* is not given, return ``None``." msgstr "" -#: library/contextvars.rst:254 +#: library/contextvars.rst:262 msgid "Return an iterator over the variables stored in the context object." msgstr "" -#: library/contextvars.rst:259 +#: library/contextvars.rst:267 msgid "Return the number of variables set in the context object." msgstr "" -#: library/contextvars.rst:263 +#: library/contextvars.rst:271 msgid "Return a list of all variables in the context object." msgstr "" -#: library/contextvars.rst:267 +#: library/contextvars.rst:275 msgid "Return a list of all variables' values in the context object." msgstr "" -#: library/contextvars.rst:272 +#: library/contextvars.rst:280 msgid "" "Return a list of 2-tuples containing all variables and their values in the " "context object." msgstr "" -#: library/contextvars.rst:277 +#: library/contextvars.rst:285 msgid "asyncio support" msgstr "" -#: library/contextvars.rst:279 +#: library/contextvars.rst:287 msgid "" "Context variables are natively supported in :mod:`asyncio` and are ready to " "be used without any extra configuration. For example, here is a simple echo " @@ -356,7 +373,7 @@ msgid "" "available in the Task that handles that client::" msgstr "" -#: library/contextvars.rst:285 +#: library/contextvars.rst:293 msgid "" "import asyncio\n" "import contextvars\n" diff --git a/library/copy.po b/library/copy.po index 3d2f01d20..299b7982c 100644 --- a/library/copy.po +++ b/library/copy.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -120,12 +120,16 @@ msgstr "" #: library/copy.rst:75 msgid "" -"Shallow copies of dictionaries can be made using :meth:`dict.copy`, and of " -"lists by assigning a slice of the entire list, for example, ``copied_list = " -"original_list[:]``." +"Shallow copies of many collections can be made using the corresponding :meth:" +"`!copy` method (such as :meth:`list.copy`, :meth:`dict.copy` or :meth:`set." +"copy`), and of sequences (such as lists or bytearrays) by making a slice of " +"the entire sequence (``sequence[:]``). However, these methods and slicing " +"can create an instance of the base type when copying an instance of a " +"subclass, whereas :func:`copy.copy` normally returns an instance of the same " +"type." msgstr "" -#: library/copy.rst:81 +#: library/copy.rst:85 msgid "" "Classes can use the same interfaces to control copying that they use to " "control pickling. See the description of module :mod:`pickle` for " @@ -133,19 +137,19 @@ msgid "" "registered pickle functions from the :mod:`copyreg` module." msgstr "" -#: library/copy.rst:92 +#: library/copy.rst:96 msgid "" "In order for a class to define its own copy implementation, it can define " "special methods :meth:`~object.__copy__` and :meth:`~object.__deepcopy__`." msgstr "" -#: library/copy.rst:98 +#: library/copy.rst:102 msgid "" "Called to implement the shallow copy operation; no additional arguments are " "passed." msgstr "" -#: library/copy.rst:104 +#: library/copy.rst:108 msgid "" "Called to implement the deep copy operation; it is passed one argument, the " "*memo* dictionary. If the ``__deepcopy__`` implementation needs to make a " @@ -154,7 +158,7 @@ msgid "" "argument. The *memo* dictionary should be treated as an opaque object." msgstr "" -#: library/copy.rst:114 +#: library/copy.rst:118 msgid "" "Function :func:`!copy.replace` is more limited than :func:`~copy.copy` and :" "func:`~copy.deepcopy`, and only supports named tuples created by :func:" @@ -162,38 +166,38 @@ msgid "" "define method :meth:`~object.__replace__`." msgstr "" -#: library/copy.rst:122 +#: library/copy.rst:126 msgid "" "This method should create a new object of the same type, replacing fields " "with values from *changes*." msgstr "" -#: library/copy.rst:130 +#: library/copy.rst:134 msgid "Module :mod:`pickle`" msgstr "" -#: library/copy.rst:131 +#: library/copy.rst:135 msgid "" "Discussion of the special methods used to support object state retrieval and " "restoration." msgstr "" -#: library/copy.rst:79 +#: library/copy.rst:83 msgid "module" msgstr "" -#: library/copy.rst:79 +#: library/copy.rst:83 msgid "pickle" msgstr "" -#: library/copy.rst:86 +#: library/copy.rst:90 msgid "__copy__() (copy protocol)" msgstr "" -#: library/copy.rst:86 +#: library/copy.rst:90 msgid "__deepcopy__() (copy protocol)" msgstr "" -#: library/copy.rst:111 +#: library/copy.rst:115 msgid "__replace__() (replace protocol)" msgstr "" diff --git a/library/copyreg.po b/library/copyreg.po index 4b56bbb9c..096197367 100644 --- a/library/copyreg.po +++ b/library/copyreg.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/crypt.po b/library/crypt.po index 91cc7f83b..01723d3cc 100644 --- a/library/crypt.po +++ b/library/crypt.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/crypto.po b/library/crypto.po index 1eb44843b..a45b511d7 100644 --- a/library/crypto.po +++ b/library/crypto.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/csv.po b/library/csv.po index 8bb7c2b04..c102e8d35 100644 --- a/library/csv.po +++ b/library/csv.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -95,7 +95,7 @@ msgid "" "are transformed into floats)." msgstr "" -#: library/csv.rst:106 library/csv.rst:220 +#: library/csv.rst:113 library/csv.rst:242 msgid "A short usage example::" msgstr "" @@ -110,7 +110,17 @@ msgid "" "Spam, Lovely Spam, Wonderful Spam" msgstr "" -#: library/csv.rst:89 +#: library/csv.rst:86 +msgid "where :file:`eggs.csv` contains:" +msgstr "" + +#: library/csv.rst:124 +msgid "" +"Spam Spam Spam Spam Spam |Baked Beans|\n" +"Spam |Lovely Spam| |Wonderful Spam|" +msgstr "" + +#: library/csv.rst:96 msgid "" "Return a writer object responsible for converting the user's data into " "delimited strings on the given file-like object. *csvfile* can be any " @@ -130,7 +140,7 @@ msgid "" "other non-string data are stringified with :func:`str` before being written." msgstr "" -#: library/csv.rst:108 +#: library/csv.rst:115 msgid "" "import csv\n" "with open('eggs.csv', 'w', newline='') as csvfile:\n" @@ -140,7 +150,11 @@ msgid "" " spamwriter.writerow(['Spam', 'Lovely Spam', 'Wonderful Spam'])" msgstr "" -#: library/csv.rst:118 +#: library/csv.rst:122 +msgid "which writes :file:`eggs.csv` containing:" +msgstr "" + +#: library/csv.rst:132 msgid "" "Associate *dialect* with *name*. *name* must be a string. The dialect can " "be specified either by passing a sub-class of :class:`Dialect`, or by " @@ -149,41 +163,41 @@ msgid "" "parameters, see section :ref:`csv-fmt-params`." msgstr "" -#: library/csv.rst:127 +#: library/csv.rst:141 msgid "" "Delete the dialect associated with *name* from the dialect registry. An :" "exc:`Error` is raised if *name* is not a registered dialect name." msgstr "" -#: library/csv.rst:133 +#: library/csv.rst:147 msgid "" "Return the dialect associated with *name*. An :exc:`Error` is raised if " "*name* is not a registered dialect name. This function returns an " "immutable :class:`Dialect`." msgstr "" -#: library/csv.rst:139 +#: library/csv.rst:153 msgid "Return the names of all registered dialects." msgstr "" -#: library/csv.rst:145 +#: library/csv.rst:159 msgid "" "Returns the current maximum field size allowed by the parser. If *new_limit* " "is given, this becomes the new limit." msgstr "" -#: library/csv.rst:149 +#: library/csv.rst:163 msgid "The :mod:`csv` module defines the following classes:" msgstr "" -#: library/csv.rst:154 +#: library/csv.rst:168 msgid "" "Create an object that operates like a regular reader but maps the " "information in each row to a :class:`dict` whose keys are given by the " "optional *fieldnames* parameter." msgstr "" -#: library/csv.rst:158 +#: library/csv.rst:172 msgid "" "The *fieldnames* parameter is a :term:`sequence`. If *fieldnames* is " "omitted, the values in the first row of file *f* will be used as the " @@ -193,7 +207,7 @@ msgid "" "preserves their original ordering." msgstr "" -#: library/csv.rst:165 +#: library/csv.rst:179 msgid "" "If a row has more fields than fieldnames, the remaining data is put in a " "list and stored with the fieldname specified by *restkey* (which defaults to " @@ -202,27 +216,27 @@ msgid "" "``None``)." msgstr "" -#: library/csv.rst:171 +#: library/csv.rst:185 msgid "" "All other optional or keyword arguments are passed to the underlying :class:" "`reader` instance." msgstr "" -#: library/csv.rst:218 +#: library/csv.rst:240 msgid "" "If the argument passed to *fieldnames* is an iterator, it will be coerced to " "a :class:`list`." msgstr "" -#: library/csv.rst:176 +#: library/csv.rst:190 msgid "Returned rows are now of type :class:`OrderedDict`." msgstr "" -#: library/csv.rst:179 +#: library/csv.rst:193 msgid "Returned rows are now of type :class:`dict`." msgstr "" -#: library/csv.rst:184 +#: library/csv.rst:198 msgid "" ">>> import csv\n" ">>> with open('names.csv', newline='') as csvfile:\n" @@ -237,7 +251,18 @@ msgid "" "{'first_name': 'John', 'last_name': 'Cleese'}" msgstr "" -#: library/csv.rst:200 +#: library/csv.rst:210 +msgid "where :file:`names.csv` contains:" +msgstr "" + +#: library/csv.rst:212 +msgid "" +"first_name,last_name\n" +"Eric,Idle\n" +"John,Cleese" +msgstr "" + +#: library/csv.rst:222 msgid "" "Create an object which operates like a regular writer but maps dictionaries " "onto output rows. The *fieldnames* parameter is a :mod:`sequence " @@ -253,13 +278,13 @@ msgid "" "to the underlying :class:`writer` instance." msgstr "" -#: library/csv.rst:215 +#: library/csv.rst:237 msgid "" "Note that unlike the :class:`DictReader` class, the *fieldnames* parameter " "of the :class:`DictWriter` class is not optional." msgstr "" -#: library/csv.rst:222 +#: library/csv.rst:244 msgid "" "import csv\n" "\n" @@ -273,7 +298,19 @@ msgid "" " writer.writerow({'first_name': 'Wonderful', 'last_name': 'Spam'})" msgstr "" -#: library/csv.rst:236 +#: library/csv.rst:255 +msgid "which writes :file:`names.csv` containing:" +msgstr "" + +#: library/csv.rst:257 +msgid "" +"first_name,last_name\n" +"Baked,Beans\n" +"Lovely,Spam\n" +"Wonderful,Spam" +msgstr "" + +#: library/csv.rst:267 msgid "" "The :class:`Dialect` class is a container class whose attributes contain " "information for how to handle doublequotes, whitespace, delimiters, etc. Due " @@ -282,14 +319,14 @@ msgid "" "`reader` and :class:`writer` instances behave." msgstr "" -#: library/csv.rst:242 +#: library/csv.rst:273 msgid "" "All available :class:`Dialect` names are returned by :func:`list_dialects`, " "and they can be registered with specific :class:`reader` and :class:`writer` " "classes through their initializer (``__init__``) functions like this::" msgstr "" -#: library/csv.rst:246 +#: library/csv.rst:277 msgid "" "import csv\n" "\n" @@ -297,42 +334,42 @@ msgid "" " writer = csv.writer(csvfile, dialect='unix')" msgstr "" -#: library/csv.rst:254 +#: library/csv.rst:285 msgid "" "The :class:`excel` class defines the usual properties of an Excel-generated " "CSV file. It is registered with the dialect name ``'excel'``." msgstr "" -#: library/csv.rst:260 +#: library/csv.rst:291 msgid "" "The :class:`excel_tab` class defines the usual properties of an Excel-" "generated TAB-delimited file. It is registered with the dialect name " "``'excel-tab'``." msgstr "" -#: library/csv.rst:266 +#: library/csv.rst:297 msgid "" "The :class:`unix_dialect` class defines the usual properties of a CSV file " "generated on UNIX systems, i.e. using ``'\\n'`` as line terminator and " "quoting all fields. It is registered with the dialect name ``'unix'``." msgstr "" -#: library/csv.rst:275 +#: library/csv.rst:306 msgid "The :class:`Sniffer` class is used to deduce the format of a CSV file." msgstr "" -#: library/csv.rst:277 +#: library/csv.rst:308 msgid "The :class:`Sniffer` class provides two methods:" msgstr "" -#: library/csv.rst:281 +#: library/csv.rst:312 msgid "" "Analyze the given *sample* and return a :class:`Dialect` subclass reflecting " "the parameters found. If the optional *delimiters* parameter is given, it " "is interpreted as a string containing possible valid delimiter characters." msgstr "" -#: library/csv.rst:289 +#: library/csv.rst:320 msgid "" "Analyze the sample text (presumed to be in CSV format) and return :const:" "`True` if the first row appears to be a series of column headers. Inspecting " @@ -340,33 +377,33 @@ msgid "" "sample contains a header:" msgstr "" -#: library/csv.rst:294 +#: library/csv.rst:325 msgid "the second through n-th rows contain numeric values" msgstr "" -#: library/csv.rst:295 +#: library/csv.rst:326 msgid "" "the second through n-th rows contain strings where at least one value's " "length differs from that of the putative header of that column." msgstr "" -#: library/csv.rst:298 +#: library/csv.rst:329 msgid "" "Twenty-one rows after the header are sampled; if more than half of the " "columns + rows meet the criteria, :const:`True` is returned." msgstr "" -#: library/csv.rst:303 +#: library/csv.rst:334 msgid "" "This method is a rough heuristic and may produce both false positives and " "negatives." msgstr "" -#: library/csv.rst:306 +#: library/csv.rst:337 msgid "An example for :class:`Sniffer` use::" msgstr "" -#: library/csv.rst:308 +#: library/csv.rst:339 msgid "" "with open('example.csv', newline='') as csvfile:\n" " dialect = csv.Sniffer().sniff(csvfile.read(1024))\n" @@ -375,32 +412,32 @@ msgid "" " # ... process CSV file contents here ..." msgstr "" -#: library/csv.rst:317 +#: library/csv.rst:348 msgid "The :mod:`csv` module defines the following constants:" msgstr "" -#: library/csv.rst:321 +#: library/csv.rst:352 msgid "Instructs :class:`writer` objects to quote all fields." msgstr "" -#: library/csv.rst:326 +#: library/csv.rst:357 msgid "" "Instructs :class:`writer` objects to only quote those fields which contain " "special characters such as *delimiter*, *quotechar*, ``'\\r'``, ``'\\n'`` or " "any of the characters in *lineterminator*." msgstr "" -#: library/csv.rst:333 +#: library/csv.rst:364 msgid "Instructs :class:`writer` objects to quote all non-numeric fields." msgstr "" -#: library/csv.rst:335 +#: library/csv.rst:366 msgid "" "Instructs :class:`reader` objects to convert all non-quoted fields to type :" "class:`float`." msgstr "" -#: library/csv.rst:338 +#: library/csv.rst:369 msgid "" "Some numeric types, such as :class:`bool`, :class:`~fractions.Fraction`, or :" "class:`~enum.IntEnum`, have a string representation that cannot be converted " @@ -408,7 +445,7 @@ msgid "" "data:`QUOTE_STRINGS` modes." msgstr "" -#: library/csv.rst:346 +#: library/csv.rst:377 msgid "" "Instructs :class:`writer` objects to never quote fields. When the current " "*delimiter*, *quotechar*, *escapechar*, ``'\\r'``, ``'\\n'`` or any of the " @@ -418,51 +455,51 @@ msgid "" "Set *quotechar* to ``None`` to prevent its escaping." msgstr "" -#: library/csv.rst:354 +#: library/csv.rst:385 msgid "" "Instructs :class:`reader` objects to perform no special processing of quote " "characters." msgstr "" -#: library/csv.rst:358 +#: library/csv.rst:389 msgid "" "Instructs :class:`writer` objects to quote all fields which are not " "``None``. This is similar to :data:`QUOTE_ALL`, except that if a field " "value is ``None`` an empty (unquoted) string is written." msgstr "" -#: library/csv.rst:362 +#: library/csv.rst:393 msgid "" "Instructs :class:`reader` objects to interpret an empty (unquoted) field as " "``None`` and to otherwise behave as :data:`QUOTE_ALL`." msgstr "" -#: library/csv.rst:369 +#: library/csv.rst:400 msgid "" "Instructs :class:`writer` objects to always place quotes around fields which " "are strings. This is similar to :data:`QUOTE_NONNUMERIC`, except that if a " "field value is ``None`` an empty (unquoted) string is written." msgstr "" -#: library/csv.rst:373 +#: library/csv.rst:404 msgid "" "Instructs :class:`reader` objects to interpret an empty (unquoted) string as " "``None`` and to otherwise behave as :data:`QUOTE_NONNUMERIC`." msgstr "" -#: library/csv.rst:378 +#: library/csv.rst:409 msgid "The :mod:`csv` module defines the following exception:" msgstr "" -#: library/csv.rst:383 +#: library/csv.rst:414 msgid "Raised by any of the functions when an error is detected." msgstr "" -#: library/csv.rst:388 +#: library/csv.rst:419 msgid "Dialects and Formatting Parameters" msgstr "" -#: library/csv.rst:390 +#: library/csv.rst:421 msgid "" "To make it easier to specify the format of input and output records, " "specific formatting parameters are grouped together into dialects. A " @@ -475,16 +512,16 @@ msgid "" "attributes defined below for the :class:`Dialect` class." msgstr "" -#: library/csv.rst:400 +#: library/csv.rst:431 msgid "Dialects support the following attributes:" msgstr "" -#: library/csv.rst:405 +#: library/csv.rst:436 msgid "" "A one-character string used to separate fields. It defaults to ``','``." msgstr "" -#: library/csv.rst:410 +#: library/csv.rst:441 msgid "" "Controls how instances of *quotechar* appearing inside a field should " "themselves be quoted. When :const:`True`, the character is doubled. When :" @@ -492,57 +529,57 @@ msgid "" "defaults to :const:`True`." msgstr "" -#: library/csv.rst:415 +#: library/csv.rst:446 msgid "" "On output, if *doublequote* is :const:`False` and no *escapechar* is set, :" "exc:`Error` is raised if a *quotechar* is found in a field." msgstr "" -#: library/csv.rst:421 +#: library/csv.rst:452 msgid "" "A one-character string used by the writer to escape characters that require " "escaping:" msgstr "" -#: library/csv.rst:424 +#: library/csv.rst:455 msgid "" "the *delimiter*, the *quotechar*, ``'\\r'``, ``'\\n'`` and any of the " "characters in *lineterminator* are escaped if *quoting* is set to :const:" "`QUOTE_NONE`;" msgstr "" -#: library/csv.rst:427 +#: library/csv.rst:458 msgid "the *quotechar* is escaped if *doublequote* is :const:`False`;" msgstr "" -#: library/csv.rst:428 +#: library/csv.rst:459 msgid "the *escapechar* itself." msgstr "" -#: library/csv.rst:430 +#: library/csv.rst:461 msgid "" "On reading, the *escapechar* removes any special meaning from the following " "character. It defaults to :const:`None`, which disables escaping." msgstr "" -#: library/csv.rst:433 +#: library/csv.rst:464 msgid "An empty *escapechar* is not allowed." msgstr "" -#: library/csv.rst:438 +#: library/csv.rst:469 msgid "" "The string used to terminate lines produced by the :class:`writer`. It " "defaults to ``'\\r\\n'``." msgstr "" -#: library/csv.rst:443 +#: library/csv.rst:474 msgid "" "The :class:`reader` is hard-coded to recognise either ``'\\r'`` or ``'\\n'`` " "as end-of-line, and ignores *lineterminator*. This behavior may change in " "the future." msgstr "" -#: library/csv.rst:450 +#: library/csv.rst:481 msgid "" "A one-character string used to quote fields containing special characters, " "such as the *delimiter* or the *quotechar*, or which contain new-line " @@ -551,11 +588,11 @@ msgid "" "prevent escaping ``'\"'`` if *quoting* is set to :const:`QUOTE_NONE`." msgstr "" -#: library/csv.rst:457 +#: library/csv.rst:488 msgid "An empty *quotechar* is not allowed." msgstr "" -#: library/csv.rst:462 +#: library/csv.rst:493 msgid "" "Controls when quotes should be generated by the writer and recognised by the " "reader. It can take on any of the :ref:`QUOTE_\\* constants \n" "Language-Team: LANGUAGE \n" @@ -32,18 +32,27 @@ msgid "" "libraries. It can be used to wrap these libraries in pure Python." msgstr "" -#: library/ctypes.rst:21 +#: library/ctypes.rst:19 +msgid "" +":mod:`!ctypes` provides low-level access to native libraries and the " +"process's memory, bypassing Python's safety mechanisms and allowing " +"execution of arbitrary native code. Incorrect use can corrupt data and " +"objects, reveal sensitive information, cause crashes, or otherwise " +"compromise the running process." +msgstr "" + +#: library/ctypes.rst:29 msgid "ctypes tutorial" msgstr "" -#: library/ctypes.rst:23 +#: library/ctypes.rst:31 msgid "" "Note: The code samples in this tutorial use :mod:`doctest` to make sure that " "they actually work. Since some code samples behave differently under Linux, " "Windows, or macOS, they contain doctest directives in comments." msgstr "" -#: library/ctypes.rst:27 +#: library/ctypes.rst:35 msgid "" "Note: Some code samples reference the ctypes :class:`c_int` type. On " "platforms where ``sizeof(long) == sizeof(int)`` it is an alias to :class:" @@ -51,17 +60,17 @@ msgid "" "you would expect :class:`c_int` --- they are actually the same type." msgstr "" -#: library/ctypes.rst:35 +#: library/ctypes.rst:43 msgid "Loading dynamic link libraries" msgstr "" -#: library/ctypes.rst:37 +#: library/ctypes.rst:45 msgid "" ":mod:`ctypes` exports the *cdll*, and on Windows *windll* and *oledll* " "objects, for loading dynamic link libraries." msgstr "" -#: library/ctypes.rst:40 +#: library/ctypes.rst:48 msgid "" "You load libraries by accessing them as attributes of these objects. *cdll* " "loads libraries which export functions using the standard ``cdecl`` calling " @@ -72,20 +81,20 @@ msgid "" "when the function call fails." msgstr "" -#: library/ctypes.rst:48 +#: library/ctypes.rst:56 msgid "" "Windows errors used to raise :exc:`WindowsError`, which is now an alias of :" "exc:`OSError`." msgstr "" -#: library/ctypes.rst:53 +#: library/ctypes.rst:61 msgid "" "Here are some examples for Windows. Note that ``msvcrt`` is the MS standard " "C library containing most standard C functions, and uses the ``cdecl`` " "calling convention::" msgstr "" -#: library/ctypes.rst:57 +#: library/ctypes.rst:65 msgid "" ">>> from ctypes import *\n" ">>> print(windll.kernel32)\n" @@ -96,11 +105,11 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:65 +#: library/ctypes.rst:73 msgid "Windows appends the usual ``.dll`` file suffix automatically." msgstr "" -#: library/ctypes.rst:68 +#: library/ctypes.rst:76 msgid "" "Accessing the standard C library through ``cdll.msvcrt`` will use an " "outdated version of the library that may be incompatible with the one being " @@ -108,7 +117,7 @@ msgid "" "import and use the ``msvcrt`` module." msgstr "" -#: library/ctypes.rst:73 +#: library/ctypes.rst:81 msgid "" "On Linux, it is required to specify the filename *including* the extension " "to load a library, so attribute access can not be used to load libraries. " @@ -117,7 +126,7 @@ msgid "" "CDLL by calling the constructor::" msgstr "" -#: library/ctypes.rst:79 +#: library/ctypes.rst:87 msgid "" ">>> cdll.LoadLibrary(\"libc.so.6\")\n" "\n" @@ -127,15 +136,15 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:92 +#: library/ctypes.rst:100 msgid "Accessing functions from loaded dlls" msgstr "" -#: library/ctypes.rst:94 +#: library/ctypes.rst:102 msgid "Functions are accessed as attributes of dll objects::" msgstr "" -#: library/ctypes.rst:96 +#: library/ctypes.rst:104 msgid "" ">>> libc.printf\n" "<_FuncPtr object at 0x...>\n" @@ -150,7 +159,7 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:108 +#: library/ctypes.rst:116 msgid "" "Note that win32 system dlls like ``kernel32`` and ``user32`` often export " "ANSI as well as UNICODE versions of a function. The UNICODE version is " @@ -161,7 +170,7 @@ msgid "" "``GetModuleHandle`` depending on whether UNICODE is defined or not::" msgstr "" -#: library/ctypes.rst:116 +#: library/ctypes.rst:124 msgid "" "/* ANSI version */\n" "HMODULE GetModuleHandleA(LPCSTR lpModuleName);\n" @@ -169,35 +178,35 @@ msgid "" "HMODULE GetModuleHandleW(LPCWSTR lpModuleName);" msgstr "" -#: library/ctypes.rst:121 +#: library/ctypes.rst:129 msgid "" "*windll* does not try to select one of them by magic, you must access the " "version you need by specifying ``GetModuleHandleA`` or ``GetModuleHandleW`` " "explicitly, and then call it with bytes or string objects respectively." msgstr "" -#: library/ctypes.rst:125 +#: library/ctypes.rst:133 msgid "" "Sometimes, dlls export functions with names which aren't valid Python " "identifiers, like ``\"??2@YAPAXI@Z\"``. In this case you have to use :func:" "`getattr` to retrieve the function::" msgstr "" -#: library/ctypes.rst:129 +#: library/ctypes.rst:137 msgid "" ">>> getattr(cdll.msvcrt, \"??2@YAPAXI@Z\")\n" "<_FuncPtr object at 0x...>\n" ">>>" msgstr "" -#: library/ctypes.rst:133 +#: library/ctypes.rst:141 msgid "" "On Windows, some dlls export functions not by name but by ordinal. These " "functions can be accessed by indexing the dll object with the ordinal " "number::" msgstr "" -#: library/ctypes.rst:136 +#: library/ctypes.rst:144 msgid "" ">>> cdll.kernel32[1]\n" "<_FuncPtr object at 0x...>\n" @@ -210,44 +219,44 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:150 +#: library/ctypes.rst:158 msgid "Calling functions" msgstr "" -#: library/ctypes.rst:152 +#: library/ctypes.rst:160 msgid "" "You can call these functions like any other Python callable. This example " "uses the ``rand()`` function, which takes no arguments and returns a pseudo-" "random integer::" msgstr "" -#: library/ctypes.rst:155 +#: library/ctypes.rst:163 msgid "" ">>> print(libc.rand())\n" "1804289383" msgstr "" -#: library/ctypes.rst:158 +#: library/ctypes.rst:166 msgid "" "On Windows, you can call the ``GetModuleHandleA()`` function, which returns " "a win32 module handle (passing ``None`` as single argument to call it with a " "``NULL`` pointer)::" msgstr "" -#: library/ctypes.rst:161 +#: library/ctypes.rst:169 msgid "" ">>> print(hex(windll.kernel32.GetModuleHandleA(None)))\n" "0x1d000000\n" ">>>" msgstr "" -#: library/ctypes.rst:165 +#: library/ctypes.rst:173 msgid "" ":exc:`ValueError` is raised when you call an ``stdcall`` function with the " "``cdecl`` calling convention, or vice versa::" msgstr "" -#: library/ctypes.rst:168 +#: library/ctypes.rst:176 msgid "" ">>> cdll.kernel32.GetModuleHandleA(None)\n" "Traceback (most recent call last):\n" @@ -264,20 +273,20 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:180 +#: library/ctypes.rst:188 msgid "" "To find out the correct calling convention you have to look into the C " "header file or the documentation for the function you want to call." msgstr "" -#: library/ctypes.rst:183 +#: library/ctypes.rst:191 msgid "" "On Windows, :mod:`ctypes` uses win32 structured exception handling to " "prevent crashes from general protection faults when functions are called " "with invalid argument values::" msgstr "" -#: library/ctypes.rst:187 +#: library/ctypes.rst:195 msgid "" ">>> windll.kernel32.GetModuleHandleA(32)\n" "Traceback (most recent call last):\n" @@ -286,15 +295,13 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:193 +#: library/ctypes.rst:201 msgid "" -"There are, however, enough ways to crash Python with :mod:`ctypes`, so you " -"should be careful anyway. The :mod:`faulthandler` module can be helpful in " -"debugging crashes (e.g. from segmentation faults produced by erroneous C " -"library calls)." +"The :mod:`faulthandler` module can help debug crashes, such as segmentation " +"faults produced by erroneous C library calls." msgstr "" -#: library/ctypes.rst:198 +#: library/ctypes.rst:204 msgid "" "``None``, integers, bytes objects and (unicode) strings are the only native " "Python objects that can directly be used as parameters in these function " @@ -305,314 +312,314 @@ msgid "" "the C type." msgstr "" -#: library/ctypes.rst:205 +#: library/ctypes.rst:211 msgid "" "Before we move on calling functions with other parameter types, we have to " "learn more about :mod:`ctypes` data types." msgstr "" -#: library/ctypes.rst:2278 +#: library/ctypes.rst:2289 msgid "Fundamental data types" msgstr "" -#: library/ctypes.rst:214 +#: library/ctypes.rst:220 msgid ":mod:`ctypes` defines a number of primitive C compatible data types:" msgstr "" -#: library/ctypes.rst:217 +#: library/ctypes.rst:223 msgid "ctypes type" msgstr "" -#: library/ctypes.rst:217 +#: library/ctypes.rst:223 msgid "C type" msgstr "" -#: library/ctypes.rst:217 +#: library/ctypes.rst:223 msgid "Python type" msgstr "" -#: library/ctypes.rst:219 +#: library/ctypes.rst:225 msgid ":class:`c_bool`" msgstr "" -#: library/ctypes.rst:219 +#: library/ctypes.rst:225 msgid ":c:expr:`_Bool`" msgstr "" -#: library/ctypes.rst:219 +#: library/ctypes.rst:225 msgid "bool (1)" msgstr "" -#: library/ctypes.rst:221 +#: library/ctypes.rst:227 msgid ":class:`c_char`" msgstr "" -#: library/ctypes.rst:225 +#: library/ctypes.rst:231 msgid ":c:expr:`char`" msgstr "" -#: library/ctypes.rst:221 +#: library/ctypes.rst:227 msgid "1-character bytes object" msgstr "" -#: library/ctypes.rst:223 +#: library/ctypes.rst:229 msgid ":class:`c_wchar`" msgstr "" -#: library/ctypes.rst:223 +#: library/ctypes.rst:229 msgid ":c:type:`wchar_t`" msgstr "" -#: library/ctypes.rst:223 +#: library/ctypes.rst:229 msgid "1-character string" msgstr "" -#: library/ctypes.rst:225 +#: library/ctypes.rst:231 msgid ":class:`c_byte`" msgstr "" -#: library/ctypes.rst:227 library/ctypes.rst:231 library/ctypes.rst:235 -#: library/ctypes.rst:239 library/ctypes.rst:243 library/ctypes.rst:247 -#: library/ctypes.rst:251 library/ctypes.rst:255 library/ctypes.rst:259 -#: library/ctypes.rst:264 library/ctypes.rst:267 +#: library/ctypes.rst:233 library/ctypes.rst:237 library/ctypes.rst:241 +#: library/ctypes.rst:245 library/ctypes.rst:249 library/ctypes.rst:253 +#: library/ctypes.rst:257 library/ctypes.rst:261 library/ctypes.rst:265 +#: library/ctypes.rst:270 library/ctypes.rst:273 msgid "int" msgstr "" -#: library/ctypes.rst:227 +#: library/ctypes.rst:233 msgid ":class:`c_ubyte`" msgstr "" -#: library/ctypes.rst:227 +#: library/ctypes.rst:233 msgid ":c:expr:`unsigned char`" msgstr "" -#: library/ctypes.rst:229 +#: library/ctypes.rst:235 msgid ":class:`c_short`" msgstr "" -#: library/ctypes.rst:229 +#: library/ctypes.rst:235 msgid ":c:expr:`short`" msgstr "" -#: library/ctypes.rst:231 +#: library/ctypes.rst:237 msgid ":class:`c_ushort`" msgstr "" -#: library/ctypes.rst:231 +#: library/ctypes.rst:237 msgid ":c:expr:`unsigned short`" msgstr "" -#: library/ctypes.rst:233 +#: library/ctypes.rst:239 msgid ":class:`c_int`" msgstr "" -#: library/ctypes.rst:233 +#: library/ctypes.rst:239 msgid ":c:expr:`int`" msgstr "" -#: library/ctypes.rst:235 +#: library/ctypes.rst:241 msgid ":class:`c_int8`" msgstr "" -#: library/ctypes.rst:235 +#: library/ctypes.rst:241 msgid ":c:type:`int8_t`" msgstr "" -#: library/ctypes.rst:237 +#: library/ctypes.rst:243 msgid ":class:`c_int16`" msgstr "" -#: library/ctypes.rst:237 +#: library/ctypes.rst:243 msgid ":c:type:`int16_t`" msgstr "" -#: library/ctypes.rst:239 +#: library/ctypes.rst:245 msgid ":class:`c_int32`" msgstr "" -#: library/ctypes.rst:239 +#: library/ctypes.rst:245 msgid ":c:type:`int32_t`" msgstr "" -#: library/ctypes.rst:241 +#: library/ctypes.rst:247 msgid ":class:`c_int64`" msgstr "" -#: library/ctypes.rst:241 +#: library/ctypes.rst:247 msgid ":c:type:`int64_t`" msgstr "" -#: library/ctypes.rst:243 +#: library/ctypes.rst:249 msgid ":class:`c_uint`" msgstr "" -#: library/ctypes.rst:243 +#: library/ctypes.rst:249 msgid ":c:expr:`unsigned int`" msgstr "" -#: library/ctypes.rst:245 +#: library/ctypes.rst:251 msgid ":class:`c_uint8`" msgstr "" -#: library/ctypes.rst:245 +#: library/ctypes.rst:251 msgid ":c:type:`uint8_t`" msgstr "" -#: library/ctypes.rst:247 +#: library/ctypes.rst:253 msgid ":class:`c_uint16`" msgstr "" -#: library/ctypes.rst:247 +#: library/ctypes.rst:253 msgid ":c:type:`uint16_t`" msgstr "" -#: library/ctypes.rst:249 +#: library/ctypes.rst:255 msgid ":class:`c_uint32`" msgstr "" -#: library/ctypes.rst:249 +#: library/ctypes.rst:255 msgid ":c:type:`uint32_t`" msgstr "" -#: library/ctypes.rst:251 +#: library/ctypes.rst:257 msgid ":class:`c_uint64`" msgstr "" -#: library/ctypes.rst:251 +#: library/ctypes.rst:257 msgid ":c:type:`uint64_t`" msgstr "" -#: library/ctypes.rst:253 +#: library/ctypes.rst:259 msgid ":class:`c_long`" msgstr "" -#: library/ctypes.rst:253 +#: library/ctypes.rst:259 msgid ":c:expr:`long`" msgstr "" -#: library/ctypes.rst:255 +#: library/ctypes.rst:261 msgid ":class:`c_ulong`" msgstr "" -#: library/ctypes.rst:255 +#: library/ctypes.rst:261 msgid ":c:expr:`unsigned long`" msgstr "" -#: library/ctypes.rst:257 +#: library/ctypes.rst:263 msgid ":class:`c_longlong`" msgstr "" -#: library/ctypes.rst:257 +#: library/ctypes.rst:263 msgid ":c:expr:`__int64` or :c:expr:`long long`" msgstr "" -#: library/ctypes.rst:259 +#: library/ctypes.rst:265 msgid ":class:`c_ulonglong`" msgstr "" -#: library/ctypes.rst:259 +#: library/ctypes.rst:265 msgid ":c:expr:`unsigned __int64` or :c:expr:`unsigned long long`" msgstr "" -#: library/ctypes.rst:262 +#: library/ctypes.rst:268 msgid ":class:`c_size_t`" msgstr "" -#: library/ctypes.rst:262 +#: library/ctypes.rst:268 msgid ":c:type:`size_t`" msgstr "" -#: library/ctypes.rst:264 +#: library/ctypes.rst:270 msgid ":class:`c_ssize_t`" msgstr "" -#: library/ctypes.rst:264 +#: library/ctypes.rst:270 msgid ":c:type:`ssize_t` or :c:expr:`Py_ssize_t`" msgstr "" -#: library/ctypes.rst:267 +#: library/ctypes.rst:273 msgid ":class:`c_time_t`" msgstr "" -#: library/ctypes.rst:267 +#: library/ctypes.rst:273 msgid ":c:type:`time_t`" msgstr "" -#: library/ctypes.rst:269 +#: library/ctypes.rst:275 msgid ":class:`c_float`" msgstr "" -#: library/ctypes.rst:269 +#: library/ctypes.rst:275 msgid ":c:expr:`float`" msgstr "" -#: library/ctypes.rst:271 library/ctypes.rst:273 +#: library/ctypes.rst:277 library/ctypes.rst:279 msgid "float" msgstr "" -#: library/ctypes.rst:271 +#: library/ctypes.rst:277 msgid ":class:`c_double`" msgstr "" -#: library/ctypes.rst:271 +#: library/ctypes.rst:277 msgid ":c:expr:`double`" msgstr "" -#: library/ctypes.rst:273 +#: library/ctypes.rst:279 msgid ":class:`c_longdouble`" msgstr "" -#: library/ctypes.rst:273 +#: library/ctypes.rst:279 msgid ":c:expr:`long double`" msgstr "" -#: library/ctypes.rst:275 +#: library/ctypes.rst:281 msgid ":class:`c_char_p`" msgstr "" -#: library/ctypes.rst:275 +#: library/ctypes.rst:281 msgid ":c:expr:`char *` (NUL terminated)" msgstr "" -#: library/ctypes.rst:275 +#: library/ctypes.rst:281 msgid "bytes object or ``None``" msgstr "" -#: library/ctypes.rst:277 +#: library/ctypes.rst:283 msgid ":class:`c_wchar_p`" msgstr "" -#: library/ctypes.rst:277 +#: library/ctypes.rst:283 msgid ":c:expr:`wchar_t *` (NUL terminated)" msgstr "" -#: library/ctypes.rst:277 +#: library/ctypes.rst:283 msgid "string or ``None``" msgstr "" -#: library/ctypes.rst:279 +#: library/ctypes.rst:285 msgid ":class:`c_void_p`" msgstr "" -#: library/ctypes.rst:279 +#: library/ctypes.rst:285 msgid ":c:expr:`void *`" msgstr "" -#: library/ctypes.rst:279 +#: library/ctypes.rst:285 msgid "int or ``None``" msgstr "" -#: library/ctypes.rst:283 +#: library/ctypes.rst:289 msgid "The constructor accepts any object with a truth value." msgstr "" -#: library/ctypes.rst:285 +#: library/ctypes.rst:291 msgid "" "All these types can be created by calling them with an optional initializer " "of the correct type and value::" msgstr "" -#: library/ctypes.rst:288 +#: library/ctypes.rst:294 msgid "" ">>> c_int()\n" "c_long(0)\n" @@ -623,12 +630,12 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:296 +#: library/ctypes.rst:302 msgid "" "Since these types are mutable, their value can also be changed afterwards::" msgstr "" -#: library/ctypes.rst:298 +#: library/ctypes.rst:304 msgid "" ">>> i = c_int(42)\n" ">>> print(i)\n" @@ -641,7 +648,7 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:308 +#: library/ctypes.rst:314 msgid "" "Assigning a new value to instances of the pointer types :class:`c_char_p`, :" "class:`c_wchar_p`, and :class:`c_void_p` changes the *memory location* they " @@ -649,7 +656,7 @@ msgid "" "Python string objects are immutable)::" msgstr "" -#: library/ctypes.rst:313 +#: library/ctypes.rst:319 msgid "" ">>> s = \"Hello, World\"\n" ">>> c_s = c_wchar_p(s)\n" @@ -667,7 +674,7 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:328 +#: library/ctypes.rst:334 msgid "" "You should be careful, however, not to pass them to functions expecting " "pointers to mutable memory. If you need mutable memory blocks, ctypes has a :" @@ -677,7 +684,7 @@ msgid "" "``value`` property::" msgstr "" -#: library/ctypes.rst:335 +#: library/ctypes.rst:341 msgid "" ">>> from ctypes import *\n" ">>> p = create_string_buffer(3) # create a 3 byte buffer, " @@ -699,7 +706,7 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:352 +#: library/ctypes.rst:358 msgid "" "The :func:`create_string_buffer` function replaces the old :func:`!c_buffer` " "function (which is still available as an alias). To create a mutable memory " @@ -707,18 +714,18 @@ msgid "" "the :func:`create_unicode_buffer` function." msgstr "" -#: library/ctypes.rst:361 +#: library/ctypes.rst:367 msgid "Calling functions, continued" msgstr "" -#: library/ctypes.rst:363 +#: library/ctypes.rst:369 msgid "" "Note that printf prints to the real standard output channel, *not* to :data:" "`sys.stdout`, so these examples will only work at the console prompt, not " "from within *IDLE* or *PythonWin*::" msgstr "" -#: library/ctypes.rst:367 +#: library/ctypes.rst:373 msgid "" ">>> printf = libc.printf\n" ">>> printf(b\"Hello, %s\\n\", b\"World!\")\n" @@ -738,14 +745,14 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:383 +#: library/ctypes.rst:389 msgid "" "As has been mentioned before, all Python types except integers, strings, and " "bytes objects have to be wrapped in their corresponding :mod:`ctypes` type, " "so that they can be converted to the required C data type::" msgstr "" -#: library/ctypes.rst:387 +#: library/ctypes.rst:393 msgid "" ">>> printf(b\"An int %d, a double %f\\n\", 1234, c_double(3.14))\n" "An int 1234, a double 3.140000\n" @@ -753,11 +760,11 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:395 +#: library/ctypes.rst:401 msgid "Calling variadic functions" msgstr "" -#: library/ctypes.rst:397 +#: library/ctypes.rst:403 msgid "" "On a lot of platforms calling variadic functions through ctypes is exactly " "the same as calling functions with a fixed number of parameters. On some " @@ -766,27 +773,27 @@ msgid "" "functions." msgstr "" -#: library/ctypes.rst:402 +#: library/ctypes.rst:408 msgid "" "On those platforms it is required to specify the :attr:`~_CFuncPtr.argtypes` " "attribute for the regular, non-variadic, function arguments:" msgstr "" -#: library/ctypes.rst:405 +#: library/ctypes.rst:411 msgid "libc.printf.argtypes = [ctypes.c_char_p]" msgstr "" -#: library/ctypes.rst:409 +#: library/ctypes.rst:415 msgid "" "Because specifying the attribute does not inhibit portability it is advised " "to always specify :attr:`~_CFuncPtr.argtypes` for all variadic functions." msgstr "" -#: library/ctypes.rst:416 +#: library/ctypes.rst:422 msgid "Calling functions with your own custom data types" msgstr "" -#: library/ctypes.rst:418 +#: library/ctypes.rst:424 msgid "" "You can also customize :mod:`ctypes` argument conversion to allow instances " "of your own classes be used as function arguments. :mod:`ctypes` looks for " @@ -795,7 +802,7 @@ msgid "" "or an object with an :attr:`!_as_parameter_` attribute::" msgstr "" -#: library/ctypes.rst:424 +#: library/ctypes.rst:430 msgid "" ">>> class Bottles:\n" "... def __init__(self, number):\n" @@ -808,24 +815,24 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:434 +#: library/ctypes.rst:440 msgid "" "If you don't want to store the instance's data in the :attr:`!" "_as_parameter_` instance variable, you could define a :class:`property` " "which makes the attribute available on request." msgstr "" -#: library/ctypes.rst:442 +#: library/ctypes.rst:448 msgid "Specifying the required argument types (function prototypes)" msgstr "" -#: library/ctypes.rst:444 +#: library/ctypes.rst:450 msgid "" "It is possible to specify the required argument types of functions exported " "from DLLs by setting the :attr:`~_CFuncPtr.argtypes` attribute." msgstr "" -#: library/ctypes.rst:447 +#: library/ctypes.rst:453 msgid "" ":attr:`~_CFuncPtr.argtypes` must be a sequence of C data types (the :func:`!" "printf` function is probably not a good example here, because it takes a " @@ -834,7 +841,7 @@ msgid "" "feature)::" msgstr "" -#: library/ctypes.rst:452 +#: library/ctypes.rst:458 msgid "" ">>> printf.argtypes = [c_char_p, c_char_p, c_int, c_double]\n" ">>> printf(b\"String '%s', Int %d, Double %f\\n\", b\"Hi\", 10, 2.2)\n" @@ -843,14 +850,14 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:458 +#: library/ctypes.rst:464 msgid "" "Specifying a format protects against incompatible argument types (just as a " "prototype for a C function), and tries to convert the arguments to valid " "types::" msgstr "" -#: library/ctypes.rst:461 +#: library/ctypes.rst:467 msgid "" ">>> printf(b\"%d %d %d\", 1, 2, 3)\n" "Traceback (most recent call last):\n" @@ -863,7 +870,7 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:470 +#: library/ctypes.rst:476 msgid "" "If you have defined your own classes which you pass to function calls, you " "have to implement a :meth:`~_CData.from_param` class method for them to be " @@ -877,55 +884,55 @@ msgid "" "_as_parameter_` attribute." msgstr "" -#: library/ctypes.rst:484 +#: library/ctypes.rst:490 msgid "Return types" msgstr "" -#: library/ctypes.rst:494 +#: library/ctypes.rst:500 msgid "" "By default functions are assumed to return the C :c:expr:`int` type. Other " "return types can be specified by setting the :attr:`~_CFuncPtr.restype` " "attribute of the function object." msgstr "" -#: library/ctypes.rst:498 +#: library/ctypes.rst:504 msgid "" "The C prototype of :c:func:`time` is ``time_t time(time_t *)``. Because :c:" "type:`time_t` might be of a different type than the default return type :c:" "expr:`int`, you should specify the :attr:`!restype` attribute::" msgstr "" -#: library/ctypes.rst:502 +#: library/ctypes.rst:508 msgid ">>> libc.time.restype = c_time_t" msgstr "" -#: library/ctypes.rst:504 +#: library/ctypes.rst:510 msgid "The argument types can be specified using :attr:`~_CFuncPtr.argtypes`::" msgstr "" -#: library/ctypes.rst:506 +#: library/ctypes.rst:512 msgid ">>> libc.time.argtypes = (POINTER(c_time_t),)" msgstr "" -#: library/ctypes.rst:508 +#: library/ctypes.rst:514 msgid "" "To call the function with a ``NULL`` pointer as first argument, use " "``None``::" msgstr "" -#: library/ctypes.rst:510 +#: library/ctypes.rst:516 msgid "" ">>> print(libc.time(None))\n" "1150640792" msgstr "" -#: library/ctypes.rst:513 +#: library/ctypes.rst:519 msgid "" "Here is a more advanced example, it uses the :func:`!strchr` function, which " "expects a string pointer and a char, and returns a pointer to a string::" msgstr "" -#: library/ctypes.rst:516 +#: library/ctypes.rst:522 msgid "" ">>> strchr = libc.strchr\n" ">>> strchr(b\"abcdef\", ord(\"d\"))\n" @@ -938,14 +945,14 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:526 +#: library/ctypes.rst:532 msgid "" "If you want to avoid the :func:`ord(\"x\") ` calls above, you can set " "the :attr:`~_CFuncPtr.argtypes` attribute, and the second argument will be " "converted from a single character Python bytes object into a C char:" msgstr "" -#: library/ctypes.rst:530 +#: library/ctypes.rst:536 msgid "" ">>> strchr.restype = c_char_p\n" ">>> strchr.argtypes = [c_char_p, c_char]\n" @@ -962,7 +969,7 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:545 +#: library/ctypes.rst:551 msgid "" "You can also use a callable Python object (a function or a class for " "example) as the :attr:`~_CFuncPtr.restype` attribute, if the foreign " @@ -972,7 +979,7 @@ msgid "" "values and automatically raise an exception::" msgstr "" -#: library/ctypes.rst:551 +#: library/ctypes.rst:557 msgid "" ">>> GetModuleHandle = windll.kernel32.GetModuleHandleA\n" ">>> def ValidHandle(value):\n" @@ -992,7 +999,7 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:568 +#: library/ctypes.rst:574 msgid "" "``WinError`` is a function which will call Windows ``FormatMessage()`` api " "to get the string representation of an error code, and *returns* an " @@ -1000,18 +1007,18 @@ msgid "" "used, it calls :func:`GetLastError` to retrieve it." msgstr "" -#: library/ctypes.rst:573 +#: library/ctypes.rst:579 msgid "" "Please note that a much more powerful error checking mechanism is available " "through the :attr:`~_CFuncPtr.errcheck` attribute; see the reference manual " "for details." msgstr "" -#: library/ctypes.rst:581 +#: library/ctypes.rst:587 msgid "Passing pointers (or: passing parameters by reference)" msgstr "" -#: library/ctypes.rst:583 +#: library/ctypes.rst:589 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 " @@ -1019,7 +1026,7 @@ msgid "" "reference*." msgstr "" -#: library/ctypes.rst:587 +#: library/ctypes.rst:593 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:" @@ -1028,7 +1035,7 @@ msgid "" "you don't need the pointer object in Python itself::" msgstr "" -#: library/ctypes.rst:593 +#: library/ctypes.rst:599 msgid "" ">>> i = c_int()\n" ">>> f = c_float()\n" @@ -1043,11 +1050,11 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:609 +#: library/ctypes.rst:615 msgid "Structures and unions" msgstr "" -#: library/ctypes.rst:611 +#: library/ctypes.rst:617 msgid "" "Structures and unions must derive from the :class:`Structure` and :class:" "`Union` base classes which are defined in the :mod:`ctypes` module. Each " @@ -1056,20 +1063,20 @@ msgid "" "*field type*." msgstr "" -#: library/ctypes.rst:616 +#: library/ctypes.rst:622 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:619 +#: library/ctypes.rst:625 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:622 +#: library/ctypes.rst:628 msgid "" ">>> from ctypes import *\n" ">>> class POINT(Structure):\n" @@ -1089,19 +1096,19 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:639 +#: library/ctypes.rst:645 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:642 +#: library/ctypes.rst:648 msgid "" "Here is a RECT structure which contains two POINTs named *upperleft* and " "*lowerright*::" msgstr "" -#: library/ctypes.rst:645 +#: library/ctypes.rst:651 msgid "" ">>> class RECT(Structure):\n" "... _fields_ = [(\"upperleft\", POINT),\n" @@ -1115,25 +1122,25 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:656 +#: library/ctypes.rst:662 msgid "" "Nested structures can also be initialized in the constructor in several " "ways::" msgstr "" -#: library/ctypes.rst:658 +#: library/ctypes.rst:664 msgid "" ">>> r = RECT(POINT(1, 2), POINT(3, 4))\n" ">>> r = RECT((1, 2), (3, 4))" msgstr "" -#: library/ctypes.rst:661 +#: library/ctypes.rst:667 msgid "" "Field :term:`descriptor`\\s can be retrieved from the *class*, they are " "useful for debugging because they can provide useful information::" msgstr "" -#: library/ctypes.rst:664 +#: library/ctypes.rst:670 msgid "" ">>> print(POINT.x)\n" "\n" @@ -1142,7 +1149,7 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:675 +#: library/ctypes.rst:681 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 " @@ -1150,11 +1157,11 @@ msgid "" "structures with bit-fields should always be passed to functions by pointer." msgstr "" -#: library/ctypes.rst:681 +#: library/ctypes.rst:687 msgid "Structure/union alignment and byte order" msgstr "" -#: library/ctypes.rst:683 +#: library/ctypes.rst:689 msgid "" "By default, Structure and Union fields are aligned in the same way the C " "compiler does it. It is possible to override this behavior by specifying a :" @@ -1167,7 +1174,7 @@ msgid "" "definition." msgstr "" -#: library/ctypes.rst:693 +#: library/ctypes.rst:699 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:" @@ -1176,18 +1183,18 @@ msgid "" "classes cannot contain pointer fields." msgstr "" -#: library/ctypes.rst:703 +#: library/ctypes.rst:709 msgid "Bit fields in structures and unions" msgstr "" -#: library/ctypes.rst:705 +#: library/ctypes.rst:711 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:709 +#: library/ctypes.rst:715 msgid "" ">>> class Int(Structure):\n" "... _fields_ = [(\"first_16\", c_int, 16),\n" @@ -1200,33 +1207,33 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:723 +#: library/ctypes.rst:729 msgid "Arrays" msgstr "" -#: library/ctypes.rst:725 +#: library/ctypes.rst:731 msgid "" "Arrays are sequences, containing a fixed number of instances of the same " "type." msgstr "" -#: library/ctypes.rst:727 +#: library/ctypes.rst:733 msgid "" "The recommended way to create array types is by multiplying a data type with " "a positive integer::" msgstr "" -#: library/ctypes.rst:730 +#: library/ctypes.rst:736 msgid "TenPointsArrayType = POINT * 10" msgstr "" -#: library/ctypes.rst:732 +#: library/ctypes.rst:738 msgid "" "Here is an example of a somewhat artificial data type, a structure " "containing 4 POINTs among other stuff::" msgstr "" -#: library/ctypes.rst:735 +#: library/ctypes.rst:741 msgid "" ">>> from ctypes import *\n" ">>> class POINT(Structure):\n" @@ -1242,28 +1249,28 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:748 +#: library/ctypes.rst:754 msgid "Instances are created in the usual way, by calling the class::" msgstr "" -#: library/ctypes.rst:750 +#: library/ctypes.rst:756 msgid "" "arr = TenPointsArrayType()\n" "for pt in arr:\n" " print(pt.x, pt.y)" msgstr "" -#: library/ctypes.rst:754 +#: library/ctypes.rst:760 msgid "" "The above code print a series of ``0 0`` lines, because the array contents " "is initialized to zeros." msgstr "" -#: library/ctypes.rst:757 +#: library/ctypes.rst:763 msgid "Initializers of the correct type can also be specified::" msgstr "" -#: library/ctypes.rst:759 +#: library/ctypes.rst:765 msgid "" ">>> from ctypes import *\n" ">>> TenIntegers = c_int * 10\n" @@ -1276,17 +1283,17 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:773 +#: library/ctypes.rst:779 msgid "Pointers" msgstr "" -#: library/ctypes.rst:775 +#: library/ctypes.rst:781 msgid "" "Pointer instances are created by calling the :func:`pointer` function on a :" "mod:`ctypes` type::" msgstr "" -#: library/ctypes.rst:778 +#: library/ctypes.rst:784 msgid "" ">>> from ctypes import *\n" ">>> i = c_int(42)\n" @@ -1294,26 +1301,26 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:783 +#: library/ctypes.rst:789 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:786 +#: library/ctypes.rst:792 msgid "" ">>> pi.contents\n" "c_long(42)\n" ">>>" msgstr "" -#: library/ctypes.rst:790 +#: library/ctypes.rst:796 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:793 +#: library/ctypes.rst:799 msgid "" ">>> pi.contents is i\n" "False\n" @@ -1322,14 +1329,14 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:799 +#: library/ctypes.rst:805 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:802 +#: library/ctypes.rst:808 msgid "" ">>> i = c_int(99)\n" ">>> pi.contents = i\n" @@ -1338,22 +1345,22 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:811 +#: library/ctypes.rst:817 msgid "Pointer instances can also be indexed with integers::" msgstr "" -#: library/ctypes.rst:813 +#: library/ctypes.rst:819 msgid "" ">>> pi[0]\n" "99\n" ">>>" msgstr "" -#: library/ctypes.rst:817 +#: library/ctypes.rst:823 msgid "Assigning to an integer index changes the pointed to value::" msgstr "" -#: library/ctypes.rst:819 +#: library/ctypes.rst:825 msgid "" ">>> print(i)\n" "c_long(99)\n" @@ -1363,7 +1370,7 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:826 +#: library/ctypes.rst:832 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 " @@ -1372,7 +1379,7 @@ msgid "" "instead of a single item." msgstr "" -#: library/ctypes.rst:832 +#: library/ctypes.rst:838 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 " @@ -1380,7 +1387,7 @@ msgid "" "returns a new type::" msgstr "" -#: library/ctypes.rst:837 +#: library/ctypes.rst:843 msgid "" ">>> PI = POINTER(c_int)\n" ">>> PI\n" @@ -1394,13 +1401,13 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:848 +#: library/ctypes.rst:854 msgid "" "Calling the pointer type without an argument creates a ``NULL`` pointer. " "``NULL`` pointers have a ``False`` boolean value::" msgstr "" -#: library/ctypes.rst:851 +#: library/ctypes.rst:857 msgid "" ">>> null_ptr = POINTER(c_int)()\n" ">>> print(bool(null_ptr))\n" @@ -1408,13 +1415,13 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:856 +#: library/ctypes.rst:862 msgid "" ":mod:`ctypes` checks for ``NULL`` when dereferencing pointers (but " "dereferencing invalid non-\\ ``NULL`` pointers would crash Python)::" msgstr "" -#: library/ctypes.rst:859 +#: library/ctypes.rst:865 msgid "" ">>> null_ptr[0]\n" "Traceback (most recent call last):\n" @@ -1429,11 +1436,11 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:875 +#: library/ctypes.rst:881 msgid "Type conversions" msgstr "" -#: library/ctypes.rst:877 +#: library/ctypes.rst:883 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 " @@ -1444,7 +1451,7 @@ msgid "" "ctypes accepts an array of c_int::" msgstr "" -#: library/ctypes.rst:884 +#: library/ctypes.rst:890 msgid "" ">>> class Bar(Structure):\n" "... _fields_ = [(\"count\", c_int), (\"values\", POINTER(c_int))]\n" @@ -1461,7 +1468,7 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:898 +#: library/ctypes.rst:904 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 " @@ -1470,17 +1477,17 @@ msgid "" "automatically." msgstr "" -#: library/ctypes.rst:903 +#: library/ctypes.rst:909 msgid "To set a POINTER type field to ``NULL``, you can assign ``None``::" msgstr "" -#: library/ctypes.rst:905 +#: library/ctypes.rst:911 msgid "" ">>> bar.values = None\n" ">>>" msgstr "" -#: library/ctypes.rst:910 +#: library/ctypes.rst:916 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 " @@ -1489,7 +1496,7 @@ msgid "" "``values`` field, but not instances of other types::" msgstr "" -#: library/ctypes.rst:916 +#: library/ctypes.rst:922 msgid "" ">>> bar.values = (c_byte * 4)()\n" "Traceback (most recent call last):\n" @@ -1499,11 +1506,11 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:922 +#: library/ctypes.rst:928 msgid "For these cases, the :func:`cast` function is handy." msgstr "" -#: library/ctypes.rst:924 +#: library/ctypes.rst:930 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, " @@ -1512,7 +1519,7 @@ msgid "" "references the same memory block as the first argument::" msgstr "" -#: library/ctypes.rst:930 +#: library/ctypes.rst:936 msgid "" ">>> a = (c_byte * 4)()\n" ">>> cast(a, POINTER(c_int))\n" @@ -1520,13 +1527,13 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:935 +#: library/ctypes.rst:941 msgid "" "So, :func:`cast` can be used to assign to the ``values`` field of ``Bar`` " "the structure::" msgstr "" -#: library/ctypes.rst:938 +#: library/ctypes.rst:944 msgid "" ">>> bar = Bar()\n" ">>> bar.values = cast((c_byte * 4)(), POINTER(c_int))\n" @@ -1535,18 +1542,18 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:948 +#: library/ctypes.rst:954 msgid "Incomplete Types" msgstr "" -#: library/ctypes.rst:950 +#: library/ctypes.rst:956 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:954 +#: library/ctypes.rst:960 msgid "" "struct cell; /* forward declaration */\n" "\n" @@ -1556,13 +1563,13 @@ msgid "" "};" msgstr "" -#: library/ctypes.rst:961 +#: library/ctypes.rst:967 msgid "" "The straightforward translation into ctypes code would be this, but it does " "not work::" msgstr "" -#: library/ctypes.rst:964 +#: library/ctypes.rst:970 msgid "" ">>> class cell(Structure):\n" "... _fields_ = [(\"name\", c_char_p),\n" @@ -1575,14 +1582,14 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:974 +#: library/ctypes.rst:980 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:978 +#: library/ctypes.rst:984 msgid "" ">>> from ctypes import *\n" ">>> class cell(Structure):\n" @@ -1593,13 +1600,13 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:986 +#: library/ctypes.rst:992 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:989 +#: library/ctypes.rst:995 msgid "" ">>> c1 = cell()\n" ">>> c1.name = b\"foo\"\n" @@ -1616,24 +1623,24 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:1007 +#: library/ctypes.rst:1013 msgid "Callback functions" msgstr "" -#: library/ctypes.rst:1009 +#: library/ctypes.rst:1015 msgid "" ":mod:`ctypes` allows creating C callable function pointers from Python " "callables. These are sometimes called *callback functions*." msgstr "" -#: library/ctypes.rst:1012 +#: library/ctypes.rst:1018 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:1016 +#: library/ctypes.rst:1022 msgid "" "The :func:`CFUNCTYPE` factory function creates types for callback functions " "using the ``cdecl`` calling convention. On Windows, the :func:`WINFUNCTYPE` " @@ -1641,21 +1648,21 @@ msgid "" "calling convention." msgstr "" -#: library/ctypes.rst:1021 +#: library/ctypes.rst:1027 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:1025 +#: library/ctypes.rst:1031 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:1029 +#: library/ctypes.rst:1035 msgid "" ">>> IntArray5 = c_int * 5\n" ">>> ia = IntArray5(5, 1, 7, 33, 99)\n" @@ -1664,7 +1671,7 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:1035 +#: library/ctypes.rst:1041 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 " @@ -1674,25 +1681,25 @@ msgid "" "otherwise." msgstr "" -#: library/ctypes.rst:1041 +#: library/ctypes.rst:1047 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:1044 +#: library/ctypes.rst:1050 msgid "" ">>> CMPFUNC = CFUNCTYPE(c_int, POINTER(c_int), POINTER(c_int))\n" ">>>" msgstr "" -#: library/ctypes.rst:1047 +#: library/ctypes.rst:1053 msgid "" "To get started, here is a simple callback that shows the values it gets " "passed::" msgstr "" -#: library/ctypes.rst:1050 +#: library/ctypes.rst:1056 msgid "" ">>> def py_cmp_func(a, b):\n" "... print(\"py_cmp_func\", a[0], b[0])\n" @@ -1702,11 +1709,11 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:1057 +#: library/ctypes.rst:1063 msgid "The result::" msgstr "" -#: library/ctypes.rst:1059 +#: library/ctypes.rst:1065 msgid "" ">>> qsort(ia, len(ia), sizeof(c_int), cmp_func)\n" "py_cmp_func 5 1\n" @@ -1717,11 +1724,11 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:1067 +#: library/ctypes.rst:1073 msgid "Now we can actually compare the two items and return a useful result::" msgstr "" -#: library/ctypes.rst:1069 +#: library/ctypes.rst:1075 msgid "" ">>> def py_cmp_func(a, b):\n" "... print(\"py_cmp_func\", a[0], b[0])\n" @@ -1737,11 +1744,11 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:1082 +#: library/ctypes.rst:1088 msgid "As we can easily check, our array is sorted now::" msgstr "" -#: library/ctypes.rst:1084 +#: library/ctypes.rst:1090 msgid "" ">>> for i in ia: print(i, end=\" \")\n" "...\n" @@ -1749,13 +1756,13 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:1089 +#: library/ctypes.rst:1095 msgid "" "The function factories can be used as decorator factories, so we may as well " "write::" msgstr "" -#: library/ctypes.rst:1092 +#: library/ctypes.rst:1098 msgid "" ">>> @CFUNCTYPE(c_int, POINTER(c_int), POINTER(c_int))\n" "... def py_cmp_func(a, b):\n" @@ -1771,14 +1778,14 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:1107 +#: library/ctypes.rst:1113 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:1111 +#: library/ctypes.rst:1117 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 " @@ -1788,42 +1795,42 @@ msgid "" "even when those calls are made from the same C thread." msgstr "" -#: library/ctypes.rst:1121 +#: library/ctypes.rst:1127 msgid "Accessing values exported from dlls" msgstr "" -#: library/ctypes.rst:1123 +#: library/ctypes.rst:1129 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:1127 +#: library/ctypes.rst:1133 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:1131 +#: library/ctypes.rst:1137 msgid "" ">>> version = ctypes.c_int.in_dll(ctypes.pythonapi, \"Py_Version\")\n" ">>> print(hex(version.value))\n" "0x30c00a0" msgstr "" -#: library/ctypes.rst:1135 +#: library/ctypes.rst:1141 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:1138 +#: library/ctypes.rst:1144 msgid "Quoting the docs for that value:" msgstr "" -#: library/ctypes.rst:1140 +#: library/ctypes.rst:1146 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 " @@ -1832,13 +1839,13 @@ msgid "" "frozen modules." msgstr "" -#: library/ctypes.rst:1145 +#: library/ctypes.rst:1151 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:1148 +#: library/ctypes.rst:1154 msgid "" ">>> from ctypes import *\n" ">>>\n" @@ -1852,20 +1859,20 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:1159 +#: library/ctypes.rst:1165 msgid "" "We have defined the :c:struct:`_frozen` data type, so we can get the pointer " "to the table::" msgstr "" -#: library/ctypes.rst:1162 +#: library/ctypes.rst:1168 msgid "" ">>> FrozenTable = POINTER(struct_frozen)\n" ">>> table = FrozenTable.in_dll(pythonapi, \"_PyImport_FrozenBootstrap\")\n" ">>>" msgstr "" -#: library/ctypes.rst:1166 +#: library/ctypes.rst:1172 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 " @@ -1874,7 +1881,7 @@ msgid "" "the loop when we hit the ``NULL`` entry::" msgstr "" -#: library/ctypes.rst:1172 +#: library/ctypes.rst:1178 msgid "" ">>> for item in table:\n" "... if item.name is None:\n" @@ -1887,28 +1894,28 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:1182 +#: library/ctypes.rst:1188 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:1190 +#: library/ctypes.rst:1196 msgid "Surprises" msgstr "" -#: library/ctypes.rst:1192 +#: library/ctypes.rst:1198 msgid "" "There are some edges in :mod:`ctypes` where you might expect something other " "than what actually happens." msgstr "" -#: library/ctypes.rst:1195 +#: library/ctypes.rst:1201 msgid "Consider the following example::" msgstr "" -#: library/ctypes.rst:1197 +#: library/ctypes.rst:1203 msgid "" ">>> from ctypes import *\n" ">>> class POINT(Structure):\n" @@ -1929,13 +1936,13 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:1215 +#: library/ctypes.rst:1221 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:1218 +#: library/ctypes.rst:1224 msgid "" ">>> temp0, temp1 = rc.b, rc.a\n" ">>> rc.a = temp0\n" @@ -1943,7 +1950,7 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:1223 +#: library/ctypes.rst:1229 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 " @@ -1952,20 +1959,20 @@ msgid "" "have the expected effect." msgstr "" -#: library/ctypes.rst:1229 +#: library/ctypes.rst:1235 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:1233 +#: library/ctypes.rst:1239 msgid "" "Another example that may behave differently from what one would expect is " "this::" msgstr "" -#: library/ctypes.rst:1235 +#: library/ctypes.rst:1241 msgid "" ">>> s = c_char_p()\n" ">>> s.value = b\"abc def ghi\"\n" @@ -1976,13 +1983,13 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:1245 +#: library/ctypes.rst:1251 msgid "" "Objects instantiated from :class:`c_char_p` can only have their value set to " "bytes or integers." msgstr "" -#: library/ctypes.rst:1248 +#: library/ctypes.rst:1254 msgid "" "Why is it printing ``False``? ctypes instances are objects containing a " "memory block plus some :term:`descriptor`\\s accessing the contents of the " @@ -1991,16 +1998,16 @@ msgid "" "the contents again constructs a new Python object each time!" msgstr "" -#: library/ctypes.rst:1258 +#: library/ctypes.rst:1264 msgid "Variable-sized data types" msgstr "" -#: library/ctypes.rst:1260 +#: library/ctypes.rst:1266 msgid "" ":mod:`ctypes` provides some support for variable-sized arrays and structures." msgstr "" -#: library/ctypes.rst:1262 +#: library/ctypes.rst:1268 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, " @@ -2009,7 +2016,7 @@ msgid "" "objects type, a :exc:`ValueError` is raised if this is tried::" msgstr "" -#: library/ctypes.rst:1268 +#: library/ctypes.rst:1274 msgid "" ">>> short_array = (c_short * 4)()\n" ">>> print(sizeof(short_array))\n" @@ -2026,14 +2033,14 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:1282 +#: library/ctypes.rst:1288 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:1286 +#: library/ctypes.rst:1292 msgid "" ">>> short_array[:]\n" "[0, 0, 0, 0]\n" @@ -2044,28 +2051,28 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:1294 +#: library/ctypes.rst:1300 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:1302 +#: library/ctypes.rst:1308 msgid "ctypes reference" msgstr "" -#: library/ctypes.rst:1308 +#: library/ctypes.rst:1314 msgid "Finding shared libraries" msgstr "" -#: library/ctypes.rst:1310 +#: library/ctypes.rst:1316 msgid "" "When programming in a compiled language, shared libraries are accessed when " "compiling/linking a program, and when the program is run." msgstr "" -#: library/ctypes.rst:1313 +#: library/ctypes.rst:1319 msgid "" "The purpose of the :func:`~ctypes.util.find_library` function is to locate a " "library in a way similar to what the compiler or runtime loader does (on " @@ -2074,13 +2081,13 @@ msgid "" "and call the runtime loader directly." msgstr "" -#: library/ctypes.rst:1319 +#: library/ctypes.rst:1325 msgid "" "The :mod:`!ctypes.util` module provides a function which can help to " "determine the library to load." msgstr "" -#: library/ctypes.rst:1327 +#: library/ctypes.rst:1333 msgid "" "Try to find a library and return a pathname. *name* is the library name " "without any prefix like *lib*, suffix like ``.so``, ``.dylib`` or version " @@ -2088,29 +2095,35 @@ msgid "" "If no library can be found, returns ``None``." msgstr "" -#: library/ctypes.rst:2038 +#: library/ctypes.rst:2047 msgid "The exact functionality is system dependent." msgstr "" -#: library/ctypes.rst:1334 +#: library/ctypes.rst:1340 msgid "" "On Linux, :func:`~ctypes.util.find_library` tries to run external programs " "(``/sbin/ldconfig``, ``gcc``, ``objdump`` and ``ld``) to find the library " "file. It returns the filename of the library file." msgstr "" -#: library/ctypes.rst:1338 +#: library/ctypes.rst:1344 +msgid "" +"Note that if the output of these programs does not correspond to the dynamic " +"linker used by Python, the result of this function may be misleading." +msgstr "" + +#: library/ctypes.rst:1347 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:1342 +#: library/ctypes.rst:1351 msgid "Here are some examples::" msgstr "" -#: library/ctypes.rst:1344 +#: library/ctypes.rst:1353 msgid "" ">>> from ctypes.util import find_library\n" ">>> find_library(\"m\")\n" @@ -2122,14 +2135,14 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:1353 +#: library/ctypes.rst:1362 msgid "" "On macOS and Android, :func:`~ctypes.util.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:1357 +#: library/ctypes.rst:1366 msgid "" ">>> from ctypes.util import find_library\n" ">>> find_library(\"c\")\n" @@ -2143,7 +2156,7 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:1368 +#: library/ctypes.rst:1377 msgid "" "On Windows, :func:`~ctypes.util.find_library` searches along the system " "search path, and returns the full pathname, but since there is no predefined " @@ -2151,7 +2164,7 @@ msgid "" "``None``." msgstr "" -#: library/ctypes.rst:1372 +#: library/ctypes.rst:1381 msgid "" "If wrapping a shared library with :mod:`ctypes`, it *may* be better to " "determine the shared library name at development time, and hardcode that " @@ -2159,24 +2172,24 @@ msgid "" "to locate the library at runtime." msgstr "" -#: library/ctypes.rst:1380 +#: library/ctypes.rst:1389 msgid "Loading shared libraries" msgstr "" -#: library/ctypes.rst:1382 +#: library/ctypes.rst:1391 msgid "" "There are several ways to load shared libraries into the Python process. " "One way is to instantiate one of the following classes:" msgstr "" -#: library/ctypes.rst:1388 +#: library/ctypes.rst:1397 msgid "" "Instances of this class represent loaded shared libraries. Functions in " "these libraries use the standard C calling convention, and are assumed to " "return :c:expr:`int`." msgstr "" -#: library/ctypes.rst:1392 +#: library/ctypes.rst:1401 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:" @@ -2188,17 +2201,17 @@ msgid "" "determine which one is not found using Windows debugging and tracing tools." msgstr "" -#: library/ctypes.rst:1429 library/ctypes.rst:1460 +#: library/ctypes.rst:1438 library/ctypes.rst:1469 msgid "The *name* parameter can now be a :term:`path-like object`." msgstr "" -#: library/ctypes.rst:1408 +#: library/ctypes.rst:1417 msgid "" "`Microsoft DUMPBIN tool `_ -- A tool to find DLL dependents." msgstr "" -#: library/ctypes.rst:1414 +#: library/ctypes.rst:1423 msgid "" "Instances of this class represent loaded shared libraries, functions in " "these libraries use the ``stdcall`` calling convention, and are assumed to " @@ -2208,32 +2221,32 @@ msgid "" "a failure, an :class:`OSError` is automatically raised." msgstr "" -#: library/ctypes.rst:1438 library/ctypes.rst:1590 library/ctypes.rst:2018 -#: library/ctypes.rst:2052 library/ctypes.rst:2070 library/ctypes.rst:2142 -#: library/ctypes.rst:2514 +#: library/ctypes.rst:1447 library/ctypes.rst:1599 library/ctypes.rst:2027 +#: library/ctypes.rst:2063 library/ctypes.rst:2081 library/ctypes.rst:2153 +#: library/ctypes.rst:2525 msgid "Availability" msgstr "" -#: library/ctypes.rst:1423 +#: library/ctypes.rst:1432 msgid "" ":exc:`WindowsError` used to be raised, which is now an alias of :exc:" "`OSError`." msgstr "" -#: library/ctypes.rst:1434 +#: library/ctypes.rst:1443 msgid "" "Instances of this class represent loaded shared libraries, functions in " "these libraries use the ``stdcall`` calling convention, and are assumed to " "return :c:expr:`int` by default." msgstr "" -#: library/ctypes.rst:1445 +#: library/ctypes.rst:1454 msgid "" "The Python :term:`global interpreter lock` is released before calling any " "function exported by these libraries, and reacquired afterwards." msgstr "" -#: library/ctypes.rst:1451 +#: library/ctypes.rst:1460 msgid "" "Instances of this class behave like :class:`CDLL` instances, except that the " "Python GIL is *not* released during the function call, and after the " @@ -2241,11 +2254,11 @@ msgid "" "set, a Python exception is raised." msgstr "" -#: library/ctypes.rst:1456 +#: library/ctypes.rst:1465 msgid "Thus, this is only useful to call Python C api functions directly." msgstr "" -#: library/ctypes.rst:1462 +#: library/ctypes.rst:1471 msgid "" "All these classes can be instantiated by calling them with at least one " "argument, the pathname of the shared library. If you have an existing " @@ -2255,7 +2268,7 @@ msgid "" "the process, and to get a handle to it." msgstr "" -#: library/ctypes.rst:1469 +#: library/ctypes.rst:1478 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 " @@ -2263,7 +2276,7 @@ msgid "" "configurable." msgstr "" -#: library/ctypes.rst:1474 +#: library/ctypes.rst:1483 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:" @@ -2273,14 +2286,14 @@ msgid "" "private copy, the same happens immediately after the function call." msgstr "" -#: library/ctypes.rst:1481 +#: library/ctypes.rst:1490 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:1485 +#: library/ctypes.rst:1494 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 :" @@ -2289,7 +2302,7 @@ msgid "" "private copy of the windows error code." msgstr "" -#: library/ctypes.rst:1491 +#: library/ctypes.rst:1500 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 " @@ -2299,29 +2312,29 @@ msgid "" "ensure the correct library and dependencies are loaded." msgstr "" -#: library/ctypes.rst:1498 +#: library/ctypes.rst:1507 msgid "Added *winmode* parameter." msgstr "" -#: library/ctypes.rst:1505 +#: library/ctypes.rst:1514 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:1512 +#: library/ctypes.rst:1521 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:1519 +#: library/ctypes.rst:1528 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:1522 +#: library/ctypes.rst:1531 msgid "" "Instances of these classes have no public methods. Functions exported by " "the shared library can be accessed as attributes or by index. Please note " @@ -2330,7 +2343,7 @@ msgid "" "other hand, accessing it through an index returns a new object each time::" msgstr "" -#: library/ctypes.rst:1528 +#: library/ctypes.rst:1537 msgid "" ">>> from ctypes import CDLL\n" ">>> libc = CDLL(\"libc.so.6\") # On Linux\n" @@ -2340,21 +2353,21 @@ msgid "" "False" msgstr "" -#: library/ctypes.rst:1535 +#: library/ctypes.rst:1544 msgid "" "The following public attributes are available, their name starts with an " "underscore to not clash with exported function names:" msgstr "" -#: library/ctypes.rst:1541 +#: library/ctypes.rst:1550 msgid "The system handle used to access the library." msgstr "" -#: library/ctypes.rst:1546 +#: library/ctypes.rst:1555 msgid "The name of the library passed in the constructor." msgstr "" -#: library/ctypes.rst:1548 +#: library/ctypes.rst:1557 msgid "" "Shared libraries can also be loaded by using one of the prefabricated " "objects, which are instances of the :class:`LibraryLoader` class, either by " @@ -2362,13 +2375,13 @@ msgid "" "library as attribute of the loader instance." msgstr "" -#: library/ctypes.rst:1556 +#: library/ctypes.rst:1565 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:1559 +#: library/ctypes.rst:1568 msgid "" ":meth:`!__getattr__` has special behavior: It allows loading a shared " "library by accessing it as attribute of a library loader instance. The " @@ -2376,39 +2389,39 @@ msgid "" "each time." msgstr "" -#: library/ctypes.rst:1565 +#: library/ctypes.rst:1574 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:1569 +#: library/ctypes.rst:1578 msgid "These prefabricated library loaders are available:" msgstr "" -#: library/ctypes.rst:1574 +#: library/ctypes.rst:1583 msgid "Creates :class:`CDLL` instances." msgstr "" -#: library/ctypes.rst:1580 +#: library/ctypes.rst:1589 msgid "Creates :class:`WinDLL` instances." msgstr "" -#: library/ctypes.rst:1588 +#: library/ctypes.rst:1597 msgid "Creates :class:`OleDLL` instances." msgstr "" -#: library/ctypes.rst:1596 +#: library/ctypes.rst:1605 msgid "Creates :class:`PyDLL` instances." msgstr "" -#: library/ctypes.rst:1599 +#: library/ctypes.rst:1608 msgid "" "For accessing the C Python api directly, a ready-to-use Python shared " "library object is available:" msgstr "" -#: library/ctypes.rst:1605 +#: library/ctypes.rst:1614 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:" @@ -2416,32 +2429,32 @@ msgid "" "correct :attr:`!restype` attribute to use these functions." msgstr "" -#: library/ctypes.rst:1612 +#: library/ctypes.rst:1621 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:1618 +#: library/ctypes.rst:1627 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:1624 +#: library/ctypes.rst:1633 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:1631 +#: library/ctypes.rst:1640 msgid "Foreign functions" msgstr "" -#: library/ctypes.rst:1633 +#: library/ctypes.rst:1642 msgid "" "As explained in the previous section, foreign functions can be accessed as " "attributes of loaded shared libraries. The function objects created in this " @@ -2450,13 +2463,13 @@ msgid "" "library loader." msgstr "" -#: library/ctypes.rst:1638 +#: library/ctypes.rst:1647 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:1641 +#: library/ctypes.rst:1650 msgid "" ">>> import ctypes\n" ">>> lib = ctypes.CDLL(None)\n" @@ -2466,29 +2479,29 @@ msgid "" "False" msgstr "" -#: library/ctypes.rst:1652 +#: library/ctypes.rst:1661 msgid "Base class for C callable foreign functions." msgstr "" -#: library/ctypes.rst:1654 +#: library/ctypes.rst:1663 msgid "" "Instances of foreign functions are also C compatible data types; they " "represent C function pointers." msgstr "" -#: library/ctypes.rst:1657 +#: library/ctypes.rst:1666 msgid "" "This behavior can be customized by assigning to special attributes of the " "foreign function object." msgstr "" -#: library/ctypes.rst:1662 +#: library/ctypes.rst:1671 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:1665 +#: library/ctypes.rst:1674 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 " @@ -2498,7 +2511,7 @@ msgid "" "callable to the :attr:`errcheck` attribute." msgstr "" -#: library/ctypes.rst:1674 +#: library/ctypes.rst:1683 msgid "" "Assign a tuple of ctypes types to specify the argument types that the " "function accepts. Functions using the ``stdcall`` calling convention can " @@ -2507,7 +2520,7 @@ msgid "" "unspecified arguments as well." msgstr "" -#: library/ctypes.rst:1680 +#: library/ctypes.rst:1689 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` " @@ -2517,7 +2530,7 @@ msgid "" "object using ctypes conversion rules." msgstr "" -#: library/ctypes.rst:1687 +#: library/ctypes.rst:1696 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 " @@ -2525,44 +2538,44 @@ msgid "" "defining adapters that can adapt custom objects as function parameters." msgstr "" -#: library/ctypes.rst:1694 +#: library/ctypes.rst:1703 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:1701 +#: library/ctypes.rst:1710 msgid "" "*result* is what the foreign function returns, as specified by the :attr:`!" "restype` attribute." msgstr "" -#: library/ctypes.rst:1704 +#: library/ctypes.rst:1713 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:1708 +#: library/ctypes.rst:1717 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:1712 +#: library/ctypes.rst:1721 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:1719 +#: library/ctypes.rst:1728 msgid "" "This exception is raised when a foreign function call cannot convert one of " "the passed arguments." msgstr "" -#: library/ctypes.rst:1725 +#: library/ctypes.rst:1734 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 " @@ -2571,18 +2584,18 @@ msgid "" "hook to replace the exception with its own." msgstr "" -#: library/ctypes.rst:1733 +#: library/ctypes.rst:1742 msgid "" "Some ways to invoke foreign function calls may raise an auditing event " "``ctypes.call_function`` with arguments ``function pointer`` and " "``arguments``." msgstr "" -#: library/ctypes.rst:1739 +#: library/ctypes.rst:1748 msgid "Function prototypes" msgstr "" -#: library/ctypes.rst:1741 +#: library/ctypes.rst:1750 msgid "" "Foreign functions can also be created by instantiating function prototypes. " "Function prototypes are similar to function prototypes in C; they describe a " @@ -2593,7 +2606,7 @@ msgid "" "``@wrapper`` syntax. See :ref:`ctypes-callback-functions` for examples." msgstr "" -#: library/ctypes.rst:1752 +#: library/ctypes.rst:1761 msgid "" "The returned function prototype creates functions that use the standard C " "calling convention. The function will release the GIL during the call. If " @@ -2602,37 +2615,37 @@ msgid "" "after the call; *use_last_error* does the same for the Windows error code." msgstr "" -#: library/ctypes.rst:1762 +#: library/ctypes.rst:1771 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:1772 +#: library/ctypes.rst:1781 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:1775 +#: library/ctypes.rst:1784 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:1782 +#: library/ctypes.rst:1791 msgid "" "Returns a foreign function at the specified address which must be an integer." msgstr "" -#: library/ctypes.rst:1789 +#: library/ctypes.rst:1798 msgid "" "Create a C callable function (a callback function) from a Python *callable*." msgstr "" -#: library/ctypes.rst:1796 +#: library/ctypes.rst:1805 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 " @@ -2640,7 +2653,7 @@ msgid "" "small integer. The second item is the shared library instance." msgstr "" -#: library/ctypes.rst:1806 +#: library/ctypes.rst:1815 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* " @@ -2648,79 +2661,79 @@ msgid "" "identifier which is used in extended error reporting." msgstr "" -#: library/ctypes.rst:1811 +#: library/ctypes.rst:1820 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:1815 +#: library/ctypes.rst:1824 msgid "" "The optional *paramflags* parameter creates foreign function wrappers with " "much more functionality than the features described above." msgstr "" -#: library/ctypes.rst:1818 +#: library/ctypes.rst:1827 msgid "" "*paramflags* must be a tuple of the same length as :attr:`~_CFuncPtr." "argtypes`." msgstr "" -#: library/ctypes.rst:1820 +#: library/ctypes.rst:1829 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:1823 +#: library/ctypes.rst:1832 msgid "" "The first item is an integer containing a combination of direction flags for " "the parameter:" msgstr "" -#: library/ctypes.rst:1826 +#: library/ctypes.rst:1835 msgid "1" msgstr "" -#: library/ctypes.rst:1827 +#: library/ctypes.rst:1836 msgid "Specifies an input parameter to the function." msgstr "" -#: library/ctypes.rst:1829 +#: library/ctypes.rst:1838 msgid "2" msgstr "" -#: library/ctypes.rst:1830 +#: library/ctypes.rst:1839 msgid "Output parameter. The foreign function fills in a value." msgstr "" -#: library/ctypes.rst:1832 +#: library/ctypes.rst:1841 msgid "4" msgstr "" -#: library/ctypes.rst:1833 +#: library/ctypes.rst:1842 msgid "Input parameter which defaults to the integer zero." msgstr "" -#: library/ctypes.rst:1835 +#: library/ctypes.rst:1844 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:1838 +#: library/ctypes.rst:1847 msgid "The optional third item is the default value for this parameter." msgstr "" -#: library/ctypes.rst:1841 +#: library/ctypes.rst:1850 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:1845 +#: library/ctypes.rst:1854 msgid "" "WINUSERAPI int WINAPI\n" "MessageBoxW(\n" @@ -2730,11 +2743,11 @@ msgid "" " UINT uType);" msgstr "" -#: library/ctypes.rst:1875 +#: library/ctypes.rst:1884 msgid "Here is the wrapping with :mod:`ctypes`::" msgstr "" -#: library/ctypes.rst:1854 +#: library/ctypes.rst:1863 msgid "" ">>> from ctypes import c_int, WINFUNCTYPE, windll\n" ">>> from ctypes.wintypes import HWND, LPCWSTR, UINT\n" @@ -2744,18 +2757,18 @@ msgid "" ">>> MessageBox = prototype((\"MessageBoxW\", windll.user32), paramflags)" msgstr "" -#: library/ctypes.rst:1860 +#: library/ctypes.rst:1869 msgid "The ``MessageBox`` foreign function can now be called in these ways::" msgstr "" -#: library/ctypes.rst:1862 +#: library/ctypes.rst:1871 msgid "" ">>> MessageBox()\n" ">>> MessageBox(text=\"Spam, spam, spam\")\n" ">>> MessageBox(flags=2, text=\"foo bar\")" msgstr "" -#: library/ctypes.rst:1866 +#: library/ctypes.rst:1875 msgid "" "A second example demonstrates output parameters. The win32 " "``GetWindowRect`` function retrieves the dimensions of a specified window by " @@ -2763,7 +2776,7 @@ msgid "" "the C declaration::" msgstr "" -#: library/ctypes.rst:1870 +#: library/ctypes.rst:1879 msgid "" "WINUSERAPI BOOL WINAPI\n" "GetWindowRect(\n" @@ -2771,7 +2784,7 @@ msgid "" " LPRECT lpRect);" msgstr "" -#: library/ctypes.rst:1877 +#: library/ctypes.rst:1886 msgid "" ">>> from ctypes import POINTER, WINFUNCTYPE, windll, WinError\n" ">>> from ctypes.wintypes import BOOL, HWND, RECT\n" @@ -2782,7 +2795,7 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:1884 +#: library/ctypes.rst:1893 msgid "" "Functions with output parameters will automatically return the output " "parameter value if there is a single one, or a tuple containing the output " @@ -2790,7 +2803,7 @@ msgid "" "now returns a RECT instance, when called." msgstr "" -#: library/ctypes.rst:1889 +#: library/ctypes.rst:1898 msgid "" "Output parameters can be combined with the :attr:`~_CFuncPtr.errcheck` " "protocol to do further output processing and error checking. The win32 " @@ -2799,7 +2812,7 @@ msgid "" "exception when the api call failed::" msgstr "" -#: library/ctypes.rst:1894 +#: library/ctypes.rst:1903 msgid "" ">>> def errcheck(result, func, args):\n" "... if not result:\n" @@ -2810,7 +2823,7 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:1902 +#: library/ctypes.rst:1911 msgid "" "If the :attr:`~_CFuncPtr.errcheck` function returns the argument tuple it " "receives unchanged, :mod:`ctypes` continues the normal processing it does on " @@ -2819,7 +2832,7 @@ msgid "" "and return them instead, the normal processing will no longer take place::" msgstr "" -#: library/ctypes.rst:1908 +#: library/ctypes.rst:1917 msgid "" ">>> def errcheck(result, func, args):\n" "... if not result:\n" @@ -2831,50 +2844,50 @@ msgid "" ">>>" msgstr "" -#: library/ctypes.rst:1921 +#: library/ctypes.rst:1930 msgid "Utility functions" msgstr "" -#: library/ctypes.rst:1925 +#: library/ctypes.rst:1934 msgid "" "Returns the address of the memory buffer as integer. *obj* must be an " "instance of a ctypes type." msgstr "" -#: library/ctypes.rst:1928 +#: library/ctypes.rst:1937 msgid "" "Raises an :ref:`auditing event ` ``ctypes.addressof`` with " "argument ``obj``." msgstr "" -#: library/ctypes.rst:1933 +#: library/ctypes.rst:1942 msgid "" "Returns the alignment requirements of a ctypes type. *obj_or_type* must be a " "ctypes type or instance." msgstr "" -#: library/ctypes.rst:1939 +#: library/ctypes.rst:1948 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:1943 +#: library/ctypes.rst:1952 msgid "``byref(obj, offset)`` corresponds to this C code::" msgstr "" -#: library/ctypes.rst:1945 +#: library/ctypes.rst:1954 msgid "(((char *)&obj) + offset)" msgstr "" -#: library/ctypes.rst:1947 +#: library/ctypes.rst:1956 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:1953 +#: library/ctypes.rst:1962 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* " @@ -2882,47 +2895,47 @@ msgid "" "as a pointer." msgstr "" -#: library/ctypes.rst:1962 +#: library/ctypes.rst:1971 msgid "" "This function creates a mutable character buffer. The returned object is a " "ctypes array of :class:`c_char`." msgstr "" -#: library/ctypes.rst:1965 +#: library/ctypes.rst:1974 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:1968 +#: library/ctypes.rst:1977 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:1972 +#: library/ctypes.rst:1981 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:1975 +#: library/ctypes.rst:1984 msgid "" "If both arguments are given, *size* must not be less than ``len(init)``." msgstr "" -#: library/ctypes.rst:1979 +#: library/ctypes.rst:1988 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:1982 +#: library/ctypes.rst:1991 msgid "For example::" msgstr "" -#: library/ctypes.rst:1984 +#: library/ctypes.rst:1993 msgid "" ">>> bytes(create_string_buffer(2))\n" "b'\\x00\\x00'\n" @@ -2938,45 +2951,45 @@ msgid "" "ValueError: byte string too long" msgstr "" -#: library/ctypes.rst:1997 +#: library/ctypes.rst:2006 msgid "" "Raises an :ref:`auditing event ` ``ctypes.create_string_buffer`` " "with arguments ``init``, ``size``." msgstr "" -#: library/ctypes.rst:2003 +#: library/ctypes.rst:2012 msgid "" "This function creates a mutable unicode character buffer. The returned " "object is a ctypes array of :class:`c_wchar`." msgstr "" -#: library/ctypes.rst:2006 +#: library/ctypes.rst:2015 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:2009 +#: library/ctypes.rst:2018 msgid "" "Raises an :ref:`auditing event ` ``ctypes.create_unicode_buffer`` " "with arguments ``init``, ``size``." msgstr "" -#: library/ctypes.rst:2014 +#: library/ctypes.rst:2023 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:2023 +#: library/ctypes.rst:2032 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:2033 +#: library/ctypes.rst:2042 msgid "" "Try to find a library and return a pathname. *name* is the library name " "without any prefix like ``lib``, suffix like ``.so``, ``.dylib`` or version " @@ -2984,92 +2997,96 @@ msgid "" "If no library can be found, returns ``None``." msgstr "" -#: library/ctypes.rst:2044 +#: library/ctypes.rst:2049 +msgid "See :ref:`ctypes-finding-shared-libraries` for complete documentation." +msgstr "" + +#: library/ctypes.rst:2055 msgid "" "Returns the filename of the VC runtime library used by Python, and by the " "extension modules. If the name of the library cannot be determined, " "``None`` is returned." msgstr "" -#: library/ctypes.rst:2048 +#: library/ctypes.rst:2059 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:2057 +#: library/ctypes.rst:2068 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 " "GetLastError." msgstr "" -#: library/ctypes.rst:2066 +#: library/ctypes.rst:2077 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:2075 +#: library/ctypes.rst:2086 msgid "" "Returns the current value of the ctypes-private copy of the system :data:" "`errno` variable in the calling thread." msgstr "" -#: library/ctypes.rst:2078 +#: library/ctypes.rst:2089 msgid "" "Raises an :ref:`auditing event ` ``ctypes.get_errno`` with no " "arguments." msgstr "" -#: library/ctypes.rst:2082 +#: library/ctypes.rst:2093 msgid "" "Returns the current value of the ctypes-private copy of the system :data:`!" "LastError` variable in the calling thread." msgstr "" -#: library/ctypes.rst:2087 +#: library/ctypes.rst:2098 msgid "" "Raises an :ref:`auditing event ` ``ctypes.get_last_error`` with no " "arguments." msgstr "" -#: library/ctypes.rst:2092 +#: library/ctypes.rst:2103 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:2099 +#: library/ctypes.rst:2110 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:2106 +#: library/ctypes.rst:2117 msgid "" "Create and return a new ctypes pointer type. Pointer types are cached and " "reused internally, so calling this function repeatedly is cheap. *type* must " "be a ctypes type." msgstr "" -#: library/ctypes.rst:2113 +#: library/ctypes.rst:2124 msgid "" "Create a new pointer instance, pointing to *obj*. The returned object is of " "the type ``POINTER(type(obj))``." msgstr "" -#: library/ctypes.rst:2116 +#: library/ctypes.rst:2127 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:2122 +#: library/ctypes.rst:2133 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 " @@ -3077,50 +3094,50 @@ msgid "" "but it is possible to enlarge the buffer." msgstr "" -#: library/ctypes.rst:2130 +#: library/ctypes.rst:2141 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:2133 +#: library/ctypes.rst:2144 msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_errno`` with " "argument ``errno``." msgstr "" -#: library/ctypes.rst:2138 +#: library/ctypes.rst:2149 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:2144 +#: library/ctypes.rst:2155 msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_last_error`` with " "argument ``error``." msgstr "" -#: library/ctypes.rst:2149 +#: library/ctypes.rst:2160 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:2155 +#: library/ctypes.rst:2166 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:2159 +#: library/ctypes.rst:2170 msgid "" "Raises an :ref:`auditing event ` ``ctypes.string_at`` with " "arguments ``ptr``, ``size``." msgstr "" -#: library/ctypes.rst:2164 +#: library/ctypes.rst:2175 msgid "" "This function is probably the worst-named thing in ctypes. It creates an " "instance of :exc:`OSError`. If *code* is not specified, ``GetLastError`` is " @@ -3128,30 +3145,30 @@ msgid "" "`FormatError` is called to get a textual description of the error." msgstr "" -#: library/ctypes.rst:2172 +#: library/ctypes.rst:2183 msgid "" "An instance of :exc:`WindowsError` used to be created, which is now an alias " "of :exc:`OSError`." msgstr "" -#: library/ctypes.rst:2179 +#: library/ctypes.rst:2190 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:2184 +#: library/ctypes.rst:2195 msgid "" "Raises an :ref:`auditing event ` ``ctypes.wstring_at`` with " "arguments ``ptr``, ``size``." msgstr "" -#: library/ctypes.rst:2190 +#: library/ctypes.rst:2201 msgid "Data types" msgstr "" -#: library/ctypes.rst:2195 +#: library/ctypes.rst:2206 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 " @@ -3161,13 +3178,13 @@ msgid "" "alive in case the memory block contains pointers." msgstr "" -#: library/ctypes.rst:2202 +#: library/ctypes.rst:2213 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:2207 +#: library/ctypes.rst:2218 msgid "" "This method returns a ctypes instance that shares the buffer of the *source* " "object. The *source* object must support the writeable buffer interface. " @@ -3176,13 +3193,13 @@ msgid "" "exc:`ValueError` is raised." msgstr "" -#: library/ctypes.rst:2223 +#: library/ctypes.rst:2234 msgid "" "Raises an :ref:`auditing event ` ``ctypes.cdata/buffer`` with " "arguments ``pointer``, ``size``, ``offset``." msgstr "" -#: library/ctypes.rst:2217 +#: library/ctypes.rst:2228 msgid "" "This method creates a ctypes instance, copying the buffer from the *source* " "object buffer which must be readable. The optional *offset* parameter " @@ -3190,19 +3207,19 @@ msgid "" "If the source buffer is not large enough a :exc:`ValueError` is raised." msgstr "" -#: library/ctypes.rst:2227 +#: library/ctypes.rst:2238 msgid "" "This method returns a ctypes type instance using the memory specified by " "*address* which must be an integer." msgstr "" -#: library/ctypes.rst:2232 +#: library/ctypes.rst:2243 msgid "" "This method, and others that indirectly call this method, raises an :ref:" "`auditing event ` ``ctypes.cdata`` with argument ``address``." msgstr "" -#: library/ctypes.rst:2238 +#: library/ctypes.rst:2249 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 " @@ -3210,25 +3227,25 @@ msgid "" "object that can be used as a function call parameter." msgstr "" -#: library/ctypes.rst:2243 +#: library/ctypes.rst:2254 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:2249 +#: library/ctypes.rst:2260 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:2253 +#: library/ctypes.rst:2264 msgid "Common instance variables of ctypes data types:" msgstr "" -#: library/ctypes.rst:2257 +#: library/ctypes.rst:2268 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:" @@ -3236,13 +3253,13 @@ msgid "" "block." msgstr "" -#: library/ctypes.rst:2264 +#: library/ctypes.rst:2275 msgid "" "This read-only variable is true when the ctypes data instance has allocated " "the memory block itself, false otherwise." msgstr "" -#: library/ctypes.rst:2269 +#: library/ctypes.rst:2280 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. " @@ -3250,7 +3267,7 @@ msgid "" "dictionary." msgstr "" -#: library/ctypes.rst:2282 +#: library/ctypes.rst:2293 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 " @@ -3259,11 +3276,11 @@ msgid "" "types that are not and do not contain pointers can now be pickled." msgstr "" -#: library/ctypes.rst:2288 +#: library/ctypes.rst:2299 msgid "Instances have a single attribute:" msgstr "" -#: library/ctypes.rst:2292 +#: library/ctypes.rst:2303 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 " @@ -3271,7 +3288,7 @@ msgid "" "bytes object or string." msgstr "" -#: library/ctypes.rst:2297 +#: library/ctypes.rst:2308 msgid "" "When the ``value`` attribute is retrieved from a ctypes instance, usually a " "new object is returned each time. :mod:`ctypes` does *not* implement " @@ -3279,7 +3296,7 @@ msgid "" "true for all other ctypes object instances." msgstr "" -#: library/ctypes.rst:2303 +#: library/ctypes.rst:2314 msgid "" "Fundamental data types, when returned as foreign function call results, or, " "for example, by retrieving structure field members or array items, are " @@ -3289,7 +3306,7 @@ msgid "" "instance." msgstr "" -#: library/ctypes.rst:2311 +#: library/ctypes.rst:2322 msgid "" "Subclasses of fundamental data types do *not* inherit this behavior. So, if " "a foreign functions :attr:`!restype` is a subclass of :class:`c_void_p`, you " @@ -3297,25 +3314,25 @@ msgid "" "you can get the value of the pointer by accessing the ``value`` attribute." msgstr "" -#: library/ctypes.rst:2316 +#: library/ctypes.rst:2327 msgid "These are the fundamental ctypes data types:" msgstr "" -#: library/ctypes.rst:2320 +#: library/ctypes.rst:2331 msgid "" "Represents the C :c:expr:`signed char` datatype, and interprets the value as " "small integer. The constructor accepts an optional integer initializer; no " "overflow checking is done." msgstr "" -#: library/ctypes.rst:2327 +#: library/ctypes.rst:2338 msgid "" "Represents the C :c:expr:`char` datatype, and interprets the value as a " "single character. The constructor accepts an optional string initializer, " "the length of the string must be exactly one character." msgstr "" -#: library/ctypes.rst:2334 +#: library/ctypes.rst:2345 msgid "" "Represents the C :c:expr:`char *` datatype when it points to a zero-" "terminated string. For a general character pointer that may also point to " @@ -3323,182 +3340,182 @@ msgid "" "integer address, or a bytes object." msgstr "" -#: library/ctypes.rst:2342 +#: library/ctypes.rst:2353 msgid "" "Represents the C :c:expr:`double` datatype. The constructor accepts an " "optional float initializer." msgstr "" -#: library/ctypes.rst:2348 +#: library/ctypes.rst:2359 msgid "" "Represents the C :c:expr:`long double` datatype. The constructor accepts an " "optional float initializer. On platforms where ``sizeof(long double) == " "sizeof(double)`` it is an alias to :class:`c_double`." msgstr "" -#: library/ctypes.rst:2354 +#: library/ctypes.rst:2365 msgid "" "Represents the C :c:expr:`float` datatype. The constructor accepts an " "optional float initializer." msgstr "" -#: library/ctypes.rst:2360 +#: library/ctypes.rst:2371 msgid "" "Represents the C :c:expr:`signed int` datatype. The constructor accepts an " "optional integer initializer; no overflow checking is done. On platforms " "where ``sizeof(int) == sizeof(long)`` it is an alias to :class:`c_long`." msgstr "" -#: library/ctypes.rst:2367 +#: library/ctypes.rst:2378 msgid "" "Represents the C 8-bit :c:expr:`signed int` datatype. It is an alias for :" "class:`c_byte`." msgstr "" -#: library/ctypes.rst:2373 +#: library/ctypes.rst:2384 msgid "" "Represents the C 16-bit :c:expr:`signed int` datatype. Usually an alias " "for :class:`c_short`." msgstr "" -#: library/ctypes.rst:2379 +#: library/ctypes.rst:2390 msgid "" "Represents the C 32-bit :c:expr:`signed int` datatype. Usually an alias " "for :class:`c_int`." msgstr "" -#: library/ctypes.rst:2385 +#: library/ctypes.rst:2396 msgid "" "Represents the C 64-bit :c:expr:`signed int` datatype. Usually an alias " "for :class:`c_longlong`." msgstr "" -#: library/ctypes.rst:2391 +#: library/ctypes.rst:2402 msgid "" "Represents the C :c:expr:`signed long` datatype. The constructor accepts an " "optional integer initializer; no overflow checking is done." msgstr "" -#: library/ctypes.rst:2397 +#: library/ctypes.rst:2408 msgid "" "Represents the C :c:expr:`signed long long` datatype. The constructor " "accepts an optional integer initializer; no overflow checking is done." msgstr "" -#: library/ctypes.rst:2403 +#: library/ctypes.rst:2414 msgid "" "Represents the C :c:expr:`signed short` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" -#: library/ctypes.rst:2409 +#: library/ctypes.rst:2420 msgid "Represents the C :c:type:`size_t` datatype." msgstr "" -#: library/ctypes.rst:2414 +#: library/ctypes.rst:2425 msgid "Represents the C :c:type:`ssize_t` datatype." msgstr "" -#: library/ctypes.rst:2421 +#: library/ctypes.rst:2432 msgid "Represents the C :c:type:`time_t` datatype." msgstr "" -#: library/ctypes.rst:2428 +#: library/ctypes.rst:2439 msgid "" "Represents the C :c:expr:`unsigned char` datatype, it interprets the value " "as small integer. The constructor accepts an optional integer initializer; " "no overflow checking is done." msgstr "" -#: library/ctypes.rst:2435 +#: library/ctypes.rst:2446 msgid "" "Represents the C :c:expr:`unsigned int` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done. On platforms " "where ``sizeof(int) == sizeof(long)`` it is an alias for :class:`c_ulong`." msgstr "" -#: library/ctypes.rst:2442 +#: library/ctypes.rst:2453 msgid "" "Represents the C 8-bit :c:expr:`unsigned int` datatype. It is an alias for :" "class:`c_ubyte`." msgstr "" -#: library/ctypes.rst:2448 +#: library/ctypes.rst:2459 msgid "" "Represents the C 16-bit :c:expr:`unsigned int` datatype. Usually an alias " "for :class:`c_ushort`." msgstr "" -#: library/ctypes.rst:2454 +#: library/ctypes.rst:2465 msgid "" "Represents the C 32-bit :c:expr:`unsigned int` datatype. Usually an alias " "for :class:`c_uint`." msgstr "" -#: library/ctypes.rst:2460 +#: library/ctypes.rst:2471 msgid "" "Represents the C 64-bit :c:expr:`unsigned int` datatype. Usually an alias " "for :class:`c_ulonglong`." msgstr "" -#: library/ctypes.rst:2466 +#: library/ctypes.rst:2477 msgid "" "Represents the C :c:expr:`unsigned long` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" -#: library/ctypes.rst:2472 +#: library/ctypes.rst:2483 msgid "" "Represents the C :c:expr:`unsigned long long` datatype. The constructor " "accepts an optional integer initializer; no overflow checking is done." msgstr "" -#: library/ctypes.rst:2478 +#: library/ctypes.rst:2489 msgid "" "Represents the C :c:expr:`unsigned short` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" -#: library/ctypes.rst:2484 +#: library/ctypes.rst:2495 msgid "" "Represents the C :c:expr:`void *` type. The value is represented as " "integer. The constructor accepts an optional integer initializer." msgstr "" -#: library/ctypes.rst:2490 +#: library/ctypes.rst:2501 msgid "" "Represents the C :c:type:`wchar_t` datatype, and interprets the value as a " "single character unicode string. The constructor accepts an optional string " "initializer, the length of the string must be exactly one character." msgstr "" -#: library/ctypes.rst:2497 +#: library/ctypes.rst:2508 msgid "" "Represents the C :c:expr:`wchar_t *` datatype, which must be a pointer to a " "zero-terminated wide character string. The constructor accepts an integer " "address, or a string." msgstr "" -#: library/ctypes.rst:2504 +#: library/ctypes.rst:2515 msgid "" "Represent the C :c:expr:`bool` datatype (more accurately, :c:expr:`_Bool` " "from C99). Its value can be ``True`` or ``False``, and the constructor " "accepts any object that has a truth value." msgstr "" -#: library/ctypes.rst:2511 +#: library/ctypes.rst:2522 msgid "" "Represents a :c:type:`!HRESULT` value, which contains success or error " "information for a function or method call." msgstr "" -#: library/ctypes.rst:2519 +#: library/ctypes.rst:2530 msgid "" "Represents the C :c:expr:`PyObject *` datatype. Calling this without an " "argument creates a ``NULL`` :c:expr:`PyObject *` pointer." msgstr "" -#: library/ctypes.rst:2522 +#: library/ctypes.rst:2533 msgid "" "The :mod:`!ctypes.wintypes` module provides quite some other Windows " "specific data types, for example :c:type:`!HWND`, :c:type:`!WPARAM`, or :c:" @@ -3506,41 +3523,41 @@ msgid "" "are also defined." msgstr "" -#: library/ctypes.rst:2530 +#: library/ctypes.rst:2541 msgid "Structured data types" msgstr "" -#: library/ctypes.rst:2535 +#: library/ctypes.rst:2546 msgid "Abstract base class for unions in native byte order." msgstr "" -#: library/ctypes.rst:2540 +#: library/ctypes.rst:2551 msgid "Abstract base class for unions in *big endian* byte order." msgstr "" -#: library/ctypes.rst:2546 +#: library/ctypes.rst:2557 msgid "Abstract base class for unions in *little endian* byte order." msgstr "" -#: library/ctypes.rst:2552 +#: library/ctypes.rst:2563 msgid "Abstract base class for structures in *big endian* byte order." msgstr "" -#: library/ctypes.rst:2557 +#: library/ctypes.rst:2568 msgid "Abstract base class for structures in *little endian* byte order." msgstr "" -#: library/ctypes.rst:2559 +#: library/ctypes.rst:2570 msgid "" "Structures and unions with non-native byte order cannot contain pointer type " "fields, or any other data types containing pointer type fields." msgstr "" -#: library/ctypes.rst:2565 +#: library/ctypes.rst:2576 msgid "Abstract base class for structures in *native* byte order." msgstr "" -#: library/ctypes.rst:2567 +#: library/ctypes.rst:2578 msgid "" "Concrete structure and union types must be created by subclassing one of " "these types, and at least define a :attr:`_fields_` class variable. :mod:" @@ -3548,34 +3565,34 @@ msgid "" "the fields by direct attribute accesses. These are the" msgstr "" -#: library/ctypes.rst:2575 +#: library/ctypes.rst:2586 msgid "" "A sequence defining the structure fields. The items must be 2-tuples or 3-" "tuples. The first item is the name of the field, the second item specifies " "the type of the field; it can be any ctypes data type." msgstr "" -#: library/ctypes.rst:2579 +#: library/ctypes.rst:2590 msgid "" "For integer type fields like :class:`c_int`, a third optional item can be " "given. It must be a small positive integer defining the bit width of the " "field." msgstr "" -#: library/ctypes.rst:2583 +#: library/ctypes.rst:2594 msgid "" "Field names must be unique within one structure or union. This is not " "checked, only one field can be accessed when names are repeated." msgstr "" -#: library/ctypes.rst:2586 +#: library/ctypes.rst:2597 msgid "" "It is possible to define the :attr:`_fields_` class variable *after* the " "class statement that defines the Structure subclass, this allows creating " "data types that directly or indirectly reference themselves::" msgstr "" -#: library/ctypes.rst:2590 +#: library/ctypes.rst:2601 msgid "" "class List(Structure):\n" " pass\n" @@ -3584,7 +3601,7 @@ msgid "" " ]" msgstr "" -#: library/ctypes.rst:2596 +#: library/ctypes.rst:2607 msgid "" "The :attr:`_fields_` class variable must, however, be defined before the " "type is first used (an instance is created, :func:`sizeof` is called on it, " @@ -3592,14 +3609,14 @@ msgid "" "raise an AttributeError." msgstr "" -#: library/ctypes.rst:2601 +#: library/ctypes.rst:2612 msgid "" "It is possible to define sub-subclasses of structure types, they inherit the " "fields of the base class plus the :attr:`_fields_` defined in the sub-" "subclass, if any." msgstr "" -#: library/ctypes.rst:2608 +#: library/ctypes.rst:2619 msgid "" "An optional small integer that allows overriding the alignment of structure " "fields in the instance. :attr:`_pack_` must already be defined when :attr:" @@ -3607,21 +3624,21 @@ msgid "" "attribute to 0 is the same as not setting it at all." msgstr "" -#: library/ctypes.rst:2616 +#: library/ctypes.rst:2627 msgid "" "An optional small integer that allows overriding the alignment of the " "structure when being packed or unpacked to/from memory. Setting this " "attribute to 0 is the same as not setting it at all." msgstr "" -#: library/ctypes.rst:2624 +#: library/ctypes.rst:2635 msgid "" "An optional sequence that lists the names of unnamed (anonymous) fields. :" "attr:`_anonymous_` must be already defined when :attr:`_fields_` is " "assigned, otherwise it will have no effect." msgstr "" -#: library/ctypes.rst:2628 +#: library/ctypes.rst:2639 msgid "" "The fields listed in this variable must be structure or union type fields. :" "mod:`ctypes` will create descriptors in the structure type that allows " @@ -3629,11 +3646,11 @@ msgid "" "structure or union field." msgstr "" -#: library/ctypes.rst:2633 +#: library/ctypes.rst:2644 msgid "Here is an example type (Windows)::" msgstr "" -#: library/ctypes.rst:2635 +#: library/ctypes.rst:2646 msgid "" "class _U(Union):\n" " _fields_ = [(\"lptdesc\", POINTER(TYPEDESC)),\n" @@ -3646,7 +3663,7 @@ msgid "" " (\"vt\", VARTYPE)]" msgstr "" -#: library/ctypes.rst:2646 +#: library/ctypes.rst:2657 msgid "" "The ``TYPEDESC`` structure describes a COM data type, the ``vt`` field " "specifies which one of the union fields is valid. Since the ``u`` field is " @@ -3656,7 +3673,7 @@ msgid "" "temporary union instance::" msgstr "" -#: library/ctypes.rst:2653 +#: library/ctypes.rst:2664 msgid "" "td = TYPEDESC()\n" "td.vt = VT_PTR\n" @@ -3664,7 +3681,7 @@ msgid "" "td.u.lptdesc = POINTER(some_type)" msgstr "" -#: library/ctypes.rst:2658 +#: library/ctypes.rst:2669 msgid "" "It is possible to define sub-subclasses of structures, they inherit the " "fields of the base class. If the subclass definition has a separate :attr:" @@ -3672,7 +3689,7 @@ msgid "" "of the base class." msgstr "" -#: library/ctypes.rst:2663 +#: library/ctypes.rst:2674 msgid "" "Structure and union constructors accept both positional and keyword " "arguments. Positional arguments are used to initialize member fields in the " @@ -3682,15 +3699,15 @@ msgid "" "names not present in :attr:`_fields_`." msgstr "" -#: library/ctypes.rst:2674 +#: library/ctypes.rst:2685 msgid "Arrays and pointers" msgstr "" -#: library/ctypes.rst:2678 +#: library/ctypes.rst:2689 msgid "Abstract base class for arrays." msgstr "" -#: library/ctypes.rst:2680 +#: library/ctypes.rst:2691 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 " @@ -3700,46 +3717,50 @@ msgid "" "an :class:`Array`." msgstr "" -#: library/ctypes.rst:2690 +#: library/ctypes.rst:2698 +msgid "Arrays are :ref:`generic ` over the type of their elements." +msgstr "" + +#: library/ctypes.rst:2703 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:2697 +#: library/ctypes.rst:2710 msgid "Specifies the type of each element in the array." msgstr "" -#: library/ctypes.rst:2700 +#: library/ctypes.rst:2713 msgid "" "Array subclass constructors accept positional arguments, used to initialize " "the elements in order." msgstr "" -#: library/ctypes.rst:2705 +#: library/ctypes.rst:2718 msgid "" "Create an array. Equivalent to ``type * length``, where *type* is a :mod:" "`ctypes` data type and *length* an integer." msgstr "" -#: library/ctypes.rst:2709 +#: library/ctypes.rst:2722 msgid "" "This function is :term:`soft deprecated` in favor of multiplication. There " "are no plans to remove it." msgstr "" -#: library/ctypes.rst:2715 +#: library/ctypes.rst:2728 msgid "Private, abstract base class for pointers." msgstr "" -#: library/ctypes.rst:2717 +#: library/ctypes.rst:2730 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:2721 +#: library/ctypes.rst:2734 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 :" @@ -3748,11 +3769,11 @@ msgid "" "probably crash with an access violation (if you're lucky)." msgstr "" -#: library/ctypes.rst:2731 +#: library/ctypes.rst:2744 msgid "Specifies the type pointed to." msgstr "" -#: library/ctypes.rst:2735 +#: library/ctypes.rst:2748 msgid "" "Returns the object to which to pointer points. Assigning to this attribute " "changes the pointer to point to the assigned object." diff --git a/library/curses.ascii.po b/library/curses.ascii.po index 371ebe384..67dafc1ca 100644 --- a/library/curses.ascii.po +++ b/library/curses.ascii.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -210,7 +210,7 @@ msgid "Checks for a character value that fits in the 7-bit ASCII set." msgstr "" #: library/curses.ascii.rst:120 -msgid "Checks for an ASCII whitespace character; space or horizontal tab." +msgid "Checks for an ASCII blank character; space or horizontal tab." msgstr "" #: library/curses.ascii.rst:125 @@ -225,7 +225,7 @@ msgid "" msgstr "" #: library/curses.ascii.rst:136 -msgid "Checks for ASCII any printable character except space." +msgid "Checks for any ASCII printable character except space." msgstr "" #: library/curses.ascii.rst:141 @@ -238,7 +238,7 @@ msgstr "" #: library/curses.ascii.rst:151 msgid "" -"Checks for any printable ASCII character which is not a space or an " +"Checks for any ASCII printable character which is not a space or an " "alphanumeric character." msgstr "" @@ -259,56 +259,58 @@ msgid "" msgstr "" #: library/curses.ascii.rst:174 -msgid "Checks for an ASCII control character (ordinal values 0 to 31)." +msgid "" +"Checks for an ASCII control character (ordinal values 0 to 31). Unlike :" +"func:`iscntrl`, this does not include the delete character (0x7f)." msgstr "" -#: library/curses.ascii.rst:179 +#: library/curses.ascii.rst:180 msgid "Checks for a non-ASCII character (ordinal values 0x80 and above)." msgstr "" -#: library/curses.ascii.rst:181 +#: library/curses.ascii.rst:182 msgid "" "These functions accept either integers or single-character strings; when the " "argument is a string, it is first converted using the built-in function :" "func:`ord`." msgstr "" -#: library/curses.ascii.rst:184 +#: library/curses.ascii.rst:185 msgid "" "Note that all these functions check ordinal bit values derived from the " "character of the string you pass in; they do not actually know anything " "about the host machine's character encoding." msgstr "" -#: library/curses.ascii.rst:188 +#: library/curses.ascii.rst:189 msgid "" "The following two functions take either a single-character string or integer " "byte value; they return a value of the same type." msgstr "" -#: library/curses.ascii.rst:194 +#: library/curses.ascii.rst:195 msgid "Return the ASCII value corresponding to the low 7 bits of *c*." msgstr "" -#: library/curses.ascii.rst:199 +#: library/curses.ascii.rst:200 msgid "" "Return the control character corresponding to the given character (the " "character bit value is bitwise-anded with 0x1f)." msgstr "" -#: library/curses.ascii.rst:205 +#: library/curses.ascii.rst:206 msgid "" "Return the 8-bit character corresponding to the given ASCII character (the " "character bit value is bitwise-ored with 0x80)." msgstr "" -#: library/curses.ascii.rst:208 +#: library/curses.ascii.rst:209 msgid "" "The following function takes either a single-character string or integer " "value; it returns a string." msgstr "" -#: library/curses.ascii.rst:218 +#: library/curses.ascii.rst:219 msgid "" "Return a string representation of the ASCII character *c*. If *c* is " "printable, this string is the character itself. If the character is a " @@ -319,21 +321,21 @@ msgid "" "``'!'`` prepended to the result." msgstr "" -#: library/curses.ascii.rst:228 +#: library/curses.ascii.rst:229 msgid "" "A 33-element string array that contains the ASCII mnemonics for the thirty-" "two ASCII control characters from 0 (NUL) to 0x1f (US), in order, plus the " "mnemonic ``SP`` for the space character." msgstr "" -#: library/curses.ascii.rst:212 +#: library/curses.ascii.rst:213 msgid "^ (caret)" msgstr "" -#: library/curses.ascii.rst:212 +#: library/curses.ascii.rst:213 msgid "in curses module" msgstr "" -#: library/curses.ascii.rst:212 +#: library/curses.ascii.rst:213 msgid "! (exclamation)" msgstr "" diff --git a/library/curses.panel.po b/library/curses.panel.po index 5aa2800ef..df784aae4 100644 --- a/library/curses.panel.po +++ b/library/curses.panel.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -33,97 +33,107 @@ msgid "Functions" msgstr "" #: library/curses.panel.rst:21 -msgid "The module :mod:`curses.panel` defines the following functions:" +msgid "The module :mod:`!curses.panel` defines the following exception:" msgstr "" #: library/curses.panel.rst:26 +msgid "Exception raised when a curses panel library function returns an error." +msgstr "" + +#: library/curses.panel.rst:29 +msgid "The module :mod:`!curses.panel` defines the following functions:" +msgstr "" + +#: library/curses.panel.rst:34 msgid "Returns the bottom panel in the panel stack." msgstr "" -#: library/curses.panel.rst:31 +#: library/curses.panel.rst:39 msgid "" -"Returns a panel object, associating it with the given window *win*. Be aware " -"that you need to keep the returned panel object referenced explicitly. If " -"you don't, the panel object is garbage collected and removed from the panel " -"stack." +"Returns a panel object, associating it with the given window *win* and " +"placing the new panel on top of the panel stack. Be aware that you need to " +"keep the returned panel object referenced explicitly. If you don't, the " +"panel object is garbage collected and removed from the panel stack." msgstr "" -#: library/curses.panel.rst:38 +#: library/curses.panel.rst:47 msgid "Returns the top panel in the panel stack." msgstr "" -#: library/curses.panel.rst:43 +#: library/curses.panel.rst:52 msgid "" "Updates the virtual screen after changes in the panel stack. This does not " "call :func:`curses.doupdate`, so you'll have to do this yourself." msgstr "" -#: library/curses.panel.rst:50 -msgid "Panel Objects" +#: library/curses.panel.rst:59 +msgid "Panel objects" msgstr "" -#: library/curses.panel.rst:52 +#: library/curses.panel.rst:79 msgid "" "Panel objects, as returned by :func:`new_panel` above, are windows with a " -"stacking order. There's always a window associated with a panel which " +"stacking order. There's always a window associated with a panel which " "determines the content, while the panel methods are responsible for the " "window's depth in the panel stack." msgstr "" -#: library/curses.panel.rst:57 +#: library/curses.panel.rst:84 msgid "Panel objects have the following methods:" msgstr "" -#: library/curses.panel.rst:62 +#: library/curses.panel.rst:89 msgid "Returns the panel above the current panel." msgstr "" -#: library/curses.panel.rst:67 +#: library/curses.panel.rst:94 msgid "Returns the panel below the current panel." msgstr "" -#: library/curses.panel.rst:72 +#: library/curses.panel.rst:99 msgid "Push the panel to the bottom of the stack." msgstr "" -#: library/curses.panel.rst:77 +#: library/curses.panel.rst:104 msgid "" "Returns ``True`` if the panel is hidden (not visible), ``False`` otherwise." msgstr "" -#: library/curses.panel.rst:82 +#: library/curses.panel.rst:109 msgid "" "Hide the panel. This does not delete the object, it just makes the window on " "screen invisible." msgstr "" -#: library/curses.panel.rst:88 +#: library/curses.panel.rst:115 msgid "Move the panel to the screen coordinates ``(y, x)``." msgstr "" -#: library/curses.panel.rst:93 +#: library/curses.panel.rst:120 msgid "Change the window associated with the panel to the window *win*." msgstr "" -#: library/curses.panel.rst:98 +#: library/curses.panel.rst:125 msgid "" "Set the panel's user pointer to *obj*. This is used to associate an " "arbitrary piece of data with the panel, and can be any Python object." msgstr "" -#: library/curses.panel.rst:104 -msgid "Display the panel (which might have been hidden)." +#: library/curses.panel.rst:131 +msgid "" +"Display the panel (which might have been hidden), placing it on top of the " +"panel stack." msgstr "" -#: library/curses.panel.rst:109 +#: library/curses.panel.rst:137 msgid "Push panel to the top of the stack." msgstr "" -#: library/curses.panel.rst:114 +#: library/curses.panel.rst:142 msgid "" "Returns the user pointer for the panel. This might be any Python object." msgstr "" -#: library/curses.panel.rst:119 +#: library/curses.panel.rst:147 msgid "Returns the window object associated with the panel." msgstr "" diff --git a/library/curses.po b/library/curses.po index 5b56ffa00..3c99720f8 100644 --- a/library/curses.po +++ b/library/curses.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,17 +21,17 @@ msgstr "" msgid ":mod:`!curses` --- Terminal handling for character-cell displays" msgstr "" -#: library/curses.rst:12 +#: library/curses.rst:11 msgid "**Source code:** :source:`Lib/curses`" msgstr "" -#: library/curses.rst:16 +#: library/curses.rst:15 msgid "" "The :mod:`curses` module provides an interface to the curses library, the de-" "facto standard for portable advanced terminal handling." msgstr "" -#: library/curses.rst:19 +#: library/curses.rst:18 msgid "" "While curses is most widely used in the Unix environment, versions are " "available for Windows, DOS, and possibly other systems as well. This " @@ -49,80 +49,80 @@ msgid "" "availability>` or :ref:`WebAssembly platforms `." msgstr "" -#: library/curses.rst:28 +#: library/curses.rst:29 msgid "" "Whenever the documentation mentions a *character* it can be specified as an " "integer, a one-character Unicode string or a one-byte byte string." msgstr "" -#: library/curses.rst:31 +#: library/curses.rst:32 msgid "" "Whenever the documentation mentions a *character string* it can be specified " "as a Unicode string or a byte string." msgstr "" -#: library/curses.rst:36 +#: library/curses.rst:37 msgid "Module :mod:`curses.ascii`" msgstr "" -#: library/curses.rst:37 +#: library/curses.rst:38 msgid "" "Utilities for working with ASCII characters, regardless of your locale " "settings." msgstr "" -#: library/curses.rst:39 +#: library/curses.rst:40 msgid "Module :mod:`curses.panel`" msgstr "" -#: library/curses.rst:40 +#: library/curses.rst:41 msgid "A panel stack extension that adds depth to curses windows." msgstr "" -#: library/curses.rst:42 +#: library/curses.rst:43 msgid "Module :mod:`curses.textpad`" msgstr "" -#: library/curses.rst:43 +#: library/curses.rst:44 msgid "" "Editable text widget for curses supporting :program:`Emacs`\\ -like " "bindings." msgstr "" -#: library/curses.rst:45 +#: library/curses.rst:46 msgid ":ref:`curses-howto`" msgstr "" -#: library/curses.rst:46 +#: library/curses.rst:47 msgid "" "Tutorial material on using curses with Python, by Andrew Kuchling and Eric " "Raymond." msgstr "" -#: library/curses.rst:53 +#: library/curses.rst:54 msgid "Functions" msgstr "" -#: library/curses.rst:55 +#: library/curses.rst:56 msgid "The module :mod:`curses` defines the following exception:" msgstr "" -#: library/curses.rst:60 +#: library/curses.rst:61 msgid "Exception raised when a curses library function returns an error." msgstr "" -#: library/curses.rst:64 +#: library/curses.rst:65 msgid "" "Whenever *x* or *y* arguments to a function or a method are optional, they " "default to the current cursor location. Whenever *attr* is optional, it " "defaults to :const:`A_NORMAL`." msgstr "" -#: library/curses.rst:68 +#: library/curses.rst:69 msgid "The module :mod:`curses` defines the following functions:" msgstr "" -#: library/curses.rst:73 +#: library/curses.rst:74 msgid "" "Return the output speed of the terminal in bits per second. On software " "terminal emulators it will have a fixed high value. Included for historical " @@ -130,17 +130,17 @@ msgid "" "and occasionally to change interfaces depending on the line speed." msgstr "" -#: library/curses.rst:81 +#: library/curses.rst:82 msgid "Emit a short attention sound." msgstr "" -#: library/curses.rst:86 +#: library/curses.rst:87 msgid "" "Return ``True`` or ``False``, depending on whether the programmer can change " "the colors displayed by the terminal." msgstr "" -#: library/curses.rst:92 +#: library/curses.rst:93 msgid "" "Enter cbreak mode. In cbreak mode (sometimes called \"rare\" mode) normal " "tty line buffering is turned off and characters are available to be read one " @@ -150,16 +150,16 @@ msgid "" "terminal in cbreak mode." msgstr "" -#: library/curses.rst:101 +#: library/curses.rst:102 msgid "" "Return the intensity of the red, green, and blue (RGB) components in the " "color *color_number*, which must be between ``0`` and ``COLORS - 1``. " "Return a 3-tuple, containing the R,G,B values for the given color, which " "will be between ``0`` (no component) and ``1000`` (maximum amount of " -"component)." +"component). Raise an exception if the color is not supported." msgstr "" -#: library/curses.rst:109 +#: library/curses.rst:111 msgid "" "Return the attribute value for displaying text in the specified color pair. " "Only the first 256 color pairs are supported. This attribute value can be " @@ -168,7 +168,7 @@ msgid "" "function." msgstr "" -#: library/curses.rst:118 +#: library/curses.rst:120 msgid "" "Set the cursor state. *visibility* can be set to ``0``, ``1``, or ``2``, " "for invisible, normal, or very visible. If the terminal supports the " @@ -177,7 +177,7 @@ msgid "" "and the \"very visible\" mode is a block cursor." msgstr "" -#: library/curses.rst:127 +#: library/curses.rst:129 msgid "" "Save the current terminal mode as the \"program\" mode, the mode when the " "running program is using curses. (Its counterpart is the \"shell\" mode, " @@ -185,7 +185,7 @@ msgid "" "`reset_prog_mode` will restore this mode." msgstr "" -#: library/curses.rst:135 +#: library/curses.rst:137 msgid "" "Save the current terminal mode as the \"shell\" mode, the mode when the " "running program is not using curses. (Its counterpart is the \"program\" " @@ -193,19 +193,19 @@ msgid "" "func:`reset_shell_mode` will restore this mode." msgstr "" -#: library/curses.rst:143 +#: library/curses.rst:145 msgid "Insert an *ms* millisecond pause in output." msgstr "" -#: library/curses.rst:148 +#: library/curses.rst:150 msgid "" "Update the physical screen. The curses library keeps two data structures, " "one representing the current physical screen contents and a virtual screen " -"representing the desired next state. The :func:`doupdate` ground updates " +"representing the desired next state. The :func:`doupdate` function updates " "the physical screen to match the virtual screen." msgstr "" -#: library/curses.rst:153 +#: library/curses.rst:155 msgid "" "The virtual screen may be updated by a :meth:`~window.noutrefresh` call " "after write operations such as :meth:`~window.addstr` have been performed on " @@ -216,48 +216,48 @@ msgid "" "func:`!doupdate`." msgstr "" -#: library/curses.rst:163 +#: library/curses.rst:165 msgid "" "Enter echo mode. In echo mode, each character input is echoed to the screen " "as it is entered." msgstr "" -#: library/curses.rst:169 +#: library/curses.rst:171 msgid "De-initialize the library, and return terminal to normal status." msgstr "" -#: library/curses.rst:174 +#: library/curses.rst:176 msgid "" "Return the user's current erase character as a one-byte bytes object. Under " "Unix operating systems this is a property of the controlling tty of the " "curses program, and is not set by the curses library itself." msgstr "" -#: library/curses.rst:181 +#: library/curses.rst:183 msgid "" "The :func:`.filter` routine, if used, must be called before :func:`initscr` " -"is called. The effect is that, during those calls, :envvar:`LINES` is set " -"to ``1``; the capabilities ``clear``, ``cup``, ``cud``, ``cud1``, ``cuu1``, " -"``cuu``, ``vpa`` are disabled; and the ``home`` string is set to the value " -"of ``cr``. The effect is that the cursor is confined to the current line, " -"and so are screen updates. This may be used for enabling character-at-a-" -"time line editing without touching the rest of the screen." +"is called. The effect is that, during the initialization, :envvar:`LINES` " +"is set to ``1``; the capabilities ``clear``, ``cup``, ``cud``, ``cud1``, " +"``cuu1``, ``cuu``, ``vpa`` are disabled; and the ``home`` string is set to " +"the value of ``cr``. The effect is that the cursor is confined to the " +"current line, and so are screen updates. This may be used for enabling " +"character-at-a-time line editing without touching the rest of the screen." msgstr "" -#: library/curses.rst:191 +#: library/curses.rst:193 msgid "" "Flash the screen. That is, change it to reverse-video and then change it " "back in a short interval. Some people prefer such as 'visible bell' to the " "audible attention signal produced by :func:`beep`." msgstr "" -#: library/curses.rst:198 +#: library/curses.rst:200 msgid "" "Flush all input buffers. This throws away any typeahead that has been " "typed by the user and has not yet been processed by the program." msgstr "" -#: library/curses.rst:204 +#: library/curses.rst:206 msgid "" "After :meth:`~window.getch` returns :const:`KEY_MOUSE` to signal a mouse " "event, this method should be called to retrieve the queued mouse event, " @@ -272,51 +272,52 @@ msgid "" "const:`BUTTON_ALT`." msgstr "" -#: library/curses.rst:1777 +#: library/curses.rst:1836 msgid "" "The ``BUTTON5_*`` constants are now exposed if they are provided by the " "underlying curses library." msgstr "" -#: library/curses.rst:222 +#: library/curses.rst:224 msgid "" "Return the current coordinates of the virtual screen cursor as a tuple ``(y, " "x)``. If :meth:`leaveok ` is currently ``True``, then " "return ``(-1, -1)``." msgstr "" -#: library/curses.rst:228 +#: library/curses.rst:230 msgid "" -"Read window related data stored in the file by an earlier :func:`window." +"Read window-related data stored in the file by an earlier :meth:`window." "putwin` call. The routine then creates and initializes a new window using " -"that data, returning the new window object." +"that data, returning the new window object. The *file* argument must be a " +"file object opened for reading in binary mode." msgstr "" -#: library/curses.rst:235 +#: library/curses.rst:238 msgid "" "Return ``True`` if the terminal can display colors; otherwise, return " "``False``." msgstr "" -#: library/curses.rst:239 +#: library/curses.rst:242 msgid "" "Return ``True`` if the module supports extended colors; otherwise, return " "``False``. Extended color support allows more than 256 color pairs for " -"terminals that support more than 16 colors (e.g. xterm-256color)." +"terminals that support more than 16 colors (for example, xterm-256color)." msgstr "" -#: library/curses.rst:243 +#: library/curses.rst:246 msgid "Extended color support requires ncurses version 6.1 or later." msgstr "" -#: library/curses.rst:249 +#: library/curses.rst:252 msgid "" "Return ``True`` if the terminal has insert- and delete-character " "capabilities. This function is included for historical reasons only, as all " "modern software terminal emulators have such capabilities." msgstr "" -#: library/curses.rst:256 +#: library/curses.rst:259 msgid "" "Return ``True`` if the terminal has insert- and delete-line capabilities, or " "can simulate them using scrolling regions. This function is included for " @@ -324,13 +325,13 @@ msgid "" "capabilities." msgstr "" -#: library/curses.rst:264 +#: library/curses.rst:267 msgid "" "Take a key value *ch*, and return ``True`` if the current terminal type " "recognizes a key with that value." msgstr "" -#: library/curses.rst:270 +#: library/curses.rst:273 msgid "" "Used for half-delay mode, which is similar to cbreak mode in that characters " "typed by the user are immediately available to the program. However, after " @@ -339,7 +340,7 @@ msgid "" "``255``. Use :func:`nocbreak` to leave half-delay mode." msgstr "" -#: library/curses.rst:279 +#: library/curses.rst:282 msgid "" "Change the definition of a color, taking the number of the color to be " "changed followed by three RGB values (for the amounts of red, green, and " @@ -351,7 +352,7 @@ msgid "" "``True``." msgstr "" -#: library/curses.rst:290 +#: library/curses.rst:293 msgid "" "Change the definition of a color-pair. It takes three arguments: the number " "of the color-pair to be changed, the foreground color number, and the " @@ -364,31 +365,43 @@ msgid "" "definition." msgstr "" -#: library/curses.rst:303 +#: library/curses.rst:306 msgid "" "Initialize the library. Return a :ref:`window ` " "object which represents the whole screen." msgstr "" -#: library/curses.rst:308 +#: library/curses.rst:309 +msgid "" +"See :func:`setupterm` for a caveat about calling it before this function." +msgstr "" + +#: library/curses.rst:313 msgid "" "If there is an error opening the terminal, the underlying curses library may " "cause the interpreter to exit." msgstr "" -#: library/curses.rst:314 +#: library/curses.rst:319 +msgid "" +"If *flag* is ``True``, pressing an interrupt key (interrupt, break, or quit) " +"will flush all output in the terminal driver queue. If *flag* is ``False``, " +"no flushing is done." +msgstr "" + +#: library/curses.rst:326 msgid "" "Return ``True`` if :func:`resize_term` would modify the window structure, " "``False`` otherwise." msgstr "" -#: library/curses.rst:320 +#: library/curses.rst:332 msgid "" "Return ``True`` if :func:`endwin` has been called (that is, the curses " "library has been deinitialized)." msgstr "" -#: library/curses.rst:326 +#: library/curses.rst:338 msgid "" "Return the name of the key numbered *k* as a bytes object. The name of a " "key generating printable ASCII character is the key's character. The name " @@ -399,54 +412,59 @@ msgid "" "character." msgstr "" -#: library/curses.rst:336 +#: library/curses.rst:345 +msgid "Raise a :exc:`ValueError` if *k* is negative." +msgstr "" + +#: library/curses.rst:350 msgid "" "Return the user's current line kill character as a one-byte bytes object. " "Under Unix operating systems this is a property of the controlling tty of " "the curses program, and is not set by the curses library itself." msgstr "" -#: library/curses.rst:343 +#: library/curses.rst:357 msgid "" "Return a bytes object containing the terminfo long name field describing the " "current terminal. The maximum length of a verbose description is 128 " "characters. It is defined only after the call to :func:`initscr`." msgstr "" -#: library/curses.rst:350 +#: library/curses.rst:364 msgid "" "If *flag* is ``True``, allow 8-bit characters to be input. If *flag* is " "``False``, allow only 7-bit chars." msgstr "" -#: library/curses.rst:356 +#: library/curses.rst:370 msgid "" "Set the maximum time in milliseconds that can elapse between press and " "release events in order for them to be recognized as a click, and return the " -"previous interval value. The default value is 200 milliseconds, or one " -"fifth of a second." +"previous interval value. The default value is 166 milliseconds, or one " +"sixth of a second. Use a negative *interval* to obtain the interval value " +"without changing it." msgstr "" -#: library/curses.rst:363 +#: library/curses.rst:378 msgid "" "Set the mouse events to be reported, and return a tuple ``(availmask, " "oldmask)``. *availmask* indicates which of the specified mouse events can " "be reported; on complete failure it returns ``0``. *oldmask* is the " -"previous value of the given window's mouse event mask. If this function is " -"never called, no mouse events are ever reported." +"previous value of the mouse event mask. If this function is never called, " +"no mouse events are ever reported." msgstr "" -#: library/curses.rst:372 +#: library/curses.rst:387 msgid "Sleep for *ms* milliseconds." msgstr "" -#: library/curses.rst:377 +#: library/curses.rst:392 msgid "" "Create and return a pointer to a new pad data structure with the given " "number of lines and columns. Return a pad as a window object." msgstr "" -#: library/curses.rst:380 +#: library/curses.rst:395 msgid "" "A pad is like a window, except that it is not restricted by the screen size, " "and is not necessarily associated with a particular part of the screen. " @@ -457,40 +475,44 @@ msgid "" "arguments to specify the part of the pad to be displayed and the location on " "the screen to be used for the display. The arguments are *pminrow*, " "*pmincol*, *sminrow*, *smincol*, *smaxrow*, *smaxcol*; the *p* arguments " -"refer to the upper left corner of the pad region to be displayed and the *s* " +"refer to the upper-left corner of the pad region to be displayed and the *s* " "arguments define a clipping box on the screen within which the pad region is " "to be displayed." msgstr "" -#: library/curses.rst:396 +#: library/curses.rst:411 msgid "" "Return a new :ref:`window `, whose left-upper corner " "is at ``(begin_y, begin_x)``, and whose height/width is *nlines*/*ncols*." msgstr "" -#: library/curses.rst:399 +#: library/curses.rst:414 msgid "" "By default, the window will extend from the specified position to the lower " "right corner of the screen." msgstr "" -#: library/curses.rst:405 +#: library/curses.rst:420 msgid "" "Enter newline mode. This mode translates the return key into newline on " "input, and translates newline into return and line-feed on output. Newline " "mode is initially on." msgstr "" -#: library/curses.rst:412 +#: library/curses.rst:424 +msgid "If *flag* is ``False``, the effect is the same as calling :func:`nonl`." +msgstr "" + +#: library/curses.rst:429 msgid "" "Leave cbreak mode. Return to normal \"cooked\" mode with line buffering." msgstr "" -#: library/curses.rst:417 +#: library/curses.rst:434 msgid "Leave echo mode. Echoing of input characters is turned off." msgstr "" -#: library/curses.rst:422 +#: library/curses.rst:439 msgid "" "Leave newline mode. Disable translation of return into newline on input, " "and disable low-level translation of newline into newline/return on output " @@ -500,7 +522,7 @@ msgid "" "also, it will be able to detect the return key on input." msgstr "" -#: library/curses.rst:432 +#: library/curses.rst:449 msgid "" "When the :func:`!noqiflush` routine is used, normal flush of input and " "output queues associated with the ``INTR``, ``QUIT`` and ``SUSP`` characters " @@ -509,63 +531,67 @@ msgid "" "occurred, after the handler exits." msgstr "" -#: library/curses.rst:440 +#: library/curses.rst:457 msgid "Leave raw mode. Return to normal \"cooked\" mode with line buffering." msgstr "" -#: library/curses.rst:445 +#: library/curses.rst:462 msgid "" "Return a tuple ``(fg, bg)`` containing the colors for the requested color " "pair. The value of *pair_number* must be between ``0`` and ``COLOR_PAIRS - " "1``." msgstr "" -#: library/curses.rst:451 +#: library/curses.rst:468 msgid "" "Return the number of the color-pair set by the attribute value *attr*. :func:" "`color_pair` is the counterpart to this function." msgstr "" -#: library/curses.rst:457 +#: library/curses.rst:474 msgid "" "Equivalent to ``tputs(str, 1, putchar)``; emit the value of a specified " "terminfo capability for the current terminal. Note that the output of :func:" "`putp` always goes to standard output." msgstr "" -#: library/curses.rst:464 +#: library/curses.rst:621 library/curses.rst:641 library/curses.rst:651 +msgid ":func:`setupterm` (or :func:`initscr`) must be called first." +msgstr "" + +#: library/curses.rst:483 msgid "" "If *flag* is ``False``, the effect is the same as calling :func:`noqiflush`. " "If *flag* is ``True``, or no argument is provided, the queues will be " "flushed when these control characters are read." msgstr "" -#: library/curses.rst:471 +#: library/curses.rst:490 msgid "" "Enter raw mode. In raw mode, normal line buffering and processing of " "interrupt, quit, suspend, and flow control keys are turned off; characters " "are presented to curses input functions one by one." msgstr "" -#: library/curses.rst:478 +#: library/curses.rst:497 msgid "" "Restore the terminal to \"program\" mode, as previously saved by :func:" "`def_prog_mode`." msgstr "" -#: library/curses.rst:484 +#: library/curses.rst:503 msgid "" "Restore the terminal to \"shell\" mode, as previously saved by :func:" "`def_shell_mode`." msgstr "" -#: library/curses.rst:490 +#: library/curses.rst:509 msgid "" "Restore the state of the terminal modes to what it was at the last call to :" "func:`savetty`." msgstr "" -#: library/curses.rst:496 +#: library/curses.rst:515 msgid "" "Backend function used by :func:`resizeterm`, performing most of the work; " "when resizing the windows, :func:`resize_term` blank-fills the areas that " @@ -575,47 +601,47 @@ msgid "" "to resize these without additional interaction with the application." msgstr "" -#: library/curses.rst:506 +#: library/curses.rst:525 msgid "" "Resize the standard and current windows to the specified dimensions, and " "adjusts other bookkeeping data used by the curses library that record the " "window dimensions (in particular the SIGWINCH handler)." msgstr "" -#: library/curses.rst:513 +#: library/curses.rst:532 msgid "" "Save the current state of the terminal modes in a buffer, usable by :func:" "`resetty`." msgstr "" -#: library/curses.rst:518 +#: library/curses.rst:537 msgid "Retrieves the value set by :func:`set_escdelay`." msgstr "" -#: library/curses.rst:524 +#: library/curses.rst:543 msgid "" "Sets the number of milliseconds to wait after reading an escape character, " "to distinguish between an individual escape character entered on the " "keyboard from escape sequences sent by cursor and function keys." msgstr "" -#: library/curses.rst:532 +#: library/curses.rst:551 msgid "Retrieves the value set by :func:`set_tabsize`." msgstr "" -#: library/curses.rst:538 +#: library/curses.rst:557 msgid "" "Sets the number of columns used by the curses library when converting a tab " "character to spaces as it adds the tab to a window." msgstr "" -#: library/curses.rst:545 +#: library/curses.rst:564 msgid "" "Set the virtual screen cursor to *y*, *x*. If *y* and *x* are both ``-1``, " "then :meth:`leaveok ` is set ``True``." msgstr "" -#: library/curses.rst:551 +#: library/curses.rst:570 msgid "" "Initialize the terminal. *term* is a string giving the terminal name, or " "``None``; if omitted or ``None``, the value of the :envvar:`TERM` " @@ -624,14 +650,28 @@ msgid "" "descriptor for ``sys.stdout`` will be used." msgstr "" -#: library/curses.rst:560 +#: library/curses.rst:576 +msgid "" +"Raise a :exc:`curses.error` if the terminal could not be found or its " +"terminfo database entry could not be read. If the terminal has already been " +"initialized, this function has no effect." +msgstr "" + +#: library/curses.rst:582 +msgid "" +"Calling :func:`initscr` after :func:`setupterm` leaks the terminal that :" +"func:`setupterm` allocated: the curses library keeps only a single current " +"terminal and does not free the previously allocated one." +msgstr "" + +#: library/curses.rst:590 msgid "" "Must be called if the programmer wants to use colors, and before any other " "color manipulation routine is called. It is good practice to call this " "routine right after :func:`initscr`." msgstr "" -#: library/curses.rst:564 +#: library/curses.rst:594 msgid "" ":func:`start_color` initializes eight basic colors (black, red, green, " "yellow, blue, magenta, cyan, and white), and two global variables in the :" @@ -641,20 +681,20 @@ msgid "" "terminal was just turned on." msgstr "" -#: library/curses.rst:573 +#: library/curses.rst:603 msgid "" "Return a logical OR of all video attributes supported by the terminal. This " "information is useful when a curses program needs complete control over the " "appearance of the screen." msgstr "" -#: library/curses.rst:580 +#: library/curses.rst:610 msgid "" "Return the value of the environment variable :envvar:`TERM`, as a bytes " "object, truncated to 14 characters." msgstr "" -#: library/curses.rst:586 +#: library/curses.rst:616 msgid "" "Return the value of the Boolean capability corresponding to the terminfo " "capability name *capname* as an integer. Return the value ``-1`` if " @@ -662,7 +702,7 @@ msgid "" "from the terminal description." msgstr "" -#: library/curses.rst:594 +#: library/curses.rst:626 msgid "" "Return the value of the numeric capability corresponding to the terminfo " "capability name *capname* as an integer. Return the value ``-2`` if " @@ -670,7 +710,7 @@ msgid "" "from the terminal description." msgstr "" -#: library/curses.rst:602 +#: library/curses.rst:636 msgid "" "Return the value of the string capability corresponding to the terminfo " "capability name *capname* as a bytes object. Return ``None`` if *capname* " @@ -678,21 +718,22 @@ msgid "" "terminal description." msgstr "" -#: library/curses.rst:610 +#: library/curses.rst:646 msgid "" "Instantiate the bytes object *str* with the supplied parameters, where *str* " -"should be a parameterized string obtained from the terminfo database. E.g. " -"``tparm(tigetstr(\"cup\"), 5, 3)`` could result in ``b'\\033[6;4H'``, the " -"exact result depending on terminal type." +"should be a parameterized string obtained from the terminfo database. For " +"example, ``tparm(tigetstr(\"cup\"), 5, 3)`` could result in " +"``b'\\033[6;4H'``, the exact result depending on terminal type. Up to nine " +"integer parameters may be supplied." msgstr "" -#: library/curses.rst:618 +#: library/curses.rst:656 msgid "" "Specify that the file descriptor *fd* be used for typeahead checking. If " "*fd* is ``-1``, then no typeahead checking is done." msgstr "" -#: library/curses.rst:621 +#: library/curses.rst:659 msgid "" "The curses library does \"line-breakout optimization\" by looking for " "typeahead periodically while updating the screen. If input is found, and it " @@ -702,7 +743,7 @@ msgid "" "typeahead checking." msgstr "" -#: library/curses.rst:630 +#: library/curses.rst:668 msgid "" "Return a bytes object which is a printable representation of the character " "*ch*. Control characters are represented as a caret followed by the " @@ -710,35 +751,35 @@ msgid "" "are." msgstr "" -#: library/curses.rst:637 +#: library/curses.rst:675 msgid "Push *ch* so the next :meth:`~window.getch` will return it." msgstr "" -#: library/curses.rst:641 +#: library/curses.rst:679 msgid "Only one *ch* can be pushed before :meth:`!getch` is called." msgstr "" -#: library/curses.rst:646 +#: library/curses.rst:684 msgid "" "Update the :const:`LINES` and :const:`COLS` module variables. Useful for " "detecting manual screen resize." msgstr "" -#: library/curses.rst:654 +#: library/curses.rst:692 msgid "Push *ch* so the next :meth:`~window.get_wch` will return it." msgstr "" -#: library/curses.rst:658 +#: library/curses.rst:696 msgid "Only one *ch* can be pushed before :meth:`!get_wch` is called." msgstr "" -#: library/curses.rst:665 +#: library/curses.rst:703 msgid "" "Push a :const:`KEY_MOUSE` event onto the input queue, associating the given " "state data with it." msgstr "" -#: library/curses.rst:671 +#: library/curses.rst:709 msgid "" "If used, this function should be called before :func:`initscr` or newterm " "are called. When *flag* is ``False``, the values of lines and columns " @@ -748,7 +789,7 @@ msgid "" "to use the window size if :envvar:`LINES` and :envvar:`COLUMNS` are not set)." msgstr "" -#: library/curses.rst:681 +#: library/curses.rst:719 msgid "" "Allow use of default values for colors on terminals supporting this feature. " "Use this to support transparency in your application. The default color is " @@ -757,7 +798,7 @@ msgid "" "*x* to a red foreground color on the default background." msgstr "" -#: library/curses.rst:690 +#: library/curses.rst:728 msgid "" "Initialize curses and call another callable object, *func*, which should be " "the rest of your curses-using application. If the application raises an " @@ -771,50 +812,50 @@ msgid "" "echo, and disables the terminal keypad." msgstr "" -#: library/curses.rst:704 -msgid "Window Objects" +#: library/curses.rst:742 +msgid "Window objects" msgstr "" -#: library/curses.rst:708 +#: library/curses.rst:746 msgid "" "Window objects, as returned by :func:`initscr` and :func:`newwin` above, " "have the following methods and attributes:" msgstr "" -#: library/curses.rst:715 +#: library/curses.rst:753 msgid "" "Paint character *ch* at ``(y, x)`` with attributes *attr*, overwriting any " "character previously painted at that location. By default, the character " "position and attributes are the current settings for the window object." msgstr "" -#: library/curses.rst:721 +#: library/curses.rst:759 msgid "" "Writing outside the window, subwindow, or pad raises a :exc:`curses.error`. " -"Attempting to write to the lower right corner of a window, subwindow, or pad " +"Attempting to write to the lower-right corner of a window, subwindow, or pad " "will cause an exception to be raised after the character is printed." msgstr "" -#: library/curses.rst:729 +#: library/curses.rst:767 msgid "" "Paint at most *n* characters of the character string *str* at ``(y, x)`` " "with attributes *attr*, overwriting anything previously on the display." msgstr "" -#: library/curses.rst:737 +#: library/curses.rst:775 msgid "" "Paint the character string *str* at ``(y, x)`` with attributes *attr*, " "overwriting anything previously on the display." msgstr "" -#: library/curses.rst:742 +#: library/curses.rst:780 msgid "" "Writing outside the window, subwindow, or pad raises :exc:`curses.error`. " -"Attempting to write to the lower right corner of a window, subwindow, or pad " +"Attempting to write to the lower-right corner of a window, subwindow, or pad " "will cause an exception to be raised after the string is printed." msgstr "" -#: library/curses.rst:746 +#: library/curses.rst:784 msgid "" "A `bug in ncurses `_, the backend for " "this Python module, can cause SegFaults when resizing windows. This is fixed " @@ -824,44 +865,44 @@ msgid "" "line." msgstr "" -#: library/curses.rst:756 +#: library/curses.rst:794 msgid "" "Remove attribute *attr* from the \"background\" set applied to all writes to " "the current window." msgstr "" -#: library/curses.rst:762 +#: library/curses.rst:800 msgid "" "Add attribute *attr* to the \"background\" set applied to all writes to the " "current window." msgstr "" -#: library/curses.rst:768 +#: library/curses.rst:806 msgid "" "Set the \"background\" set of attributes to *attr*. This set is initially " "``0`` (no attributes)." msgstr "" -#: library/curses.rst:774 +#: library/curses.rst:812 msgid "" "Set the background property of the window to the character *ch*, with " "attributes *attr*. The change is then applied to every character position " "in that window:" msgstr "" -#: library/curses.rst:778 +#: library/curses.rst:816 msgid "" "The attribute of every character in the window is changed to the new " "background attribute." msgstr "" -#: library/curses.rst:781 +#: library/curses.rst:819 msgid "" "Wherever the former background character appears, it is changed to the new " "background character." msgstr "" -#: library/curses.rst:787 +#: library/curses.rst:825 msgid "" "Set the window's background. A window's background consists of a character " "and any combination of attributes. The attribute part of the background is " @@ -872,128 +913,128 @@ msgid "" "delete line/character operations." msgstr "" -#: library/curses.rst:797 +#: library/curses.rst:835 msgid "" "Draw a border around the edges of the window. Each parameter specifies the " "character to use for a specific part of the border; see the table below for " "more details." msgstr "" -#: library/curses.rst:803 +#: library/curses.rst:841 msgid "" "A ``0`` value for any parameter will cause the default character to be used " "for that parameter. Keyword parameters can *not* be used. The defaults are " "listed in this table:" msgstr "" -#: library/curses.rst:808 +#: library/curses.rst:846 msgid "Parameter" msgstr "" -#: library/curses.rst:808 +#: library/curses.rst:846 msgid "Description" msgstr "" -#: library/curses.rst:808 +#: library/curses.rst:846 msgid "Default value" msgstr "" -#: library/curses.rst:810 +#: library/curses.rst:848 msgid "*ls*" msgstr "" -#: library/curses.rst:810 +#: library/curses.rst:848 msgid "Left side" msgstr "" -#: library/curses.rst:812 +#: library/curses.rst:850 msgid ":const:`ACS_VLINE`" msgstr "" -#: library/curses.rst:812 +#: library/curses.rst:850 msgid "*rs*" msgstr "" -#: library/curses.rst:812 +#: library/curses.rst:850 msgid "Right side" msgstr "" -#: library/curses.rst:814 +#: library/curses.rst:852 msgid "*ts*" msgstr "" -#: library/curses.rst:814 +#: library/curses.rst:852 msgid "Top" msgstr "" -#: library/curses.rst:816 +#: library/curses.rst:854 msgid ":const:`ACS_HLINE`" msgstr "" -#: library/curses.rst:816 +#: library/curses.rst:854 msgid "*bs*" msgstr "" -#: library/curses.rst:816 +#: library/curses.rst:854 msgid "Bottom" msgstr "" -#: library/curses.rst:818 +#: library/curses.rst:856 msgid "*tl*" msgstr "" -#: library/curses.rst:818 +#: library/curses.rst:856 msgid "Upper-left corner" msgstr "" -#: library/curses.rst:818 +#: library/curses.rst:856 msgid ":const:`ACS_ULCORNER`" msgstr "" -#: library/curses.rst:820 +#: library/curses.rst:858 msgid "*tr*" msgstr "" -#: library/curses.rst:820 +#: library/curses.rst:858 msgid "Upper-right corner" msgstr "" -#: library/curses.rst:820 +#: library/curses.rst:858 msgid ":const:`ACS_URCORNER`" msgstr "" -#: library/curses.rst:822 +#: library/curses.rst:860 msgid "*bl*" msgstr "" -#: library/curses.rst:822 +#: library/curses.rst:860 msgid "Bottom-left corner" msgstr "" -#: library/curses.rst:822 +#: library/curses.rst:860 msgid ":const:`ACS_LLCORNER`" msgstr "" -#: library/curses.rst:824 +#: library/curses.rst:862 msgid "*br*" msgstr "" -#: library/curses.rst:824 +#: library/curses.rst:862 msgid "Bottom-right corner" msgstr "" -#: library/curses.rst:824 +#: library/curses.rst:862 msgid ":const:`ACS_LRCORNER`" msgstr "" -#: library/curses.rst:830 +#: library/curses.rst:868 msgid "" "Similar to :meth:`border`, but both *ls* and *rs* are *vertch* and both *ts* " "and *bs* are *horch*. The default corner characters are always used by this " "function." msgstr "" -#: library/curses.rst:839 +#: library/curses.rst:877 msgid "" "Set the attributes of *num* characters at the current cursor position, or at " "position ``(y, x)`` if supplied. If *num* is not given or is ``-1``, the " @@ -1003,45 +1044,47 @@ msgid "" "be redisplayed by the next window refresh." msgstr "" -#: library/curses.rst:849 +#: library/curses.rst:887 msgid "" "Like :meth:`erase`, but also cause the whole window to be repainted upon " "next call to :meth:`refresh`." msgstr "" -#: library/curses.rst:855 +#: library/curses.rst:893 msgid "" "If *flag* is ``True``, the next call to :meth:`refresh` will clear the " "window completely." msgstr "" -#: library/curses.rst:861 +#: library/curses.rst:899 msgid "" "Erase from cursor to the end of the window: all lines below the cursor are " "deleted, and then the equivalent of :meth:`clrtoeol` is performed." msgstr "" -#: library/curses.rst:867 +#: library/curses.rst:905 msgid "Erase from cursor to the end of the line." msgstr "" -#: library/curses.rst:872 +#: library/curses.rst:910 msgid "" "Update the current cursor position of all the ancestors of the window to " "reflect the current cursor position of the window." msgstr "" -#: library/curses.rst:878 -msgid "Delete any character at ``(y, x)``." +#: library/curses.rst:916 +msgid "" +"Delete the character under the cursor, or at ``(y, x)`` if specified. All " +"characters to the right on the same line are shifted one position left." msgstr "" -#: library/curses.rst:883 +#: library/curses.rst:922 msgid "" "Delete the line under the cursor. All following lines are moved up by one " "line." msgstr "" -#: library/curses.rst:889 +#: library/curses.rst:928 msgid "" "An abbreviation for \"derive window\", :meth:`derwin` is the same as " "calling :meth:`subwin`, except that *begin_y* and *begin_x* are relative to " @@ -1049,13 +1092,13 @@ msgid "" "a window object for the derived window." msgstr "" -#: library/curses.rst:897 +#: library/curses.rst:936 msgid "" "Add character *ch* with attribute *attr*, and immediately call :meth:" "`refresh` on the window." msgstr "" -#: library/curses.rst:903 +#: library/curses.rst:942 msgid "" "Test whether the given pair of screen-relative character-cell coordinates " "are enclosed by the given window, returning ``True`` or ``False``. It is " @@ -1063,11 +1106,11 @@ msgid "" "location of a mouse event." msgstr "" -#: library/curses.rst:908 +#: library/curses.rst:947 msgid "Previously it returned ``1`` or ``0`` instead of ``True`` or ``False``." msgstr "" -#: library/curses.rst:914 +#: library/curses.rst:953 msgid "" "Encoding used to encode method arguments (Unicode strings and characters). " "The encoding attribute is inherited from the parent window when a subwindow " @@ -1075,19 +1118,21 @@ msgid "" "locale encoding is used (see :func:`locale.getencoding`)." msgstr "" -#: library/curses.rst:924 +#: library/curses.rst:963 msgid "Clear the window." msgstr "" -#: library/curses.rst:929 +#: library/curses.rst:968 msgid "Return a tuple ``(y, x)`` of coordinates of upper-left corner." msgstr "" -#: library/curses.rst:934 -msgid "Return the given window's current background character/attribute pair." +#: library/curses.rst:973 +msgid "" +"Return the given window's current background character/attribute pair. Its " +"components can be extracted like those of :meth:`inch`." msgstr "" -#: library/curses.rst:939 +#: library/curses.rst:979 msgid "" "Get a character. Note that the integer returned does *not* have to be in " "ASCII range: function keys, keypad keys and so on are represented by numbers " @@ -1095,14 +1140,14 @@ msgid "" "otherwise wait until a key is pressed." msgstr "" -#: library/curses.rst:947 +#: library/curses.rst:987 msgid "" "Get a wide character. Return a character for most keys, or an integer for " "function keys, keypad keys, and other special keys. In no-delay mode, raise " "an exception if there is no input." msgstr "" -#: library/curses.rst:956 +#: library/curses.rst:996 msgid "" "Get a character, returning a string instead of an integer, as :meth:`getch` " "does. Function keys, keypad keys and other special keys return a multibyte " @@ -1110,35 +1155,38 @@ msgid "" "there is no input." msgstr "" -#: library/curses.rst:964 +#: library/curses.rst:1004 msgid "Return a tuple ``(y, x)`` of the height and width of the window." msgstr "" -#: library/curses.rst:969 +#: library/curses.rst:1009 msgid "" "Return the beginning coordinates of this window relative to its parent " "window as a tuple ``(y, x)``. Return ``(-1, -1)`` if this window has no " "parent." msgstr "" -#: library/curses.rst:979 +#: library/curses.rst:1019 msgid "" -"Read a bytes object from the user, with primitive line editing capacity." +"Read a bytes object from the user, with primitive line editing capacity. At " +"most *n* characters are read (1023 by default). The maximum value for *n* is " +"1023." msgstr "" -#: library/curses.rst:984 +#: library/curses.rst:1026 msgid "" "Return a tuple ``(y, x)`` of current cursor position relative to the " "window's upper-left corner." msgstr "" -#: library/curses.rst:991 +#: library/curses.rst:1033 msgid "" "Display a horizontal line starting at ``(y, x)`` with length *n* consisting " -"of the character *ch*." +"of the character *ch* with attributes *attr*. The line stops at the right " +"edge of the window if fewer than *n* cells are available." msgstr "" -#: library/curses.rst:997 +#: library/curses.rst:1040 msgid "" "If *flag* is ``False``, curses no longer considers using the hardware insert/" "delete character feature of the terminal; if *flag* is ``True``, use of " @@ -1146,13 +1194,13 @@ msgid "" "initialized, use of character insert/delete is enabled by default." msgstr "" -#: library/curses.rst:1005 +#: library/curses.rst:1048 msgid "" "If *flag* is ``True``, :mod:`curses` will try and use hardware line editing " "facilities. Otherwise, line insertion/deletion are disabled." msgstr "" -#: library/curses.rst:1011 +#: library/curses.rst:1054 msgid "" "If *flag* is ``True``, any change in the window image automatically causes " "the window to be refreshed; you no longer have to call :meth:`refresh` " @@ -1160,19 +1208,23 @@ msgid "" "calls to wrefresh. This option is disabled by default." msgstr "" -#: library/curses.rst:1019 +#: library/curses.rst:1062 msgid "" "Return the character at the given position in the window. The bottom 8 bits " -"are the character proper, and upper bits are the attributes." +"are the character proper and the upper bits are the attributes; extract them " +"with the :data:`A_CHARTEXT` and :data:`A_ATTRIBUTES` bit-masks, and the " +"color pair with :func:`pair_number`." msgstr "" -#: library/curses.rst:1026 +#: library/curses.rst:1071 msgid "" -"Paint character *ch* at ``(y, x)`` with attributes *attr*, moving the line " -"from position *x* right by one character." +"Insert character *ch* with attributes *attr* before the character under the " +"cursor, or at ``(y, x)`` if specified. All characters to the right of the " +"cursor are shifted one position right, with the rightmost character on the " +"line being lost. The cursor position does not change." msgstr "" -#: library/curses.rst:1032 +#: library/curses.rst:1079 msgid "" "Insert *nlines* lines into the specified window above the current line. The " "*nlines* bottom lines are lost. For negative *nlines*, delete *nlines* " @@ -1181,13 +1233,13 @@ msgid "" "remains the same." msgstr "" -#: library/curses.rst:1041 +#: library/curses.rst:1088 msgid "" "Insert a blank line under the cursor. All following lines are moved down by " "one line." msgstr "" -#: library/curses.rst:1048 +#: library/curses.rst:1095 msgid "" "Insert a character string (as many characters as will fit on the line) " "before the character under the cursor, up to *n* characters. If *n* is " @@ -1197,7 +1249,7 @@ msgid "" "if specified)." msgstr "" -#: library/curses.rst:1058 +#: library/curses.rst:1105 msgid "" "Insert a character string (as many characters as will fit on the line) " "before the character under the cursor. All characters to the right of the " @@ -1206,84 +1258,97 @@ msgid "" "specified)." msgstr "" -#: library/curses.rst:1067 +#: library/curses.rst:1114 msgid "" "Return a bytes object of characters, extracted from the window starting at " -"the current cursor position, or at *y*, *x* if specified. Attributes are " -"stripped from the characters. If *n* is specified, :meth:`instr` returns a " -"string at most *n* characters long (exclusive of the trailing NUL)." +"the current cursor position, or at *y*, *x* if specified, and stopping at " +"the end of the line. Attributes and color information are stripped from the " +"characters. If *n* is specified, :meth:`instr` returns a string at most *n* " +"characters long (exclusive of the trailing NUL)." msgstr "" -#: library/curses.rst:1075 +#: library/curses.rst:1123 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:1082 +#: library/curses.rst:1130 msgid "" "Return ``True`` if the specified window was modified since the last call to :" "meth:`refresh`; otherwise return ``False``." msgstr "" -#: library/curses.rst:1088 +#: library/curses.rst:1136 msgid "" "If *flag* is ``True``, escape sequences generated by some keys (keypad, " "function keys) will be interpreted by :mod:`curses`. If *flag* is ``False``, " "escape sequences will be left as is in the input stream." msgstr "" -#: library/curses.rst:1095 +#: library/curses.rst:1143 msgid "" "If *flag* is ``True``, cursor is left where it is on update, instead of " -"being at \"cursor position.\" This reduces cursor movement where possible. " -"If possible the cursor will be made invisible." +"being at \"cursor position.\" This reduces cursor movement where possible." msgstr "" -#: library/curses.rst:1099 +#: library/curses.rst:1146 msgid "" "If *flag* is ``False``, cursor will always be at \"cursor position\" after " "an update." msgstr "" -#: library/curses.rst:1104 +#: library/curses.rst:1151 msgid "Move cursor to ``(new_y, new_x)``." msgstr "" -#: library/curses.rst:1109 +#: library/curses.rst:1156 msgid "" "Move the window inside its parent window. The screen-relative parameters of " "the window are not changed. This routine is used to display different parts " "of the parent window at the same physical position on the screen." msgstr "" -#: library/curses.rst:1116 +#: library/curses.rst:1163 msgid "Move the window so its upper-left corner is at ``(new_y, new_x)``." msgstr "" -#: library/curses.rst:1121 +#: library/curses.rst:1165 +msgid "" +"Moving the window so that any part of it would be off the screen is an " +"error: the window is not moved and :exc:`curses.error` is raised." +msgstr "" + +#: library/curses.rst:1171 msgid "If *flag* is ``True``, :meth:`getch` will be non-blocking." msgstr "" -#: library/curses.rst:1126 +#: library/curses.rst:1176 msgid "If *flag* is ``True``, escape sequences will not be timed out." msgstr "" -#: library/curses.rst:1128 +#: library/curses.rst:1178 msgid "" "If *flag* is ``False``, after a few milliseconds, an escape sequence will " "not be interpreted, and will be left in the input stream as is." msgstr "" -#: library/curses.rst:1134 +#: library/curses.rst:1185 msgid "" "Mark for refresh but wait. This function updates the data structure " "representing the desired state of the window, but does not force an update " "of the physical screen. To accomplish that, call :func:`doupdate`." msgstr "" -#: library/curses.rst:1141 +#: library/curses.rst:1189 +msgid "" +"The 6 arguments can only be specified, and are then required, when the " +"window is a pad created with :func:`newpad`; they have the same meaning as " +"for :meth:`refresh`." +msgstr "" + +#: library/curses.rst:1196 msgid "" "Overlay the window on top of *destwin*. The windows need not be the same " "size, only the overlapping region is copied. This copy is non-destructive, " @@ -1291,7 +1356,7 @@ msgid "" "contents of *destwin*." msgstr "" -#: library/curses.rst:1146 +#: library/curses.rst:1201 msgid "" "To get fine-grained control over the copied region, the second form of :meth:" "`overlay` can be used. *sminrow* and *smincol* are the upper-left " @@ -1299,7 +1364,7 @@ msgid "" "in the destination window." msgstr "" -#: library/curses.rst:1154 +#: library/curses.rst:1209 msgid "" "Overwrite the window on top of *destwin*. The windows need not be the same " "size, in which case only the overlapping region is copied. This copy is " @@ -1307,7 +1372,7 @@ msgid "" "the old contents of *destwin*." msgstr "" -#: library/curses.rst:1159 +#: library/curses.rst:1214 msgid "" "To get fine-grained control over the copied region, the second form of :meth:" "`overwrite` can be used. *sminrow* and *smincol* are the upper-left " @@ -1315,46 +1380,46 @@ msgid "" "the destination window." msgstr "" -#: library/curses.rst:1167 +#: library/curses.rst:1222 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:1173 +#: library/curses.rst:1228 msgid "" "Indicate that the *num* screen lines, starting at line *beg*, are corrupted " "and should be completely redrawn on the next :meth:`refresh` call." msgstr "" -#: library/curses.rst:1179 +#: library/curses.rst:1234 msgid "" "Touch the entire window, causing it to be completely redrawn on the next :" "meth:`refresh` call." msgstr "" -#: library/curses.rst:1185 +#: library/curses.rst:1240 msgid "" "Update the display immediately (sync actual screen with previous drawing/" "deleting methods)." msgstr "" -#: library/curses.rst:1188 +#: library/curses.rst:1243 msgid "" -"The 6 optional arguments can only be specified when the window is a pad " -"created with :func:`newpad`. The additional parameters are needed to " -"indicate what part of the pad and screen are involved. *pminrow* and " -"*pmincol* specify the upper left-hand corner of the rectangle to be " -"displayed in the pad. *sminrow*, *smincol*, *smaxrow*, and *smaxcol* " -"specify the edges of the rectangle to be displayed on the screen. The lower " -"right-hand corner of the rectangle to be displayed in the pad is calculated " -"from the screen coordinates, since the rectangles must be the same size. " -"Both rectangles must be entirely contained within their respective " -"structures. Negative values of *pminrow*, *pmincol*, *sminrow*, or " -"*smincol* are treated as if they were zero." +"The 6 arguments can only be specified, and are then required, when the " +"window is a pad created with :func:`newpad`. The additional parameters are " +"needed to indicate what part of the pad and screen are involved. *pminrow* " +"and *pmincol* specify the upper-left corner of the rectangle to be displayed " +"in the pad. *sminrow*, *smincol*, *smaxrow*, and *smaxcol* specify the " +"edges of the rectangle to be displayed on the screen. The lower-right " +"corner of the rectangle to be displayed in the pad is calculated from the " +"screen coordinates, since the rectangles must be the same size. Both " +"rectangles must be entirely contained within their respective structures. " +"Negative values of *pminrow*, *pmincol*, *sminrow*, or *smincol* are treated " +"as if they were zero." msgstr "" -#: library/curses.rst:1202 +#: library/curses.rst:1257 msgid "" "Reallocate storage for a curses window to adjust its dimensions to the " "specified values. If either dimension is larger than the current values, " @@ -1362,11 +1427,14 @@ msgid "" "rendition (as set by :meth:`bkgdset`) merged into them." msgstr "" -#: library/curses.rst:1210 -msgid "Scroll the screen or scrolling region upward by *lines* lines." +#: library/curses.rst:1265 +msgid "" +"Scroll the screen or scrolling region. Scroll upward by *lines* lines if " +"*lines* is positive, or downward if it is negative. Scrolling has no effect " +"unless it has been enabled for the window with :meth:`scrollok`." msgstr "" -#: library/curses.rst:1215 +#: library/curses.rst:1272 msgid "" "Control what happens when the cursor of a window is moved off the edge of " "the window or scrolling region, either as a result of a newline action on " @@ -1376,54 +1444,63 @@ msgid "" "scrolling effect on the terminal, it is also necessary to call :meth:`idlok`." msgstr "" -#: library/curses.rst:1225 +#: library/curses.rst:1282 msgid "" "Set the scrolling region from line *top* to line *bottom*. All scrolling " "actions will take place in this region." msgstr "" -#: library/curses.rst:1231 +#: library/curses.rst:1288 msgid "" "Turn off the standout attribute. On some terminals this has the side effect " "of turning off all attributes." msgstr "" -#: library/curses.rst:1237 +#: library/curses.rst:1294 msgid "Turn on attribute *A_STANDOUT*." msgstr "" -#: library/curses.rst:1250 +#: library/curses.rst:1300 msgid "" -"Return a sub-window, whose upper-left corner is at ``(begin_y, begin_x)``, " -"and whose width/height is *ncols*/*nlines*." +"Return a sub-pad, whose upper-left corner is at ``(begin_y, begin_x)``, and " +"whose width/height is *ncols*/*nlines*. The coordinates are relative to the " +"parent pad (unlike :meth:`subwin`, which uses screen coordinates). This " +"method is only available for pads created with :func:`newpad`." msgstr "" -#: library/curses.rst:1253 +#: library/curses.rst:1309 +msgid "" +"Return a sub-window, whose upper-left corner is at the screen-relative " +"coordinates ``(begin_y, begin_x)``, and whose width/height is *ncols*/" +"*nlines*." +msgstr "" + +#: library/curses.rst:1312 msgid "" "By default, the sub-window will extend from the specified position to the " "lower right corner of the window." msgstr "" -#: library/curses.rst:1259 +#: library/curses.rst:1318 msgid "" "Touch each location in the window that has been touched in any of its " "ancestor windows. This routine is called by :meth:`refresh`, so it should " "almost never be necessary to call it manually." msgstr "" -#: library/curses.rst:1266 +#: library/curses.rst:1325 msgid "" "If *flag* is ``True``, then :meth:`syncup` is called automatically whenever " "there is a change in the window." msgstr "" -#: library/curses.rst:1272 +#: library/curses.rst:1331 msgid "" "Touch all locations in ancestors of the window that have been changed in " "the window." msgstr "" -#: library/curses.rst:1278 +#: library/curses.rst:1337 msgid "" "Set blocking or non-blocking read behavior for the window. If *delay* is " "negative, blocking read is used (which will wait indefinitely for input). " @@ -1433,7 +1510,7 @@ msgid "" "still no input at the end of that time." msgstr "" -#: library/curses.rst:1288 +#: library/curses.rst:1347 msgid "" "Pretend *count* lines have been changed, starting with line *start*. If " "*changed* is supplied, it specifies whether the affected lines are marked as " @@ -1441,49 +1518,49 @@ msgid "" "``=False``)." msgstr "" -#: library/curses.rst:1295 +#: library/curses.rst:1354 msgid "" "Pretend the whole window has been changed, for purposes of drawing " "optimizations." msgstr "" -#: library/curses.rst:1301 +#: library/curses.rst:1360 msgid "" "Mark all lines in the window as unchanged since the last call to :meth:" "`refresh`." msgstr "" -#: library/curses.rst:1308 +#: library/curses.rst:1367 msgid "" "Display a vertical line starting at ``(y, x)`` with length *n* consisting of " "the character *ch* with attributes *attr*." msgstr "" -#: library/curses.rst:1313 +#: library/curses.rst:1372 msgid "Constants" msgstr "" -#: library/curses.rst:1315 +#: library/curses.rst:1374 msgid "The :mod:`curses` module defines the following data members:" msgstr "" -#: library/curses.rst:1320 +#: library/curses.rst:1379 msgid "" "Some curses routines that return an integer, such as :meth:`~window." "getch`, return :const:`ERR` upon failure." msgstr "" -#: library/curses.rst:1326 +#: library/curses.rst:1385 msgid "" "Some curses routines that return an integer, such as :func:`napms`, " "return :const:`OK` upon success." msgstr "" -#: library/curses.rst:1332 +#: library/curses.rst:1391 msgid "A bytes object representing the current version of the module." msgstr "" -#: library/curses.rst:1337 +#: library/curses.rst:1396 msgid "" "A named tuple containing the three components of the ncurses library " "version: *major*, *minor*, and *patch*. All values are integers. The " @@ -1491,535 +1568,535 @@ msgid "" "is equivalent to ``curses.ncurses_version.major`` and so on." msgstr "" -#: library/curses.rst:1342 +#: library/curses.rst:1401 msgid "Availability: if the ncurses library is used." msgstr "" -#: library/curses.rst:1348 +#: library/curses.rst:1407 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:1353 +#: library/curses.rst:1412 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:1358 +#: library/curses.rst:1417 msgid "" -"The width of the screen, i.e., the number of columns. It is defined only " +"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:1365 +#: library/curses.rst:1424 msgid "" -"The height of the screen, i.e., the number of lines. It is defined only " +"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:1371 +#: library/curses.rst:1430 msgid "" "Some constants are available to specify character cell attributes. The exact " "constants available are system dependent." msgstr "" -#: library/curses.rst:1375 +#: library/curses.rst:1434 msgid "Attribute" msgstr "" -#: library/curses.rst:1420 library/curses.rst:1758 +#: library/curses.rst:1479 library/curses.rst:1817 msgid "Meaning" msgstr "" -#: library/curses.rst:1377 +#: library/curses.rst:1436 msgid "Alternate character set mode" msgstr "" -#: library/curses.rst:1379 +#: library/curses.rst:1438 msgid "Blink mode" msgstr "" -#: library/curses.rst:1381 +#: library/curses.rst:1440 msgid "Bold mode" msgstr "" -#: library/curses.rst:1383 +#: library/curses.rst:1442 msgid "Dim mode" msgstr "" -#: library/curses.rst:1385 +#: library/curses.rst:1444 msgid "Invisible or blank mode" msgstr "" -#: library/curses.rst:1387 +#: library/curses.rst:1446 msgid "Italic mode" msgstr "" -#: library/curses.rst:1389 +#: library/curses.rst:1448 msgid "Normal attribute" msgstr "" -#: library/curses.rst:1391 +#: library/curses.rst:1450 msgid "Protected mode" msgstr "" -#: library/curses.rst:1393 +#: library/curses.rst:1452 msgid "Reverse background and foreground colors" msgstr "" -#: library/curses.rst:1396 +#: library/curses.rst:1455 msgid "Standout mode" msgstr "" -#: library/curses.rst:1398 +#: library/curses.rst:1457 msgid "Underline mode" msgstr "" -#: library/curses.rst:1400 +#: library/curses.rst:1459 msgid "Horizontal highlight" msgstr "" -#: library/curses.rst:1402 +#: library/curses.rst:1461 msgid "Left highlight" msgstr "" -#: library/curses.rst:1404 +#: library/curses.rst:1463 msgid "Low highlight" msgstr "" -#: library/curses.rst:1406 +#: library/curses.rst:1465 msgid "Right highlight" msgstr "" -#: library/curses.rst:1408 +#: library/curses.rst:1467 msgid "Top highlight" msgstr "" -#: library/curses.rst:1410 +#: library/curses.rst:1469 msgid "Vertical highlight" msgstr "" -#: library/curses.rst:1413 +#: library/curses.rst:1472 msgid "``A_ITALIC`` was added." msgstr "" -#: library/curses.rst:1416 +#: library/curses.rst:1475 msgid "" "Several constants are available to extract corresponding attributes returned " "by some methods." msgstr "" -#: library/curses.rst:1420 +#: library/curses.rst:1479 msgid "Bit-mask" msgstr "" -#: library/curses.rst:1422 +#: library/curses.rst:1481 msgid "Bit-mask to extract attributes" msgstr "" -#: library/curses.rst:1425 +#: library/curses.rst:1484 msgid "Bit-mask to extract a character" msgstr "" -#: library/curses.rst:1428 +#: library/curses.rst:1487 msgid "Bit-mask to extract color-pair field information" msgstr "" -#: library/curses.rst:1432 +#: library/curses.rst:1491 msgid "" "Keys are referred to by integer constants with names starting with " "``KEY_``. The exact keycaps available are system dependent." msgstr "" -#: library/curses.rst:1438 +#: library/curses.rst:1497 msgid "Key constant" msgstr "" -#: library/curses.rst:1438 +#: library/curses.rst:1497 msgid "Key" msgstr "" -#: library/curses.rst:1440 +#: library/curses.rst:1499 msgid "Minimum key value" msgstr "" -#: library/curses.rst:1442 +#: library/curses.rst:1501 msgid "Break key (unreliable)" msgstr "" -#: library/curses.rst:1444 +#: library/curses.rst:1503 msgid "Down-arrow" msgstr "" -#: library/curses.rst:1446 +#: library/curses.rst:1505 msgid "Up-arrow" msgstr "" -#: library/curses.rst:1448 +#: library/curses.rst:1507 msgid "Left-arrow" msgstr "" -#: library/curses.rst:1450 +#: library/curses.rst:1509 msgid "Right-arrow" msgstr "" -#: library/curses.rst:1452 +#: library/curses.rst:1511 msgid "Home key (upward+left arrow)" msgstr "" -#: library/curses.rst:1454 +#: library/curses.rst:1513 msgid "Backspace (unreliable)" msgstr "" -#: library/curses.rst:1456 +#: library/curses.rst:1515 msgid "Function keys. Up to 64 function keys are supported." msgstr "" -#: library/curses.rst:1459 +#: library/curses.rst:1518 msgid "Value of function key *n*" msgstr "" -#: library/curses.rst:1461 +#: library/curses.rst:1520 msgid "Delete line" msgstr "" -#: library/curses.rst:1463 +#: library/curses.rst:1522 msgid "Insert line" msgstr "" -#: library/curses.rst:1465 +#: library/curses.rst:1524 msgid "Delete character" msgstr "" -#: library/curses.rst:1467 +#: library/curses.rst:1526 msgid "Insert char or enter insert mode" msgstr "" -#: library/curses.rst:1469 +#: library/curses.rst:1528 msgid "Exit insert char mode" msgstr "" -#: library/curses.rst:1471 +#: library/curses.rst:1530 msgid "Clear screen" msgstr "" -#: library/curses.rst:1473 +#: library/curses.rst:1532 msgid "Clear to end of screen" msgstr "" -#: library/curses.rst:1475 +#: library/curses.rst:1534 msgid "Clear to end of line" msgstr "" -#: library/curses.rst:1477 +#: library/curses.rst:1536 msgid "Scroll 1 line forward" msgstr "" -#: library/curses.rst:1479 +#: library/curses.rst:1538 msgid "Scroll 1 line backward (reverse)" msgstr "" -#: library/curses.rst:1481 +#: library/curses.rst:1540 msgid "Next page" msgstr "" -#: library/curses.rst:1483 +#: library/curses.rst:1542 msgid "Previous page" msgstr "" -#: library/curses.rst:1485 +#: library/curses.rst:1544 msgid "Set tab" msgstr "" -#: library/curses.rst:1487 +#: library/curses.rst:1546 msgid "Clear tab" msgstr "" -#: library/curses.rst:1489 +#: library/curses.rst:1548 msgid "Clear all tabs" msgstr "" -#: library/curses.rst:1491 +#: library/curses.rst:1550 msgid "Enter or send (unreliable)" msgstr "" -#: library/curses.rst:1493 +#: library/curses.rst:1552 msgid "Soft (partial) reset (unreliable)" msgstr "" -#: library/curses.rst:1495 +#: library/curses.rst:1554 msgid "Reset or hard reset (unreliable)" msgstr "" -#: library/curses.rst:1497 +#: library/curses.rst:1556 msgid "Print" msgstr "" -#: library/curses.rst:1499 +#: library/curses.rst:1558 msgid "Home down or bottom (lower left)" msgstr "" -#: library/curses.rst:1501 +#: library/curses.rst:1560 msgid "Upper left of keypad" msgstr "" -#: library/curses.rst:1503 +#: library/curses.rst:1562 msgid "Upper right of keypad" msgstr "" -#: library/curses.rst:1505 +#: library/curses.rst:1564 msgid "Center of keypad" msgstr "" -#: library/curses.rst:1507 +#: library/curses.rst:1566 msgid "Lower left of keypad" msgstr "" -#: library/curses.rst:1509 +#: library/curses.rst:1568 msgid "Lower right of keypad" msgstr "" -#: library/curses.rst:1511 +#: library/curses.rst:1570 msgid "Back tab" msgstr "" -#: library/curses.rst:1513 +#: library/curses.rst:1572 msgid "Beg (beginning)" msgstr "" -#: library/curses.rst:1515 +#: library/curses.rst:1574 msgid "Cancel" msgstr "" -#: library/curses.rst:1517 +#: library/curses.rst:1576 msgid "Close" msgstr "" -#: library/curses.rst:1519 +#: library/curses.rst:1578 msgid "Cmd (command)" msgstr "" -#: library/curses.rst:1521 +#: library/curses.rst:1580 msgid "Copy" msgstr "" -#: library/curses.rst:1523 +#: library/curses.rst:1582 msgid "Create" msgstr "" -#: library/curses.rst:1525 +#: library/curses.rst:1584 msgid "End" msgstr "" -#: library/curses.rst:1527 +#: library/curses.rst:1586 msgid "Exit" msgstr "" -#: library/curses.rst:1529 +#: library/curses.rst:1588 msgid "Find" msgstr "" -#: library/curses.rst:1531 +#: library/curses.rst:1590 msgid "Help" msgstr "" -#: library/curses.rst:1533 +#: library/curses.rst:1592 msgid "Mark" msgstr "" -#: library/curses.rst:1535 +#: library/curses.rst:1594 msgid "Message" msgstr "" -#: library/curses.rst:1537 +#: library/curses.rst:1596 msgid "Move" msgstr "" -#: library/curses.rst:1539 +#: library/curses.rst:1598 msgid "Next" msgstr "" -#: library/curses.rst:1541 +#: library/curses.rst:1600 msgid "Open" msgstr "" -#: library/curses.rst:1543 +#: library/curses.rst:1602 msgid "Options" msgstr "" -#: library/curses.rst:1545 +#: library/curses.rst:1604 msgid "Prev (previous)" msgstr "" -#: library/curses.rst:1547 +#: library/curses.rst:1606 msgid "Redo" msgstr "" -#: library/curses.rst:1549 +#: library/curses.rst:1608 msgid "Ref (reference)" msgstr "" -#: library/curses.rst:1551 +#: library/curses.rst:1610 msgid "Refresh" msgstr "" -#: library/curses.rst:1553 +#: library/curses.rst:1612 msgid "Replace" msgstr "" -#: library/curses.rst:1555 +#: library/curses.rst:1614 msgid "Restart" msgstr "" -#: library/curses.rst:1557 +#: library/curses.rst:1616 msgid "Resume" msgstr "" -#: library/curses.rst:1559 +#: library/curses.rst:1618 msgid "Save" msgstr "" -#: library/curses.rst:1561 +#: library/curses.rst:1620 msgid "Shifted Beg (beginning)" msgstr "" -#: library/curses.rst:1563 +#: library/curses.rst:1622 msgid "Shifted Cancel" msgstr "" -#: library/curses.rst:1565 +#: library/curses.rst:1624 msgid "Shifted Command" msgstr "" -#: library/curses.rst:1567 +#: library/curses.rst:1626 msgid "Shifted Copy" msgstr "" -#: library/curses.rst:1569 +#: library/curses.rst:1628 msgid "Shifted Create" msgstr "" -#: library/curses.rst:1571 +#: library/curses.rst:1630 msgid "Shifted Delete char" msgstr "" -#: library/curses.rst:1573 +#: library/curses.rst:1632 msgid "Shifted Delete line" msgstr "" -#: library/curses.rst:1575 +#: library/curses.rst:1634 msgid "Select" msgstr "" -#: library/curses.rst:1577 +#: library/curses.rst:1636 msgid "Shifted End" msgstr "" -#: library/curses.rst:1579 +#: library/curses.rst:1638 msgid "Shifted Clear line" msgstr "" -#: library/curses.rst:1581 +#: library/curses.rst:1640 msgid "Shifted Exit" msgstr "" -#: library/curses.rst:1583 +#: library/curses.rst:1642 msgid "Shifted Find" msgstr "" -#: library/curses.rst:1585 +#: library/curses.rst:1644 msgid "Shifted Help" msgstr "" -#: library/curses.rst:1587 +#: library/curses.rst:1646 msgid "Shifted Home" msgstr "" -#: library/curses.rst:1589 +#: library/curses.rst:1648 msgid "Shifted Input" msgstr "" -#: library/curses.rst:1591 +#: library/curses.rst:1650 msgid "Shifted Left arrow" msgstr "" -#: library/curses.rst:1593 +#: library/curses.rst:1652 msgid "Shifted Message" msgstr "" -#: library/curses.rst:1595 +#: library/curses.rst:1654 msgid "Shifted Move" msgstr "" -#: library/curses.rst:1597 +#: library/curses.rst:1656 msgid "Shifted Next" msgstr "" -#: library/curses.rst:1599 +#: library/curses.rst:1658 msgid "Shifted Options" msgstr "" -#: library/curses.rst:1601 +#: library/curses.rst:1660 msgid "Shifted Prev" msgstr "" -#: library/curses.rst:1603 +#: library/curses.rst:1662 msgid "Shifted Print" msgstr "" -#: library/curses.rst:1605 +#: library/curses.rst:1664 msgid "Shifted Redo" msgstr "" -#: library/curses.rst:1607 +#: library/curses.rst:1666 msgid "Shifted Replace" msgstr "" -#: library/curses.rst:1609 +#: library/curses.rst:1668 msgid "Shifted Right arrow" msgstr "" -#: library/curses.rst:1611 +#: library/curses.rst:1670 msgid "Shifted Resume" msgstr "" -#: library/curses.rst:1613 +#: library/curses.rst:1672 msgid "Shifted Save" msgstr "" -#: library/curses.rst:1615 +#: library/curses.rst:1674 msgid "Shifted Suspend" msgstr "" -#: library/curses.rst:1617 +#: library/curses.rst:1676 msgid "Shifted Undo" msgstr "" -#: library/curses.rst:1619 +#: library/curses.rst:1678 msgid "Suspend" msgstr "" -#: library/curses.rst:1621 +#: library/curses.rst:1680 msgid "Undo" msgstr "" -#: library/curses.rst:1623 +#: library/curses.rst:1682 msgid "Mouse event has occurred" msgstr "" -#: library/curses.rst:1625 +#: library/curses.rst:1684 msgid "Terminal resize event" msgstr "" -#: library/curses.rst:1627 +#: library/curses.rst:1686 msgid "Maximum key value" msgstr "" -#: library/curses.rst:1630 +#: library/curses.rst:1689 msgid "" "On VT100s and their software emulations, such as X terminal emulators, there " "are normally at least four function keys (:const:`KEY_F1 `, :const:" @@ -2031,63 +2108,63 @@ msgid "" "keypad mappings are standard:" msgstr "" -#: library/curses.rst:1639 +#: library/curses.rst:1698 msgid "Keycap" msgstr "" -#: library/curses.rst:1784 library/curses.rst:1908 +#: library/curses.rst:1843 library/curses.rst:1972 msgid "Constant" msgstr "" -#: library/curses.rst:1641 +#: library/curses.rst:1700 msgid ":kbd:`Insert`" msgstr "" -#: library/curses.rst:1641 +#: library/curses.rst:1700 msgid "KEY_IC" msgstr "" -#: library/curses.rst:1643 +#: library/curses.rst:1702 msgid ":kbd:`Delete`" msgstr "" -#: library/curses.rst:1643 +#: library/curses.rst:1702 msgid "KEY_DC" msgstr "" -#: library/curses.rst:1645 +#: library/curses.rst:1704 msgid ":kbd:`Home`" msgstr "" -#: library/curses.rst:1645 +#: library/curses.rst:1704 msgid "KEY_HOME" msgstr "" -#: library/curses.rst:1647 +#: library/curses.rst:1706 msgid ":kbd:`End`" msgstr "" -#: library/curses.rst:1647 +#: library/curses.rst:1706 msgid "KEY_END" msgstr "" -#: library/curses.rst:1649 +#: library/curses.rst:1708 msgid ":kbd:`Page Up`" msgstr "" -#: library/curses.rst:1649 +#: library/curses.rst:1708 msgid "KEY_PPAGE" msgstr "" -#: library/curses.rst:1651 +#: library/curses.rst:1710 msgid ":kbd:`Page Down`" msgstr "" -#: library/curses.rst:1651 +#: library/curses.rst:1710 msgid "KEY_NPAGE" msgstr "" -#: library/curses.rst:1656 +#: library/curses.rst:1715 msgid "" "The following table lists characters from the alternate character set. These " "are inherited from the VT100 terminal, and will generally be available on " @@ -2095,268 +2172,272 @@ msgid "" "available, curses falls back on a crude printable ASCII approximation." msgstr "" -#: library/curses.rst:1663 +#: library/curses.rst:1722 msgid "These are available only after :func:`initscr` has been called." msgstr "" -#: library/curses.rst:1666 +#: library/curses.rst:1725 msgid "ACS code" msgstr "" -#: library/curses.rst:1668 -msgid "alternate name for upper right corner" +#: library/curses.rst:1727 +msgid "alternate name for upper-right corner" msgstr "" -#: library/curses.rst:1670 +#: library/curses.rst:1729 msgid "solid square block" msgstr "" -#: library/curses.rst:1672 +#: library/curses.rst:1731 msgid "board of squares" msgstr "" -#: library/curses.rst:1674 +#: library/curses.rst:1733 msgid "alternate name for horizontal line" msgstr "" -#: library/curses.rst:1676 -msgid "alternate name for upper left corner" +#: library/curses.rst:1735 +msgid "alternate name for upper-left corner" msgstr "" -#: library/curses.rst:1678 +#: library/curses.rst:1737 msgid "alternate name for top tee" msgstr "" -#: library/curses.rst:1680 +#: library/curses.rst:1739 msgid "bottom tee" msgstr "" -#: library/curses.rst:1682 +#: library/curses.rst:1741 msgid "bullet" msgstr "" -#: library/curses.rst:1684 +#: library/curses.rst:1743 msgid "checker board (stipple)" msgstr "" -#: library/curses.rst:1686 +#: library/curses.rst:1745 msgid "arrow pointing down" msgstr "" -#: library/curses.rst:1688 +#: library/curses.rst:1747 msgid "degree symbol" msgstr "" -#: library/curses.rst:1690 +#: library/curses.rst:1749 msgid "diamond" msgstr "" -#: library/curses.rst:1692 +#: library/curses.rst:1751 msgid "greater-than-or-equal-to" msgstr "" -#: library/curses.rst:1694 +#: library/curses.rst:1753 msgid "horizontal line" msgstr "" -#: library/curses.rst:1696 +#: library/curses.rst:1755 msgid "lantern symbol" msgstr "" -#: library/curses.rst:1698 +#: library/curses.rst:1757 msgid "left arrow" msgstr "" -#: library/curses.rst:1700 +#: library/curses.rst:1759 msgid "less-than-or-equal-to" msgstr "" -#: library/curses.rst:1702 -msgid "lower left-hand corner" +#: library/curses.rst:1761 +msgid "lower-left corner" msgstr "" -#: library/curses.rst:1704 -msgid "lower right-hand corner" +#: library/curses.rst:1763 +msgid "lower-right corner" msgstr "" -#: library/curses.rst:1706 +#: library/curses.rst:1765 msgid "left tee" msgstr "" -#: library/curses.rst:1708 +#: library/curses.rst:1767 msgid "not-equal sign" msgstr "" -#: library/curses.rst:1710 +#: library/curses.rst:1769 msgid "letter pi" msgstr "" -#: library/curses.rst:1712 +#: library/curses.rst:1771 msgid "plus-or-minus sign" msgstr "" -#: library/curses.rst:1714 +#: library/curses.rst:1773 msgid "big plus sign" msgstr "" -#: library/curses.rst:1716 +#: library/curses.rst:1775 msgid "right arrow" msgstr "" -#: library/curses.rst:1718 +#: library/curses.rst:1777 msgid "right tee" msgstr "" -#: library/curses.rst:1720 +#: library/curses.rst:1779 msgid "scan line 1" msgstr "" -#: library/curses.rst:1722 +#: library/curses.rst:1781 msgid "scan line 3" msgstr "" -#: library/curses.rst:1724 +#: library/curses.rst:1783 msgid "scan line 7" msgstr "" -#: library/curses.rst:1726 +#: library/curses.rst:1785 msgid "scan line 9" msgstr "" -#: library/curses.rst:1728 -msgid "alternate name for lower right corner" +#: library/curses.rst:1787 +msgid "alternate name for lower-right corner" msgstr "" -#: library/curses.rst:1730 +#: library/curses.rst:1789 msgid "alternate name for vertical line" msgstr "" -#: library/curses.rst:1732 +#: library/curses.rst:1791 msgid "alternate name for right tee" msgstr "" -#: library/curses.rst:1734 -msgid "alternate name for lower left corner" +#: library/curses.rst:1793 +msgid "alternate name for lower-left corner" msgstr "" -#: library/curses.rst:1736 +#: library/curses.rst:1795 msgid "alternate name for bottom tee" msgstr "" -#: library/curses.rst:1738 +#: library/curses.rst:1797 msgid "alternate name for left tee" msgstr "" -#: library/curses.rst:1740 +#: library/curses.rst:1799 msgid "alternate name for crossover or big plus" msgstr "" -#: library/curses.rst:1742 +#: library/curses.rst:1801 msgid "pound sterling" msgstr "" -#: library/curses.rst:1744 +#: library/curses.rst:1803 msgid "top tee" msgstr "" -#: library/curses.rst:1746 +#: library/curses.rst:1805 msgid "up arrow" msgstr "" -#: library/curses.rst:1748 -msgid "upper left corner" +#: library/curses.rst:1807 +msgid "upper-left corner" msgstr "" -#: library/curses.rst:1750 -msgid "upper right corner" +#: library/curses.rst:1809 +msgid "upper-right corner" msgstr "" -#: library/curses.rst:1752 +#: library/curses.rst:1811 msgid "vertical line" msgstr "" -#: library/curses.rst:1755 +#: library/curses.rst:1814 msgid "" "The following table lists mouse button constants used by :meth:`getmouse`:" msgstr "" -#: library/curses.rst:1758 +#: library/curses.rst:1817 msgid "Mouse button constant" msgstr "" -#: library/curses.rst:1760 +#: library/curses.rst:1819 msgid "Mouse button *n* pressed" msgstr "" -#: library/curses.rst:1762 +#: library/curses.rst:1821 msgid "Mouse button *n* released" msgstr "" -#: library/curses.rst:1764 +#: library/curses.rst:1823 msgid "Mouse button *n* clicked" msgstr "" -#: library/curses.rst:1766 +#: library/curses.rst:1825 msgid "Mouse button *n* double clicked" msgstr "" -#: library/curses.rst:1768 +#: library/curses.rst:1827 msgid "Mouse button *n* triple clicked" msgstr "" -#: library/curses.rst:1770 +#: library/curses.rst:1829 msgid "Shift was down during button state change" msgstr "" -#: library/curses.rst:1774 +#: library/curses.rst:1831 msgid "Control was down during button state change" msgstr "" -#: library/curses.rst:1781 +#: library/curses.rst:1833 +msgid "Alt was down during button state change" +msgstr "" + +#: library/curses.rst:1840 msgid "The following table lists the predefined colors:" msgstr "" -#: library/curses.rst:1784 +#: library/curses.rst:1843 msgid "Color" msgstr "" -#: library/curses.rst:1786 +#: library/curses.rst:1845 msgid "Black" msgstr "" -#: library/curses.rst:1788 +#: library/curses.rst:1847 msgid "Blue" msgstr "" -#: library/curses.rst:1790 +#: library/curses.rst:1849 msgid "Cyan (light greenish blue)" msgstr "" -#: library/curses.rst:1792 +#: library/curses.rst:1851 msgid "Green" msgstr "" -#: library/curses.rst:1794 +#: library/curses.rst:1853 msgid "Magenta (purplish red)" msgstr "" -#: library/curses.rst:1796 +#: library/curses.rst:1855 msgid "Red" msgstr "" -#: library/curses.rst:1798 +#: library/curses.rst:1857 msgid "White" msgstr "" -#: library/curses.rst:1800 +#: library/curses.rst:1859 msgid "Yellow" msgstr "" -#: library/curses.rst:1805 +#: library/curses.rst:1864 msgid ":mod:`curses.textpad` --- Text input widget for curses programs" msgstr "" -#: library/curses.rst:1813 +#: library/curses.rst:1872 msgid "" "The :mod:`curses.textpad` module provides a :class:`Textbox` class that " "handles elementary text editing in a curses window, supporting a set of " @@ -2366,215 +2447,220 @@ msgid "" "purposes." msgstr "" -#: library/curses.rst:1819 +#: library/curses.rst:1878 msgid "The module :mod:`curses.textpad` defines the following function:" msgstr "" -#: library/curses.rst:1824 +#: library/curses.rst:1883 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 " -"arguments are the y and x coordinates of the upper left hand corner of the " +"arguments are the y and x coordinates of the upper-left corner of the " "rectangle to be drawn; the fourth and fifth arguments are the y and x " -"coordinates of the lower right hand corner. The rectangle will be drawn " -"using VT100/IBM PC forms characters on terminals that make this possible " +"coordinates of the lower-right corner. The rectangle will be drawn using " +"VT100/IBM PC forms characters on terminals that make this possible " "(including xterm and most other software terminal emulators). Otherwise it " "will be drawn with ASCII dashes, vertical bars, and plus signs." msgstr "" -#: library/curses.rst:1837 +#: library/curses.rst:1896 msgid "Textbox objects" msgstr "" -#: library/curses.rst:1839 +#: library/curses.rst:1898 msgid "You can instantiate a :class:`Textbox` object as follows:" msgstr "" -#: library/curses.rst:1844 +#: library/curses.rst:1903 msgid "" "Return a textbox widget object. The *win* argument should be a curses :ref:" "`window ` object in which the textbox is to be " -"contained. The edit cursor of the textbox is initially located at the upper " -"left hand corner of the containing window, with coordinates ``(0, 0)``. The " -"instance's :attr:`stripspaces` flag is initially on." +"contained. If *insert_mode* is true, the textbox inserts typed characters, " +"shifting existing text to the right, rather than overwriting it. The edit " +"cursor of the textbox is initially located at the upper-left corner of the " +"containing window, with coordinates ``(0, 0)``. The instance's :attr:" +"`stripspaces` flag is initially on." msgstr "" -#: library/curses.rst:1850 +#: library/curses.rst:1911 msgid ":class:`Textbox` objects have the following methods:" msgstr "" -#: library/curses.rst:1855 +#: library/curses.rst:1916 msgid "" "This is the entry point you will normally use. It accepts editing " "keystrokes until one of the termination keystrokes is entered. If " -"*validator* is supplied, it must be a function. It will be called for each " +"*validate* is supplied, it must be a function. It will be called for each " "keystroke entered with the keystroke as a parameter; command dispatch is " -"done on the result. This method returns the window contents as a string; " -"whether blanks in the window are included is affected by the :attr:" -"`stripspaces` attribute." +"done on the result. If it returns a false value, the keystroke is ignored. " +"This method returns the window contents as a string; whether blanks in the " +"window are included is affected by the :attr:`stripspaces` attribute." msgstr "" -#: library/curses.rst:1866 +#: library/curses.rst:1928 msgid "" -"Process a single command keystroke. Here are the supported special " -"keystrokes:" +"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:1908 +#: library/curses.rst:1972 msgid "Keystroke" msgstr "" -#: library/curses.rst:1870 +#: library/curses.rst:1933 msgid "Action" msgstr "" -#: library/curses.rst:1872 +#: library/curses.rst:1935 msgid ":kbd:`Control-A`" msgstr "" -#: library/curses.rst:1872 +#: library/curses.rst:1935 msgid "Go to left edge of window." msgstr "" -#: library/curses.rst:1910 +#: library/curses.rst:1974 msgid ":kbd:`Control-B`" msgstr "" -#: library/curses.rst:1874 +#: library/curses.rst:1937 msgid "Cursor left, wrapping to previous line if appropriate." msgstr "" -#: library/curses.rst:1877 +#: library/curses.rst:1940 msgid ":kbd:`Control-D`" msgstr "" -#: library/curses.rst:1877 +#: library/curses.rst:1940 msgid "Delete character under cursor." msgstr "" -#: library/curses.rst:1879 +#: library/curses.rst:1942 msgid ":kbd:`Control-E`" msgstr "" -#: library/curses.rst:1879 +#: library/curses.rst:1942 msgid "Go to right edge (stripspaces off) or end of line (stripspaces on)." msgstr "" -#: library/curses.rst:1912 +#: library/curses.rst:1976 msgid ":kbd:`Control-F`" msgstr "" -#: library/curses.rst:1882 +#: library/curses.rst:1945 msgid "Cursor right, wrapping to next line when appropriate." msgstr "" -#: library/curses.rst:1885 +#: library/curses.rst:1948 msgid ":kbd:`Control-G`" msgstr "" -#: library/curses.rst:1885 +#: library/curses.rst:1948 msgid "Terminate, returning the window contents." msgstr "" -#: library/curses.rst:1887 +#: library/curses.rst:1950 msgid ":kbd:`Control-H`" msgstr "" -#: library/curses.rst:1887 +#: library/curses.rst:1950 msgid "Delete character backward." msgstr "" -#: library/curses.rst:1889 +#: library/curses.rst:1952 msgid ":kbd:`Control-J`" msgstr "" -#: library/curses.rst:1889 -msgid "Terminate if the window is 1 line, otherwise insert newline." +#: library/curses.rst:1952 +msgid "" +"Terminate if the window is 1 line, otherwise move to the start of the next " +"line." msgstr "" -#: library/curses.rst:1892 +#: library/curses.rst:1956 msgid ":kbd:`Control-K`" msgstr "" -#: library/curses.rst:1892 +#: library/curses.rst:1956 msgid "If line is blank, delete it, otherwise clear to end of line." msgstr "" -#: library/curses.rst:1895 +#: library/curses.rst:1959 msgid ":kbd:`Control-L`" msgstr "" -#: library/curses.rst:1895 +#: library/curses.rst:1959 msgid "Refresh screen." msgstr "" -#: library/curses.rst:1916 +#: library/curses.rst:1980 msgid ":kbd:`Control-N`" msgstr "" -#: library/curses.rst:1897 +#: library/curses.rst:1961 msgid "Cursor down; move down one line." msgstr "" -#: library/curses.rst:1899 +#: library/curses.rst:1963 msgid ":kbd:`Control-O`" msgstr "" -#: library/curses.rst:1899 +#: library/curses.rst:1963 msgid "Insert a blank line at cursor location." msgstr "" -#: library/curses.rst:1914 +#: library/curses.rst:1978 msgid ":kbd:`Control-P`" msgstr "" -#: library/curses.rst:1901 +#: library/curses.rst:1965 msgid "Cursor up; move up one line." msgstr "" -#: library/curses.rst:1904 +#: library/curses.rst:1968 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:1910 +#: library/curses.rst:1974 msgid ":const:`~curses.KEY_LEFT`" msgstr "" -#: library/curses.rst:1912 +#: library/curses.rst:1976 msgid ":const:`~curses.KEY_RIGHT`" msgstr "" -#: library/curses.rst:1914 +#: library/curses.rst:1978 msgid ":const:`~curses.KEY_UP`" msgstr "" -#: library/curses.rst:1916 +#: library/curses.rst:1980 msgid ":const:`~curses.KEY_DOWN`" msgstr "" -#: library/curses.rst:1918 +#: library/curses.rst:1982 msgid ":const:`~curses.KEY_BACKSPACE`" msgstr "" -#: library/curses.rst:1918 +#: library/curses.rst:1982 msgid ":kbd:`Control-h`" msgstr "" -#: library/curses.rst:1921 +#: library/curses.rst:1985 msgid "" "All other keystrokes are treated as a command to insert the given character " "and move right (with line wrapping)." msgstr "" -#: library/curses.rst:1927 +#: library/curses.rst:1991 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:1933 +#: library/curses.rst:1997 msgid "" "This attribute is a flag which controls the interpretation of blanks in the " "window. When it is on, trailing blanks on each line are ignored; any cursor " diff --git a/library/custominterp.po b/library/custominterp.po index f92890517..0935e63f2 100644 --- a/library/custominterp.po +++ b/library/custominterp.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/dataclasses.po b/library/dataclasses.po index ad8055f9e..962d8db23 100644 --- a/library/dataclasses.po +++ b/library/dataclasses.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -163,18 +163,43 @@ msgstr "" #: library/dataclasses.rst:105 msgid "" "*eq*: If true (the default), an :meth:`~object.__eq__` method will be " -"generated. This method compares the class as if it were a tuple of its " -"fields, in order. Both instances in the comparison must be of the identical " -"type." +"generated." +msgstr "" + +#: library/dataclasses.rst:108 +msgid "" +"This method compares the class by comparing each field in order. Both " +"instances in the comparison must be of the identical type." msgstr "" -#: library/dataclasses.rst:110 +#: library/dataclasses.rst:111 msgid "" "If the class already defines :meth:`!__eq__`, this parameter is ignored." msgstr "" #: library/dataclasses.rst:113 msgid "" +"The generated ``__eq__`` method now compares each field individually (for " +"example, ``self.a == other.a and self.b == other.b``), rather than comparing " +"tuples of fields as in previous versions." +msgstr "" + +#: library/dataclasses.rst:118 +msgid "" +"This change makes the comparison faster but it may alter results in cases " +"where attributes compare equal by identity but not by value (such as " +"``float('nan')``)." +msgstr "" + +#: library/dataclasses.rst:122 +msgid "" +"In Python 3.12 and earlier, the comparison was performed by creating tuples " +"of the fields and comparing them (for example, ``(self.a, self.b) == (other." +"a, other.b)``)." +msgstr "" + +#: library/dataclasses.rst:126 +msgid "" "*order*: If true (the default is ``False``), :meth:`~object.__lt__`, :meth:" "`~object.__le__`, :meth:`~object.__gt__`, and :meth:`~object.__ge__` methods " "will be generated. These compare the class as if it were a tuple of its " @@ -182,13 +207,13 @@ msgid "" "type. If *order* is true and *eq* is false, a :exc:`ValueError` is raised." msgstr "" -#: library/dataclasses.rst:120 +#: library/dataclasses.rst:133 msgid "" "If the class already defines any of :meth:`!__lt__`, :meth:`!__le__`, :meth:" "`!__gt__`, or :meth:`!__ge__`, then :exc:`TypeError` is raised." msgstr "" -#: library/dataclasses.rst:124 +#: library/dataclasses.rst:137 msgid "" "*unsafe_hash*: If true, force ``dataclasses`` to create a :meth:`~object." "__hash__` method, even though it may not be safe to do so. Otherwise, " @@ -196,7 +221,7 @@ msgid "" "*frozen* are set. The default value is ``False``." msgstr "" -#: library/dataclasses.rst:130 +#: library/dataclasses.rst:143 msgid "" ":meth:`!__hash__` is used by built-in :meth:`hash`, and when objects are " "added to hashed collections such as dictionaries and sets. Having a :meth:`!" @@ -206,7 +231,7 @@ msgid "" "flags in the ``@dataclass`` decorator." msgstr "" -#: library/dataclasses.rst:137 +#: library/dataclasses.rst:150 msgid "" "By default, ``@dataclass`` will not implicitly add a :meth:`~object." "__hash__` method unless it is safe to do so. Neither will it add or change " @@ -215,7 +240,7 @@ msgid "" "in the :meth:`!__hash__` documentation." msgstr "" -#: library/dataclasses.rst:143 +#: library/dataclasses.rst:156 msgid "" "If :meth:`!__hash__` is not explicitly defined, or if it is set to ``None``, " "then ``@dataclass`` *may* add an implicit :meth:`!__hash__` method. Although " @@ -225,7 +250,7 @@ msgid "" "and should be considered carefully." msgstr "" -#: library/dataclasses.rst:150 +#: library/dataclasses.rst:163 msgid "" "Here are the rules governing implicit creation of a :meth:`!__hash__` " "method. Note that you cannot both have an explicit :meth:`!__hash__` method " @@ -233,7 +258,7 @@ msgid "" "`TypeError`." msgstr "" -#: library/dataclasses.rst:155 +#: library/dataclasses.rst:168 msgid "" "If *eq* and *frozen* are both true, by default ``@dataclass`` will generate " "a :meth:`!__hash__` method for you. If *eq* is true and *frozen* is false, :" @@ -244,20 +269,20 @@ msgid "" "id-based hashing)." msgstr "" -#: library/dataclasses.rst:163 +#: library/dataclasses.rst:176 msgid "" "*frozen*: If true (the default is ``False``), assigning to fields will " "generate an exception. This emulates read-only frozen instances. See the :" "ref:`discussion ` below." msgstr "" -#: library/dataclasses.rst:167 +#: library/dataclasses.rst:180 msgid "" "If :meth:`~object.__setattr__` or :meth:`~object.__delattr__` is defined in " "the class and *frozen* is true, then :exc:`TypeError` is raised." msgstr "" -#: library/dataclasses.rst:170 +#: library/dataclasses.rst:183 msgid "" "*match_args*: If true (the default is ``True``), the :attr:`~object." "__match_args__` tuple will be created from the list of non keyword-only " @@ -267,7 +292,7 @@ msgid "" "__match_args__` will not be generated." msgstr "" -#: library/dataclasses.rst:179 +#: library/dataclasses.rst:192 msgid "" "*kw_only*: If true (the default value is ``False``), then all fields will be " "marked as keyword-only. If a field is marked as keyword-only, then the only " @@ -277,11 +302,11 @@ msgid "" "the :const:`KW_ONLY` section." msgstr "" -#: library/dataclasses.rst:187 +#: library/dataclasses.rst:200 msgid "Keyword-only fields are not included in :attr:`!__match_args__`." msgstr "" -#: library/dataclasses.rst:191 +#: library/dataclasses.rst:204 msgid "" "*slots*: If true (the default is ``False``), :attr:`~object.__slots__` " "attribute will be generated and new class will be returned instead of the " @@ -289,7 +314,7 @@ msgid "" "exc:`TypeError` is raised." msgstr "" -#: library/dataclasses.rst:197 +#: library/dataclasses.rst:210 msgid "" "Calling no-arg :func:`super` in dataclasses using ``slots=True`` will result " "in the following exception being raised: ``TypeError: super(type, obj): obj " @@ -297,7 +322,7 @@ msgid "" "valid workaround. See :gh:`90562` for full details." msgstr "" -#: library/dataclasses.rst:204 +#: library/dataclasses.rst:217 msgid "" "Passing parameters to a base class :meth:`~object.__init_subclass__` when " "using ``slots=True`` will result in a :exc:`TypeError`. Either use " @@ -305,7 +330,7 @@ msgid "" "workaround. See :gh:`91126` for full details." msgstr "" -#: library/dataclasses.rst:212 +#: library/dataclasses.rst:225 msgid "" "If a field name is already included in the :attr:`!__slots__` of a base " "class, it will not be included in the generated :attr:`!__slots__` to " @@ -315,7 +340,7 @@ msgid "" "`!__slots__` may be any iterable, but *not* an iterator." msgstr "" -#: library/dataclasses.rst:222 +#: library/dataclasses.rst:235 msgid "" "*weakref_slot*: If true (the default is ``False``), add a slot named " "\"__weakref__\", which is required to make an instance :func:`weakref-able " @@ -323,13 +348,13 @@ msgid "" "specifying ``slots=True``." msgstr "" -#: library/dataclasses.rst:230 +#: library/dataclasses.rst:243 msgid "" "``field``\\s may optionally specify a default value, using normal Python " "syntax::" msgstr "" -#: library/dataclasses.rst:233 +#: library/dataclasses.rst:246 msgid "" "@dataclass\n" "class C:\n" @@ -337,24 +362,24 @@ msgid "" " b: int = 0 # assign a default value for 'b'" msgstr "" -#: library/dataclasses.rst:238 +#: library/dataclasses.rst:251 msgid "" "In this example, both :attr:`!a` and :attr:`!b` will be included in the " "added :meth:`~object.__init__` method, which will be defined as::" msgstr "" -#: library/dataclasses.rst:241 +#: library/dataclasses.rst:254 msgid "def __init__(self, a: int, b: int = 0):" msgstr "" -#: library/dataclasses.rst:243 +#: library/dataclasses.rst:256 msgid "" ":exc:`TypeError` will be raised if a field without a default value follows a " "field with a default value. This is true whether this occurs in a single " "class, or as a result of class inheritance." msgstr "" -#: library/dataclasses.rst:249 +#: library/dataclasses.rst:262 msgid "" "For common and simple use cases, no other functionality is required. There " "are, however, some dataclass features that require additional per-field " @@ -363,7 +388,7 @@ msgid "" "function. For example::" msgstr "" -#: library/dataclasses.rst:255 +#: library/dataclasses.rst:268 msgid "" "@dataclass\n" "class C:\n" @@ -373,7 +398,7 @@ msgid "" "c.mylist += [1, 2, 3]" msgstr "" -#: library/dataclasses.rst:262 +#: library/dataclasses.rst:275 msgid "" "As shown above, the :const:`MISSING` value is a sentinel object used to " "detect if some parameters are provided by the user. This sentinel is used " @@ -381,18 +406,18 @@ msgid "" "meaning. No code should directly use the :const:`MISSING` value." msgstr "" -#: library/dataclasses.rst:267 +#: library/dataclasses.rst:280 msgid "The parameters to :func:`!field` are:" msgstr "" -#: library/dataclasses.rst:269 +#: library/dataclasses.rst:282 msgid "" "*default*: If provided, this will be the default value for this field. This " "is needed because the :func:`!field` call itself replaces the normal " "position of the default value." msgstr "" -#: library/dataclasses.rst:273 +#: library/dataclasses.rst:286 msgid "" "*default_factory*: If provided, it must be a zero-argument callable that " "will be called when a default value is needed for this field. Among other " @@ -401,19 +426,19 @@ msgid "" "*default_factory*." msgstr "" -#: library/dataclasses.rst:279 +#: library/dataclasses.rst:292 msgid "" "*init*: If true (the default), this field is included as a parameter to the " "generated :meth:`~object.__init__` method." msgstr "" -#: library/dataclasses.rst:282 +#: library/dataclasses.rst:295 msgid "" "*repr*: If true (the default), this field is included in the string returned " "by the generated :meth:`~object.__repr__` method." msgstr "" -#: library/dataclasses.rst:285 +#: library/dataclasses.rst:298 msgid "" "*hash*: This can be a bool or ``None``. If true, this field is included in " "the generated :meth:`~object.__hash__` method. If false, this field is " @@ -424,7 +449,7 @@ msgid "" "discouraged." msgstr "" -#: library/dataclasses.rst:293 +#: library/dataclasses.rst:306 msgid "" "One possible reason to set ``hash=False`` but ``compare=True`` would be if a " "field is expensive to compute a hash value for, that field is needed for " @@ -433,14 +458,14 @@ msgid "" "used for comparisons." msgstr "" -#: library/dataclasses.rst:299 +#: library/dataclasses.rst:312 msgid "" "*compare*: If true (the default), this field is included in the generated " "equality and comparison methods (:meth:`~object.__eq__`, :meth:`~object." "__gt__`, et al.)." msgstr "" -#: library/dataclasses.rst:303 +#: library/dataclasses.rst:316 msgid "" "*metadata*: This can be a mapping or ``None``. ``None`` is treated as an " "empty dict. This value is wrapped in :func:`~types.MappingProxyType` to " @@ -450,17 +475,17 @@ msgid "" "namespace in the metadata." msgstr "" -#: library/dataclasses.rst:311 +#: library/dataclasses.rst:324 msgid "" "*kw_only*: If true, this field will be marked as keyword-only. This is used " "when the generated :meth:`~object.__init__` method's parameters are computed." msgstr "" -#: library/dataclasses.rst:315 +#: library/dataclasses.rst:328 msgid "Keyword-only fields are also not included in :attr:`!__match_args__`." msgstr "" -#: library/dataclasses.rst:319 +#: library/dataclasses.rst:332 msgid "" "If the default value of a field is specified by a call to :func:`!field`, " "then the class attribute for this field will be replaced by the specified " @@ -471,7 +496,7 @@ msgid "" "after::" msgstr "" -#: library/dataclasses.rst:328 +#: library/dataclasses.rst:341 msgid "" "@dataclass\n" "class C:\n" @@ -481,14 +506,14 @@ msgid "" " t: int = 20" msgstr "" -#: library/dataclasses.rst:335 +#: library/dataclasses.rst:348 msgid "" "The class attribute :attr:`!C.z` will be ``10``, the class attribute :attr:`!" "C.t` will be ``20``, and the class attributes :attr:`!C.x` and :attr:`!C.y` " "will not be set." msgstr "" -#: library/dataclasses.rst:341 +#: library/dataclasses.rst:354 msgid "" ":class:`!Field` objects describe each defined field. These objects are " "created internally, and are returned by the :func:`fields` module-level " @@ -496,28 +521,28 @@ msgid "" "directly. Its documented attributes are:" msgstr "" -#: library/dataclasses.rst:346 +#: library/dataclasses.rst:359 msgid ":attr:`!name`: The name of the field." msgstr "" -#: library/dataclasses.rst:347 +#: library/dataclasses.rst:360 msgid ":attr:`!type`: The type of the field." msgstr "" -#: library/dataclasses.rst:348 +#: library/dataclasses.rst:361 msgid "" ":attr:`!default`, :attr:`!default_factory`, :attr:`!init`, :attr:`!repr`, :" "attr:`!hash`, :attr:`!compare`, :attr:`!metadata`, and :attr:`!kw_only` have " "the identical meaning and values as they do in the :func:`field` function." msgstr "" -#: library/dataclasses.rst:352 +#: library/dataclasses.rst:365 msgid "" "Other attributes may exist, but they are private and must not be inspected " "or relied on." msgstr "" -#: library/dataclasses.rst:357 +#: library/dataclasses.rst:370 msgid "" "``InitVar[T]`` type annotations describe variables that are :ref:`init-only " "`. Fields annotated with :class:`!InitVar` " @@ -526,7 +551,7 @@ msgid "" "meth:`~object.__init__` and an optional :meth:`__post_init__`." msgstr "" -#: library/dataclasses.rst:366 +#: library/dataclasses.rst:379 msgid "" "Returns a tuple of :class:`Field` objects that define the fields for this " "dataclass. Accepts either a dataclass, or an instance of a dataclass. " @@ -534,7 +559,7 @@ msgid "" "not return pseudo-fields which are ``ClassVar`` or ``InitVar``." msgstr "" -#: library/dataclasses.rst:373 +#: library/dataclasses.rst:386 msgid "" "Converts the dataclass *obj* to a dict (by using the factory function " "*dict_factory*). Each dataclass is converted to a dict of its fields, as " @@ -542,11 +567,11 @@ msgid "" "into. Other objects are copied with :func:`copy.deepcopy`." msgstr "" -#: library/dataclasses.rst:379 +#: library/dataclasses.rst:392 msgid "Example of using :func:`!asdict` on nested dataclasses::" msgstr "" -#: library/dataclasses.rst:381 +#: library/dataclasses.rst:394 msgid "" "@dataclass\n" "class Point:\n" @@ -564,20 +589,20 @@ msgid "" "assert asdict(c) == {'mylist': [{'x': 0, 'y': 0}, {'x': 10, 'y': 4}]}" msgstr "" -#: library/dataclasses.rst:416 +#: library/dataclasses.rst:429 msgid "To create a shallow copy, the following workaround may be used::" msgstr "" -#: library/dataclasses.rst:398 +#: library/dataclasses.rst:411 msgid "{field.name: getattr(obj, field.name) for field in fields(obj)}" msgstr "" -#: library/dataclasses.rst:400 +#: library/dataclasses.rst:413 msgid "" ":func:`!asdict` raises :exc:`TypeError` if *obj* is not a dataclass instance." msgstr "" -#: library/dataclasses.rst:405 +#: library/dataclasses.rst:418 msgid "" "Converts the dataclass *obj* to a tuple (by using the factory function " "*tuple_factory*). Each dataclass is converted to a tuple of its field " @@ -585,27 +610,27 @@ msgid "" "objects are copied with :func:`copy.deepcopy`." msgstr "" -#: library/dataclasses.rst:411 +#: library/dataclasses.rst:424 msgid "Continuing from the previous example::" msgstr "" -#: library/dataclasses.rst:413 +#: library/dataclasses.rst:426 msgid "" "assert astuple(p) == (10, 20)\n" "assert astuple(c) == ([(0, 0), (10, 4)],)" msgstr "" -#: library/dataclasses.rst:418 +#: library/dataclasses.rst:431 msgid "tuple(getattr(obj, field.name) for field in dataclasses.fields(obj))" msgstr "" -#: library/dataclasses.rst:420 +#: library/dataclasses.rst:433 msgid "" ":func:`!astuple` raises :exc:`TypeError` if *obj* is not a dataclass " "instance." msgstr "" -#: library/dataclasses.rst:425 +#: library/dataclasses.rst:438 msgid "" "Creates a new dataclass with name *cls_name*, fields as defined in *fields*, " "base classes as given in *bases*, and initialized with a namespace as given " @@ -617,13 +642,13 @@ msgid "" "`dataclass`." msgstr "" -#: library/dataclasses.rst:435 +#: library/dataclasses.rst:448 msgid "" "If *module* is defined, the :attr:`!__module__` attribute of the dataclass " "is set to that value. By default, it is set to the module name of the caller." msgstr "" -#: library/dataclasses.rst:439 +#: library/dataclasses.rst:452 msgid "" "This function is not strictly required, because any Python mechanism for " "creating a new class with :attr:`!__annotations__` can then apply the :deco:" @@ -631,7 +656,7 @@ msgid "" "provided as a convenience. For example::" msgstr "" -#: library/dataclasses.rst:445 +#: library/dataclasses.rst:458 msgid "" "C = make_dataclass('C',\n" " [('x', int),\n" @@ -640,11 +665,11 @@ msgid "" " namespace={'add_one': lambda self: self.x + 1})" msgstr "" -#: library/dataclasses.rst:451 +#: library/dataclasses.rst:464 msgid "Is equivalent to::" msgstr "" -#: library/dataclasses.rst:453 +#: library/dataclasses.rst:466 msgid "" "@dataclass\n" "class C:\n" @@ -656,7 +681,7 @@ msgid "" " return self.x + 1" msgstr "" -#: library/dataclasses.rst:464 +#: library/dataclasses.rst:477 msgid "" "Creates a new object of the same type as *obj*, replacing fields with values " "from *changes*. If *obj* is not a Data Class, raises :exc:`TypeError`. If " @@ -664,27 +689,27 @@ msgid "" "`TypeError`." msgstr "" -#: library/dataclasses.rst:469 +#: library/dataclasses.rst:482 msgid "" "The newly returned object is created by calling the :meth:`~object.__init__` " "method of the dataclass. This ensures that :meth:`__post_init__`, if " "present, is also called." msgstr "" -#: library/dataclasses.rst:473 +#: library/dataclasses.rst:486 msgid "" "Init-only variables without default values, if any exist, must be specified " "on the call to :func:`!replace` so that they can be passed to :meth:`!" "__init__` and :meth:`__post_init__`." msgstr "" -#: library/dataclasses.rst:477 +#: library/dataclasses.rst:490 msgid "" "It is an error for *changes* to contain any fields that are defined as " "having ``init=False``. A :exc:`ValueError` will be raised in this case." msgstr "" -#: library/dataclasses.rst:481 +#: library/dataclasses.rst:494 msgid "" "Be forewarned about how ``init=False`` fields work during a call to :func:`!" "replace`. They are not copied from the source object, but rather are " @@ -695,36 +720,37 @@ msgid "" "instance copying." msgstr "" -#: library/dataclasses.rst:490 +#: library/dataclasses.rst:503 msgid "" "Dataclass instances are also supported by generic function :func:`copy." "replace`." msgstr "" -#: library/dataclasses.rst:494 +#: library/dataclasses.rst:507 msgid "" "Return ``True`` if its parameter is a dataclass (including subclasses of a " -"dataclass) or an instance of one, otherwise return ``False``." +"dataclass, but not including :ref:`generic aliases `) or " +"an instance of one, otherwise return ``False``." msgstr "" -#: library/dataclasses.rst:497 +#: library/dataclasses.rst:511 msgid "" "If you need to know if a class is an instance of a dataclass (and not a " "dataclass itself), then add a further check for ``not isinstance(obj, " "type)``::" msgstr "" -#: library/dataclasses.rst:501 +#: library/dataclasses.rst:515 msgid "" "def is_dataclass_instance(obj):\n" " return is_dataclass(obj) and not isinstance(obj, type)" msgstr "" -#: library/dataclasses.rst:506 +#: library/dataclasses.rst:520 msgid "A sentinel value signifying a missing default or default_factory." msgstr "" -#: library/dataclasses.rst:510 +#: library/dataclasses.rst:524 msgid "" "A sentinel value used as a type annotation. Any fields after a pseudo-field " "with the type of :const:`!KW_ONLY` are marked as keyword-only fields. Note " @@ -735,13 +761,13 @@ msgid "" "the class is instantiated." msgstr "" -#: library/dataclasses.rst:519 +#: library/dataclasses.rst:533 msgid "" "In this example, the fields ``y`` and ``z`` will be marked as keyword-only " "fields::" msgstr "" -#: library/dataclasses.rst:521 +#: library/dataclasses.rst:535 msgid "" "@dataclass\n" "class Point:\n" @@ -753,24 +779,24 @@ msgid "" "p = Point(0, y=1.5, z=2.0)" msgstr "" -#: library/dataclasses.rst:530 +#: library/dataclasses.rst:544 msgid "" "In a single dataclass, it is an error to specify more than one field whose " "type is :const:`!KW_ONLY`." msgstr "" -#: library/dataclasses.rst:537 +#: library/dataclasses.rst:551 msgid "" "Raised when an implicitly defined :meth:`~object.__setattr__` or :meth:" "`~object.__delattr__` is called on a dataclass which was defined with " "``frozen=True``. It is a subclass of :exc:`AttributeError`." msgstr "" -#: library/dataclasses.rst:544 +#: library/dataclasses.rst:558 msgid "Post-init processing" msgstr "" -#: library/dataclasses.rst:548 +#: library/dataclasses.rst:562 msgid "" "When defined on the class, it will be called by the generated :meth:`~object." "__init__`, normally as :meth:`!self.__post_init__`. However, if any " @@ -780,13 +806,13 @@ msgid "" "automatically be called." msgstr "" -#: library/dataclasses.rst:555 +#: library/dataclasses.rst:569 msgid "" "Among other uses, this allows for initializing field values that depend on " "one or more other fields. For example::" msgstr "" -#: library/dataclasses.rst:558 +#: library/dataclasses.rst:572 msgid "" "@dataclass\n" "class C:\n" @@ -798,7 +824,7 @@ msgid "" " self.c = self.a + self.b" msgstr "" -#: library/dataclasses.rst:567 +#: library/dataclasses.rst:581 msgid "" "The :meth:`~object.__init__` method generated by :deco:`dataclass` does not " "call base class :meth:`!__init__` methods. If the base class has an :meth:`!" @@ -806,7 +832,7 @@ msgid "" "a :meth:`__post_init__` method::" msgstr "" -#: library/dataclasses.rst:572 +#: library/dataclasses.rst:586 msgid "" "class Rectangle:\n" " def __init__(self, height, width):\n" @@ -821,25 +847,25 @@ msgid "" " super().__init__(self.side, self.side)" msgstr "" -#: library/dataclasses.rst:584 +#: library/dataclasses.rst:598 msgid "" "Note, however, that in general the dataclass-generated :meth:`!__init__` " "methods don't need to be called, since the derived dataclass will take care " "of initializing all fields of any base class that is a dataclass itself." msgstr "" -#: library/dataclasses.rst:588 +#: library/dataclasses.rst:602 msgid "" "See the section below on init-only variables for ways to pass parameters to :" "meth:`!__post_init__`. Also see the warning about how :func:`replace` " "handles ``init=False`` fields." msgstr "" -#: library/dataclasses.rst:595 +#: library/dataclasses.rst:609 msgid "Class variables" msgstr "" -#: library/dataclasses.rst:597 +#: library/dataclasses.rst:611 msgid "" "One of the few places where :deco:`dataclass` actually inspects the type of " "a field is to determine if a field is a class variable as defined in :pep:" @@ -849,11 +875,11 @@ msgid "" "pseudo-fields are not returned by the module-level :func:`fields` function." msgstr "" -#: library/dataclasses.rst:608 +#: library/dataclasses.rst:622 msgid "Init-only variables" msgstr "" -#: library/dataclasses.rst:610 +#: library/dataclasses.rst:624 msgid "" "Another place where :deco:`dataclass` inspects a type annotation is to " "determine if a field is an init-only variable. It does this by seeing if " @@ -865,13 +891,13 @@ msgid "" "`__post_init__` method. They are not otherwise used by dataclasses." msgstr "" -#: library/dataclasses.rst:620 +#: library/dataclasses.rst:634 msgid "" "For example, suppose a field will be initialized from a database, if a value " "is not provided when creating the class::" msgstr "" -#: library/dataclasses.rst:623 +#: library/dataclasses.rst:637 msgid "" "@dataclass\n" "class C:\n" @@ -886,17 +912,17 @@ msgid "" "c = C(10, database=my_database)" msgstr "" -#: library/dataclasses.rst:635 +#: library/dataclasses.rst:649 msgid "" "In this case, :func:`fields` will return :class:`Field` objects for :attr:`!" "i` and :attr:`!j`, but not for :attr:`!database`." msgstr "" -#: library/dataclasses.rst:641 +#: library/dataclasses.rst:655 msgid "Frozen instances" msgstr "" -#: library/dataclasses.rst:643 +#: library/dataclasses.rst:657 msgid "" "It is not possible to create truly immutable Python objects. However, by " "passing ``frozen=True`` to the :deco:`dataclass` decorator you can emulate " @@ -905,18 +931,18 @@ msgid "" "methods will raise a :exc:`FrozenInstanceError` when invoked." msgstr "" -#: library/dataclasses.rst:649 +#: library/dataclasses.rst:663 msgid "" "There is a tiny performance penalty when using ``frozen=True``: :meth:" "`~object.__init__` cannot use simple assignment to initialize fields, and " "must use :meth:`!object.__setattr__`." msgstr "" -#: library/dataclasses.rst:658 +#: library/dataclasses.rst:672 msgid "Inheritance" msgstr "" -#: library/dataclasses.rst:660 +#: library/dataclasses.rst:674 msgid "" "When the dataclass is being created by the :deco:`dataclass` decorator, it " "looks through all of the class's base classes in reverse MRO (that is, " @@ -928,7 +954,7 @@ msgid "" "derived classes override base classes. An example::" msgstr "" -#: library/dataclasses.rst:670 +#: library/dataclasses.rst:684 msgid "" "@dataclass\n" "class Base:\n" @@ -941,28 +967,28 @@ msgid "" " x: int = 15" msgstr "" -#: library/dataclasses.rst:680 +#: library/dataclasses.rst:694 msgid "" "The final list of fields is, in order, :attr:`!x`, :attr:`!y`, :attr:`!z`. " "The final type of :attr:`!x` is :class:`int`, as specified in class :class:`!" "C`." msgstr "" -#: library/dataclasses.rst:683 +#: library/dataclasses.rst:697 msgid "" "The generated :meth:`~object.__init__` method for :class:`!C` will look " "like::" msgstr "" -#: library/dataclasses.rst:685 +#: library/dataclasses.rst:699 msgid "def __init__(self, x: int = 15, y: int = 0, z: int = 10):" msgstr "" -#: library/dataclasses.rst:688 +#: library/dataclasses.rst:702 msgid "Re-ordering of keyword-only parameters in :meth:`!__init__`" msgstr "" -#: library/dataclasses.rst:690 +#: library/dataclasses.rst:704 msgid "" "After the parameters needed for :meth:`~object.__init__` are computed, any " "keyword-only parameters are moved to come after all regular (non-keyword-" @@ -970,14 +996,14 @@ msgid "" "implemented in Python: they must come after non-keyword-only parameters." msgstr "" -#: library/dataclasses.rst:696 +#: library/dataclasses.rst:710 msgid "" "In this example, :attr:`!Base.y`, :attr:`!Base.w`, and :attr:`!D.t` are " "keyword-only fields, and :attr:`!Base.x` and :attr:`!D.z` are regular " "fields::" msgstr "" -#: library/dataclasses.rst:699 +#: library/dataclasses.rst:713 msgid "" "@dataclass\n" "class Base:\n" @@ -992,45 +1018,45 @@ msgid "" " t: int = field(kw_only=True, default=0)" msgstr "" -#: library/dataclasses.rst:711 +#: library/dataclasses.rst:725 msgid "The generated :meth:`!__init__` method for :class:`!D` will look like::" msgstr "" -#: library/dataclasses.rst:713 +#: library/dataclasses.rst:727 msgid "" "def __init__(self, x: Any = 15.0, z: int = 10, *, y: int = 0, w: int = 1, t: " "int = 0):" msgstr "" -#: library/dataclasses.rst:715 +#: library/dataclasses.rst:729 msgid "" "Note that the parameters have been re-ordered from how they appear in the " "list of fields: parameters derived from regular fields are followed by " "parameters derived from keyword-only fields." msgstr "" -#: library/dataclasses.rst:719 +#: library/dataclasses.rst:733 msgid "" "The relative ordering of keyword-only parameters is maintained in the re-" "ordered :meth:`!__init__` parameter list." msgstr "" -#: library/dataclasses.rst:724 +#: library/dataclasses.rst:738 msgid "Default factory functions" msgstr "" -#: library/dataclasses.rst:726 +#: library/dataclasses.rst:740 msgid "" "If a :func:`field` specifies a *default_factory*, it is called with zero " "arguments when a default value for the field is needed. For example, to " "create a new instance of a list, use::" msgstr "" -#: library/dataclasses.rst:730 +#: library/dataclasses.rst:744 msgid "mylist: list = field(default_factory=list)" msgstr "" -#: library/dataclasses.rst:732 +#: library/dataclasses.rst:746 msgid "" "If a field is excluded from :meth:`~object.__init__` (using ``init=False``) " "and the field also specifies *default_factory*, then the default factory " @@ -1039,17 +1065,17 @@ msgid "" "initial value." msgstr "" -#: library/dataclasses.rst:739 +#: library/dataclasses.rst:753 msgid "Mutable default values" msgstr "" -#: library/dataclasses.rst:741 +#: library/dataclasses.rst:755 msgid "" "Python stores default member variable values in class attributes. Consider " "this example, not using dataclasses::" msgstr "" -#: library/dataclasses.rst:744 +#: library/dataclasses.rst:758 msgid "" "class C:\n" " x = []\n" @@ -1064,17 +1090,17 @@ msgid "" "assert o1.x is o2.x" msgstr "" -#: library/dataclasses.rst:756 +#: library/dataclasses.rst:770 msgid "" "Note that the two instances of class :class:`!C` share the same class " "variable :attr:`!x`, as expected." msgstr "" -#: library/dataclasses.rst:759 +#: library/dataclasses.rst:773 msgid "Using dataclasses, *if* this code was valid::" msgstr "" -#: library/dataclasses.rst:761 +#: library/dataclasses.rst:775 msgid "" "@dataclass\n" "class D:\n" @@ -1083,11 +1109,11 @@ msgid "" " self.x.append(element)" msgstr "" -#: library/dataclasses.rst:767 +#: library/dataclasses.rst:781 msgid "it would generate code similar to::" msgstr "" -#: library/dataclasses.rst:769 +#: library/dataclasses.rst:783 msgid "" "class D:\n" " x = []\n" @@ -1099,7 +1125,7 @@ msgid "" "assert D().x is D().x" msgstr "" -#: library/dataclasses.rst:778 +#: library/dataclasses.rst:792 msgid "" "This has the same issue as the original example using class :class:`!C`. " "That is, two instances of class :class:`!D` that do not specify a value for :" @@ -1112,13 +1138,13 @@ msgid "" "solution, but it does protect against many common errors." msgstr "" -#: library/dataclasses.rst:789 +#: library/dataclasses.rst:803 msgid "" "Using default factory functions is a way to create new instances of mutable " "types as default values for fields::" msgstr "" -#: library/dataclasses.rst:792 +#: library/dataclasses.rst:806 msgid "" "@dataclass\n" "class D:\n" @@ -1127,38 +1153,38 @@ msgid "" "assert D().x is not D().x" msgstr "" -#: library/dataclasses.rst:798 +#: library/dataclasses.rst:812 msgid "" "Instead of looking for and disallowing objects of type :class:`list`, :class:" "`dict`, or :class:`set`, unhashable objects are now not allowed as default " "values. Unhashability is used to approximate mutability." msgstr "" -#: library/dataclasses.rst:805 +#: library/dataclasses.rst:819 msgid "Descriptor-typed fields" msgstr "" -#: library/dataclasses.rst:807 +#: library/dataclasses.rst:821 msgid "" "Fields that are assigned :ref:`descriptor objects ` as their " "default value have the following special behaviors:" msgstr "" -#: library/dataclasses.rst:810 +#: library/dataclasses.rst:824 msgid "" "The value for the field passed to the dataclass's :meth:`~object.__init__` " "method is passed to the descriptor's :meth:`~object.__set__` method rather " "than overwriting the descriptor object." msgstr "" -#: library/dataclasses.rst:814 +#: library/dataclasses.rst:828 msgid "" "Similarly, when getting or setting the field, the descriptor's :meth:" "`~object.__get__` or :meth:`!__set__` method is called rather than returning " "or overwriting the descriptor object." msgstr "" -#: library/dataclasses.rst:818 +#: library/dataclasses.rst:832 msgid "" "To determine whether a field contains a default value, :deco:`dataclass` " "will call the descriptor's :meth:`!__get__` method using its class access " @@ -1168,7 +1194,7 @@ msgid "" "default value will be provided for the field." msgstr "" -#: library/dataclasses.rst:828 +#: library/dataclasses.rst:842 msgid "" "class IntConversionDescriptor:\n" " def __init__(self, *, default):\n" @@ -1197,7 +1223,7 @@ msgid "" "print(i.quantity_on_hand) # 2" msgstr "" -#: library/dataclasses.rst:853 +#: library/dataclasses.rst:867 msgid "" "Note that if a field is annotated with a descriptor type, but is not " "assigned a descriptor object as its default value, the field will act like a " diff --git a/library/datatypes.po b/library/datatypes.po index fe9b3367d..fe5dbfadc 100644 --- a/library/datatypes.po +++ b/library/datatypes.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/datetime.po b/library/datetime.po index 745cfb4eb..1a030c79a 100644 --- a/library/datetime.po +++ b/library/datetime.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -119,7 +119,7 @@ msgid "" "For applications requiring aware objects, :class:`.datetime` and :class:`." "time` objects have an optional time zone information attribute, :attr:`!" "tzinfo`, that can be set to an instance of a subclass of the abstract :class:" -"`tzinfo` class. These :class:`tzinfo` objects capture information about the " +"`!tzinfo` class. These :class:`tzinfo` objects capture information about the " "offset from UTC time, the time zone name, and whether daylight saving time " "is in effect." msgstr "" @@ -363,8 +363,8 @@ msgstr "" #: library/datetime.rst:232 msgid "" -">>> from datetime import timedelta\n" -">>> delta = timedelta(\n" +">>> import datetime as dt\n" +">>> delta = dt.timedelta(\n" "... days=50,\n" "... seconds=27,\n" "... microseconds=10,\n" @@ -378,7 +378,15 @@ msgid "" "datetime.timedelta(days=64, seconds=29156, microseconds=10)" msgstr "" -#: library/datetime.rst:246 +#: library/datetime.rst:247 +msgid "" +"``import datetime as dt`` instead of ``import datetime`` or ``from datetime " +"import datetime`` to avoid confusion between the module and the class. See " +"`How I Import Python’s datetime Module `__." +msgstr "" + +#: library/datetime.rst:252 msgid "" "If any argument is a float and there are fractional microseconds, the " "fractional microseconds left over from all arguments are combined and their " @@ -387,33 +395,33 @@ msgid "" "processes are exact (no information is lost)." msgstr "" -#: library/datetime.rst:253 +#: library/datetime.rst:259 msgid "" "If the normalized value of days lies outside the indicated range, :exc:" "`OverflowError` is raised." msgstr "" -#: library/datetime.rst:256 +#: library/datetime.rst:262 msgid "" "Note that normalization of negative values may be surprising at first. For " "example::" msgstr "" -#: library/datetime.rst:259 +#: library/datetime.rst:265 msgid "" -">>> from datetime import timedelta\n" -">>> d = timedelta(microseconds=-1)\n" +">>> import datetime as dt\n" +">>> d = dt.timedelta(microseconds=-1)\n" ">>> (d.days, d.seconds, d.microseconds)\n" "(-1, 86399, 999999)" msgstr "" -#: library/datetime.rst:264 +#: library/datetime.rst:270 msgid "" "Since the string representation of :class:`!timedelta` objects can be " "confusing, use the following recipe to produce a more readable format:" msgstr "" -#: library/datetime.rst:267 +#: library/datetime.rst:273 msgid "" ">>> def pretty_timedelta(td):\n" "... if td.days >= 0:\n" @@ -427,246 +435,246 @@ msgid "" "'-(1:00:00)'" msgstr "" -#: library/datetime.rst:582 library/datetime.rst:1780 library/datetime.rst:2385 +#: library/datetime.rst:588 library/datetime.rst:1786 library/datetime.rst:2399 msgid "Class attributes:" msgstr "" -#: library/datetime.rst:285 +#: library/datetime.rst:291 msgid "The most negative :class:`timedelta` object, ``timedelta(-999999999)``." msgstr "" -#: library/datetime.rst:290 +#: library/datetime.rst:296 msgid "" "The most positive :class:`timedelta` object, ``timedelta(days=999999999, " "hours=23, minutes=59, seconds=59, microseconds=999999)``." msgstr "" -#: library/datetime.rst:296 +#: library/datetime.rst:302 msgid "" "The smallest possible difference between non-equal :class:`timedelta` " "objects, ``timedelta(microseconds=1)``." msgstr "" -#: library/datetime.rst:299 +#: library/datetime.rst:305 msgid "" "Note that, because of normalization, ``timedelta.max`` is greater than ``-" "timedelta.min``. ``-timedelta.max`` is not representable as a :class:" "`timedelta` object." msgstr "" -#: library/datetime.rst:600 library/datetime.rst:1800 +#: library/datetime.rst:606 library/datetime.rst:1806 msgid "Instance attributes (read-only):" msgstr "" -#: library/datetime.rst:307 +#: library/datetime.rst:313 msgid "Between -999,999,999 and 999,999,999 inclusive." msgstr "" -#: library/datetime.rst:312 +#: library/datetime.rst:318 msgid "Between 0 and 86,399 inclusive." msgstr "" -#: library/datetime.rst:316 +#: library/datetime.rst:322 msgid "" "It is a somewhat common bug for code to unintentionally use this attribute " "when it is actually intended to get a :meth:`~timedelta.total_seconds` value " "instead:" msgstr "" -#: library/datetime.rst:320 +#: library/datetime.rst:326 msgid "" -">>> from datetime import timedelta\n" -">>> duration = timedelta(seconds=11235813)\n" +">>> import datetime as dt\n" +">>> duration = dt.timedelta(seconds=11235813)\n" ">>> duration.days, duration.seconds\n" "(130, 3813)\n" ">>> duration.total_seconds()\n" "11235813.0" msgstr "" -#: library/datetime.rst:331 +#: library/datetime.rst:337 msgid "Between 0 and 999,999 inclusive." msgstr "" -#: library/datetime.rst:617 library/datetime.rst:1215 +#: library/datetime.rst:623 library/datetime.rst:1221 msgid "Supported operations:" msgstr "" -#: library/datetime.rst:620 library/datetime.rst:1218 +#: library/datetime.rst:626 library/datetime.rst:1224 msgid "Operation" msgstr "" -#: library/datetime.rst:620 library/datetime.rst:1218 +#: library/datetime.rst:626 library/datetime.rst:1224 msgid "Result" msgstr "" -#: library/datetime.rst:341 +#: library/datetime.rst:347 msgid "``t1 = t2 + t3``" msgstr "" -#: library/datetime.rst:341 +#: library/datetime.rst:347 msgid "" "Sum of ``t2`` and ``t3``. Afterwards ``t1 - t2 == t3`` and ``t1 - t3 == t2`` " "are true. (1)" msgstr "" -#: library/datetime.rst:345 +#: library/datetime.rst:351 msgid "``t1 = t2 - t3``" msgstr "" -#: library/datetime.rst:345 +#: library/datetime.rst:351 msgid "" "Difference of ``t2`` and ``t3``. Afterwards ``t1 == t2 - t3`` and ``t2 == " "t1 + t3`` are true. (1)(6)" msgstr "" -#: library/datetime.rst:349 +#: library/datetime.rst:355 msgid "``t1 = t2 * i or t1 = i * t2``" msgstr "" -#: library/datetime.rst:349 +#: library/datetime.rst:355 msgid "" "Delta multiplied by an integer. Afterwards ``t1 // i == t2`` is true, " "provided ``i != 0``." msgstr "" -#: library/datetime.rst:353 +#: library/datetime.rst:359 msgid "In general, ``t1 * i == t1 * (i-1) + t1`` is true. (1)" msgstr "" -#: library/datetime.rst:356 +#: library/datetime.rst:362 msgid "``t1 = t2 * f or t1 = f * t2``" msgstr "" -#: library/datetime.rst:356 +#: library/datetime.rst:362 msgid "" "Delta multiplied by a float. The result is rounded to the nearest multiple " "of timedelta.resolution using round-half-to-even." msgstr "" -#: library/datetime.rst:360 +#: library/datetime.rst:366 msgid "``f = t2 / t3``" msgstr "" -#: library/datetime.rst:360 +#: library/datetime.rst:366 msgid "" "Division (3) of overall duration ``t2`` by interval unit ``t3``. Returns a :" "class:`float` object." msgstr "" -#: library/datetime.rst:364 +#: library/datetime.rst:370 msgid "``t1 = t2 / f or t1 = t2 / i``" msgstr "" -#: library/datetime.rst:364 +#: library/datetime.rst:370 msgid "" "Delta divided by a float or an int. The result is rounded to the nearest " "multiple of timedelta.resolution using round-half-to-even." msgstr "" -#: library/datetime.rst:368 +#: library/datetime.rst:374 msgid "``t1 = t2 // i`` or ``t1 = t2 // t3``" msgstr "" -#: library/datetime.rst:368 +#: library/datetime.rst:374 msgid "" "The floor is computed and the remainder (if any) is thrown away. In the " "second case, an integer is returned. (3)" msgstr "" -#: library/datetime.rst:372 +#: library/datetime.rst:378 msgid "``t1 = t2 % t3``" msgstr "" -#: library/datetime.rst:372 +#: library/datetime.rst:378 msgid "The remainder is computed as a :class:`timedelta` object. (3)" msgstr "" -#: library/datetime.rst:375 +#: library/datetime.rst:381 msgid "``q, r = divmod(t1, t2)``" msgstr "" -#: library/datetime.rst:375 +#: library/datetime.rst:381 msgid "" "Computes the quotient and the remainder: ``q = t1 // t2`` (3) and ``r = t1 % " "t2``. ``q`` is an integer and ``r`` is a :class:`timedelta` object." msgstr "" -#: library/datetime.rst:380 +#: library/datetime.rst:386 msgid "``+t1``" msgstr "" -#: library/datetime.rst:380 +#: library/datetime.rst:386 msgid "Returns a :class:`timedelta` object with the same value. (2)" msgstr "" -#: library/datetime.rst:383 +#: library/datetime.rst:389 msgid "``-t1``" msgstr "" -#: library/datetime.rst:383 +#: library/datetime.rst:389 msgid "" "Equivalent to ``timedelta(-t1.days, -t1.seconds, -t1.microseconds)``, and to " "``t1 * -1``. (1)(4)" msgstr "" -#: library/datetime.rst:387 +#: library/datetime.rst:393 msgid "``abs(t)``" msgstr "" -#: library/datetime.rst:387 +#: library/datetime.rst:393 msgid "" "Equivalent to ``+t`` when ``t.days >= 0``, and to ``-t`` when ``t.days < " "0``. (2)" msgstr "" -#: library/datetime.rst:390 +#: library/datetime.rst:396 msgid "``str(t)``" msgstr "" -#: library/datetime.rst:390 +#: library/datetime.rst:396 msgid "" "Returns a string in the form ``[D day[s], ][H]H:MM:SS[.UUUUUU]``, where D is " "negative for negative ``t``. (5)" msgstr "" -#: library/datetime.rst:394 +#: library/datetime.rst:400 msgid "``repr(t)``" msgstr "" -#: library/datetime.rst:394 +#: library/datetime.rst:400 msgid "" "Returns a string representation of the :class:`timedelta` object as a " "constructor call with canonical attribute values." msgstr "" -#: library/datetime.rst:639 library/datetime.rst:2616 +#: library/datetime.rst:645 library/datetime.rst:2670 msgid "Notes:" msgstr "" -#: library/datetime.rst:403 +#: library/datetime.rst:409 msgid "This is exact but may overflow." msgstr "" -#: library/datetime.rst:406 +#: library/datetime.rst:412 msgid "This is exact and cannot overflow." msgstr "" -#: library/datetime.rst:409 +#: library/datetime.rst:415 msgid "Division by zero raises :exc:`ZeroDivisionError`." msgstr "" -#: library/datetime.rst:412 +#: library/datetime.rst:418 msgid "``-timedelta.max`` is not representable as a :class:`timedelta` object." msgstr "" -#: library/datetime.rst:415 +#: library/datetime.rst:421 msgid "" "String representations of :class:`timedelta` objects are normalized " "similarly to their internal representation. This leads to somewhat unusual " "results for negative timedeltas. For example::" msgstr "" -#: library/datetime.rst:419 +#: library/datetime.rst:425 msgid "" ">>> timedelta(hours=-5)\n" "datetime.timedelta(days=-1, seconds=68400)\n" @@ -674,84 +682,84 @@ msgid "" "-1 day, 19:00:00" msgstr "" -#: library/datetime.rst:425 +#: library/datetime.rst:431 msgid "" "The expression ``t2 - t3`` will always be equal to the expression ``t2 + (-" "t3)`` except when t3 is equal to ``timedelta.max``; in that case the former " "will produce a result while the latter will overflow." msgstr "" -#: library/datetime.rst:429 +#: library/datetime.rst:435 msgid "" "In addition to the operations listed above, :class:`timedelta` objects " "support certain additions and subtractions with :class:`date` and :class:`." "datetime` objects (see below)." msgstr "" -#: library/datetime.rst:433 +#: library/datetime.rst:439 msgid "" "Floor division and true division of a :class:`timedelta` object by another :" -"class:`timedelta` object are now supported, as are remainder operations and " -"the :func:`divmod` function. True division and multiplication of a :class:" -"`timedelta` object by a :class:`float` object are now supported." +"class:`!timedelta` object are now supported, as are remainder operations and " +"the :func:`divmod` function. True division and multiplication of a :class:`!" +"timedelta` object by a :class:`float` object are now supported." msgstr "" -#: library/datetime.rst:439 +#: library/datetime.rst:445 msgid ":class:`timedelta` objects support equality and order comparisons." msgstr "" -#: library/datetime.rst:441 +#: library/datetime.rst:447 msgid "" "In Boolean contexts, a :class:`timedelta` object is considered to be true if " "and only if it isn't equal to ``timedelta(0)``." msgstr "" -#: library/datetime.rst:681 library/datetime.rst:1907 +#: library/datetime.rst:687 library/datetime.rst:1913 msgid "Instance methods:" msgstr "" -#: library/datetime.rst:448 +#: library/datetime.rst:454 msgid "" "Return the total number of seconds contained in the duration. Equivalent to " "``td / timedelta(seconds=1)``. For interval units other than seconds, use " "the division form directly (e.g. ``td / timedelta(microseconds=1)``)." msgstr "" -#: library/datetime.rst:452 +#: library/datetime.rst:458 msgid "" "Note that for very large time intervals (greater than 270 years on most " "platforms) this method will lose microsecond accuracy." msgstr "" -#: library/datetime.rst:458 +#: library/datetime.rst:464 msgid "Examples of usage: :class:`timedelta`" msgstr "" -#: library/datetime.rst:460 +#: library/datetime.rst:466 msgid "An additional example of normalization::" msgstr "" -#: library/datetime.rst:462 +#: library/datetime.rst:468 msgid "" ">>> # Components of another_year add up to exactly 365 days\n" -">>> from datetime import timedelta\n" -">>> year = timedelta(days=365)\n" -">>> another_year = timedelta(weeks=40, days=84, hours=23,\n" -"... minutes=50, seconds=600)\n" +">>> import datetime as dt\n" +">>> year = dt.timedelta(days=365)\n" +">>> another_year = dt.timedelta(weeks=40, days=84, hours=23,\n" +"... minutes=50, seconds=600)\n" ">>> year == another_year\n" "True\n" ">>> year.total_seconds()\n" "31536000.0" msgstr "" -#: library/datetime.rst:472 +#: library/datetime.rst:478 msgid "Examples of :class:`timedelta` arithmetic::" msgstr "" -#: library/datetime.rst:474 +#: library/datetime.rst:480 msgid "" -">>> from datetime import timedelta\n" -">>> year = timedelta(days=365)\n" +">>> import datetime as dt\n" +">>> year = dt.timedelta(days=365)\n" ">>> ten_years = 10 * year\n" ">>> ten_years\n" "datetime.timedelta(days=3650)\n" @@ -765,65 +773,65 @@ msgid "" "(datetime.timedelta(days=1095), 3)" msgstr "" -#: library/datetime.rst:491 +#: library/datetime.rst:497 msgid ":class:`date` Objects" msgstr "" -#: library/datetime.rst:493 +#: library/datetime.rst:499 msgid "" "A :class:`date` object represents a date (year, month and day) in an " "idealized calendar, the current Gregorian calendar indefinitely extended in " "both directions." msgstr "" -#: library/datetime.rst:497 +#: library/datetime.rst:503 msgid "" "January 1 of year 1 is called day number 1, January 2 of year 1 is called " "day number 2, and so on. [#]_" msgstr "" -#: library/datetime.rst:502 +#: library/datetime.rst:508 msgid "" "All arguments are required. Arguments must be integers, in the following " "ranges:" msgstr "" -#: library/datetime.rst:505 +#: library/datetime.rst:511 msgid "``MINYEAR <= year <= MAXYEAR``" msgstr "" -#: library/datetime.rst:506 +#: library/datetime.rst:512 msgid "``1 <= month <= 12``" msgstr "" -#: library/datetime.rst:507 +#: library/datetime.rst:513 msgid "``1 <= day <= number of days in the given month and year``" msgstr "" -#: library/datetime.rst:899 +#: library/datetime.rst:905 msgid "" "If an argument outside those ranges is given, :exc:`ValueError` is raised." msgstr "" -#: library/datetime.rst:904 +#: library/datetime.rst:910 msgid "Other constructors, all class methods:" msgstr "" -#: library/datetime.rst:516 +#: library/datetime.rst:522 msgid "Return the current local date." msgstr "" -#: library/datetime.rst:518 +#: library/datetime.rst:524 msgid "This is equivalent to ``date.fromtimestamp(time.time())``." msgstr "" -#: library/datetime.rst:522 +#: library/datetime.rst:528 msgid "" "Return the local date corresponding to the POSIX timestamp, such as is " "returned by :func:`time.time`." msgstr "" -#: library/datetime.rst:525 +#: library/datetime.rst:531 msgid "" "This may raise :exc:`OverflowError`, if the timestamp is out of the range of " "values supported by the platform C :c:func:`localtime` function, and :exc:" @@ -833,7 +841,7 @@ msgid "" "ignored by :meth:`fromtimestamp`." msgstr "" -#: library/datetime.rst:532 +#: library/datetime.rst:538 msgid "" "Raise :exc:`OverflowError` instead of :exc:`ValueError` if the timestamp is " "out of the range of values supported by the platform C :c:func:`localtime` " @@ -841,112 +849,112 @@ msgid "" "`localtime` failure." msgstr "" -#: library/datetime.rst:541 +#: library/datetime.rst:547 msgid "" "Return the date corresponding to the proleptic Gregorian ordinal, where " "January 1 of year 1 has ordinal 1." msgstr "" -#: library/datetime.rst:544 +#: library/datetime.rst:550 msgid "" ":exc:`ValueError` is raised unless ``1 <= ordinal <= date.max.toordinal()``. " "For any date ``d``, ``date.fromordinal(d.toordinal()) == d``." msgstr "" -#: library/datetime.rst:551 +#: library/datetime.rst:557 msgid "" "Return a :class:`date` corresponding to a *date_string* given in any valid " "ISO 8601 format, with the following exceptions:" msgstr "" -#: library/datetime.rst:1064 +#: library/datetime.rst:1070 msgid "" "Reduced precision dates are not currently supported (``YYYY-MM``, ``YYYY``)." msgstr "" -#: library/datetime.rst:1066 +#: library/datetime.rst:1072 msgid "" "Extended date representations are not currently supported (``±YYYYYY-MM-" "DD``)." msgstr "" -#: library/datetime.rst:1068 +#: library/datetime.rst:1074 msgid "Ordinal dates are not currently supported (``YYYY-OOO``)." msgstr "" -#: library/datetime.rst:1070 library/datetime.rst:1536 +#: library/datetime.rst:1076 library/datetime.rst:1542 msgid "Examples::" msgstr "" -#: library/datetime.rst:562 +#: library/datetime.rst:568 msgid "" -">>> from datetime import date\n" -">>> date.fromisoformat('2019-12-04')\n" +">>> import datetime as dt\n" +">>> dt.date.fromisoformat('2019-12-04')\n" "datetime.date(2019, 12, 4)\n" -">>> date.fromisoformat('20191204')\n" +">>> dt.date.fromisoformat('20191204')\n" "datetime.date(2019, 12, 4)\n" -">>> date.fromisoformat('2021-W01-1')\n" +">>> dt.date.fromisoformat('2021-W01-1')\n" "datetime.date(2021, 1, 4)" msgstr "" -#: library/datetime.rst:571 +#: library/datetime.rst:577 msgid "Previously, this method only supported the format ``YYYY-MM-DD``." msgstr "" -#: library/datetime.rst:576 +#: library/datetime.rst:582 msgid "" "Return a :class:`date` corresponding to the ISO calendar date specified by " "year, week and day. This is the inverse of the function :meth:`date." "isocalendar`." msgstr "" -#: library/datetime.rst:586 +#: library/datetime.rst:592 msgid "The earliest representable date, ``date(MINYEAR, 1, 1)``." msgstr "" -#: library/datetime.rst:591 +#: library/datetime.rst:597 msgid "The latest representable date, ``date(MAXYEAR, 12, 31)``." msgstr "" -#: library/datetime.rst:596 +#: library/datetime.rst:602 msgid "" "The smallest possible difference between non-equal date objects, " "``timedelta(days=1)``." msgstr "" -#: library/datetime.rst:1166 +#: library/datetime.rst:1172 msgid "Between :const:`MINYEAR` and :const:`MAXYEAR` inclusive." msgstr "" -#: library/datetime.rst:1171 +#: library/datetime.rst:1177 msgid "Between 1 and 12 inclusive." msgstr "" -#: library/datetime.rst:1176 +#: library/datetime.rst:1182 msgid "Between 1 and the number of days in the given month of the given year." msgstr "" -#: library/datetime.rst:622 +#: library/datetime.rst:628 msgid "``date2 = date1 + timedelta``" msgstr "" -#: library/datetime.rst:622 +#: library/datetime.rst:628 msgid "``date2`` will be ``timedelta.days`` days after ``date1``. (1)" msgstr "" -#: library/datetime.rst:625 +#: library/datetime.rst:631 msgid "``date2 = date1 - timedelta``" msgstr "" -#: library/datetime.rst:625 +#: library/datetime.rst:631 msgid "Computes ``date2`` such that ``date2 + timedelta == date1``. (2)" msgstr "" -#: library/datetime.rst:628 +#: library/datetime.rst:634 msgid "``timedelta = date1 - date2``" msgstr "" -#: library/datetime.rst:1224 +#: library/datetime.rst:1230 msgid "\\(3)" msgstr "" @@ -958,7 +966,7 @@ msgstr "" msgid "``date1 != date2``" msgstr "" -#: library/datetime.rst:1226 +#: library/datetime.rst:1232 msgid "Equality comparison. (4)" msgstr "" @@ -978,11 +986,11 @@ msgstr "" msgid "``date1 >= date2``" msgstr "" -#: library/datetime.rst:1229 +#: library/datetime.rst:1235 msgid "Order comparison. (5)" msgstr "" -#: library/datetime.rst:642 +#: library/datetime.rst:648 msgid "" "*date2* is moved forward in time if ``timedelta.days > 0``, or backward if " "``timedelta.days < 0``. Afterward ``date2 - date1 == timedelta.days``. " @@ -991,41 +999,41 @@ msgid "" "`MINYEAR` or larger than :const:`MAXYEAR`." msgstr "" -#: library/datetime.rst:649 +#: library/datetime.rst:655 msgid "``timedelta.seconds`` and ``timedelta.microseconds`` are ignored." msgstr "" -#: library/datetime.rst:652 +#: library/datetime.rst:658 msgid "" "This is exact, and cannot overflow. ``timedelta.seconds`` and ``timedelta." "microseconds`` are 0, and ``date2 + timedelta == date1`` after." msgstr "" -#: library/datetime.rst:656 +#: library/datetime.rst:662 msgid ":class:`date` objects are equal if they represent the same date." msgstr "" -#: library/datetime.rst:658 +#: library/datetime.rst:664 msgid "" ":class:`!date` objects that are not also :class:`.datetime` instances are " "never equal to :class:`!datetime` objects, even if they represent the same " "date." msgstr "" -#: library/datetime.rst:663 +#: library/datetime.rst:669 msgid "" "*date1* is considered less than *date2* when *date1* precedes *date2* in " "time. In other words, ``date1 < date2`` if and only if ``date1.toordinal() < " "date2.toordinal()``." msgstr "" -#: library/datetime.rst:667 +#: library/datetime.rst:673 msgid "" -"Order comparison between a :class:`!date` object that is not also a :class:`." +"Order comparison between a :class:`date` object that is not also a :class:`." "datetime` instance and a :class:`!datetime` object raises :exc:`TypeError`." msgstr "" -#: library/datetime.rst:1297 +#: library/datetime.rst:1303 msgid "" "Comparison between :class:`.datetime` object and an instance of the :class:" "`date` subclass that is not a :class:`!datetime` subclass no longer converts " @@ -1034,93 +1042,93 @@ msgid "" "in subclasses." msgstr "" -#: library/datetime.rst:679 +#: library/datetime.rst:685 msgid "" "In Boolean contexts, all :class:`date` objects are considered to be true." msgstr "" -#: library/datetime.rst:685 +#: library/datetime.rst:691 msgid "" "Return a new :class:`date` object with the same values, but with specified " "parameters updated." msgstr "" -#: library/datetime.rst:1953 +#: library/datetime.rst:1959 msgid "Example::" msgstr "" -#: library/datetime.rst:690 +#: library/datetime.rst:696 msgid "" -">>> from datetime import date\n" -">>> d = date(2002, 12, 31)\n" +">>> import datetime as dt\n" +">>> d = dt.date(2002, 12, 31)\n" ">>> d.replace(day=26)\n" "datetime.date(2002, 12, 26)" msgstr "" -#: library/datetime.rst:695 +#: library/datetime.rst:701 msgid "" "The generic function :func:`copy.replace` also supports :class:`date` " "objects." msgstr "" -#: library/datetime.rst:1421 +#: library/datetime.rst:1427 msgid "" "Return a :class:`time.struct_time` such as returned by :func:`time." "localtime`." msgstr "" -#: library/datetime.rst:703 +#: library/datetime.rst:709 msgid "The hours, minutes and seconds are 0, and the DST flag is -1." msgstr "" -#: library/datetime.rst:1423 +#: library/datetime.rst:1429 msgid "``d.timetuple()`` is equivalent to::" msgstr "" -#: library/datetime.rst:707 +#: library/datetime.rst:713 msgid "" "time.struct_time((d.year, d.month, d.day, 0, 0, 0, d.weekday(), yday, -1))" msgstr "" -#: library/datetime.rst:709 +#: library/datetime.rst:715 msgid "" "where ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` is the " "day number within the current year starting with 1 for January 1st." msgstr "" -#: library/datetime.rst:715 +#: library/datetime.rst:721 msgid "" "Return the proleptic Gregorian ordinal of the date, where January 1 of year " "1 has ordinal 1. For any :class:`date` object ``d``, ``date.fromordinal(d." "toordinal()) == d``." msgstr "" -#: library/datetime.rst:722 +#: library/datetime.rst:728 msgid "" "Return the day of the week as an integer, where Monday is 0 and Sunday is 6. " "For example, ``date(2002, 12, 4).weekday() == 2``, a Wednesday. See also :" "meth:`isoweekday`." msgstr "" -#: library/datetime.rst:729 +#: library/datetime.rst:735 msgid "" "Return the day of the week as an integer, where Monday is 1 and Sunday is 7. " "For example, ``date(2002, 12, 4).isoweekday() == 3``, a Wednesday. See also :" "meth:`weekday`, :meth:`isocalendar`." msgstr "" -#: library/datetime.rst:736 +#: library/datetime.rst:742 msgid "" "Return a :term:`named tuple` object with three components: ``year``, " "``week`` and ``weekday``." msgstr "" -#: library/datetime.rst:739 +#: library/datetime.rst:745 msgid "" "The ISO calendar is a widely used variant of the Gregorian calendar. [#]_" msgstr "" -#: library/datetime.rst:741 +#: library/datetime.rst:747 msgid "" "The ISO year consists of 52 or 53 full weeks, and where a week starts on a " "Monday and ends on a Sunday. The first week of an ISO year is the first " @@ -1129,68 +1137,68 @@ msgid "" "Gregorian year." msgstr "" -#: library/datetime.rst:746 +#: library/datetime.rst:752 msgid "" "For example, 2004 begins on a Thursday, so the first week of ISO year 2004 " "begins on Monday, 29 Dec 2003 and ends on Sunday, 4 Jan 2004::" msgstr "" -#: library/datetime.rst:749 +#: library/datetime.rst:755 msgid "" -">>> from datetime import date\n" -">>> date(2003, 12, 29).isocalendar()\n" +">>> import datetime as dt\n" +">>> dt.date(2003, 12, 29).isocalendar()\n" "datetime.IsoCalendarDate(year=2004, week=1, weekday=1)\n" -">>> date(2004, 1, 4).isocalendar()\n" +">>> dt.date(2004, 1, 4).isocalendar()\n" "datetime.IsoCalendarDate(year=2004, week=1, weekday=7)" msgstr "" -#: library/datetime.rst:755 +#: library/datetime.rst:761 msgid "Result changed from a tuple to a :term:`named tuple`." msgstr "" -#: library/datetime.rst:760 +#: library/datetime.rst:766 msgid "" "Return a string representing the date in ISO 8601 format, ``YYYY-MM-DD``::" msgstr "" -#: library/datetime.rst:762 +#: library/datetime.rst:768 msgid "" -">>> from datetime import date\n" -">>> date(2002, 12, 4).isoformat()\n" +">>> import datetime as dt\n" +">>> dt.date(2002, 12, 4).isoformat()\n" "'2002-12-04'" msgstr "" -#: library/datetime.rst:768 +#: library/datetime.rst:774 msgid "For a date ``d``, ``str(d)`` is equivalent to ``d.isoformat()``." msgstr "" -#: library/datetime.rst:773 +#: library/datetime.rst:779 msgid "Return a string representing the date::" msgstr "" -#: library/datetime.rst:775 +#: library/datetime.rst:781 msgid "" -">>> from datetime import date\n" -">>> date(2002, 12, 4).ctime()\n" +">>> import datetime as dt\n" +">>> dt.date(2002, 12, 4).ctime()\n" "'Wed Dec 4 00:00:00 2002'" msgstr "" -#: library/datetime.rst:1607 +#: library/datetime.rst:1613 msgid "``d.ctime()`` is equivalent to::" msgstr "" -#: library/datetime.rst:1609 +#: library/datetime.rst:1615 msgid "time.ctime(time.mktime(d.timetuple()))" msgstr "" -#: library/datetime.rst:783 +#: library/datetime.rst:789 msgid "" "on platforms where the native C :c:func:`ctime` function (which :func:`time." "ctime` invokes, but which :meth:`date.ctime` does not invoke) conforms to " "the C standard." msgstr "" -#: library/datetime.rst:790 +#: library/datetime.rst:796 msgid "" "Return a string representing the date, controlled by an explicit format " "string. Format codes referring to hours, minutes or seconds will see 0 " @@ -1198,7 +1206,7 @@ msgid "" "isoformat`." msgstr "" -#: library/datetime.rst:797 +#: library/datetime.rst:803 msgid "" "Same as :meth:`.date.strftime`. This makes it possible to specify a format " "string for a :class:`.date` object in :ref:`formatted string literals >> import time\n" -">>> from datetime import date\n" -">>> today = date.today()\n" +">>> import datetime as dt\n" +">>> today = dt.date.today()\n" ">>> today\n" "datetime.date(2007, 12, 5)\n" -">>> today == date.fromtimestamp(time.time())\n" +">>> today == dt.date.fromtimestamp(time.time())\n" "True\n" -">>> my_birthday = date(today.year, 6, 24)\n" +">>> my_birthday = dt.date(today.year, 6, 24)\n" ">>> if my_birthday < today:\n" "... my_birthday = my_birthday.replace(year=today.year + 1)\n" "...\n" @@ -1234,14 +1242,14 @@ msgid "" "202" msgstr "" -#: library/datetime.rst:824 +#: library/datetime.rst:830 msgid "More examples of working with :class:`date`:" msgstr "" -#: library/datetime.rst:826 +#: library/datetime.rst:832 msgid "" -">>> from datetime import date\n" -">>> d = date.fromordinal(730920) # 730920th day after 1. 1. 0001\n" +">>> import datetime as dt\n" +">>> d = dt.date.fromordinal(730920) # 730920th day after 1. 1. 0001\n" ">>> d\n" "datetime.date(2002, 3, 11)\n" "\n" @@ -1282,98 +1290,98 @@ msgid "" "datetime.date(2005, 3, 11)" msgstr "" -#: library/datetime.rst:873 +#: library/datetime.rst:879 msgid ":class:`.datetime` Objects" msgstr "" -#: library/datetime.rst:875 +#: library/datetime.rst:881 msgid "" "A :class:`.datetime` object is a single object containing all the " "information from a :class:`date` object and a :class:`.time` object." msgstr "" -#: library/datetime.rst:878 +#: library/datetime.rst:884 msgid "" "Like a :class:`date` object, :class:`.datetime` assumes the current " "Gregorian calendar extended in both directions; like a :class:`.time` " -"object, :class:`.datetime` assumes there are exactly 3600\\*24 seconds in " +"object, :class:`!datetime` assumes there are exactly 3600\\*24 seconds in " "every day." msgstr "" -#: library/datetime.rst:882 +#: library/datetime.rst:888 msgid "Constructor:" msgstr "" -#: library/datetime.rst:886 +#: library/datetime.rst:892 msgid "" "The *year*, *month* and *day* arguments are required. *tzinfo* may be " "``None``, or an instance of a :class:`tzinfo` subclass. The remaining " "arguments must be integers in the following ranges:" msgstr "" -#: library/datetime.rst:890 +#: library/datetime.rst:896 msgid "``MINYEAR <= year <= MAXYEAR``," msgstr "" -#: library/datetime.rst:891 +#: library/datetime.rst:897 msgid "``1 <= month <= 12``," msgstr "" -#: library/datetime.rst:892 +#: library/datetime.rst:898 msgid "``1 <= day <= number of days in the given month and year``," msgstr "" -#: library/datetime.rst:1771 +#: library/datetime.rst:1777 msgid "``0 <= hour < 24``," msgstr "" -#: library/datetime.rst:1772 +#: library/datetime.rst:1778 msgid "``0 <= minute < 60``," msgstr "" -#: library/datetime.rst:1773 +#: library/datetime.rst:1779 msgid "``0 <= second < 60``," msgstr "" -#: library/datetime.rst:1774 +#: library/datetime.rst:1780 msgid "``0 <= microsecond < 1000000``," msgstr "" -#: library/datetime.rst:1775 +#: library/datetime.rst:1781 msgid "``fold in [0, 1]``." msgstr "" -#: library/datetime.rst:1342 library/datetime.rst:1920 +#: library/datetime.rst:1348 library/datetime.rst:1926 msgid "Added the *fold* parameter." msgstr "" -#: library/datetime.rst:908 +#: library/datetime.rst:914 msgid "Return the current local date and time, with :attr:`.tzinfo` ``None``." msgstr "" -#: library/datetime.rst:910 +#: library/datetime.rst:916 msgid "Equivalent to::" msgstr "" -#: library/datetime.rst:912 +#: library/datetime.rst:918 msgid "datetime.fromtimestamp(time.time())" msgstr "" -#: library/datetime.rst:914 +#: library/datetime.rst:920 msgid "See also :meth:`now`, :meth:`fromtimestamp`." msgstr "" -#: library/datetime.rst:916 +#: library/datetime.rst:922 msgid "" "This method is functionally equivalent to :meth:`now`, but without a ``tz`` " "parameter." msgstr "" -#: library/datetime.rst:921 +#: library/datetime.rst:927 msgid "Return the current local date and time." msgstr "" -#: library/datetime.rst:923 +#: library/datetime.rst:929 msgid "" "If optional argument *tz* is ``None`` or not specified, this is like :meth:" "`today`, but, if possible, supplies more precision than can be gotten from " @@ -1381,34 +1389,34 @@ msgid "" "possible on platforms supplying the C :c:func:`gettimeofday` function)." msgstr "" -#: library/datetime.rst:929 +#: library/datetime.rst:935 msgid "" "If *tz* is not ``None``, it must be an instance of a :class:`tzinfo` " "subclass, and the current date and time are converted to *tz*’s time zone." msgstr "" -#: library/datetime.rst:932 +#: library/datetime.rst:938 msgid "This function is preferred over :meth:`today` and :meth:`utcnow`." msgstr "" -#: library/datetime.rst:936 +#: library/datetime.rst:942 msgid "" "Subsequent calls to :meth:`!datetime.now` may return the same instant " "depending on the precision of the underlying clock." msgstr "" -#: library/datetime.rst:941 +#: library/datetime.rst:947 msgid "Return the current UTC date and time, with :attr:`.tzinfo` ``None``." msgstr "" -#: library/datetime.rst:943 +#: library/datetime.rst:949 msgid "" "This is like :meth:`now`, but returns the current UTC date and time, as a " "naive :class:`.datetime` object. An aware current UTC datetime can be " "obtained by calling ``datetime.now(timezone.utc)``. See also :meth:`now`." msgstr "" -#: library/datetime.rst:949 +#: library/datetime.rst:955 msgid "" "Because naive ``datetime`` objects are treated by many ``datetime`` methods " "as local times, it is preferred to use aware datetimes to represent times in " @@ -1416,11 +1424,11 @@ msgid "" "current time in UTC is by calling ``datetime.now(timezone.utc)``." msgstr "" -#: library/datetime.rst:956 +#: library/datetime.rst:962 msgid "Use :meth:`datetime.now` with :const:`UTC` instead." msgstr "" -#: library/datetime.rst:961 +#: library/datetime.rst:967 msgid "" "Return the local date and time corresponding to the POSIX timestamp, such as " "is returned by :func:`time.time`. If optional argument *tz* is ``None`` or " @@ -1428,13 +1436,13 @@ msgid "" "time, and the returned :class:`.datetime` object is naive." msgstr "" -#: library/datetime.rst:966 +#: library/datetime.rst:972 msgid "" "If *tz* is not ``None``, it must be an instance of a :class:`tzinfo` " "subclass, and the timestamp is converted to *tz*’s time zone." msgstr "" -#: library/datetime.rst:969 +#: library/datetime.rst:975 msgid "" ":meth:`fromtimestamp` may raise :exc:`OverflowError`, if the timestamp is " "out of the range of values supported by the platform C :c:func:`localtime` " @@ -1447,7 +1455,7 @@ msgid "" "preferred over :meth:`utcfromtimestamp`." msgstr "" -#: library/datetime.rst:980 +#: library/datetime.rst:986 msgid "" "Raise :exc:`OverflowError` instead of :exc:`ValueError` if the timestamp is " "out of the range of values supported by the platform C :c:func:`localtime` " @@ -1455,17 +1463,17 @@ msgid "" "`ValueError` on :c:func:`localtime` or :c:func:`gmtime` failure." msgstr "" -#: library/datetime.rst:987 +#: library/datetime.rst:993 msgid ":meth:`fromtimestamp` may return instances with :attr:`.fold` set to 1." msgstr "" -#: library/datetime.rst:992 +#: library/datetime.rst:998 msgid "" "Return the UTC :class:`.datetime` corresponding to the POSIX timestamp, " "with :attr:`.tzinfo` ``None``. (The resulting object is naive.)" msgstr "" -#: library/datetime.rst:995 +#: library/datetime.rst:1001 msgid "" "This may raise :exc:`OverflowError`, if the timestamp is out of the range of " "values supported by the platform C :c:func:`gmtime` function, and :exc:" @@ -1473,32 +1481,32 @@ msgid "" "to years in 1970 through 2038." msgstr "" -#: library/datetime.rst:1000 +#: library/datetime.rst:1006 msgid "To get an aware :class:`.datetime` object, call :meth:`fromtimestamp`::" msgstr "" -#: library/datetime.rst:1002 +#: library/datetime.rst:1008 msgid "datetime.fromtimestamp(timestamp, timezone.utc)" msgstr "" -#: library/datetime.rst:1004 +#: library/datetime.rst:1010 msgid "" "On the POSIX compliant platforms, it is equivalent to the following " "expression::" msgstr "" -#: library/datetime.rst:1007 +#: library/datetime.rst:1013 msgid "" "datetime(1970, 1, 1, tzinfo=timezone.utc) + timedelta(seconds=timestamp)" msgstr "" -#: library/datetime.rst:1009 +#: library/datetime.rst:1015 msgid "" "except the latter formula always supports the full years range: between :" "const:`MINYEAR` and :const:`MAXYEAR` inclusive." msgstr "" -#: library/datetime.rst:1014 +#: library/datetime.rst:1020 msgid "" "Because naive ``datetime`` objects are treated by many ``datetime`` methods " "as local times, it is preferred to use aware datetimes to represent times in " @@ -1507,7 +1515,7 @@ msgid "" "tz=timezone.utc)``." msgstr "" -#: library/datetime.rst:1020 +#: library/datetime.rst:1026 msgid "" "Raise :exc:`OverflowError` instead of :exc:`ValueError` if the timestamp is " "out of the range of values supported by the platform C :c:func:`gmtime` " @@ -1515,11 +1523,11 @@ msgid "" "`gmtime` failure." msgstr "" -#: library/datetime.rst:1028 +#: library/datetime.rst:1034 msgid "Use :meth:`datetime.fromtimestamp` with :const:`UTC` instead." msgstr "" -#: library/datetime.rst:1033 +#: library/datetime.rst:1039 msgid "" "Return the :class:`.datetime` corresponding to the proleptic Gregorian " "ordinal, where January 1 of year 1 has ordinal 1. :exc:`ValueError` is " @@ -1528,77 +1536,77 @@ msgid "" "is ``None``." msgstr "" -#: library/datetime.rst:1041 +#: library/datetime.rst:1047 msgid "" "Return a new :class:`.datetime` object whose date components are equal to " "the given :class:`date` object's, and whose time components are equal to the " "given :class:`.time` object's. If the *tzinfo* argument is provided, its " "value is used to set the :attr:`.tzinfo` attribute of the result, otherwise " "the :attr:`~.time.tzinfo` attribute of the *time* argument is used. If the " -"*date* argument is a :class:`.datetime` object, its time components and :" +"*date* argument is a :class:`!datetime` object, its time components and :" "attr:`.tzinfo` attributes are ignored." msgstr "" -#: library/datetime.rst:1049 +#: library/datetime.rst:1055 msgid "" "For any :class:`.datetime` object ``d``, ``d == datetime.combine(d.date(), d." "time(), d.tzinfo)``." msgstr "" -#: library/datetime.rst:1052 +#: library/datetime.rst:1058 msgid "Added the *tzinfo* argument." msgstr "" -#: library/datetime.rst:1058 +#: library/datetime.rst:1064 msgid "" "Return a :class:`.datetime` corresponding to a *date_string* in any valid " "ISO 8601 format, with the following exceptions:" msgstr "" -#: library/datetime.rst:1871 +#: library/datetime.rst:1877 msgid "Time zone offsets may have fractional seconds." msgstr "" -#: library/datetime.rst:1062 +#: library/datetime.rst:1068 msgid "The ``T`` separator may be replaced by any single unicode character." msgstr "" -#: library/datetime.rst:1876 +#: library/datetime.rst:1882 msgid "Fractional hours and minutes are not supported." msgstr "" -#: library/datetime.rst:1072 +#: library/datetime.rst:1078 msgid "" -">>> from datetime import datetime\n" -">>> datetime.fromisoformat('2011-11-04')\n" +">>> import datetime as dt\n" +">>> dt.datetime.fromisoformat('2011-11-04')\n" "datetime.datetime(2011, 11, 4, 0, 0)\n" -">>> datetime.fromisoformat('20111104')\n" +">>> dt.datetime.fromisoformat('20111104')\n" "datetime.datetime(2011, 11, 4, 0, 0)\n" -">>> datetime.fromisoformat('2011-11-04T00:05:23')\n" +">>> dt.datetime.fromisoformat('2011-11-04T00:05:23')\n" "datetime.datetime(2011, 11, 4, 0, 5, 23)\n" -">>> datetime.fromisoformat('2011-11-04T00:05:23Z')\n" +">>> dt.datetime.fromisoformat('2011-11-04T00:05:23Z')\n" "datetime.datetime(2011, 11, 4, 0, 5, 23, tzinfo=datetime.timezone.utc)\n" -">>> datetime.fromisoformat('20111104T000523')\n" +">>> dt.datetime.fromisoformat('20111104T000523')\n" "datetime.datetime(2011, 11, 4, 0, 5, 23)\n" -">>> datetime.fromisoformat('2011-W01-2T00:05:23.283')\n" +">>> dt.datetime.fromisoformat('2011-W01-2T00:05:23.283')\n" "datetime.datetime(2011, 1, 4, 0, 5, 23, 283000)\n" -">>> datetime.fromisoformat('2011-11-04 00:05:23.283')\n" +">>> dt.datetime.fromisoformat('2011-11-04 00:05:23.283')\n" "datetime.datetime(2011, 11, 4, 0, 5, 23, 283000)\n" -">>> datetime.fromisoformat('2011-11-04 00:05:23.283+00:00')\n" +">>> dt.datetime.fromisoformat('2011-11-04 00:05:23.283+00:00')\n" "datetime.datetime(2011, 11, 4, 0, 5, 23, 283000, tzinfo=datetime.timezone." "utc)\n" -">>> datetime.fromisoformat('2011-11-04T00:05:23+04:00')\n" +">>> dt.datetime.fromisoformat('2011-11-04T00:05:23+04:00')\n" "datetime.datetime(2011, 11, 4, 0, 5, 23,\n" " tzinfo=datetime.timezone(datetime.timedelta(seconds=14400)))" msgstr "" -#: library/datetime.rst:1094 +#: library/datetime.rst:1100 msgid "" "Previously, this method only supported formats that could be emitted by :" "meth:`date.isoformat` or :meth:`datetime.isoformat`." msgstr "" -#: library/datetime.rst:1101 +#: library/datetime.rst:1107 msgid "" "Return a :class:`.datetime` corresponding to the ISO calendar date specified " "by year, week and day. The non-date components of the datetime are populated " @@ -1606,23 +1614,23 @@ msgid "" "`datetime.isocalendar`." msgstr "" -#: library/datetime.rst:1110 +#: library/datetime.rst:1116 msgid "" "Return a :class:`.datetime` corresponding to *date_string*, parsed according " "to *format*." msgstr "" -#: library/datetime.rst:1113 +#: library/datetime.rst:1119 msgid "" "If *format* does not contain microseconds or time zone information, this is " "equivalent to::" msgstr "" -#: library/datetime.rst:2596 +#: library/datetime.rst:2650 msgid "datetime(*(time.strptime(date_string, format)[0:6]))" msgstr "" -#: library/datetime.rst:1117 +#: library/datetime.rst:1123 msgid "" ":exc:`ValueError` is raised if the date_string and format can't be parsed " "by :func:`time.strptime` or if it returns a value which isn't a time tuple. " @@ -1630,7 +1638,7 @@ msgid "" "fromisoformat`." msgstr "" -#: library/datetime.rst:1124 +#: library/datetime.rst:1130 msgid "" "If *format* specifies a day of month without a year a :exc:" "`DeprecationWarning` is now emitted. This is to avoid a quadrennial leap " @@ -1641,53 +1649,53 @@ msgid "" "not have a year, explicitly add a year that is a leap year before parsing:" msgstr "" -#: library/datetime.rst:1133 +#: library/datetime.rst:1139 msgid "" -">>> from datetime import datetime\n" +">>> import datetime as dt\n" ">>> date_string = \"02/29\"\n" -">>> when = datetime.strptime(f\"{date_string};1984\", \"%m/%d;%Y\") # " +">>> when = dt.datetime.strptime(f\"{date_string};1984\", \"%m/%d;%Y\") # " "Avoids leap year bug.\n" ">>> when.strftime(\"%B %d\")\n" "'February 29'" msgstr "" -#: library/datetime.rst:1146 +#: library/datetime.rst:1152 msgid "" "The earliest representable :class:`.datetime`, ``datetime(MINYEAR, 1, 1, " "tzinfo=None)``." msgstr "" -#: library/datetime.rst:1152 +#: library/datetime.rst:1158 msgid "" "The latest representable :class:`.datetime`, ``datetime(MAXYEAR, 12, 31, 23, " "59, 59, 999999, tzinfo=None)``." msgstr "" -#: library/datetime.rst:1158 +#: library/datetime.rst:1164 msgid "" "The smallest possible difference between non-equal :class:`.datetime` " "objects, ``timedelta(microseconds=1)``." msgstr "" -#: library/datetime.rst:1804 +#: library/datetime.rst:1810 msgid "In ``range(24)``." msgstr "" -#: library/datetime.rst:1191 library/datetime.rst:1814 +#: library/datetime.rst:1197 library/datetime.rst:1820 msgid "In ``range(60)``." msgstr "" -#: library/datetime.rst:1819 +#: library/datetime.rst:1825 msgid "In ``range(1000000)``." msgstr "" -#: library/datetime.rst:1201 +#: library/datetime.rst:1207 msgid "" "The object passed as the *tzinfo* argument to the :class:`.datetime` " "constructor, or ``None`` if none was passed." msgstr "" -#: library/datetime.rst:1830 +#: library/datetime.rst:1836 msgid "" "In ``[0, 1]``. Used to disambiguate wall times during a repeated interval. " "(A repeated interval occurs when clocks are rolled back at the end of " @@ -1697,24 +1705,24 @@ msgid "" "time representation." msgstr "" -#: library/datetime.rst:1220 +#: library/datetime.rst:1226 msgid "``datetime2 = datetime1 + timedelta``" msgstr "" -#: library/datetime.rst:2443 library/datetime.rst:2460 -#: library/datetime.rst:2525 library/datetime.rst:2534 +#: library/datetime.rst:2458 library/datetime.rst:2475 +#: library/datetime.rst:2540 library/datetime.rst:2549 msgid "\\(1)" msgstr "" -#: library/datetime.rst:1222 +#: library/datetime.rst:1228 msgid "``datetime2 = datetime1 - timedelta``" msgstr "" -#: library/datetime.rst:2476 +#: library/datetime.rst:2491 msgid "\\(2)" msgstr "" -#: library/datetime.rst:1224 +#: library/datetime.rst:1230 msgid "``timedelta = datetime1 - datetime2``" msgstr "" @@ -1742,7 +1750,7 @@ msgstr "" msgid "``datetime1 >= datetime2``" msgstr "" -#: library/datetime.rst:1236 +#: library/datetime.rst:1242 msgid "" "``datetime2`` is a duration of ``timedelta`` removed from ``datetime1``, " "moving forward in time if ``timedelta.days > 0``, or backward if ``timedelta." @@ -1753,7 +1761,7 @@ msgid "" "adjustments are done even if the input is an aware object." msgstr "" -#: library/datetime.rst:1245 +#: library/datetime.rst:1251 msgid "" "Computes the ``datetime2`` such that ``datetime2 + timedelta == datetime1``. " "As for addition, the result has the same :attr:`~.datetime.tzinfo` attribute " @@ -1761,14 +1769,14 @@ msgid "" "input is aware." msgstr "" -#: library/datetime.rst:1250 +#: library/datetime.rst:1256 msgid "" -"Subtraction of a :class:`.datetime` from a :class:`.datetime` is defined " +"Subtraction of a :class:`.datetime` from a :class:`!datetime` is defined " "only if both operands are naive, or if both are aware. If one is aware and " "the other is naive, :exc:`TypeError` is raised." msgstr "" -#: library/datetime.rst:1254 +#: library/datetime.rst:1260 msgid "" "If both are naive, or both are aware and have the same :attr:`~.datetime." "tzinfo` attribute, the :attr:`~.datetime.tzinfo` attributes are ignored, and " @@ -1776,7 +1784,7 @@ msgid "" "datetime1``. No time zone adjustments are done in this case." msgstr "" -#: library/datetime.rst:1259 +#: library/datetime.rst:1265 msgid "" "If both are aware and have different :attr:`~.datetime.tzinfo` attributes, " "``a-b`` acts as if ``a`` and ``b`` were first converted to naive UTC " @@ -1785,40 +1793,40 @@ msgid "" "overflows." msgstr "" -#: library/datetime.rst:1265 +#: library/datetime.rst:1271 msgid "" ":class:`.datetime` objects are equal if they represent the same date and " "time, taking into account the time zone." msgstr "" -#: library/datetime.rst:1268 -msgid "Naive and aware :class:`!datetime` objects are never equal." +#: library/datetime.rst:1274 +msgid "Naive and aware :class:`.datetime` objects are never equal." msgstr "" -#: library/datetime.rst:1270 +#: library/datetime.rst:1276 msgid "" "If both comparands are aware, and have the same :attr:`!tzinfo` attribute, " "the :attr:`!tzinfo` and :attr:`~.datetime.fold` attributes are ignored and " "the base datetimes are compared. If both comparands are aware and have " "different :attr:`~.datetime.tzinfo` attributes, the comparison acts as " "comparands were first converted to UTC datetimes except that the " -"implementation never overflows. :class:`!datetime` instances in a repeated " +"implementation never overflows. :class:`.datetime` instances in a repeated " "interval are never equal to :class:`!datetime` instances in other time zone." msgstr "" -#: library/datetime.rst:1280 +#: library/datetime.rst:1286 msgid "" "*datetime1* is considered less than *datetime2* when *datetime1* precedes " "*datetime2* in time, taking into account the time zone." msgstr "" -#: library/datetime.rst:1283 +#: library/datetime.rst:1289 msgid "" "Order comparison between naive and aware :class:`.datetime` objects raises :" "exc:`TypeError`." msgstr "" -#: library/datetime.rst:1286 +#: library/datetime.rst:1292 msgid "" "If both comparands are aware, and have the same :attr:`!tzinfo` attribute, " "the :attr:`!tzinfo` and :attr:`~.datetime.fold` attributes are ignored and " @@ -1828,33 +1836,33 @@ msgid "" "implementation never overflows." msgstr "" -#: library/datetime.rst:1293 +#: library/datetime.rst:1299 msgid "" "Equality comparisons between aware and naive :class:`.datetime` instances " "don't raise :exc:`TypeError`." msgstr "" -#: library/datetime.rst:1309 +#: library/datetime.rst:1315 msgid "Return :class:`date` object with same year, month and day." msgstr "" -#: library/datetime.rst:1314 +#: library/datetime.rst:1320 msgid "" "Return :class:`.time` object with same hour, minute, second, microsecond and " "fold. :attr:`.tzinfo` is ``None``. See also method :meth:`timetz`." msgstr "" -#: library/datetime.rst:1326 +#: library/datetime.rst:1332 msgid "The fold value is copied to the returned :class:`.time` object." msgstr "" -#: library/datetime.rst:1323 +#: library/datetime.rst:1329 msgid "" "Return :class:`.time` object with same hour, minute, second, microsecond, " "fold, and tzinfo attributes. See also method :meth:`time`." msgstr "" -#: library/datetime.rst:1334 +#: library/datetime.rst:1340 msgid "" "Return a new :class:`datetime` object with the same attributes, but with " "specified parameters updated. Note that ``tzinfo=None`` can be specified to " @@ -1862,27 +1870,27 @@ msgid "" "and time data." msgstr "" -#: library/datetime.rst:1339 +#: library/datetime.rst:1345 msgid "" ":class:`.datetime` objects are also supported by generic function :func:" "`copy.replace`." msgstr "" -#: library/datetime.rst:1348 +#: library/datetime.rst:1354 msgid "" "Return a :class:`.datetime` object with new :attr:`.tzinfo` attribute *tz*, " "adjusting the date and time data so the result is the same UTC time as " "*self*, but in *tz*'s local time." msgstr "" -#: library/datetime.rst:1352 +#: library/datetime.rst:1358 msgid "" "If provided, *tz* must be an instance of a :class:`tzinfo` subclass, and " "its :meth:`utcoffset` and :meth:`dst` methods must not return ``None``. If " "*self* is naive, it is presumed to represent time in the system time zone." msgstr "" -#: library/datetime.rst:1356 +#: library/datetime.rst:1362 msgid "" "If called without arguments (or with ``tz=None``) the system local time zone " "is assumed for the target time zone. The ``.tzinfo`` attribute of the " @@ -1890,7 +1898,7 @@ msgid "" "with the zone name and offset obtained from the OS." msgstr "" -#: library/datetime.rst:1361 +#: library/datetime.rst:1367 msgid "" "If ``self.tzinfo`` is *tz*, ``self.astimezone(tz)`` is equal to *self*: no " "adjustment of date or time data is performed. Else the result is local time " @@ -1899,7 +1907,7 @@ msgid "" "date and time data as ``dt - dt.utcoffset()``." msgstr "" -#: library/datetime.rst:1367 +#: library/datetime.rst:1373 msgid "" "If you merely want to attach a :class:`timezone` object *tz* to a datetime " "*dt* without adjustment of date and time data, use ``dt." @@ -1908,14 +1916,14 @@ msgid "" "use ``dt.replace(tzinfo=None)``." msgstr "" -#: library/datetime.rst:1372 +#: library/datetime.rst:1378 msgid "" "Note that the default :meth:`tzinfo.fromutc` method can be overridden in a :" "class:`tzinfo` subclass to affect the result returned by :meth:`astimezone`. " "Ignoring error cases, :meth:`astimezone` acts like::" msgstr "" -#: library/datetime.rst:1376 +#: library/datetime.rst:1382 msgid "" "def astimezone(self, tz):\n" " if self.tzinfo is tz:\n" @@ -1926,54 +1934,54 @@ msgid "" " return tz.fromutc(utc)" msgstr "" -#: library/datetime.rst:1384 +#: library/datetime.rst:1390 msgid "*tz* now can be omitted." msgstr "" -#: library/datetime.rst:1387 +#: library/datetime.rst:1393 msgid "" "The :meth:`astimezone` method can now be called on naive instances that are " "presumed to represent system local time." msgstr "" -#: library/datetime.rst:1394 +#: library/datetime.rst:1400 msgid "" "If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." "utcoffset(self)``, and raises an exception if the latter doesn't return " "``None`` or a :class:`timedelta` object with magnitude less than one day." msgstr "" -#: library/datetime.rst:1993 library/datetime.rst:2345 -#: library/datetime.rst:2669 +#: library/datetime.rst:1999 library/datetime.rst:2359 +#: library/datetime.rst:2723 msgid "The UTC offset is not restricted to a whole number of minutes." msgstr "" -#: library/datetime.rst:1404 +#: library/datetime.rst:1410 msgid "" "If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." "dst(self)``, and raises an exception if the latter doesn't return ``None`` " "or a :class:`timedelta` object with magnitude less than one day." msgstr "" -#: library/datetime.rst:2003 library/datetime.rst:2154 +#: library/datetime.rst:2009 library/datetime.rst:2164 msgid "The DST offset is not restricted to a whole number of minutes." msgstr "" -#: library/datetime.rst:1414 +#: library/datetime.rst:1420 msgid "" "If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." "tzname(self)``, raises an exception if the latter doesn't return ``None`` or " "a string object," msgstr "" -#: library/datetime.rst:1425 +#: library/datetime.rst:1431 msgid "" "time.struct_time((d.year, d.month, d.day,\n" " d.hour, d.minute, d.second,\n" " d.weekday(), yday, dst))" msgstr "" -#: library/datetime.rst:1429 +#: library/datetime.rst:1435 msgid "" "where ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` is the " "day number within the current year starting with 1 for January 1st. The :" @@ -1984,7 +1992,7 @@ msgid "" "to 0." msgstr "" -#: library/datetime.rst:1440 +#: library/datetime.rst:1446 msgid "" "If :class:`.datetime` instance ``d`` is naive, this is the same as ``d." "timetuple()`` except that :attr:`~.time.struct_time.tm_isdst` is forced to 0 " @@ -1992,7 +2000,7 @@ msgid "" "time." msgstr "" -#: library/datetime.rst:1444 +#: library/datetime.rst:1450 msgid "" "If ``d`` is aware, ``d`` is normalized to UTC time, by subtracting ``d." "utcoffset()``, and a :class:`time.struct_time` for the normalized time is " @@ -2001,7 +2009,7 @@ msgid "" "and UTC adjustment spills over a year boundary." msgstr "" -#: library/datetime.rst:1453 +#: library/datetime.rst:1459 msgid "" "Because naive ``datetime`` objects are treated by many ``datetime`` methods " "as local times, it is preferred to use aware datetimes to represent times in " @@ -2011,45 +2019,45 @@ msgid "" "meth:`.datetime.timetuple`." msgstr "" -#: library/datetime.rst:1462 +#: library/datetime.rst:1468 msgid "" "Return the proleptic Gregorian ordinal of the date. The same as ``self." "date().toordinal()``." msgstr "" -#: library/datetime.rst:1467 +#: library/datetime.rst:1473 msgid "" "Return POSIX timestamp corresponding to the :class:`.datetime` instance. The " "return value is a :class:`float` similar to that returned by :func:`time." "time`." msgstr "" -#: library/datetime.rst:1471 +#: library/datetime.rst:1477 msgid "" "Naive :class:`.datetime` instances are assumed to represent local time and " "this method relies on the platform C :c:func:`mktime` function to perform " -"the conversion. Since :class:`.datetime` supports wider range of values " +"the conversion. Since :class:`!datetime` supports wider range of values " "than :c:func:`mktime` on many platforms, this method may raise :exc:" "`OverflowError` or :exc:`OSError` for times far in the past or far in the " "future." msgstr "" -#: library/datetime.rst:1478 +#: library/datetime.rst:1484 msgid "" "For aware :class:`.datetime` instances, the return value is computed as::" msgstr "" -#: library/datetime.rst:1481 +#: library/datetime.rst:1487 msgid "(dt - datetime(1970, 1, 1, tzinfo=timezone.utc)).total_seconds()" msgstr "" -#: library/datetime.rst:1485 +#: library/datetime.rst:1491 msgid "" "The :meth:`timestamp` method uses the :attr:`.fold` attribute to " "disambiguate the times during a repeated interval." msgstr "" -#: library/datetime.rst:1491 +#: library/datetime.rst:1497 msgid "" "There is no method to obtain the POSIX timestamp directly from a naive :" "class:`.datetime` instance representing UTC time. If your application uses " @@ -2057,193 +2065,193 @@ msgid "" "the POSIX timestamp by supplying ``tzinfo=timezone.utc``::" msgstr "" -#: library/datetime.rst:1497 +#: library/datetime.rst:1503 msgid "timestamp = dt.replace(tzinfo=timezone.utc).timestamp()" msgstr "" -#: library/datetime.rst:1499 +#: library/datetime.rst:1505 msgid "or by calculating the timestamp directly::" msgstr "" -#: library/datetime.rst:1501 +#: library/datetime.rst:1507 msgid "timestamp = (dt - datetime(1970, 1, 1)) / timedelta(seconds=1)" msgstr "" -#: library/datetime.rst:1505 +#: library/datetime.rst:1511 msgid "" "Return the day of the week as an integer, where Monday is 0 and Sunday is 6. " "The same as ``self.date().weekday()``. See also :meth:`isoweekday`." msgstr "" -#: library/datetime.rst:1511 +#: library/datetime.rst:1517 msgid "" "Return the day of the week as an integer, where Monday is 1 and Sunday is 7. " "The same as ``self.date().isoweekday()``. See also :meth:`weekday`, :meth:" "`isocalendar`." msgstr "" -#: library/datetime.rst:1518 +#: library/datetime.rst:1524 msgid "" "Return a :term:`named tuple` with three components: ``year``, ``week`` and " "``weekday``. The same as ``self.date().isocalendar()``." msgstr "" -#: library/datetime.rst:1524 +#: library/datetime.rst:1530 msgid "Return a string representing the date and time in ISO 8601 format:" msgstr "" -#: library/datetime.rst:1526 +#: library/datetime.rst:1532 msgid "``YYYY-MM-DDTHH:MM:SS.ffffff``, if :attr:`microsecond` is not 0" msgstr "" -#: library/datetime.rst:1527 +#: library/datetime.rst:1533 msgid "``YYYY-MM-DDTHH:MM:SS``, if :attr:`microsecond` is 0" msgstr "" -#: library/datetime.rst:1529 +#: library/datetime.rst:1535 msgid "" "If :meth:`utcoffset` does not return ``None``, a string is appended, giving " "the UTC offset:" msgstr "" -#: library/datetime.rst:1532 +#: library/datetime.rst:1538 msgid "" "``YYYY-MM-DDTHH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, if :attr:`microsecond` " "is not 0" msgstr "" -#: library/datetime.rst:1534 +#: library/datetime.rst:1540 msgid "" "``YYYY-MM-DDTHH:MM:SS+HH:MM[:SS[.ffffff]]``, if :attr:`microsecond` is 0" msgstr "" -#: library/datetime.rst:1538 +#: library/datetime.rst:1544 msgid "" -">>> from datetime import datetime, timezone\n" -">>> datetime(2019, 5, 18, 15, 17, 8, 132263).isoformat()\n" +">>> import datetime as dt\n" +">>> dt.datetime(2019, 5, 18, 15, 17, 8, 132263).isoformat()\n" "'2019-05-18T15:17:08.132263'\n" -">>> datetime(2019, 5, 18, 15, 17, tzinfo=timezone.utc).isoformat()\n" +">>> dt.datetime(2019, 5, 18, 15, 17, tzinfo=dt.timezone.utc).isoformat()\n" "'2019-05-18T15:17:00+00:00'" msgstr "" -#: library/datetime.rst:1544 +#: library/datetime.rst:1550 msgid "" "The optional argument *sep* (default ``'T'``) is a one-character separator, " "placed between the date and time portions of the result. For example::" msgstr "" -#: library/datetime.rst:1547 +#: library/datetime.rst:1553 msgid "" -">>> from datetime import tzinfo, timedelta, datetime\n" -">>> class TZ(tzinfo):\n" +">>> import datetime as dt\n" +">>> class TZ(dt.tzinfo):\n" "... \"\"\"A time zone with an arbitrary, constant -06:39 offset.\"\"\"\n" -"... def utcoffset(self, dt):\n" -"... return timedelta(hours=-6, minutes=-39)\n" +"... def utcoffset(self, when):\n" +"... return dt.timedelta(hours=-6, minutes=-39)\n" "...\n" -">>> datetime(2002, 12, 25, tzinfo=TZ()).isoformat(' ')\n" +">>> dt.datetime(2002, 12, 25, tzinfo=TZ()).isoformat(' ')\n" "'2002-12-25 00:00:00-06:39'\n" -">>> datetime(2009, 11, 27, microsecond=100, tzinfo=TZ()).isoformat()\n" +">>> dt.datetime(2009, 11, 27, microsecond=100, tzinfo=TZ()).isoformat()\n" "'2009-11-27T00:00:00.000100-06:39'" msgstr "" -#: library/datetime.rst:1933 +#: library/datetime.rst:1939 msgid "" "The optional argument *timespec* specifies the number of additional " "components of the time to include (the default is ``'auto'``). It can be one " "of the following:" msgstr "" -#: library/datetime.rst:1937 +#: library/datetime.rst:1943 msgid "" "``'auto'``: Same as ``'seconds'`` if :attr:`microsecond` is 0, same as " "``'microseconds'`` otherwise." msgstr "" -#: library/datetime.rst:1939 +#: library/datetime.rst:1945 msgid "``'hours'``: Include the :attr:`hour` in the two-digit ``HH`` format." msgstr "" -#: library/datetime.rst:1940 +#: library/datetime.rst:1946 msgid "" "``'minutes'``: Include :attr:`hour` and :attr:`minute` in ``HH:MM`` format." msgstr "" -#: library/datetime.rst:1941 +#: library/datetime.rst:1947 msgid "" "``'seconds'``: Include :attr:`hour`, :attr:`minute`, and :attr:`second` in " "``HH:MM:SS`` format." msgstr "" -#: library/datetime.rst:1943 +#: library/datetime.rst:1949 msgid "" "``'milliseconds'``: Include full time, but truncate fractional second part " "to milliseconds. ``HH:MM:SS.sss`` format." msgstr "" -#: library/datetime.rst:1945 +#: library/datetime.rst:1951 msgid "``'microseconds'``: Include full time in ``HH:MM:SS.ffffff`` format." msgstr "" -#: library/datetime.rst:1949 +#: library/datetime.rst:1955 msgid "Excluded time components are truncated, not rounded." msgstr "" -#: library/datetime.rst:1576 +#: library/datetime.rst:1582 msgid ":exc:`ValueError` will be raised on an invalid *timespec* argument::" msgstr "" -#: library/datetime.rst:1579 +#: library/datetime.rst:1585 msgid "" -">>> from datetime import datetime\n" -">>> datetime.now().isoformat(timespec='minutes')\n" +">>> import datetime as dt\n" +">>> dt.datetime.now().isoformat(timespec='minutes')\n" "'2002-12-25T00:00'\n" -">>> dt = datetime(2015, 1, 1, 12, 30, 59, 0)\n" -">>> dt.isoformat(timespec='microseconds')\n" +">>> my_datetime = dt.datetime(2015, 1, 1, 12, 30, 59, 0)\n" +">>> my_datetime.isoformat(timespec='microseconds')\n" "'2015-01-01T12:30:59.000000'" msgstr "" -#: library/datetime.rst:1964 +#: library/datetime.rst:1970 msgid "Added the *timespec* parameter." msgstr "" -#: library/datetime.rst:1592 +#: library/datetime.rst:1598 msgid "" "For a :class:`.datetime` instance ``d``, ``str(d)`` is equivalent to ``d." "isoformat(' ')``." msgstr "" -#: library/datetime.rst:1598 +#: library/datetime.rst:1604 msgid "Return a string representing the date and time::" msgstr "" -#: library/datetime.rst:1600 +#: library/datetime.rst:1606 msgid "" -">>> from datetime import datetime\n" -">>> datetime(2002, 12, 4, 20, 30, 40).ctime()\n" +">>> import datetime as dt\n" +">>> dt.datetime(2002, 12, 4, 20, 30, 40).ctime()\n" "'Wed Dec 4 20:30:40 2002'" msgstr "" -#: library/datetime.rst:1604 +#: library/datetime.rst:1610 msgid "" "The output string will *not* include time zone information, regardless of " "whether the input is aware or naive." msgstr "" -#: library/datetime.rst:1611 +#: library/datetime.rst:1617 msgid "" "on platforms where the native C :c:func:`ctime` function (which :func:`time." "ctime` invokes, but which :meth:`datetime.ctime` does not invoke) conforms " "to the C standard." msgstr "" -#: library/datetime.rst:1618 +#: library/datetime.rst:1624 msgid "" "Return a string representing the date and time, controlled by an explicit " "format string. See also :ref:`strftime-strptime-behavior` and :meth:" "`datetime.isoformat`." msgstr "" -#: library/datetime.rst:1625 +#: library/datetime.rst:1631 msgid "" "Same as :meth:`.datetime.strftime`. This makes it possible to specify a " "format string for a :class:`.datetime` object in :ref:`formatted string " @@ -2251,38 +2259,39 @@ msgid "" "`strftime-strptime-behavior` and :meth:`datetime.isoformat`." msgstr "" -#: library/datetime.rst:1632 +#: library/datetime.rst:1638 msgid "Examples of Usage: :class:`.datetime`" msgstr "" -#: library/datetime.rst:1634 +#: library/datetime.rst:1640 msgid "Examples of working with :class:`.datetime` objects:" msgstr "" -#: library/datetime.rst:1636 +#: library/datetime.rst:1642 msgid "" -">>> from datetime import datetime, date, time, timezone\n" +">>> import datetime as dt\n" "\n" ">>> # Using datetime.combine()\n" -">>> d = date(2005, 7, 14)\n" -">>> t = time(12, 30)\n" -">>> datetime.combine(d, t)\n" +">>> d = dt.date(2005, 7, 14)\n" +">>> t = dt.time(12, 30)\n" +">>> dt.datetime.combine(d, t)\n" "datetime.datetime(2005, 7, 14, 12, 30)\n" "\n" ">>> # Using datetime.now()\n" -">>> datetime.now()\n" +">>> dt.datetime.now()\n" "datetime.datetime(2007, 12, 6, 16, 29, 43, 79043) # GMT +1\n" -">>> datetime.now(timezone.utc)\n" +">>> dt.datetime.now(dt.timezone.utc)\n" "datetime.datetime(2007, 12, 6, 15, 29, 43, 79060, tzinfo=datetime.timezone." "utc)\n" "\n" ">>> # Using datetime.strptime()\n" -">>> dt = datetime.strptime(\"21/11/06 16:30\", \"%d/%m/%y %H:%M\")\n" -">>> dt\n" +">>> my_datetime = dt.datetime.strptime(\"21/11/06 16:30\", \"%d/%m/%y %H:" +"%M\")\n" +">>> my_datetime\n" "datetime.datetime(2006, 11, 21, 16, 30)\n" "\n" ">>> # Using datetime.timetuple() to get tuple of all attributes\n" -">>> tt = dt.timetuple()\n" +">>> tt = my_datetime.timetuple()\n" ">>> for it in tt:\n" "... print(it)\n" "...\n" @@ -2297,7 +2306,7 @@ msgid "" "-1 # dst - method tzinfo.dst() returned None\n" "\n" ">>> # Date in ISO format\n" -">>> ic = dt.isocalendar()\n" +">>> ic = my_datetime.isocalendar()\n" ">>> for it in ic:\n" "... print(it)\n" "...\n" @@ -2306,87 +2315,87 @@ msgid "" "2 # ISO weekday\n" "\n" ">>> # Formatting a datetime\n" -">>> dt.strftime(\"%A, %d. %B %Y %I:%M%p\")\n" +">>> my_datetime.strftime(\"%A, %d. %B %Y %I:%M%p\")\n" "'Tuesday, 21. November 2006 04:30PM'\n" ">>> 'The {1} is {0:%d}, the {2} is {0:%B}, the {3} is {0:%I:%M%p}.'." -"format(dt, \"day\", \"month\", \"time\")\n" +"format(my_datetime, \"day\", \"month\", \"time\")\n" "'The day is 21, the month is November, the time is 04:30PM.'" msgstr "" -#: library/datetime.rst:1687 +#: library/datetime.rst:1693 msgid "" "The example below defines a :class:`tzinfo` subclass capturing time zone " "information for Kabul, Afghanistan, which used +4 UTC until 1945 and then " "+4:30 UTC thereafter::" msgstr "" -#: library/datetime.rst:1691 +#: library/datetime.rst:1697 msgid "" -"from datetime import timedelta, datetime, tzinfo, timezone\n" +"import datetime as dt\n" "\n" -"class KabulTz(tzinfo):\n" +"class KabulTz(dt.tzinfo):\n" " # Kabul used +4 until 1945, when they moved to +4:30\n" -" UTC_MOVE_DATE = datetime(1944, 12, 31, 20, tzinfo=timezone.utc)\n" +" UTC_MOVE_DATE = dt.datetime(1944, 12, 31, 20, tzinfo=dt.timezone.utc)\n" "\n" -" def utcoffset(self, dt):\n" -" if dt.year < 1945:\n" -" return timedelta(hours=4)\n" -" elif (1945, 1, 1, 0, 0) <= dt.timetuple()[:5] < (1945, 1, 1, 0, " +" def utcoffset(self, when):\n" +" if when.year < 1945:\n" +" return dt.timedelta(hours=4)\n" +" elif (1945, 1, 1, 0, 0) <= when.timetuple()[:5] < (1945, 1, 1, 0, " "30):\n" " # An ambiguous (\"imaginary\") half-hour range representing\n" " # a 'fold' in time due to the shift from +4 to +4:30.\n" -" # If dt falls in the imaginary range, use fold to decide how\n" -" # to resolve. See PEP495.\n" -" return timedelta(hours=4, minutes=(30 if dt.fold else 0))\n" +" # If when falls in the imaginary range, use fold to decide how\n" +" # to resolve. See PEP 495.\n" +" return dt.timedelta(hours=4, minutes=(30 if when.fold else 0))\n" " else:\n" -" return timedelta(hours=4, minutes=30)\n" +" return dt.timedelta(hours=4, minutes=30)\n" "\n" -" def fromutc(self, dt):\n" +" def fromutc(self, when):\n" " # Follow same validations as in datetime.tzinfo\n" -" if not isinstance(dt, datetime):\n" +" if not isinstance(when, dt.datetime):\n" " raise TypeError(\"fromutc() requires a datetime argument\")\n" -" if dt.tzinfo is not self:\n" -" raise ValueError(\"dt.tzinfo is not self\")\n" +" if when.tzinfo is not self:\n" +" raise ValueError(\"when.tzinfo is not self\")\n" "\n" " # A custom implementation is required for fromutc as\n" " # the input to this function is a datetime with utc values\n" " # but with a tzinfo set to self.\n" " # See datetime.astimezone or fromtimestamp.\n" -" if dt.replace(tzinfo=timezone.utc) >= self.UTC_MOVE_DATE:\n" -" return dt + timedelta(hours=4, minutes=30)\n" +" if when.replace(tzinfo=dt.timezone.utc) >= self.UTC_MOVE_DATE:\n" +" return when + dt.timedelta(hours=4, minutes=30)\n" " else:\n" -" return dt + timedelta(hours=4)\n" +" return when + dt.timedelta(hours=4)\n" "\n" -" def dst(self, dt):\n" +" def dst(self, when):\n" " # Kabul does not observe daylight saving time.\n" -" return timedelta(0)\n" +" return dt.timedelta(0)\n" "\n" -" def tzname(self, dt):\n" -" if dt >= self.UTC_MOVE_DATE:\n" +" def tzname(self, when):\n" +" if when >= self.UTC_MOVE_DATE:\n" " return \"+04:30\"\n" " return \"+04\"" msgstr "" -#: library/datetime.rst:1734 +#: library/datetime.rst:1740 msgid "Usage of ``KabulTz`` from above::" msgstr "" -#: library/datetime.rst:1736 +#: library/datetime.rst:1742 msgid "" ">>> tz1 = KabulTz()\n" "\n" ">>> # Datetime before the change\n" -">>> dt1 = datetime(1900, 11, 21, 16, 30, tzinfo=tz1)\n" +">>> dt1 = dt.datetime(1900, 11, 21, 16, 30, tzinfo=tz1)\n" ">>> print(dt1.utcoffset())\n" "4:00:00\n" "\n" ">>> # Datetime after the change\n" -">>> dt2 = datetime(2006, 6, 14, 13, 0, tzinfo=tz1)\n" +">>> dt2 = dt.datetime(2006, 6, 14, 13, 0, tzinfo=tz1)\n" ">>> print(dt2.utcoffset())\n" "4:30:00\n" "\n" ">>> # Convert datetime to another time zone\n" -">>> dt3 = dt2.astimezone(timezone.utc)\n" +">>> dt3 = dt2.astimezone(dt.timezone.utc)\n" ">>> dt3\n" "datetime.datetime(2006, 6, 14, 8, 30, tzinfo=datetime.timezone.utc)\n" ">>> dt2\n" @@ -2395,63 +2404,63 @@ msgid "" "True" msgstr "" -#: library/datetime.rst:1760 +#: library/datetime.rst:1766 msgid ":class:`.time` Objects" msgstr "" -#: library/datetime.rst:1762 +#: library/datetime.rst:1768 msgid "" "A :class:`.time` object represents a (local) time of day, independent of any " "particular day, and subject to adjustment via a :class:`tzinfo` object." msgstr "" -#: library/datetime.rst:1767 +#: library/datetime.rst:1773 msgid "" "All arguments are optional. *tzinfo* may be ``None``, or an instance of a :" "class:`tzinfo` subclass. The remaining arguments must be integers in the " "following ranges:" msgstr "" -#: library/datetime.rst:1777 +#: library/datetime.rst:1783 msgid "" "If an argument outside those ranges is given, :exc:`ValueError` is raised. " "All default to 0 except *tzinfo*, which defaults to ``None``." msgstr "" -#: library/datetime.rst:1785 +#: library/datetime.rst:1791 msgid "The earliest representable :class:`.time`, ``time(0, 0, 0, 0)``." msgstr "" -#: library/datetime.rst:1790 +#: library/datetime.rst:1796 msgid "The latest representable :class:`.time`, ``time(23, 59, 59, 999999)``." msgstr "" -#: library/datetime.rst:1795 +#: library/datetime.rst:1801 msgid "" "The smallest possible difference between non-equal :class:`.time` objects, " "``timedelta(microseconds=1)``, although note that arithmetic on :class:`." "time` objects is not supported." msgstr "" -#: library/datetime.rst:1824 +#: library/datetime.rst:1830 msgid "" "The object passed as the tzinfo argument to the :class:`.time` constructor, " "or ``None`` if none was passed." msgstr "" -#: library/datetime.rst:1838 +#: library/datetime.rst:1844 msgid "" ":class:`.time` objects support equality and order comparisons, where ``a`` " "is considered less than ``b`` when ``a`` precedes ``b`` in time." msgstr "" -#: library/datetime.rst:1841 +#: library/datetime.rst:1847 msgid "" "Naive and aware :class:`!time` objects are never equal. Order comparison " "between naive and aware :class:`!time` objects raises :exc:`TypeError`." msgstr "" -#: library/datetime.rst:1845 +#: library/datetime.rst:1851 msgid "" "If both comparands are aware, and have the same :attr:`~.time.tzinfo` " "attribute, the :attr:`!tzinfo` and :attr:`!fold` attributes are ignored and " @@ -2460,18 +2469,18 @@ msgid "" "subtracting their UTC offsets (obtained from ``self.utcoffset()``)." msgstr "" -#: library/datetime.rst:1851 +#: library/datetime.rst:1857 msgid "" "Equality comparisons between aware and naive :class:`.time` instances don't " "raise :exc:`TypeError`." msgstr "" -#: library/datetime.rst:1855 +#: library/datetime.rst:1861 msgid "" "In Boolean contexts, a :class:`.time` object is always considered to be true." msgstr "" -#: library/datetime.rst:1857 +#: library/datetime.rst:1863 msgid "" "Before Python 3.5, a :class:`.time` object was considered to be false if it " "represented midnight in UTC. This behavior was considered obscure and error-" @@ -2479,127 +2488,127 @@ msgid "" "details." msgstr "" -#: library/datetime.rst:1864 +#: library/datetime.rst:1870 msgid "Other constructor:" msgstr "" -#: library/datetime.rst:1868 +#: library/datetime.rst:1874 msgid "" "Return a :class:`.time` corresponding to a *time_string* in any valid ISO " "8601 format, with the following exceptions:" msgstr "" -#: library/datetime.rst:1872 +#: library/datetime.rst:1878 msgid "" "The leading ``T``, normally required in cases where there may be ambiguity " "between a date and a time, is not required." msgstr "" -#: library/datetime.rst:1874 +#: library/datetime.rst:1880 msgid "" "Fractional seconds may have any number of digits (anything beyond 6 will be " "truncated)." msgstr "" -#: library/datetime.rst:1878 +#: library/datetime.rst:1884 msgid "Examples:" msgstr "" -#: library/datetime.rst:1880 +#: library/datetime.rst:1886 msgid "" -">>> from datetime import time\n" -">>> time.fromisoformat('04:23:01')\n" +">>> import datetime as dt\n" +">>> dt.time.fromisoformat('04:23:01')\n" "datetime.time(4, 23, 1)\n" -">>> time.fromisoformat('T04:23:01')\n" +">>> dt.time.fromisoformat('T04:23:01')\n" "datetime.time(4, 23, 1)\n" -">>> time.fromisoformat('T042301')\n" +">>> dt.time.fromisoformat('T042301')\n" "datetime.time(4, 23, 1)\n" -">>> time.fromisoformat('04:23:01.000384')\n" +">>> dt.time.fromisoformat('04:23:01.000384')\n" "datetime.time(4, 23, 1, 384)\n" -">>> time.fromisoformat('04:23:01,000384')\n" +">>> dt.time.fromisoformat('04:23:01,000384')\n" "datetime.time(4, 23, 1, 384)\n" -">>> time.fromisoformat('04:23:01+04:00')\n" +">>> dt.time.fromisoformat('04:23:01+04:00')\n" "datetime.time(4, 23, 1, tzinfo=datetime.timezone(datetime." "timedelta(seconds=14400)))\n" -">>> time.fromisoformat('04:23:01Z')\n" +">>> dt.time.fromisoformat('04:23:01Z')\n" "datetime.time(4, 23, 1, tzinfo=datetime.timezone.utc)\n" -">>> time.fromisoformat('04:23:01+00:00')\n" +">>> dt.time.fromisoformat('04:23:01+00:00')\n" "datetime.time(4, 23, 1, tzinfo=datetime.timezone.utc)" msgstr "" -#: library/datetime.rst:1902 +#: library/datetime.rst:1908 msgid "" "Previously, this method only supported formats that could be emitted by :" "meth:`time.isoformat`." msgstr "" -#: library/datetime.rst:1912 +#: library/datetime.rst:1918 msgid "" "Return a new :class:`.time` with the same values, but with specified " "parameters updated. Note that ``tzinfo=None`` can be specified to create a " -"naive :class:`.time` from an aware :class:`.time`, without conversion of the " +"naive :class:`!time` from an aware :class:`!time`, without conversion of the " "time data." msgstr "" -#: library/datetime.rst:1917 +#: library/datetime.rst:1923 msgid "" ":class:`.time` objects are also supported by generic function :func:`copy." "replace`." msgstr "" -#: library/datetime.rst:1926 +#: library/datetime.rst:1932 msgid "Return a string representing the time in ISO 8601 format, one of:" msgstr "" -#: library/datetime.rst:1928 +#: library/datetime.rst:1934 msgid "``HH:MM:SS.ffffff``, if :attr:`microsecond` is not 0" msgstr "" -#: library/datetime.rst:1929 +#: library/datetime.rst:1935 msgid "``HH:MM:SS``, if :attr:`microsecond` is 0" msgstr "" -#: library/datetime.rst:1930 +#: library/datetime.rst:1936 msgid "" "``HH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, if :meth:`utcoffset` does not " "return ``None``" msgstr "" -#: library/datetime.rst:1931 +#: library/datetime.rst:1937 msgid "" "``HH:MM:SS+HH:MM[:SS[.ffffff]]``, if :attr:`microsecond` is 0 and :meth:" "`utcoffset` does not return ``None``" msgstr "" -#: library/datetime.rst:1951 +#: library/datetime.rst:1957 msgid ":exc:`ValueError` will be raised on an invalid *timespec* argument." msgstr "" -#: library/datetime.rst:1955 +#: library/datetime.rst:1961 msgid "" -">>> from datetime import time\n" -">>> time(hour=12, minute=34, second=56, microsecond=123456)." +">>> import datetime as dt\n" +">>> dt.time(hour=12, minute=34, second=56, microsecond=123456)." "isoformat(timespec='minutes')\n" "'12:34'\n" -">>> dt = time(hour=12, minute=34, second=56, microsecond=0)\n" -">>> dt.isoformat(timespec='microseconds')\n" +">>> my_time = dt.time(hour=12, minute=34, second=56, microsecond=0)\n" +">>> my_time.isoformat(timespec='microseconds')\n" "'12:34:56.000000'\n" -">>> dt.isoformat(timespec='auto')\n" +">>> my_time.isoformat(timespec='auto')\n" "'12:34:56'" msgstr "" -#: library/datetime.rst:1970 +#: library/datetime.rst:1976 msgid "For a time ``t``, ``str(t)`` is equivalent to ``t.isoformat()``." msgstr "" -#: library/datetime.rst:1975 +#: library/datetime.rst:1981 msgid "" "Return a string representing the time, controlled by an explicit format " "string. See also :ref:`strftime-strptime-behavior` and :meth:`time." "isoformat`." msgstr "" -#: library/datetime.rst:1981 +#: library/datetime.rst:1987 msgid "" "Same as :meth:`.time.strftime`. This makes it possible to specify a format " "string for a :class:`.time` object in :ref:`formatted string literals >> from datetime import time, tzinfo, timedelta\n" -">>> class TZ1(tzinfo):\n" -"... def utcoffset(self, dt):\n" -"... return timedelta(hours=1)\n" -"... def dst(self, dt):\n" -"... return timedelta(0)\n" -"... def tzname(self,dt):\n" +">>> import datetime as dt\n" +">>> class TZ1(dt.tzinfo):\n" +"... def utcoffset(self, when):\n" +"... return dt.timedelta(hours=1)\n" +"... def dst(self, when):\n" +"... return dt.timedelta(0)\n" +"... def tzname(self, when):\n" "... return \"+01:00\"\n" "... def __repr__(self):\n" "... return f\"{self.__class__.__name__}()\"\n" "...\n" -">>> t = time(12, 10, 30, tzinfo=TZ1())\n" +">>> t = dt.time(12, 10, 30, tzinfo=TZ1())\n" ">>> t\n" "datetime.time(12, 10, 30, tzinfo=TZ1())\n" ">>> t.isoformat()\n" @@ -2664,38 +2673,38 @@ msgid "" "'The time is 12:10.'" msgstr "" -#: library/datetime.rst:2046 +#: library/datetime.rst:2052 msgid ":class:`tzinfo` Objects" msgstr "" -#: library/datetime.rst:2050 +#: library/datetime.rst:2056 msgid "" "This is an abstract base class, meaning that this class should not be " "instantiated directly. Define a subclass of :class:`tzinfo` to capture " "information about a particular time zone." msgstr "" -#: library/datetime.rst:2054 +#: library/datetime.rst:2060 msgid "" "An instance of (a concrete subclass of) :class:`tzinfo` can be passed to the " "constructors for :class:`.datetime` and :class:`.time` objects. The latter " -"objects view their attributes as being in local time, and the :class:" -"`tzinfo` object supports methods revealing offset of local time from UTC, " -"the name of the time zone, and DST offset, all relative to a date or time " -"object passed to them." +"objects view their attributes as being in local time, and the :class:`!" +"tzinfo` object supports methods revealing offset of local time from UTC, the " +"name of the time zone, and DST offset, all relative to a date or time object " +"passed to them." msgstr "" -#: library/datetime.rst:2060 +#: library/datetime.rst:2066 msgid "" "You need to derive a concrete subclass, and (at least) supply " "implementations of the standard :class:`tzinfo` methods needed by the :class:" "`.datetime` methods you use. The :mod:`!datetime` module provides :class:" -"`timezone`, a simple concrete subclass of :class:`tzinfo` which can " +"`timezone`, a simple concrete subclass of :class:`!tzinfo` which can " "represent time zones with fixed offset from UTC such as UTC itself or North " "American EST and EDT." msgstr "" -#: library/datetime.rst:2067 +#: library/datetime.rst:2073 msgid "" "Special requirement for pickling: A :class:`tzinfo` subclass must have an :" "meth:`~object.__init__` method that can be called with no arguments, " @@ -2703,20 +2712,20 @@ msgid "" "technical requirement that may be relaxed in the future." msgstr "" -#: library/datetime.rst:2073 +#: library/datetime.rst:2079 msgid "" "A concrete subclass of :class:`tzinfo` may need to implement the following " "methods. Exactly which methods are needed depends on the uses made of aware :" "mod:`!datetime` objects. If in doubt, simply implement all of them." msgstr "" -#: library/datetime.rst:2080 +#: library/datetime.rst:2086 msgid "" "Return offset of local time from UTC, as a :class:`timedelta` object that is " "positive east of UTC. If local time is west of UTC, this should be negative." msgstr "" -#: library/datetime.rst:2083 +#: library/datetime.rst:2089 msgid "" "This represents the *total* offset from UTC; for example, if a :class:" "`tzinfo` object represents both time zone and DST adjustments, :meth:" @@ -2727,31 +2736,31 @@ msgid "" "meth:`utcoffset` will probably look like one of these two::" msgstr "" -#: library/datetime.rst:2091 +#: library/datetime.rst:2097 msgid "" "return CONSTANT # fixed-offset class\n" "return CONSTANT + self.dst(dt) # daylight-aware class" msgstr "" -#: library/datetime.rst:2094 +#: library/datetime.rst:2100 msgid "" "If :meth:`utcoffset` does not return ``None``, :meth:`dst` should not return " "``None`` either." msgstr "" -#: library/datetime.rst:2097 +#: library/datetime.rst:2103 msgid "" "The default implementation of :meth:`utcoffset` raises :exc:" "`NotImplementedError`." msgstr "" -#: library/datetime.rst:2106 +#: library/datetime.rst:2112 msgid "" "Return the daylight saving time (DST) adjustment, as a :class:`timedelta` " "object or ``None`` if DST information isn't known." msgstr "" -#: library/datetime.rst:2110 +#: library/datetime.rst:2116 msgid "" "Return ``timedelta(0)`` if DST is not in effect. If DST is in effect, return " "the offset as a :class:`timedelta` object (see :meth:`utcoffset` for " @@ -2764,65 +2773,69 @@ msgid "" "to account for DST changes when crossing time zones." msgstr "" -#: library/datetime.rst:2120 +#: library/datetime.rst:2126 msgid "" "An instance *tz* of a :class:`tzinfo` subclass that models both standard and " "daylight times must be consistent in this sense:" msgstr "" -#: library/datetime.rst:2123 +#: library/datetime.rst:2129 msgid "``tz.utcoffset(dt) - tz.dst(dt)``" msgstr "" -#: library/datetime.rst:2125 +#: library/datetime.rst:2131 msgid "" "must return the same result for every :class:`.datetime` *dt* with ``dt." -"tzinfo == tz``. For sane :class:`tzinfo` subclasses, this expression yields " +"tzinfo == tz``. For sane :class:`!tzinfo` subclasses, this expression yields " "the time zone's \"standard offset\", which should not depend on the date or " "the time, but only on geographic location. The implementation of :meth:" "`datetime.astimezone` relies on this, but cannot detect violations; it's the " -"programmer's responsibility to ensure it. If a :class:`tzinfo` subclass " +"programmer's responsibility to ensure it. If a :class:`!tzinfo` subclass " "cannot guarantee this, it may be able to override the default implementation " "of :meth:`tzinfo.fromutc` to work correctly with :meth:`~.datetime." "astimezone` regardless." msgstr "" -#: library/datetime.rst:2134 +#: library/datetime.rst:2140 msgid "" "Most implementations of :meth:`dst` will probably look like one of these " "two::" msgstr "" -#: library/datetime.rst:2136 +#: library/datetime.rst:2142 msgid "" -"def dst(self, dt):\n" +"import datetime as dt\n" +"\n" +"def dst(self, when):\n" " # a fixed-offset class: doesn't account for DST\n" -" return timedelta(0)" +" return dt.timedelta(0)" msgstr "" -#: library/datetime.rst:2140 +#: library/datetime.rst:2148 msgid "or::" msgstr "" -#: library/datetime.rst:2142 +#: library/datetime.rst:2150 msgid "" -"def dst(self, dt):\n" +"import datetime as dt\n" +"\n" +"def dst(self, when):\n" " # Code to set dston and dstoff to the time zone's DST\n" -" # transition times based on the input dt.year, and expressed\n" +" # transition times based on the input when.year, and expressed\n" " # in standard local time.\n" "\n" -" if dston <= dt.replace(tzinfo=None) < dstoff:\n" -" return timedelta(hours=1)\n" +" if dston <= when.replace(tzinfo=None) < dstoff:\n" +" return dt.timedelta(hours=1)\n" " else:\n" -" return timedelta(0)" +" return dt.timedelta(0)" msgstr "" -#: library/datetime.rst:2152 +#: library/datetime.rst:2162 msgid "" "The default implementation of :meth:`dst` raises :exc:`NotImplementedError`." msgstr "" -#: library/datetime.rst:2160 +#: library/datetime.rst:2170 msgid "" "Return the time zone name corresponding to the :class:`.datetime` object " "*dt*, as a string. Nothing about string names is defined by the :mod:`!" @@ -2832,27 +2845,27 @@ msgid "" "all valid replies. Return ``None`` if a string name isn't known. Note that " "this is a method rather than a fixed string primarily because some :class:" "`tzinfo` subclasses will wish to return different names depending on the " -"specific value of *dt* passed, especially if the :class:`tzinfo` class is " +"specific value of *dt* passed, especially if the :class:`!tzinfo` class is " "accounting for daylight time." msgstr "" -#: library/datetime.rst:2170 +#: library/datetime.rst:2180 msgid "" "The default implementation of :meth:`tzname` raises :exc:" "`NotImplementedError`." msgstr "" -#: library/datetime.rst:2173 +#: library/datetime.rst:2183 msgid "" "These methods are called by a :class:`.datetime` or :class:`.time` object, " -"in response to their methods of the same names. A :class:`.datetime` object " -"passes itself as the argument, and a :class:`.time` object passes ``None`` " +"in response to their methods of the same names. A :class:`!datetime` object " +"passes itself as the argument, and a :class:`!time` object passes ``None`` " "as the argument. A :class:`tzinfo` subclass's methods should therefore be " -"prepared to accept a *dt* argument of ``None``, or of class :class:`." +"prepared to accept a *dt* argument of ``None``, or of class :class:`!" "datetime`." msgstr "" -#: library/datetime.rst:2179 +#: library/datetime.rst:2189 msgid "" "When ``None`` is passed, it's up to the class designer to decide the best " "response. For example, returning ``None`` is appropriate if the class wishes " @@ -2861,23 +2874,23 @@ msgid "" "offset, as there is no other convention for discovering the standard offset." msgstr "" -#: library/datetime.rst:2185 +#: library/datetime.rst:2195 msgid "" -"When a :class:`.datetime` object is passed in response to a :class:`." +"When a :class:`.datetime` object is passed in response to a :class:`!" "datetime` method, ``dt.tzinfo`` is the same object as *self*. :class:" -"`tzinfo` methods can rely on this, unless user code calls :class:`tzinfo` " -"methods directly. The intent is that the :class:`tzinfo` methods interpret " +"`tzinfo` methods can rely on this, unless user code calls :class:`!tzinfo` " +"methods directly. The intent is that the :class:`!tzinfo` methods interpret " "*dt* as being in local time, and not need worry about objects in other time " "zones." msgstr "" -#: library/datetime.rst:2191 +#: library/datetime.rst:2201 msgid "" "There is one more :class:`tzinfo` method that a subclass may wish to " "override:" msgstr "" -#: library/datetime.rst:2196 +#: library/datetime.rst:2206 msgid "" "This is called from the default :meth:`datetime.astimezone` implementation. " "When called from that, ``dt.tzinfo`` is *self*, and *dt*'s date and time " @@ -2886,7 +2899,7 @@ msgid "" "datetime in *self*'s local time." msgstr "" -#: library/datetime.rst:2202 +#: library/datetime.rst:2212 msgid "" "Most :class:`tzinfo` subclasses should be able to inherit the default :meth:" "`fromutc` implementation without problems. It's strong enough to handle " @@ -2901,103 +2914,107 @@ msgid "" "offset changes." msgstr "" -#: library/datetime.rst:2213 +#: library/datetime.rst:2223 msgid "" "Skipping code for error cases, the default :meth:`fromutc` implementation " "acts like::" msgstr "" -#: library/datetime.rst:2216 +#: library/datetime.rst:2226 msgid "" -"def fromutc(self, dt):\n" -" # raise ValueError error if dt.tzinfo is not self\n" -" dtoff = dt.utcoffset()\n" -" dtdst = dt.dst()\n" +"import datetime as dt\n" +"\n" +"def fromutc(self, when):\n" +" # raise ValueError error if when.tzinfo is not self\n" +" dtoff = when.utcoffset()\n" +" dtdst = when.dst()\n" " # raise ValueError if dtoff is None or dtdst is None\n" " delta = dtoff - dtdst # this is self's standard offset\n" " if delta:\n" -" dt += delta # convert to standard local time\n" -" dtdst = dt.dst()\n" +" when += delta # convert to standard local time\n" +" dtdst = when.dst()\n" " # raise ValueError if dtdst is None\n" " if dtdst:\n" -" return dt + dtdst\n" +" return when + dtdst\n" " else:\n" -" return dt" +" return when" msgstr "" -#: library/datetime.rst:2231 +#: library/datetime.rst:2243 msgid "" "In the following :download:`tzinfo_examples.py <../includes/tzinfo_examples." "py>` file there are some examples of :class:`tzinfo` classes:" msgstr "" -#: library/datetime.rst:2235 +#: library/datetime.rst:2247 msgid "" -"from datetime import tzinfo, timedelta, datetime\n" -"\n" -"ZERO = timedelta(0)\n" -"HOUR = timedelta(hours=1)\n" -"SECOND = timedelta(seconds=1)\n" +"import datetime as dt\n" "\n" "# A class capturing the platform's idea of local time.\n" "# (May result in wrong values on historical times in\n" "# timezones where UTC offset and/or the DST rules had\n" "# changed in the past.)\n" -"import time as _time\n" +"import time\n" +"\n" +"ZERO = dt.timedelta(0)\n" +"HOUR = dt.timedelta(hours=1)\n" +"SECOND = dt.timedelta(seconds=1)\n" "\n" -"STDOFFSET = timedelta(seconds = -_time.timezone)\n" -"if _time.daylight:\n" -" DSTOFFSET = timedelta(seconds = -_time.altzone)\n" +"STDOFFSET = dt.timedelta(seconds=-time.timezone)\n" +"if time.daylight:\n" +" DSTOFFSET = dt.timedelta(seconds=-time.altzone)\n" "else:\n" " DSTOFFSET = STDOFFSET\n" "\n" "DSTDIFF = DSTOFFSET - STDOFFSET\n" "\n" -"class LocalTimezone(tzinfo):\n" "\n" -" def fromutc(self, dt):\n" -" assert dt.tzinfo is self\n" -" stamp = (dt - datetime(1970, 1, 1, tzinfo=self)) // SECOND\n" -" args = _time.localtime(stamp)[:6]\n" +"class LocalTimezone(dt.tzinfo):\n" +"\n" +" def fromutc(self, when):\n" +" assert when.tzinfo is self\n" +" stamp = (when - dt.datetime(1970, 1, 1, tzinfo=self)) // SECOND\n" +" args = time.localtime(stamp)[:6]\n" " dst_diff = DSTDIFF // SECOND\n" " # Detect fold\n" -" fold = (args == _time.localtime(stamp - dst_diff))\n" -" return datetime(*args, microsecond=dt.microsecond,\n" -" tzinfo=self, fold=fold)\n" +" fold = (args == time.localtime(stamp - dst_diff))\n" +" return dt.datetime(*args, microsecond=when.microsecond,\n" +" tzinfo=self, fold=fold)\n" "\n" -" def utcoffset(self, dt):\n" -" if self._isdst(dt):\n" +" def utcoffset(self, when):\n" +" if self._isdst(when):\n" " return DSTOFFSET\n" " else:\n" " return STDOFFSET\n" "\n" -" def dst(self, dt):\n" -" if self._isdst(dt):\n" +" def dst(self, when):\n" +" if self._isdst(when):\n" " return DSTDIFF\n" " else:\n" " return ZERO\n" "\n" -" def tzname(self, dt):\n" -" return _time.tzname[self._isdst(dt)]\n" +" def tzname(self, when):\n" +" return time.tzname[self._isdst(when)]\n" "\n" -" def _isdst(self, dt):\n" -" tt = (dt.year, dt.month, dt.day,\n" -" dt.hour, dt.minute, dt.second,\n" -" dt.weekday(), 0, 0)\n" -" stamp = _time.mktime(tt)\n" -" tt = _time.localtime(stamp)\n" +" def _isdst(self, when):\n" +" tt = (when.year, when.month, when.day,\n" +" when.hour, when.minute, when.second,\n" +" when.weekday(), 0, 0)\n" +" stamp = time.mktime(tt)\n" +" tt = time.localtime(stamp)\n" " return tt.tm_isdst > 0\n" "\n" +"\n" "Local = LocalTimezone()\n" "\n" "\n" "# A complete implementation of current DST rules for major US time zones.\n" "\n" -"def first_sunday_on_or_after(dt):\n" -" days_to_go = 6 - dt.weekday()\n" +"def first_sunday_on_or_after(when):\n" +" days_to_go = 6 - when.weekday()\n" " if days_to_go:\n" -" dt += timedelta(days_to_go)\n" -" return dt\n" +" when += dt.timedelta(days_to_go)\n" +" return when\n" "\n" "\n" "# US DST Rules\n" @@ -3010,22 +3027,23 @@ msgid "" "#\n" "# In the US, since 2007, DST starts at 2am (standard time) on the second\n" "# Sunday in March, which is the first Sunday on or after Mar 8.\n" -"DSTSTART_2007 = datetime(1, 3, 8, 2)\n" +"DSTSTART_2007 = dt.datetime(1, 3, 8, 2)\n" "# and ends at 2am (DST time) on the first Sunday of Nov.\n" -"DSTEND_2007 = datetime(1, 11, 1, 2)\n" +"DSTEND_2007 = dt.datetime(1, 11, 1, 2)\n" "# From 1987 to 2006, DST used to start at 2am (standard time) on the first\n" "# Sunday in April and to end at 2am (DST time) on the last\n" "# Sunday of October, which is the first Sunday on or after Oct 25.\n" -"DSTSTART_1987_2006 = datetime(1, 4, 1, 2)\n" -"DSTEND_1987_2006 = datetime(1, 10, 25, 2)\n" +"DSTSTART_1987_2006 = dt.datetime(1, 4, 1, 2)\n" +"DSTEND_1987_2006 = dt.datetime(1, 10, 25, 2)\n" "# From 1967 to 1986, DST used to start at 2am (standard time) on the last\n" "# Sunday in April (the one on or after April 24) and to end at 2am (DST " "time)\n" "# on the last Sunday of October, which is the first Sunday\n" "# on or after Oct 25.\n" -"DSTSTART_1967_1986 = datetime(1, 4, 24, 2)\n" +"DSTSTART_1967_1986 = dt.datetime(1, 4, 24, 2)\n" "DSTEND_1967_1986 = DSTEND_1987_2006\n" "\n" +"\n" "def us_dst_range(year):\n" " # Find start and end times for US DST. For years before 1967, return\n" " # start = end for no DST.\n" @@ -3036,17 +3054,17 @@ msgid "" " elif 1966 < year < 1987:\n" " dststart, dstend = DSTSTART_1967_1986, DSTEND_1967_1986\n" " else:\n" -" return (datetime(year, 1, 1), ) * 2\n" +" return (dt.datetime(year, 1, 1), ) * 2\n" "\n" " start = first_sunday_on_or_after(dststart.replace(year=year))\n" " end = first_sunday_on_or_after(dstend.replace(year=year))\n" " return start, end\n" "\n" "\n" -"class USTimeZone(tzinfo):\n" +"class USTimeZone(dt.tzinfo):\n" "\n" " def __init__(self, hours, reprname, stdname, dstname):\n" -" self.stdoffset = timedelta(hours=hours)\n" +" self.stdoffset = dt.timedelta(hours=hours)\n" " self.reprname = reprname\n" " self.stdname = stdname\n" " self.dstname = dstname\n" @@ -3054,45 +3072,45 @@ msgid "" " def __repr__(self):\n" " return self.reprname\n" "\n" -" def tzname(self, dt):\n" -" if self.dst(dt):\n" +" def tzname(self, when):\n" +" if self.dst(when):\n" " return self.dstname\n" " else:\n" " return self.stdname\n" "\n" -" def utcoffset(self, dt):\n" -" return self.stdoffset + self.dst(dt)\n" +" def utcoffset(self, when):\n" +" return self.stdoffset + self.dst(when)\n" "\n" -" def dst(self, dt):\n" -" if dt is None or dt.tzinfo is None:\n" +" def dst(self, when):\n" +" if when is None or when.tzinfo is None:\n" " # An exception may be sensible here, in one or both cases.\n" " # It depends on how you want to treat them. The default\n" " # fromutc() implementation (called by the default astimezone()\n" -" # implementation) passes a datetime with dt.tzinfo is self.\n" +" # implementation) passes a datetime with when.tzinfo is self.\n" " return ZERO\n" -" assert dt.tzinfo is self\n" -" start, end = us_dst_range(dt.year)\n" +" assert when.tzinfo is self\n" +" start, end = us_dst_range(when.year)\n" " # Can't compare naive to aware objects, so strip the timezone from\n" -" # dt first.\n" -" dt = dt.replace(tzinfo=None)\n" -" if start + HOUR <= dt < end - HOUR:\n" +" # when first.\n" +" when = when.replace(tzinfo=None)\n" +" if start + HOUR <= when < end - HOUR:\n" " # DST is in effect.\n" " return HOUR\n" -" if end - HOUR <= dt < end:\n" -" # Fold (an ambiguous hour): use dt.fold to disambiguate.\n" -" return ZERO if dt.fold else HOUR\n" -" if start <= dt < start + HOUR:\n" +" if end - HOUR <= when < end:\n" +" # Fold (an ambiguous hour): use when.fold to disambiguate.\n" +" return ZERO if when.fold else HOUR\n" +" if start <= when < start + HOUR:\n" " # Gap (a non-existent hour): reverse the fold rule.\n" -" return HOUR if dt.fold else ZERO\n" +" return HOUR if when.fold else ZERO\n" " # DST is off.\n" " return ZERO\n" "\n" -" def fromutc(self, dt):\n" -" assert dt.tzinfo is self\n" -" start, end = us_dst_range(dt.year)\n" +" def fromutc(self, when):\n" +" assert when.tzinfo is self\n" +" start, end = us_dst_range(when.year)\n" " start = start.replace(tzinfo=self)\n" " end = end.replace(tzinfo=self)\n" -" std_time = dt + self.stdoffset\n" +" std_time = when + self.stdoffset\n" " dst_time = std_time + HOUR\n" " if end <= dst_time < end + HOUR:\n" " # Repeated hour\n" @@ -3111,7 +3129,7 @@ msgid "" "Pacific = USTimeZone(-8, \"Pacific\", \"PST\", \"PDT\")\n" msgstr "" -#: library/datetime.rst:2237 +#: library/datetime.rst:2249 msgid "" "Note that there are unavoidable subtleties twice per year in a :class:" "`tzinfo` subclass accounting for both standard and daylight time, at the DST " @@ -3120,7 +3138,7 @@ msgid "" "ends the minute after 1:59 (EDT) on the first Sunday in November::" msgstr "" -#: library/datetime.rst:2243 +#: library/datetime.rst:2255 msgid "" " UTC 3:MM 4:MM 5:MM 6:MM 7:MM 8:MM\n" " EST 22:MM 23:MM 0:MM 1:MM 2:MM 3:MM\n" @@ -3131,7 +3149,7 @@ msgid "" " end 23:MM 0:MM 1:MM 1:MM 2:MM 3:MM" msgstr "" -#: library/datetime.rst:2251 +#: library/datetime.rst:2263 msgid "" "When DST starts (the \"start\" line), the local wall clock leaps from 1:59 " "to 3:00. A wall time of the form 2:MM doesn't really make sense on that day, " @@ -3140,11 +3158,11 @@ msgid "" "get::" msgstr "" -#: library/datetime.rst:2256 +#: library/datetime.rst:2268 msgid "" -">>> from datetime import datetime, timezone\n" +">>> import datetime as dt\n" ">>> from tzinfo_examples import HOUR, Eastern\n" -">>> u0 = datetime(2016, 3, 13, 5, tzinfo=timezone.utc)\n" +">>> u0 = dt.datetime(2016, 3, 13, 5, tzinfo=dt.timezone.utc)\n" ">>> for i in range(4):\n" "... u = u0 + i*HOUR\n" "... t = u.astimezone(Eastern)\n" @@ -3156,7 +3174,7 @@ msgid "" "08:00:00 UTC = 04:00:00 EDT" msgstr "" -#: library/datetime.rst:2270 +#: library/datetime.rst:2282 msgid "" "When DST ends (the \"end\" line), there's a potentially worse problem: " "there's an hour that can't be spelled unambiguously in local wall time: the " @@ -3171,9 +3189,11 @@ msgid "" "Fall back transition of 2016, we get::" msgstr "" -#: library/datetime.rst:2281 +#: library/datetime.rst:2293 msgid "" -">>> u0 = datetime(2016, 11, 6, 4, tzinfo=timezone.utc)\n" +">>> import datetime as dt\n" +">>> from tzinfo_examples import HOUR, Eastern\n" +">>> u0 = dt.datetime(2016, 11, 6, 4, tzinfo=dt.timezone.utc)\n" ">>> for i in range(4):\n" "... u = u0 + i*HOUR\n" "... t = u.astimezone(Eastern)\n" @@ -3185,44 +3205,44 @@ msgid "" "07:00:00 UTC = 02:00:00 EST 0" msgstr "" -#: library/datetime.rst:2292 +#: library/datetime.rst:2306 msgid "" "Note that the :class:`.datetime` instances that differ only by the value of " "the :attr:`~.datetime.fold` attribute are considered equal in comparisons." msgstr "" -#: library/datetime.rst:2295 +#: library/datetime.rst:2309 msgid "" "Applications that can't bear wall-time ambiguities should explicitly check " "the value of the :attr:`~.datetime.fold` attribute or avoid using hybrid :" "class:`tzinfo` subclasses; there are no ambiguities when using :class:" -"`timezone`, or any other fixed-offset :class:`tzinfo` subclass (such as a " +"`timezone`, or any other fixed-offset :class:`!tzinfo` subclass (such as a " "class representing only EST (fixed offset -5 hours), or only EDT (fixed " "offset -4 hours))." msgstr "" -#: library/datetime.rst:2303 +#: library/datetime.rst:2317 msgid ":mod:`zoneinfo`" msgstr "" -#: library/datetime.rst:2304 +#: library/datetime.rst:2318 msgid "" "The :mod:`!datetime` module has a basic :class:`timezone` class (for " "handling arbitrary fixed offsets from UTC) and its :attr:`timezone.utc` " "attribute (a UTC :class:`!timezone` instance)." msgstr "" -#: library/datetime.rst:2308 +#: library/datetime.rst:2322 msgid "" "``zoneinfo`` brings the *IANA time zone database* (also known as the Olson " "database) to Python, and its usage is recommended." msgstr "" -#: library/datetime.rst:2311 +#: library/datetime.rst:2325 msgid "`IANA time zone database `_" msgstr "" -#: library/datetime.rst:2312 +#: library/datetime.rst:2326 msgid "" "The Time Zone Database (often called tz, tzdata or zoneinfo) contains code " "and data that represent the history of local time for many representative " @@ -3231,24 +3251,24 @@ msgid "" "saving rules." msgstr "" -#: library/datetime.rst:2322 +#: library/datetime.rst:2336 msgid ":class:`timezone` Objects" msgstr "" -#: library/datetime.rst:2324 +#: library/datetime.rst:2338 msgid "" "The :class:`timezone` class is a subclass of :class:`tzinfo`, each instance " "of which represents a time zone defined by a fixed offset from UTC." msgstr "" -#: library/datetime.rst:2328 +#: library/datetime.rst:2342 msgid "" "Objects of this class cannot be used to represent time zone information in " "the locations where different offsets are used in different days of the year " "or where historical changes have been made to civil time." msgstr "" -#: library/datetime.rst:2335 +#: library/datetime.rst:2349 msgid "" "The *offset* argument must be specified as a :class:`timedelta` object " "representing the difference between the local time and UTC. It must be " @@ -3256,25 +3276,25 @@ msgid "" "otherwise :exc:`ValueError` is raised." msgstr "" -#: library/datetime.rst:2340 +#: library/datetime.rst:2354 msgid "" "The *name* argument is optional. If specified it must be a string that will " "be used as the value returned by the :meth:`datetime.tzname` method." msgstr "" -#: library/datetime.rst:2362 +#: library/datetime.rst:2376 msgid "" "Return the fixed value specified when the :class:`timezone` instance is " "constructed." msgstr "" -#: library/datetime.rst:2354 +#: library/datetime.rst:2368 msgid "" "The *dt* argument is ignored. The return value is a :class:`timedelta` " "instance equal to the difference between the local time and UTC." msgstr "" -#: library/datetime.rst:2365 +#: library/datetime.rst:2379 msgid "" "If *name* is not provided in the constructor, the name returned by " "``tzname(dt)`` is generated from the value of the ``offset`` as follows. If " @@ -3283,154 +3303,155 @@ msgid "" "are two digits of ``offset.hours`` and ``offset.minutes`` respectively." msgstr "" -#: library/datetime.rst:2371 +#: library/datetime.rst:2385 msgid "" "Name generated from ``offset=timedelta(0)`` is now plain ``'UTC'``, not " "``'UTC+00:00'``." msgstr "" -#: library/datetime.rst:2378 +#: library/datetime.rst:2392 msgid "Always returns ``None``." msgstr "" -#: library/datetime.rst:2382 +#: library/datetime.rst:2396 msgid "" "Return ``dt + offset``. The *dt* argument must be an aware :class:`." "datetime` instance, with ``tzinfo`` set to ``self``." msgstr "" -#: library/datetime.rst:2389 +#: library/datetime.rst:2403 msgid "The UTC time zone, ``timezone(timedelta(0))``." msgstr "" -#: library/datetime.rst:2398 +#: library/datetime.rst:2412 msgid ":meth:`~.datetime.strftime` and :meth:`~.datetime.strptime` Behavior" msgstr "" -#: library/datetime.rst:2400 +#: library/datetime.rst:2414 msgid "" ":class:`date`, :class:`.datetime`, and :class:`.time` objects all support a " "``strftime(format)`` method, to create a string representing the time under " "the control of an explicit format string." msgstr "" -#: library/datetime.rst:2404 +#: library/datetime.rst:2418 msgid "" "Conversely, the :meth:`datetime.strptime` class method creates a :class:`." "datetime` object from a string representing a date and time and a " "corresponding format string." msgstr "" -#: library/datetime.rst:2408 +#: library/datetime.rst:2422 msgid "" "The table below provides a high-level comparison of :meth:`~.datetime." "strftime` versus :meth:`~.datetime.strptime`:" msgstr "" -#: library/datetime.rst:2412 +#: library/datetime.rst:2426 msgid "``strftime``" msgstr "" -#: library/datetime.rst:2412 +#: library/datetime.rst:2426 msgid "``strptime``" msgstr "" -#: library/datetime.rst:2414 +#: library/datetime.rst:2428 msgid "Usage" msgstr "" -#: library/datetime.rst:2414 +#: library/datetime.rst:2428 msgid "Convert object to a string according to a given format" msgstr "" -#: library/datetime.rst:2414 +#: library/datetime.rst:2428 msgid "" "Parse a string into a :class:`.datetime` object given a corresponding format" msgstr "" -#: library/datetime.rst:2416 +#: library/datetime.rst:2430 msgid "Type of method" msgstr "" -#: library/datetime.rst:2416 +#: library/datetime.rst:2430 msgid "Instance method" msgstr "" -#: library/datetime.rst:2416 +#: library/datetime.rst:2430 msgid "Class method" msgstr "" -#: library/datetime.rst:2418 +#: library/datetime.rst:2432 msgid "Method of" msgstr "" -#: library/datetime.rst:2418 +#: library/datetime.rst:2432 msgid ":class:`date`; :class:`.datetime`; :class:`.time`" msgstr "" -#: library/datetime.rst:2418 +#: library/datetime.rst:2432 msgid ":class:`.datetime`" msgstr "" -#: library/datetime.rst:2420 +#: library/datetime.rst:2434 msgid "Signature" msgstr "" -#: library/datetime.rst:2420 +#: library/datetime.rst:2434 msgid "``strftime(format)``" msgstr "" -#: library/datetime.rst:2420 +#: library/datetime.rst:2434 msgid "``strptime(date_string, format)``" msgstr "" -#: library/datetime.rst:2427 +#: library/datetime.rst:2441 msgid "" ":meth:`~.datetime.strftime` and :meth:`~.datetime.strptime` Format Codes" msgstr "" -#: library/datetime.rst:2429 +#: library/datetime.rst:2443 msgid "" "These methods accept format codes that can be used to parse and format " "dates::" msgstr "" -#: library/datetime.rst:2431 +#: library/datetime.rst:2445 msgid "" -">>> datetime.strptime('31/01/22 23:59:59.999999',\n" -"... '%d/%m/%y %H:%M:%S.%f')\n" +">>> import datetime as dt\n" +">>> dt.datetime.strptime('31/01/22 23:59:59.999999',\n" +"... '%d/%m/%y %H:%M:%S.%f')\n" "datetime.datetime(2022, 1, 31, 23, 59, 59, 999999)\n" ">>> _.strftime('%a %d %b %Y, %I:%M%p')\n" "'Mon 31 Jan 2022, 11:59PM'" msgstr "" -#: library/datetime.rst:2437 +#: library/datetime.rst:2452 msgid "" "The following is a list of all the format codes that the 1989 C standard " "requires, and these work on all platforms with a standard C implementation." msgstr "" -#: library/datetime.rst:2544 +#: library/datetime.rst:2559 msgid "Directive" msgstr "" -#: library/datetime.rst:2544 +#: library/datetime.rst:2559 msgid "Meaning" msgstr "" -#: library/datetime.rst:2544 +#: library/datetime.rst:2559 msgid "Example" msgstr "" -#: library/datetime.rst:2544 +#: library/datetime.rst:2559 msgid "Notes" msgstr "" -#: library/datetime.rst:2443 +#: library/datetime.rst:2458 msgid "``%a``" msgstr "" -#: library/datetime.rst:2443 +#: library/datetime.rst:2458 msgid "Weekday as locale's abbreviated name." msgstr "" @@ -3442,11 +3463,11 @@ msgstr "" msgid "So, Mo, ..., Sa (de_DE)" msgstr "" -#: library/datetime.rst:2448 +#: library/datetime.rst:2463 msgid "``%A``" msgstr "" -#: library/datetime.rst:2448 +#: library/datetime.rst:2463 msgid "Weekday as locale's full name." msgstr "" @@ -3458,40 +3479,40 @@ msgstr "" msgid "Sonntag, Montag, ..., Samstag (de_DE)" msgstr "" -#: library/datetime.rst:2453 +#: library/datetime.rst:2468 msgid "``%w``" msgstr "" -#: library/datetime.rst:2453 +#: library/datetime.rst:2468 msgid "Weekday as a decimal number, where 0 is Sunday and 6 is Saturday." msgstr "" -#: library/datetime.rst:2453 +#: library/datetime.rst:2468 msgid "0, 1, ..., 6" msgstr "" -#: library/datetime.rst:2457 +#: library/datetime.rst:2472 msgid "``%d``" msgstr "" -#: library/datetime.rst:2457 +#: library/datetime.rst:2472 msgid "Day of the month as a zero-padded decimal number." msgstr "" -#: library/datetime.rst:2457 +#: library/datetime.rst:2472 msgid "01, 02, ..., 31" msgstr "" -#: library/datetime.rst:2470 library/datetime.rst:2479 -#: library/datetime.rst:2488 library/datetime.rst:2506 +#: library/datetime.rst:2485 library/datetime.rst:2494 +#: library/datetime.rst:2503 library/datetime.rst:2521 msgid "\\(9)" msgstr "" -#: library/datetime.rst:2460 +#: library/datetime.rst:2475 msgid "``%b``" msgstr "" -#: library/datetime.rst:2460 +#: library/datetime.rst:2475 msgid "Month as locale's abbreviated name." msgstr "" @@ -3503,11 +3524,11 @@ msgstr "" msgid "Jan, Feb, ..., Dez (de_DE)" msgstr "" -#: library/datetime.rst:2465 +#: library/datetime.rst:2480 msgid "``%B``" msgstr "" -#: library/datetime.rst:2465 +#: library/datetime.rst:2480 msgid "Month as locale's full name." msgstr "" @@ -3519,67 +3540,67 @@ msgstr "" msgid "Januar, Februar, ..., Dezember (de_DE)" msgstr "" -#: library/datetime.rst:2470 +#: library/datetime.rst:2485 msgid "``%m``" msgstr "" -#: library/datetime.rst:2470 +#: library/datetime.rst:2485 msgid "Month as a zero-padded decimal number." msgstr "" -#: library/datetime.rst:2482 +#: library/datetime.rst:2497 msgid "01, 02, ..., 12" msgstr "" -#: library/datetime.rst:2473 +#: library/datetime.rst:2488 msgid "``%y``" msgstr "" -#: library/datetime.rst:2473 +#: library/datetime.rst:2488 msgid "Year without century as a zero-padded decimal number." msgstr "" -#: library/datetime.rst:2473 +#: library/datetime.rst:2488 msgid "00, 01, ..., 99" msgstr "" -#: library/datetime.rst:2476 +#: library/datetime.rst:2491 msgid "``%Y``" msgstr "" -#: library/datetime.rst:2476 +#: library/datetime.rst:2491 msgid "Year with century as a decimal number." msgstr "" -#: library/datetime.rst:2546 +#: library/datetime.rst:2561 msgid "0001, 0002, ..., 2013, 2014, ..., 9998, 9999" msgstr "" -#: library/datetime.rst:2479 +#: library/datetime.rst:2494 msgid "``%H``" msgstr "" -#: library/datetime.rst:2479 +#: library/datetime.rst:2494 msgid "Hour (24-hour clock) as a zero-padded decimal number." msgstr "" -#: library/datetime.rst:2479 +#: library/datetime.rst:2494 msgid "00, 01, ..., 23" msgstr "" -#: library/datetime.rst:2482 +#: library/datetime.rst:2497 msgid "``%I``" msgstr "" -#: library/datetime.rst:2482 +#: library/datetime.rst:2497 msgid "Hour (12-hour clock) as a zero-padded decimal number." msgstr "" -#: library/datetime.rst:2485 +#: library/datetime.rst:2500 msgid "``%p``" msgstr "" -#: library/datetime.rst:2485 +#: library/datetime.rst:2500 msgid "Locale's equivalent of either AM or PM." msgstr "" @@ -3591,127 +3612,127 @@ msgstr "" msgid "am, pm (de_DE)" msgstr "" -#: library/datetime.rst:2485 +#: library/datetime.rst:2500 msgid "\\(1), \\(3)" msgstr "" -#: library/datetime.rst:2488 +#: library/datetime.rst:2503 msgid "``%M``" msgstr "" -#: library/datetime.rst:2488 +#: library/datetime.rst:2503 msgid "Minute as a zero-padded decimal number." msgstr "" -#: library/datetime.rst:2491 +#: library/datetime.rst:2506 msgid "00, 01, ..., 59" msgstr "" -#: library/datetime.rst:2491 +#: library/datetime.rst:2506 msgid "``%S``" msgstr "" -#: library/datetime.rst:2491 +#: library/datetime.rst:2506 msgid "Second as a zero-padded decimal number." msgstr "" -#: library/datetime.rst:2491 +#: library/datetime.rst:2506 msgid "\\(4), \\(9)" msgstr "" -#: library/datetime.rst:2494 +#: library/datetime.rst:2509 msgid "``%f``" msgstr "" -#: library/datetime.rst:2494 +#: library/datetime.rst:2509 msgid "Microsecond as a decimal number, zero-padded to 6 digits." msgstr "" -#: library/datetime.rst:2494 +#: library/datetime.rst:2509 msgid "000000, 000001, ..., 999999" msgstr "" -#: library/datetime.rst:2494 +#: library/datetime.rst:2509 msgid "\\(5)" msgstr "" -#: library/datetime.rst:2657 +#: library/datetime.rst:2711 msgid "``%z``" msgstr "" -#: library/datetime.rst:2498 +#: library/datetime.rst:2513 msgid "" "UTC offset in the form ``±HHMM[SS[.ffffff]]`` (empty string if the object is " "naive)." msgstr "" -#: library/datetime.rst:2498 +#: library/datetime.rst:2513 msgid "(empty), +0000, -0400, +1030, +063415, -030712.345216" msgstr "" -#: library/datetime.rst:2503 library/datetime.rst:2560 +#: library/datetime.rst:2518 library/datetime.rst:2575 msgid "\\(6)" msgstr "" -#: library/datetime.rst:2683 +#: library/datetime.rst:2737 msgid "``%Z``" msgstr "" -#: library/datetime.rst:2503 +#: library/datetime.rst:2518 msgid "Time zone name (empty string if the object is naive)." msgstr "" -#: library/datetime.rst:2503 +#: library/datetime.rst:2518 msgid "(empty), UTC, GMT" msgstr "" -#: library/datetime.rst:2506 +#: library/datetime.rst:2521 msgid "``%j``" msgstr "" -#: library/datetime.rst:2506 +#: library/datetime.rst:2521 msgid "Day of the year as a zero-padded decimal number." msgstr "" -#: library/datetime.rst:2506 +#: library/datetime.rst:2521 msgid "001, 002, ..., 366" msgstr "" -#: library/datetime.rst:2509 +#: library/datetime.rst:2524 msgid "``%U``" msgstr "" -#: library/datetime.rst:2509 +#: library/datetime.rst:2524 msgid "" "Week number of the year (Sunday as the first day of the week) as a zero-" "padded decimal number. All days in a new year preceding the first Sunday are " "considered to be in week 0." msgstr "" -#: library/datetime.rst:2517 +#: library/datetime.rst:2532 msgid "00, 01, ..., 53" msgstr "" -#: library/datetime.rst:2517 +#: library/datetime.rst:2532 msgid "\\(7), \\(9)" msgstr "" -#: library/datetime.rst:2517 +#: library/datetime.rst:2532 msgid "``%W``" msgstr "" -#: library/datetime.rst:2517 +#: library/datetime.rst:2532 msgid "" "Week number of the year (Monday as the first day of the week) as a zero-" "padded decimal number. All days in a new year preceding the first Monday are " "considered to be in week 0." msgstr "" -#: library/datetime.rst:2525 +#: library/datetime.rst:2540 msgid "``%c``" msgstr "" -#: library/datetime.rst:2525 +#: library/datetime.rst:2540 msgid "Locale's appropriate date and time representation." msgstr "" @@ -3723,11 +3744,11 @@ msgstr "" msgid "Di 16 Aug 21:30:00 1988 (de_DE)" msgstr "" -#: library/datetime.rst:2530 +#: library/datetime.rst:2545 msgid "``%x``" msgstr "" -#: library/datetime.rst:2530 +#: library/datetime.rst:2545 msgid "Locale's appropriate date representation." msgstr "" @@ -3743,11 +3764,11 @@ msgstr "" msgid "16.08.1988 (de_DE)" msgstr "" -#: library/datetime.rst:2534 +#: library/datetime.rst:2549 msgid "``%X``" msgstr "" -#: library/datetime.rst:2534 +#: library/datetime.rst:2549 msgid "Locale's appropriate time representation." msgstr "" @@ -3759,83 +3780,83 @@ msgstr "" msgid "21:30:00 (de_DE)" msgstr "" -#: library/datetime.rst:2537 +#: library/datetime.rst:2552 msgid "``%%``" msgstr "" -#: library/datetime.rst:2537 +#: library/datetime.rst:2552 msgid "A literal ``'%'`` character." msgstr "" -#: library/datetime.rst:2537 +#: library/datetime.rst:2552 msgid "%" msgstr "" -#: library/datetime.rst:2540 +#: library/datetime.rst:2555 msgid "" "Several additional directives not required by the C89 standard are included " "for convenience. These parameters all correspond to ISO 8601 date values." msgstr "" -#: library/datetime.rst:2546 +#: library/datetime.rst:2561 msgid "``%G``" msgstr "" -#: library/datetime.rst:2546 +#: library/datetime.rst:2561 msgid "" "ISO 8601 year with century representing the year that contains the greater " "part of the ISO week (``%V``)." msgstr "" -#: library/datetime.rst:2546 +#: library/datetime.rst:2561 msgid "\\(8)" msgstr "" -#: library/datetime.rst:2551 +#: library/datetime.rst:2566 msgid "``%u``" msgstr "" -#: library/datetime.rst:2551 +#: library/datetime.rst:2566 msgid "ISO 8601 weekday as a decimal number where 1 is Monday." msgstr "" -#: library/datetime.rst:2551 +#: library/datetime.rst:2566 msgid "1, 2, ..., 7" msgstr "" -#: library/datetime.rst:2554 +#: library/datetime.rst:2569 msgid "``%V``" msgstr "" -#: library/datetime.rst:2554 +#: library/datetime.rst:2569 msgid "" "ISO 8601 week as a decimal number with Monday as the first day of the week. " "Week 01 is the week containing Jan 4." msgstr "" -#: library/datetime.rst:2554 +#: library/datetime.rst:2569 msgid "01, 02, ..., 53" msgstr "" -#: library/datetime.rst:2554 +#: library/datetime.rst:2569 msgid "\\(8), \\(9)" msgstr "" -#: library/datetime.rst:2679 +#: library/datetime.rst:2733 msgid "``%:z``" msgstr "" -#: library/datetime.rst:2560 +#: library/datetime.rst:2575 msgid "" "UTC offset in the form ``±HH:MM[:SS[.ffffff]]`` (empty string if the object " "is naive)." msgstr "" -#: library/datetime.rst:2560 +#: library/datetime.rst:2575 msgid "(empty), +00:00, -04:00, +10:30, +06:34:15, -03:07:12.345216" msgstr "" -#: library/datetime.rst:2566 +#: library/datetime.rst:2581 msgid "" "These may not be available on all platforms when used with the :meth:`~." "datetime.strftime` method. The ISO 8601 year and ISO 8601 week directives " @@ -3844,7 +3865,7 @@ msgid "" "directives will raise a :exc:`ValueError`." msgstr "" -#: library/datetime.rst:2571 +#: library/datetime.rst:2586 msgid "" "The full set of format codes supported varies across platforms, because " "Python calls the platform C library's :c:func:`strftime` function, and " @@ -3854,58 +3875,86 @@ msgid "" "unsupported format specifiers." msgstr "" -#: library/datetime.rst:2577 +#: library/datetime.rst:2592 msgid "``%G``, ``%u`` and ``%V`` were added." msgstr "" -#: library/datetime.rst:2580 +#: library/datetime.rst:2595 msgid "``%:z`` was added." msgstr "" -#: library/datetime.rst:2584 +#: library/datetime.rst:2599 msgid "Technical Detail" msgstr "" -#: library/datetime.rst:2586 +#: library/datetime.rst:2601 msgid "" "Broadly speaking, ``d.strftime(fmt)`` acts like the :mod:`time` module's " "``time.strftime(fmt, d.timetuple())`` although not all objects support a :" "meth:`~date.timetuple` method." msgstr "" -#: library/datetime.rst:2590 +#: library/datetime.rst:2605 msgid "" "For the :meth:`.datetime.strptime` class method, the default value is " "``1900-01-01T00:00:00.000``: any components not specified in the format " -"string will be pulled from the default value. [#]_" +"string will be pulled from the default value." +msgstr "" + +#: library/datetime.rst:2610 +msgid "" +"Format strings without separators can be ambiguous for parsing. For example, " +"with ``%Y%m%d``, the string ``2026111`` may be parsed either as " +"``2026-11-01`` or as ``2026-01-11``. Use separators to ensure the input is " +"parsed as intended." +msgstr "" + +#: library/datetime.rst:2616 +msgid "" +"When used to parse partial dates lacking a year, :meth:`.datetime.strptime` " +"will raise when encountering February 29 because the default year of 1900 is " +"*not* a leap year. Always add a default leap year to partial date strings " +"before parsing." msgstr "" -#: library/datetime.rst:2594 +#: library/datetime.rst:2637 +msgid "" +">>> import datetime as dt\n" +">>> value = \"2/29\"\n" +">>> dt.datetime.strptime(value, \"%m/%d\")\n" +"Traceback (most recent call last):\n" +"...\n" +"ValueError: day 29 must be in range 1..28 for month 2 in year 1900\n" +">>> dt.datetime.strptime(f\"1904 {value}\", \"%Y %m/%d\")\n" +"datetime.datetime(1904, 2, 29, 0, 0)" +msgstr "" + +#: library/datetime.rst:2648 msgid "Using ``datetime.strptime(date_string, format)`` is equivalent to::" msgstr "" -#: library/datetime.rst:2598 +#: library/datetime.rst:2652 msgid "" "except when the format includes sub-second components or time zone offset " "information, which are supported in ``datetime.strptime`` but are discarded " "by ``time.strptime``." msgstr "" -#: library/datetime.rst:2602 +#: library/datetime.rst:2656 msgid "" "For :class:`.time` objects, the format codes for year, month, and day should " "not be used, as :class:`!time` objects have no such values. If they're used " "anyway, 1900 is substituted for the year, and 1 for the month and day." msgstr "" -#: library/datetime.rst:2606 +#: library/datetime.rst:2660 msgid "" "For :class:`date` objects, the format codes for hours, minutes, seconds, and " "microseconds should not be used, as :class:`date` objects have no such " "values. If they're used anyway, 0 is substituted for them." msgstr "" -#: library/datetime.rst:2610 +#: library/datetime.rst:2664 msgid "" "For the same reason, handling of format strings containing Unicode code " "points that can't be represented in the charset of the current locale is " @@ -3914,7 +3963,7 @@ msgid "" "`UnicodeError` or return an empty string instead." msgstr "" -#: library/datetime.rst:2619 +#: library/datetime.rst:2673 msgid "" "Because the format depends on the current locale, care should be taken when " "making assumptions about the output value. Field orderings will vary (for " @@ -3922,38 +3971,38 @@ msgid "" "contain non-ASCII characters." msgstr "" -#: library/datetime.rst:2625 +#: library/datetime.rst:2679 msgid "" "The :meth:`~.datetime.strptime` method can parse years in the full [1, 9999] " "range, but years < 1000 must be zero-filled to 4-digit width." msgstr "" -#: library/datetime.rst:2628 +#: library/datetime.rst:2682 msgid "" "In previous versions, :meth:`~.datetime.strftime` method was restricted to " "years >= 1900." msgstr "" -#: library/datetime.rst:2632 +#: library/datetime.rst:2686 msgid "" "In version 3.2, :meth:`~.datetime.strftime` method was restricted to years " ">= 1000." msgstr "" -#: library/datetime.rst:2637 +#: library/datetime.rst:2691 msgid "" "When used with the :meth:`~.datetime.strptime` method, the ``%p`` directive " "only affects the output hour field if the ``%I`` directive is used to parse " "the hour." msgstr "" -#: library/datetime.rst:2641 +#: library/datetime.rst:2695 msgid "" "Unlike the :mod:`time` module, the :mod:`!datetime` module does not support " "leap seconds." msgstr "" -#: library/datetime.rst:2645 +#: library/datetime.rst:2699 msgid "" "When used with the :meth:`~.datetime.strptime` method, the ``%f`` directive " "accepts from one to six digits and zero pads on the right. ``%f`` is an " @@ -3961,17 +4010,17 @@ msgid "" "separately in datetime objects, and therefore always available)." msgstr "" -#: library/datetime.rst:2652 +#: library/datetime.rst:2706 msgid "" "For a naive object, the ``%z``, ``%:z`` and ``%Z`` format codes are replaced " "by empty strings." msgstr "" -#: library/datetime.rst:2655 +#: library/datetime.rst:2709 msgid "For an aware object:" msgstr "" -#: library/datetime.rst:2658 +#: library/datetime.rst:2712 msgid "" ":meth:`~.datetime.utcoffset` is transformed into a string of the form " "``±HHMM[SS[.ffffff]]``, where ``HH`` is a 2-digit string giving the number " @@ -3985,7 +4034,7 @@ msgid "" "replaced with the string ``'-0330'``." msgstr "" -#: library/datetime.rst:2672 +#: library/datetime.rst:2726 msgid "" "When the ``%z`` directive is provided to the :meth:`~.datetime.strptime` " "method, the UTC offsets can have a colon as a separator between hours, " @@ -3994,53 +4043,53 @@ msgid "" "``'+00:00'``." msgstr "" -#: library/datetime.rst:2680 +#: library/datetime.rst:2734 msgid "" "Behaves exactly as ``%z``, but has a colon separator added between hours, " "minutes and seconds." msgstr "" -#: library/datetime.rst:2684 +#: library/datetime.rst:2738 msgid "" "In :meth:`~.datetime.strftime`, ``%Z`` is replaced by an empty string if :" "meth:`~.datetime.tzname` returns ``None``; otherwise ``%Z`` is replaced by " "the returned value, which must be a string." msgstr "" -#: library/datetime.rst:2688 +#: library/datetime.rst:2742 msgid ":meth:`~.datetime.strptime` only accepts certain values for ``%Z``:" msgstr "" -#: library/datetime.rst:2690 +#: library/datetime.rst:2744 msgid "any value in ``time.tzname`` for your machine's locale" msgstr "" -#: library/datetime.rst:2691 +#: library/datetime.rst:2745 msgid "the hard-coded values ``UTC`` and ``GMT``" msgstr "" -#: library/datetime.rst:2693 +#: library/datetime.rst:2747 msgid "" "So someone living in Japan may have ``JST``, ``UTC``, and ``GMT`` as valid " "values, but probably not ``EST``. It will raise ``ValueError`` for invalid " "values." msgstr "" -#: library/datetime.rst:2697 +#: library/datetime.rst:2751 msgid "" "When the ``%z`` directive is provided to the :meth:`~.datetime.strptime` " "method, an aware :class:`.datetime` object will be produced. The ``tzinfo`` " "of the result will be set to a :class:`timezone` instance." msgstr "" -#: library/datetime.rst:2703 +#: library/datetime.rst:2757 msgid "" "When used with the :meth:`~.datetime.strptime` method, ``%U`` and ``%W`` are " "only used in calculations when the day of the week and the calendar year " "(``%Y``) are specified." msgstr "" -#: library/datetime.rst:2708 +#: library/datetime.rst:2762 msgid "" "Similar to ``%U`` and ``%W``, ``%V`` is only used in calculations when the " "day of the week and the ISO year (``%G``) are specified in a :meth:`~." @@ -4048,7 +4097,7 @@ msgid "" "interchangeable." msgstr "" -#: library/datetime.rst:2714 +#: library/datetime.rst:2768 msgid "" "When used with the :meth:`~.datetime.strptime` method, the leading zero is " "optional for formats ``%d``, ``%m``, ``%H``, ``%I``, ``%M``, ``%S``, " @@ -4056,24 +4105,24 @@ msgid "" "zero." msgstr "" -#: library/datetime.rst:2719 +#: library/datetime.rst:2773 msgid "" "When parsing a month and day using :meth:`~.datetime.strptime`, always " "include a year in the format. If the value you need to parse lacks a year, " "append an explicit dummy leap year. Otherwise your code will raise an " "exception when it encounters leap day because the default year used by the " -"parser is not a leap year. Users run into this bug every four years..." +"parser (1900) is not a leap year. Users run into that bug every leap year." msgstr "" -#: library/datetime.rst:2725 +#: library/datetime.rst:2779 msgid "" ">>> month_day = \"02/29\"\n" -">>> datetime.strptime(f\"{month_day};1984\", \"%m/%d;%Y\") # No leap year " -"bug.\n" +">>> dt.datetime.strptime(f\"{month_day};1984\", \"%m/%d;%Y\") # No leap " +"year bug.\n" "datetime.datetime(1984, 2, 29, 0, 0)" msgstr "" -#: library/datetime.rst:2731 +#: library/datetime.rst:2785 msgid "" ":meth:`~.datetime.strptime` calls using a format string containing a day of " "month without a year now emit a :exc:`DeprecationWarning`. In 3.15 or later " @@ -4081,15 +4130,15 @@ msgid "" "See :gh:`70647`." msgstr "" -#: library/datetime.rst:2738 +#: library/datetime.rst:2792 msgid "Footnotes" msgstr "" -#: library/datetime.rst:2739 -msgid "If, that is, we ignore the effects of Relativity" +#: library/datetime.rst:2793 +msgid "If, that is, we ignore the effects of relativity." msgstr "" -#: library/datetime.rst:2741 +#: library/datetime.rst:2795 msgid "" "This matches the definition of the \"proleptic Gregorian\" calendar in " "Dershowitz and Reingold's book *Calendrical Calculations*, where it's the " @@ -4098,23 +4147,17 @@ msgid "" "systems." msgstr "" -#: library/datetime.rst:2747 +#: library/datetime.rst:2801 msgid "" "See R. H. van Gent's `guide to the mathematics of the ISO 8601 calendar " "`_ for a good explanation." msgstr "" -#: library/datetime.rst:2751 -msgid "" -"Passing ``datetime.strptime('Feb 29', '%b %d')`` will fail since 1900 is not " -"a leap year." -msgstr "" - -#: library/datetime.rst:2392 +#: library/datetime.rst:2406 msgid "% (percent)" msgstr "" -#: library/datetime.rst:2392 +#: library/datetime.rst:2406 msgid "datetime format" msgstr "" diff --git a/library/dbm.po b/library/dbm.po index 108213ced..9833fcae8 100644 --- a/library/dbm.po +++ b/library/dbm.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -81,7 +81,7 @@ msgid "" "``'dbm.gnu'``" msgstr "" -#: library/dbm.rst:270 library/dbm.rst:471 +#: library/dbm.rst:270 library/dbm.rst:472 msgid "*filename* accepts a :term:`path-like object`." msgstr "" @@ -112,29 +112,29 @@ msgid "" "the first submodule listed above that can be imported is used." msgstr "" -#: library/dbm.rst:182 library/dbm.rst:374 +#: library/dbm.rst:181 library/dbm.rst:375 msgid "" "* ``'r'`` (default): |flag_r| * ``'w'``: |flag_w| * ``'c'``: |flag_c| * " "``'n'``: |flag_n|" msgstr "" -#: library/dbm.rst:184 library/dbm.rst:375 +#: library/dbm.rst:183 library/dbm.rst:376 msgid "``'r'`` (default): |flag_r|" msgstr "" -#: library/dbm.rst:185 library/dbm.rst:376 library/dbm.rst:452 +#: library/dbm.rst:184 library/dbm.rst:377 library/dbm.rst:453 msgid "``'w'``: |flag_w|" msgstr "" -#: library/dbm.rst:186 library/dbm.rst:377 +#: library/dbm.rst:185 library/dbm.rst:378 msgid "``'c'``: |flag_c|" msgstr "" -#: library/dbm.rst:187 library/dbm.rst:378 library/dbm.rst:454 +#: library/dbm.rst:186 library/dbm.rst:379 library/dbm.rst:455 msgid "``'n'``: |flag_n|" msgstr "" -#: library/dbm.rst:264 library/dbm.rst:456 +#: library/dbm.rst:264 library/dbm.rst:457 msgid "|mode_param_doc|" msgstr "" @@ -236,11 +236,11 @@ msgstr "" msgid ":mod:`dbm.sqlite3` --- SQLite backend for dbm" msgstr "" -#: library/dbm.rst:163 +#: library/dbm.rst:162 msgid "**Source code:** :source:`Lib/dbm/sqlite3.py`" msgstr "" -#: library/dbm.rst:167 +#: library/dbm.rst:166 msgid "" "This module uses the standard library :mod:`sqlite3` module to provide an " "SQLite backend for the :mod:`dbm` module. The files created by :mod:`dbm." @@ -248,7 +248,8 @@ msgid "" "including the SQLite CLI." msgstr "" -#: includes/wasm-mobile-notavail.rst:3 includes/wasm-notavail.rst:3 +#: library/dbm.rst:353 includes/wasm-mobile-notavail.rst:3 +#: includes/wasm-notavail.rst:3 msgid "Availability" msgstr "" @@ -258,21 +259,21 @@ msgid "" "availability` for more information." msgstr "" -#: library/dbm.rst:176 +#: library/dbm.rst:175 msgid "Open an SQLite database." msgstr "" -#: library/dbm.rst:178 +#: library/dbm.rst:177 msgid "The path to the database to be opened." msgstr "" -#: library/dbm.rst:189 +#: library/dbm.rst:188 msgid "" "The Unix file access mode of the file (default: octal ``0o666``), used only " "when the database has to be created." msgstr "" -#: library/dbm.rst:193 +#: library/dbm.rst:192 msgid "" "The returned database object behaves similar to a mutable :term:`mapping`, " "but the :meth:`!keys` method returns a list, and the :meth:`!setdefault` " @@ -280,30 +281,30 @@ msgid "" "manager via the :keyword:`with` keyword." msgstr "" -#: library/dbm.rst:399 +#: library/dbm.rst:400 msgid "The following method is also provided:" msgstr "" -#: library/dbm.rst:202 +#: library/dbm.rst:201 msgid "Close the SQLite database." msgstr "" -#: library/dbm.rst:206 +#: library/dbm.rst:205 msgid ":mod:`dbm.gnu` --- GNU database manager" msgstr "" -#: library/dbm.rst:212 +#: library/dbm.rst:210 msgid "**Source code:** :source:`Lib/dbm/gnu.py`" msgstr "" -#: library/dbm.rst:216 +#: library/dbm.rst:214 msgid "" "The :mod:`dbm.gnu` module provides an interface to the :abbr:`GDBM (GNU " "dbm)` library, similar to the :mod:`dbm.ndbm` module, but with additional " "functionality like crash tolerance." msgstr "" -#: library/dbm.rst:342 +#: library/dbm.rst:341 msgid "" "The file formats created by :mod:`dbm.gnu` and :mod:`dbm.ndbm` are " "incompatible and can not be used interchangeably." @@ -389,15 +390,15 @@ msgid "" "supports a \"closing\" context manager via the :keyword:`with` keyword." msgstr "" -#: library/dbm.rst:393 +#: library/dbm.rst:394 msgid "Added the :meth:`!get` and :meth:`!setdefault` methods." msgstr "" -#: library/dbm.rst:396 +#: library/dbm.rst:397 msgid "Added the :meth:`!clear` method." msgstr "" -#: library/dbm.rst:479 +#: library/dbm.rst:480 msgid "The following methods are also provided:" msgstr "" @@ -447,18 +448,18 @@ msgstr "" msgid ":mod:`dbm.ndbm` --- New Database Manager" msgstr "" -#: library/dbm.rst:331 +#: library/dbm.rst:330 msgid "**Source code:** :source:`Lib/dbm/ndbm.py`" msgstr "" -#: library/dbm.rst:335 +#: library/dbm.rst:334 msgid "" "The :mod:`dbm.ndbm` module provides an interface to the :abbr:`NDBM (New " "Database Manager)` library. This module can be used with the \"classic\" " "NDBM interface or the :abbr:`GDBM (GNU dbm)` compatibility interface." msgstr "" -#: library/dbm.rst:347 +#: library/dbm.rst:346 msgid "" "The NDBM library shipped as part of macOS has an undocumented limitation on " "the size of values, which can result in corrupted database files when " @@ -466,32 +467,32 @@ msgid "" "result in a hard crash (segmentation fault)." msgstr "" -#: library/dbm.rst:356 +#: library/dbm.rst:357 msgid "" "Raised on :mod:`dbm.ndbm`-specific errors, such as I/O errors. :exc:" "`KeyError` is raised for general mapping errors like specifying an incorrect " "key." msgstr "" -#: library/dbm.rst:362 +#: library/dbm.rst:363 msgid "Name of the NDBM implementation library used." msgstr "" -#: library/dbm.rst:367 +#: library/dbm.rst:368 msgid "Open an NDBM database and return an :class:`!ndbm` object." msgstr "" -#: library/dbm.rst:369 +#: library/dbm.rst:370 msgid "" "The basename of the database file (without the :file:`.dir` or :file:`.pag` " "extensions)." msgstr "" -#: library/dbm.rst:383 +#: library/dbm.rst:384 msgid "Accepts :term:`path-like object` for filename." msgstr "" -#: library/dbm.rst:386 +#: library/dbm.rst:387 msgid "" ":class:`!ndbm` objects behave similar to mutable :term:`mappings `, " "but methods :meth:`!items`, :meth:`!values`, :meth:`!pop`, :meth:`!popitem`, " @@ -500,19 +501,19 @@ msgid "" "supports a \"closing\" context manager via the :keyword:`with` keyword." msgstr "" -#: library/dbm.rst:403 +#: library/dbm.rst:404 msgid "Close the NDBM database." msgstr "" -#: library/dbm.rst:407 +#: library/dbm.rst:408 msgid ":mod:`dbm.dumb` --- Portable DBM implementation" msgstr "" -#: library/dbm.rst:412 +#: library/dbm.rst:413 msgid "**Source code:** :source:`Lib/dbm/dumb.py`" msgstr "" -#: library/dbm.rst:418 +#: library/dbm.rst:419 msgid "" "The :mod:`dbm.dumb` module is intended as a last resort fallback for the :" "mod:`dbm` module when a more robust module is not available. The :mod:`dbm." @@ -520,82 +521,82 @@ msgid "" "the other database modules." msgstr "" -#: library/dbm.rst:425 +#: library/dbm.rst:426 msgid "" "The :mod:`dbm.dumb` module provides a persistent :class:`dict`-like " "interface which is written entirely in Python. Unlike other :mod:`dbm` " "backends, such as :mod:`dbm.gnu`, no external library is required." msgstr "" -#: library/dbm.rst:430 +#: library/dbm.rst:431 msgid "The :mod:`!dbm.dumb` module defines the following:" msgstr "" -#: library/dbm.rst:434 +#: library/dbm.rst:435 msgid "" "Raised on :mod:`dbm.dumb`-specific errors, such as I/O errors. :exc:" "`KeyError` is raised for general mapping errors like specifying an incorrect " "key." msgstr "" -#: library/dbm.rst:440 +#: library/dbm.rst:441 msgid "Open a :mod:`!dbm.dumb` database." msgstr "" -#: library/dbm.rst:442 +#: library/dbm.rst:443 msgid "" "The basename of the database file (without extensions). A new database " "creates the following files: - :file:`{filename}.dat` - :file:`{filename}." "dir`" msgstr "" -#: library/dbm.rst:443 +#: library/dbm.rst:444 msgid "" "The basename of the database file (without extensions). A new database " "creates the following files:" msgstr "" -#: library/dbm.rst:446 +#: library/dbm.rst:447 msgid ":file:`{filename}.dat`" msgstr "" -#: library/dbm.rst:447 +#: library/dbm.rst:448 msgid ":file:`{filename}.dir`" msgstr "" -#: library/dbm.rst:450 +#: library/dbm.rst:451 msgid "" "* ``'r'``: |flag_r| * ``'w'``: |flag_w| * ``'c'`` (default): |flag_c| * " "``'n'``: |flag_n|" msgstr "" -#: library/dbm.rst:451 +#: library/dbm.rst:452 msgid "``'r'``: |flag_r|" msgstr "" -#: library/dbm.rst:453 +#: library/dbm.rst:454 msgid "``'c'`` (default): |flag_c|" msgstr "" -#: library/dbm.rst:460 +#: library/dbm.rst:461 msgid "" "It is possible to crash the Python interpreter when loading a database with " "a sufficiently large/complex entry due to stack depth limitations in " "Python's AST compiler." msgstr "" -#: library/dbm.rst:464 +#: library/dbm.rst:465 msgid "" ":func:`~dbm.dumb.open` always creates a new database when *flag* is ``'n'``." msgstr "" -#: library/dbm.rst:467 +#: library/dbm.rst:468 msgid "" "A database opened read-only if *flag* is ``'r'``. A database is not created " "if it does not exist if *flag* is ``'r'`` or ``'w'``." msgstr "" -#: library/dbm.rst:474 +#: library/dbm.rst:475 msgid "" "The returned database object behaves similar to a mutable :term:`mapping`, " "but the :meth:`!keys` and :meth:`!items` methods return lists, and the :meth:" @@ -603,16 +604,16 @@ msgid "" "context manager via the :keyword:`with` keyword." msgstr "" -#: library/dbm.rst:483 +#: library/dbm.rst:484 msgid "Close the database." msgstr "" -#: library/dbm.rst:487 +#: library/dbm.rst:488 msgid "" "Synchronize the on-disk directory and data files. This method is called by " "the :meth:`shelve.Shelf.sync` method." msgstr "" -#: library/dbm.rst:414 +#: library/dbm.rst:415 msgid "databases" msgstr "" diff --git a/library/debug.po b/library/debug.po index c0bb5c2e8..34dccd1ce 100644 --- a/library/debug.po +++ b/library/debug.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/decimal.po b/library/decimal.po index db529f384..7a24e4239 100644 --- a/library/decimal.po +++ b/library/decimal.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -34,14 +34,14 @@ msgstr "" #: library/decimal.rst:37 msgid "" -"Decimal \"is based on a floating-point model which was designed with people " -"in mind, and necessarily has a paramount guiding principle -- computers must " -"provide an arithmetic that works in the same way as the arithmetic that " -"people learn at school.\" -- excerpt from the decimal arithmetic " -"specification." +"Decimal \"is based on a `floating-point model `__ which was designed with people in mind, " +"and necessarily has a paramount guiding principle -- computers must provide " +"an arithmetic that works in the same way as the arithmetic that people learn " +"at school.\" -- excerpt from the decimal arithmetic specification." msgstr "" -#: library/decimal.rst:42 +#: library/decimal.rst:44 msgid "" "Decimal numbers can be represented exactly. In contrast, numbers like " "``1.1`` and ``2.2`` do not have exact representations in binary floating " @@ -49,7 +49,7 @@ msgid "" "``3.3000000000000003`` as it does with binary floating point." msgstr "" -#: library/decimal.rst:47 +#: library/decimal.rst:49 msgid "" "The exactness carries over into arithmetic. In decimal floating point, " "``0.1 + 0.1 + 0.1 - 0.3`` is exactly equal to zero. In binary floating " @@ -59,7 +59,7 @@ msgid "" "which have strict equality invariants." msgstr "" -#: library/decimal.rst:54 +#: library/decimal.rst:56 msgid "" "The decimal module incorporates a notion of significant places so that " "``1.30 + 1.20`` is ``2.50``. The trailing zero is kept to indicate " @@ -69,14 +69,14 @@ msgid "" "1.20`` gives ``1.5600``." msgstr "" -#: library/decimal.rst:61 +#: library/decimal.rst:63 msgid "" "Unlike hardware based binary floating point, the decimal module has a user " "alterable precision (defaulting to 28 places) which can be as large as " "needed for a given problem:" msgstr "" -#: library/decimal.rst:73 +#: library/decimal.rst:75 msgid "" "Both binary and decimal floating point are implemented in terms of published " "standards. While the built-in float type exposes only a modest portion of " @@ -86,7 +86,7 @@ msgid "" "using exceptions to block any inexact operations." msgstr "" -#: library/decimal.rst:80 +#: library/decimal.rst:82 msgid "" "The decimal module was designed to support \"without prejudice, both exact " "unrounded decimal arithmetic (sometimes called fixed-point arithmetic) and " @@ -94,13 +94,13 @@ msgid "" "specification." msgstr "" -#: library/decimal.rst:85 +#: library/decimal.rst:87 msgid "" "The module design is centered around three concepts: the decimal number, " "the context for arithmetic, and signals." msgstr "" -#: library/decimal.rst:88 +#: library/decimal.rst:90 msgid "" "A decimal number is immutable. It has a sign, coefficient digits, and an " "exponent. To preserve significance, the coefficient digits do not truncate " @@ -109,7 +109,7 @@ msgid "" "``+0``." msgstr "" -#: library/decimal.rst:94 +#: library/decimal.rst:96 msgid "" "The context for arithmetic is an environment specifying precision, rounding " "rules, limits on exponents, flags indicating the results of operations, and " @@ -119,7 +119,7 @@ msgid "" "`ROUND_HALF_UP`, :const:`ROUND_UP`, and :const:`ROUND_05UP`." msgstr "" -#: library/decimal.rst:101 +#: library/decimal.rst:103 msgid "" "Signals are groups of exceptional conditions arising during the course of " "computation. Depending on the needs of the application, signals may be " @@ -130,7 +130,7 @@ msgid "" "`FloatOperation`." msgstr "" -#: library/decimal.rst:108 +#: library/decimal.rst:110 msgid "" "For each signal there is a flag and a trap enabler. When a signal is " "encountered, its flag is set to one, then, if the trap enabler is set to " @@ -138,24 +138,24 @@ msgid "" "them before monitoring a calculation." msgstr "" -#: library/decimal.rst:116 +#: library/decimal.rst:118 msgid "" "IBM's General Decimal Arithmetic Specification, `The General Decimal " "Arithmetic Specification `_." msgstr "" -#: library/decimal.rst:125 +#: library/decimal.rst:127 msgid "Quick-start tutorial" msgstr "" -#: library/decimal.rst:127 +#: library/decimal.rst:129 msgid "" "The usual start to using decimals is importing the module, viewing the " "current context with :func:`getcontext` and, if necessary, setting new " "values for precision, rounding, or enabled traps::" msgstr "" -#: library/decimal.rst:131 +#: library/decimal.rst:133 msgid "" ">>> from decimal import *\n" ">>> getcontext()\n" @@ -166,7 +166,7 @@ msgid "" ">>> getcontext().prec = 7 # Set a new precision" msgstr "" -#: library/decimal.rst:139 +#: library/decimal.rst:141 msgid "" "Decimal instances can be constructed from integers, strings, floats, or " "tuples. Construction from an integer or a float performs an exact conversion " @@ -175,7 +175,7 @@ msgid "" "negative ``Infinity``, and ``-0``::" msgstr "" -#: library/decimal.rst:145 +#: library/decimal.rst:147 msgid "" ">>> getcontext().prec = 28\n" ">>> Decimal(10)\n" @@ -196,14 +196,14 @@ msgid "" "Decimal('-Infinity')" msgstr "" -#: library/decimal.rst:163 +#: library/decimal.rst:165 msgid "" "If the :exc:`FloatOperation` signal is trapped, accidental mixing of " "decimals and floats in constructors or ordering comparisons raises an " "exception::" msgstr "" -#: library/decimal.rst:167 +#: library/decimal.rst:169 msgid "" ">>> c = getcontext()\n" ">>> c.traps[FloatOperation] = True\n" @@ -219,14 +219,14 @@ msgid "" "True" msgstr "" -#: library/decimal.rst:182 +#: library/decimal.rst:184 msgid "" "The significance of a new Decimal is determined solely by the number of " "digits input. Context precision and rounding only come into play during " "arithmetic operations." msgstr "" -#: library/decimal.rst:186 +#: library/decimal.rst:188 msgid "" ">>> getcontext().prec = 6\n" ">>> Decimal('3.0')\n" @@ -240,13 +240,13 @@ msgid "" "Decimal('5.85988')" msgstr "" -#: library/decimal.rst:199 +#: library/decimal.rst:201 msgid "" "If the internal limits of the C version are exceeded, constructing a decimal " "raises :class:`InvalidOperation`::" msgstr "" -#: library/decimal.rst:202 +#: library/decimal.rst:204 msgid "" ">>> Decimal(\"1e9999999999999999999\")\n" "Traceback (most recent call last):\n" @@ -254,13 +254,13 @@ msgid "" "decimal.InvalidOperation: []" msgstr "" -#: library/decimal.rst:209 +#: library/decimal.rst:211 msgid "" "Decimals interact well with much of the rest of Python. Here is a small " "decimal floating-point flying circus:" msgstr "" -#: library/decimal.rst:212 +#: library/decimal.rst:214 msgid "" ">>> data = list(map(Decimal, '1.34 1.87 3.45 2.35 1.00 0.03 9.25'.split()))\n" ">>> max(data)\n" @@ -289,32 +289,56 @@ msgid "" "Decimal('0.77')" msgstr "" -#: library/decimal.rst:241 +#: library/decimal.rst:243 +msgid "" +"Decimals can be formatted (with :func:`format` built-in or :ref:`f-strings`) " +"in fixed-point or scientific notation, using the same formatting syntax " +"(see :ref:`formatspec`) as builtin :class:`float` type:" +msgstr "" + +#: library/decimal.rst:247 +msgid "" +">>> format(Decimal('2.675'), \"f\")\n" +"'2.675'\n" +">>> format(Decimal('2.675'), \".2f\")\n" +"'2.68'\n" +">>> f\"{Decimal('2.675'):.2f}\"\n" +"'2.68'\n" +">>> format(Decimal('2.675'), \".2e\")\n" +"'2.68e+0'\n" +">>> with localcontext() as ctx:\n" +"... ctx.rounding = ROUND_DOWN\n" +"... print(format(Decimal('2.675'), \".2f\"))\n" +"...\n" +"2.67" +msgstr "" + +#: library/decimal.rst:263 msgid "And some mathematical functions are also available to Decimal:" msgstr "" -#: library/decimal.rst:253 +#: library/decimal.rst:275 msgid "" "The :meth:`~Decimal.quantize` method rounds a number to a fixed exponent. " "This method is useful for monetary applications that often round results to " "a fixed number of places:" msgstr "" -#: library/decimal.rst:262 +#: library/decimal.rst:284 msgid "" "As shown above, the :func:`getcontext` function accesses the current context " "and allows the settings to be changed. This approach meets the needs of " "most applications." msgstr "" -#: library/decimal.rst:266 +#: library/decimal.rst:288 msgid "" "For more advanced work, it may be useful to create alternate contexts using " "the :meth:`Context` constructor. To make an alternate active, use the :func:" "`setcontext` function." msgstr "" -#: library/decimal.rst:270 +#: library/decimal.rst:292 msgid "" "In accordance with the standard, the :mod:`decimal` module provides two " "ready to use standard contexts, :const:`BasicContext` and :const:" @@ -322,7 +346,7 @@ msgid "" "many of the traps are enabled:" msgstr "" -#: library/decimal.rst:275 +#: library/decimal.rst:297 msgid "" ">>> myothercontext = Context(prec=60, rounding=ROUND_HALF_DOWN)\n" ">>> setcontext(myothercontext)\n" @@ -346,7 +370,7 @@ msgid "" "DivisionByZero: x / 0" msgstr "" -#: library/decimal.rst:299 +#: library/decimal.rst:321 msgid "" "Contexts also have signal flags for monitoring exceptional conditions " "encountered during computations. The flags remain set until explicitly " @@ -354,7 +378,7 @@ msgid "" "computations by using the :meth:`~Context.clear_flags` method. ::" msgstr "" -#: library/decimal.rst:304 +#: library/decimal.rst:326 msgid "" ">>> setcontext(ExtendedContext)\n" ">>> getcontext().clear_flags()\n" @@ -365,20 +389,20 @@ msgid "" " capitals=1, clamp=0, flags=[Inexact, Rounded], traps=[])" msgstr "" -#: library/decimal.rst:312 +#: library/decimal.rst:334 msgid "" "The *flags* entry shows that the rational approximation to pi was rounded " "(digits beyond the context precision were thrown away) and that the result " "is inexact (some of the discarded digits were non-zero)." msgstr "" -#: library/decimal.rst:316 +#: library/decimal.rst:338 msgid "" "Individual traps are set using the dictionary in the :attr:`~Context.traps` " "attribute of a context:" msgstr "" -#: library/decimal.rst:319 +#: library/decimal.rst:341 msgid "" ">>> setcontext(ExtendedContext)\n" ">>> Decimal(1) / Decimal(0)\n" @@ -391,7 +415,7 @@ msgid "" "DivisionByZero: x / 0" msgstr "" -#: library/decimal.rst:331 +#: library/decimal.rst:353 msgid "" "Most programs adjust the current context only once, at the beginning of the " "program. And, in many applications, data is converted to :class:`Decimal` " @@ -400,15 +424,15 @@ msgid "" "Python numeric types." msgstr "" -#: library/decimal.rst:343 +#: library/decimal.rst:365 msgid "Decimal objects" msgstr "" -#: library/decimal.rst:348 +#: library/decimal.rst:370 msgid "Construct a new :class:`Decimal` object based from *value*." msgstr "" -#: library/decimal.rst:350 +#: library/decimal.rst:372 msgid "" "*value* can be an integer, string, tuple, :class:`float`, or another :class:" "`Decimal` object. If no *value* is given, returns ``Decimal('0')``. If " @@ -417,7 +441,7 @@ msgid "" "throughout, are removed::" msgstr "" -#: library/decimal.rst:355 +#: library/decimal.rst:377 msgid "" "sign ::= '+' | '-'\n" "digit ::= '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | " @@ -432,7 +456,7 @@ msgid "" "numeric-string ::= [sign] numeric-value | [sign] nan" msgstr "" -#: library/decimal.rst:366 +#: library/decimal.rst:388 msgid "" "Other Unicode decimal digits are also permitted where ``digit`` appears " "above. These include decimal digits from various other alphabets (for " @@ -442,7 +466,7 @@ msgid "" "spellings for positive infinity." msgstr "" -#: library/decimal.rst:373 +#: library/decimal.rst:395 msgid "" "If *value* is a :class:`tuple`, it should have three components, a sign " "(``0`` for positive or ``1`` for negative), a :class:`tuple` of digits, and " @@ -450,7 +474,7 @@ msgid "" "``Decimal('1.414')``." msgstr "" -#: library/decimal.rst:378 +#: library/decimal.rst:400 msgid "" "If *value* is a :class:`float`, the binary floating-point value is " "losslessly converted to its exact decimal equivalent. This conversion can " @@ -459,7 +483,7 @@ msgid "" "``Decimal('1.100000000000000088817841970012523233890533447265625')``." msgstr "" -#: library/decimal.rst:384 +#: library/decimal.rst:406 msgid "" "The *context* precision does not affect how many digits are stored. That is " "determined exclusively by the number of digits in *value*. For example, " @@ -467,7 +491,7 @@ msgid "" "is only three." msgstr "" -#: library/decimal.rst:389 +#: library/decimal.rst:411 msgid "" "The purpose of the *context* argument is determining what to do if *value* " "is a malformed string. If the context traps :const:`InvalidOperation`, an " @@ -475,29 +499,29 @@ msgid "" "the value of ``NaN``." msgstr "" -#: library/decimal.rst:394 +#: library/decimal.rst:416 msgid "Once constructed, :class:`Decimal` objects are immutable." msgstr "" -#: library/decimal.rst:396 +#: library/decimal.rst:418 msgid "" "The argument to the constructor is now permitted to be a :class:`float` " "instance." msgstr "" -#: library/decimal.rst:400 +#: library/decimal.rst:422 msgid "" ":class:`float` arguments raise an exception if the :exc:`FloatOperation` " "trap is set. By default the trap is off." msgstr "" -#: library/decimal.rst:404 +#: library/decimal.rst:426 msgid "" "Underscores are allowed for grouping, as with integral and floating-point " "literals in code." msgstr "" -#: library/decimal.rst:408 +#: library/decimal.rst:430 msgid "" "Decimal floating-point objects share many properties with the other built-in " "numeric types such as :class:`float` and :class:`int`. All of the usual " @@ -507,7 +531,7 @@ msgid "" "class:`int`)." msgstr "" -#: library/decimal.rst:415 +#: library/decimal.rst:437 msgid "" "There are some small differences between arithmetic on Decimal objects and " "arithmetic on integers and floats. When the remainder operator ``%`` is " @@ -515,7 +539,7 @@ msgid "" "*dividend* rather than the sign of the divisor::" msgstr "" -#: library/decimal.rst:420 +#: library/decimal.rst:442 msgid "" ">>> (-7) % 4\n" "1\n" @@ -523,14 +547,14 @@ msgid "" "Decimal('-3')" msgstr "" -#: library/decimal.rst:425 +#: library/decimal.rst:447 msgid "" "The integer division operator ``//`` behaves analogously, returning the " "integer part of the true quotient (truncating towards zero) rather than its " "floor, so as to preserve the usual identity ``x == (x // y) * y + x % y``::" msgstr "" -#: library/decimal.rst:429 +#: library/decimal.rst:451 msgid "" ">>> -7 // 4\n" "-2\n" @@ -538,13 +562,13 @@ msgid "" "Decimal('-1')" msgstr "" -#: library/decimal.rst:434 +#: library/decimal.rst:456 msgid "" "The ``%`` and ``//`` operators implement the ``remainder`` and ``divide-" "integer`` operations (respectively) as described in the specification." msgstr "" -#: library/decimal.rst:438 +#: library/decimal.rst:460 msgid "" "Decimal objects cannot generally be combined with floats or instances of :" "class:`fractions.Fraction` in arithmetic operations: an attempt to add a :" @@ -555,19 +579,19 @@ msgid "" "numbers of different types." msgstr "" -#: library/decimal.rst:446 +#: library/decimal.rst:468 msgid "" "Mixed-type comparisons between :class:`Decimal` instances and other numeric " "types are now fully supported." msgstr "" -#: library/decimal.rst:450 +#: library/decimal.rst:472 msgid "" "In addition to the standard numeric properties, decimal floating-point " "objects also have a number of specialized methods:" msgstr "" -#: library/decimal.rst:456 +#: library/decimal.rst:478 msgid "" "Return the adjusted exponent after shifting out the coefficient's rightmost " "digits until only the lead digit remains: ``Decimal('321e+5').adjusted()`` " @@ -575,45 +599,45 @@ msgid "" "digit with respect to the decimal point." msgstr "" -#: library/decimal.rst:463 +#: library/decimal.rst:485 msgid "" "Return a pair ``(n, d)`` of integers that represent the given :class:" "`Decimal` instance as a fraction, in lowest terms and with a positive " "denominator::" msgstr "" -#: library/decimal.rst:467 +#: library/decimal.rst:489 msgid "" ">>> Decimal('-3.14').as_integer_ratio()\n" "(-157, 50)" msgstr "" -#: library/decimal.rst:470 +#: library/decimal.rst:492 msgid "" "The conversion is exact. Raise OverflowError on infinities and ValueError " "on NaNs." msgstr "" -#: library/decimal.rst:477 +#: library/decimal.rst:499 msgid "" "Return a :term:`named tuple` representation of the number: " "``DecimalTuple(sign, digits, exponent)``." msgstr "" -#: library/decimal.rst:483 +#: library/decimal.rst:505 msgid "" "Return the canonical encoding of the argument. Currently, the encoding of " "a :class:`Decimal` instance is always canonical, so this operation returns " "its argument unchanged." msgstr "" -#: library/decimal.rst:489 +#: library/decimal.rst:511 msgid "" "Compare the values of two Decimal instances. :meth:`compare` returns a " "Decimal instance, and if either operand is a NaN then the result is a NaN::" msgstr "" -#: library/decimal.rst:493 +#: library/decimal.rst:515 msgid "" "a or b is a NaN ==> Decimal('NaN')\n" "a < b ==> Decimal('-1')\n" @@ -621,14 +645,14 @@ msgid "" "a > b ==> Decimal('1')" msgstr "" -#: library/decimal.rst:500 +#: library/decimal.rst:522 msgid "" "This operation is identical to the :meth:`compare` method, except that all " "NaNs signal. That is, if neither operand is a signaling NaN then any quiet " "NaN operand is treated as though it were a signaling NaN." msgstr "" -#: library/decimal.rst:506 +#: library/decimal.rst:528 msgid "" "Compare two operands using their abstract representation rather than their " "numerical value. Similar to the :meth:`compare` method, but the result " @@ -637,7 +661,7 @@ msgid "" "unequal in this ordering:" msgstr "" -#: library/decimal.rst:515 +#: library/decimal.rst:537 msgid "" "Quiet and signaling NaNs are also included in the total ordering. The " "result of this function is ``Decimal('0')`` if both operands have the same " @@ -647,14 +671,14 @@ msgid "" "details of the total order." msgstr "" -#: library/decimal.rst:533 library/decimal.rst:848 +#: library/decimal.rst:555 library/decimal.rst:870 msgid "" "This operation is unaffected by context and is quiet: no flags are changed " "and no rounding is performed. As an exception, the C version may raise " "InvalidOperation if the second operand cannot be converted exactly." msgstr "" -#: library/decimal.rst:528 +#: library/decimal.rst:550 msgid "" "Compare two operands using their abstract representation rather than their " "value as in :meth:`compare_total`, but ignoring the sign of each operand. " @@ -662,44 +686,44 @@ msgid "" "copy_abs())``." msgstr "" -#: library/decimal.rst:539 +#: library/decimal.rst:561 msgid "" "Just returns self, this method is only to comply with the Decimal " "Specification." msgstr "" -#: library/decimal.rst:544 +#: library/decimal.rst:566 msgid "" "Return the absolute value of the argument. This operation is unaffected by " "the context and is quiet: no flags are changed and no rounding is performed." msgstr "" -#: library/decimal.rst:550 +#: library/decimal.rst:572 msgid "" "Return the negation of the argument. This operation is unaffected by the " "context and is quiet: no flags are changed and no rounding is performed." msgstr "" -#: library/decimal.rst:555 +#: library/decimal.rst:577 msgid "" "Return a copy of the first operand with the sign set to be the same as the " "sign of the second operand. For example:" msgstr "" -#: library/decimal.rst:567 +#: library/decimal.rst:589 msgid "" "Return the value of the (natural) exponential function ``e**x`` at the given " "number. The result is correctly rounded using the :const:`ROUND_HALF_EVEN` " "rounding mode." msgstr "" -#: library/decimal.rst:578 +#: library/decimal.rst:600 msgid "" "Alternative constructor that only accepts instances of :class:`float` or :" "class:`int`." msgstr "" -#: library/decimal.rst:581 +#: library/decimal.rst:603 msgid "" "Note ``Decimal.from_float(0.1)`` is not the same as ``Decimal('0.1')``. " "Since 0.1 is not exactly representable in binary floating point, the value " @@ -708,13 +732,13 @@ msgid "" "``0.1000000000000000055511151231257827021181583404541015625``." msgstr "" -#: library/decimal.rst:587 +#: library/decimal.rst:609 msgid "" "From Python 3.2 onwards, a :class:`Decimal` instance can also be constructed " "directly from a :class:`float`." msgstr "" -#: library/decimal.rst:590 +#: library/decimal.rst:612 msgid "" ">>> Decimal.from_float(0.1)\n" "Decimal('0.1000000000000000055511151231257827021181583404541015625')\n" @@ -726,86 +750,86 @@ msgid "" "Decimal('-Infinity')" msgstr "" -#: library/decimal.rst:605 +#: library/decimal.rst:627 msgid "" "Fused multiply-add. Return self*other+third with no rounding of the " "intermediate product self*other." msgstr "" -#: library/decimal.rst:613 +#: library/decimal.rst:635 msgid "" "Return :const:`True` if the argument is canonical and :const:`False` " "otherwise. Currently, a :class:`Decimal` instance is always canonical, so " "this operation always returns :const:`True`." msgstr "" -#: library/decimal.rst:619 +#: library/decimal.rst:641 msgid "" "Return :const:`True` if the argument is a finite number, and :const:`False` " "if the argument is an infinity or a NaN." msgstr "" -#: library/decimal.rst:624 +#: library/decimal.rst:646 msgid "" "Return :const:`True` if the argument is either positive or negative infinity " "and :const:`False` otherwise." msgstr "" -#: library/decimal.rst:629 +#: library/decimal.rst:651 msgid "" "Return :const:`True` if the argument is a (quiet or signaling) NaN and :" "const:`False` otherwise." msgstr "" -#: library/decimal.rst:634 +#: library/decimal.rst:656 msgid "" "Return :const:`True` if the argument is a *normal* finite number. Return :" "const:`False` if the argument is zero, subnormal, infinite or a NaN." msgstr "" -#: library/decimal.rst:639 +#: library/decimal.rst:661 msgid "" "Return :const:`True` if the argument is a quiet NaN, and :const:`False` " "otherwise." msgstr "" -#: library/decimal.rst:644 +#: library/decimal.rst:666 msgid "" "Return :const:`True` if the argument has a negative sign and :const:`False` " "otherwise. Note that zeros and NaNs can both carry signs." msgstr "" -#: library/decimal.rst:649 +#: library/decimal.rst:671 msgid "" "Return :const:`True` if the argument is a signaling NaN and :const:`False` " "otherwise." msgstr "" -#: library/decimal.rst:654 +#: library/decimal.rst:676 msgid "" "Return :const:`True` if the argument is subnormal, and :const:`False` " "otherwise." msgstr "" -#: library/decimal.rst:659 +#: library/decimal.rst:681 msgid "" "Return :const:`True` if the argument is a (positive or negative) zero and :" "const:`False` otherwise." msgstr "" -#: library/decimal.rst:664 +#: library/decimal.rst:686 msgid "" "Return the natural (base e) logarithm of the operand. The result is " "correctly rounded using the :const:`ROUND_HALF_EVEN` rounding mode." msgstr "" -#: library/decimal.rst:669 +#: library/decimal.rst:691 msgid "" "Return the base ten logarithm of the operand. The result is correctly " "rounded using the :const:`ROUND_HALF_EVEN` rounding mode." msgstr "" -#: library/decimal.rst:674 +#: library/decimal.rst:696 msgid "" "For a nonzero number, return the adjusted exponent of its operand as a :" "class:`Decimal` instance. If the operand is a zero then ``Decimal('-" @@ -813,74 +837,74 @@ msgid "" "the operand is an infinity then ``Decimal('Infinity')`` is returned." msgstr "" -#: library/decimal.rst:682 +#: library/decimal.rst:704 msgid "" ":meth:`logical_and` is a logical operation which takes two *logical " "operands* (see :ref:`logical_operands_label`). The result is the digit-wise " "``and`` of the two operands." msgstr "" -#: library/decimal.rst:688 +#: library/decimal.rst:710 msgid "" ":meth:`logical_invert` is a logical operation. The result is the digit-wise " "inversion of the operand." msgstr "" -#: library/decimal.rst:693 +#: library/decimal.rst:715 msgid "" ":meth:`logical_or` is a logical operation which takes two *logical operands* " "(see :ref:`logical_operands_label`). The result is the digit-wise ``or`` of " "the two operands." msgstr "" -#: library/decimal.rst:699 +#: library/decimal.rst:721 msgid "" ":meth:`logical_xor` is a logical operation which takes two *logical " "operands* (see :ref:`logical_operands_label`). The result is the digit-wise " "exclusive or of the two operands." msgstr "" -#: library/decimal.rst:705 +#: library/decimal.rst:727 msgid "" "Like ``max(self, other)`` except that the context rounding rule is applied " "before returning and that ``NaN`` values are either signaled or ignored " "(depending on the context and whether they are signaling or quiet)." msgstr "" -#: library/decimal.rst:712 +#: library/decimal.rst:734 msgid "" "Similar to the :meth:`.max` method, but the comparison is done using the " "absolute values of the operands." msgstr "" -#: library/decimal.rst:717 +#: library/decimal.rst:739 msgid "" "Like ``min(self, other)`` except that the context rounding rule is applied " "before returning and that ``NaN`` values are either signaled or ignored " "(depending on the context and whether they are signaling or quiet)." msgstr "" -#: library/decimal.rst:724 +#: library/decimal.rst:746 msgid "" "Similar to the :meth:`.min` method, but the comparison is done using the " "absolute values of the operands." msgstr "" -#: library/decimal.rst:729 +#: library/decimal.rst:751 msgid "" "Return the largest number representable in the given context (or in the " "current thread's context if no context is given) that is smaller than the " "given operand." msgstr "" -#: library/decimal.rst:735 +#: library/decimal.rst:757 msgid "" "Return the smallest number representable in the given context (or in the " "current thread's context if no context is given) that is larger than the " "given operand." msgstr "" -#: library/decimal.rst:741 +#: library/decimal.rst:763 msgid "" "If the two operands are unequal, return the number closest to the first " "operand in the direction of the second operand. If both operands are " @@ -888,13 +912,13 @@ msgid "" "be the same as the sign of the second operand." msgstr "" -#: library/decimal.rst:748 +#: library/decimal.rst:770 msgid "" "Used for producing canonical values of an equivalence class within either " "the current context or the specified context." msgstr "" -#: library/decimal.rst:751 +#: library/decimal.rst:773 msgid "" "This has the same semantics as the unary plus operation, except that if the " "final result is finite it is reduced to its simplest form, with all trailing " @@ -904,79 +928,79 @@ msgid "" "exponent is set to 0. In all cases the sign is unchanged." msgstr "" -#: library/decimal.rst:758 +#: library/decimal.rst:780 msgid "" "For example, ``Decimal('32.100')`` and ``Decimal('0.321000e+2')`` both " "normalize to the equivalent value ``Decimal('32.1')``." msgstr "" -#: library/decimal.rst:761 +#: library/decimal.rst:783 msgid "Note that rounding is applied *before* reducing to simplest form." msgstr "" -#: library/decimal.rst:763 +#: library/decimal.rst:785 msgid "" "In the latest versions of the specification, this operation is also known as " "``reduce``." msgstr "" -#: library/decimal.rst:768 +#: library/decimal.rst:790 msgid "" "Return a string describing the *class* of the operand. The returned value " "is one of the following ten strings." msgstr "" -#: library/decimal.rst:771 +#: library/decimal.rst:793 msgid "``\"-Infinity\"``, indicating that the operand is negative infinity." msgstr "" -#: library/decimal.rst:772 +#: library/decimal.rst:794 msgid "" "``\"-Normal\"``, indicating that the operand is a negative normal number." msgstr "" -#: library/decimal.rst:773 +#: library/decimal.rst:795 msgid "" "``\"-Subnormal\"``, indicating that the operand is negative and subnormal." msgstr "" -#: library/decimal.rst:774 +#: library/decimal.rst:796 msgid "``\"-Zero\"``, indicating that the operand is a negative zero." msgstr "" -#: library/decimal.rst:775 +#: library/decimal.rst:797 msgid "``\"+Zero\"``, indicating that the operand is a positive zero." msgstr "" -#: library/decimal.rst:776 +#: library/decimal.rst:798 msgid "" "``\"+Subnormal\"``, indicating that the operand is positive and subnormal." msgstr "" -#: library/decimal.rst:777 +#: library/decimal.rst:799 msgid "" "``\"+Normal\"``, indicating that the operand is a positive normal number." msgstr "" -#: library/decimal.rst:778 +#: library/decimal.rst:800 msgid "``\"+Infinity\"``, indicating that the operand is positive infinity." msgstr "" -#: library/decimal.rst:779 +#: library/decimal.rst:801 msgid "``\"NaN\"``, indicating that the operand is a quiet NaN (Not a Number)." msgstr "" -#: library/decimal.rst:780 +#: library/decimal.rst:802 msgid "``\"sNaN\"``, indicating that the operand is a signaling NaN." msgstr "" -#: library/decimal.rst:784 +#: library/decimal.rst:806 msgid "" "Return a value equal to the first operand after rounding and having the " "exponent of the second operand." msgstr "" -#: library/decimal.rst:790 +#: library/decimal.rst:812 msgid "" "Unlike other operations, if the length of the coefficient after the quantize " "operation would be greater than precision, then an :const:`InvalidOperation` " @@ -984,13 +1008,13 @@ msgid "" "quantized exponent is always equal to that of the right-hand operand." msgstr "" -#: library/decimal.rst:796 +#: library/decimal.rst:818 msgid "" "Also unlike other operations, quantize never signals Underflow, even if the " "result is subnormal and inexact." msgstr "" -#: library/decimal.rst:799 +#: library/decimal.rst:821 msgid "" "If the exponent of the second operand is larger than that of the first then " "rounding may be necessary. In this case, the rounding mode is determined by " @@ -999,19 +1023,19 @@ msgid "" "context is used." msgstr "" -#: library/decimal.rst:805 +#: library/decimal.rst:827 msgid "" "An error is returned whenever the resulting exponent is greater than :attr:" "`~Context.Emax` or less than :meth:`~Context.Etiny`." msgstr "" -#: library/decimal.rst:810 +#: library/decimal.rst:832 msgid "" "Return ``Decimal(10)``, the radix (base) in which the :class:`Decimal` class " "does all its arithmetic. Included for compatibility with the specification." msgstr "" -#: library/decimal.rst:816 +#: library/decimal.rst:838 msgid "" "Return the remainder from dividing *self* by *other*. This differs from " "``self % other`` in that the sign of the remainder is chosen so as to " @@ -1020,11 +1044,11 @@ msgid "" "other``, and if two integers are equally near then the even one is chosen." msgstr "" -#: library/decimal.rst:823 +#: library/decimal.rst:845 msgid "If the result is zero then its sign will be the sign of *self*." msgstr "" -#: library/decimal.rst:834 +#: library/decimal.rst:856 msgid "" "Return the result of rotating the digits of the first operand by an amount " "specified by the second operand. The second operand must be an integer in " @@ -1036,20 +1060,20 @@ msgid "" "are unchanged." msgstr "" -#: library/decimal.rst:845 +#: library/decimal.rst:867 msgid "" "Test whether self and other have the same exponent or whether both are " "``NaN``." msgstr "" -#: library/decimal.rst:854 +#: library/decimal.rst:876 msgid "" "Return the first operand with exponent adjusted by the second. Equivalently, " "return the first operand multiplied by ``10**other``. The second operand " "must be an integer." msgstr "" -#: library/decimal.rst:860 +#: library/decimal.rst:882 msgid "" "Return the result of shifting the digits of the first operand by an amount " "specified by the second operand. The second operand must be an integer in " @@ -1060,34 +1084,34 @@ msgid "" "exponent of the first operand are unchanged." msgstr "" -#: library/decimal.rst:870 +#: library/decimal.rst:892 msgid "Return the square root of the argument to full precision." msgstr "" -#: library/decimal.rst:1524 +#: library/decimal.rst:1546 msgid "" "Convert to a string, using engineering notation if an exponent is needed." msgstr "" -#: library/decimal.rst:1526 +#: library/decimal.rst:1548 msgid "" "Engineering notation has an exponent which is a multiple of 3. This can " "leave up to 3 digits to the left of the decimal place and may require the " "addition of either one or two trailing zeros." msgstr "" -#: library/decimal.rst:881 +#: library/decimal.rst:903 msgid "" "For example, this converts ``Decimal('123E+1')`` to ``Decimal('1.23E+3')``." msgstr "" -#: library/decimal.rst:885 +#: library/decimal.rst:907 msgid "" "Identical to the :meth:`to_integral_value` method. The ``to_integral`` name " "has been kept for compatibility with older versions." msgstr "" -#: library/decimal.rst:890 +#: library/decimal.rst:912 msgid "" "Round to the nearest integer, signaling :const:`Inexact` or :const:`Rounded` " "as appropriate if rounding occurs. The rounding mode is determined by the " @@ -1095,18 +1119,18 @@ msgid "" "parameter is given then the rounding mode of the current context is used." msgstr "" -#: library/decimal.rst:898 +#: library/decimal.rst:920 msgid "" "Round to the nearest integer without signaling :const:`Inexact` or :const:" "`Rounded`. If given, applies *rounding*; otherwise, uses the rounding " "method in either the supplied *context* or the current context." msgstr "" -#: library/decimal.rst:902 +#: library/decimal.rst:924 msgid "Decimal numbers can be rounded using the :func:`.round` function:" msgstr "" -#: library/decimal.rst:907 +#: library/decimal.rst:929 msgid "" "If *ndigits* is not given or ``None``, returns the nearest :class:`int` to " "*number*, rounding ties to even, and ignoring the rounding mode of the :" @@ -1114,7 +1138,7 @@ msgid "" "infinity or :exc:`ValueError` if it is a (quiet or signaling) NaN." msgstr "" -#: library/decimal.rst:913 +#: library/decimal.rst:935 msgid "" "If *ndigits* is an :class:`int`, the context's rounding mode is respected " "and a :class:`Decimal` representing *number* rounded to the nearest multiple " @@ -1126,27 +1150,27 @@ msgid "" "the current context's precision. In other words, for the non-corner cases:" msgstr "" -#: library/decimal.rst:923 +#: library/decimal.rst:945 msgid "" "if *ndigits* is positive, return *number* rounded to *ndigits* decimal " "places;" msgstr "" -#: library/decimal.rst:925 +#: library/decimal.rst:947 msgid "if *ndigits* is zero, return *number* rounded to the nearest integer;" msgstr "" -#: library/decimal.rst:926 +#: library/decimal.rst:948 msgid "" "if *ndigits* is negative, return *number* rounded to the nearest multiple of " "``10**abs(ndigits)``." msgstr "" -#: library/decimal.rst:929 +#: library/decimal.rst:951 msgid "For example::" msgstr "" -#: library/decimal.rst:931 +#: library/decimal.rst:953 msgid "" ">>> from decimal import Decimal, getcontext, ROUND_DOWN\n" ">>> getcontext().rounding = ROUND_DOWN\n" @@ -1162,11 +1186,11 @@ msgid "" "Decimal('0E+1')" msgstr "" -#: library/decimal.rst:948 +#: library/decimal.rst:970 msgid "Logical operands" msgstr "" -#: library/decimal.rst:950 +#: library/decimal.rst:972 msgid "" "The :meth:`~Decimal.logical_and`, :meth:`~Decimal.logical_invert`, :meth:" "`~Decimal.logical_or`, and :meth:`~Decimal.logical_xor` methods expect their " @@ -1175,38 +1199,38 @@ msgid "" "are all either ``0`` or ``1``." msgstr "" -#: library/decimal.rst:962 +#: library/decimal.rst:984 msgid "Context objects" msgstr "" -#: library/decimal.rst:964 +#: library/decimal.rst:986 msgid "" "Contexts are environments for arithmetic operations. They govern precision, " "set rules for rounding, determine which signals are treated as exceptions, " "and limit the range for exponents." msgstr "" -#: library/decimal.rst:968 +#: library/decimal.rst:990 msgid "" "Each thread has its own current context which is accessed or changed using " "the :func:`getcontext` and :func:`setcontext` functions:" msgstr "" -#: library/decimal.rst:974 +#: library/decimal.rst:996 msgid "Return the current context for the active thread." msgstr "" -#: library/decimal.rst:979 +#: library/decimal.rst:1001 msgid "Set the current context for the active thread to *c*." msgstr "" -#: library/decimal.rst:981 +#: library/decimal.rst:1003 msgid "" "You can also use the :keyword:`with` statement and the :func:`localcontext` " "function to temporarily change the active context." msgstr "" -#: library/decimal.rst:986 +#: library/decimal.rst:1008 msgid "" "Return a context manager that will set the current context for the active " "thread to a copy of *ctx* on entry to the with-statement and restore the " @@ -1215,14 +1239,14 @@ msgid "" "used to set the attributes of the new context." msgstr "" -#: library/decimal.rst:992 +#: library/decimal.rst:1014 msgid "" "For example, the following code sets the current decimal precision to 42 " "places, performs a calculation, and then automatically restores the previous " "context::" msgstr "" -#: library/decimal.rst:995 +#: library/decimal.rst:1017 msgid "" "from decimal import localcontext\n" "\n" @@ -1232,11 +1256,11 @@ msgid "" "s = +s # Round the final result back to the default precision" msgstr "" -#: library/decimal.rst:1002 +#: library/decimal.rst:1024 msgid "Using keyword arguments, the code would be the following::" msgstr "" -#: library/decimal.rst:1004 +#: library/decimal.rst:1026 msgid "" "from decimal import localcontext\n" "\n" @@ -1245,26 +1269,26 @@ msgid "" "s = +s" msgstr "" -#: library/decimal.rst:1010 +#: library/decimal.rst:1032 msgid "" "Raises :exc:`TypeError` if *kwargs* supplies an attribute that :class:" "`Context` doesn't support. Raises either :exc:`TypeError` or :exc:" "`ValueError` if *kwargs* supplies an invalid value for an attribute." msgstr "" -#: library/decimal.rst:1014 +#: library/decimal.rst:1036 msgid "" ":meth:`localcontext` now supports setting context attributes through the use " "of keyword arguments." msgstr "" -#: library/decimal.rst:1017 +#: library/decimal.rst:1039 msgid "" "New contexts can also be created using the :class:`Context` constructor " "described below. In addition, the module provides three pre-made contexts:" msgstr "" -#: library/decimal.rst:1023 +#: library/decimal.rst:1045 msgid "" "This is a standard context defined by the General Decimal Arithmetic " "Specification. Precision is set to nine. Rounding is set to :const:" @@ -1273,12 +1297,12 @@ msgid "" "`Subnormal`." msgstr "" -#: library/decimal.rst:1029 +#: library/decimal.rst:1051 msgid "" "Because many of the traps are enabled, this context is useful for debugging." msgstr "" -#: library/decimal.rst:1034 +#: library/decimal.rst:1056 msgid "" "This is a standard context defined by the General Decimal Arithmetic " "Specification. Precision is set to nine. Rounding is set to :const:" @@ -1286,7 +1310,7 @@ msgid "" "exceptions are not raised during computations)." msgstr "" -#: library/decimal.rst:1039 +#: library/decimal.rst:1061 msgid "" "Because the traps are disabled, this context is useful for applications that " "prefer to have result value of ``NaN`` or ``Infinity`` instead of raising " @@ -1294,7 +1318,7 @@ msgid "" "conditions that would otherwise halt the program." msgstr "" -#: library/decimal.rst:1047 +#: library/decimal.rst:1069 msgid "" "This context is used by the :class:`Context` constructor as a prototype for " "new contexts. Changing a field (such a precision) has the effect of " @@ -1302,7 +1326,7 @@ msgid "" "constructor." msgstr "" -#: library/decimal.rst:1051 +#: library/decimal.rst:1073 msgid "" "This context is most useful in multi-threaded environments. Changing one of " "the fields before threads are started has the effect of setting system-wide " @@ -1310,63 +1334,63 @@ msgid "" "as it would require thread synchronization to prevent race conditions." msgstr "" -#: library/decimal.rst:1056 +#: library/decimal.rst:1078 msgid "" "In single threaded environments, it is preferable to not use this context at " "all. Instead, simply create contexts explicitly as described below." msgstr "" -#: library/decimal.rst:1059 +#: library/decimal.rst:1081 msgid "" "The default values are :attr:`Context.prec`\\ =\\ ``28``, :attr:`Context." "rounding`\\ =\\ :const:`ROUND_HALF_EVEN`, and enabled traps for :class:" "`Overflow`, :class:`InvalidOperation`, and :class:`DivisionByZero`." msgstr "" -#: library/decimal.rst:1064 +#: library/decimal.rst:1086 msgid "" "In addition to the three supplied contexts, new contexts can be created with " "the :class:`Context` constructor." msgstr "" -#: library/decimal.rst:1070 +#: library/decimal.rst:1092 msgid "" "Creates a new context. If a field is not specified or is :const:`None`, the " "default values are copied from the :const:`DefaultContext`. If the *flags* " "field is not specified or is :const:`None`, all flags are cleared." msgstr "" -#: library/decimal.rst:1076 +#: library/decimal.rst:1098 msgid "" "An integer in the range [``1``, :const:`MAX_PREC`] that sets the precision " "for arithmetic operations in the context." msgstr "" -#: library/decimal.rst:1081 +#: library/decimal.rst:1103 msgid "One of the constants listed in the section `Rounding Modes`_." msgstr "" -#: library/decimal.rst:1086 +#: library/decimal.rst:1108 msgid "" "Lists of any signals to be set. Generally, new contexts should only set " "traps and leave the flags clear." msgstr "" -#: library/decimal.rst:1092 +#: library/decimal.rst:1114 msgid "" "Integers specifying the outer limits allowable for exponents. *Emin* must be " "in the range [:const:`MIN_EMIN`, ``0``], *Emax* in the range [``0``, :const:" "`MAX_EMAX`]." msgstr "" -#: library/decimal.rst:1098 +#: library/decimal.rst:1120 msgid "" "Either ``0`` or ``1`` (the default). If set to ``1``, exponents are printed " "with a capital ``E``; otherwise, a lowercase ``e`` is used: " "``Decimal('6.02e+23')``." msgstr "" -#: library/decimal.rst:1104 +#: library/decimal.rst:1126 msgid "" "Either ``0`` (the default) or ``1``. If set to ``1``, the exponent ``e`` of " "a :class:`Decimal` instance representable in this context is strictly " @@ -1379,19 +1403,19 @@ msgid "" "information about significant trailing zeros. For example::" msgstr "" -#: library/decimal.rst:1115 +#: library/decimal.rst:1137 msgid "" ">>> Context(prec=6, Emax=999, clamp=1).create_decimal('1.23e999')\n" "Decimal('1.23000E+999')" msgstr "" -#: library/decimal.rst:1118 +#: library/decimal.rst:1140 msgid "" "A *clamp* value of ``1`` allows compatibility with the fixed-width decimal " "interchange formats specified in IEEE 754." msgstr "" -#: library/decimal.rst:1121 +#: library/decimal.rst:1143 msgid "" "The :class:`Context` class defines several general purpose methods as well " "as a large number of methods for doing arithmetic directly in a given " @@ -1404,30 +1428,30 @@ msgid "" "instance of :class:`int`) anywhere that a Decimal instance is accepted." msgstr "" -#: library/decimal.rst:1134 +#: library/decimal.rst:1156 msgid "Resets all of the flags to ``0``." msgstr "" -#: library/decimal.rst:1138 +#: library/decimal.rst:1160 msgid "Resets all of the traps to ``0``." msgstr "" -#: library/decimal.rst:1144 +#: library/decimal.rst:1166 msgid "Return a duplicate of the context." msgstr "" -#: library/decimal.rst:1148 +#: library/decimal.rst:1170 msgid "Return a copy of the Decimal instance num." msgstr "" -#: library/decimal.rst:1152 +#: library/decimal.rst:1174 msgid "" "Creates a new Decimal instance from *num* but using *self* as context. " "Unlike the :class:`Decimal` constructor, the context precision, rounding " "method, flags, and traps are applied to the conversion." msgstr "" -#: library/decimal.rst:1156 +#: library/decimal.rst:1178 msgid "" "This is useful because constants are often given to a greater precision than " "is needed by the application. Another benefit is that rounding immediately " @@ -1436,7 +1460,7 @@ msgid "" "sum can change the result:" msgstr "" -#: library/decimal.rst:1162 +#: library/decimal.rst:1184 msgid "" ">>> getcontext().prec = 3\n" ">>> Decimal('3.4445') + Decimal('1.0023')\n" @@ -1445,14 +1469,14 @@ msgid "" "Decimal('4.44')" msgstr "" -#: library/decimal.rst:1170 +#: library/decimal.rst:1192 msgid "" "This method implements the to-number operation of the IBM specification. If " "the argument is a string, no leading or trailing whitespace or underscores " "are permitted." msgstr "" -#: library/decimal.rst:1176 +#: library/decimal.rst:1198 msgid "" "Creates a new Decimal instance from a float *f* but rounding using *self* as " "the context. Unlike the :meth:`Decimal.from_float` class method, the " @@ -1460,7 +1484,7 @@ msgid "" "conversion." msgstr "" -#: library/decimal.rst:1181 +#: library/decimal.rst:1203 msgid "" ">>> context = Context(prec=5, rounding=ROUND_DOWN)\n" ">>> context.create_decimal_from_float(math.pi)\n" @@ -1472,18 +1496,18 @@ msgid "" "decimal.Inexact: None" msgstr "" -#: library/decimal.rst:1196 +#: library/decimal.rst:1218 msgid "" "Returns a value equal to ``Emin - prec + 1`` which is the minimum exponent " "value for subnormal results. When underflow occurs, the exponent is set to :" "const:`Etiny`." msgstr "" -#: library/decimal.rst:1202 +#: library/decimal.rst:1224 msgid "Returns a value equal to ``Emax - prec + 1``." msgstr "" -#: library/decimal.rst:1204 +#: library/decimal.rst:1226 msgid "" "The usual approach to working with decimals is to create :class:`Decimal` " "instances and then apply arithmetic operations which take place within the " @@ -1493,189 +1517,189 @@ msgid "" "recounted here." msgstr "" -#: library/decimal.rst:1214 +#: library/decimal.rst:1236 msgid "Returns the absolute value of *x*." msgstr "" -#: library/decimal.rst:1219 +#: library/decimal.rst:1241 msgid "Return the sum of *x* and *y*." msgstr "" -#: library/decimal.rst:1224 +#: library/decimal.rst:1246 msgid "Returns the same Decimal object *x*." msgstr "" -#: library/decimal.rst:1229 +#: library/decimal.rst:1251 msgid "Compares *x* and *y* numerically." msgstr "" -#: library/decimal.rst:1234 +#: library/decimal.rst:1256 msgid "Compares the values of the two operands numerically." msgstr "" -#: library/decimal.rst:1239 +#: library/decimal.rst:1261 msgid "Compares two operands using their abstract representation." msgstr "" -#: library/decimal.rst:1244 +#: library/decimal.rst:1266 msgid "" "Compares two operands using their abstract representation, ignoring sign." msgstr "" -#: library/decimal.rst:1249 +#: library/decimal.rst:1271 msgid "Returns a copy of *x* with the sign set to 0." msgstr "" -#: library/decimal.rst:1254 +#: library/decimal.rst:1276 msgid "Returns a copy of *x* with the sign inverted." msgstr "" -#: library/decimal.rst:1259 +#: library/decimal.rst:1281 msgid "Copies the sign from *y* to *x*." msgstr "" -#: library/decimal.rst:1264 +#: library/decimal.rst:1286 msgid "Return *x* divided by *y*." msgstr "" -#: library/decimal.rst:1269 +#: library/decimal.rst:1291 msgid "Return *x* divided by *y*, truncated to an integer." msgstr "" -#: library/decimal.rst:1274 +#: library/decimal.rst:1296 msgid "Divides two numbers and returns the integer part of the result." msgstr "" -#: library/decimal.rst:1279 +#: library/decimal.rst:1301 msgid "Returns ``e ** x``." msgstr "" -#: library/decimal.rst:1284 +#: library/decimal.rst:1306 msgid "Returns *x* multiplied by *y*, plus *z*." msgstr "" -#: library/decimal.rst:1289 +#: library/decimal.rst:1311 msgid "Returns ``True`` if *x* is canonical; otherwise returns ``False``." msgstr "" -#: library/decimal.rst:1294 +#: library/decimal.rst:1316 msgid "Returns ``True`` if *x* is finite; otherwise returns ``False``." msgstr "" -#: library/decimal.rst:1299 +#: library/decimal.rst:1321 msgid "Returns ``True`` if *x* is infinite; otherwise returns ``False``." msgstr "" -#: library/decimal.rst:1304 +#: library/decimal.rst:1326 msgid "Returns ``True`` if *x* is a qNaN or sNaN; otherwise returns ``False``." msgstr "" -#: library/decimal.rst:1309 +#: library/decimal.rst:1331 msgid "" "Returns ``True`` if *x* is a normal number; otherwise returns ``False``." msgstr "" -#: library/decimal.rst:1314 +#: library/decimal.rst:1336 msgid "Returns ``True`` if *x* is a quiet NaN; otherwise returns ``False``." msgstr "" -#: library/decimal.rst:1319 +#: library/decimal.rst:1341 msgid "Returns ``True`` if *x* is negative; otherwise returns ``False``." msgstr "" -#: library/decimal.rst:1324 +#: library/decimal.rst:1346 msgid "" "Returns ``True`` if *x* is a signaling NaN; otherwise returns ``False``." msgstr "" -#: library/decimal.rst:1329 +#: library/decimal.rst:1351 msgid "Returns ``True`` if *x* is subnormal; otherwise returns ``False``." msgstr "" -#: library/decimal.rst:1334 +#: library/decimal.rst:1356 msgid "Returns ``True`` if *x* is a zero; otherwise returns ``False``." msgstr "" -#: library/decimal.rst:1339 +#: library/decimal.rst:1361 msgid "Returns the natural (base e) logarithm of *x*." msgstr "" -#: library/decimal.rst:1344 +#: library/decimal.rst:1366 msgid "Returns the base 10 logarithm of *x*." msgstr "" -#: library/decimal.rst:1349 +#: library/decimal.rst:1371 msgid "Returns the exponent of the magnitude of the operand's MSD." msgstr "" -#: library/decimal.rst:1354 +#: library/decimal.rst:1376 msgid "Applies the logical operation *and* between each operand's digits." msgstr "" -#: library/decimal.rst:1359 +#: library/decimal.rst:1381 msgid "Invert all the digits in *x*." msgstr "" -#: library/decimal.rst:1364 +#: library/decimal.rst:1386 msgid "Applies the logical operation *or* between each operand's digits." msgstr "" -#: library/decimal.rst:1369 +#: library/decimal.rst:1391 msgid "Applies the logical operation *xor* between each operand's digits." msgstr "" -#: library/decimal.rst:1374 +#: library/decimal.rst:1396 msgid "Compares two values numerically and returns the maximum." msgstr "" -#: library/decimal.rst:1389 +#: library/decimal.rst:1411 msgid "Compares the values numerically with their sign ignored." msgstr "" -#: library/decimal.rst:1384 +#: library/decimal.rst:1406 msgid "Compares two values numerically and returns the minimum." msgstr "" -#: library/decimal.rst:1394 +#: library/decimal.rst:1416 msgid "Minus corresponds to the unary prefix minus operator in Python." msgstr "" -#: library/decimal.rst:1399 +#: library/decimal.rst:1421 msgid "Return the product of *x* and *y*." msgstr "" -#: library/decimal.rst:1404 +#: library/decimal.rst:1426 msgid "Returns the largest representable number smaller than *x*." msgstr "" -#: library/decimal.rst:1409 +#: library/decimal.rst:1431 msgid "Returns the smallest representable number larger than *x*." msgstr "" -#: library/decimal.rst:1414 +#: library/decimal.rst:1436 msgid "Returns the number closest to *x*, in direction towards *y*." msgstr "" -#: library/decimal.rst:1419 +#: library/decimal.rst:1441 msgid "Reduces *x* to its simplest form." msgstr "" -#: library/decimal.rst:1424 +#: library/decimal.rst:1446 msgid "Returns an indication of the class of *x*." msgstr "" -#: library/decimal.rst:1429 +#: library/decimal.rst:1451 msgid "" "Plus corresponds to the unary prefix plus operator in Python. This " "operation applies the context precision and rounding, so it is *not* an " "identity operation." msgstr "" -#: library/decimal.rst:1436 +#: library/decimal.rst:1458 msgid "Return ``x`` to the power of ``y``, reduced modulo ``modulo`` if given." msgstr "" -#: library/decimal.rst:1438 +#: library/decimal.rst:1460 msgid "" "With two arguments, compute ``x**y``. If ``x`` is negative then ``y`` must " "be integral. The result will be inexact unless ``y`` is integral and the " @@ -1684,42 +1708,42 @@ msgid "" "in the Python version." msgstr "" -#: library/decimal.rst:1444 +#: library/decimal.rst:1466 msgid "" "``Decimal(0) ** Decimal(0)`` results in ``InvalidOperation``, and if " "``InvalidOperation`` is not trapped, then results in ``Decimal('NaN')``." msgstr "" -#: library/decimal.rst:1447 +#: library/decimal.rst:1469 msgid "" "The C module computes :meth:`power` in terms of the correctly rounded :meth:" "`exp` and :meth:`ln` functions. The result is well-defined but only \"almost " "always correctly rounded\"." msgstr "" -#: library/decimal.rst:1452 +#: library/decimal.rst:1474 msgid "" "With three arguments, compute ``(x**y) % modulo``. For the three argument " "form, the following restrictions on the arguments hold:" msgstr "" -#: library/decimal.rst:1455 +#: library/decimal.rst:1477 msgid "all three arguments must be integral" msgstr "" -#: library/decimal.rst:1456 +#: library/decimal.rst:1478 msgid "``y`` must be nonnegative" msgstr "" -#: library/decimal.rst:1457 +#: library/decimal.rst:1479 msgid "at least one of ``x`` or ``y`` must be nonzero" msgstr "" -#: library/decimal.rst:1458 +#: library/decimal.rst:1480 msgid "``modulo`` must be nonzero and have at most 'precision' digits" msgstr "" -#: library/decimal.rst:1460 +#: library/decimal.rst:1482 msgid "" "The value resulting from ``Context.power(x, y, modulo)`` is equal to the " "value that would be obtained by computing ``(x**y) % modulo`` with unbounded " @@ -1728,110 +1752,110 @@ msgid "" "result is always exact." msgstr "" -#: library/decimal.rst:1470 +#: library/decimal.rst:1492 msgid "Returns a value equal to *x* (rounded), having the exponent of *y*." msgstr "" -#: library/decimal.rst:1475 +#: library/decimal.rst:1497 msgid "Just returns 10, as this is Decimal, :)" msgstr "" -#: library/decimal.rst:1480 +#: library/decimal.rst:1502 msgid "Returns the remainder from integer division." msgstr "" -#: library/decimal.rst:1482 +#: library/decimal.rst:1504 msgid "" "The sign of the result, if non-zero, is the same as that of the original " "dividend." msgstr "" -#: library/decimal.rst:1488 +#: library/decimal.rst:1510 msgid "" "Returns ``x - y * n``, where *n* is the integer nearest the exact value of " "``x / y`` (if the result is 0 then its sign will be the sign of *x*)." msgstr "" -#: library/decimal.rst:1494 +#: library/decimal.rst:1516 msgid "Returns a rotated copy of *x*, *y* times." msgstr "" -#: library/decimal.rst:1499 +#: library/decimal.rst:1521 msgid "Returns ``True`` if the two operands have the same exponent." msgstr "" -#: library/decimal.rst:1504 +#: library/decimal.rst:1526 msgid "Returns the first operand after adding the second value its exp." msgstr "" -#: library/decimal.rst:1509 +#: library/decimal.rst:1531 msgid "Returns a shifted copy of *x*, *y* times." msgstr "" -#: library/decimal.rst:1514 +#: library/decimal.rst:1536 msgid "Square root of a non-negative number to context precision." msgstr "" -#: library/decimal.rst:1519 +#: library/decimal.rst:1541 msgid "Return the difference between *x* and *y*." msgstr "" -#: library/decimal.rst:1533 +#: library/decimal.rst:1555 msgid "Rounds to an integer." msgstr "" -#: library/decimal.rst:1538 +#: library/decimal.rst:1560 msgid "Converts a number to a string using scientific notation." msgstr "" -#: library/decimal.rst:1545 +#: library/decimal.rst:1567 msgid "Constants" msgstr "" -#: library/decimal.rst:1547 +#: library/decimal.rst:1569 msgid "" "The constants in this section are only relevant for the C module. They are " "also included in the pure Python version for compatibility." msgstr "" -#: library/decimal.rst:1551 +#: library/decimal.rst:1573 msgid "32-bit" msgstr "" -#: library/decimal.rst:1551 +#: library/decimal.rst:1573 msgid "64-bit" msgstr "" -#: library/decimal.rst:1555 +#: library/decimal.rst:1577 msgid "``425000000``" msgstr "" -#: library/decimal.rst:1555 +#: library/decimal.rst:1577 msgid "``999999999999999999``" msgstr "" -#: library/decimal.rst:1557 +#: library/decimal.rst:1579 msgid "``-425000000``" msgstr "" -#: library/decimal.rst:1557 +#: library/decimal.rst:1579 msgid "``-999999999999999999``" msgstr "" -#: library/decimal.rst:1559 +#: library/decimal.rst:1581 msgid "``-849999999``" msgstr "" -#: library/decimal.rst:1559 +#: library/decimal.rst:1581 msgid "``-1999999999999999997``" msgstr "" -#: library/decimal.rst:1565 +#: library/decimal.rst:1587 msgid "" "The value is ``True``. Deprecated, because Python now always has threads." msgstr "" -#: library/decimal.rst:1571 +#: library/decimal.rst:1593 msgid "" "The default value is ``True``. If Python is :option:`configured using the --" "without-decimal-contextvar option <--without-decimal-contextvar>`, the C " @@ -1840,55 +1864,55 @@ msgid "" "scenarios." msgstr "" -#: library/decimal.rst:1580 +#: library/decimal.rst:1602 msgid "Rounding modes" msgstr "" -#: library/decimal.rst:1584 +#: library/decimal.rst:1606 msgid "Round towards ``Infinity``." msgstr "" -#: library/decimal.rst:1588 +#: library/decimal.rst:1610 msgid "Round towards zero." msgstr "" -#: library/decimal.rst:1592 +#: library/decimal.rst:1614 msgid "Round towards ``-Infinity``." msgstr "" -#: library/decimal.rst:1596 +#: library/decimal.rst:1618 msgid "Round to nearest with ties going towards zero." msgstr "" -#: library/decimal.rst:1600 +#: library/decimal.rst:1622 msgid "Round to nearest with ties going to nearest even integer." msgstr "" -#: library/decimal.rst:1604 +#: library/decimal.rst:1626 msgid "Round to nearest with ties going away from zero." msgstr "" -#: library/decimal.rst:1608 +#: library/decimal.rst:1630 msgid "Round away from zero." msgstr "" -#: library/decimal.rst:1612 +#: library/decimal.rst:1634 msgid "" "Round away from zero if last digit after rounding towards zero would have " "been 0 or 5; otherwise round towards zero." msgstr "" -#: library/decimal.rst:1619 +#: library/decimal.rst:1641 msgid "Signals" msgstr "" -#: library/decimal.rst:1621 +#: library/decimal.rst:1643 msgid "" "Signals represent conditions that arise during computation. Each corresponds " "to one context flag and one context trap enabler." msgstr "" -#: library/decimal.rst:1624 +#: library/decimal.rst:1646 msgid "" "The context flag is set whenever the condition is encountered. After the " "computation, flags may be checked for informational purposes (for instance, " @@ -1896,7 +1920,7 @@ msgid "" "sure to clear all flags before starting the next computation." msgstr "" -#: library/decimal.rst:1629 +#: library/decimal.rst:1651 msgid "" "If the context's trap enabler is set for the signal, then the condition " "causes a Python exception to be raised. For example, if the :class:" @@ -1904,54 +1928,54 @@ msgid "" "raised upon encountering the condition." msgstr "" -#: library/decimal.rst:1637 +#: library/decimal.rst:1659 msgid "Altered an exponent to fit representation constraints." msgstr "" -#: library/decimal.rst:1639 +#: library/decimal.rst:1661 msgid "" "Typically, clamping occurs when an exponent falls outside the context's :" "attr:`~Context.Emin` and :attr:`~Context.Emax` limits. If possible, the " "exponent is reduced to fit by adding zeros to the coefficient." msgstr "" -#: library/decimal.rst:1646 +#: library/decimal.rst:1668 msgid "Base class for other signals and a subclass of :exc:`ArithmeticError`." msgstr "" -#: library/decimal.rst:1651 +#: library/decimal.rst:1673 msgid "Signals the division of a non-infinite number by zero." msgstr "" -#: library/decimal.rst:1653 +#: library/decimal.rst:1675 msgid "" "Can occur with division, modulo division, or when raising a number to a " "negative power. If this signal is not trapped, returns ``Infinity`` or ``-" "Infinity`` with the sign determined by the inputs to the calculation." msgstr "" -#: library/decimal.rst:1660 +#: library/decimal.rst:1682 msgid "Indicates that rounding occurred and the result is not exact." msgstr "" -#: library/decimal.rst:1662 +#: library/decimal.rst:1684 msgid "" "Signals when non-zero digits were discarded during rounding. The rounded " "result is returned. The signal flag or trap is used to detect when results " "are inexact." msgstr "" -#: library/decimal.rst:1669 +#: library/decimal.rst:1691 msgid "An invalid operation was performed." msgstr "" -#: library/decimal.rst:1671 +#: library/decimal.rst:1693 msgid "" "Indicates that an operation was requested that does not make sense. If not " "trapped, returns ``NaN``. Possible causes include::" msgstr "" -#: library/decimal.rst:1674 +#: library/decimal.rst:1696 msgid "" "Infinity - Infinity\n" "0 * Infinity\n" @@ -1964,11 +1988,11 @@ msgid "" "x ** Infinity" msgstr "" -#: library/decimal.rst:1687 +#: library/decimal.rst:1709 msgid "Numerical overflow." msgstr "" -#: library/decimal.rst:1689 +#: library/decimal.rst:1711 msgid "" "Indicates the exponent is larger than :attr:`Context.Emax` after rounding " "has occurred. If not trapped, the result depends on the rounding mode, " @@ -1977,42 +2001,42 @@ msgid "" "`Rounded` are also signaled." msgstr "" -#: library/decimal.rst:1698 +#: library/decimal.rst:1720 msgid "Rounding occurred though possibly no information was lost." msgstr "" -#: library/decimal.rst:1700 +#: library/decimal.rst:1722 msgid "" "Signaled whenever rounding discards digits; even if those digits are zero " "(such as rounding ``5.00`` to ``5.0``). If not trapped, returns the result " "unchanged. This signal is used to detect loss of significant digits." msgstr "" -#: library/decimal.rst:1708 +#: library/decimal.rst:1730 msgid "Exponent was lower than :attr:`~Context.Emin` prior to rounding." msgstr "" -#: library/decimal.rst:1710 +#: library/decimal.rst:1732 msgid "" "Occurs when an operation result is subnormal (the exponent is too small). If " "not trapped, returns the result unchanged." msgstr "" -#: library/decimal.rst:1716 +#: library/decimal.rst:1738 msgid "Numerical underflow with result rounded to zero." msgstr "" -#: library/decimal.rst:1718 +#: library/decimal.rst:1740 msgid "" "Occurs when a subnormal result is pushed to zero by rounding. :class:" "`Inexact` and :class:`Subnormal` are also signaled." msgstr "" -#: library/decimal.rst:1724 +#: library/decimal.rst:1746 msgid "Enable stricter semantics for mixing floats and Decimals." msgstr "" -#: library/decimal.rst:1726 +#: library/decimal.rst:1748 msgid "" "If the signal is not trapped (default), mixing floats and Decimals is " "permitted in the :class:`~decimal.Decimal` constructor, :meth:`~decimal." @@ -2023,18 +2047,18 @@ msgid "" "Context.create_decimal_from_float` do not set the flag." msgstr "" -#: library/decimal.rst:1734 +#: library/decimal.rst:1756 msgid "" "Otherwise (the signal is trapped), only equality comparisons and explicit " "conversions are silent. All other mixed operations raise :exc:" "`FloatOperation`." msgstr "" -#: library/decimal.rst:1738 +#: library/decimal.rst:1760 msgid "The following table summarizes the hierarchy of signals::" msgstr "" -#: library/decimal.rst:1740 +#: library/decimal.rst:1762 msgid "" "exceptions.ArithmeticError(exceptions.Exception)\n" " DecimalException\n" @@ -2049,15 +2073,15 @@ msgid "" " FloatOperation(DecimalException, exceptions.TypeError)" msgstr "" -#: library/decimal.rst:1759 +#: library/decimal.rst:1781 msgid "Floating-point notes" msgstr "" -#: library/decimal.rst:1763 +#: library/decimal.rst:1785 msgid "Mitigating round-off error with increased precision" msgstr "" -#: library/decimal.rst:1765 +#: library/decimal.rst:1787 msgid "" "The use of decimal floating point eliminates decimal representation error " "(making it possible to represent ``0.1`` exactly); however, some operations " @@ -2065,7 +2089,7 @@ msgid "" "precision." msgstr "" -#: library/decimal.rst:1769 +#: library/decimal.rst:1791 msgid "" "The effects of round-off error can be amplified by the addition or " "subtraction of nearly offsetting quantities resulting in loss of " @@ -2074,7 +2098,7 @@ msgid "" "of the associative and distributive properties of addition:" msgstr "" -#: library/decimal.rst:1775 +#: library/decimal.rst:1797 msgid "" "# Examples from Seminumerical Algorithms, Section 4.2.2.\n" ">>> from decimal import Decimal, getcontext\n" @@ -2093,13 +2117,13 @@ msgid "" "Decimal('0.0060000')" msgstr "" -#: library/decimal.rst:1793 +#: library/decimal.rst:1815 msgid "" "The :mod:`decimal` module makes it possible to restore the identities by " "expanding the precision sufficiently to avoid loss of significance:" msgstr "" -#: library/decimal.rst:1796 +#: library/decimal.rst:1818 msgid "" ">>> getcontext().prec = 20\n" ">>> u, v, w = Decimal(11111113), Decimal(-11111111), Decimal('7.51111111')\n" @@ -2115,18 +2139,18 @@ msgid "" "Decimal('0.0060000')" msgstr "" -#: library/decimal.rst:1813 +#: library/decimal.rst:1835 msgid "Special values" msgstr "" -#: library/decimal.rst:1815 +#: library/decimal.rst:1837 msgid "" "The number system for the :mod:`decimal` module provides special values " "including ``NaN``, ``sNaN``, ``-Infinity``, ``Infinity``, and two zeros, " "``+0`` and ``-0``." msgstr "" -#: library/decimal.rst:1819 +#: library/decimal.rst:1841 msgid "" "Infinities can be constructed directly with: ``Decimal('Infinity')``. Also, " "they can arise from dividing by zero when the :exc:`DivisionByZero` signal " @@ -2135,14 +2159,14 @@ msgid "" "representable number." msgstr "" -#: library/decimal.rst:1824 +#: library/decimal.rst:1846 msgid "" "The infinities are signed (affine) and can be used in arithmetic operations " "where they get treated as very large, indeterminate numbers. For instance, " "adding a constant to infinity gives another infinite result." msgstr "" -#: library/decimal.rst:1828 +#: library/decimal.rst:1850 msgid "" "Some operations are indeterminate and return ``NaN``, or if the :exc:" "`InvalidOperation` signal is trapped, raise an exception. For example, " @@ -2153,14 +2177,14 @@ msgid "" "the calculation to proceed while flagging specific results as invalid." msgstr "" -#: library/decimal.rst:1836 +#: library/decimal.rst:1858 msgid "" "A variant is ``sNaN`` which signals rather than remaining quiet after every " "operation. This is a useful return value when an invalid result needs to " "interrupt a calculation for special handling." msgstr "" -#: library/decimal.rst:1840 +#: library/decimal.rst:1862 msgid "" "The behavior of Python's comparison operators can be a little surprising " "where a ``NaN`` is involved. A test for equality where one of the operands " @@ -2177,7 +2201,7 @@ msgid "" "compare_signal` methods instead." msgstr "" -#: library/decimal.rst:1853 +#: library/decimal.rst:1875 msgid "" "The signed zeros can result from calculations that underflow. They keep the " "sign that would have resulted if the calculation had been carried out to " @@ -2185,7 +2209,7 @@ msgid "" "negative zeros are treated as equal and their sign is informational." msgstr "" -#: library/decimal.rst:1858 +#: library/decimal.rst:1880 msgid "" "In addition to the two signed zeros which are distinct yet equal, there are " "various representations of zero with differing precisions yet equivalent in " @@ -2194,11 +2218,11 @@ msgid "" "that the following calculation returns a value equal to zero:" msgstr "" -#: library/decimal.rst:1873 +#: library/decimal.rst:1895 msgid "Working with threads" msgstr "" -#: library/decimal.rst:1875 +#: library/decimal.rst:1897 msgid "" "The :func:`getcontext` function accesses a different :class:`Context` object " "for each thread. Having separate thread contexts means that threads may " @@ -2206,20 +2230,20 @@ msgid "" "other threads." msgstr "" -#: library/decimal.rst:1879 +#: library/decimal.rst:1901 msgid "" "Likewise, the :func:`setcontext` function automatically assigns its target " "to the current thread." msgstr "" -#: library/decimal.rst:1882 +#: library/decimal.rst:1904 msgid "" "If :func:`setcontext` has not been called before :func:`getcontext`, then :" "func:`getcontext` will automatically create a new context for use in the " "current thread." msgstr "" -#: library/decimal.rst:1886 +#: library/decimal.rst:1908 msgid "" "The new context is copied from a prototype context called *DefaultContext*. " "To control the defaults so that each thread will use the same values " @@ -2228,7 +2252,7 @@ msgid "" "a race condition between threads calling :func:`getcontext`. For example::" msgstr "" -#: library/decimal.rst:1892 +#: library/decimal.rst:1914 msgid "" "# Set applicationwide defaults for all threads about to be launched\n" "DefaultContext.prec = 12\n" @@ -2244,17 +2268,17 @@ msgid "" " . . ." msgstr "" -#: library/decimal.rst:1911 +#: library/decimal.rst:1933 msgid "Recipes" msgstr "" -#: library/decimal.rst:1913 +#: library/decimal.rst:1935 msgid "" "Here are a few recipes that serve as utility functions and that demonstrate " "ways to work with the :class:`Decimal` class::" msgstr "" -#: library/decimal.rst:1916 +#: library/decimal.rst:1938 msgid "" "def moneyfmt(value, places=2, curr='', sep=',', dp='.',\n" " pos='', neg='-', trailneg=''):\n" @@ -2403,75 +2427,75 @@ msgid "" " return +s" msgstr "" -#: library/decimal.rst:2068 +#: library/decimal.rst:2090 msgid "Decimal FAQ" msgstr "" -#: library/decimal.rst:2070 +#: library/decimal.rst:2092 msgid "" -"Q. It is cumbersome to type ``decimal.Decimal('1234.5')``. Is there a way " +"Q: It is cumbersome to type ``decimal.Decimal('1234.5')``. Is there a way " "to minimize typing when using the interactive interpreter?" msgstr "" -#: library/decimal.rst:2073 -msgid "A. Some users abbreviate the constructor to just a single letter:" +#: library/decimal.rst:2095 +msgid "A: Some users abbreviate the constructor to just a single letter:" msgstr "" -#: library/decimal.rst:2079 +#: library/decimal.rst:2101 msgid "" -"Q. In a fixed-point application with two decimal places, some inputs have " +"Q: In a fixed-point application with two decimal places, some inputs have " "many places and need to be rounded. Others are not supposed to have excess " "digits and need to be validated. What methods should be used?" msgstr "" -#: library/decimal.rst:2083 +#: library/decimal.rst:2105 msgid "" -"A. The :meth:`~Decimal.quantize` method rounds to a fixed number of decimal " +"A: The :meth:`~Decimal.quantize` method rounds to a fixed number of decimal " "places. If the :const:`Inexact` trap is set, it is also useful for " "validation:" msgstr "" -#: library/decimal.rst:2101 +#: library/decimal.rst:2123 msgid "" -"Q. Once I have valid two place inputs, how do I maintain that invariant " +"Q: Once I have valid two place inputs, how do I maintain that invariant " "throughout an application?" msgstr "" -#: library/decimal.rst:2104 +#: library/decimal.rst:2126 msgid "" -"A. Some operations like addition, subtraction, and multiplication by an " +"A: Some operations like addition, subtraction, and multiplication by an " "integer will automatically preserve fixed point. Others operations, like " "division and non-integer multiplication, will change the number of decimal " "places and need to be followed-up with a :meth:`~Decimal.quantize` step:" msgstr "" -#: library/decimal.rst:2122 +#: library/decimal.rst:2144 msgid "" "In developing fixed-point applications, it is convenient to define functions " "to handle the :meth:`~Decimal.quantize` step:" msgstr "" -#: library/decimal.rst:2136 +#: library/decimal.rst:2158 msgid "" -"Q. There are many ways to express the same value. The numbers ``200``, " +"Q: There are many ways to express the same value. The numbers ``200``, " "``200.000``, ``2E2``, and ``.02E+4`` all have the same value at various " "precisions. Is there a way to transform them to a single recognizable " "canonical value?" msgstr "" -#: library/decimal.rst:2141 +#: library/decimal.rst:2163 msgid "" -"A. The :meth:`~Decimal.normalize` method maps all equivalent values to a " +"A: The :meth:`~Decimal.normalize` method maps all equivalent values to a " "single representative:" msgstr "" -#: library/decimal.rst:2148 -msgid "Q. When does rounding occur in a computation?" +#: library/decimal.rst:2170 +msgid "Q: When does rounding occur in a computation?" msgstr "" -#: library/decimal.rst:2150 +#: library/decimal.rst:2172 msgid "" -"A. It occurs *after* the computation. The philosophy of the decimal " +"A: It occurs *after* the computation. The philosophy of the decimal " "specification is that numbers are considered exact and are created " "independent of the current context. They can even have greater precision " "than current context. Computations process with those exact inputs and then " @@ -2479,7 +2503,7 @@ msgid "" "computation::" msgstr "" -#: library/decimal.rst:2157 +#: library/decimal.rst:2179 msgid "" ">>> getcontext().prec = 5\n" ">>> pi = Decimal('3.1415926535') # More than 5 digits\n" @@ -2493,75 +2517,75 @@ msgid "" "Decimal('3.1416')" msgstr "" -#: library/decimal.rst:2168 +#: library/decimal.rst:2190 msgid "" -"Q. Some decimal values always print with exponential notation. Is there a " +"Q: Some decimal values always print with exponential notation. Is there a " "way to get a non-exponential representation?" msgstr "" -#: library/decimal.rst:2171 +#: library/decimal.rst:2193 msgid "" -"A. For some values, exponential notation is the only way to express the " +"A: For some values, exponential notation is the only way to express the " "number of significant places in the coefficient. For example, expressing " "``5.0E+3`` as ``5000`` keeps the value constant but cannot show the " "original's two-place significance." msgstr "" -#: library/decimal.rst:2176 +#: library/decimal.rst:2198 msgid "" "If an application does not care about tracking significance, it is easy to " "remove the exponent and trailing zeroes, losing significance, but keeping " "the value unchanged:" msgstr "" -#: library/decimal.rst:2186 -msgid "Q. Is there a way to convert a regular float to a :class:`Decimal`?" +#: library/decimal.rst:2208 +msgid "Q: Is there a way to convert a regular float to a :class:`Decimal`?" msgstr "" -#: library/decimal.rst:2188 +#: library/decimal.rst:2210 msgid "" -"A. Yes, any binary floating-point number can be exactly expressed as a " +"A: Yes, any binary floating-point number can be exactly expressed as a " "Decimal though an exact conversion may take more precision than intuition " "would suggest:" msgstr "" -#: library/decimal.rst:2192 +#: library/decimal.rst:2214 msgid "" ">>> Decimal(math.pi)\n" "Decimal('3.141592653589793115997963468544185161590576171875')" msgstr "" -#: library/decimal.rst:2197 +#: library/decimal.rst:2219 msgid "" -"Q. Within a complex calculation, how can I make sure that I haven't gotten a " +"Q: Within a complex calculation, how can I make sure that I haven't gotten a " "spurious result because of insufficient precision or rounding anomalies." msgstr "" -#: library/decimal.rst:2200 +#: library/decimal.rst:2222 msgid "" -"A. The decimal module makes it easy to test results. A best practice is to " +"A: The decimal module makes it easy to test results. A best practice is to " "re-run calculations using greater precision and with various rounding modes. " "Widely differing results indicate insufficient precision, rounding mode " "issues, ill-conditioned inputs, or a numerically unstable algorithm." msgstr "" -#: library/decimal.rst:2205 +#: library/decimal.rst:2227 msgid "" -"Q. I noticed that context precision is applied to the results of operations " +"Q: I noticed that context precision is applied to the results of operations " "but not to the inputs. Is there anything to watch out for when mixing " "values of different precisions?" msgstr "" -#: library/decimal.rst:2209 +#: library/decimal.rst:2231 msgid "" -"A. Yes. The principle is that all values are considered to be exact and so " +"A: Yes. The principle is that all values are considered to be exact and so " "is the arithmetic on those values. Only the results are rounded. The " "advantage for inputs is that \"what you type is what you get\". A " "disadvantage is that the results can look odd if you forget that the inputs " "haven't been rounded:" msgstr "" -#: library/decimal.rst:2214 +#: library/decimal.rst:2236 msgid "" ">>> getcontext().prec = 3\n" ">>> Decimal('3.104') + Decimal('2.104')\n" @@ -2570,32 +2594,32 @@ msgid "" "Decimal('5.20')" msgstr "" -#: library/decimal.rst:2222 +#: library/decimal.rst:2244 msgid "" "The solution is either to increase precision or to force rounding of inputs " "using the unary plus operation:" msgstr "" -#: library/decimal.rst:2225 +#: library/decimal.rst:2247 msgid "" ">>> getcontext().prec = 3\n" ">>> +Decimal('1.23456789') # unary plus triggers rounding\n" "Decimal('1.23')" msgstr "" -#: library/decimal.rst:2231 +#: library/decimal.rst:2253 msgid "" "Alternatively, inputs can be rounded upon creation using the :meth:`Context." "create_decimal` method:" msgstr "" -#: library/decimal.rst:2237 -msgid "Q. Is the CPython implementation fast for large numbers?" +#: library/decimal.rst:2259 +msgid "Q: Is the CPython implementation fast for large numbers?" msgstr "" -#: library/decimal.rst:2239 +#: library/decimal.rst:2261 msgid "" -"A. Yes. In the CPython and PyPy3 implementations, the C/CFFI versions of " +"A: Yes. In the CPython and PyPy3 implementations, the C/CFFI versions of " "the decimal module integrate the high speed `libmpdec `_ library for arbitrary precision " "correctly rounded decimal floating-point arithmetic [#]_. ``libmpdec`` uses " @@ -2606,7 +2630,7 @@ msgid "" "large numbers." msgstr "" -#: library/decimal.rst:2249 +#: library/decimal.rst:2271 msgid "" "The context must be adapted for exact arbitrary precision arithmetic. :attr:" "`~Context.Emin` and :attr:`~Context.Emax` should always be set to the " @@ -2614,13 +2638,13 @@ msgid "" "Setting :attr:`~Context.prec` requires some care." msgstr "" -#: library/decimal.rst:2253 +#: library/decimal.rst:2275 msgid "" "The easiest approach for trying out bignum arithmetic is to use the maximum " "value for :attr:`~Context.prec` as well [#]_::" msgstr "" -#: library/decimal.rst:2256 +#: library/decimal.rst:2278 msgid "" ">>> setcontext(Context(prec=MAX_PREC, Emax=MAX_EMAX, Emin=MIN_EMIN))\n" ">>> x = Decimal(2) ** 256\n" @@ -2628,13 +2652,13 @@ msgid "" "Decimal('904625697166532776746648320380374280103671755200316906558262375061821325312')" msgstr "" -#: library/decimal.rst:2262 +#: library/decimal.rst:2284 msgid "" "For inexact results, :const:`MAX_PREC` is far too large on 64-bit platforms " "and the available memory will be insufficient::" msgstr "" -#: library/decimal.rst:2265 +#: library/decimal.rst:2287 msgid "" ">>> Decimal(1) / 3\n" "Traceback (most recent call last):\n" @@ -2642,7 +2666,7 @@ msgid "" "MemoryError" msgstr "" -#: library/decimal.rst:2270 +#: library/decimal.rst:2292 msgid "" "On systems with overallocation (e.g. Linux), a more sophisticated approach " "is to adjust :attr:`~Context.prec` to the amount of available RAM. Suppose " @@ -2650,7 +2674,7 @@ msgid "" "of 500MB each::" msgstr "" -#: library/decimal.rst:2274 +#: library/decimal.rst:2296 msgid "" ">>> import sys\n" ">>>\n" @@ -2674,14 +2698,14 @@ msgid "" " decimal.Inexact: []" msgstr "" -#: library/decimal.rst:2294 +#: library/decimal.rst:2316 msgid "" "In general (and especially on systems without overallocation), it is " "recommended to estimate even tighter bounds and set the :attr:`Inexact` trap " "if all calculations are expected to be exact." msgstr "" -#: library/decimal.rst:2303 +#: library/decimal.rst:2325 msgid "" "This approach now works for all exact results except for non-integer powers." msgstr "" diff --git a/library/development.po b/library/development.po index 3a975e447..14947bb2d 100644 --- a/library/development.po +++ b/library/development.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/devmode.po b/library/devmode.po index 6437cf6a8..18deb131d 100644 --- a/library/devmode.po +++ b/library/devmode.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/dialog.po b/library/dialog.po index d55d85402..fcda3a290 100644 --- a/library/dialog.po +++ b/library/dialog.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,64 +18,120 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: library/dialog.rst:2 -msgid "Tkinter Dialogs" +msgid "Tkinter dialogs" msgstr "" #: library/dialog.rst:5 msgid ":mod:`tkinter.simpledialog` --- Standard Tkinter input dialogs" msgstr "" -#: library/dialog.rst:11 +#: library/dialog.rst:10 msgid "**Source code:** :source:`Lib/tkinter/simpledialog.py`" msgstr "" -#: library/dialog.rst:15 +#: library/dialog.rst:14 msgid "" "The :mod:`tkinter.simpledialog` module contains convenience classes and " "functions for creating simple modal dialogs to get a value from the user." msgstr "" -#: library/dialog.rst:23 +#: library/dialog.rst:22 msgid "" -"The above three functions provide dialogs that prompt the user to enter a " -"value of the desired type." +"Prompt the user to enter a value of the desired type and return it, or " +"``None`` if the dialog is cancelled." msgstr "" -#: library/dialog.rst:28 -msgid "The base class for custom dialogs." +#: library/dialog.rst:25 +msgid "" +"*title* is the dialog title and *prompt* the message shown above the entry. " +"*initialvalue* is the value initially placed in the entry. *parent* is the " +"window over which the dialog is shown. :func:`askinteger` and :func:" +"`askfloat` also accept *minvalue* and *maxvalue*, which bound the accepted " +"value. :func:`askstring` also accepts *show*, a character used to mask the " +"entered text, for example ``'*'`` to hide a password." +msgstr "" + +#: library/dialog.rst:35 +msgid "" +"The base class for custom dialogs. Instantiating it shows the dialog modally " +"and returns once the user closes it; the entered value is then available in " +"the :attr:`!result` attribute." +msgstr "" + +#: library/dialog.rst:41 +msgid "" +"The value produced by :meth:`apply`, or ``None`` if the dialog was cancelled." msgstr "" -#: library/dialog.rst:32 +#: library/dialog.rst:46 msgid "" "Override to construct the dialog's interface and return the widget that " "should have initial focus." msgstr "" -#: library/dialog.rst:37 +#: library/dialog.rst:51 msgid "" "Default behaviour adds OK and Cancel buttons. Override for custom button " "layouts." msgstr "" -#: library/dialog.rst:43 +#: library/dialog.rst:56 +msgid "" +"Validate the data entered by the user. Return true if it is valid, in which " +"case the dialog proceeds to :meth:`apply`; return false to keep the dialog " +"open. The default implementation always returns true; override it to check " +"the input." +msgstr "" + +#: library/dialog.rst:64 +msgid "" +"Process the data entered by the user, for example by storing it in the :attr:" +"`!result` attribute. Called after :meth:`validate` succeeds and just before " +"the dialog is destroyed. The default implementation does nothing; override " +"it to act on or store the result." +msgstr "" + +#: library/dialog.rst:73 +msgid "" +"Destroy the dialog window, clearing the reference to the widget that had the " +"initial focus." +msgstr "" + +#: library/dialog.rst:79 +msgid "" +"A simple modal dialog that displays the message *text* above a row of push " +"buttons whose labels are given by *buttons*, and returns the index of the " +"button the user presses. *default* is the index of the button activated by " +"the Return key, *cancel* the index returned when the window is closed " +"through the window manager, *title* the window title, and *class_* the Tk " +"class name of the window." +msgstr "" + +#: library/dialog.rst:88 +msgid "" +"Display the dialog, wait until the user presses a button or closes the " +"window, and return the index of the chosen button." +msgstr "" + +#: library/dialog.rst:94 msgid ":mod:`tkinter.filedialog` --- File selection dialogs" msgstr "" -#: library/dialog.rst:49 +#: library/dialog.rst:99 msgid "**Source code:** :source:`Lib/tkinter/filedialog.py`" msgstr "" -#: library/dialog.rst:53 +#: library/dialog.rst:103 msgid "" "The :mod:`tkinter.filedialog` module provides classes and factory functions " "for creating file/directory selection windows." msgstr "" -#: library/dialog.rst:57 -msgid "Native Load/Save Dialogs" +#: library/dialog.rst:107 +msgid "Native load/save dialogs" msgstr "" -#: library/dialog.rst:59 +#: library/dialog.rst:109 msgid "" "The following classes and functions provide file dialog windows that combine " "a native look-and-feel with configuration options to customize behaviour. " @@ -112,175 +168,221 @@ msgstr "" msgid "*multiple* - when true, selection of multiple items is allowed" msgstr "" -#: library/dialog.rst:79 +#: library/dialog.rst:129 msgid "**Static factory functions**" msgstr "" -#: library/dialog.rst:81 +#: library/dialog.rst:131 msgid "" "The below functions when called create a modal, native look-and-feel dialog, " -"wait for the user's selection, then return the selected value(s) or ``None`` " -"to the caller." +"wait for the user's selection, and return it. The exact return value depends " +"on the function (see below); when the dialog is cancelled it is an empty " +"string, an empty tuple or ``None``. The precise type of this empty value may " +"vary between platforms and Tk versions, so test the result for truth rather " +"than comparing it with a specific value." msgstr "" -#: library/dialog.rst:88 +#: library/dialog.rst:142 msgid "" -"The above two functions create an :class:`Open` dialog and return the opened " -"file object(s) in read-only mode." +"Create an :class:`Open` dialog. :func:`askopenfile` returns the opened file " +"object, or ``None`` if the dialog is cancelled. :func:`askopenfiles` returns " +"a list of the opened file objects, or an empty tuple if cancelled. The files " +"are opened in mode *mode* (read-only ``'r'`` by default)." msgstr "" -#: library/dialog.rst:93 +#: library/dialog.rst:151 msgid "" -"Create a :class:`SaveAs` dialog and return a file object opened in write-" -"only mode." +"Create a :class:`SaveAs` dialog and return the opened file object, or " +"``None`` if the dialog is cancelled. The file is opened in mode *mode* " +"(``'w'`` by default)." msgstr "" -#: library/dialog.rst:98 +#: library/dialog.rst:158 msgid "" -"The above two functions create an :class:`Open` dialog and return the " -"selected filename(s) that correspond to existing file(s)." -msgstr "" - -#: library/dialog.rst:103 -msgid "Create a :class:`SaveAs` dialog and return the selected filename." -msgstr "" - -#: library/dialog.rst:107 -msgid "Prompt user to select a directory." +"Create an :class:`Open` dialog. :func:`askopenfilename` returns the selected " +"filename as a string, or an empty string if the dialog is cancelled. :func:" +"`askopenfilenames` returns a tuple of the selected filenames, or an empty " +"tuple if cancelled." msgstr "" -#: library/dialog.rst:108 -msgid "Additional keyword option:" +#: library/dialog.rst:166 +msgid "" +"Create a :class:`SaveAs` dialog and return the selected filename as a " +"string, or an empty string if the dialog is cancelled." msgstr "" -#: library/dialog.rst:109 -msgid "*mustexist* - determines if selection must be an existing directory." +#: library/dialog.rst:171 +msgid "" +"Prompt the user to select a directory, and return its path as a string, or " +"an empty string if the dialog is cancelled. Additional keyword option: " +"*mustexist* - if true, the user may only select an existing directory (false " +"by default)." msgstr "" -#: library/dialog.rst:114 +#: library/dialog.rst:180 msgid "" -"The above two classes provide native dialog windows for saving and loading " -"files." +"The above three classes provide native dialog windows for loading and saving " +"files and for selecting a directory." msgstr "" -#: library/dialog.rst:117 +#: library/dialog.rst:183 msgid "**Convenience classes**" msgstr "" -#: library/dialog.rst:119 +#: library/dialog.rst:185 msgid "" "The below classes are used for creating file/directory windows from scratch. " "These do not emulate the native look-and-feel of the platform." msgstr "" -#: library/dialog.rst:124 -msgid "Create a dialog prompting the user to select a directory." -msgstr "" - -#: library/dialog.rst:126 +#: library/dialog.rst:188 msgid "" "The *FileDialog* class should be subclassed for custom event handling and " "behaviour." msgstr "" -#: library/dialog.rst:131 +#: library/dialog.rst:193 msgid "Create a basic file selection dialog." msgstr "" -#: library/dialog.rst:135 +#: library/dialog.rst:197 msgid "Trigger the termination of the dialog window." msgstr "" -#: library/dialog.rst:139 +#: library/dialog.rst:201 msgid "Event handler for double-click event on directory." msgstr "" -#: library/dialog.rst:143 +#: library/dialog.rst:205 msgid "Event handler for click event on directory." msgstr "" -#: library/dialog.rst:147 +#: library/dialog.rst:209 msgid "Event handler for double-click event on file." msgstr "" -#: library/dialog.rst:151 +#: library/dialog.rst:213 msgid "Event handler for single-click event on file." msgstr "" -#: library/dialog.rst:155 +#: library/dialog.rst:217 msgid "Filter the files by directory." msgstr "" -#: library/dialog.rst:159 +#: library/dialog.rst:221 msgid "Retrieve the file filter currently in use." msgstr "" -#: library/dialog.rst:163 +#: library/dialog.rst:225 msgid "Retrieve the currently selected item." msgstr "" -#: library/dialog.rst:167 +#: library/dialog.rst:229 msgid "Render dialog and start event loop." msgstr "" -#: library/dialog.rst:171 +#: library/dialog.rst:233 msgid "Exit dialog returning current selection." msgstr "" -#: library/dialog.rst:175 +#: library/dialog.rst:237 +msgid "" +"Called when the user confirms the current selection. The base implementation " +"accepts the selection and closes the dialog; :class:`LoadFileDialog` and :" +"class:`SaveFileDialog` override it to check the selection first." +msgstr "" + +#: library/dialog.rst:244 msgid "Exit dialog returning filename, if any." msgstr "" -#: library/dialog.rst:179 +#: library/dialog.rst:248 msgid "Set the file filter." msgstr "" -#: library/dialog.rst:183 +#: library/dialog.rst:252 msgid "Update the current file selection to *file*." msgstr "" -#: library/dialog.rst:188 +#: library/dialog.rst:257 msgid "" "A subclass of FileDialog that creates a dialog window for selecting an " "existing file." msgstr "" -#: library/dialog.rst:193 +#: library/dialog.rst:262 msgid "" "Test that a file is provided and that the selection indicates an already " "existing file." msgstr "" -#: library/dialog.rst:198 +#: library/dialog.rst:267 msgid "" "A subclass of FileDialog that creates a dialog window for selecting a " "destination file." msgstr "" -#: library/dialog.rst:203 +#: library/dialog.rst:272 msgid "" "Test whether or not the selection points to a valid file that is not a " "directory. Confirmation is required if an already existing file is selected." msgstr "" -#: library/dialog.rst:208 +#: library/dialog.rst:277 msgid ":mod:`tkinter.commondialog` --- Dialog window templates" msgstr "" -#: library/dialog.rst:214 +#: library/dialog.rst:282 msgid "**Source code:** :source:`Lib/tkinter/commondialog.py`" msgstr "" -#: library/dialog.rst:218 +#: library/dialog.rst:286 msgid "" "The :mod:`tkinter.commondialog` module provides the :class:`Dialog` class " "that is the base class for dialogs defined in other supporting modules." msgstr "" -#: library/dialog.rst:225 +#: library/dialog.rst:293 msgid "Render the Dialog window." msgstr "" -#: library/dialog.rst:230 +#: library/dialog.rst:297 +msgid ":mod:`!tkinter.dialog` --- Classic Tk dialog boxes" +msgstr "" + +#: library/dialog.rst:302 +msgid "**Source code:** :source:`Lib/tkinter/dialog.py`" +msgstr "" + +#: library/dialog.rst:306 +msgid "" +"The :mod:`!tkinter.dialog` module provides a simple modal dialog box built " +"on the classic (non-themed) Tk widgets." +msgstr "" + +#: library/dialog.rst:311 +msgid "" +"The name of a bitmap (``'questhead'``) suitable for use as the *bitmap* of " +"a :class:`Dialog`." +msgstr "" + +#: library/dialog.rst:316 +msgid "" +"Display a modal dialog box built from the classic (non-themed) Tk widgets " +"and wait for the user to press one of its buttons. The options, given " +"through *cnf* or as keyword arguments, are all required: *title* (the window " +"title), *text* (the message), *bitmap* (the name of a bitmap icon, such as :" +"data:`DIALOG_ICON`), *default* (the index of the default button) and " +"*strings* (the sequence of button labels). After construction, the :attr:`!" +"num` attribute holds the index of the button the user pressed." +msgstr "" + +#: library/dialog.rst:327 +msgid "" +"Do nothing. The dialog window is destroyed automatically before the " +"constructor returns, so there is nothing left for this method to do." +msgstr "" + +#: library/dialog.rst:334 msgid "Modules :mod:`tkinter.messagebox`, :ref:`tut-files`" msgstr "" diff --git a/library/difflib.po b/library/difflib.po index 3cf9bc5cf..ac0a4a099 100644 --- a/library/difflib.po +++ b/library/difflib.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -415,7 +415,7 @@ msgid "" msgstr "" #: library/difflib.rst:362 -msgid "SequenceMatcher Objects" +msgid "SequenceMatcher objects" msgstr "" #: library/difflib.rst:364 @@ -699,7 +699,7 @@ msgid "" msgstr "" #: library/difflib.rst:590 -msgid "SequenceMatcher Examples" +msgid "SequenceMatcher examples" msgstr "" #: library/difflib.rst:592 @@ -747,7 +747,7 @@ msgid "" msgstr "" #: library/difflib.rst:641 -msgid "Differ Objects" +msgid "Differ objects" msgstr "" #: library/difflib.rst:643 @@ -812,7 +812,7 @@ msgid "" msgstr "" #: library/difflib.rst:690 -msgid "Differ Example" +msgid "Differ example" msgstr "" #: library/difflib.rst:692 @@ -857,7 +857,7 @@ msgstr "" #: library/difflib.rst:761 msgid "" -"\"\"\" Command line interface to difflib.py providing diffs in four " +"\"\"\" Command-line interface to difflib.py providing diffs in four " "formats:\n" "\n" "* ndiff: lists every line and highlights interline changes.\n" @@ -868,11 +868,11 @@ msgid "" "\"\"\"\n" "\n" "import sys, os, difflib, argparse\n" -"from datetime import datetime, timezone\n" +"import datetime as dt\n" "\n" "def file_mtime(path):\n" -" t = datetime.fromtimestamp(os.stat(path).st_mtime,\n" -" timezone.utc)\n" +" t = dt.datetime.fromtimestamp(os.stat(path).st_mtime,\n" +" dt.timezone.utc)\n" " return t.astimezone().isoformat()\n" "\n" "def main():\n" diff --git a/library/dis.po b/library/dis.po index e396bad12..b206434ff 100644 --- a/library/dis.po +++ b/library/dis.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -794,7 +794,7 @@ msgid "" "end = STACK.pop()\n" "start = STACK.pop()\n" "container = STACK.pop()\n" -"values = STACK.pop()\n" +"value = STACK.pop()\n" "container[start:end] = value" msgstr "" diff --git a/library/distribution.po b/library/distribution.po index eb4baf91a..006445b02 100644 --- a/library/distribution.po +++ b/library/distribution.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/distutils.po b/library/distutils.po index eb2ba66eb..5a05145df 100644 --- a/library/distutils.po +++ b/library/distutils.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/doctest.po b/library/doctest.po index 6708e663d..cebcfb4e1 100644 --- a/library/doctest.po +++ b/library/doctest.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/email.charset.po b/library/email.charset.po index c401d7204..60f32e3a7 100644 --- a/library/email.charset.po +++ b/library/email.charset.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: 2025-01-27 01:00+0200\n" "Last-Translator: Marios Giannopoulos \n" "Language-Team: PyGreece \n" diff --git a/library/email.compat32-message.po b/library/email.compat32-message.po index bc9ff8794..78169ae33 100644 --- a/library/email.compat32-message.po +++ b/library/email.compat32-message.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/email.contentmanager.po b/library/email.contentmanager.po index 84661a7d3..af25b4ef0 100644 --- a/library/email.contentmanager.po +++ b/library/email.contentmanager.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/email.encoders.po b/library/email.encoders.po index ce3d37223..ed6fbe881 100644 --- a/library/email.encoders.po +++ b/library/email.encoders.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/email.errors.po b/library/email.errors.po index 55b66ef0f..159c6f720 100644 --- a/library/email.errors.po +++ b/library/email.errors.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: 2024-12-14 01:00+0200\n" "Last-Translator: Marios Giannopoulos \n" "Language-Team: PyGreece \n" diff --git a/library/email.examples.po b/library/email.examples.po index 04ef60eba..2522ed80c 100644 --- a/library/email.examples.po +++ b/library/email.examples.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/email.generator.po b/library/email.generator.po index 7f8ef949d..0c3e64554 100644 --- a/library/email.generator.po +++ b/library/email.generator.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/email.header.po b/library/email.header.po index 34dcfacce..ae39adc8d 100644 --- a/library/email.header.po +++ b/library/email.header.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/email.headerregistry.po b/library/email.headerregistry.po index 49c653ba8..6bc559b6d 100644 --- a/library/email.headerregistry.po +++ b/library/email.headerregistry.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -132,15 +132,16 @@ msgid "" "``kwds`` is a dictionary containing one pre-initialized key, ``defects``. " "``defects`` is an empty list. The parse method should append any detected " "defects to this list. On return, the ``kwds`` dictionary *must* contain " -"values for at least the keys ``decoded`` and ``defects``. ``decoded`` " -"should be the string value for the header (that is, the header value fully " -"decoded to unicode). The parse method should assume that *string* may " -"contain content-transfer-encoded parts, but should correctly handle all " -"valid unicode characters as well so that it can parse un-encoded header " -"values." +"values for at least the keys ``decoded``, ``defects`` and ``parse_tree``. " +"``decoded`` should be the string value for the header (that is, the header " +"value fully decoded to unicode). ``parse_tree`` is set to the parse tree " +"obtained from parsing the header. The parse method should assume that " +"*string* may contain content-transfer-encoded parts, but should correctly " +"handle all valid unicode characters as well so that it can parse un-encoded " +"header values." msgstr "" -#: library/email.headerregistry.rst:105 +#: library/email.headerregistry.rst:106 msgid "" "``BaseHeader``'s ``__new__`` then creates the header instance, and calls its " "``init`` method. The specialized class only needs to provide an ``init`` " @@ -148,21 +149,21 @@ msgid "" "``BaseHeader`` itself. Such an ``init`` method should look like this::" msgstr "" -#: library/email.headerregistry.rst:110 +#: library/email.headerregistry.rst:111 msgid "" "def init(self, /, *args, **kw):\n" " self._myattr = kw.pop('myattr')\n" " super().init(*args, **kw)" msgstr "" -#: library/email.headerregistry.rst:114 +#: library/email.headerregistry.rst:115 msgid "" "That is, anything extra that the specialized class puts in to the ``kwds`` " "dictionary should be removed and handled, and the remaining contents of " "``kw`` (and ``args``) passed to the ``BaseHeader`` ``init`` method." msgstr "" -#: library/email.headerregistry.rst:121 +#: library/email.headerregistry.rst:122 msgid "" "An \"unstructured\" header is the default type of header in :rfc:`5322`. Any " "header that does not have a specified syntax is treated as unstructured. " @@ -170,7 +171,7 @@ msgid "" "header." msgstr "" -#: library/email.headerregistry.rst:126 +#: library/email.headerregistry.rst:127 msgid "" "In :rfc:`5322`, an unstructured header is a run of arbitrary text in the " "ASCII character set. :rfc:`2047`, however, has an :rfc:`5322` compatible " @@ -183,11 +184,11 @@ msgid "" "such as invalid characters within the encoded words or the non-encoded text." msgstr "" -#: library/email.headerregistry.rst:136 +#: library/email.headerregistry.rst:137 msgid "This header type provides no additional attributes." msgstr "" -#: library/email.headerregistry.rst:141 +#: library/email.headerregistry.rst:142 msgid "" ":rfc:`5322` specifies a very specific format for dates within email headers. " "The ``DateHeader`` parser recognizes that date format, as well as " @@ -195,11 +196,11 @@ msgid "" "wild\"." msgstr "" -#: library/email.headerregistry.rst:146 library/email.headerregistry.rst:188 +#: library/email.headerregistry.rst:147 library/email.headerregistry.rst:189 msgid "This header type provides the following additional attributes:" msgstr "" -#: library/email.headerregistry.rst:150 +#: library/email.headerregistry.rst:151 msgid "" "If the header value can be recognized as a valid date of one form or " "another, this attribute will contain a :class:`~datetime.datetime` instance " @@ -211,28 +212,28 @@ msgid "" "`datetime.timezone` to record the timezone offset." msgstr "" -#: library/email.headerregistry.rst:160 +#: library/email.headerregistry.rst:161 msgid "" "The ``decoded`` value of the header is determined by formatting the " "``datetime`` according to the :rfc:`5322` rules; that is, it is set to::" msgstr "" -#: library/email.headerregistry.rst:163 +#: library/email.headerregistry.rst:164 msgid "email.utils.format_datetime(self.datetime)" msgstr "" -#: library/email.headerregistry.rst:165 +#: library/email.headerregistry.rst:166 msgid "" "When creating a ``DateHeader``, *value* may be :class:`~datetime.datetime` " "instance. This means, for example, that the following code is valid and " "does what one would expect::" msgstr "" -#: library/email.headerregistry.rst:169 +#: library/email.headerregistry.rst:170 msgid "msg['Date'] = datetime(2011, 7, 15, 21)" msgstr "" -#: library/email.headerregistry.rst:171 +#: library/email.headerregistry.rst:172 msgid "" "Because this is a naive ``datetime`` it will be interpreted as a UTC " "timestamp, and the resulting value will have a timezone of ``-0000``. Much " @@ -240,23 +241,23 @@ msgid "" "mod:`~email.utils` module::" msgstr "" -#: library/email.headerregistry.rst:176 +#: library/email.headerregistry.rst:177 msgid "msg['Date'] = utils.localtime()" msgstr "" -#: library/email.headerregistry.rst:178 +#: library/email.headerregistry.rst:179 msgid "" "This example sets the date header to the current time and date using the " "current timezone offset." msgstr "" -#: library/email.headerregistry.rst:184 +#: library/email.headerregistry.rst:185 msgid "" "Address headers are one of the most complex structured header types. The " "``AddressHeader`` class provides a generic interface to any address header." msgstr "" -#: library/email.headerregistry.rst:193 +#: library/email.headerregistry.rst:194 msgid "" "A tuple of :class:`.Group` objects encoding the addresses and groups found " "in the header value. Addresses that are not part of a group are represented " @@ -264,7 +265,7 @@ msgid "" "is ``None``." msgstr "" -#: library/email.headerregistry.rst:201 +#: library/email.headerregistry.rst:202 msgid "" "A tuple of :class:`.Address` objects encoding all of the individual " "addresses from the header value. If the header value contains any groups, " @@ -273,7 +274,7 @@ msgid "" "\"flattened\" into a one dimensional list)." msgstr "" -#: library/email.headerregistry.rst:207 +#: library/email.headerregistry.rst:208 msgid "" "The ``decoded`` value of the header will have all encoded words decoded to " "unicode. :class:`~encodings.idna` encoded domain names are also decoded to " @@ -282,7 +283,7 @@ msgid "" "'``." msgstr "" -#: library/email.headerregistry.rst:213 +#: library/email.headerregistry.rst:214 msgid "" "A list of :class:`.Address` and :class:`.Group` objects in any combination " "may be used to set the value of an address header. ``Group`` objects whose " @@ -291,12 +292,12 @@ msgid "" "obtained from the ``groups`` attribute of the source header." msgstr "" -#: library/email.headerregistry.rst:222 +#: library/email.headerregistry.rst:223 msgid "" "A subclass of :class:`.AddressHeader` that adds one additional attribute:" msgstr "" -#: library/email.headerregistry.rst:228 +#: library/email.headerregistry.rst:229 msgid "" "The single address encoded by the header value. If the header value " "actually contains more than one address (which would be a violation of the " @@ -304,14 +305,14 @@ msgid "" "result in a :exc:`ValueError`." msgstr "" -#: library/email.headerregistry.rst:234 +#: library/email.headerregistry.rst:235 msgid "" "Many of the above classes also have a ``Unique`` variant (for example, " "``UniqueUnstructuredHeader``). The only difference is that in the " "``Unique`` variant, :attr:`~.BaseHeader.max_count` is set to 1." msgstr "" -#: library/email.headerregistry.rst:241 +#: library/email.headerregistry.rst:242 msgid "" "There is really only one valid value for the :mailheader:`MIME-Version` " "header, and that is ``1.0``. For future proofing, this header class " @@ -320,20 +321,20 @@ msgid "" "the following attributes:" msgstr "" -#: library/email.headerregistry.rst:249 +#: library/email.headerregistry.rst:250 msgid "" "The version number as a string, with any whitespace and/or comments removed." msgstr "" -#: library/email.headerregistry.rst:254 +#: library/email.headerregistry.rst:255 msgid "The major version number as an integer" msgstr "" -#: library/email.headerregistry.rst:258 +#: library/email.headerregistry.rst:259 msgid "The minor version number as an integer" msgstr "" -#: library/email.headerregistry.rst:263 +#: library/email.headerregistry.rst:264 msgid "" "MIME headers all start with the prefix 'Content-'. Each specific header has " "a certain value, described under the class for that header. Some can also " @@ -341,41 +342,41 @@ msgid "" "class serves as a base for all the MIME headers that take parameters." msgstr "" -#: library/email.headerregistry.rst:270 +#: library/email.headerregistry.rst:271 msgid "A dictionary mapping parameter names to parameter values." msgstr "" -#: library/email.headerregistry.rst:275 +#: library/email.headerregistry.rst:276 msgid "" "A :class:`ParameterizedMIMEHeader` class that handles the :mailheader:" "`Content-Type` header." msgstr "" -#: library/email.headerregistry.rst:280 +#: library/email.headerregistry.rst:281 msgid "The content type string, in the form ``maintype/subtype``." msgstr "" -#: library/email.headerregistry.rst:289 +#: library/email.headerregistry.rst:290 msgid "" "A :class:`ParameterizedMIMEHeader` class that handles the :mailheader:" "`Content-Disposition` header." msgstr "" -#: library/email.headerregistry.rst:294 +#: library/email.headerregistry.rst:295 msgid "``inline`` and ``attachment`` are the only valid values in common use." msgstr "" -#: library/email.headerregistry.rst:299 +#: library/email.headerregistry.rst:300 msgid "Handles the :mailheader:`Content-Transfer-Encoding` header." msgstr "" -#: library/email.headerregistry.rst:303 +#: library/email.headerregistry.rst:304 msgid "" "Valid values are ``7bit``, ``8bit``, ``base64``, and ``quoted-printable``. " "See :rfc:`2045` for more information." msgstr "" -#: library/email.headerregistry.rst:312 +#: library/email.headerregistry.rst:313 msgid "" "This is the factory used by :class:`~email.policy.EmailPolicy` by default. " "``HeaderRegistry`` builds the class used to create a header instance " @@ -388,7 +389,7 @@ msgid "" "class's :class:`~type.__bases__` list." msgstr "" -#: library/email.headerregistry.rst:322 +#: library/email.headerregistry.rst:323 msgid "The default mappings are:" msgstr "" @@ -396,7 +397,7 @@ msgstr "" msgid "subject" msgstr "" -#: library/email.headerregistry.rst:324 +#: library/email.headerregistry.rst:325 msgid "UniqueUnstructuredHeader" msgstr "" @@ -404,7 +405,7 @@ msgstr "" msgid "date" msgstr "" -#: library/email.headerregistry.rst:325 library/email.headerregistry.rst:327 +#: library/email.headerregistry.rst:326 library/email.headerregistry.rst:328 msgid "UniqueDateHeader" msgstr "" @@ -412,7 +413,7 @@ msgstr "" msgid "resent-date" msgstr "" -#: library/email.headerregistry.rst:326 +#: library/email.headerregistry.rst:327 msgid "DateHeader" msgstr "" @@ -424,7 +425,7 @@ msgstr "" msgid "sender" msgstr "" -#: library/email.headerregistry.rst:328 +#: library/email.headerregistry.rst:329 msgid "UniqueSingleAddressHeader" msgstr "" @@ -432,7 +433,7 @@ msgstr "" msgid "resent-sender" msgstr "" -#: library/email.headerregistry.rst:329 +#: library/email.headerregistry.rst:330 msgid "SingleAddressHeader" msgstr "" @@ -440,9 +441,9 @@ msgstr "" msgid "to" msgstr "" -#: library/email.headerregistry.rst:330 library/email.headerregistry.rst:332 -#: library/email.headerregistry.rst:334 library/email.headerregistry.rst:336 -#: library/email.headerregistry.rst:338 +#: library/email.headerregistry.rst:331 library/email.headerregistry.rst:333 +#: library/email.headerregistry.rst:335 library/email.headerregistry.rst:337 +#: library/email.headerregistry.rst:339 msgid "UniqueAddressHeader" msgstr "" @@ -450,8 +451,8 @@ msgstr "" msgid "resent-to" msgstr "" -#: library/email.headerregistry.rst:331 library/email.headerregistry.rst:333 -#: library/email.headerregistry.rst:335 library/email.headerregistry.rst:337 +#: library/email.headerregistry.rst:332 library/email.headerregistry.rst:334 +#: library/email.headerregistry.rst:336 library/email.headerregistry.rst:338 msgid "AddressHeader" msgstr "" @@ -487,7 +488,7 @@ msgstr "" msgid "mime-version" msgstr "" -#: library/email.headerregistry.rst:339 +#: library/email.headerregistry.rst:340 msgid "MIMEVersionHeader" msgstr "" @@ -495,7 +496,7 @@ msgstr "" msgid "content-type" msgstr "" -#: library/email.headerregistry.rst:340 +#: library/email.headerregistry.rst:341 msgid "ContentTypeHeader" msgstr "" @@ -503,7 +504,7 @@ msgstr "" msgid "content-disposition" msgstr "" -#: library/email.headerregistry.rst:341 +#: library/email.headerregistry.rst:342 msgid "ContentDispositionHeader" msgstr "" @@ -511,7 +512,7 @@ msgstr "" msgid "content-transfer-encoding" msgstr "" -#: library/email.headerregistry.rst:342 +#: library/email.headerregistry.rst:343 msgid "ContentTransferEncodingHeader" msgstr "" @@ -519,15 +520,15 @@ msgstr "" msgid "message-id" msgstr "" -#: library/email.headerregistry.rst:343 +#: library/email.headerregistry.rst:344 msgid "MessageIDHeader" msgstr "" -#: library/email.headerregistry.rst:345 +#: library/email.headerregistry.rst:346 msgid "``HeaderRegistry`` has the following methods:" msgstr "" -#: library/email.headerregistry.rst:350 +#: library/email.headerregistry.rst:351 msgid "" "*name* is the name of the header to be mapped. It will be converted to " "lower case in the registry. *cls* is the specialized class to be used, " @@ -535,11 +536,11 @@ msgid "" "that match *name*." msgstr "" -#: library/email.headerregistry.rst:358 +#: library/email.headerregistry.rst:359 msgid "Construct and return a class to handle creating a *name* header." msgstr "" -#: library/email.headerregistry.rst:363 +#: library/email.headerregistry.rst:364 msgid "" "Retrieves the specialized header associated with *name* from the registry " "(using *default_class* if *name* does not appear in the registry) and " @@ -548,38 +549,38 @@ msgid "" "the class instance created thereby." msgstr "" -#: library/email.headerregistry.rst:370 +#: library/email.headerregistry.rst:371 msgid "" "The following classes are the classes used to represent data parsed from " "structured headers and can, in general, be used by an application program to " "construct structured values to assign to specific headers." msgstr "" -#: library/email.headerregistry.rst:377 +#: library/email.headerregistry.rst:378 msgid "" "The class used to represent an email address. The general form of an " "address is::" msgstr "" -#: library/email.headerregistry.rst:380 +#: library/email.headerregistry.rst:381 msgid "[display_name] " msgstr "" -#: library/email.headerregistry.rst:382 +#: library/email.headerregistry.rst:383 msgid "or::" msgstr "" -#: library/email.headerregistry.rst:384 +#: library/email.headerregistry.rst:385 msgid "username@domain" msgstr "" -#: library/email.headerregistry.rst:386 +#: library/email.headerregistry.rst:387 msgid "" "where each part must conform to specific syntax rules spelled out in :rfc:" "`5322`." msgstr "" -#: library/email.headerregistry.rst:389 +#: library/email.headerregistry.rst:390 msgid "" "As a convenience *addr_spec* can be specified instead of *username* and " "*domain*, in which case *username* and *domain* will be parsed from the " @@ -589,52 +590,52 @@ msgid "" "*not* allowed in the username portion of the address." msgstr "" -#: library/email.headerregistry.rst:398 +#: library/email.headerregistry.rst:399 msgid "" "The display name portion of the address, if any, with all quoting removed. " "If the address does not have a display name, this attribute will be an empty " "string." msgstr "" -#: library/email.headerregistry.rst:404 +#: library/email.headerregistry.rst:405 msgid "The ``username`` portion of the address, with all quoting removed." msgstr "" -#: library/email.headerregistry.rst:408 +#: library/email.headerregistry.rst:409 msgid "The ``domain`` portion of the address." msgstr "" -#: library/email.headerregistry.rst:412 +#: library/email.headerregistry.rst:413 msgid "" "The ``username@domain`` portion of the address, correctly quoted for use as " "a bare address (the second form shown above). This attribute is not mutable." msgstr "" -#: library/email.headerregistry.rst:418 +#: library/email.headerregistry.rst:419 msgid "" "The ``str`` value of the object is the address quoted according to :rfc:" "`5322` rules, but with no Content Transfer Encoding of any non-ASCII " "characters." msgstr "" -#: library/email.headerregistry.rst:422 +#: library/email.headerregistry.rst:423 msgid "" "To support SMTP (:rfc:`5321`), ``Address`` handles one special case: if " "``username`` and ``domain`` are both the empty string (or ``None``), then " "the string value of the ``Address`` is ``<>``." msgstr "" -#: library/email.headerregistry.rst:429 +#: library/email.headerregistry.rst:430 msgid "" "The class used to represent an address group. The general form of an " "address group is::" msgstr "" -#: library/email.headerregistry.rst:432 +#: library/email.headerregistry.rst:433 msgid "display_name: [address-list];" msgstr "" -#: library/email.headerregistry.rst:434 +#: library/email.headerregistry.rst:435 msgid "" "As a convenience for processing lists of addresses that consist of a mixture " "of groups and single addresses, a ``Group`` may also be used to represent " @@ -642,20 +643,20 @@ msgid "" "``None`` and providing a list of the single address as *addresses*." msgstr "" -#: library/email.headerregistry.rst:441 +#: library/email.headerregistry.rst:442 msgid "" "The ``display_name`` of the group. If it is ``None`` and there is exactly " "one ``Address`` in ``addresses``, then the ``Group`` represents a single " "address that is not in a group." msgstr "" -#: library/email.headerregistry.rst:447 +#: library/email.headerregistry.rst:448 msgid "" "A possibly empty tuple of :class:`.Address` objects representing the " "addresses in the group." msgstr "" -#: library/email.headerregistry.rst:452 +#: library/email.headerregistry.rst:453 msgid "" "The ``str`` value of a ``Group`` is formatted according to :rfc:`5322`, but " "with no Content Transfer Encoding of any non-ASCII characters. If " @@ -664,11 +665,11 @@ msgid "" "that single ``Address``." msgstr "" -#: library/email.headerregistry.rst:460 +#: library/email.headerregistry.rst:461 msgid "Footnotes" msgstr "" -#: library/email.headerregistry.rst:461 +#: library/email.headerregistry.rst:462 msgid "" "Originally added in 3.3 as a :term:`provisional module `" msgstr "" diff --git a/library/email.iterators.po b/library/email.iterators.po index 73c933a8f..8c7e2fa6f 100644 --- a/library/email.iterators.po +++ b/library/email.iterators.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/email.message.po b/library/email.message.po index f5faffb5d..a413c3ea6 100644 --- a/library/email.message.po +++ b/library/email.message.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -88,7 +88,7 @@ msgid "" "`~email.policy.default` policy, which follows the rules of the email RFCs " "except for line endings (instead of the RFC mandated ``\\r\\n``, it uses the " "Python standard ``\\n`` line endings). For more information see the :mod:" -"`~email.policy` documentation." +"`~email.policy` documentation. [2]_" msgstr "" #: library/email.message.rst:64 @@ -878,3 +878,12 @@ msgid "" "Originally added in 3.4 as a :term:`provisional module `. Docs for legacy message class moved to :ref:`compat32_message`." msgstr "" + +#: library/email.message.rst:753 +msgid "" +"The :class:`EmailMessage` class requires a policy that provides a " +"``content_manager`` attribute for content management methods like " +"``set_content()`` and ``get_content()`` to work. The legacy :const:`~email." +"policy.compat32` policy does not support these methods and should not be " +"used with :class:`EmailMessage`." +msgstr "" diff --git a/library/email.mime.po b/library/email.mime.po index 445817f5f..4890830bd 100644 --- a/library/email.mime.po +++ b/library/email.mime.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/email.parser.po b/library/email.parser.po index a5e0bfd2e..4fcac0c9c 100644 --- a/library/email.parser.po +++ b/library/email.parser.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -205,7 +205,7 @@ msgstr "" msgid "" "Read all the data from the binary file-like object *fp*, parse the resulting " "bytes, and return the message object. *fp* must support both the :meth:`~io." -"IOBase.readline` and the :meth:`~io.IOBase.read` methods." +"IOBase.readline` and the :meth:`~io.BufferedIOBase.read` methods." msgstr "" #: library/email.parser.rst:161 diff --git a/library/email.po b/library/email.po index 63083565e..9bc221e78 100644 --- a/library/email.po +++ b/library/email.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/email.policy.po b/library/email.policy.po index 4f34837f3..b480a71bc 100644 --- a/library/email.policy.po +++ b/library/email.policy.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -786,10 +786,17 @@ msgid "" msgstr "" #: library/email.policy.rst:667 +msgid "" +"The :const:`compat32` policy should not be used as a policy for :class:" +"`~email.message.EmailMessage` objects, and should only be used to serialize " +"messages that were created using the :const:`compat32` policy." +msgstr "" + +#: library/email.policy.rst:674 msgid "Footnotes" msgstr "" -#: library/email.policy.rst:668 +#: library/email.policy.rst:675 msgid "" "Originally added in 3.3 as a :term:`provisional feature `." diff --git a/library/email.utils.po b/library/email.utils.po index da5f8b640..bcfec4fb4 100644 --- a/library/email.utils.po +++ b/library/email.utils.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/ensurepip.po b/library/ensurepip.po index c10f3994f..db67baba7 100644 --- a/library/ensurepip.po +++ b/library/ensurepip.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/enum.po b/library/enum.po index efd05b916..634f0d31a 100644 --- a/library/enum.po +++ b/library/enum.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -113,7 +113,7 @@ msgid "" msgstr "" #: library/enum.rst:65 -msgid "Module Contents" +msgid "Module contents" msgstr "" #: library/enum.rst:67 @@ -289,32 +289,43 @@ msgstr "" msgid "Return a list of all power-of-two integers contained in a flag." msgstr "" -#: library/enum.rst:157 +#: library/enum.rst:156 +msgid ":func:`enum.bin`" +msgstr "" + +#: library/enum.rst:1080 +msgid "" +"Like built-in :func:`bin`, except negative values are represented in two's " +"complement, and the leading bit always indicates sign (``0`` implies " +"positive, ``1`` implies negative)." +msgstr "" + +#: library/enum.rst:163 msgid "``Flag``, ``IntFlag``, ``auto``" msgstr "" -#: library/enum.rst:158 +#: library/enum.rst:164 msgid "" "``StrEnum``, ``EnumCheck``, ``ReprEnum``, ``FlagBoundary``, ``property``, " "``member``, ``nonmember``, ``global_enum``, ``show_flag_values``" msgstr "" -#: library/enum.rst:159 +#: library/enum.rst:165 msgid "``EnumDict``" msgstr "" -#: library/enum.rst:164 -msgid "Data Types" +#: library/enum.rst:170 +msgid "Data types" msgstr "" -#: library/enum.rst:169 +#: library/enum.rst:175 msgid "" "*EnumType* is the :term:`metaclass` for *enum* enumerations. It is possible " "to subclass *EnumType* -- see :ref:`Subclassing EnumType ` for details." msgstr "" -#: library/enum.rst:173 +#: library/enum.rst:179 msgid "" "``EnumType`` is responsible for setting the correct :meth:`!__repr__`, :meth:" "`!__str__`, :meth:`!__format__`, and :meth:`!__reduce__` methods on the " @@ -322,17 +333,17 @@ msgid "" "duplicates, providing iteration over the enum class, etc." msgstr "" -#: library/enum.rst:180 +#: library/enum.rst:186 msgid "" "Before 3.11 ``EnumType`` was called ``EnumMeta``, which is still available " "as an alias." msgstr "" -#: library/enum.rst:184 +#: library/enum.rst:190 msgid "This method is called in two different ways:" msgstr "" -#: library/enum.rst:186 +#: library/enum.rst:192 msgid "to look up an existing member:" msgstr "" @@ -340,7 +351,7 @@ msgstr "" msgid "cls" msgstr "" -#: library/enum.rst:194 +#: library/enum.rst:200 msgid "The enum class being called." msgstr "" @@ -348,17 +359,17 @@ msgstr "" msgid "value" msgstr "" -#: library/enum.rst:189 +#: library/enum.rst:195 msgid "The value to lookup." msgstr "" -#: library/enum.rst:191 +#: library/enum.rst:197 msgid "" "to use the ``cls`` enum to create a new enum (only if the existing enum does " "not have any members):" msgstr "" -#: library/enum.rst:195 +#: library/enum.rst:201 msgid "The name of the new Enum to create." msgstr "" @@ -366,7 +377,7 @@ msgstr "" msgid "names" msgstr "" -#: library/enum.rst:196 +#: library/enum.rst:202 msgid "The names/values of the members for the new Enum." msgstr "" @@ -374,7 +385,7 @@ msgstr "" msgid "module" msgstr "" -#: library/enum.rst:197 +#: library/enum.rst:203 msgid "The name of the module the new Enum is created in." msgstr "" @@ -382,7 +393,7 @@ msgstr "" msgid "qualname" msgstr "" -#: library/enum.rst:198 +#: library/enum.rst:204 msgid "The actual location in the module where this Enum can be found." msgstr "" @@ -390,7 +401,7 @@ msgstr "" msgid "type" msgstr "" -#: library/enum.rst:199 +#: library/enum.rst:205 msgid "A mix-in type for the new Enum." msgstr "" @@ -398,7 +409,7 @@ msgstr "" msgid "start" msgstr "" -#: library/enum.rst:200 +#: library/enum.rst:206 msgid "The first integer value for the Enum (used by :class:`auto`)." msgstr "" @@ -406,16 +417,16 @@ msgstr "" msgid "boundary" msgstr "" -#: library/enum.rst:201 +#: library/enum.rst:207 msgid "" "How to handle out-of-range values from bit operations (:class:`Flag` only)." msgstr "" -#: library/enum.rst:205 +#: library/enum.rst:211 msgid "Returns ``True`` if member belongs to the ``cls``::" msgstr "" -#: library/enum.rst:207 +#: library/enum.rst:213 msgid "" ">>> some_var = Color.RED\n" ">>> some_var in Color\n" @@ -424,19 +435,19 @@ msgid "" "True" msgstr "" -#: library/enum.rst:215 +#: library/enum.rst:221 msgid "" "Before Python 3.12, a ``TypeError`` is raised if a non-Enum-member is used " "in a containment check." msgstr "" -#: library/enum.rst:220 +#: library/enum.rst:226 msgid "" "Returns ``['__class__', '__doc__', '__members__', '__module__']`` and the " "names of the members in *cls*::" msgstr "" -#: library/enum.rst:223 +#: library/enum.rst:229 msgid "" ">>> dir(Color)\n" "['BLUE', 'GREEN', 'RED', '__class__', '__contains__', '__doc__', " @@ -444,92 +455,92 @@ msgid "" "'__module__', '__name__', '__qualname__']" msgstr "" -#: library/enum.rst:228 +#: library/enum.rst:234 msgid "" "Returns the Enum member in *cls* matching *name*, or raises a :exc:" "`KeyError`::" msgstr "" -#: library/enum.rst:230 +#: library/enum.rst:236 msgid "" ">>> Color['BLUE']\n" "" msgstr "" -#: library/enum.rst:235 +#: library/enum.rst:241 msgid "Returns each member in *cls* in definition order::" msgstr "" -#: library/enum.rst:237 +#: library/enum.rst:243 msgid "" ">>> list(Color)\n" "[, , ]" msgstr "" -#: library/enum.rst:242 -msgid "Returns the number of member in *cls*::" +#: library/enum.rst:248 +msgid "Returns the number of members in *cls*::" msgstr "" -#: library/enum.rst:244 +#: library/enum.rst:250 msgid "" ">>> len(Color)\n" "3" msgstr "" -#: library/enum.rst:249 +#: library/enum.rst:255 msgid "Returns a mapping of every enum name to its member, including aliases" msgstr "" -#: library/enum.rst:253 +#: library/enum.rst:259 msgid "Returns each member in *cls* in reverse definition order::" msgstr "" -#: library/enum.rst:255 +#: library/enum.rst:261 msgid "" ">>> list(reversed(Color))\n" "[, , ]" msgstr "" -#: library/enum.rst:261 +#: library/enum.rst:267 msgid "*Enum* is the base class for all *enum* enumerations." msgstr "" -#: library/enum.rst:265 +#: library/enum.rst:271 msgid "The name used to define the ``Enum`` member::" msgstr "" -#: library/enum.rst:267 +#: library/enum.rst:273 msgid "" ">>> Color.BLUE.name\n" "'BLUE'" msgstr "" -#: library/enum.rst:272 +#: library/enum.rst:278 msgid "The value given to the ``Enum`` member::" msgstr "" -#: library/enum.rst:274 +#: library/enum.rst:280 msgid "" ">>> Color.RED.value\n" "1" msgstr "" -#: library/enum.rst:297 +#: library/enum.rst:303 msgid "Value of the member, can be set in :meth:`~Enum.__new__`." msgstr "" -#: library/enum.rst:279 +#: library/enum.rst:285 msgid "Enum member values" msgstr "" -#: library/enum.rst:281 +#: library/enum.rst:287 msgid "" "Member values can be anything: :class:`int`, :class:`str`, etc. If the " "exact value is unimportant you may use :class:`auto` instances and an " "appropriate value will be chosen for you. See :class:`auto` for the details." msgstr "" -#: library/enum.rst:286 +#: library/enum.rst:292 msgid "" "While mutable/unhashable values, such as :class:`dict`, :class:`list` or a " "mutable :class:`~dataclasses.dataclass`, can be used, they will have a " @@ -537,39 +548,67 @@ msgid "" "mutable/unhashable values in the enum." msgstr "" -#: library/enum.rst:293 +#: library/enum.rst:299 msgid "Name of the member." msgstr "" -#: library/enum.rst:301 +#: library/enum.rst:307 msgid "" "No longer used, kept for backward compatibility. (class attribute, removed " "during class creation)." msgstr "" -#: library/enum.rst:306 +#: library/enum.rst:310 +msgid "" +"The :attr:`~Enum._order_` attribute can be provided to help keep Python 2 / " +"Python 3 code in sync. It will be checked against the actual order of the " +"enumeration and raise an error if the two do not match::" +msgstr "" + +#: library/enum.rst:313 +msgid "" +">>> class Color(Enum):\n" +"... _order_ = 'RED GREEN BLUE'\n" +"... RED = 1\n" +"... BLUE = 3\n" +"... GREEN = 2\n" +"...\n" +"Traceback (most recent call last):\n" +"...\n" +"TypeError: member order does not match _order_:\n" +" ['RED', 'BLUE', 'GREEN']\n" +" ['RED', 'GREEN', 'BLUE']" +msgstr "" + +#: library/enum.rst:327 +msgid "" +"In Python 2 code the :attr:`~Enum._order_` attribute is necessary as " +"definition order is lost before it can be recorded." +msgstr "" + +#: library/enum.rst:334 msgid "" "``_ignore_`` is only used during creation and is removed from the " "enumeration once creation is complete." msgstr "" -#: library/enum.rst:309 +#: library/enum.rst:337 msgid "" "``_ignore_`` is a list of names that will not become members, and whose " "names will also be removed from the completed enumeration. See :ref:" "`TimePeriod ` for an example." msgstr "" -#: library/enum.rst:315 +#: library/enum.rst:345 msgid "" "Returns ``['__class__', '__doc__', '__module__', 'name', 'value']`` and any " "public methods defined on *self.__class__*::" msgstr "" -#: library/enum.rst:318 +#: library/enum.rst:348 msgid "" ">>> from enum import Enum\n" -">>> from datetime import date\n" +">>> import datetime as dt\n" ">>> class Weekday(Enum):\n" "... MONDAY = 1\n" "... TUESDAY = 2\n" @@ -580,7 +619,7 @@ msgid "" "... SUNDAY = 7\n" "... @classmethod\n" "... def today(cls):\n" -"... print('today is %s' % cls(date.today().isoweekday()).name)\n" +"... print(f'today is {cls(dt.date.today().isoweekday()).name}')\n" "...\n" ">>> dir(Weekday.SATURDAY)\n" "['__class__', '__doc__', '__eq__', '__hash__', '__module__', 'name', " @@ -591,11 +630,11 @@ msgstr "" msgid "name" msgstr "" -#: library/enum.rst:337 +#: library/enum.rst:367 msgid "The name of the member being defined (e.g. 'RED')." msgstr "" -#: library/enum.rst:338 +#: library/enum.rst:368 msgid "The start value for the Enum; the default is 1." msgstr "" @@ -603,7 +642,7 @@ msgstr "" msgid "count" msgstr "" -#: library/enum.rst:339 +#: library/enum.rst:369 msgid "The number of members currently defined, not including this one." msgstr "" @@ -611,17 +650,33 @@ msgstr "" msgid "last_values" msgstr "" -#: library/enum.rst:340 +#: library/enum.rst:370 msgid "A list of the previous values." msgstr "" -#: library/enum.rst:342 +#: library/enum.rst:372 msgid "" "A *staticmethod* that is used to determine the next value returned by :class:" -"`auto`::" +"`auto`." msgstr "" -#: library/enum.rst:345 +#: library/enum.rst:376 +msgid "" +"For standard :class:`Enum` classes the next value chosen is the highest " +"value seen incremented by one." +msgstr "" + +#: library/enum.rst:379 +msgid "" +"For :class:`Flag` classes the next value chosen will be the next highest " +"power-of-two." +msgstr "" + +#: library/enum.rst:382 +msgid "This method may be overridden, e.g.::" +msgstr "" + +#: library/enum.rst:384 msgid "" ">>> from enum import auto, Enum\n" ">>> class PowersOfThree(Enum):\n" @@ -635,31 +690,36 @@ msgid "" "9" msgstr "" -#: library/enum.rst:358 +#: library/enum.rst:396 +msgid "" +"Prior versions would use the last seen value instead of the highest value." +msgstr "" + +#: library/enum.rst:401 msgid "" "By default, does nothing. If multiple values are given in the member " "assignment, those values become separate arguments to ``__init__``; e.g." msgstr "" -#: library/enum.rst:365 +#: library/enum.rst:408 msgid "" "``Weekday.__init__()`` would be called as ``Weekday.__init__(self, 1, " "'Mon')``" msgstr "" -#: library/enum.rst:369 +#: library/enum.rst:412 msgid "" "A *classmethod* that is used to further configure subsequent subclasses. By " "default, does nothing." msgstr "" -#: library/enum.rst:374 +#: library/enum.rst:417 msgid "" "A *classmethod* for looking up values not found in *cls*. By default it " "does nothing, but can be overridden to implement custom search behavior::" msgstr "" -#: library/enum.rst:377 +#: library/enum.rst:420 msgid "" ">>> from enum import auto, StrEnum\n" ">>> class Build(StrEnum):\n" @@ -679,31 +739,31 @@ msgid "" "" msgstr "" -#: library/enum.rst:396 +#: library/enum.rst:441 msgid "" "By default, doesn't exist. If specified, either in the enum class " "definition or in a mixin class (such as ``int``), all values given in the " "member assignment will be passed; e.g." msgstr "" -#: library/enum.rst:404 +#: library/enum.rst:449 msgid "" "results in the call ``int('1a', 16)`` and a value of ``26`` for the member." msgstr "" -#: library/enum.rst:408 +#: library/enum.rst:453 msgid "" "When writing a custom ``__new__``, do not use ``super().__new__`` -- call " "the appropriate ``__new__`` instead." msgstr "" -#: library/enum.rst:413 +#: library/enum.rst:458 msgid "" "Returns the string used for *repr()* calls. By default, returns the *Enum* " "name, member name, and value, but can be overridden::" msgstr "" -#: library/enum.rst:416 +#: library/enum.rst:461 msgid "" ">>> from enum import auto, Enum\n" ">>> class OtherStyle(Enum):\n" @@ -719,13 +779,13 @@ msgid "" "(OtherStyle.ALTERNATE, 'OtherStyle.ALTERNATE', 'OtherStyle.ALTERNATE')" msgstr "" -#: library/enum.rst:430 +#: library/enum.rst:475 msgid "" "Returns the string used for *str()* calls. By default, returns the *Enum* " "name and member name, but can be overridden::" msgstr "" -#: library/enum.rst:433 +#: library/enum.rst:478 msgid "" ">>> from enum import auto, Enum\n" ">>> class OtherStyle(Enum):\n" @@ -740,13 +800,13 @@ msgid "" "(, 'ALTERNATE', 'ALTERNATE')" msgstr "" -#: library/enum.rst:446 +#: library/enum.rst:491 msgid "" "Returns the string used for *format()* and *f-string* calls. By default, " "returns :meth:`__str__` return value, but can be overridden::" msgstr "" -#: library/enum.rst:449 +#: library/enum.rst:494 msgid "" ">>> from enum import auto, Enum\n" ">>> class OtherStyle(Enum):\n" @@ -761,51 +821,55 @@ msgid "" "(, 'OtherStyle.ALTERNATE', 'ALTERNATE')" msgstr "" -#: library/enum.rst:462 +#: library/enum.rst:507 msgid "" "Using :class:`auto` with :class:`Enum` results in integers of increasing " "value, starting with ``1``." msgstr "" -#: library/enum.rst:465 +#: library/enum.rst:510 msgid "Added :ref:`enum-dataclass-support`" msgstr "" -#: library/enum.rst:469 +#: library/enum.rst:514 msgid "Adds a new name as an alias to an existing member::" msgstr "" -#: library/enum.rst:471 +#: library/enum.rst:516 msgid "" ">>> Color.RED._add_alias_(\"ERROR\")\n" ">>> Color.ERROR\n" "" msgstr "" -#: library/enum.rst:475 +#: library/enum.rst:520 msgid "" "Raises a :exc:`NameError` if the name is already assigned to a different " "member." msgstr "" -#: library/enum.rst:481 +#: library/enum.rst:526 msgid "Adds a new value as an alias to an existing member::" msgstr "" -#: library/enum.rst:483 +#: library/enum.rst:528 msgid "" ">>> Color.RED._add_value_alias_(42)\n" ">>> Color(42)\n" "" msgstr "" -#: library/enum.rst:487 +#: library/enum.rst:532 msgid "" "Raises a :exc:`ValueError` if the value is already linked with a different " "member." msgstr "" -#: library/enum.rst:494 +#: library/enum.rst:533 +msgid "See :ref:`multi-value-enum` for an example." +msgstr "" + +#: library/enum.rst:540 msgid "" "*IntEnum* is the same as :class:`Enum`, but its members are also integers " "and can be used anywhere that an integer can be used. If any integer " @@ -813,20 +877,20 @@ msgid "" "its enumeration status." msgstr "" -#: library/enum.rst:515 +#: library/enum.rst:561 msgid "" "Using :class:`auto` with :class:`IntEnum` results in integers of increasing " "value, starting with ``1``." msgstr "" -#: library/enum.rst:518 +#: library/enum.rst:564 msgid "" ":meth:`~object.__str__` is now :meth:`!int.__str__` to better support the " "*replacement of existing constants* use-case. :meth:`~object.__format__` was " "already :meth:`!int.__format__` for that same reason." msgstr "" -#: library/enum.rst:525 +#: library/enum.rst:571 msgid "" "*StrEnum* is the same as :class:`Enum`, but its members are also strings and " "can be used in most of the same places that a string can be used. The result " @@ -834,7 +898,7 @@ msgid "" "of the enumeration." msgstr "" -#: library/enum.rst:546 +#: library/enum.rst:592 msgid "" "There are places in the stdlib that check for an exact :class:`str` instead " "of a :class:`str` subclass (i.e. ``type(unknown) == str`` instead of " @@ -842,31 +906,31 @@ msgid "" "``str(MyStrEnum.MY_MEMBER)``." msgstr "" -#: library/enum.rst:553 +#: library/enum.rst:599 msgid "" "Using :class:`auto` with :class:`StrEnum` results in the lower-cased member " "name as the value." msgstr "" -#: library/enum.rst:558 +#: library/enum.rst:604 msgid "" ":meth:`~object.__str__` is :meth:`!str.__str__` to better support the " "*replacement of existing constants* use-case. :meth:`~object.__format__` is " "likewise :meth:`!str.__format__` for that same reason." msgstr "" -#: library/enum.rst:566 +#: library/enum.rst:612 msgid "" "``Flag`` is the same as :class:`Enum`, but its members support the bitwise " "operators ``&`` (*AND*), ``|`` (*OR*), ``^`` (*XOR*), and ``~`` (*INVERT*); " "the results of those operations are (aliases of) members of the enumeration." msgstr "" -#: library/enum.rst:572 +#: library/enum.rst:618 msgid "Returns *True* if value is in self::" msgstr "" -#: library/enum.rst:574 +#: library/enum.rst:620 msgid "" ">>> from enum import Flag, auto\n" ">>> class Color(Flag):\n" @@ -886,11 +950,11 @@ msgid "" "False" msgstr "" -#: library/enum.rst:593 +#: library/enum.rst:639 msgid "Returns all contained non-alias members::" msgstr "" -#: library/enum.rst:595 +#: library/enum.rst:641 msgid "" ">>> list(Color.RED)\n" "[]\n" @@ -898,11 +962,11 @@ msgid "" "[, ]" msgstr "" -#: library/enum.rst:604 +#: library/enum.rst:650 msgid "Returns number of members in flag::" msgstr "" -#: library/enum.rst:606 +#: library/enum.rst:652 msgid "" ">>> len(Color.GREEN)\n" "1\n" @@ -910,11 +974,11 @@ msgid "" "3" msgstr "" -#: library/enum.rst:615 +#: library/enum.rst:661 msgid "Returns *True* if any members in flag, *False* otherwise::" msgstr "" -#: library/enum.rst:617 +#: library/enum.rst:663 msgid "" ">>> bool(Color.GREEN)\n" "True\n" @@ -925,21 +989,21 @@ msgid "" "False" msgstr "" -#: library/enum.rst:627 +#: library/enum.rst:673 msgid "Returns current flag binary or'ed with other::" msgstr "" -#: library/enum.rst:629 +#: library/enum.rst:675 msgid "" ">>> Color.RED | Color.GREEN\n" "" msgstr "" -#: library/enum.rst:634 +#: library/enum.rst:680 msgid "Returns current flag binary and'ed with other::" msgstr "" -#: library/enum.rst:636 +#: library/enum.rst:682 msgid "" ">>> purple & white\n" "\n" @@ -947,11 +1011,11 @@ msgid "" "" msgstr "" -#: library/enum.rst:643 +#: library/enum.rst:689 msgid "Returns current flag binary xor'ed with other::" msgstr "" -#: library/enum.rst:645 +#: library/enum.rst:691 msgid "" ">>> purple ^ white\n" "\n" @@ -959,11 +1023,11 @@ msgid "" "" msgstr "" -#: library/enum.rst:652 +#: library/enum.rst:698 msgid "Returns all the flags in *type(self)* that are not in *self*::" msgstr "" -#: library/enum.rst:654 +#: library/enum.rst:700 msgid "" ">>> ~white\n" "\n" @@ -973,110 +1037,110 @@ msgid "" "" msgstr "" -#: library/enum.rst:663 +#: library/enum.rst:709 msgid "" "Function used to format any remaining unnamed numeric values. Default is " "the value's repr; common choices are :func:`hex` and :func:`oct`." msgstr "" -#: library/enum.rst:668 +#: library/enum.rst:714 msgid "" "Using :class:`auto` with :class:`Flag` results in integers that are powers " "of two, starting with ``1``." msgstr "" -#: library/enum.rst:671 +#: library/enum.rst:717 msgid "The *repr()* of zero-valued flags has changed. It is now::" msgstr "" -#: library/enum.rst:679 +#: library/enum.rst:725 msgid "" "``IntFlag`` is the same as :class:`Flag`, but its members are also integers " "and can be used anywhere that an integer can be used." msgstr "" -#: library/enum.rst:693 +#: library/enum.rst:739 msgid "" "If any integer operation is performed with an *IntFlag* member, the result " "is not an *IntFlag*::" msgstr "" -#: library/enum.rst:696 +#: library/enum.rst:742 msgid "" ">>> Color.RED + 2\n" "3" msgstr "" -#: library/enum.rst:699 +#: library/enum.rst:745 msgid "If a :class:`Flag` operation is performed with an *IntFlag* member and:" msgstr "" -#: library/enum.rst:701 +#: library/enum.rst:747 msgid "the result is a valid *IntFlag*: an *IntFlag* is returned" msgstr "" -#: library/enum.rst:702 +#: library/enum.rst:748 msgid "" "the result is not a valid *IntFlag*: the result depends on the :class:" "`FlagBoundary` setting" msgstr "" -#: library/enum.rst:704 +#: library/enum.rst:750 msgid "The :func:`repr` of unnamed zero-valued flags has changed. It is now:" msgstr "" -#: library/enum.rst:711 +#: library/enum.rst:757 msgid "" "Using :class:`auto` with :class:`IntFlag` results in integers that are " "powers of two, starting with ``1``." msgstr "" -#: library/enum.rst:716 +#: library/enum.rst:762 msgid "" ":meth:`~object.__str__` is now :meth:`!int.__str__` to better support the " "*replacement of existing constants* use-case. :meth:`~object.__format__` " "was already :meth:`!int.__format__` for that same reason." msgstr "" -#: library/enum.rst:720 +#: library/enum.rst:766 msgid "" "Inversion of an :class:`!IntFlag` now returns a positive value that is the " "union of all flags not in the given flag, rather than a negative value. This " "matches the existing :class:`Flag` behavior." msgstr "" -#: library/enum.rst:726 +#: library/enum.rst:772 msgid "" ":class:`!ReprEnum` uses the :meth:`repr() ` of :class:`Enum`, " "but the :class:`str() ` of the mixed-in data type:" msgstr "" -#: library/enum.rst:729 +#: library/enum.rst:775 msgid ":meth:`!int.__str__` for :class:`IntEnum` and :class:`IntFlag`" msgstr "" -#: library/enum.rst:730 +#: library/enum.rst:776 msgid ":meth:`!str.__str__` for :class:`StrEnum`" msgstr "" -#: library/enum.rst:732 +#: library/enum.rst:778 msgid "" "Inherit from :class:`!ReprEnum` to keep the :class:`str() ` / :func:" "`format` of the mixed-in data type instead of using the :class:`Enum`-" "default :meth:`str() `." msgstr "" -#: library/enum.rst:741 +#: library/enum.rst:787 msgid "" "*EnumCheck* contains the options used by the :func:`verify` decorator to " "ensure various constraints; failed constraints result in a :exc:`ValueError`." msgstr "" -#: library/enum.rst:746 +#: library/enum.rst:792 msgid "Ensure that each value has only one name::" msgstr "" -#: library/enum.rst:748 +#: library/enum.rst:794 msgid "" ">>> from enum import Enum, verify, UNIQUE\n" ">>> @verify(UNIQUE)\n" @@ -1090,13 +1154,13 @@ msgid "" "ValueError: aliases found in : CRIMSON -> RED" msgstr "" -#: library/enum.rst:762 +#: library/enum.rst:808 msgid "" "Ensure that there are no missing values between the lowest-valued member and " "the highest-valued member::" msgstr "" -#: library/enum.rst:765 +#: library/enum.rst:811 msgid "" ">>> from enum import Enum, verify, CONTINUOUS\n" ">>> @verify(CONTINUOUS)\n" @@ -1109,13 +1173,13 @@ msgid "" "ValueError: invalid enum 'Color': missing values 3, 4" msgstr "" -#: library/enum.rst:777 +#: library/enum.rst:823 msgid "" "Ensure that any flag groups/masks contain only named flags -- useful when " "values are specified instead of being generated by :func:`auto`::" msgstr "" -#: library/enum.rst:780 +#: library/enum.rst:826 msgid "" ">>> from enum import Flag, verify, NAMED_FLAGS\n" ">>> @verify(NAMED_FLAGS)\n" @@ -1131,24 +1195,24 @@ msgid "" "combined values of 0x18 [use enum.show_flag_values(value) for details]" msgstr "" -#: library/enum.rst:794 +#: library/enum.rst:840 msgid "" "CONTINUOUS and NAMED_FLAGS are designed to work with integer-valued members." msgstr "" -#: library/enum.rst:800 +#: library/enum.rst:846 msgid "" "``FlagBoundary`` controls how out-of-range values are handled in :class:" "`Flag` and its subclasses." msgstr "" -#: library/enum.rst:805 +#: library/enum.rst:851 msgid "" "Out-of-range values cause a :exc:`ValueError` to be raised. This is the " "default for :class:`Flag`::" msgstr "" -#: library/enum.rst:808 +#: library/enum.rst:854 msgid "" ">>> from enum import Flag, STRICT, auto\n" ">>> class StrictFlag(Flag, boundary=STRICT):\n" @@ -1164,13 +1228,13 @@ msgid "" " allowed 0b0 00111" msgstr "" -#: library/enum.rst:823 +#: library/enum.rst:869 msgid "" "Out-of-range values have invalid values removed, leaving a valid :class:" "`Flag` value::" msgstr "" -#: library/enum.rst:826 +#: library/enum.rst:872 msgid "" ">>> from enum import Flag, CONFORM, auto\n" ">>> class ConformFlag(Flag, boundary=CONFORM):\n" @@ -1182,19 +1246,19 @@ msgid "" "" msgstr "" -#: library/enum.rst:837 +#: library/enum.rst:883 msgid "" "Out-of-range values lose their :class:`Flag` membership and revert to :class:" "`int`." msgstr "" -#: library/enum.rst:850 +#: library/enum.rst:896 msgid "" "Out-of-range values are kept, and the :class:`Flag` membership is kept. This " "is the default for :class:`IntFlag`::" msgstr "" -#: library/enum.rst:853 +#: library/enum.rst:899 msgid "" ">>> from enum import Flag, KEEP, auto\n" ">>> class KeepFlag(Flag, boundary=KEEP):\n" @@ -1206,7 +1270,7 @@ msgid "" "" msgstr "" -#: library/enum.rst:866 +#: library/enum.rst:912 msgid "" "*EnumDict* is a subclass of :class:`dict` that is used as the namespace for " "defining enum classes (see :ref:`prepare`). It is exposed to allow " @@ -1216,7 +1280,7 @@ msgid "" "correctly." msgstr "" -#: library/enum.rst:873 +#: library/enum.rst:919 msgid "" "Note that only the :class:`~collections.abc.MutableMapping` interface (:meth:" "`~object.__setitem__` and :meth:`~dict.update`) is overridden. It may be " @@ -1224,116 +1288,105 @@ msgid "" "meth:`|= `." msgstr "" -#: library/enum.rst:880 +#: library/enum.rst:926 msgid "A list of member names." msgstr "" -#: library/enum.rst:887 +#: library/enum.rst:935 msgid "Supported ``__dunder__`` names" msgstr "" -#: library/enum.rst:889 +#: library/enum.rst:937 msgid "" ":attr:`~EnumType.__members__` is a read-only ordered mapping of " "``member_name``:``member`` items. It is only available on the class." msgstr "" -#: library/enum.rst:892 +#: library/enum.rst:940 msgid "" ":meth:`~Enum.__new__`, if specified, must create and return the enum " -"members; it is also a very good idea to set the member's :attr:`!_value_` " -"appropriately. Once all the members are created it is no longer used." +"members; it is also a very good idea to set the member's :attr:`~Enum." +"_value_` appropriately. Once all the members are created it is no longer " +"used." msgstr "" -#: library/enum.rst:898 +#: library/enum.rst:946 msgid "Supported ``_sunder_`` names" msgstr "" -#: library/enum.rst:900 +#: library/enum.rst:948 msgid ":attr:`~Enum._name_` -- name of the member" msgstr "" -#: library/enum.rst:901 +#: library/enum.rst:949 msgid ":attr:`~Enum._value_` -- value of the member; can be set in ``__new__``" msgstr "" -#: library/enum.rst:902 +#: library/enum.rst:950 msgid "" ":meth:`~Enum._missing_` -- a lookup function used when a value is not found; " "may be overridden" msgstr "" -#: library/enum.rst:904 +#: library/enum.rst:952 msgid "" ":attr:`~Enum._ignore_` -- a list of names, either as a :class:`list` or a :" "class:`str`, that will not be transformed into members, and will be removed " "from the final class" msgstr "" -#: library/enum.rst:907 +#: library/enum.rst:955 msgid "" ":attr:`~Enum._order_` -- no longer used, kept for backward compatibility " "(class attribute, removed during class creation)" msgstr "" -#: library/enum.rst:909 +#: library/enum.rst:958 msgid "" ":meth:`~Enum._generate_next_value_` -- used to get an appropriate value for " "an enum member; may be overridden" msgstr "" -#: library/enum.rst:914 -msgid "" -"For standard :class:`Enum` classes the next value chosen is the highest " -"value seen incremented by one." -msgstr "" - -#: library/enum.rst:917 -msgid "" -"For :class:`Flag` classes the next value chosen will be the next highest " -"power-of-two." -msgstr "" - -#: library/enum.rst:920 +#: library/enum.rst:961 msgid "" ":meth:`~Enum._add_alias_` -- adds a new name as an alias to an existing " "member." msgstr "" -#: library/enum.rst:922 +#: library/enum.rst:963 msgid "" ":meth:`~Enum._add_value_alias_` -- adds a new value as an alias to an " "existing member." msgstr "" -#: library/enum.rst:925 +#: library/enum.rst:966 msgid "" "While ``_sunder_`` names are generally reserved for the further development " "of the :class:`Enum` class and can not be used, some are explicitly allowed:" msgstr "" -#: library/enum.rst:928 +#: library/enum.rst:969 msgid "" "``_repr_*`` (e.g. ``_repr_html_``), as used in `IPython's rich display`_" msgstr "" -#: library/enum.rst:930 +#: library/enum.rst:971 msgid "``_missing_``, ``_order_``, ``_generate_next_value_``" msgstr "" -#: library/enum.rst:931 +#: library/enum.rst:972 msgid "``_ignore_``" msgstr "" -#: library/enum.rst:932 +#: library/enum.rst:973 msgid "``_add_alias_``, ``_add_value_alias_``, ``_repr_*``" msgstr "" -#: library/enum.rst:938 -msgid "Utilities and Decorators" +#: library/enum.rst:979 +msgid "Utilities and decorators" msgstr "" -#: library/enum.rst:942 +#: library/enum.rst:983 msgid "" "*auto* can be used in place of a value. If used, the *Enum* machinery will " "call an :class:`Enum`'s :meth:`~Enum._generate_next_value_` to get an " @@ -1344,54 +1397,55 @@ msgid "" "name. Care must be taken if mixing *auto()* with manually specified values." msgstr "" -#: library/enum.rst:950 +#: library/enum.rst:991 msgid "" -"*auto* instances are only resolved when at the top level of an assignment:" +"*auto* instances are only resolved when at the top level of an assignment, " +"either by itself or as part of a tuple:" msgstr "" -#: library/enum.rst:952 +#: library/enum.rst:994 msgid "``FIRST = auto()`` will work (auto() is replaced with ``1``);" msgstr "" -#: library/enum.rst:953 +#: library/enum.rst:995 msgid "" "``SECOND = auto(), -2`` will work (auto is replaced with ``2``, so ``2, -2`` " "is used to create the ``SECOND`` enum member;" msgstr "" -#: library/enum.rst:955 +#: library/enum.rst:997 msgid "" -"``THREE = [auto(), -3]`` will *not* work (``, -3`` is used to " -"create the ``THREE`` enum member)" +"``THREE = [auto(), -3]`` will *not* work (``[, -3]`` is used " +"to create the ``THREE`` enum member)" msgstr "" -#: library/enum.rst:960 +#: library/enum.rst:1002 msgid "" "In prior versions, ``auto()`` had to be the only thing on the assignment " "line to work properly." msgstr "" -#: library/enum.rst:963 +#: library/enum.rst:1005 msgid "" "``_generate_next_value_`` can be overridden to customize the values used by " "*auto*." msgstr "" -#: library/enum.rst:966 +#: library/enum.rst:1008 msgid "" "in 3.13 the default ``_generate_next_value_`` will always return the highest " "member value incremented by 1, and will fail if any member is an " "incompatible type." msgstr "" -#: library/enum.rst:972 +#: library/enum.rst:1014 msgid "" "A decorator similar to the built-in *property*, but specifically for " "enumerations. It allows member attributes to have the same names as members " "themselves." msgstr "" -#: library/enum.rst:976 +#: library/enum.rst:1018 msgid "" "the *property* and the member must be defined in separate classes; for " "example, the *value* and *name* attributes are defined in the *Enum* class, " @@ -1399,14 +1453,14 @@ msgid "" "``name``." msgstr "" -#: library/enum.rst:985 +#: library/enum.rst:1027 msgid "" "A :keyword:`class` decorator specifically for enumerations. It searches an " "enumeration's :attr:`~EnumType.__members__`, gathering any aliases it finds; " "if any are found :exc:`ValueError` is raised with the details::" msgstr "" -#: library/enum.rst:989 +#: library/enum.rst:1031 msgid "" ">>> from enum import Enum, unique\n" ">>> @unique\n" @@ -1421,22 +1475,22 @@ msgid "" "ValueError: duplicate values found in : FOUR -> THREE" msgstr "" -#: library/enum.rst:1003 +#: library/enum.rst:1045 msgid "" "A :keyword:`class` decorator specifically for enumerations. Members from :" "class:`EnumCheck` are used to specify which constraints should be checked on " "the decorated enumeration." msgstr "" -#: library/enum.rst:1011 +#: library/enum.rst:1053 msgid "A decorator for use in enums: its target will become a member." msgstr "" -#: library/enum.rst:1017 +#: library/enum.rst:1059 msgid "A decorator for use in enums: its target will not become a member." msgstr "" -#: library/enum.rst:1023 +#: library/enum.rst:1065 msgid "" "A decorator to change the :class:`str() ` and :func:`repr` of an enum " "to show its members as belonging to the module instead of its class. Should " @@ -1444,52 +1498,52 @@ msgid "" "namespace (see :class:`re.RegexFlag` for an example)." msgstr "" -#: library/enum.rst:1032 +#: library/enum.rst:1074 msgid "Return a list of all power-of-two integers contained in a flag *value*." msgstr "" -#: library/enum.rst:1040 +#: library/enum.rst:1095 msgid "Notes" msgstr "" -#: library/enum.rst:1042 +#: library/enum.rst:1097 msgid ":class:`IntEnum`, :class:`StrEnum`, and :class:`IntFlag`" msgstr "" -#: library/enum.rst:1044 +#: library/enum.rst:1099 msgid "" "These three enum types are designed to be drop-in replacements for existing " "integer- and string-based values; as such, they have extra limitations:" msgstr "" -#: library/enum.rst:1047 +#: library/enum.rst:1102 msgid "``__str__`` uses the value and not the name of the enum member" msgstr "" -#: library/enum.rst:1049 +#: library/enum.rst:1104 msgid "" "``__format__``, because it uses ``__str__``, will also use the value of the " "enum member instead of its name" msgstr "" -#: library/enum.rst:1052 +#: library/enum.rst:1107 msgid "" "If you do not need/want those limitations, you can either create your own " "base class by mixing in the ``int`` or ``str`` type yourself::" msgstr "" -#: library/enum.rst:1055 +#: library/enum.rst:1110 msgid "" ">>> from enum import Enum\n" ">>> class MyIntEnum(int, Enum):\n" "... pass" msgstr "" -#: library/enum.rst:1059 +#: library/enum.rst:1114 msgid "or you can reassign the appropriate :meth:`str`, etc., in your enum::" msgstr "" -#: library/enum.rst:1061 +#: library/enum.rst:1116 msgid "" ">>> from enum import Enum, IntEnum\n" ">>> class MyIntEnum(IntEnum):\n" diff --git a/library/errno.po b/library/errno.po index f41c75d0d..f05df242d 100644 --- a/library/errno.po +++ b/library/errno.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/exceptions.po b/library/exceptions.po index 5b6bd076b..b15252db3 100644 --- a/library/exceptions.po +++ b/library/exceptions.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -271,8 +271,8 @@ msgstr "" #: library/exceptions.rst:223 msgid "" "Raised when the :func:`input` function hits an end-of-file condition (EOF) " -"without reading any data. (Note: the :meth:`!io.IOBase.read` and :meth:`io." -"IOBase.readline` methods return an empty string when they hit EOF.)" +"without reading any data. (Note: the :meth:`io.TextIOBase.read` and :meth:" +"`io.IOBase.readline` methods return an empty string when they hit EOF.)" msgstr "" #: library/exceptions.rst:230 @@ -841,8 +841,8 @@ msgstr "" #: library/exceptions.rst:728 msgid "" -"An integer containing the number of characters written to the stream before " -"it blocked. This attribute is available when using the buffered I/O classes " +"An integer containing the number of **bytes** written to the stream before " +"it blocked. This attribute is available when using the buffered I/O classes " "from the :mod:`io` module." msgstr "" @@ -1096,23 +1096,36 @@ msgid "" "`TypeError` if any contained exception is not an :exc:`Exception` subclass." msgstr "" -#: library/exceptions.rst:966 +#: library/exceptions.rst:964 +msgid "" +"Exception groups are :ref:`generic ` over the type of their " +"contained exceptions." +msgstr "" + +#: library/exceptions.rst:969 +msgid "" +"The ``excs`` parameter may be any sequence, but lists and tuples are " +"specifically processed more efficiently here. For optimal performance, pass " +"a tuple as ``excs``." +msgstr "" + +#: library/exceptions.rst:975 msgid "The ``msg`` argument to the constructor. This is a read-only attribute." msgstr "" -#: library/exceptions.rst:970 +#: library/exceptions.rst:979 msgid "" "A tuple of the exceptions in the ``excs`` sequence given to the constructor. " "This is a read-only attribute." msgstr "" -#: library/exceptions.rst:975 +#: library/exceptions.rst:984 msgid "" "Returns an exception group that contains only the exceptions from the " "current group that match *condition*, or ``None`` if the result is empty." msgstr "" -#: library/exceptions.rst:978 +#: library/exceptions.rst:987 msgid "" "The condition can be an exception type or tuple of exception types, in which " "case each exception is checked for a match using the same check that is used " @@ -1121,7 +1134,7 @@ msgid "" "true for the exceptions that should be in the subgroup." msgstr "" -#: library/exceptions.rst:984 +#: library/exceptions.rst:993 msgid "" "The nesting structure of the current exception is preserved in the result, " "as are the values of its :attr:`message`, :attr:`~BaseException." @@ -1130,31 +1143,31 @@ msgid "" "groups are omitted from the result." msgstr "" -#: library/exceptions.rst:991 +#: library/exceptions.rst:1000 msgid "" "The condition is checked for all exceptions in the nested exception group, " "including the top-level and any nested exception groups. If the condition is " "true for such an exception group, it is included in the result in full." msgstr "" -#: library/exceptions.rst:995 +#: library/exceptions.rst:1004 msgid "``condition`` can be any callable which is not a type object." msgstr "" -#: library/exceptions.rst:1000 +#: library/exceptions.rst:1009 msgid "" "Like :meth:`subgroup`, but returns the pair ``(match, rest)`` where " "``match`` is ``subgroup(condition)`` and ``rest`` is the remaining non-" "matching part." msgstr "" -#: library/exceptions.rst:1006 +#: library/exceptions.rst:1015 msgid "" "Returns an exception group with the same :attr:`message`, but which wraps " "the exceptions in ``excs``." msgstr "" -#: library/exceptions.rst:1009 +#: library/exceptions.rst:1018 msgid "" "This method is used by :meth:`subgroup` and :meth:`split`, which are used in " "various contexts to break up an exception group. A subclass needs to " @@ -1162,7 +1175,7 @@ msgid "" "instances of the subclass rather than :exc:`ExceptionGroup`." msgstr "" -#: library/exceptions.rst:1015 +#: library/exceptions.rst:1024 msgid "" ":meth:`subgroup` and :meth:`split` copy the :attr:`~BaseException." "__traceback__`, :attr:`~BaseException.__cause__`, :attr:`~BaseException." @@ -1171,7 +1184,7 @@ msgid "" "not need to be updated by :meth:`derive`." msgstr "" -#: library/exceptions.rst:1022 +#: library/exceptions.rst:1031 msgid "" ">>> class MyGroup(ExceptionGroup):\n" "... def derive(self, excs):\n" @@ -1200,7 +1213,7 @@ msgid "" "True" msgstr "" -#: library/exceptions.rst:1048 +#: library/exceptions.rst:1057 msgid "" "Note that :exc:`BaseExceptionGroup` defines :meth:`~object.__new__`, so " "subclasses that need a different constructor signature need to override that " @@ -1209,7 +1222,7 @@ msgid "" "group's message from it. ::" msgstr "" -#: library/exceptions.rst:1054 +#: library/exceptions.rst:1063 msgid "" "class Errors(ExceptionGroup):\n" " def __new__(cls, errors, exit_code):\n" @@ -1221,22 +1234,22 @@ msgid "" " return Errors(excs, self.exit_code)" msgstr "" -#: library/exceptions.rst:1063 +#: library/exceptions.rst:1072 msgid "" "Like :exc:`ExceptionGroup`, any subclass of :exc:`BaseExceptionGroup` which " "is also a subclass of :exc:`Exception` can only wrap instances of :exc:" "`Exception`." msgstr "" -#: library/exceptions.rst:1071 +#: library/exceptions.rst:1080 msgid "Exception hierarchy" msgstr "" -#: library/exceptions.rst:1073 +#: library/exceptions.rst:1082 msgid "The class hierarchy for built-in exceptions is:" msgstr "" -#: library/exceptions.rst:1075 +#: library/exceptions.rst:1084 msgid "" "BaseException\n" " ├── BaseExceptionGroup\n" diff --git a/library/faulthandler.po b/library/faulthandler.po index e2df9b770..0f47cb622 100644 --- a/library/faulthandler.po +++ b/library/faulthandler.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/fcntl.po b/library/fcntl.po index 3d217f252..33b7e1e47 100644 --- a/library/fcntl.po +++ b/library/fcntl.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,7 +21,7 @@ msgstr "" msgid ":mod:`!fcntl` --- The ``fcntl`` and ``ioctl`` system calls" msgstr "" -#: library/fcntl.rst:16 +#: library/fcntl.rst:15 msgid "" "This module performs file and I/O control on file descriptors. It is an " "interface to the :c:func:`fcntl` and :c:func:`ioctl` Unix routines. See the :" @@ -29,11 +29,11 @@ msgid "" "details." msgstr "" -#: library/fcntl.rst:21 +#: library/fcntl.rst:20 msgid "Availability" msgstr "" -#: library/fcntl.rst:23 +#: library/fcntl.rst:22 msgid "" "All functions in this module take a file descriptor *fd* as their first " "argument. This can be an integer file descriptor, such as returned by ``sys." @@ -42,20 +42,20 @@ msgid "" "file descriptor." msgstr "" -#: library/fcntl.rst:29 +#: library/fcntl.rst:28 msgid "" "Operations in this module used to raise an :exc:`IOError` where they now " "raise an :exc:`OSError`." msgstr "" -#: library/fcntl.rst:33 +#: library/fcntl.rst:32 msgid "" "The :mod:`!fcntl` module now contains ``F_ADD_SEALS``, ``F_GET_SEALS``, and " "``F_SEAL_*`` constants for sealing of :func:`os.memfd_create` file " "descriptors." msgstr "" -#: library/fcntl.rst:38 +#: library/fcntl.rst:37 msgid "" "On macOS, the :mod:`!fcntl` module exposes the ``F_GETPATH`` constant, which " "obtains the path of a file from a file descriptor. On Linux(>=3.15), the :" @@ -64,21 +64,21 @@ msgid "" "description locks." msgstr "" -#: library/fcntl.rst:45 +#: library/fcntl.rst:44 msgid "" "On Linux >= 2.6.11, the :mod:`!fcntl` module exposes the ``F_GETPIPE_SZ`` " "and ``F_SETPIPE_SZ`` constants, which allow to check and modify a pipe's " "size respectively." msgstr "" -#: library/fcntl.rst:50 +#: library/fcntl.rst:49 msgid "" "On FreeBSD, the :mod:`!fcntl` module exposes the ``F_DUP2FD`` and " "``F_DUP2FD_CLOEXEC`` constants, which allow to duplicate a file descriptor, " "the latter setting ``FD_CLOEXEC`` flag in addition." msgstr "" -#: library/fcntl.rst:55 +#: library/fcntl.rst:54 msgid "" "On Linux >= 4.5, the :mod:`fcntl` module exposes the ``FICLONE`` and " "``FICLONERANGE`` constants, which allow to share some data of one file with " @@ -86,7 +86,7 @@ msgid "" "XFS). This behavior is commonly referred to as \"copy-on-write\"." msgstr "" -#: library/fcntl.rst:61 +#: library/fcntl.rst:60 msgid "" "On Linux >= 2.6.32, the :mod:`!fcntl` module exposes the ``F_GETOWN_EX``, " "``F_SETOWN_EX``, ``F_OWNER_TID``, ``F_OWNER_PID``, ``F_OWNER_PGRP`` " @@ -107,11 +107,11 @@ msgid "" "and ``F_SETNOSIGPIPE`` constant." msgstr "" -#: library/fcntl.rst:82 +#: library/fcntl.rst:81 msgid "The module defines the following functions:" msgstr "" -#: library/fcntl.rst:87 +#: library/fcntl.rst:86 msgid "" "Perform the operation *cmd* on file descriptor *fd* (file objects providing " "a :meth:`~io.IOBase.fileno` method are accepted as well). The values used " @@ -123,13 +123,13 @@ msgid "" "documentation." msgstr "" -#: library/fcntl.rst:96 +#: library/fcntl.rst:95 msgid "" "When *arg* is an integer, the function returns the integer return value of " "the C :c:func:`fcntl` call." msgstr "" -#: library/fcntl.rst:99 +#: library/fcntl.rst:98 msgid "" "When the argument is bytes, it represents a binary structure, for example, " "created by :func:`struct.pack`. A string value is encoded to binary using " @@ -140,11 +140,11 @@ msgid "" "*arg* argument. This is limited to 1024 bytes." msgstr "" -#: library/fcntl.rst:108 +#: library/fcntl.rst:107 msgid "If the :c:func:`fcntl` call fails, an :exc:`OSError` is raised." msgstr "" -#: library/fcntl.rst:111 +#: library/fcntl.rst:110 msgid "" "If the type or the size of *arg* does not match the type or size of the " "argument of the operation (for example, if an integer is passed when a " @@ -153,19 +153,19 @@ msgid "" "in a segmentation violation or a more subtle data corruption." msgstr "" -#: library/fcntl.rst:118 +#: library/fcntl.rst:117 msgid "" "Raises an :ref:`auditing event ` ``fcntl.fcntl`` with arguments " "``fd``, ``cmd``, ``arg``." msgstr "" -#: library/fcntl.rst:123 +#: library/fcntl.rst:122 msgid "" "This function is identical to the :func:`~fcntl.fcntl` function, except that " "the argument handling is even more complicated." msgstr "" -#: library/fcntl.rst:126 +#: library/fcntl.rst:125 msgid "" "The *request* parameter is limited to values that can fit in 32-bits or 64-" "bits, depending on the platform. Additional constants of interest for use as " @@ -173,20 +173,20 @@ msgid "" "same names as used in the relevant C header files." msgstr "" -#: library/fcntl.rst:132 +#: library/fcntl.rst:131 msgid "" "The parameter *arg* can be an integer, a :term:`bytes-like object`, or a " "string. The type and size of *arg* must match the type and size of the " "argument of the operation as specified in the relevant C documentation." msgstr "" -#: library/fcntl.rst:137 +#: library/fcntl.rst:136 msgid "" "If *arg* does not support the read-write buffer interface or the " "*mutate_flag* is false, behavior is as for the :func:`~fcntl.fcntl` function." msgstr "" -#: library/fcntl.rst:141 +#: library/fcntl.rst:140 msgid "" "If *arg* supports the read-write buffer interface (like :class:`bytearray`) " "and *mutate_flag* is true (the default), then the buffer is (in effect) " @@ -198,12 +198,12 @@ msgid "" "`ioctl` and copied back into the supplied buffer." msgstr "" -#: library/fcntl.rst:150 +#: library/fcntl.rst:149 msgid "" "If the :c:func:`ioctl` call fails, an :exc:`OSError` exception is raised." msgstr "" -#: library/fcntl.rst:153 +#: library/fcntl.rst:152 msgid "" "If the type or size of *arg* does not match the type or size of the " "operation's argument (for example, if an integer is passed when a pointer is " @@ -213,11 +213,11 @@ msgid "" "more subtle data corruption." msgstr "" -#: library/fcntl.rst:161 +#: library/fcntl.rst:160 msgid "An example::" msgstr "" -#: library/fcntl.rst:163 +#: library/fcntl.rst:162 msgid "" ">>> import array, fcntl, struct, termios, os\n" ">>> os.getpgrp()\n" @@ -231,13 +231,13 @@ msgid "" "array('h', [13341])" msgstr "" -#: library/fcntl.rst:174 +#: library/fcntl.rst:173 msgid "" "Raises an :ref:`auditing event ` ``fcntl.ioctl`` with arguments " "``fd``, ``request``, ``arg``." msgstr "" -#: library/fcntl.rst:179 +#: library/fcntl.rst:178 msgid "" "Perform the lock operation *operation* on file descriptor *fd* (file objects " "providing a :meth:`~io.IOBase.fileno` method are accepted as well). See the " @@ -245,18 +245,18 @@ msgid "" "function is emulated using :c:func:`fcntl`.)" msgstr "" -#: library/fcntl.rst:184 +#: library/fcntl.rst:183 msgid "" "If the :c:func:`flock` call fails, an :exc:`OSError` exception is raised." msgstr "" -#: library/fcntl.rst:186 +#: library/fcntl.rst:185 msgid "" "Raises an :ref:`auditing event ` ``fcntl.flock`` with arguments " "``fd``, ``operation``." msgstr "" -#: library/fcntl.rst:191 +#: library/fcntl.rst:190 msgid "" "This is essentially a wrapper around the :func:`~fcntl.fcntl` locking calls. " "*fd* is the file descriptor (file objects providing a :meth:`~io.IOBase." @@ -264,25 +264,25 @@ msgid "" "*cmd* is one of the following values:" msgstr "" -#: library/fcntl.rst:198 +#: library/fcntl.rst:197 msgid "Release an existing lock." msgstr "" -#: library/fcntl.rst:202 +#: library/fcntl.rst:201 msgid "Acquire a shared lock." msgstr "" -#: library/fcntl.rst:206 +#: library/fcntl.rst:205 msgid "Acquire an exclusive lock." msgstr "" -#: library/fcntl.rst:210 +#: library/fcntl.rst:209 msgid "" "Bitwise OR with any of the other three ``LOCK_*`` constants to make the " "request non-blocking." msgstr "" -#: library/fcntl.rst:213 +#: library/fcntl.rst:212 msgid "" "If :const:`!LOCK_NB` is used and the lock cannot be acquired, an :exc:" "`OSError` will be raised and the exception will have an *errno* attribute " @@ -292,43 +292,43 @@ msgid "" "a file opened for writing." msgstr "" -#: library/fcntl.rst:220 +#: library/fcntl.rst:219 msgid "" "*len* is the number of bytes to lock, *start* is the byte offset at which " "the lock starts, relative to *whence*, and *whence* is as with :func:`io." "IOBase.seek`, specifically:" msgstr "" -#: library/fcntl.rst:224 +#: library/fcntl.rst:223 msgid "``0`` -- relative to the start of the file (:const:`os.SEEK_SET`)" msgstr "" -#: library/fcntl.rst:225 +#: library/fcntl.rst:224 msgid "``1`` -- relative to the current buffer position (:const:`os.SEEK_CUR`)" msgstr "" -#: library/fcntl.rst:226 +#: library/fcntl.rst:225 msgid "``2`` -- relative to the end of the file (:const:`os.SEEK_END`)" msgstr "" -#: library/fcntl.rst:228 +#: library/fcntl.rst:227 msgid "" "The default for *start* is 0, which means to start at the beginning of the " "file. The default for *len* is 0 which means to lock to the end of the " "file. The default for *whence* is also 0." msgstr "" -#: library/fcntl.rst:232 +#: library/fcntl.rst:231 msgid "" "Raises an :ref:`auditing event ` ``fcntl.lockf`` with arguments " "``fd``, ``cmd``, ``len``, ``start``, ``whence``." msgstr "" -#: library/fcntl.rst:234 +#: library/fcntl.rst:233 msgid "Examples (all on a SVR4 compliant system)::" msgstr "" -#: library/fcntl.rst:236 +#: library/fcntl.rst:235 msgid "" "import struct, fcntl, os\n" "\n" @@ -339,7 +339,7 @@ msgid "" "rv = fcntl.fcntl(f, fcntl.F_SETLKW, lockdata)" msgstr "" -#: library/fcntl.rst:244 +#: library/fcntl.rst:243 msgid "" "Note that in the first example the return value variable *rv* will hold an " "integer value; in the second example it will hold a :class:`bytes` object. " @@ -347,25 +347,25 @@ msgid "" "therefore using the :func:`flock` call may be better." msgstr "" -#: library/fcntl.rst:252 +#: library/fcntl.rst:251 msgid "Module :mod:`os`" msgstr "" -#: library/fcntl.rst:253 +#: library/fcntl.rst:252 msgid "" "If the locking flags :const:`~os.O_SHLOCK` and :const:`~os.O_EXLOCK` are " "present in the :mod:`os` module (on BSD only), the :func:`os.open` function " "provides an alternative to the :func:`lockf` and :func:`flock` functions." msgstr "" -#: library/fcntl.rst:10 +#: library/fcntl.rst:9 msgid "UNIX" msgstr "" -#: library/fcntl.rst:10 +#: library/fcntl.rst:9 msgid "file control" msgstr "" -#: library/fcntl.rst:10 +#: library/fcntl.rst:9 msgid "I/O control" msgstr "" diff --git a/library/filecmp.po b/library/filecmp.po index 25c8aea3f..aef412468 100644 --- a/library/filecmp.po +++ b/library/filecmp.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -70,8 +70,8 @@ msgstr "" #: library/filecmp.rst:41 msgid "" -"Compare the files in the two directories *dir1* and *dir2* whose names are " -"given by *common*." +"Compare the files in the two directories *a* and *b* whose names are given " +"by *common*." msgstr "" #: library/filecmp.rst:44 diff --git a/library/fileformats.po b/library/fileformats.po index 79a84f27f..36d507382 100644 --- a/library/fileformats.po +++ b/library/fileformats.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/fileinput.po b/library/fileinput.po index 063fe87ef..61c304b17 100644 --- a/library/fileinput.po +++ b/library/fileinput.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/filesys.po b/library/filesys.po index 0ac92c7e6..6f6653eb1 100644 --- a/library/filesys.po +++ b/library/filesys.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/fnmatch.po b/library/fnmatch.po index e0927a57d..32e696ad8 100644 --- a/library/fnmatch.po +++ b/library/fnmatch.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/fractions.po b/library/fractions.po index a33e8091e..d7ec3cc6b 100644 --- a/library/fractions.po +++ b/library/fractions.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/frameworks.po b/library/frameworks.po index b6d1fb7b9..91076e071 100644 --- a/library/frameworks.po +++ b/library/frameworks.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/ftplib.po b/library/ftplib.po index c20bd2f23..1d173d7c0 100644 --- a/library/ftplib.po +++ b/library/ftplib.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/functional.po b/library/functional.po index 095cbb2fe..d64eabc6a 100644 --- a/library/functional.po +++ b/library/functional.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/functions.po b/library/functions.po index 74faa1774..60f443e63 100644 --- a/library/functions.po +++ b/library/functions.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: 2025-11-27 09:00+0200\n" "Last-Translator: Panagiotis Skias \n" "Language-Team: PyGreece \n" @@ -527,11 +527,16 @@ msgstr "" "Εάν το πρόθεμα \"0b\" είναι επιθυμητό ή όχι, μπορείτε να χρησιμοποιήσετε " "έναν από τους παρακάτω τρόπους." -#: library/functions.rst:940 library/functions.rst:1321 +#: library/functions.rst:141 +msgid "" +"See also :func:`enum.bin` to represent negative values as twos-complement." +msgstr "" + +#: library/functions.rst:944 library/functions.rst:1325 msgid "See also :func:`format` for more information." msgstr "Δείτε επίσης τη :func:`format` για περισσότερες πληροφορίες." -#: library/functions.rst:146 +#: library/functions.rst:148 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 " @@ -548,11 +553,11 @@ msgstr "" "μπορεί να γίνει περαιτέρω υποκλάση. Οι μόνες περιπτώσεις είναι ``False`` " "και ``True`` (βλ. :ref:`typebool`)." -#: library/functions.rst:805 +#: library/functions.rst:809 msgid "The parameter is now positional-only." msgstr "Η παράμετρος είναι πλέον μόνο παράμετρος θέσης." -#: library/functions.rst:161 +#: library/functions.rst:163 msgid "" "This function drops you into the debugger at the call site. Specifically, " "it calls :func:`sys.breakpointhook`, passing ``args`` and ``kws`` straight " @@ -576,7 +581,7 @@ msgstr "" "σας. Εάν η :func:`sys.breakpointhook` δεν είναι προσβάσιμη, αυτή η συνάρτηση " "θα κάνει raise το :exc:`RuntimeError`." -#: library/functions.rst:173 +#: library/functions.rst:175 msgid "" "By default, the behavior of :func:`breakpoint` can be changed with the :" "envvar:`PYTHONBREAKPOINT` environment variable. See :func:`sys." @@ -586,7 +591,7 @@ msgstr "" "την μεταβλητή περιβάλλοντος :envvar:`PYTHONBREAKPOINT`. Βλ. την :func:`sys." "breakpointhook` για λεπτομέρειες χρήσης." -#: library/functions.rst:177 +#: library/functions.rst:179 msgid "" "Note that this is not guaranteed if :func:`sys.breakpointhook` has been " "replaced." @@ -594,7 +599,7 @@ msgstr "" "Λάβετε υπόψη ότι αυτό δεν είναι εγγυημένο εάν η :func:`sys.breakpointhook` " "έχει αντικατασταθεί." -#: library/functions.rst:180 +#: library/functions.rst:182 msgid "" "Raises an :ref:`auditing event ` ``builtins.breakpoint`` with " "argument ``breakpointhook``." @@ -602,7 +607,7 @@ msgstr "" "Εγείρει ένα :ref:`auditing event ` ``builtins.breakpoint`` με " "όρισμα ``breakpointhook``." -#: library/functions.rst:189 +#: library/functions.rst:191 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 " @@ -615,7 +620,7 @@ msgstr "" "περιγράφονται στο :ref:`typesseq-mutable`, καθώς και τις περισσότερες " "μεθόδους που έχει ο τύπος :class:`bytes`, δείτε :ref:`bytes-methods`." -#: library/functions.rst:194 +#: library/functions.rst:196 msgid "" "The optional *source* parameter can be used to initialize the array in a few " "different ways:" @@ -623,7 +628,7 @@ msgstr "" "Η προαιρετική παράμετρος *source* μπορεί να χρησιμοποιηθεί για την " "αρχικοποίηση του πίνακα με μερικούς διαφορετικούς τρόπους:" -#: library/functions.rst:197 +#: library/functions.rst:199 msgid "" "If it is a *string*, you must also give the *encoding* (and optionally, " "*errors*) parameters; :func:`bytearray` then converts the string to bytes " @@ -633,7 +638,7 @@ msgstr "" "προαιρετικά, *errors*)∙ η :func:`bytearray` στη συνέχεια μετατρέπει τη " "συμβολοσειρά σε byte χρησιμοποιώντας :meth:`str.encode`." -#: library/functions.rst:201 +#: library/functions.rst:203 msgid "" "If it is an *integer*, the array will have that size and will be initialized " "with null bytes." @@ -641,7 +646,7 @@ msgstr "" "Εάν είναι *integer*, ο πίνακας θα έχει αυτό το μέγεθος και θα αρχικοποιηθεί " "με null bytes." -#: library/functions.rst:204 +#: library/functions.rst:206 msgid "" "If it is an object conforming to the :ref:`buffer interface " "`, a read-only buffer of the object will be used to " @@ -651,7 +656,7 @@ msgstr "" "`, θα χρησιμοποιηθεί μια προσωρινή μνήμη μόνο για ανάγνωση " "του αντικείμενου για την προετοιμασία του πίνακα με τα bytes." -#: library/functions.rst:207 +#: library/functions.rst:209 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." @@ -659,15 +664,15 @@ msgstr "" "Εάν είναι *iterable*, πρέπει να είναι ένας iterable ακεραίων στο εύρος ``0 " "<= x < 256``, οι οποίοι χρησιμοποιούνται ως αρχικά περιεχόμενα του πίνακα." -#: library/functions.rst:210 +#: library/functions.rst:212 msgid "Without an argument, an array of size 0 is created." msgstr "Χωρίς όρισμα δημιουργείται ένας πίνακας μεγέθους 0." -#: library/functions.rst:212 +#: library/functions.rst:214 msgid "See also :ref:`binaryseq` and :ref:`typebytearray`." msgstr "Βλ. επίσης :ref:`binaryseq` και :ref:`typebytearray`." -#: library/functions.rst:220 +#: library/functions.rst:222 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 :" @@ -679,24 +684,24 @@ msgstr "" "αμετάβλητη έκδοση του :class:`bytearray` -- έχει τις ίδιες μεθόδους χωρίς " "μετάλλαξη και την ίδια συμπεριφορά ευρετηριοποίησης και τεμαχισμού." -#: library/functions.rst:225 +#: library/functions.rst:227 msgid "" "Accordingly, constructor arguments are interpreted as for :func:`bytearray`." msgstr "" "Συνεπώς, τα ορίσματα του constructor ερμηνεύονται ως :func:`bytearray`." -#: library/functions.rst:227 +#: library/functions.rst:229 msgid "Bytes objects can also be created with literals, see :ref:`strings`." msgstr "" "Τα αντικείμενα bytes μπορούν επίσης να δημιουργηθούν με literals, βλέπε :ref:" "`strings`." -#: library/functions.rst:229 +#: library/functions.rst:231 msgid "See also :ref:`binaryseq`, :ref:`typebytes`, and :ref:`bytes-methods`." msgstr "" "Βλέπε επίσης :ref:`binaryseq`, :ref:`typebytes`, και :ref:`bytes-methods`." -#: library/functions.rst:234 +#: library/functions.rst:236 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 " @@ -711,7 +716,7 @@ msgstr "" "μιας κλάσης επιστρέφει ένα νέο instance). Τα instances μπορούν να κληθούν αν " "η κλάση τους έχει τη μέθοδο :meth:`~object.__call__`." -#: library/functions.rst:240 +#: library/functions.rst:242 msgid "" "This function was first removed in Python 3.0 and then brought back in " "Python 3.2." @@ -719,7 +724,7 @@ msgstr "" "Αυτή η συνάρτηση πρώτα αφαιρέθηκε στην Python 3.0 και στη συνέχεια επανήλθε " "στην Python 3.2." -#: library/functions.rst:247 +#: library/functions.rst:249 msgid "" "Return the string representing a character with the specified Unicode code " "point. For example, ``chr(97)`` returns the string ``'a'``, while " @@ -730,7 +735,7 @@ msgstr "" "``'a'``, ενώ το ``chr(8364)`` επιστρέφει τη συμβολοσειρά ``'€'``. Αυτό είναι " "το αντίστροφο του :func:`ord`." -#: library/functions.rst:251 +#: library/functions.rst:253 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." @@ -738,11 +743,11 @@ msgstr "" "Το έγκυρο εύρος για το όρισμα είναι από 0 έως 1,114,111 (0x10FFFF στη βάση " "16). Το :exc:`ValueError` θα γίνει raise εάν είναι εκτός αυτού του εύρους." -#: library/functions.rst:257 +#: library/functions.rst:259 msgid "Transform a method into a class method." msgstr "Μετατροπή μιας μεθόδου σε μέθοδο κλάσης." -#: library/functions.rst:259 +#: library/functions.rst:261 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 " @@ -752,7 +757,7 @@ msgstr "" "instance μέθοδος λαμβάνει το instance. Για να δηλώσετε μια μέθοδο κλάσης, " "χρησιμοποιήστε αυτό το ιδίωμα::" -#: library/functions.rst:263 +#: library/functions.rst:265 msgid "" "class C:\n" " @classmethod\n" @@ -762,7 +767,7 @@ msgstr "" " @classmethod\n" " def f(cls, arg1, arg2): ..." -#: library/functions.rst:267 +#: library/functions.rst:269 msgid "" "The ``@classmethod`` form is a function :term:`decorator` -- see :ref:" "`function` for details." @@ -770,7 +775,7 @@ msgstr "" "Η φόρμα ``@classmethod`` είναι μια συνάρτηση :term:`decorator` -- βλέπε :ref:" "`function` για λεπτομέρειες." -#: library/functions.rst:270 +#: library/functions.rst:272 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 " @@ -782,7 +787,7 @@ msgstr "" "της. Εάν μια μέθοδος κλάσης καλείται για μια παραγόμενη κλάση, το " "αντικείμενο παραγόμενης κλάσης μεταβιβάζεται ως το υπονοούμενο πρώτο όρισμα." -#: library/functions.rst:275 +#: library/functions.rst:277 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 " @@ -792,7 +797,7 @@ msgstr "" "ανατρέξτε στο :func:`staticmethod` σε αυτήν την ενότητα. Για περισσότερες " "πληροφορίες σχετικά με τις μεθόδους κλάσης, ανατρέξτε στο :ref:`types`." -#: library/functions.rst:279 +#: library/functions.rst:281 msgid "" "Class methods can now wrap other :term:`descriptors ` such as :" "func:`property`." @@ -800,7 +805,7 @@ msgstr "" "Οι μέθοδοι κλάσης μπορούν πλέον να αναδιπλώσουν άλλους :term:`descriptors " "` όπως η :func:`property`." -#: library/functions.rst:283 +#: library/functions.rst:285 msgid "" "Class methods now inherit the method attributes (:attr:`~function." "__module__`, :attr:`~function.__name__`, :attr:`~function.__qualname__`, :" @@ -812,7 +817,7 @@ msgstr "" "__qualname__`, :attr:`~function.__doc__` and :attr:`~function." "__annotations__`) και έχουν ένα νέο χαρακτηριστικό ``__wrapped__``." -#: library/functions.rst:290 +#: library/functions.rst:292 msgid "" "Class methods can no longer wrap other :term:`descriptors ` such " "as :func:`property`." @@ -820,7 +825,7 @@ msgstr "" "Οι μέθοδοι κλάσης δεν μπορούν πλέον να κάνουν wrap άλλους :term:`descriptors " "` όπως :func:`property`." -#: library/functions.rst:297 +#: library/functions.rst:299 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 " @@ -833,7 +838,7 @@ msgstr "" "συμβολοσειρά AST αντικείμενου. Ανατρέξτε στην τεκμηρίωση του module :mod:" "`ast` για πληροφορίες σχετικά με τον τρόπο εργασίας με αντικείμενα AST." -#: library/functions.rst:302 +#: library/functions.rst:304 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 (``''`` " @@ -843,7 +848,7 @@ msgstr "" "κώδικας∙ να περάσει κάποια αναγνωρίσιμη τιμή εάν δεν διαβαστεί από ένα " "αρχείο (χρησιμοποιείται συνήθως ``''``)." -#: library/functions.rst:306 +#: library/functions.rst:308 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 " @@ -858,7 +863,7 @@ msgstr "" "θα εκτυπωθούν δηλώσεις έκφρασης που αξιολογούνται σε κάτι διαφορετικό από " "``None``)." -#: library/functions.rst:312 +#: library/functions.rst:314 msgid "" "The optional arguments *flags* and *dont_inherit* control which :ref:" "`compiler options ` should be activated and which :ref:" @@ -883,7 +888,7 @@ msgstr "" "ακέραιος, τότε το όρισμα *flags* είναι αυτό -- οι σημαίες (μελλοντικές " "δυνατότητες και επιλογές μεταγλωττιστή) στον περιβάλλοντα κώδικα αγνοούνται." -#: library/functions.rst:323 +#: library/functions.rst:325 msgid "" "Compiler options and future statements are specified by bits which can be " "bitwise ORed together to specify multiple options. The bitfield required to " @@ -900,7 +905,7 @@ msgstr "" "instance του module :mod:`__future__`. :ref:`Compiler flags ` μπορούν να βρεθούν στο module :mod:`ast`, με το πρόθεμα ``PyCF_``." -#: library/functions.rst:331 +#: library/functions.rst:333 msgid "" "The argument *optimize* specifies the optimization level of the compiler; " "the default value of ``-1`` selects the optimization level of the " @@ -915,16 +920,17 @@ msgstr "" "ισχυρισμοί καταργήθηκαν, το ``__debug__`` είναι ψευδές) ή ``2`` (οι " "συμβολοσειρές εγγραφών καταργήθηκαν επίσης)." -#: library/functions.rst:337 +#: library/functions.rst:339 +#, fuzzy msgid "" -"This function raises :exc:`SyntaxError` if the compiled source is invalid, " -"and :exc:`ValueError` if the source contains null bytes." +"This function raises :exc:`SyntaxError` or :exc:`ValueError` if the compiled " +"source is invalid." msgstr "" "Αυτή η συνάρτηση κάνει raise :exc:`SyntaxError` εάν ο μεταγλωττισμένος " "κώδικας είναι άκυρος, και το :exc:`ValueError` εάν ο κώδικας περιλαμβάνει " "null bytes." -#: library/functions.rst:340 +#: library/functions.rst:342 msgid "" "If you want to parse Python code into its AST representation, see :func:`ast." "parse`." @@ -932,7 +938,7 @@ msgstr "" "Εάν θέλετε να αναλύσετε τον κώδικα Python στην αναπαράσταση του AST, δείτε " "το :func:`ast.parse`." -#: library/functions.rst:345 +#: library/functions.rst:347 msgid "" "Raises an :ref:`auditing event ` ``compile`` with arguments " "``source`` and ``filename``. This event may also be raised by implicit " @@ -942,7 +948,7 @@ msgstr "" "``source`` και ``filename``. Αυτό το συμβάν μπορεί επίσης να προκύψει από " "έμμεση μεταγλώττιση." -#: library/functions.rst:351 +#: library/functions.rst:353 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 " @@ -955,7 +961,7 @@ msgstr "" "εντοπισμός μη ολοκληρωμένων και ολοκληρωμένων δηλώσεων στο module :mod:" "`code`." -#: library/functions.rst:358 +#: library/functions.rst:360 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 " @@ -965,7 +971,7 @@ msgstr "" "σύνθετη συμβολοσειρά κατά τη μεταγλώττιση σε ένα αντικείμενο AST λόγω " "περιορισμών βάθους στοίβας στον μεταγλωττιστή AST της Python." -#: library/functions.rst:362 +#: library/functions.rst:364 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." @@ -974,7 +980,7 @@ msgstr "" "λειτουργία ``'exec'`` δεν χρειάζεται πλέον να τελειώνει σε νέα γραμμή. " "Προστέθηκε η παράμετρος *optimize*." -#: library/functions.rst:366 +#: library/functions.rst:368 msgid "" "Previously, :exc:`TypeError` was raised when null bytes were encountered in " "*source*." @@ -982,7 +988,7 @@ msgstr "" "Προηγουμένως, το :exc:`TypeError` έγινε raise όταν null bytes συναντήθηκαν " "στο *source*." -#: library/functions.rst:370 +#: library/functions.rst:372 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``." @@ -991,7 +997,7 @@ msgstr "" "για να ενεργοποιηθεί η υποστήριξη για ``await``, ``async for``, και ``async " "with``." -#: library/functions.rst:379 +#: library/functions.rst:381 msgid "" "Convert a single string or number to a complex number, or create a complex " "number from real and imaginary parts." @@ -999,11 +1005,11 @@ msgstr "" "Μετατρέπει μια συμβολοσειρά ή έναν αριθμό σε έναν μιγαδικό αριθμό ή " "δημιουργεί έναν μιγαδικό αριθμός από πραγματικά και φανταστικά μέρη." -#: library/functions.rst:750 library/functions.rst:996 +#: library/functions.rst:754 library/functions.rst:1000 msgid "Examples:" msgstr "Παραδείγματα:" -#: library/functions.rst:384 +#: library/functions.rst:386 msgid "" ">>> complex('+1.23')\n" "(1.23+0j)\n" @@ -1039,7 +1045,7 @@ msgstr "" ">>> complex(-1.23, 4.5)\n" "(-1.23+4.5j)" -#: library/functions.rst:403 +#: library/functions.rst:405 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 " @@ -1067,7 +1073,7 @@ msgstr "" "ακόλουθη γραμματική, αφού αφαιρεθούν οι παρενθέσεις και οι χαρακτήρες του " "κενών διαστημάτων στο τέλος:" -#: library/functions.rst:422 +#: library/functions.rst:424 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``, " @@ -1083,7 +1089,7 @@ msgstr "" "`~object.__float__`. Εάν το :meth:`!__float__` δεν έχει οριστεί τότε " "επιστρέφει στο :meth:`~object.__index__`." -#: library/functions.rst:431 +#: library/functions.rst:433 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 " @@ -1102,20 +1108,20 @@ msgstr "" "imag`` και ``real.imag+imag.real``. Αν ένα από τα ορίσματα είναι πραγματικός " "αριθμός, χρησιμοποιείται μόνο το πραγματικό στοιχείο στις παραπάνω εκφράσεις." -#: library/functions.rst:441 +#: library/functions.rst:443 msgid "If all arguments are omitted, returns ``0j``." msgstr "Εάν παραληφθούν όλα τα ορίσματα, επιστρέφει ``0j``" -#: library/functions.rst:443 +#: library/functions.rst:445 msgid "The complex type is described in :ref:`typesnumeric`." msgstr "Ο μιγαδικός τύπος περιγράφεται στο :ref:`typesnumeric`." -#: library/functions.rst:802 library/functions.rst:1045 +#: library/functions.rst:806 library/functions.rst:1049 msgid "Grouping digits with underscores as in code literals is allowed." msgstr "" "Επιτρέπεται η ομαδοποίηση ψηφίων με κάτω παύλες όπως στα literals του κώδικα." -#: library/functions.rst:448 +#: library/functions.rst:450 msgid "" "Falls back to :meth:`~object.__index__` if :meth:`~object.__complex__` and :" "meth:`~object.__float__` are not defined." @@ -1123,7 +1129,7 @@ msgstr "" "Επιστρέφει πίσω στη :meth:`~object.__index__` εάν η :meth:`~object." "__complex__` και η :meth:`~object.__float__` δεν ορίζονται." -#: library/functions.rst:455 +#: library/functions.rst:457 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 " @@ -1139,16 +1145,17 @@ msgstr "" "foobar``. Το *name* δεν χρειάζεται να είναι αναγνωριστικό της Python (δείτε :" "func:`setattr`)." -#: library/functions.rst:468 +#: library/functions.rst:470 +#, fuzzy msgid "" "Create a new dictionary. The :class:`dict` object is the dictionary class. " -"See :class:`dict` and :ref:`typesmapping` for documentation about this class." +"See also :ref:`typesmapping` for documentation about this class." msgstr "" "Δημιουργεί ένα νέο λεξικό. Το αντικείμενο :class:`dict` είναι η κλάση " "λεξικού. Δείτε το :class:`dict` και το :ref:`typesmapping` για τεκμηρίωση " "σχετικά με αυτή την κατηγορία." -#: library/functions.rst:471 +#: library/functions.rst:473 msgid "" "For other containers see the built-in :class:`list`, :class:`set`, and :" "class:`tuple` classes, as well as the :mod:`collections` module." @@ -1156,7 +1163,7 @@ msgstr "" "Για άλλα containers, δείτε τις ενσωματωμένες κλάσεις :class:`list`, :class:" "`set`, και :class:`tuple`, καθώς και το module :mod:`collections`." -#: library/functions.rst:478 +#: library/functions.rst:480 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 " @@ -1166,7 +1173,7 @@ msgstr "" "ένα όρισμα, προσπαθεί να επιστρέψει μια λίστα έγκυρων χαρακτηριστικών για " "αυτό το αντικείμενο." -#: library/functions.rst:481 +#: library/functions.rst:483 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 " @@ -1180,7 +1187,7 @@ msgstr "" "func:`~object.__getattr__` or :func:`~object.__getattribute__` για την " "προσαρμογή του τρόπου με τον οποίο η :func:`dir` αναφέρει τα χαρακτηριστικά." -#: library/functions.rst:488 +#: library/functions.rst:490 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__` " @@ -1195,7 +1202,7 @@ msgstr "" "και μπορεί να είναι ανακριβής όταν το αντικείμενο έχει εξατομικευμένη :func:" "`~object.__getattr__`." -#: library/functions.rst:494 +#: library/functions.rst:496 msgid "" "The default :func:`dir` mechanism behaves differently with different types " "of objects, as it attempts to produce the most relevant, rather than " @@ -1205,7 +1212,7 @@ msgstr "" "διαφορετικούς τύπους αντικειμένων, καθώς προσπαθεί να παράγει τις πιο " "σχετικές και όχι τις πιο ολοκληρωμένες πληροφορίες:" -#: library/functions.rst:498 +#: library/functions.rst:500 msgid "" "If the object is a module object, the list contains the names of the " "module's attributes." @@ -1213,7 +1220,7 @@ msgstr "" "Εάν το αντικείμενο είναι module τύπου αντικειμένου, η λίστα περιέχει τα " "ονόματα των χαρακτηριστικών του module." -#: library/functions.rst:501 +#: library/functions.rst:503 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." @@ -1222,7 +1229,7 @@ msgstr "" "τα ονόματα των χαρακτηριστικών του, και αναδρομικά τα χαρακτηριστικά της " "βάσεώς του." -#: library/functions.rst:504 +#: library/functions.rst:506 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 " @@ -1232,11 +1239,11 @@ msgstr "" "αντικειμένου, τα ονόματα των χαρακτηριστικών της κλάσης, και αναδρομικά τα " "χαρακτηριστικά της κλάσης βάσεως της κλάσης." -#: library/functions.rst:508 +#: library/functions.rst:510 msgid "The resulting list is sorted alphabetically. For example:" msgstr "Η παραγόμενη λίστα είναι ταξινομημένη αλφαβητικά. Για παράδειγμα:" -#: library/functions.rst:528 +#: library/functions.rst:530 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 " @@ -1252,7 +1259,7 @@ msgstr "" "μετακλάσης δεν βρίσκονται στη λίστα αποτελεσμάτων όταν το όρισμα είναι μια " "κλάση." -#: library/functions.rst:538 +#: library/functions.rst:540 msgid "" "Take two (non-complex) numbers as arguments and return a pair of numbers " "consisting of their quotient and remainder when using integer division. " @@ -1274,7 +1281,7 @@ msgstr "" "b`` δεν είναι μηδενικό, έχει το ίδιο πρόσημο όπως το *b*, και ``0 <= abs(a % " "b) < abs(b)``." -#: library/functions.rst:550 +#: library/functions.rst:552 msgid "" "Return an enumerate object. *iterable* must be a sequence, an :term:" "`iterator`, or some other object which supports iteration. The :meth:" @@ -1289,11 +1296,11 @@ msgstr "" "περιέχει μια καταμέτρηση (από το *start* που είναι με προεπιλογή στο 0) και " "τις τιμές που λαμβάνονται από την επανάληψη πάνω στο *iterable*." -#: library/functions.rst:562 +#: library/functions.rst:564 msgid "Equivalent to::" msgstr "Ισοδύναμο με::" -#: library/functions.rst:564 +#: library/functions.rst:566 msgid "" "def enumerate(iterable, start=0):\n" " n = start\n" @@ -1311,15 +1318,15 @@ msgstr "" msgid "Parameters" msgstr "Παράμετροι" -#: library/functions.rst:574 +#: library/functions.rst:576 msgid "A Python expression." msgstr "Μια έκφραση Python." -#: library/functions.rst:578 +#: library/functions.rst:580 msgid "The global namespace (default: ``None``)." msgstr "Το καθολικό namespace (προεπιλογή: ``None``)." -#: library/functions.rst:582 +#: library/functions.rst:584 msgid "The local namespace (default: ``None``)." msgstr "Το τοπικό namespace (προεπιλογή: ``None``)." @@ -1327,7 +1334,7 @@ msgstr "Το τοπικό namespace (προεπιλογή: ``None``)." msgid "Returns" msgstr "Επιστρέφει" -#: library/functions.rst:586 +#: library/functions.rst:588 msgid "The result of the evaluated expression." msgstr "Το αποτέλεσμα της αξιολογούμενης έκφρασης" @@ -1335,31 +1342,33 @@ msgstr "Το αποτέλεσμα της αξιολογούμενης έκφρα msgid "raises" msgstr "κάνει raise" -#: library/functions.rst:587 +#: library/functions.rst:589 msgid "Syntax errors are reported as exceptions." msgstr "Τα συντακτικά σφάλματα αναφέρονται ως εξαιρέσεις" -#: library/functions.rst:652 +#: library/functions.rst:655 +#, fuzzy msgid "" -"This function executes arbitrary code. Calling it with user-supplied input " -"may lead to security vulnerabilities." +"This function executes arbitrary code. Calling it with untrusted user-" +"supplied input will lead to security vulnerabilities." msgstr "" "Αυτή η συνάρτηση εκτελεί αυθαίρετο κώδικα. Η κλήση της με είσοδο που " "παρέχεται από το χρήστη μπορεί να οδηγήσει σε ευπάθειες ασφαλείας." -#: library/functions.rst:594 +#: library/functions.rst:596 +#, fuzzy msgid "" -"The *expression* argument is parsed and evaluated as a Python expression " +"The *source* argument is parsed and evaluated as a Python expression " "(technically speaking, a condition list) using the *globals* and *locals* " "mappings as global and local namespace. If the *globals* dictionary is " "present and does not contain a value for the key ``__builtins__``, a " "reference to the dictionary of the built-in module :mod:`builtins` is " -"inserted under that key before *expression* is parsed. That way you can " -"control what builtins are available to the executed code by inserting your " -"own ``__builtins__`` dictionary into *globals* before passing it to :func:" -"`eval`. If the *locals* mapping is omitted it defaults to the *globals* " -"dictionary. If both mappings are omitted, the expression is executed with " -"the *globals* and *locals* in the environment where :func:`eval` is called. " +"inserted under that key before *source* is parsed. Overriding " +"``__builtins__`` can be used to restrict or change the available names, but " +"this is **not** a security mechanism: the executed code can still access all " +"builtins. If the *locals* mapping is omitted it defaults to the *globals* " +"dictionary. If both mappings are omitted, the source is executed with the " +"*globals* and *locals* in the environment where :func:`eval` is called. " "Note, *eval()* will only have access to the :term:`nested scopes ` (non-locals) in the enclosing environment if they are already " "referenced in the scope that is calling :func:`eval` (e.g. via a :keyword:" @@ -1382,11 +1391,11 @@ msgstr "" "χώρο ονομάτων που καλεί τη :func:`eval` (π.χ. μέσω μιας δήλωσης :keyword:" "`nonlocal`)." -#: library/functions.rst:610 +#: library/functions.rst:613 msgid "Example:" msgstr "Παράδειγμα:" -#: library/functions.rst:616 +#: library/functions.rst:619 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 " @@ -1400,7 +1409,7 @@ msgstr "" "ως το όρισμα *mode*, η επιστρεφόμενη τιμή του :func:`eval`\\'s θα είναι " "``None``." -#: library/functions.rst:621 +#: library/functions.rst:624 msgid "" "Hints: dynamic execution of statements is supported by the :func:`exec` " "function. The :func:`globals` and :func:`locals` functions return the " @@ -1412,7 +1421,7 @@ msgstr "" "τρέχον global και local λεξικό, αντίστοιχα, το οποίο μπορεί να είναι χρήσιμο " "για μεταβίβαση γύρω από τη χρήση από τις :func:`eval` ή :func:`exec`." -#: library/functions.rst:626 +#: library/functions.rst:629 msgid "" "If the given source is a string, then leading and trailing spaces and tabs " "are stripped." @@ -1420,15 +1429,16 @@ msgstr "" "Εάν η δεδομένη πηγή είναι μια συμβολοσειρά, τότε αφαιρούνται τα κενά και τα " "tabs που προηγούνται ή έπονται." -#: library/functions.rst:629 +#: library/functions.rst:632 +#, fuzzy msgid "" -"See :func:`ast.literal_eval` for a function that can safely evaluate strings " -"with expressions containing only literals." +"See :func:`ast.literal_eval` for a function to evaluate strings with " +"expressions containing only literals." msgstr "" "Βλ. τη :func:`ast.literal_eval` για μια συνάρτηση που μπορεί με ασφάλεια να " "αξιολογήσει τις συμβολοσειρές με εκφράσεις που περιέχουν μόνο literals." -#: library/functions.rst:634 library/functions.rst:696 +#: library/functions.rst:637 library/functions.rst:700 msgid "" "Raises an :ref:`auditing event ` ``exec`` with the code object as " "the argument. Code compilation events may also be raised." @@ -1436,13 +1446,13 @@ msgstr "" "Κάνει raise ένα :ref:`auditing event ` ``exec`` με το αντικείμενο " "κώδικα ως όρισμα. Μπορεί επίσης να εμφανιστούν συμβάντα μεταγλώττισης κώδικα." -#: library/functions.rst:716 +#: library/functions.rst:720 msgid "The *globals* and *locals* arguments can now be passed as keywords." msgstr "" "Τα ορίσματα *globals* και *locals* υποστηρίζονται πλέον και ως ορίσματα " "λέξεων-κλειδιών." -#: library/functions.rst:720 +#: library/functions.rst:724 msgid "" "The semantics of the default *locals* namespace have been adjusted as " "described for the :func:`locals` builtin." @@ -1450,7 +1460,7 @@ msgstr "" "Η σημασιολογία του προεπιλεγμένου ονόματος χώρου *locals* έχει τροποποιηθεί, " "όπως περιγράφεται για την ενσωματωμένη συνάρτηση :func:`locals`." -#: library/functions.rst:655 +#: library/functions.rst:658 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 " @@ -1474,7 +1484,7 @@ msgstr "" "συναρτήσεων, ακόμη και στο πλαίσιο του κώδικα που διαβιβάζεται στη :func:" "`exec`. Η επιστρεφόμενη τιμή είναι ``None``." -#: library/functions.rst:666 +#: library/functions.rst:669 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 " @@ -1491,7 +1501,7 @@ msgstr "" "είναι οποιοδήποτε αντικείμενο αντιστοίχισης. Να θυμάστε ότι σε επίπεδο " "module, τα globals και locals είναι το ίδιο λεξικό." -#: library/functions.rst:676 +#: library/functions.rst:679 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 " @@ -1506,13 +1516,14 @@ msgstr "" "επίπεδο (καθώς αυτές οι \"ανωτέρου επιπέδου\" μεταβλητές θεωρούνται ως " "μεταβλητές κλάσης, όπως συμβαίνει μέσα σε έναν ορισμό κλάσης)." -#: library/functions.rst:682 +#: library/functions.rst:685 +#, fuzzy 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:" -"`builtins` is inserted under that key. That way you can control what " -"builtins are available to the executed code by inserting your own " -"``__builtins__`` dictionary into *globals* before passing it to :func:`exec`." +"`builtins` is inserted under that key. Overriding ``__builtins__`` can be " +"used to restrict or change the available names, but this is **not** a " +"security mechanism: the executed code can still access all builtins." msgstr "" "Εάν το λεξικό *globals* δεν περιέχει τιμή για το κλειδί ``__builtins__``, " "μια αναφορά στο λεξικό του ενσωματωμένου module :mod:`builtins` εισάγεται " @@ -1521,7 +1532,7 @@ msgstr "" "το δικό σας ``__builtins__`` λεξικό στο *globals* πριν το διαβάσετε στο :" "func:`exec`." -#: library/functions.rst:688 +#: library/functions.rst:692 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) " @@ -1534,7 +1545,7 @@ msgstr "" "να ταιριάζει ακριβώς με το μήκος το χαρακτηριστικό :attr:`~codeobject." "co_freevars` του αντικειμένου κώδικα." -#: library/functions.rst:701 +#: library/functions.rst:705 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 " @@ -1544,7 +1555,7 @@ msgstr "" "το τρέχον χώρο ονομάτων global και local, αντίστοιχα, που μπορεί να είναι " "χρήσιμο για χρήση ως δεύτερο και τρίτο όρισμα στο :func:`exec`." -#: library/functions.rst:707 +#: library/functions.rst:711 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 " @@ -1555,11 +1566,11 @@ msgstr "" "επιδράσεις του κώδικα *locals* μετά την επιστροφή της συνάρτησης :func:" "`exec`." -#: library/functions.rst:711 +#: library/functions.rst:715 msgid "Added the *closure* parameter." msgstr "Προστέθηκε η παράμετρος *closure*." -#: library/functions.rst:726 +#: library/functions.rst:730 msgid "" "Construct an iterator from those elements of *iterable* for which *function* " "is true. *iterable* may be either a sequence, a container which supports " @@ -1572,7 +1583,7 @@ msgstr "" "*function* είναι ``None``, η συνάρτηση ταυτότητας υποτίθεται, δηλαδή, όλα τα " "στοιχεία του *iterable* που είναι ψευδή αφαιρούνται." -#: library/functions.rst:732 +#: library/functions.rst:736 msgid "" "Note that ``filter(function, iterable)`` is equivalent to the generator " "expression ``(item for item in iterable if function(item))`` if function is " @@ -1584,7 +1595,7 @@ msgstr "" "η συνάρτηση δεν είναι ``None`` και ``(item for item in iterable if item)`` " "εάν η συνάρτηση είναι ``None``." -#: library/functions.rst:737 +#: library/functions.rst:741 msgid "" "See :func:`itertools.filterfalse` for the complementary function that " "returns elements of *iterable* for which *function* is false." @@ -1592,13 +1603,13 @@ msgstr "" "Βλ. :func:`itertools.filterfalse` για τη συμπληρωματική συνάρτηση που " "επιστρέφει στοιχεία του *iterable* για τα οποία η *function* είναι ψευδής." -#: library/functions.rst:748 +#: library/functions.rst:752 msgid "Return a floating-point number constructed from a number or a string." msgstr "" "Επιστέφει έναν αριθμό κινητής υποδιαστολής που κατασκευάστηκε από έναν " "αριθμό ή μια συμβολοσειρά." -#: library/functions.rst:752 +#: library/functions.rst:756 msgid "" ">>> float('+1.23')\n" "1.23\n" @@ -1622,7 +1633,7 @@ msgstr "" ">>> float('-Infinity')\n" "-inf" -#: library/functions.rst:765 +#: library/functions.rst:769 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 " @@ -1642,7 +1653,7 @@ msgstr "" "token:`~float:floatvalue` στην ακόλουθη γραμματική, αφού αφαιρεθούν οι " "χαρακτήρες κενού διαστήματος που έπονται και προηγούνται:" -#: library/functions.rst:786 +#: library/functions.rst:790 msgid "" "Case is not significant, so, for example, \"inf\", \"Inf\", \"INFINITY\", " "and \"iNfINity\" are all acceptable spellings for positive infinity." @@ -1651,7 +1662,7 @@ msgstr "" "\"Inf\", \"INFINITY\", και \"iNfINity\" είναι όλες αποδεκτές ορθογραφίες για " "το θετικό άπειρο." -#: library/functions.rst:789 +#: library/functions.rst:793 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 " @@ -1663,7 +1674,7 @@ msgstr "" "ακρίβειας κινητής υποδιαστολής της Python). Εάν το όρισμα βρίσκεται εκτός " "του εύρους ενός float της Python θα γίνει raise ένα :exc:`OverflowError`." -#: library/functions.rst:794 +#: library/functions.rst:798 msgid "" "For a general Python object ``x``, ``float(x)`` delegates to ``x." "__float__()``. If :meth:`~object.__float__` is not defined then it falls " @@ -1673,15 +1684,15 @@ msgstr "" "__float__()``. Εάν το :meth:`~object.__float__` δεν έχει οριστεί, τότε " "επιστρέφει στο :meth:`~object.__index__`." -#: library/functions.rst:798 +#: library/functions.rst:802 msgid "If no argument is given, ``0.0`` is returned." msgstr "Εάν δεν δοθεί όρισμα, επιστρέφεται το ``0.0``." -#: library/functions.rst:800 +#: library/functions.rst:804 msgid "The float type is described in :ref:`typesnumeric`." msgstr "Ο τύπος float περιγράφεται στο :ref:`typesnumeric`." -#: library/functions.rst:808 +#: library/functions.rst:812 msgid "" "Falls back to :meth:`~object.__index__` if :meth:`~object.__float__` is not " "defined." @@ -1689,7 +1700,7 @@ msgstr "" "Επιστρέφει στο :meth:`~object.__index__` εάν το :meth:`~object.__float__` " "δεν έχει οριστεί." -#: library/functions.rst:818 +#: library/functions.rst:822 msgid "" "Convert a *value* to a \"formatted\" representation, as controlled by " "*format_spec*. The interpretation of *format_spec* will depend on the type " @@ -1702,7 +1713,7 @@ msgstr "" "χρησιμοποιείται από τους περισσότερους ενσωματωμένους τύπους: :ref:" "`formatspec`." -#: library/functions.rst:823 +#: library/functions.rst:827 msgid "" "The default *format_spec* is an empty string which usually gives the same " "effect as calling :func:`str(value) `." @@ -1710,7 +1721,7 @@ msgstr "" "Η προεπιλεγμένη *format_spec* είναι μια κενή συμβολοσειρά που συνήθως δίνει " "το ίδιο αποτέλεσμα με την κλήση του :func:`str(value) `." -#: library/functions.rst:826 +#: library/functions.rst:830 msgid "" "A call to ``format(value, format_spec)`` is translated to ``type(value)." "__format__(value, format_spec)`` which bypasses the instance dictionary when " @@ -1726,7 +1737,7 @@ msgstr "" "φτάσει στο :mod:`object` και το *format_spec* δεν είναι κενό ή εάν είτε το " "*format_spec* είτε η τιμή επιστροφής δεν είναι συμβολοσειρές." -#: library/functions.rst:833 +#: library/functions.rst:837 msgid "" "``object().__format__(format_spec)`` raises :exc:`TypeError` if " "*format_spec* is not an empty string." @@ -1734,18 +1745,19 @@ msgstr "" "Το ``object().__format__(format_spec)`` κάνει raise το :exc:`TypeError` εάν " "το *format_spec* δεν είναι κενή συμβολοσειρά." -#: library/functions.rst:842 +#: library/functions.rst:846 +#, fuzzy msgid "" "Return a new :class:`frozenset` object, optionally with elements taken from " -"*iterable*. ``frozenset`` is a built-in class. See :class:`frozenset` and :" -"ref:`types-set` for documentation about this class." +"*iterable*. :class:`frozenset` is a built-in class. See also :ref:`types-" +"set` for documentation about this class." msgstr "" "Επιστρέφει ένα νέο αντικείμενο :class:`frozenset`, προαιρετικά με στοιχεία " "που λαμβάνονται από το *iterable*. Το ``frozenset`` είναι μια ενσωματωμένη " "κλάση. Δείτε το :class:`frozenset` και το :ref:`types-set` για τεκμηρίωση " "αυτής της κλάσης." -#: library/functions.rst:846 +#: library/functions.rst:850 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." @@ -1754,7 +1766,7 @@ msgstr "" "class:`list`, :class:`tuple`, και :class:`dict`, καθώς και το module :mod:" "`collections`." -#: library/functions.rst:854 +#: library/functions.rst:858 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 " @@ -1772,7 +1784,7 @@ msgstr "" "`AttributeError`. Το *name* δεν χρειάζεται να είναι αναγνωριστικό Python " "(δείτε :func:`setattr`)." -#: library/functions.rst:863 +#: library/functions.rst:867 msgid "" "Since :ref:`private name mangling ` happens at " "compilation time, one must manually mangle a private attribute's (attributes " @@ -1784,7 +1796,7 @@ msgstr "" "χειροκίνητα το όνομα ενός ιδιωτικού χαρακτηριστικού (χαρακτηριστικά με δύο " "κορυφαίες υπογραμμίσεις) για να ανακτήσει με :func:`getattr`." -#: library/functions.rst:871 +#: library/functions.rst:875 msgid "" "Return the dictionary implementing the current module namespace. For code " "within functions, this is set when the function is defined and remains the " @@ -1794,7 +1806,7 @@ msgstr "" "κώδικα εντός συναρτήσεων, αυτό ορίζεται όταν ορίζεται η συνάρτηση και " "παραμένει το ίδιο ανεξάρτητη από το που καλείται η συνάρτηση." -#: library/functions.rst:878 +#: library/functions.rst:882 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. " @@ -1807,7 +1819,7 @@ msgstr "" "καλώντας το ``getattr(object, name)`` και να δούμε αν γίνεται raise ένα :exc:" "`AttributeError` ή όχι.)" -#: library/functions.rst:886 +#: library/functions.rst:890 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 " @@ -1820,7 +1832,7 @@ msgstr "" "αριθμητικές τιμές που συγκρίνονται ίσες έχουν την ίδια τιμή κατακερματισμού " "(ακόμα και αν είναι διαφορετικοί τύποι, όπως συμβαίνει για τα 1 και 1.0)." -#: library/functions.rst:893 +#: library/functions.rst:897 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." @@ -1829,7 +1841,7 @@ msgstr "" "σημειώστε ότι το :func:`hash` περικόπτει την τιμή επιστροφής με βάση το " "πλάτος bit του υπολογιστή." -#: library/functions.rst:900 +#: library/functions.rst:904 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 " @@ -1847,7 +1859,7 @@ msgstr "" "είναι οποιοδήποτε άλλο είδος αντικειμένου, δημιουργείται μια σελίδα βοήθειας " "στο αντικείμενο." -#: library/functions.rst:907 +#: library/functions.rst:911 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 " @@ -1859,14 +1871,14 @@ msgstr "" "την κάθετο είναι μόνο θέσης. Για περισσότερες πληροφορίες, βλέπε :ref:`the " "FAQ entry on positional-only parameters `." -#: library/functions.rst:912 +#: library/functions.rst:916 msgid "" "This function is added to the built-in namespace by the :mod:`site` module." msgstr "" "Αυτή η συνάρτηση προστίθεται στον ενσωματωμένο χώρο ονομάτων από το module :" "mod:`site`." -#: library/functions.rst:914 +#: library/functions.rst:918 msgid "" "Changes to :mod:`pydoc` and :mod:`inspect` mean that the reported signatures " "for callables are now more comprehensive and consistent." @@ -1874,7 +1886,7 @@ msgstr "" "Οι αλλαγές σε :mod:`pydoc` και :mod:`inspect` σημαίνουν ότι οι αναφερόμενες " "υπογραφές για callables είναι πλέον πιο ολοκληρωμένες και συνεπείς." -#: library/functions.rst:921 +#: library/functions.rst:925 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 " @@ -1885,7 +1897,7 @@ msgstr "" "της Python, πρέπει να ορίσει μια μέθοδο :meth:`~object.__index__` που " "επιστρέφει έναν ακέραιο. Μερικά παραδείγματα:" -#: library/functions.rst:930 +#: library/functions.rst:934 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 " @@ -1895,7 +1907,7 @@ msgstr "" "δεκαεξαδική συμβολοσειρά (string) με πρόθεμα ή όχι, μπορείτε να " "χρησιμοποιήσετε έναν από τους παρακάτω τρόπους:" -#: library/functions.rst:942 +#: library/functions.rst:946 msgid "" "See also :func:`int` for converting a hexadecimal string to an integer using " "a base of 16." @@ -1903,7 +1915,7 @@ msgstr "" "Δείτε επίσης τη :func:`int` για τη μετατροπή μιας δεκαεξαδικής συμβολοσειράς " "σε ακέραιο χρησιμοποιώντας μια βάση του 16." -#: library/functions.rst:947 +#: library/functions.rst:951 msgid "" "To obtain a hexadecimal string representation for a float, use the :meth:" "`float.hex` method." @@ -1911,7 +1923,7 @@ msgstr "" "Για να αποκτήσετε μια αναπαράσταση δεκαεξαδικής συμβολοσειράς για ένα float, " "χρησιμοποιήστε τη μέθοδο :meth:`float.hex`." -#: library/functions.rst:953 +#: library/functions.rst:957 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. " @@ -1923,11 +1935,11 @@ msgstr "" "αντικείμενο κατά τη διάρκεια της ζωής του. Δύο αντικείμενα με μη " "επικαλυπτόμενες διάρκειες ζωής μπορεί να έχουν την ίδια τιμή :func:`id`." -#: library/functions.rst:958 +#: library/functions.rst:962 msgid "This is the address of the object in memory." msgstr "Αυτό είναι η διεύθυνση του αντικειμένου στην μνήμη." -#: library/functions.rst:960 +#: library/functions.rst:964 msgid "" "Raises an :ref:`auditing event ` ``builtins.id`` with argument " "``id``." @@ -1935,7 +1947,7 @@ msgstr "" "Εγείρει ένα :ref:`auditing event ` ``builtins.id`` με όρισμα " "``id``." -#: library/functions.rst:966 +#: library/functions.rst:970 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, " @@ -1948,7 +1960,7 @@ msgstr "" "γραμμής) και την επιστρέφει. Όταν διαβάζεται το EOF, γίνεται raise η :exc:" "`EOFError`. Παράδειγμα::" -#: library/functions.rst:971 +#: library/functions.rst:975 msgid "" ">>> s = input('--> ')\n" "--> Monty Python's Flying Circus\n" @@ -1960,7 +1972,7 @@ msgstr "" ">>> s\n" "\"Monty Python's Flying Circus\"" -#: library/functions.rst:976 +#: library/functions.rst:980 msgid "" "If the :mod:`readline` module was loaded, then :func:`input` will use it to " "provide elaborate line editing and history features." @@ -1969,7 +1981,7 @@ msgstr "" "χρησιμοποιήσει για να παρέχει περίπλοκες λειτουργίες επεξεργασίας γραμμής " "και ιστορικού." -#: library/functions.rst:981 +#: library/functions.rst:985 msgid "" "Raises an :ref:`auditing event ` ``builtins.input`` with argument " "``prompt`` before reading input" @@ -1977,7 +1989,7 @@ msgstr "" "Κάνει raise ένα :ref:`auditing event ` ``builtins.input`` με " "όρισμα ``prompt`` προτού διαβάσει την είσοδο" -#: library/functions.rst:986 +#: library/functions.rst:990 msgid "" "Raises an :ref:`auditing event ` ``builtins.input/result`` with " "the result after successfully reading input." @@ -1985,7 +1997,7 @@ msgstr "" "Κάνει raise ένα :ref:`auditing event ` ``builtins.input/result`` " "με το αποτέλεσμα μετά την επιτυχή ανάγνωση των δεδομένων." -#: library/functions.rst:993 +#: library/functions.rst:997 msgid "" "Return an integer object constructed from a number or a string, or return " "``0`` if no arguments are given." @@ -1993,7 +2005,7 @@ msgstr "" "Επιστέφει έναν αριθμό κινητής υποδιαστολής που κατασκευάστηκε από έναν " "αριθμό ή μια συμβολοσειρά, ή επιστρέφει ``0`` εάν δεν δίνεται κάποιο όρισμα." -#: library/functions.rst:998 +#: library/functions.rst:1002 msgid "" ">>> int(123.45)\n" "123\n" @@ -2021,7 +2033,7 @@ msgstr "" ">>> int('01110011', base=2)\n" "115" -#: library/functions.rst:1013 +#: library/functions.rst:1017 msgid "" "If the argument defines :meth:`~object.__int__`, ``int(x)`` returns ``x." "__int__()``. If the argument defines :meth:`~object.__index__`, it returns " @@ -2035,7 +2047,7 @@ msgstr "" "επιστρέφει ``x.__trunc__()``. Για αριθμούς κινητής υποδιαστολής, αυτό " "περικόπτεται προς το μηδέν." -#: library/functions.rst:1019 +#: library/functions.rst:1023 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 " @@ -2050,7 +2062,7 @@ msgstr "" "μηδενικά, να περιβάλλεται από κενό διάστημα και να έχει μονές υπογραμμίσεις " "διάσπαρτες μεταξύ των ψηφίων." -#: library/functions.rst:1025 +#: library/functions.rst:1029 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 " @@ -2076,11 +2088,11 @@ msgstr "" "βάση 0 δεν επιτρέπει επίσης τα μηδενικά στην αρχή : ``int('010', 0)`` δεν " "είναι εφικτό, ενώ το ``int('010')`` και ``int('010', 8)`` είναι." -#: library/functions.rst:1036 +#: library/functions.rst:1040 msgid "The integer type is described in :ref:`typesnumeric`." msgstr "Ο ακέραιος τύπος περιγράφεται στο :ref:`typesnumeric`." -#: library/functions.rst:1038 +#: library/functions.rst:1042 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 " @@ -2093,11 +2105,11 @@ msgstr "" "εκδόσεις χρησιμοποιούσαν την :meth:`base.__int__ ` αντί της :" "meth:`base.__index__ `." -#: library/functions.rst:1048 +#: library/functions.rst:1052 msgid "The first parameter is now positional-only." msgstr "Η πρώτη παράμετρος είναι πλέον μόνο θέσεως." -#: library/functions.rst:1051 +#: library/functions.rst:1055 msgid "" "Falls back to :meth:`~object.__index__` if :meth:`~object.__int__` is not " "defined." @@ -2105,11 +2117,11 @@ msgstr "" "Επιστρέφει πίσω στη :meth:`~object.__index__` αν η :meth:`~object.__int__` " "δεν έχει οριστεί." -#: library/functions.rst:1054 +#: library/functions.rst:1058 msgid "The delegation to :meth:`~object.__trunc__` is deprecated." msgstr "Η ανάθεση στη :meth:`~object.__trunc__` έχει καταργηθεί." -#: library/functions.rst:1057 +#: library/functions.rst:1061 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 " @@ -2125,7 +2137,7 @@ msgstr "" "class:`int` σε μια συμβολοσειρά θα υπερβεί το όριο. Δείτε την τεκμηρίωση :" "ref:`integer string conversion length limitation `." -#: library/functions.rst:1068 +#: library/functions.rst:1072 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 " @@ -2170,7 +2182,7 @@ msgstr "" "καταχώρισης στο *classinfo*. Σε οποιαδήποτε άλλη περίπτωση, γίνεται raise " "μια εξαίρεση :exc:`TypeError`." -#: library/functions.rst:1100 +#: library/functions.rst:1104 msgid "" "Return an :term:`iterator` object. The first argument is interpreted very " "differently depending on the presence of the second argument. Without a " @@ -2199,11 +2211,11 @@ msgstr "" "επιστρέφεται είναι ίση με το *sentinel*, θα γίνει raise η :exc:" "`StopIteration`, διαφορετικά η τιμή θα επιστραφεί." -#: library/functions.rst:1114 +#: library/functions.rst:1118 msgid "See also :ref:`typeiter`." msgstr "Δείτε επίσης :ref:`typeiter`." -#: library/functions.rst:1116 +#: library/functions.rst:1120 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 " @@ -2213,7 +2225,7 @@ msgstr "" "ενός block-reader. Για παράδειγμα, η ανάγνωση μπλοκ σταθερού πλάτους από ένα " "δυαδικό αρχείο βάσης δεδομένων μέχρι να φτάσει στο τέλος του αρχείου::" -#: library/functions.rst:1120 +#: library/functions.rst:1124 msgid "" "from functools import partial\n" "with open('mydata.db', 'rb') as f:\n" @@ -2225,7 +2237,7 @@ msgstr "" " for block in iter(partial(f.read, 64), b''):\n" " process_block(block)" -#: library/functions.rst:1128 +#: library/functions.rst:1132 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 " @@ -2236,7 +2248,7 @@ msgstr "" "πλειάδα, λίστα, ή εύρος) ή μια συλλογή (όπως ένα λεξικό, ένα σετ, ή ένα " "παγωμένο σετ)." -#: library/functions.rst:1134 +#: library/functions.rst:1138 msgid "" "``len`` raises :exc:`OverflowError` on lengths larger than :data:`sys." "maxsize`, such as :class:`range(2 ** 100) `." @@ -2244,7 +2256,7 @@ msgstr "" "Το ``len`` κάνει raise μια :exc:`OverflowError` σε μήκη τα οποία είναι " "μεγαλύτερα από :data:`sys.maxsize`, όπως :class:`range(2 ** 100) `." -#: library/functions.rst:1142 +#: library/functions.rst:1146 msgid "" "Rather than being a function, :class:`list` is actually a mutable sequence " "type, as documented in :ref:`typesseq-list` and :ref:`typesseq`." @@ -2253,7 +2265,7 @@ msgstr "" "μεταβλητός τύπος ακολουθίας, όπως τεκμηριώνεται στα :ref:`typesseq-list` " "και :ref:`typesseq`." -#: library/functions.rst:1148 +#: library/functions.rst:1152 msgid "" "Return a mapping object representing the current local symbol table, with " "variable names as the keys, and their currently bound references as the " @@ -2263,7 +2275,7 @@ msgstr "" "πίνακα συμβόλων, με τα ονόματα μεταβλητών ως κλειδιά και τις αντίστοιχες " "τιμές στις οποίες είναι δεσμευμένες ως τιμές." -#: library/functions.rst:1152 +#: library/functions.rst:1156 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:" @@ -2273,7 +2285,7 @@ msgstr "" "`eval` με έναν μόνο χώρο ονομάτων, αυτή η συνάρτηση επιστρέφει τον ίδιο χώρο " "ονομάτων με τη :func:`globals`." -#: library/functions.rst:1156 +#: library/functions.rst:1160 msgid "" "At class scope, it returns the namespace that will be passed to the " "metaclass constructor." @@ -2281,7 +2293,7 @@ msgstr "" "Στο πεδίο ορισμού κλάσης, επιστρέφει τον χώρο ονομάτων που θα περαστεί στον " "κατασκευαστή της μετακλάσης." -#: library/functions.rst:1159 +#: library/functions.rst:1163 msgid "" "When using ``exec()`` or ``eval()`` with separate local and global " "arguments, it returns the local namespace passed in to the function call." @@ -2290,7 +2302,7 @@ msgstr "" "global ορίσματα, επιστρέφει στον τοπικό χώρο ονομάτων που περάστηκε στην " "κλήση της συνάρτησης." -#: library/functions.rst:1162 +#: library/functions.rst:1166 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 " @@ -2307,7 +2319,7 @@ msgstr "" "επανακαθορισμός ή διαγραφή τοπικών μεταβλητών θα επηρεάζει άμεσα τα " "περιεχόμενα του επιστρεφόμενου αντικειμένου αντιστοίχισης." -#: library/functions.rst:1169 +#: library/functions.rst:1173 msgid "" "In an :term:`optimized scope` (including functions, generators, and " "coroutines), each call to ``locals()`` instead returns a fresh dictionary " @@ -2328,7 +2340,7 @@ msgstr "" "τοπικών ή μη τοπικών μεταβλητών *δεν* επηρεάζει το περιεχόμενο των λεξικών " "που είχαν επιστραφεί προηγουμένως." -#: library/functions.rst:1178 +#: library/functions.rst:1182 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 " @@ -2343,7 +2355,7 @@ msgstr "" "στο αποτέλεσμα. Σε άλλα πεδία ορατότητας, η συμπεριφορά είναι σαν η σύμπτυξη " "να εκτελείται ως μια εμφωλευμένη συνάρτηση." -#: library/functions.rst:1184 +#: library/functions.rst:1188 msgid "" "Calling ``locals()`` as part of a generator expression is equivalent to " "calling it in a nested generator function." @@ -2351,7 +2363,7 @@ msgstr "" "Καλώντας την ``locals()`` ως μέρος μιας έκφρασης γεννήτριας είναι ισοδύναμη " "με την κλήση της μέσα σε μια εμφωλευμένη συνάρτηση γεννήτριας." -#: library/functions.rst:1187 +#: library/functions.rst:1191 msgid "" "The behaviour of ``locals()`` in a comprehension has been updated as " "described in :pep:`709`." @@ -2359,7 +2371,7 @@ msgstr "" "Η συμπεριφορά της ``locals()`` μέσα σε μια έκφραση σύμπτυξης έχει ενημερωθεί " "όπως περιγράφεται στην :pep:`709`." -#: library/functions.rst:1191 +#: library/functions.rst:1195 msgid "" "As part of :pep:`667`, the semantics of mutating the mapping objects " "returned from this function are now defined. The behavior in :term:" @@ -2374,7 +2386,7 @@ msgstr "" "ορισμένη, η συμπεριφορά σε άλλα πεδία παραμένει αμετάβλητη σε σχέση με " "προηγούμενες εκδόσεις." -#: library/functions.rst:1201 +#: library/functions.rst:1205 msgid "" "Return an iterator that applies *function* to every item of *iterable*, " "yielding the results. If additional *iterables* arguments are passed, " @@ -2391,7 +2403,7 @@ msgstr "" "όπου οι είσοδοι συνάρτησης είναι ήδη διατεταγμένες σε πλειάδες ορισμάτων, " "βλέπε :func:`itertools.starmap`\\." -#: library/functions.rst:1213 +#: library/functions.rst:1217 msgid "" "Return the largest item in an iterable or the largest of two or more " "arguments." @@ -2399,7 +2411,7 @@ msgstr "" "Επιστρέφει το μεγαλύτερο στοιχείο σε ένα iterable ή το μεγαλύτερο από δύο ή " "περισσότερα ορίσματα." -#: library/functions.rst:1216 +#: library/functions.rst:1220 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 " @@ -2409,7 +2421,7 @@ msgstr "" "Επιστρέφεται το μεγαλύτερο στοιχείο στο iterable. Εάν παρέχονται δύο ή " "περισσότερα ορίσματα θέσης, επιστρέφεται το μεγαλύτερο από τα ορίσματα θέσης." -#: library/functions.rst:1259 +#: library/functions.rst:1263 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 " @@ -2424,7 +2436,7 @@ msgstr "" "είναι κενό και το *default* δεν παρέχεται, γίνεται raise μια :exc:" "`ValueError`." -#: library/functions.rst:1227 +#: library/functions.rst:1231 msgid "" "If multiple items are maximal, the function returns the first one " "encountered. This is consistent with other sort-stability preserving tools " @@ -2436,15 +2448,15 @@ msgstr "" "ταξινόμησης όπως ``sorted(iterable, key=keyfunc, reverse=True)[0]`` και " "``heapq.nlargest(1, iterable, key=keyfunc)``." -#: library/functions.rst:1270 +#: library/functions.rst:1274 msgid "Added the *default* keyword-only parameter." msgstr "Προστέθηκε η παράμετρος μόνο λέξης-κλειδί *default*." -#: library/functions.rst:1273 +#: library/functions.rst:1277 msgid "The *key* can be ``None``." msgstr "Το *key* μπορεί να είναι ``None``." -#: library/functions.rst:1243 +#: library/functions.rst:1247 msgid "" "Return a \"memory view\" object created from the given argument. See :ref:" "`typememoryview` for more information." @@ -2453,7 +2465,7 @@ msgstr "" "συγκεκριμένο όρισμα. Βλέπε :ref:`typememoryview` για περισσότερες " "λεπτομέρειες." -#: library/functions.rst:1251 +#: library/functions.rst:1255 msgid "" "Return the smallest item in an iterable or the smallest of two or more " "arguments." @@ -2461,7 +2473,7 @@ msgstr "" "Επιστρέφει το μικρότερο στοιχείο σε έναν iterable ή το μικρότερο από δύο ή " "περισσότερα ορίσματα." -#: library/functions.rst:1254 +#: library/functions.rst:1258 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 " @@ -2471,7 +2483,7 @@ msgstr "" "Επιστρέφει το μικρότερο στοιχείο στον iterable. Εάν παρέχονται δύο ή " "περισσότερα ορίσματα θέσης, επιστρέφεται το μικρότερο από τα ορίσματα θέσης." -#: library/functions.rst:1265 +#: library/functions.rst:1269 msgid "" "If multiple items are minimal, the function returns the first one " "encountered. This is consistent with other sort-stability preserving tools " @@ -2483,7 +2495,7 @@ msgstr "" "ταξινόμησης, όπως ``sorted(iterable, key=keyfunc)[0]`` και ``heapq." "nsmallest(1, iterable, key=keyfunc)``." -#: library/functions.rst:1280 +#: library/functions.rst:1284 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 " @@ -2493,7 +2505,7 @@ msgstr "" "meth:`~iterator.__next__`. Εάν δοθεί *default*, επιστρέφεται εάν ο iterator " "έχει εξαντληθεί, διαφορετικά γίνεται raise μια :exc:`StopIteration`." -#: library/functions.rst:1287 +#: library/functions.rst:1291 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 " @@ -2505,7 +2517,7 @@ msgstr "" "κατασκευαστής, επιστρέφει ένα νέο αντικείμενο χωρίς χαρακτηριστικά. Ο " "κατασκευαστής δεν δέχεται ορίσματα." -#: library/functions.rst:1294 +#: library/functions.rst:1298 msgid "" ":class:`object` instances do *not* have :attr:`~object.__dict__` attributes, " "so you can't assign arbitrary attributes to an instance of :class:`object`." @@ -2514,7 +2526,7 @@ msgstr "" "__dict__`, επομένως δεν μπορείτε να εκχωρήσετε αυθαίρετα χαρακτηριστικά σε " "ένα στιγμιότυπο του :class:`object`." -#: library/functions.rst:1301 +#: library/functions.rst:1305 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:" @@ -2526,7 +2538,7 @@ msgstr "" "είναι ένα αντικείμενο :class:`int` της Python, πρέπει να ορίζει μια μέθοδο :" "meth:`~object.__index__` που επιστρέφει έναν ακέραιο." -#: library/functions.rst:1311 +#: library/functions.rst:1315 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." @@ -2535,7 +2547,7 @@ msgstr "" "με το πρόθεμα \"0o\" είτε όχι, μπορείτε να χρησιμοποιήσετε έναν από τους " "παρακάτω τρόπους." -#: library/functions.rst:1328 +#: library/functions.rst:1332 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 " @@ -2545,7 +2557,7 @@ msgstr "" "αρχείο δεν μπορεί να ανοίξει, γίνεται raise μια :exc:`OSError`. Δείτε το :" "ref:`tut-files` για περισσότερα παραδείγματα χρήσης αυτής της συνάρτησης." -#: library/functions.rst:1332 +#: library/functions.rst:1336 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 " @@ -2560,7 +2572,7 @@ msgstr "" "επιστρεφόμενο αντικείμενο I/O είναι κλειστό εκτός εάν *closefd* έχει οριστεί " "ως ``False``.)" -#: library/functions.rst:1338 +#: library/functions.rst:1342 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. " @@ -2587,72 +2599,72 @@ msgstr "" "λειτουργία και αφήνουν το *encoding* απροσδιόριστο.) Οι διαθέσιμες " "λειτουργίες είναι:" -#: library/functions.rst:1355 +#: library/functions.rst:1359 msgid "Character" msgstr "Χαρακτήρας" -#: library/functions.rst:1355 +#: library/functions.rst:1359 msgid "Meaning" msgstr "Έννοια" -#: library/functions.rst:1357 +#: library/functions.rst:1361 msgid "``'r'``" msgstr "``'r'``" -#: library/functions.rst:1357 +#: library/functions.rst:1361 msgid "open for reading (default)" msgstr "άνοιγμα για ανάγνωση (default)" -#: library/functions.rst:1358 +#: library/functions.rst:1362 msgid "``'w'``" msgstr "``'w'``" -#: library/functions.rst:1358 +#: library/functions.rst:1362 msgid "open for writing, truncating the file first" msgstr "άνοιγμα για εγγραφή, περικόπτοντας πρώτα το αρχείο" -#: library/functions.rst:1359 +#: library/functions.rst:1363 msgid "``'x'``" msgstr "``'x'``" -#: library/functions.rst:1359 +#: library/functions.rst:1363 msgid "open for exclusive creation, failing if the file already exists" msgstr "" "άνοιγμα για αποκλειστική δημιουργία, αποτυγχάνοντας εάν το αρχείο υπάρχει ήδη" -#: library/functions.rst:1360 +#: library/functions.rst:1364 msgid "``'a'``" msgstr "``'a'``" -#: library/functions.rst:1360 +#: library/functions.rst:1364 msgid "open for writing, appending to the end of file if it exists" msgstr "άνοιγμα για εγγραφή, προσαρτάται στο τέλος του αρχείου εάν υπάρχει" -#: library/functions.rst:1361 +#: library/functions.rst:1365 msgid "``'b'``" msgstr "``'b'``" -#: library/functions.rst:1505 +#: library/functions.rst:1509 msgid "binary mode" msgstr "δυαδική (binary) λειτουργία" -#: library/functions.rst:1362 +#: library/functions.rst:1366 msgid "``'t'``" msgstr "``'t'``" -#: library/functions.rst:1362 +#: library/functions.rst:1366 msgid "text mode (default)" msgstr "λειτουργία κειμένου (default)" -#: library/functions.rst:1363 +#: library/functions.rst:1367 msgid "``'+'``" msgstr "``'+'``" -#: library/functions.rst:1363 +#: library/functions.rst:1367 msgid "open for updating (reading and writing)" msgstr "άνοιγμα για ενημέρωση (ανάγνωση και εγγραφή)" -#: library/functions.rst:1366 +#: library/functions.rst:1370 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 " @@ -2663,7 +2675,7 @@ msgstr "" "περικόβει το αρχείο. Οι λειτουργίες ``'r+'`` and ``'r+b'`` ανοίγουν το " "αρχείο χωρίς περικοπή." -#: library/functions.rst:1370 +#: library/functions.rst:1374 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* " @@ -2682,7 +2694,7 @@ msgstr "" "bytes έχουν πρώτα αποκωδικοποιηθεί χρησιμοποιώντας μια εξαρτώμενη από " "πλατφόρμα κωδικοποίηση ή χρήση της καθορισμένης *κωδικοποίησης* εάν δίνεται." -#: library/functions.rst:1380 +#: library/functions.rst:1384 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 " @@ -2692,7 +2704,7 @@ msgstr "" "λειτουργικού συστήματος∙ όλη η επεξεργασία γίνεται από την ίδια την Python " "και επομένως είναι ανεξάρτητη από την πλατφόρμα." -#: library/functions.rst:1384 +#: library/functions.rst:1388 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 " @@ -2719,7 +2731,7 @@ msgstr "" "δίνεται όρισμα *buffering*, η προεπιλεγμένη πολιτική προσωρινής αποθήκευσης " "λειτουργεί ως εξής:" -#: library/functions.rst:1394 +#: library/functions.rst:1398 msgid "" "Binary files are buffered in fixed-size chunks; the size of the buffer is " "chosen using a heuristic trying to determine the underlying device's \"block " @@ -2732,7 +2744,7 @@ msgstr "" "και επανέρχεται σε :const:`io.DEFAULT_BUFFER_SIZE`. Σε πολλά συστήματα, η " "προσωρινή μνήμη θα έχει συνήθως μήκος 4096 ή 8192 bytes." -#: library/functions.rst:1399 +#: library/functions.rst:1403 msgid "" "\"Interactive\" text files (files for which :meth:`~io.IOBase.isatty` " "returns ``True``) use line buffering. Other text files use the policy " @@ -2743,7 +2755,7 @@ msgstr "" "κειμένου χρησιμοποιούν την πολιτική που περιγράφεται παραπάνω για δυαδικά " "αρχεία." -#: library/functions.rst:1403 +#: library/functions.rst:1407 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 " @@ -2758,7 +2770,7 @@ msgstr "" "οποιοδήποτε :term:`text encoding` που υποστηρίζεται από την Python. Δείτε το " "module :mod:`codecs` για τη λίστα των υποστηριζόμενων κωδικοποιήσεων." -#: library/functions.rst:1409 +#: library/functions.rst:1413 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 " @@ -2774,7 +2786,7 @@ msgstr "" "το :func:`codecs.register_error` είναι επίσης έγκυρο. Τα τυπικά ονόματα " "περιλαμβάνουν:" -#: library/functions.rst:1417 +#: library/functions.rst:1421 msgid "" "``'strict'`` to raise a :exc:`ValueError` exception if there is an encoding " "error. The default value of ``None`` has the same effect." @@ -2783,7 +2795,7 @@ msgstr "" "σφάλμα κωδικοποίησης. Η προεπιλεγμένη τιμή του ``None`` έχει το ίδιο " "αποτέλεσμα." -#: library/functions.rst:1421 +#: library/functions.rst:1425 msgid "" "``'ignore'`` ignores errors. Note that ignoring encoding errors can lead to " "data loss." @@ -2791,7 +2803,7 @@ msgstr "" "Το ``'ignore'`` αγνοεί τα σφάλματα. Σημειώστε ότι η παράβλεψη σφαλμάτων " "κωδικοποίησης μπορεί να οδηγήσει σε απώλεια δεδομένων." -#: library/functions.rst:1424 +#: library/functions.rst:1428 msgid "" "``'replace'`` causes a replacement marker (such as ``'?'``) to be inserted " "where there is malformed data." @@ -2799,7 +2811,7 @@ msgstr "" "Το ``'replace'`` προκαλεί την εισαγωγή ενός δείκτη αντικατάστασης (όπως " "``'?'``) όταν υπάρχουν δεδομένα με λανθασμένη μορφή." -#: library/functions.rst:1427 +#: library/functions.rst:1431 msgid "" "``'surrogateescape'`` will represent any incorrect bytes as low surrogate " "code units ranging from U+DC80 to U+DCFF. These surrogate code units will " @@ -2814,7 +2826,7 @@ msgstr "" "εγγραφή δεδομένων. Αυτό είναι χρήσιμο για την επεξεργασία αρχείων σε " "άγνωστη κωδικοποίηση." -#: library/functions.rst:1434 +#: library/functions.rst:1438 msgid "" "``'xmlcharrefreplace'`` is only supported when writing to a file. Characters " "not supported by the encoding are replaced with the appropriate XML " @@ -2824,7 +2836,7 @@ msgstr "" "χαρακτήρες που δεν υποστηρίζονται από την κωδικοποίηση αντικαθίστανται με " "την κατάλληλη αναφορά χαρακτήρων XML :samp:`&#{nnn};`." -#: library/functions.rst:1438 +#: library/functions.rst:1442 msgid "" "``'backslashreplace'`` replaces malformed data by Python's backslashed " "escape sequences." @@ -2832,7 +2844,7 @@ msgstr "" "Το ``'backslashreplace'`` αντικαθιστά δεδομένα με λανθασμένη μορφή από τις " "ακολουθίες διαφυγής με ανάστροφης καθέτου Python." -#: library/functions.rst:1441 +#: library/functions.rst:1445 msgid "" "``'namereplace'`` (also only supported when writing) replaces unsupported " "characters with ``\\N{...}`` escape sequences." @@ -2840,7 +2852,7 @@ msgstr "" "Το ``'namereplace'`` (υποστηρίζεται επίσης μόνο κατά τη σύνταξη) αντικαθιστά " "τους μη υποστηριζόμενους χαρακτήρες με ακολουθίες διαφυγής ``\\N{...}``." -#: library/functions.rst:1449 +#: library/functions.rst:1453 msgid "" "*newline* determines how to parse newline characters from the stream. It can " "be ``None``, ``''``, ``'\\n'``, ``'\\r'``, and ``'\\r\\n'``. It works as " @@ -2850,7 +2862,7 @@ msgstr "" "ροή. Μπορεί να είναι και ``None``, ``''``, ``'\\n'``, ``'\\r'``, και " "``'\\r\\n'``. Λειτουργεί ως εξής:" -#: library/functions.rst:1453 +#: library/functions.rst:1457 msgid "" "When reading input from the stream, if *newline* is ``None``, universal " "newlines mode is enabled. Lines in the input can end in ``'\\n'``, " @@ -2870,7 +2882,7 @@ msgstr "" "δεδομένη συμβολοσειρά και η κατάληξη γραμμής επιστρέφεται στον καλούντα " "αμετάφραστη." -#: library/functions.rst:1461 +#: library/functions.rst:1465 msgid "" "When writing output to the stream, if *newline* is ``None``, any ``'\\n'`` " "characters written are translated to the system default line separator, :" @@ -2885,7 +2897,7 @@ msgstr "" "από τις άλλες νόμιμες τιμές, γράφονται οποιοιδήποτε χαρακτήρες ``'\\n'`` " "μεταφράζονται στη δεδομένη συμβολοσειρά." -#: library/functions.rst:1467 +#: library/functions.rst:1471 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 " @@ -2898,7 +2910,7 @@ msgstr "" "*closefd* πρέπει να είναι ``True`` (η προεπιλογή)∙ διαφορετικά, θα προκύψει " "ένα σφάλμα." -#: library/functions.rst:1472 +#: library/functions.rst:1476 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 " @@ -2913,12 +2925,12 @@ msgstr "" "αρχείου (περνώντας :mod:`os.open` ως *opener* έχει ως αποτέλεσμα " "λειτουργικότητας παρόμοια με το να περάσουμε το ``None``)." -#: library/functions.rst:1478 +#: library/functions.rst:1482 msgid "The newly created file is :ref:`non-inheritable `." msgstr "" "Το νέο δημιουργημένο αρχείο είναι :ref:`non-inheritable `." -#: library/functions.rst:1480 +#: library/functions.rst:1484 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::" @@ -2927,7 +2939,7 @@ msgstr "" "συνάρτησης :func:`os.open` για να ανοίξει ένα αρχείο σε σχέση με έναν " "δεδομένο κατάλογο::" -#: library/functions.rst:1483 +#: library/functions.rst:1487 msgid "" ">>> import os\n" ">>> dir_fd = os.open('somedir', os.O_RDONLY)\n" @@ -2949,7 +2961,7 @@ msgstr "" "...\n" ">>> os.close(dir_fd) # don't leak a file descriptor" -#: library/functions.rst:1493 +#: library/functions.rst:1497 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 " @@ -2977,7 +2989,7 @@ msgstr "" "προσωρινή αποθήκευση είναι απενεργοποιημένη, επιστρέφεται, η ακατέργαστη " "ροή , μια υποκλάση :class:`io.RawIOBase`, :class:`io.FileIO`." -#: library/functions.rst:1514 +#: library/functions.rst:1518 msgid "" "See also the file handling modules, such as :mod:`fileinput`, :mod:`io` " "(where :func:`open` is declared), :mod:`os`, :mod:`os.path`, :mod:" @@ -2987,7 +2999,7 @@ msgstr "" "`io` (όπου ορίζεται η :func:`open`), :mod:`os`, :mod:`os.path`, :mod:" "`tempfile`, και :mod:`shutil`." -#: library/functions.rst:1518 +#: library/functions.rst:1522 msgid "" "Raises an :ref:`auditing event ` ``open`` with arguments ``path``, " "``mode``, ``flags``." @@ -2995,7 +3007,7 @@ msgstr "" "Κάνει raise ένα :ref:`auditing event ` ``open`` με ορίσματα " "``path``, ``mode``, ``flags``." -#: library/functions.rst:1520 +#: library/functions.rst:1524 msgid "" "The ``mode`` and ``flags`` arguments may have been modified or inferred from " "the original call." @@ -3003,21 +3015,21 @@ msgstr "" "Τα ορίσματα ``mode`` και ``flags`` μπορεί να έχουν τροποποιηθεί ή να έχουν " "συναχθεί από την αρχική κλήση." -#: library/functions.rst:1525 +#: library/functions.rst:1529 msgid "The *opener* parameter was added." msgstr "Προστέθηκε η παράμετρος *opener*." -#: library/functions.rst:1526 +#: library/functions.rst:1530 msgid "The ``'x'`` mode was added." msgstr "Προστέθηκε η λειτουργία ``'x'``." -#: library/functions.rst:1527 +#: library/functions.rst:1531 msgid ":exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`." msgstr "" "Το :exc:`IOError` γινόταν raise παλιά, τώρα είναι ψευδώνυμο του :exc:" "`OSError`." -#: library/functions.rst:1528 +#: library/functions.rst:1532 msgid "" ":exc:`FileExistsError` is now raised if the file opened in exclusive " "creation mode (``'x'``) already exists." @@ -3025,11 +3037,11 @@ msgstr "" "Το :exc:`FileExistsError` γίνεται raise τώρα εάν το αρχείο που ανοίγει σε " "λειτουργία αποκλειστικής δημιουργίας (``'x'``) υπάρχει ήδη." -#: library/functions.rst:1533 +#: library/functions.rst:1537 msgid "The file is now non-inheritable." msgstr "Το αρχείο είναι πλέον μη κληρονομικό." -#: library/functions.rst:1537 +#: library/functions.rst:1541 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 :" @@ -3040,17 +3052,17 @@ msgstr "" "raise μια εξαίρεση :exc:`InterruptedError` (δείτε το :pep:`475` για το " "σκεπτικό)." -#: library/functions.rst:1540 +#: library/functions.rst:1544 msgid "The ``'namereplace'`` error handler was added." msgstr "Προστέθηκε το πρόγραμμα χειρισμού σφαλμάτων ``'namereplace'``." -#: library/functions.rst:1544 +#: library/functions.rst:1548 msgid "Support added to accept objects implementing :class:`os.PathLike`." msgstr "" "Προστέθηκε υποστήριξη για την αποδοχή αντικειμένων που υλοποιούν :class:`os." "PathLike`." -#: library/functions.rst:1545 +#: library/functions.rst:1549 msgid "" "On Windows, opening a console buffer may return a subclass of :class:`io." "RawIOBase` other than :class:`io.FileIO`." @@ -3058,15 +3070,15 @@ msgstr "" "Στα Windows, το άνοιγμα μιας προσωρινής μνήμης κονσόλας μπορεί να επιστρέψει " "μια υποκλάση του :class:`io.RawIOBase` εκτός από το :class:`io.FileIO`." -#: library/functions.rst:1548 +#: library/functions.rst:1552 msgid "The ``'U'`` mode has been removed." msgstr "Η λειτουργία ``'U'`` έχει αφαιρεθεί." -#: library/functions.rst:1553 +#: library/functions.rst:1557 msgid "Return the ordinal value of a character." msgstr "Επιστρέφει την αριθμητική τιμή ενός χαρακτήρα." -#: library/functions.rst:1555 +#: library/functions.rst:1559 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 " @@ -3078,7 +3090,7 @@ msgstr "" "επιστρέφει τον ακέραιο ``97`` και το ``ord('€')`` (σήμα ευρώ) επιστρέφει το " "``8364``. Αυτό είναι το αντίστροφο του :func:`chr`." -#: library/functions.rst:1560 +#: library/functions.rst:1564 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 " @@ -3088,7 +3100,7 @@ msgstr "" "μήκους 1, επιστρέφει την τιμή του μεμονωμένου byte. Για παράδειγμα, το " "``ord(b'a')`` επιστρέφει τον ακέραιο ``97``." -#: library/functions.rst:1567 +#: library/functions.rst:1571 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) % " @@ -3100,7 +3112,7 @@ msgstr "" "``pow(base, exp) % mod``). Η φόρμα δύο ορισμάτων ``pow(base, exp)`` " "ισοδυναμεί με τη χρήση του τελεστή δύναμης: ``base**exp``." -#: library/functions.rst:1572 +#: library/functions.rst:1576 msgid "" "When arguments are builtin numeric types with mixed operand types, the " "coercion rules for binary arithmetic operators apply. For :class:`int` " @@ -3128,7 +3140,7 @@ msgstr "" "παραδίδεται ένα αποτέλεσμα float. Για παράδειγμα, το ``pow(-9, 2.0)`` " "επιστρέφει το ``81.0``." -#: library/functions.rst:1584 +#: library/functions.rst:1588 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 " @@ -3143,13 +3155,13 @@ msgstr "" "``pow(inv_base, -exp, mod)``, όπου το *inv_base* είναι αντίστροφο του *base* " "modulo *mod*." -#: library/functions.rst:1590 +#: library/functions.rst:1594 msgid "Here's an example of computing an inverse for ``38`` modulo ``97``::" msgstr "" "Ακολουθεί ένα παράδειγμα υπολογισμού ενός αντίστροφου για το ``38`` modulo " "``97``::" -#: library/functions.rst:1592 +#: library/functions.rst:1596 msgid "" ">>> pow(38, -1, mod=97)\n" "23\n" @@ -3161,7 +3173,7 @@ msgstr "" ">>> 23 * 38 % 97 == 1\n" "True" -#: library/functions.rst:1597 +#: library/functions.rst:1601 msgid "" "For :class:`int` operands, the three-argument form of ``pow`` now allows the " "second argument to be negative, permitting computation of modular inverses." @@ -3170,14 +3182,14 @@ msgstr "" "τώρα το δεύτερο όρισμα να είναι αρνητικό, επιτρέποντας τον υπολογισμό των " "αρθρωτών αντίστροφων." -#: library/functions.rst:1602 +#: library/functions.rst:1606 msgid "" "Allow keyword arguments. Formerly, only positional arguments were supported." msgstr "" "Επιτρέπονται ορίσματα keyword. Παλαιότερα, υποστηρίζονταν μόνο ορίσματα " "θέσης." -#: library/functions.rst:1609 +#: library/functions.rst:1613 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 " @@ -3187,7 +3199,7 @@ msgstr "" "ακολουθούμενα από *end*. Τα *sep*, *end*, *file*, και *flush*, εάν υπάρχουν, " "πρέπει να δίνονται ως ορίσματα keyword." -#: library/functions.rst:1613 +#: library/functions.rst:1617 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* " @@ -3202,7 +3214,7 @@ msgstr "" "προεπιλεγμένες τιμές. Εάν δεν δίνονται *αντικείμενα*, η :func:`print` θα " "γράψει απλά *end*." -#: library/functions.rst:1619 +#: library/functions.rst:1623 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 " @@ -3216,7 +3228,7 @@ msgstr "" "αρχείου δυαδικής λειτουργίας. Για αυτά, χρησιμοποιούμε το ``file." "write(...)``." -#: library/functions.rst:1624 +#: library/functions.rst:1628 msgid "" "Output buffering is usually determined by *file*. However, if *flush* is " "true, the stream is forcibly flushed." @@ -3224,15 +3236,15 @@ msgstr "" "Η προσωρινή αποθήκευση εξόδου καθορίζεται συνήθως από το *αρχείο*. Ωστόσο, " "εάν το *flush* είναι αληθές, η ροή ξεπλένεται αναγκαστικά." -#: library/functions.rst:1628 +#: library/functions.rst:1632 msgid "Added the *flush* keyword argument." msgstr "Προστέθηκε το όρισμα keyword *flush*." -#: library/functions.rst:1634 +#: library/functions.rst:1638 msgid "Return a property attribute." msgstr "Επιστρέφει ένα χαρακτηριστικό ιδιότητας." -#: library/functions.rst:1636 +#: library/functions.rst:1640 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 " @@ -3243,12 +3255,12 @@ msgstr "" "*fdel* είναι μια συνάρτηση για τη διαγραφή μιας τιμής χαρακτηριστικού. Και " "το *doc* δημιουργεί μια συμβολοσειρά εγγράφων για το χαρακτηριστικό." -#: library/functions.rst:1640 +#: library/functions.rst:1644 msgid "A typical use is to define a managed attribute ``x``::" msgstr "" "Μια τυπική χρήση είναι ο ορισμός ενός διαχειριζόμενου χαρακτηριστικού ``x``::" -#: library/functions.rst:1642 +#: library/functions.rst:1646 msgid "" "class C:\n" " def __init__(self):\n" @@ -3280,7 +3292,7 @@ msgstr "" "\n" " x = property(getx, setx, delx, \"I'm the 'x' property.\")" -#: library/functions.rst:1657 +#: library/functions.rst:1661 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." @@ -3288,7 +3300,7 @@ msgstr "" "Εάν το *c* είναι ένα instance του *C*, το ``c.x`` θα καλέσει τον λήπτη, το " "``c.x = value`` θα καλέσει τον ρυθμιστή, και το ``del c.x`` τον διαγραφέα." -#: library/functions.rst:1660 +#: library/functions.rst:1664 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 " @@ -3300,7 +3312,7 @@ msgstr "" "υπάρχει). Αυτό καθιστά δυνατή τη δημιουργία ιδιοτήτων μόνο για ανάγνωση, " "εύκολα χρησιμοποιώντας τη :func:`property` ως :term:`decorator`::" -#: library/functions.rst:1664 +#: library/functions.rst:1668 msgid "" "class Parrot:\n" " def __init__(self):\n" @@ -3320,7 +3332,7 @@ msgstr "" " \"\"\"Get the current voltage.\"\"\"\n" " return self._voltage" -#: library/functions.rst:1673 +#: library/functions.rst:1677 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 " @@ -3330,7 +3342,7 @@ msgstr "" "\"getter\" για ένα χαρακτηριστικό μόνο για ανάγνωση με το ίδιο όνομα, και " "ορίζει τη συμβολοσειρά εγγράφων για *voltage* σε \"Get the current voltage.\"" -#: library/functions.rst:1681 +#: library/functions.rst:1685 msgid "" "A property object has ``getter``, ``setter``, and ``deleter`` methods usable " "as decorators that create a copy of the property with the corresponding " @@ -3342,7 +3354,7 @@ msgstr "" "ένα αντίγραφο της ιδιότητας με την αντίστοιχη συνάρτηση accessor που έχει " "οριστεί στον decorator. Αυτό εξηγείται καλύτερα με ένα παράδειγμα:" -#: library/functions.rst:1686 +#: library/functions.rst:1690 msgid "" "class C:\n" " def __init__(self):\n" @@ -3378,7 +3390,7 @@ msgstr "" " def x(self):\n" " del self._x" -#: library/functions.rst:1705 +#: library/functions.rst:1709 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 " @@ -3388,7 +3400,7 @@ msgstr "" "να δώσετε στις πρόσθετες συναρτήσεις το ίδιο όνομα με την αρχική ιδιότητα " "(``x`` σε αυτήν την περίπτωση.)" -#: library/functions.rst:1709 +#: library/functions.rst:1713 msgid "" "The returned property object also has the attributes ``fget``, ``fset``, and " "``fdel`` corresponding to the constructor arguments." @@ -3397,11 +3409,11 @@ msgstr "" "``fget``, ``fset``, και ``fdel`` που αντιστοιχούν στα ορίσματα του " "κατασκευαστή." -#: library/functions.rst:1712 +#: library/functions.rst:1716 msgid "The docstrings of property objects are now writeable." msgstr "Τα *docstrings* των αντικειμένων ιδιότητας είναι πλέον εγγράψιμες." -#: library/functions.rst:1717 +#: library/functions.rst:1721 msgid "" "Attribute holding the name of the property. The name of the property can be " "changed at runtime." @@ -3409,7 +3421,7 @@ msgstr "" "Χαρακτηριστικό που περιέχει το όνομα της ιδιότητας. Το όνομα της ιδιότητας " "μπορεί να αλλάξει κατά την εκτέλεση." -#: library/functions.rst:1728 +#: library/functions.rst:1732 msgid "" "Rather than being a function, :class:`range` is actually an immutable " "sequence type, as documented in :ref:`typesseq-range` and :ref:`typesseq`." @@ -3418,7 +3430,7 @@ msgstr "" "αμετάβλητος τύπος ακολουθίας, όπως τεκμηριώνεται στα :ref:`typesseq-range` " "και :ref:`typesseq`." -#: library/functions.rst:1734 +#: library/functions.rst:1738 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 " @@ -3441,12 +3453,12 @@ msgstr "" "`~object.__repr__`. Εάν η :func:`sys.displayhook` δεν είναι προσβάσιμη, αυτή " "η συνάρτηση θα κάνει raise το :exc:`RuntimeError`." -#: library/functions.rst:1745 +#: library/functions.rst:1749 msgid "This class has a custom representation that can be evaluated::" msgstr "" "Αυτή η κλάση έχει μια προσαρμοσμένη αναπαράσταση που μπορεί να αξιολογηθεί::" -#: library/functions.rst:1747 +#: library/functions.rst:1751 msgid "" "class Person:\n" " def __init__(self, name, age):\n" @@ -3464,7 +3476,7 @@ msgstr "" " def __repr__(self):\n" " return f\"Person('{self.name}', {self.age})\"" -#: library/functions.rst:1758 +#: library/functions.rst:1762 msgid "" "Return a reverse :term:`iterator`. The argument must be an object which has " "a :meth:`~object.__reversed__` method or supports the sequence protocol " @@ -3476,7 +3488,7 @@ msgstr "" "το πρωτόκολλο ακολουθίας (τη μέθοδο :meth:`~object.__len__` και τη μέθοδο :" "meth:`~object.__getitem__` με ακέραια ορίσματα που ξεκινούν από το ``0``)." -#: library/functions.rst:1766 +#: library/functions.rst:1770 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 " @@ -3486,7 +3498,7 @@ msgstr "" "υποδιαστολή. Εάν το *ndigits* παραληφθεί ή είναι ``None``, επιστρέφει τον " "πλησιέστερο ακέραιο αριθμό στην είσοδό του." -#: library/functions.rst:1770 +#: library/functions.rst:1774 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 " @@ -3505,7 +3517,7 @@ msgstr "" "επιστρεφόμενη τιμή είναι ακέραιος εάν το *ndigits* παραλειφθεί ή είναι " "``None``. Διαφορετικά, η τιμή επιστροφής έχει τον ίδιο τύπο με το *number*." -#: library/functions.rst:1779 +#: library/functions.rst:1783 msgid "" "For a general Python object ``number``, ``round`` delegates to ``number." "__round__``." @@ -3513,7 +3525,7 @@ msgstr "" "Για ένα γενικό αντικείμενο Python ``number``, ``round`` εκχωρεί στο ``number." "__round__``." -#: library/functions.rst:1784 +#: library/functions.rst:1788 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 " @@ -3527,17 +3539,18 @@ msgstr "" "περισσότερα δεκαδικά κλάσματα δεν μπορούν να αναπαρασταθούν ακριβώς ως " "float. Δείτε το :ref:`tut-fp-issues` για περισσότερες πληροφορίες." -#: library/functions.rst:1795 +#: library/functions.rst:1799 +#, fuzzy msgid "" "Return a new :class:`set` object, optionally with elements taken from " -"*iterable*. ``set`` is a built-in class. See :class:`set` and :ref:`types-" -"set` for documentation about this class." +"*iterable*. :class:`set` is a built-in class. See also :ref:`types-set` " +"for documentation about this class." msgstr "" "Επιστρέφει ένα νέο αντικείμενο :class:`set`, προαιρετικά με στοιχεία που " "λαμβάνονται από το *iterable*. Το ``set`` είναι μια ενσωματωμένη κλάση. " "Δείτε :class:`set` και :ref:`types-set` για τεκμηρίωση αυτής της κλάσης." -#: library/functions.rst:1799 +#: library/functions.rst:1803 msgid "" "For other containers see the built-in :class:`frozenset`, :class:`list`, :" "class:`tuple`, and :class:`dict` classes, as well as the :mod:`collections` " @@ -3547,7 +3560,7 @@ msgstr "" "class:`list`, :class:`tuple`, και :class:`dict`, καθώς και το module :mod:" "`collections`." -#: library/functions.rst:1806 +#: library/functions.rst:1810 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 " @@ -3562,7 +3575,7 @@ msgstr "" "επιτρέπει. Για παράδειγμα ``setattr(x, 'foobar', 123)`` ισοδυναμεί με το " "``x.foobar = 123``." -#: library/functions.rst:1812 +#: library/functions.rst:1816 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:" @@ -3577,7 +3590,7 @@ msgstr "" "αναγνωριστικό δεν θα είναι προσβάσιμο χρησιμοποιώντας τη σημειογραφία, αλλά " "είναι προσβάσιμο μέσω του :func:`getattr` κ.λπ.." -#: library/functions.rst:1820 +#: library/functions.rst:1824 msgid "" "Since :ref:`private name mangling ` happens at " "compilation time, one must manually mangle a private attribute's (attributes " @@ -3588,7 +3601,7 @@ msgstr "" "μη αυτόματο τρόπο το όνομα ενός ιδιωτικού χαρακτηριστικού (χαρακτηριστικά με " "δύο προπορευόμενες κάτω παύλες) για να το ορίσει με :func:`setattr`." -#: library/functions.rst:1829 +#: library/functions.rst:1833 msgid "" "Return a :term:`slice` object representing the set of indices specified by " "``range(start, stop, step)``. The *start* and *step* arguments default to " @@ -3598,7 +3611,7 @@ msgstr "" "δεικτών που καθορίζονται από το ``range(start, stop, step)``. Τα ορίσματα " "*start* και *step* είναι από προεπιλογή ``None``." -#: library/functions.rst:1833 +#: library/functions.rst:1837 msgid "" "Slice objects have read-only data attributes :attr:`!start`, :attr:`!stop`, " "and :attr:`!step` which merely return the argument values (or their " @@ -3611,7 +3624,7 @@ msgstr "" "λειτουργικότητα∙ ωστόσο, χρησιμοποιούνται από το NumPy και άλλα πακέτα " "τρίτων." -#: library/functions.rst:1842 +#: library/functions.rst:1846 msgid "" "Slice objects are also generated when extended indexing syntax is used. For " "example: ``a[start:stop:step]`` or ``a[start:stop, i]``. See :func:" @@ -3622,7 +3635,7 @@ msgstr "" "stop, i]``. Δείτε τη :func:`itertools.islice` για μια εναλλακτική έκδοση " "που επιστρέφει ένα :term:`iterator`." -#: library/functions.rst:1847 +#: library/functions.rst:1851 msgid "" "Slice objects are now :term:`hashable` (provided :attr:`~slice.start`, :attr:" "`~slice.stop`, and :attr:`~slice.step` are hashable)." @@ -3631,18 +3644,18 @@ msgstr "" "`~slice.start`, :attr:`~slice.stop`, και :attr:`~slice.step` μπορούν να " "κατακερματιστούν)." -#: library/functions.rst:1853 +#: library/functions.rst:1857 msgid "Return a new sorted list from the items in *iterable*." msgstr "Επιστρέφει μια νέα ταξινομημένη λίστα από τα στοιχεία στο *iterable*." -#: library/functions.rst:1855 +#: library/functions.rst:1859 msgid "" "Has two optional arguments which must be specified as keyword arguments." msgstr "" "Έχει δύο προαιρετικά ορίσματα που πρέπει να καθοριστούν ως ορίσματα λέξεων-" "κλειδιών." -#: library/functions.rst:1857 +#: library/functions.rst:1861 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." @@ -3653,7 +3666,7 @@ msgstr "" "παράδειγμα, ``key=str.lower``). Η προεπιλεγμένη τιμή είναι ``None`` " "(συγκρίνει τα στοιχεία απευθείας)." -#: library/functions.rst:1861 +#: library/functions.rst:1865 msgid "" "*reverse* is a boolean value. If set to ``True``, then the list elements " "are sorted as if each comparison were reversed." @@ -3661,7 +3674,7 @@ msgstr "" "Το *reverse* είναι μια δυαδική τιμή. Εάν οριστεί σε ``True``, τότε τα " "στοιχεία της λίστας ταξινομούνται σαν να είχε αντιστραφεί κάθε σύγκριση." -#: library/functions.rst:1864 +#: library/functions.rst:1868 msgid "" "Use :func:`functools.cmp_to_key` to convert an old-style *cmp* function to a " "*key* function." @@ -3669,7 +3682,7 @@ msgstr "" "Χρησιμοποιήστε το :func:`functools.cmp_to_key` για να μετατρέψετε μια " "συνάρτηση *cmp* παλιού τύπου σε συνάρτηση *key*." -#: library/functions.rst:1867 +#: library/functions.rst:1871 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 " @@ -3682,7 +3695,7 @@ msgstr "" "πολλαπλά περάσματα (για παράδειγμα, ταξινόμηση ανά τμήμα, μετά ανά " "μισθολογικό βαθμό)." -#: library/functions.rst:1872 +#: library/functions.rst:1876 msgid "" "The sort algorithm uses only ``<`` comparisons between items. While " "defining an :meth:`~object.__lt__` method will suffice for sorting, :PEP:`8` " @@ -3703,18 +3716,18 @@ msgstr "" "τύπων που μπορούν να καλέσουν την αντανακλαστική μέθοδο :meth:`~object." "__gt__`." -#: library/functions.rst:1881 +#: library/functions.rst:1885 msgid "" "For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`." msgstr "" "Για παραδείγματα ταξινόμησης και ένα σύντομο σεμινάριο ταξινόμησης, " "ανατρέξτε στο :ref:`sortinghowto`." -#: library/functions.rst:1885 +#: library/functions.rst:1889 msgid "Transform a method into a static method." msgstr "Μετατροπή μιας μεθόδου σε στατική μέθοδο." -#: library/functions.rst:1887 +#: library/functions.rst:1891 msgid "" "A static method does not receive an implicit first argument. To declare a " "static method, use this idiom::" @@ -3722,7 +3735,7 @@ msgstr "" "Μια στατική μέθοδος δεν λαμβάνει ένα σιωπηρό πρώτο όρισμα. Για να δηλώσετε " "μια στατική μέθοδο, χρησιμοποιήστε αυτό το ιδίωμα::" -#: library/functions.rst:1890 +#: library/functions.rst:1894 msgid "" "class C:\n" " @staticmethod\n" @@ -3732,7 +3745,7 @@ msgstr "" " @staticmethod\n" " def f(arg1, arg2, argN): ..." -#: library/functions.rst:1894 +#: library/functions.rst:1898 msgid "" "The ``@staticmethod`` form is a function :term:`decorator` -- see :ref:" "`function` for details." @@ -3740,7 +3753,7 @@ msgstr "" "Η φόρμα ``@staticmethod`` είναι μια συνάρτηση :term:`decorator` -- δείτε :" "ref:`function` για λεπτομέρειες." -#: library/functions.rst:1897 +#: library/functions.rst:1901 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:" @@ -3752,7 +3765,7 @@ msgstr "" "`descriptor` μπορεί επίσης να κληθεί, επομένως μπορεί να χρησιμοποιηθεί στον " "ορισμός της κλάσης (όπως ``f()``)." -#: library/functions.rst:1902 +#: library/functions.rst:1906 msgid "" "Static methods in Python are similar to those found in Java or C++. Also, " "see :func:`classmethod` for a variant that is useful for creating alternate " @@ -3762,7 +3775,7 @@ msgstr "" "Java ή στη C++. Επίσης, ανατρέξτε στη :func:`classmethod` για μια παραλλαγή " "που είναι χρήσιμη για τη δημιουργία εναλλακτικών κατασκευαστών κλάσεων." -#: library/functions.rst:1906 +#: library/functions.rst:1910 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 " @@ -3777,7 +3790,7 @@ msgstr "" "αυτόματη μετατροπή σε instance μέθοδο. Για αυτές τις περιπτώσεις, " "χρησιμοποιήστε αυτό το ιδίωμα::" -#: library/functions.rst:1912 +#: library/functions.rst:1916 msgid "" "def regular_function():\n" " ...\n" @@ -3791,13 +3804,13 @@ msgstr "" "class C:\n" " method = staticmethod(regular_function)" -#: library/functions.rst:1918 +#: library/functions.rst:1922 msgid "For more information on static methods, see :ref:`types`." msgstr "" "Για περισσότερες πληροφορίες σχετικά με τις στατικές μεθόδους, δείτε το :ref:" "`types`." -#: library/functions.rst:1920 +#: library/functions.rst:1924 msgid "" "Static methods now inherit the method attributes (:attr:`~function." "__module__`, :attr:`~function.__name__`, :attr:`~function.__qualname__`, :" @@ -3810,14 +3823,14 @@ msgstr "" "__annotations__`),, έχουν ένα νέο χαρακτηριστικό ``__wrapped__``, και " "μπορούν πλέον να καλούνται ως κανονικές λειτουργίες." -#: library/functions.rst:1938 +#: library/functions.rst:1942 msgid "" "Return a :class:`str` version of *object*. See :func:`str` for details." msgstr "" "Επιστρέφει μια έκδοση :class:`str` του *object*. Δείτε :func:`str` για " "λεπτομέρειες." -#: library/functions.rst:1940 +#: library/functions.rst:1944 msgid "" "``str`` is the built-in string :term:`class`. For general information about " "strings, see :ref:`textseq`." @@ -3825,7 +3838,7 @@ msgstr "" "Το ``str`` είναι η ενσωματωμένη συμβολοσειρά :term:`class`. Για γενικές " "πληροφορίες σχετικά με τις συμβολοσειρές, ανατρέξτε :ref:`textseq`." -#: library/functions.rst:1946 +#: library/functions.rst:1950 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 " @@ -3835,7 +3848,7 @@ msgstr "" "και επιστρέφει το σύνολο. Τα στοιχεία του *iterable* είναι συνήθως αριθμοί " "και η τιμή έναρξης δεν επιτρέπεται να είναι συμβολοσειρά." -#: library/functions.rst:1950 +#: library/functions.rst:1954 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 ``''." @@ -3850,11 +3863,11 @@ msgstr "" "να συνδυάσετε μια σειρά iterable, σκεφτείτε να χρησιμοποιήσετε το :func:" "`itertools.chain`." -#: library/functions.rst:1956 +#: library/functions.rst:1960 msgid "The *start* parameter can be specified as a keyword argument." msgstr "Η παράμετρος *start* μπορεί να καθοριστεί ως όρισμα keyword." -#: library/functions.rst:1959 +#: library/functions.rst:1963 msgid "" "Summation of floats switched to an algorithm that gives higher accuracy and " "better commutativity on most builds." @@ -3862,7 +3875,7 @@ msgstr "" "Η άθροιση των floats άλλαξε σε έναν αλγόριθμο που δίνει μεγαλύτερη ακρίβεια " "και καλύτερη αντιμεταθετικότητα στις περισσότερες κατασκευές." -#: library/functions.rst:1966 +#: library/functions.rst:1970 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 " @@ -3872,7 +3885,7 @@ msgstr "" "μεθόδου σε μια γονική ή αδερφή κλάση *type*. Αυτό είναι χρήσιμο για την " "πρόσβαση σε μεταβιβασμένες μεθόδους που έχουν παρακαμφθεί σε μια κλάση." -#: library/functions.rst:1970 +#: library/functions.rst:1974 msgid "" "The *object_or_type* determines the :term:`method resolution order` to be " "searched. The search starts from the class right after the *type*." @@ -3880,7 +3893,7 @@ msgstr "" "Το *object_or_type* καθορίζει το :term:`method resolution order` που θα " "αναζητηθεί. Η αναζήτηση ξεκινά από την κλάση αμέσως μετά τον *type*." -#: library/functions.rst:1974 +#: library/functions.rst:1978 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` " @@ -3890,7 +3903,7 @@ msgstr "" "B -> C -> A -> object`` και η τιμή του *type* είναι ``B``, τότε η :func:" "`super` αναζητά ``C -> A -> object``." -#: library/functions.rst:1978 +#: library/functions.rst:1982 msgid "" "The :attr:`~type.__mro__` attribute of the class corresponding to " "*object_or_type* lists the method resolution search order used by both :func:" @@ -3903,7 +3916,7 @@ msgstr "" "χαρακτηριστικό είναι δυναμικό και μπορεί να αλλάξει κάθε φορά που " "ενημερώνεται η ιεραρχία κληρονομικότητας." -#: library/functions.rst:1983 +#: library/functions.rst:1987 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. " @@ -3916,7 +3929,7 @@ msgstr "" "είναι ένας τύπος, το ``issubclass(type2, type)`` πρέπει να είναι αληθές " "(αυτό είναι χρήσιμο για μεθόδους κλάσης)." -#: library/functions.rst:1988 +#: library/functions.rst:1992 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 " @@ -3933,7 +3946,7 @@ msgstr "" "αναμένεται μέσα σε φωλιασμένες συναρτήσεις, συμπεριλαμβανομένων και των " "γεννητριών εκφράσεων, οι οποίες δημιουργούν έμμεσα φωλιασμένες συναρτήσεις.)" -#: library/functions.rst:1995 +#: library/functions.rst:1999 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 " @@ -3946,7 +3959,7 @@ msgstr "" "έτσι τον κώδικα πιο διατηρήσιμο. Αυτή η χρήση είναι πολύ παράλληλη με τη " "χρήση του *super* σε άλλες γλώσσες προγραμματισμού." -#: library/functions.rst:2000 +#: library/functions.rst:2004 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 " @@ -3970,13 +3983,13 @@ msgstr "" "διάταξη μπορεί να περιλαμβάνει αδερφικές κλάσεις πριν από τον χρόνο " "εκτέλεσης)." -#: library/functions.rst:2010 +#: library/functions.rst:2014 msgid "For both use cases, a typical superclass call looks like this::" msgstr "" "Και για τις δύο περιπτώσεις χρήσης, μια τυπική κλήση υπερκλάσης μοιάζει με " "αυτό::" -#: library/functions.rst:2012 +#: library/functions.rst:2016 msgid "" "class C(B):\n" " def method(self, arg):\n" @@ -3988,7 +4001,7 @@ msgstr "" " super().method(arg) # This does the same thing as:\n" " # super(C, self).method(arg)" -#: library/functions.rst:2017 +#: library/functions.rst:2021 msgid "" "In addition to method lookups, :func:`super` also works for attribute " "lookups. One possible use case for this is calling :term:`descriptors " @@ -3998,7 +4011,7 @@ msgstr "" "αναζητήσεις χαρακτηριστικών. Μια πιθανή περίπτωση χρήσης για αυτό είναι η " "κλήση :term:`descriptors ` σε μια κλάση γονέα ή αδελφού." -#: library/functions.rst:2021 +#: library/functions.rst:2025 msgid "" "Note that :func:`super` is implemented as part of the binding process for " "explicit dotted attribute lookups such as ``super().__getitem__(name)``. It " @@ -4015,7 +4028,7 @@ msgstr "" "οριστεί για σιωπηρές αναζητήσεις που χρησιμοποιούν δηλώσεις ή τελεστές όπως " "``super()[name]``." -#: library/functions.rst:2029 +#: library/functions.rst:2033 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 " @@ -4032,7 +4045,7 @@ msgstr "" "ανάκτηση της κλάσης που ορίζεται, καθώς και για την πρόσβαση στην τρέχουσα " "παρουσία για συνηθισμένες μεθόδους." -#: library/functions.rst:2036 +#: library/functions.rst:2040 msgid "" "For practical suggestions on how to design cooperative classes using :func:" "`super`, see `guide to using super() `_." -#: library/functions.rst:2045 +#: library/functions.rst:2049 msgid "" "Rather than being a function, :class:`tuple` is actually an immutable " "sequence type, as documented in :ref:`typesseq-tuple` and :ref:`typesseq`." @@ -4051,7 +4064,7 @@ msgstr "" "αμετάβλητος τύπος ακολουθίας, όπως τεκμηριώνεται στα :ref:`typesseq-tuple` " "και :ref:`typesseq`." -#: library/functions.rst:2054 +#: library/functions.rst:2058 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." @@ -4061,7 +4074,7 @@ msgstr "" "είναι ένα αντικείμενο τύπου και γενικά το ίδιο αντικείμενο με αυτό που " "επιστρέφεται από το :attr:`object.__class__`." -#: library/functions.rst:2058 +#: library/functions.rst:2062 msgid "" "The :func:`isinstance` built-in function is recommended for testing the type " "of an object, because it takes subclasses into account." @@ -4069,7 +4082,7 @@ msgstr "" "Η ενσωματωμένη συνάρτηση :func:`isinstance` συνίσταται για τη δοκιμή του " "τύπου ενός αντικειμένου, επειδή λαμβάνει υπόψη τις υποκλάσεις." -#: library/functions.rst:2061 +#: library/functions.rst:2065 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 " @@ -4092,11 +4105,11 @@ msgstr "" "__dict__`. Οι ακόλουθες δύο προτάσεις δημιουργούν πανομοιότυπα αντικείμενα :" "class:`!type`" -#: library/functions.rst:2076 +#: library/functions.rst:2080 msgid "See also:" msgstr "Δείτε επίσης:" -#: library/functions.rst:2078 +#: library/functions.rst:2082 msgid "" ":ref:`Documentation on attributes and methods on classes `." @@ -4104,11 +4117,11 @@ msgstr "" ":ref:`Τεκμηρίωση για χαρακτηριστικά και μεθόδους σε κλάσεις `." -#: library/functions.rst:2079 +#: library/functions.rst:2083 msgid ":ref:`bltin-type-objects`" msgstr ":ref:`bltin-type-objects`" -#: library/functions.rst:2081 +#: library/functions.rst:2085 msgid "" "Keyword arguments provided to the three argument form are passed to the " "appropriate metaclass machinery (usually :meth:`~object.__init_subclass__`) " @@ -4120,11 +4133,11 @@ msgstr "" "__init_subclass__`) με τον ίδιο τρόπο που θα έκαναν οι λέξεις-κλειδιά στον " "ορισμό μιας κλάσης (εκτός από το *metaclass*)." -#: library/functions.rst:2086 +#: library/functions.rst:2090 msgid "See also :ref:`class-customization`." msgstr "Δείτε επίσης :ref:`class-customization`." -#: library/functions.rst:2088 +#: library/functions.rst:2092 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." @@ -4133,7 +4146,7 @@ msgstr "" "δεν μπορούν πλέον να χρησιμοποιούν τη φόρμα ενός επιχειρήματος για να λάβουν " "τον τύπο ενός αντικειμένου." -#: library/functions.rst:2095 +#: library/functions.rst:2099 msgid "" "Return the :attr:`~object.__dict__` attribute for a module, class, instance, " "or any other object with a :attr:`!__dict__` attribute." @@ -4142,7 +4155,7 @@ msgstr "" "στιγμιότυπο, ή οποιοδήποτε άλλο αντικείμενο με ένα χαρακτηριστικό :attr:`!" "__dict__`." -#: library/functions.rst:2098 +#: library/functions.rst:2102 msgid "" "Objects such as modules and instances have an updateable :attr:`~object." "__dict__` attribute; however, other objects may have write restrictions on " @@ -4155,11 +4168,11 @@ msgstr "" "(για παράδειγμα, οι κλάσεις χρησιμοποιούν ένα :class:`types." "MappingProxyType` για την αποτροπή άμεσων ενημερώσεων λεξικού)." -#: library/functions.rst:2103 +#: library/functions.rst:2107 msgid "Without an argument, :func:`vars` acts like :func:`locals`." msgstr "Χωρίς ένα όρισμα, :func:`vars` συμπεριφέρεται όπως :func:`locals`." -#: library/functions.rst:2105 +#: library/functions.rst:2109 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 " @@ -4170,7 +4183,7 @@ msgstr "" "παράδειγμα, εάν η κλάση του ορίζει το :attr:`~object.__slots__` " "χαρακτηριστικό)." -#: library/functions.rst:2111 +#: library/functions.rst:2115 msgid "" "The result of calling this function without an argument has been updated as " "described for the :func:`locals` builtin." @@ -4178,7 +4191,7 @@ msgstr "" "Το αποτέλεσμα της κλήσης αυτής της συνάρτησης χωρίς ένα όρισμα έχει " "ενημερωθεί, όπως περιγράφεται για τη ενσωματωμένη :func:`locals`." -#: library/functions.rst:2117 +#: library/functions.rst:2121 msgid "" "Iterate over several iterables in parallel, producing tuples with an item " "from each one." @@ -4186,11 +4199,11 @@ msgstr "" "Επανάληψη σε πολλούς iterables παράλληλα, δημιουργώντας πλειάδες με ένα " "αντικείμενο από το καθένα." -#: library/functions.rst:2120 +#: library/functions.rst:2124 msgid "Example::" msgstr "Παράδειγμα::" -#: library/functions.rst:2122 +#: library/functions.rst:2126 msgid "" ">>> for item in zip([1, 2, 3], ['sugar', 'spice', 'everything nice']):\n" "... print(item)\n" @@ -4206,7 +4219,7 @@ msgstr "" "(2, 'spice')\n" "(3, 'everything nice')" -#: library/functions.rst:2129 +#: library/functions.rst:2133 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." @@ -4215,7 +4228,7 @@ msgstr "" "πλειάδα περιέχει το *i*-ο στοιχείο από κάθε ένα από τους επαναλήψιμους " "ορισμάτων." -#: library/functions.rst:2132 +#: library/functions.rst:2136 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 `_." -#: library/functions.rst:2136 +#: library/functions.rst:2140 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:" @@ -4235,7 +4248,7 @@ msgstr "" "μέχρι να επαναληφθεί ο iterable, π.χ. με έναν βρόχο :keyword:`!for` ή με " "αναδίπλωση σε μια :class:`list`." -#: library/functions.rst:2140 +#: library/functions.rst:2144 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 " @@ -4248,7 +4261,7 @@ msgstr "" "κώδικα που προετοίμασε αυτά τα iterables. Η Python προσφέρει τρεις " "διαφορετικές προσεγγίσεις για την αντιμετώπιση αυτού του ζητήματος::" -#: library/functions.rst:2145 +#: library/functions.rst:2149 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 " @@ -4258,7 +4271,7 @@ msgstr "" "Αυτό θα αγνοήσει τα υπόλοιπα στοιχεία στους μεγαλύτερους iterables, κόβοντας " "το αποτέλεσμα στο μήκος του συντομότερου iterable::" -#: library/functions.rst:2149 +#: library/functions.rst:2153 msgid "" ">>> list(zip(range(3), ['fee', 'fi', 'fo', 'fum']))\n" "[(0, 'fee'), (1, 'fi'), (2, 'fo')]" @@ -4266,7 +4279,7 @@ msgstr "" ">>> list(zip(range(3), ['fee', 'fi', 'fo', 'fum']))\n" "[(0, 'fee'), (1, 'fi'), (2, 'fo')]" -#: library/functions.rst:2152 +#: library/functions.rst:2156 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`` " @@ -4277,7 +4290,7 @@ msgstr "" "της επιλογής ``strict=True``. Η έξοδος είναι ίδια με την κανονική :func:" "`zip`::" -#: library/functions.rst:2156 +#: library/functions.rst:2160 msgid "" ">>> list(zip(('a', 'b', 'c'), (1, 2, 3), strict=True))\n" "[('a', 1), ('b', 2), ('c', 3)]" @@ -4285,7 +4298,7 @@ msgstr "" ">>> list(zip(('a', 'b', 'c'), (1, 2, 3), strict=True))\n" "[('a', 1), ('b', 2), ('c', 3)]" -#: library/functions.rst:2159 +#: library/functions.rst:2163 msgid "" "Unlike the default behavior, it raises a :exc:`ValueError` if one iterable " "is exhausted before the others:" @@ -4293,7 +4306,7 @@ msgstr "" "Σε αντίθεση με την προεπιλεγμένη συμπεριφορά, γίνεται raise ένα :exc:" "`ValueError` εάν ένα iterable εξαντληθεί πριν από τα άλλα:" -#: library/functions.rst:2177 +#: library/functions.rst:2181 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 " @@ -4303,7 +4316,7 @@ msgstr "" "μήκη διαφορετικού μήκους θα τεθεί σε σίγαση, πιθανώς να εμφανίζεται ως " "δυσεύρετο σφάλμα σε άλλο μέρος του προγράμματος." -#: library/functions.rst:2181 +#: library/functions.rst:2185 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." @@ -4313,7 +4326,7 @@ msgstr "" "τα iterables να έχουνε το ίδιο μήκος. Αυτό γίνεται από το :func:`itertools." "zip_longest`." -#: library/functions.rst:2185 +#: library/functions.rst:2189 msgid "" "Edge cases: With a single iterable argument, :func:`zip` returns an iterator " "of 1-tuples. With no arguments, it returns an empty iterator." @@ -4321,11 +4334,11 @@ msgstr "" "Περιπτώσεις άκρων: Με ένα μόνο επαναληπτικό όρισμα, η :func:`zip` επιστρέφει " "έναν iterator 1-πλειάδων. Χωρίς ορίσματα, επιστρέφει έναν κενό iterator." -#: library/functions.rst:2188 +#: library/functions.rst:2192 msgid "Tips and tricks:" msgstr "Συμβουλές και κόλπα:" -#: library/functions.rst:2190 +#: library/functions.rst:2194 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 " @@ -4341,7 +4354,7 @@ msgstr "" "επαναλήπτη. Αυτό έχει ως αποτέλεσμα τη διαίρεση της εισόδου σε κομμάτια " "μήκους." -#: library/functions.rst:2196 +#: library/functions.rst:2200 msgid "" ":func:`zip` in conjunction with the ``*`` operator can be used to unzip a " "list::" @@ -4349,7 +4362,7 @@ msgstr "" "Η :func:`zip` σε συνδυασμό με τον τελεστή ``*`` μπορεί να χρησιμοποιηθεί για " "την αποσυμπίεση μιας λίστας::" -#: library/functions.rst:2199 +#: library/functions.rst:2203 msgid "" ">>> x = [1, 2, 3]\n" ">>> y = [4, 5, 6]\n" @@ -4367,11 +4380,11 @@ msgstr "" ">>> x == list(x2) and y == list(y2)\n" "True" -#: library/functions.rst:2207 +#: library/functions.rst:2211 msgid "Added the ``strict`` argument." msgstr "Προστέθηκε το όρισμα ``strict``." -#: library/functions.rst:2219 +#: library/functions.rst:2223 msgid "" "This is an advanced function that is not needed in everyday Python " "programming, unlike :func:`importlib.import_module`." @@ -4379,7 +4392,7 @@ msgstr "" "Αυτή είναι μια προηγμένη συνάρτηση που δεν χρειάζεται στον καθημερινό " "προγραμματισμό της Python, σε αντίθεση με το :func:`importlib.import_module`." -#: library/functions.rst:2222 +#: library/functions.rst:2226 msgid "" "This function is invoked by the :keyword:`import` statement. It can be " "replaced (by importing the :mod:`builtins` module and assigning to " @@ -4400,7 +4413,7 @@ msgstr "" "χρήση του :func:`__import__` επίσης αποθαρρύνεται υπέρ του :func:`importlib." "import_module`." -#: library/functions.rst:2231 +#: library/functions.rst:2235 msgid "" "The function imports the module *name*, potentially using the given " "*globals* and *locals* to determine how to interpret the name in a package " @@ -4417,7 +4430,7 @@ msgstr "" "χρησιμοποιεί τα *globals* της μόνο για να προσδιορίσει το πλαίσιο του " "πακέτου της δήλωσης :keyword:`import`." -#: library/functions.rst:2238 +#: library/functions.rst:2242 msgid "" "*level* specifies whether to use absolute or relative imports. ``0`` (the " "default) means only perform absolute imports. Positive values for *level* " @@ -4431,7 +4444,7 @@ msgstr "" "σε σχέση με τον κατάλογο του module που καλεί την :func:`__import__` (δείτε " "το :pep:`328` για λεπτομέρειες)." -#: library/functions.rst:2244 +#: library/functions.rst:2248 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 " @@ -4443,7 +4456,7 @@ msgstr "" "κουκκίδα), *όχι* το module που ονομάζεται *name*. Ωστόσο, όταν δίνεται ένα " "μη κενό όρισμα *fromlist*, επιστρέφεται το module με το όνομα *name*." -#: library/functions.rst:2249 +#: library/functions.rst:2253 msgid "" "For example, the statement ``import spam`` results in bytecode resembling " "the following code::" @@ -4451,19 +4464,19 @@ msgstr "" "Για παράδειγμα, η δήλωση ``import spam`` καταλήγει σε bytecode που μοιάζει " "με τον ακόλουθο κώδικα::" -#: library/functions.rst:2252 +#: library/functions.rst:2256 msgid "spam = __import__('spam', globals(), locals(), [], 0)" msgstr "spam = __import__('spam', globals(), locals(), [], 0)" -#: library/functions.rst:2254 +#: library/functions.rst:2258 msgid "The statement ``import spam.ham`` results in this call::" msgstr "Η δήλωση ``import spam.ham`` καταλήγει σε αυτήν την κλήση::" -#: library/functions.rst:2256 +#: library/functions.rst:2260 msgid "spam = __import__('spam.ham', globals(), locals(), [], 0)" msgstr "spam = __import__('spam.ham', globals(), locals(), [], 0)" -#: library/functions.rst:2258 +#: library/functions.rst:2262 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." @@ -4472,7 +4485,7 @@ msgstr "" "εδώ, επειδή αυτό είναι το αντικείμενο που συνδέεται με ένα όνομα με τη " "δήλωση :keyword:`import`." -#: library/functions.rst:2261 +#: library/functions.rst:2265 msgid "" "On the other hand, the statement ``from spam.ham import eggs, sausage as " "saus`` results in ::" @@ -4480,7 +4493,7 @@ msgstr "" "Από την άλλη πλευρά, η δήλωση ``from spam.ham import eggs, sausage as saus`` " "καταλήγει σε ::" -#: library/functions.rst:2264 +#: library/functions.rst:2268 msgid "" "_temp = __import__('spam.ham', globals(), locals(), ['eggs', 'sausage'], 0)\n" "eggs = _temp.eggs\n" @@ -4490,7 +4503,7 @@ msgstr "" "eggs = _temp.eggs\n" "saus = _temp.sausage" -#: library/functions.rst:2268 +#: library/functions.rst:2272 msgid "" "Here, the ``spam.ham`` module is returned from :func:`__import__`. From " "this object, the names to import are retrieved and assigned to their " @@ -4500,7 +4513,7 @@ msgstr "" "αυτό το αντικείμενο, τα ονόματα προς εισαγωγή ανακτώνται και εκχωρούνται στα " "αντίστοιχα ονόματά τους." -#: library/functions.rst:2272 +#: library/functions.rst:2276 msgid "" "If you simply want to import a module (potentially within a package) by " "name, use :func:`importlib.import_module`." @@ -4508,7 +4521,7 @@ msgstr "" "Εάν θέλετε απλώς να εισάγετε ένα module (ενδεχομένως μέσα σε ένα πακέτο) με " "το όνομα, χρησιμοποιήστε το :func:`importlib.import_module`." -#: library/functions.rst:2275 +#: library/functions.rst:2279 msgid "" "Negative values for *level* are no longer supported (which also changes the " "default value to 0)." @@ -4516,7 +4529,7 @@ msgstr "" "Αρνητικές τιμές για το *level* δεν υποστηρίζονται πλέον (το οποίο επίσης " "αλλάζει την προεπιλεγμένη τιμή σε 0)." -#: library/functions.rst:2279 +#: library/functions.rst:2283 msgid "" "When the command line options :option:`-E` or :option:`-I` are being used, " "the environment variable :envvar:`PYTHONCASEOK` is now ignored." @@ -4525,11 +4538,11 @@ msgstr "" "I`, τότε η μεταβλητή περιβάλλοντος :envvar:`PYTHONCASEOK` δεν λαμβάνεται " "υπόψιν." -#: library/functions.rst:2284 +#: library/functions.rst:2288 msgid "Footnotes" msgstr "Υποσημειώσεις" -#: library/functions.rst:2285 +#: library/functions.rst:2289 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 " @@ -4540,111 +4553,111 @@ msgstr "" "την λειτουργία μετατροπής νέας γραμμής για την μετατροπή νέων γραμμών σε " "στυλ Windows ή Mac." -#: library/functions.rst:154 +#: library/functions.rst:156 msgid "Boolean" msgstr "Boolean" -#: library/functions.rst:2052 +#: library/functions.rst:2056 msgid "type" msgstr "τύπος" -#: library/functions.rst:646 +#: library/functions.rst:649 msgid "built-in function" msgstr "ενσωματωμένη συνάρτηση" -#: library/functions.rst:646 +#: library/functions.rst:649 msgid "exec" msgstr "exec" -#: library/functions.rst:744 +#: library/functions.rst:748 msgid "NaN" msgstr "NaN" -#: library/functions.rst:744 +#: library/functions.rst:748 msgid "Infinity" msgstr "Άπειρο" -#: library/functions.rst:812 +#: library/functions.rst:816 msgid "__format__" msgstr "__format__" -#: library/functions.rst:1928 +#: library/functions.rst:1932 msgid "string" msgstr "string" -#: library/functions.rst:812 +#: library/functions.rst:816 msgid "format() (built-in function)" msgstr "format() (ενσωματωμένη συνάρτηση)" -#: library/functions.rst:1323 +#: library/functions.rst:1327 msgid "file object" msgstr "αντικείμενο αρχείου" -#: library/functions.rst:1444 +#: library/functions.rst:1448 msgid "open() built-in function" msgstr "open() ενσωματωμένη συνάρτηση" -#: library/functions.rst:1351 +#: library/functions.rst:1355 msgid "file" msgstr "αρχείο" -#: library/functions.rst:1351 +#: library/functions.rst:1355 msgid "modes" msgstr "λειτουργίες" -#: library/functions.rst:1444 +#: library/functions.rst:1448 msgid "universal newlines" msgstr "καθολικές νέες γραμμές" -#: library/functions.rst:1505 +#: library/functions.rst:1509 msgid "line-buffered I/O" msgstr "γραμμική προσωρινή μνήμη I/O" -#: library/functions.rst:1505 +#: library/functions.rst:1509 msgid "unbuffered I/O" msgstr "unbuffered I/O" -#: library/functions.rst:1505 +#: library/functions.rst:1509 msgid "buffer size, I/O" msgstr "μέγεθος bugger, I/O" -#: library/functions.rst:1505 +#: library/functions.rst:1509 msgid "I/O control" msgstr "Έλεγχος I/O" -#: library/functions.rst:1505 +#: library/functions.rst:1509 msgid "buffering" msgstr "buffering" -#: library/functions.rst:1505 +#: library/functions.rst:1509 msgid "text mode" msgstr "λειτουργία κειμένου" -#: library/functions.rst:2213 +#: library/functions.rst:2217 msgid "module" msgstr "module" -#: library/functions.rst:1505 +#: library/functions.rst:1509 msgid "sys" msgstr "sys" -#: library/functions.rst:1928 +#: library/functions.rst:1932 msgid "str() (built-in function)" msgstr "str() (ενσωματωμένη συνάρτηση)" -#: library/functions.rst:2052 +#: library/functions.rst:2056 msgid "object" msgstr "αντικείμενο" -#: library/functions.rst:2213 +#: library/functions.rst:2217 msgid "statement" msgstr "δήλωση" -#: library/functions.rst:2213 +#: library/functions.rst:2217 msgid "import" msgstr "import" -#: library/functions.rst:2213 +#: library/functions.rst:2217 msgid "builtins" msgstr "builtins" diff --git a/library/functools.po b/library/functools.po index ae594ca08..5686c5b38 100644 --- a/library/functools.po +++ b/library/functools.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -257,7 +257,7 @@ msgstr "" msgid "" "Note, type specificity applies only to the function's immediate arguments " "rather than their contents. The scalar arguments, ``Decimal(42)`` and " -"``Fraction(42)`` are be treated as distinct calls with distinct results. In " +"``Fraction(42)`` are treated as distinct calls with distinct results. In " "contrast, the tuple arguments ``('answer', Decimal(42))`` and ``('answer', " "Fraction(42))`` are treated as equivalent." msgstr "" diff --git a/library/gc.po b/library/gc.po index 948b867c2..05e4dac42 100644 --- a/library/gc.po +++ b/library/gc.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/getopt.po b/library/getopt.po index dc55ba20e..b63324eef 100644 --- a/library/getopt.po +++ b/library/getopt.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/getpass.po b/library/getpass.po index 21164de9c..fc4ad72f4 100644 --- a/library/getpass.po +++ b/library/getpass.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/gettext.po b/library/gettext.po index 2d24fbea8..5a66dff6c 100644 --- a/library/gettext.po +++ b/library/gettext.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/glob.po b/library/glob.po index ec9607e98..809179aa8 100644 --- a/library/glob.po +++ b/library/glob.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -42,10 +42,10 @@ msgstr "" #: library/glob.rst:32 msgid "" -"Files beginning with a dot (``.``) can only be matched by patterns that also " -"start with a dot, unlike :func:`fnmatch.fnmatch` or :func:`pathlib.Path." -"glob`. For tilde and shell variable expansion, use :func:`os.path." -"expanduser` and :func:`os.path.expandvars`." +"By default, files beginning with a dot (``.``) can only be matched by " +"patterns that also start with a dot, unlike :func:`fnmatch.fnmatch` or :func:" +"`pathlib.Path.glob`. For tilde and shell variable expansion, use :func:`os." +"path.expanduser` and :func:`os.path.expandvars`." msgstr "" #: library/glob.rst:38 @@ -94,107 +94,114 @@ msgstr "" #: library/glob.rst:73 msgid "" -"If *include_hidden* is true, \"``**``\" pattern will match hidden " -"directories." +"If *include_hidden* is true, wildcards can match path segments that begin " +"with a dot (``.``)." msgstr "" -#: library/glob.rst:102 +#: library/glob.rst:108 msgid "" "Raises an :ref:`auditing event ` ``glob.glob`` with arguments " "``pathname``, ``recursive``." msgstr "" -#: library/glob.rst:103 +#: library/glob.rst:109 msgid "" "Raises an :ref:`auditing event ` ``glob.glob/2`` with arguments " "``pathname``, ``recursive``, ``root_dir``, ``dir_fd``." msgstr "" -#: library/glob.rst:79 +#: library/glob.rst:80 msgid "" "Using the \"``**``\" pattern in large directory trees may consume an " "inordinate amount of time." msgstr "" -#: library/glob.rst:106 +#: library/glob.rst:112 msgid "" "This function may return duplicate path names if *pathname* contains " "multiple \"``**``\" patterns and *recursive* is true." msgstr "" -#: library/glob.rst:109 +#: library/glob.rst:116 +msgid "" +"Any :exc:`OSError` exceptions raised from scanning the filesystem are " +"suppressed. This includes :exc:`PermissionError` when accessing directories " +"without read permission." +msgstr "" + +#: library/glob.rst:120 msgid "Support for recursive globs using \"``**``\"." msgstr "" -#: library/glob.rst:112 +#: library/glob.rst:123 msgid "Added the *root_dir* and *dir_fd* parameters." msgstr "" -#: library/glob.rst:115 +#: library/glob.rst:126 msgid "Added the *include_hidden* parameter." msgstr "" -#: library/glob.rst:99 +#: library/glob.rst:105 msgid "" "Return an :term:`iterator` which yields the same values as :func:`glob` " "without actually storing them all simultaneously." msgstr "" -#: library/glob.rst:121 +#: library/glob.rst:132 msgid "" "Escape all special characters (``'?'``, ``'*'`` and ``'['``). This is useful " "if you want to match an arbitrary literal string that may have special " "characters in it. Special characters in drive/UNC sharepoints are not " -"escaped, e.g. on Windows ``escape('//?/c:/Quo vadis?.txt')`` returns ``'//?/" -"c:/Quo vadis[?].txt'``." +"escaped, for example on Windows ``escape('//?/c:/Quo vadis?.txt')`` returns " +"``'//?/c:/Quo vadis[?].txt'``." msgstr "" -#: library/glob.rst:132 +#: library/glob.rst:143 msgid "" "Convert the given path specification to a regular expression for use with :" "func:`re.match`. The path specification can contain shell-style wildcards." msgstr "" -#: library/glob.rst:135 +#: library/glob.rst:146 msgid "For example:" msgstr "" -#: library/glob.rst:146 +#: library/glob.rst:157 msgid "" "Path separators and segments are meaningful to this function, unlike :func:" "`fnmatch.translate`. By default wildcards do not match path separators, and " "``*`` pattern segments match precisely one path segment." msgstr "" -#: library/glob.rst:150 +#: library/glob.rst:161 msgid "" "If *recursive* is true, the pattern segment \"``**``\" will match any number " "of path segments." msgstr "" -#: library/glob.rst:153 +#: library/glob.rst:164 msgid "" "If *include_hidden* is true, wildcards can match path segments that start " "with a dot (``.``)." msgstr "" -#: library/glob.rst:156 +#: library/glob.rst:167 msgid "" "A sequence of path separators may be supplied to the *seps* argument. If not " "given, :data:`os.sep` and :data:`~os.altsep` (if available) are used." msgstr "" -#: library/glob.rst:161 +#: library/glob.rst:172 msgid "" ":meth:`pathlib.PurePath.full_match` and :meth:`pathlib.Path.glob` methods, " "which call this function to implement pattern matching and globbing." msgstr "" -#: library/glob.rst:169 +#: library/glob.rst:180 msgid "Examples" msgstr "" -#: library/glob.rst:171 +#: library/glob.rst:182 msgid "" "Consider a directory containing the following files: :file:`1.gif`, :file:`2." "txt`, :file:`card.gif` and a subdirectory :file:`sub` which contains only " @@ -202,7 +209,7 @@ msgid "" "Notice how any leading components of the path are preserved. ::" msgstr "" -#: library/glob.rst:177 +#: library/glob.rst:188 msgid "" ">>> import glob\n" ">>> glob.glob('./[0-9].*')\n" @@ -217,14 +224,14 @@ msgid "" "['./', './sub/']" msgstr "" -#: library/glob.rst:189 +#: library/glob.rst:200 msgid "" "If the directory contains files starting with ``.`` they won't be matched by " "default. For example, consider a directory containing :file:`card.gif` and :" "file:`.card.gif`::" msgstr "" -#: library/glob.rst:193 +#: library/glob.rst:204 msgid "" ">>> import glob\n" ">>> glob.glob('*.gif')\n" @@ -233,12 +240,12 @@ msgid "" "['.card.gif']" msgstr "" -#: library/glob.rst:200 +#: library/glob.rst:211 msgid "" "The :mod:`fnmatch` module offers shell-style filename (not path) expansion." msgstr "" -#: library/glob.rst:203 +#: library/glob.rst:214 msgid "The :mod:`pathlib` module offers high-level path objects." msgstr "" diff --git a/library/graphlib.po b/library/graphlib.po index 84281e620..94d1bf832 100644 --- a/library/graphlib.po +++ b/library/graphlib.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/grp.po b/library/grp.po index cd3e98be6..7f2733d06 100644 --- a/library/grp.po +++ b/library/grp.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,84 +21,84 @@ msgstr "" msgid ":mod:`!grp` --- The group database" msgstr "" -#: library/grp.rst:10 +#: library/grp.rst:9 msgid "" "This module provides access to the Unix group database. It is available on " "all Unix versions." msgstr "" -#: library/grp.rst:13 +#: library/grp.rst:12 msgid "Availability" msgstr "" -#: library/grp.rst:15 +#: library/grp.rst:14 msgid "" "Group database entries are reported as a tuple-like object, whose attributes " "correspond to the members of the ``group`` structure (Attribute field below, " "see ````):" msgstr "" -#: library/grp.rst:20 +#: library/grp.rst:19 msgid "Index" msgstr "" -#: library/grp.rst:20 +#: library/grp.rst:19 msgid "Attribute" msgstr "" -#: library/grp.rst:20 +#: library/grp.rst:19 msgid "Meaning" msgstr "" -#: library/grp.rst:22 +#: library/grp.rst:21 msgid "0" msgstr "" -#: library/grp.rst:22 +#: library/grp.rst:21 msgid "gr_name" msgstr "" -#: library/grp.rst:22 +#: library/grp.rst:21 msgid "the name of the group" msgstr "" -#: library/grp.rst:24 +#: library/grp.rst:23 msgid "1" msgstr "" -#: library/grp.rst:24 +#: library/grp.rst:23 msgid "gr_passwd" msgstr "" -#: library/grp.rst:24 +#: library/grp.rst:23 msgid "the (encrypted) group password; often empty" msgstr "" -#: library/grp.rst:27 +#: library/grp.rst:26 msgid "2" msgstr "" -#: library/grp.rst:27 +#: library/grp.rst:26 msgid "gr_gid" msgstr "" -#: library/grp.rst:27 +#: library/grp.rst:26 msgid "the numerical group ID" msgstr "" -#: library/grp.rst:29 +#: library/grp.rst:28 msgid "3" msgstr "" -#: library/grp.rst:29 +#: library/grp.rst:28 msgid "gr_mem" msgstr "" -#: library/grp.rst:29 +#: library/grp.rst:28 msgid "all the group member's user names" msgstr "" -#: library/grp.rst:33 +#: library/grp.rst:32 msgid "" "The gid is an integer, name and password are strings, and the member list is " "a list of strings. (Note that most users are not explicitly listed as " @@ -109,35 +109,35 @@ msgid "" "`getgrgid`.)" msgstr "" -#: library/grp.rst:40 +#: library/grp.rst:39 msgid "It defines the following items:" msgstr "" -#: library/grp.rst:45 +#: library/grp.rst:44 msgid "" "Return the group database entry for the given numeric group ID. :exc:" "`KeyError` is raised if the entry asked for cannot be found." msgstr "" -#: library/grp.rst:48 +#: library/grp.rst:47 msgid "" ":exc:`TypeError` is raised for non-integer arguments like floats or strings." msgstr "" -#: library/grp.rst:53 +#: library/grp.rst:52 msgid "" "Return the group database entry for the given group name. :exc:`KeyError` is " "raised if the entry asked for cannot be found." msgstr "" -#: library/grp.rst:59 +#: library/grp.rst:58 msgid "Return a list of all available group entries, in arbitrary order." msgstr "" -#: library/grp.rst:64 +#: library/grp.rst:63 msgid "Module :mod:`pwd`" msgstr "" -#: library/grp.rst:65 +#: library/grp.rst:64 msgid "An interface to the user database, similar to this." msgstr "" diff --git a/library/gzip.po b/library/gzip.po index a7147570e..864617688 100644 --- a/library/gzip.po +++ b/library/gzip.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: 2025-11-27 09:00+0200\n" "Last-Translator: Marios Giannopoulos \n" "Language-Team: PyGreece \n" diff --git a/library/hashlib.po b/library/hashlib.po index f5a4e937f..963ebb6fd 100644 --- a/library/hashlib.po +++ b/library/hashlib.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/heapq.po b/library/heapq.po index e3da5feb3..9eb38ffcd 100644 --- a/library/heapq.po +++ b/library/heapq.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/hmac.po b/library/hmac.po index 871e1507a..1cac94793 100644 --- a/library/hmac.po +++ b/library/hmac.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/html.entities.po b/library/html.entities.po index 204ed1c30..97a88d52c 100644 --- a/library/html.entities.po +++ b/library/html.entities.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/html.parser.po b/library/html.parser.po index 08512f654..baec89036 100644 --- a/library/html.parser.po +++ b/library/html.parser.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -188,7 +188,8 @@ msgid "" "*attrs* argument is a list of ``(name, value)`` pairs containing the " "attributes found inside the tag's ``<>`` brackets. The *name* will be " "translated to lower case, and quotes in the *value* have been removed, and " -"character and entity references have been replaced." +"character and entity references have been replaced. For empty attributes, " +"*value* is ``None``." msgstr "" #: library/html.parser.rst:146 @@ -404,10 +405,28 @@ msgid "" msgstr "" #: library/html.parser.rst:320 +msgid "" +"Attribute names are converted to lowercase, quotes from attribute values " +"removed, and ``None`` is returned as *value* for empty attributes (such as " +"``checked``):" +msgstr "" + +#: library/html.parser.rst:323 +msgid "" +">>> parser.feed(\"\")\n" +"Start tag: input\n" +" attr: ('type', 'checkbox')\n" +" attr: ('checked', None)\n" +" attr: ('required', '')\n" +" attr: ('disabled', 'disabled')" +msgstr "" + +#: library/html.parser.rst:332 msgid "Parsing comments:" msgstr "" -#: library/html.parser.rst:322 +#: library/html.parser.rst:334 msgid "" ">>> parser.feed(''\n" "... '')\n" @@ -415,13 +434,13 @@ msgid "" "Comment : [if IE 9]>IE-specific content'``):" msgstr "" -#: library/html.parser.rst:332 +#: library/html.parser.rst:344 msgid "" ">>> parser = MyHTMLParser()\n" ">>> parser.feed('>>>')\n" @@ -434,14 +453,14 @@ msgid "" "Num ent : >" msgstr "" -#: library/html.parser.rst:344 +#: library/html.parser.rst:356 msgid "" "Feeding incomplete chunks to :meth:`~HTMLParser.feed` works, but :meth:" "`~HTMLParser.handle_data` might be called more than once if " "*convert_charrefs* is false:" msgstr "" -#: library/html.parser.rst:348 +#: library/html.parser.rst:360 msgid "" ">>> for chunk in ['buff', 'ered', ' text']:\n" "... parser.feed(chunk)\n" @@ -453,11 +472,11 @@ msgid "" "End tag : span" msgstr "" -#: library/html.parser.rst:359 +#: library/html.parser.rst:371 msgid "Parsing invalid HTML (e.g. unquoted attributes) also works:" msgstr "" -#: library/html.parser.rst:361 +#: library/html.parser.rst:373 msgid "" ">>> parser.feed('

tag soup

')\n" "Start tag: p\n" diff --git a/library/html.po b/library/html.po index c293ececf..a1f90a111 100644 --- a/library/html.po +++ b/library/html.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/http.client.po b/library/http.client.po index bc550928b..de8b802eb 100644 --- a/library/http.client.po +++ b/library/http.client.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -356,11 +356,18 @@ msgid "" "that is not also a file as the body representation." msgstr "" -#: library/http.client.rst:314 +#: library/http.client.rst:316 +msgid "" +"Note that you must have read the whole response or call :meth:`close` if :" +"meth:`getresponse` raised an non-:exc:`ConnectionError` exception before you " +"can send a new request to the server." +msgstr "" + +#: library/http.client.rst:320 msgid "*body* can now be an iterable." msgstr "" -#: library/http.client.rst:317 +#: library/http.client.rst:323 msgid "" "If neither Content-Length nor Transfer-Encoding are set in *headers*, file " "and iterable *body* objects are now chunk-encoded. The *encode_chunked* " @@ -368,26 +375,27 @@ msgid "" "file objects." msgstr "" -#: library/http.client.rst:326 +#: library/http.client.rst:332 msgid "" "Should be called after a request is sent to get the response from the " "server. Returns an :class:`HTTPResponse` instance." msgstr "" -#: library/http.client.rst:331 -msgid "" -"Note that you must have read the whole response before you can send a new " -"request to the server." -msgstr "" - -#: library/http.client.rst:334 +#: library/http.client.rst:335 msgid "" "If a :exc:`ConnectionError` or subclass is raised, the :class:" "`HTTPConnection` object will be ready to reconnect when a new request is " "sent." msgstr "" -#: library/http.client.rst:342 +#: library/http.client.rst:340 +msgid "" +"Note that this does not apply to :exc:`OSError`\\s raised by the underlying " +"socket. Instead the caller is responsible to call :meth:`close` on the " +"existing connection." +msgstr "" + +#: library/http.client.rst:347 msgid "" "Set the debugging level. The default debug level is ``0``, meaning no " "debugging output is printed. Any value greater than ``0`` will cause all " @@ -395,26 +403,26 @@ msgid "" "is passed to any new :class:`HTTPResponse` objects that are created." msgstr "" -#: library/http.client.rst:352 +#: library/http.client.rst:357 msgid "" "Set the host and the port for HTTP Connect Tunnelling. This allows running " "the connection through a proxy server." msgstr "" -#: library/http.client.rst:355 +#: library/http.client.rst:360 msgid "" "The *host* and *port* arguments specify the endpoint of the tunneled " "connection (i.e. the address included in the CONNECT request, *not* the " "address of the proxy server)." msgstr "" -#: library/http.client.rst:359 +#: library/http.client.rst:364 msgid "" "The *headers* argument should be a mapping of extra HTTP headers to send " "with the CONNECT request." msgstr "" -#: library/http.client.rst:362 +#: library/http.client.rst:367 msgid "" "As HTTP/1.1 is used for HTTP CONNECT tunnelling request, `as per the RFC " "`_, a HTTP " @@ -424,7 +432,7 @@ msgid "" "generated and transmitted automatically." msgstr "" -#: library/http.client.rst:369 +#: library/http.client.rst:374 msgid "" "For example, to tunnel through a HTTPS proxy server running locally on port " "8080, we would pass the address of the proxy to the :class:`HTTPSConnection` " @@ -432,7 +440,7 @@ msgid "" "the :meth:`~HTTPConnection.set_tunnel` method::" msgstr "" -#: library/http.client.rst:374 +#: library/http.client.rst:379 msgid "" ">>> import http.client\n" ">>> conn = http.client.HTTPSConnection(\"localhost\", 8080)\n" @@ -440,7 +448,7 @@ msgid "" ">>> conn.request(\"HEAD\",\"/index.html\")" msgstr "" -#: library/http.client.rst:381 +#: library/http.client.rst:386 msgid "" "HTTP CONNECT tunnelling requests use protocol HTTP/1.1, upgraded from " "protocol HTTP/1.0. ``Host:`` HTTP headers are mandatory for HTTP/1.1, so one " @@ -448,45 +456,45 @@ msgid "" "headers argument." msgstr "" -#: library/http.client.rst:390 +#: library/http.client.rst:395 msgid "" "Returns a dictionary with the headers of the response received from the " "proxy server to the CONNECT request." msgstr "" -#: library/http.client.rst:393 +#: library/http.client.rst:398 msgid "If the CONNECT request was not sent, the method returns ``None``." msgstr "" -#: library/http.client.rst:400 +#: library/http.client.rst:405 msgid "" "Connect to the server specified when the object was created. By default, " "this is called automatically when making a request if the client does not " "already have a connection." msgstr "" -#: library/http.client.rst:404 +#: library/http.client.rst:409 msgid "" "Raises an :ref:`auditing event ` ``http.client.connect`` with " "arguments ``self``, ``host``, ``port``." msgstr "" -#: library/http.client.rst:409 +#: library/http.client.rst:414 msgid "Close the connection to the server." msgstr "" -#: library/http.client.rst:414 +#: library/http.client.rst:419 msgid "Buffer size in bytes for sending a file-like message body." msgstr "" -#: library/http.client.rst:419 +#: library/http.client.rst:424 msgid "" "As an alternative to using the :meth:`~HTTPConnection.request` method " "described above, you can also send your request step by step, by using the " "four functions below." msgstr "" -#: library/http.client.rst:426 +#: library/http.client.rst:431 msgid "" "This should be the first call after the connection to the server has been " "made. It sends a line to the server consisting of the *method* string, the " @@ -496,7 +504,7 @@ msgid "" "with non-False values." msgstr "" -#: library/http.client.rst:436 +#: library/http.client.rst:441 msgid "" "Send an :rfc:`822`\\ -style header to the server. It sends a line to the " "server consisting of the header, a colon and a space, and the first " @@ -504,14 +512,14 @@ msgid "" "consisting of a tab and an argument." msgstr "" -#: library/http.client.rst:444 +#: library/http.client.rst:449 msgid "" "Send a blank line to the server, signalling the end of the headers. The " "optional *message_body* argument can be used to pass a message body " "associated with the request." msgstr "" -#: library/http.client.rst:448 +#: library/http.client.rst:453 msgid "" "If *encode_chunked* is ``True``, the result of each iteration of " "*message_body* will be chunk-encoded as specified in :rfc:`7230`, Section " @@ -524,7 +532,7 @@ msgid "" "the chunk-encoded data immediately after *message_body*." msgstr "" -#: library/http.client.rst:459 +#: library/http.client.rst:464 msgid "" "Due to the chunked encoding specification, empty chunks yielded by an " "iterator body will be ignored by the chunk-encoder. This is to avoid " @@ -532,50 +540,50 @@ msgid "" "malformed encoding." msgstr "" -#: library/http.client.rst:464 +#: library/http.client.rst:469 msgid "Added chunked encoding support and the *encode_chunked* parameter." msgstr "" -#: library/http.client.rst:470 +#: library/http.client.rst:475 msgid "" "Send data to the server. This should be used directly only after the :meth:" "`endheaders` method has been called and before :meth:`getresponse` is called." msgstr "" -#: library/http.client.rst:474 +#: library/http.client.rst:479 msgid "" "Raises an :ref:`auditing event ` ``http.client.send`` with " "arguments ``self``, ``data``." msgstr "" -#: library/http.client.rst:480 +#: library/http.client.rst:485 msgid "HTTPResponse Objects" msgstr "" -#: library/http.client.rst:482 +#: library/http.client.rst:487 msgid "" "An :class:`HTTPResponse` instance wraps the HTTP response from the server. " "It provides access to the request headers and the entity body. The response " "is an iterable object and can be used in a with statement." msgstr "" -#: library/http.client.rst:487 +#: library/http.client.rst:492 msgid "" "The :class:`io.BufferedIOBase` interface is now implemented and all of its " "reader operations are supported." msgstr "" -#: library/http.client.rst:494 +#: library/http.client.rst:499 msgid "Reads and returns the response body, or up to the next *amt* bytes." msgstr "" -#: library/http.client.rst:498 +#: library/http.client.rst:503 msgid "" "Reads up to the next len(b) bytes of the response body into the buffer *b*. " "Returns the number of bytes read." msgstr "" -#: library/http.client.rst:505 +#: library/http.client.rst:510 msgid "" "Return the value of the header *name*, or *default* if there is no header " "matching *name*. If there is more than one header with the name *name*, " @@ -583,77 +591,77 @@ msgid "" "than a single string, its elements are similarly returned joined by commas." msgstr "" -#: library/http.client.rst:512 +#: library/http.client.rst:517 msgid "Return a list of (header, value) tuples." msgstr "" -#: library/http.client.rst:516 +#: library/http.client.rst:521 msgid "Return the ``fileno`` of the underlying socket." msgstr "" -#: library/http.client.rst:520 +#: library/http.client.rst:525 msgid "" "A :class:`http.client.HTTPMessage` instance containing the response " "headers. :class:`http.client.HTTPMessage` is a subclass of :class:`email." "message.Message`." msgstr "" -#: library/http.client.rst:526 +#: library/http.client.rst:531 msgid "" "HTTP protocol version used by server. 10 for HTTP/1.0, 11 for HTTP/1.1." msgstr "" -#: library/http.client.rst:530 +#: library/http.client.rst:535 msgid "" "URL of the resource retrieved, commonly used to determine if a redirect was " "followed." msgstr "" -#: library/http.client.rst:534 +#: library/http.client.rst:539 msgid "" "Headers of the response in the form of an :class:`email.message." "EmailMessage` instance." msgstr "" -#: library/http.client.rst:538 +#: library/http.client.rst:543 msgid "Status code returned by server." msgstr "" -#: library/http.client.rst:542 +#: library/http.client.rst:547 msgid "Reason phrase returned by server." msgstr "" -#: library/http.client.rst:546 +#: library/http.client.rst:551 msgid "" "A debugging hook. If :attr:`debuglevel` is greater than zero, messages will " "be printed to stdout as the response is read and parsed." msgstr "" -#: library/http.client.rst:551 +#: library/http.client.rst:556 msgid "Is ``True`` if the stream is closed." msgstr "" -#: library/http.client.rst:555 +#: library/http.client.rst:560 msgid "Deprecated in favor of :attr:`~HTTPResponse.url`." msgstr "" -#: library/http.client.rst:560 +#: library/http.client.rst:565 msgid "Deprecated in favor of :attr:`~HTTPResponse.headers`." msgstr "" -#: library/http.client.rst:565 +#: library/http.client.rst:570 msgid "Deprecated in favor of :attr:`~HTTPResponse.status`." msgstr "" -#: library/http.client.rst:569 +#: library/http.client.rst:574 msgid "Examples" msgstr "" -#: library/http.client.rst:571 +#: library/http.client.rst:576 msgid "Here is an example session that uses the ``GET`` method::" msgstr "" -#: library/http.client.rst:573 +#: library/http.client.rst:578 msgid "" ">>> import http.client\n" ">>> conn = http.client.HTTPSConnection(\"www.python.org\")\n" @@ -679,13 +687,13 @@ msgid "" ">>> conn.close()" msgstr "" -#: library/http.client.rst:596 +#: library/http.client.rst:601 msgid "" "Here is an example session that uses the ``HEAD`` method. Note that the " "``HEAD`` method never returns any data. ::" msgstr "" -#: library/http.client.rst:599 +#: library/http.client.rst:604 msgid "" ">>> import http.client\n" ">>> conn = http.client.HTTPSConnection(\"www.python.org\")\n" @@ -700,11 +708,11 @@ msgid "" "True" msgstr "" -#: library/http.client.rst:611 +#: library/http.client.rst:616 msgid "Here is an example session that uses the ``POST`` method::" msgstr "" -#: library/http.client.rst:613 +#: library/http.client.rst:618 msgid "" ">>> import http.client, urllib.parse\n" ">>> params = urllib.parse.urlencode({'@number': 12524, '@type': 'issue', " @@ -723,7 +731,7 @@ msgid "" ">>> conn.close()" msgstr "" -#: library/http.client.rst:627 +#: library/http.client.rst:632 msgid "" "Client side HTTP ``PUT`` requests are very similar to ``POST`` requests. The " "difference lies only on the server side where HTTP servers will allow " @@ -733,7 +741,7 @@ msgid "" "``PUT`` method::" msgstr "" -#: library/http.client.rst:633 +#: library/http.client.rst:638 msgid "" ">>> # This creates an HTTP request\n" ">>> # with the content of BODY as the enclosed representation\n" @@ -748,11 +756,11 @@ msgid "" "200, OK" msgstr "" -#: library/http.client.rst:648 +#: library/http.client.rst:653 msgid "HTTPMessage Objects" msgstr "" -#: library/http.client.rst:652 +#: library/http.client.rst:657 msgid "" "An :class:`http.client.HTTPMessage` instance holds the headers from an HTTP " "response. It is implemented using the :class:`email.message.Message` class." diff --git a/library/http.cookiejar.po b/library/http.cookiejar.po index 2ab5e58e4..88aab8d1f 100644 --- a/library/http.cookiejar.po +++ b/library/http.cookiejar.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -50,9 +50,9 @@ msgstr "" #: library/http.cookiejar.rst:31 msgid "" "The various named parameters found in :mailheader:`Set-Cookie` and :" -"mailheader:`Set-Cookie2` headers (eg. ``domain`` and ``expires``) are " -"conventionally referred to as :dfn:`attributes`. To distinguish them from " -"Python attributes, the documentation for this module uses the term :dfn:" +"mailheader:`Set-Cookie2` headers (for example, ``domain`` and ``expires``) " +"are conventionally referred to as :dfn:`attributes`. To distinguish them " +"from Python attributes, the documentation for this module uses the term :dfn:" "`cookie-attribute` instead." msgstr "" @@ -108,7 +108,7 @@ msgid "" "This should not be initialized directly – use its subclasses below instead." msgstr "" -#: library/http.cookiejar.rst:351 +#: library/http.cookiejar.rst:363 msgid "The filename parameter supports a :term:`path-like object`." msgstr "" @@ -122,8 +122,8 @@ msgstr "" msgid "" "Constructor arguments should be passed as keyword arguments only. " "*blocked_domains* is a sequence of domain names that we never accept cookies " -"from, nor return cookies to. *allowed_domains* if not :const:`None`, this is " -"a sequence of the only domains for which we accept and return cookies. " +"from, nor return cookies to. *allowed_domains* if not ``None``, this is a " +"sequence of the only domains for which we accept and return cookies. " "*secure_protocols* is a sequence of protocols for which secure cookies can " "be added to. By default *https* and *wss* (secure websocket) are considered " "secure protocols. For all other arguments, see the documentation for :class:" @@ -133,22 +133,22 @@ msgstr "" #: library/http.cookiejar.rst:98 msgid "" ":class:`DefaultCookiePolicy` implements the standard accept / reject rules " -"for Netscape and :rfc:`2965` cookies. By default, :rfc:`2109` cookies (ie. " -"cookies received in a :mailheader:`Set-Cookie` header with a version cookie-" -"attribute of 1) are treated according to the RFC 2965 rules. However, if " -"RFC 2965 handling is turned off or :attr:`rfc2109_as_netscape` is ``True``, " -"RFC 2109 cookies are 'downgraded' by the :class:`CookieJar` instance to " -"Netscape cookies, by setting the :attr:`version` attribute of the :class:" -"`Cookie` instance to 0. :class:`DefaultCookiePolicy` also provides some " -"parameters to allow some fine-tuning of policy." +"for Netscape and :rfc:`2965` cookies. By default, :rfc:`2109` cookies (that " +"is, cookies received in a :mailheader:`Set-Cookie` header with a version " +"cookie-attribute of 1) are treated according to the RFC 2965 rules. " +"However, if RFC 2965 handling is turned off or :attr:`rfc2109_as_netscape` " +"is ``True``, RFC 2109 cookies are 'downgraded' by the :class:`CookieJar` " +"instance to Netscape cookies, by setting the :attr:`~Cookie.version` " +"attribute of the :class:`Cookie` instance to 0. :class:`DefaultCookiePolicy` " +"also provides some parameters to allow some fine-tuning of policy." msgstr "" #: library/http.cookiejar.rst:111 msgid "" "This class represents Netscape, :rfc:`2109` and :rfc:`2965` cookies. It is " "not expected that users of :mod:`http.cookiejar` construct their own :class:" -"`Cookie` instances. Instead, if necessary, call :meth:`make_cookies` on a :" -"class:`CookieJar` instance." +"`Cookie` instances. Instead, if necessary, call :meth:`~CookieJar." +"make_cookies` on a :class:`CookieJar` instance." msgstr "" #: library/http.cookiejar.rst:119 @@ -212,7 +212,7 @@ msgid ":rfc:`2964` - Use of HTTP State Management" msgstr "" #: library/http.cookiejar.rst:148 -msgid "CookieJar and FileCookieJar Objects" +msgid "CookieJar and FileCookieJar objects" msgstr "" #: library/http.cookiejar.rst:150 @@ -231,34 +231,38 @@ msgstr "" #: library/http.cookiejar.rst:160 msgid "" -"If policy allows (ie. the :attr:`rfc2965` and :attr:`hide_cookie2` " -"attributes of the :class:`CookieJar`'s :class:`CookiePolicy` instance are " -"true and false respectively), the :mailheader:`Cookie2` header is also added " -"when appropriate." +"If policy allows (that is, the :attr:`~CookiePolicy.rfc2965` and :attr:" +"`~CookiePolicy.hide_cookie2` attributes of the :class:`CookieJar`'s :class:" +"`CookiePolicy` instance are true and false respectively), the :mailheader:" +"`Cookie2` header is also added when appropriate." msgstr "" -#: library/http.cookiejar.rst:164 +#: library/http.cookiejar.rst:165 msgid "" "The *request* object (usually a :class:`urllib.request.Request` instance) " -"must support the methods :meth:`get_full_url`, :meth:`has_header`, :meth:" -"`get_header`, :meth:`header_items`, :meth:`add_unredirected_header` and the " -"attributes :attr:`host`, :attr:`!type`, :attr:`unverifiable` and :attr:" -"`origin_req_host` as documented by :mod:`urllib.request`." +"must support the methods :meth:`~urllib.request.Request.get_full_url`, :meth:" +"`~urllib.request.Request.has_header`, :meth:`~urllib.request.Request." +"get_header`, :meth:`~urllib.request.Request.header_items`, :meth:`~urllib." +"request.Request.add_unredirected_header` and the attributes :attr:`~urllib." +"request.Request.host`, :attr:`~urllib.request.Request.type`, :attr:`~urllib." +"request.Request.unverifiable` and :attr:`~urllib.request.Request." +"origin_req_host` as documented by :mod:`urllib.request`." msgstr "" -#: library/http.cookiejar.rst:198 +#: library/http.cookiejar.rst:208 msgid "" -"*request* object needs :attr:`origin_req_host` attribute. Dependency on a " -"deprecated method :meth:`get_origin_req_host` has been removed." +"*request* object needs :attr:`~urllib.request.Request.origin_req_host` " +"attribute. Dependency on a deprecated method :meth:`!get_origin_req_host` " +"has been removed." msgstr "" -#: library/http.cookiejar.rst:178 +#: library/http.cookiejar.rst:185 msgid "" "Extract cookies from HTTP *response* and store them in the :class:" "`CookieJar`, where allowed by policy." msgstr "" -#: library/http.cookiejar.rst:181 +#: library/http.cookiejar.rst:188 msgid "" "The :class:`CookieJar` will look for allowable :mailheader:`Set-Cookie` and :" "mailheader:`Set-Cookie2` headers in the *response* argument, and store " @@ -266,52 +270,54 @@ msgid "" "approval)." msgstr "" -#: library/http.cookiejar.rst:185 +#: library/http.cookiejar.rst:192 msgid "" "The *response* object (usually the result of a call to :meth:`urllib.request." -"urlopen`, or similar) should support an :meth:`info` method, which returns " -"an :class:`email.message.Message` instance." +"urlopen`, or similar) should support an :meth:`~http.client.HTTPResponse." +"info` method, which returns an :class:`email.message.Message` instance." msgstr "" -#: library/http.cookiejar.rst:189 +#: library/http.cookiejar.rst:197 msgid "" "The *request* object (usually a :class:`urllib.request.Request` instance) " -"must support the method :meth:`get_full_url` and the attributes :attr:" -"`host`, :attr:`unverifiable` and :attr:`origin_req_host`, as documented by :" -"mod:`urllib.request`. The request is used to set default values for cookie-" -"attributes as well as for checking that the cookie is allowed to be set." +"must support the method :meth:`~urllib.request.Request.get_full_url` and the " +"attributes :attr:`~urllib.request.Request.host`, :attr:`~urllib.request." +"Request.unverifiable` and :attr:`~urllib.request.Request.origin_req_host`, " +"as documented by :mod:`urllib.request`. The request is used to set default " +"values for cookie-attributes as well as for checking that the cookie is " +"allowed to be set." msgstr "" -#: library/http.cookiejar.rst:203 +#: library/http.cookiejar.rst:214 msgid "Set the :class:`CookiePolicy` instance to be used." msgstr "" -#: library/http.cookiejar.rst:208 +#: library/http.cookiejar.rst:219 msgid "" "Return sequence of :class:`Cookie` objects extracted from *response* object." msgstr "" -#: library/http.cookiejar.rst:210 +#: library/http.cookiejar.rst:221 msgid "" "See the documentation for :meth:`extract_cookies` for the interfaces " "required of the *response* and *request* arguments." msgstr "" -#: library/http.cookiejar.rst:216 +#: library/http.cookiejar.rst:227 msgid "Set a :class:`Cookie` if policy says it's OK to do so." msgstr "" -#: library/http.cookiejar.rst:221 +#: library/http.cookiejar.rst:232 msgid "" "Set a :class:`Cookie`, without checking with policy to see whether or not it " "should be set." msgstr "" -#: library/http.cookiejar.rst:227 +#: library/http.cookiejar.rst:238 msgid "Clear some cookies." msgstr "" -#: library/http.cookiejar.rst:229 +#: library/http.cookiejar.rst:240 msgid "" "If invoked without arguments, clear all cookies. If given a single " "argument, only cookies belonging to that *domain* will be removed. If given " @@ -320,108 +326,108 @@ msgid "" "*domain*, *path* and *name* is removed." msgstr "" -#: library/http.cookiejar.rst:235 +#: library/http.cookiejar.rst:246 msgid "Raises :exc:`KeyError` if no matching cookie exists." msgstr "" -#: library/http.cookiejar.rst:240 +#: library/http.cookiejar.rst:251 msgid "Discard all session cookies." msgstr "" -#: library/http.cookiejar.rst:242 +#: library/http.cookiejar.rst:253 msgid "" -"Discards all contained cookies that have a true :attr:`discard` attribute " -"(usually because they had either no ``max-age`` or ``expires`` cookie-" -"attribute, or an explicit ``discard`` cookie-attribute). For interactive " -"browsers, the end of a session usually corresponds to closing the browser " -"window." +"Discards all contained cookies that have a true :attr:`~Cookie.discard` " +"attribute (usually because they had either no ``max-age`` or ``expires`` " +"cookie-attribute, or an explicit ``discard`` cookie-attribute). For " +"interactive browsers, the end of a session usually corresponds to closing " +"the browser window." msgstr "" -#: library/http.cookiejar.rst:247 +#: library/http.cookiejar.rst:258 msgid "" -"Note that the :meth:`save` method won't save session cookies anyway, unless " -"you ask otherwise by passing a true *ignore_discard* argument." +"Note that the :meth:`~FileCookieJar.save` method won't save session cookies " +"anyway, unless you ask otherwise by passing a true *ignore_discard* argument." msgstr "" -#: library/http.cookiejar.rst:250 +#: library/http.cookiejar.rst:261 msgid ":class:`FileCookieJar` implements the following additional methods:" msgstr "" -#: library/http.cookiejar.rst:255 +#: library/http.cookiejar.rst:266 msgid "Save cookies to a file." msgstr "" -#: library/http.cookiejar.rst:257 +#: library/http.cookiejar.rst:268 msgid "" "This base class raises :exc:`NotImplementedError`. Subclasses may leave " "this method unimplemented." msgstr "" -#: library/http.cookiejar.rst:260 +#: library/http.cookiejar.rst:271 msgid "" "*filename* is the name of file in which to save cookies. If *filename* is " -"not specified, :attr:`self.filename` is used (whose default is the value " -"passed to the constructor, if any); if :attr:`self.filename` is :const:" -"`None`, :exc:`ValueError` is raised." +"not specified, :attr:`self.filename ` is used (whose " +"default is the value passed to the constructor, if any); if :attr:`self." +"filename ` is ``None``, :exc:`ValueError` is raised." msgstr "" -#: library/http.cookiejar.rst:265 +#: library/http.cookiejar.rst:277 msgid "" "*ignore_discard*: save even cookies set to be discarded. *ignore_expires*: " "save even cookies that have expired" msgstr "" -#: library/http.cookiejar.rst:268 +#: library/http.cookiejar.rst:280 msgid "" "The file is overwritten if it already exists, thus wiping all the cookies it " "contains. Saved cookies can be restored later using the :meth:`load` or :" "meth:`revert` methods." msgstr "" -#: library/http.cookiejar.rst:275 +#: library/http.cookiejar.rst:287 msgid "Load cookies from a file." msgstr "" -#: library/http.cookiejar.rst:277 +#: library/http.cookiejar.rst:289 msgid "Old cookies are kept unless overwritten by newly loaded ones." msgstr "" -#: library/http.cookiejar.rst:279 +#: library/http.cookiejar.rst:291 msgid "Arguments are as for :meth:`save`." msgstr "" -#: library/http.cookiejar.rst:281 +#: library/http.cookiejar.rst:293 msgid "" "The named file must be in the format understood by the class, or :exc:" "`LoadError` will be raised. Also, :exc:`OSError` may be raised, for example " "if the file does not exist." msgstr "" -#: library/http.cookiejar.rst:285 +#: library/http.cookiejar.rst:297 msgid ":exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`." msgstr "" -#: library/http.cookiejar.rst:291 +#: library/http.cookiejar.rst:303 msgid "Clear all cookies and reload cookies from a saved file." msgstr "" -#: library/http.cookiejar.rst:293 +#: library/http.cookiejar.rst:305 msgid "" ":meth:`revert` can raise the same exceptions as :meth:`load`. If there is a " "failure, the object's state will not be altered." msgstr "" -#: library/http.cookiejar.rst:296 +#: library/http.cookiejar.rst:308 msgid ":class:`FileCookieJar` instances have the following public attributes:" msgstr "" -#: library/http.cookiejar.rst:301 +#: library/http.cookiejar.rst:313 msgid "" "Filename of default file in which to keep cookies. This attribute may be " "assigned to." msgstr "" -#: library/http.cookiejar.rst:307 +#: library/http.cookiejar.rst:319 msgid "" "If true, load cookies lazily from disk. This attribute should not be " "assigned to. This is only a hint, since this only affects performance, not " @@ -430,43 +436,43 @@ msgid "" "in the standard library lazily loads cookies." msgstr "" -#: library/http.cookiejar.rst:317 +#: library/http.cookiejar.rst:329 msgid "FileCookieJar subclasses and co-operation with web browsers" msgstr "" -#: library/http.cookiejar.rst:319 +#: library/http.cookiejar.rst:331 msgid "" "The following :class:`CookieJar` subclasses are provided for reading and " "writing." msgstr "" -#: library/http.cookiejar.rst:324 +#: library/http.cookiejar.rst:336 msgid "" "A :class:`FileCookieJar` that can load from and save cookies to disk in the " "Mozilla ``cookies.txt`` file format (which is also used by curl and the Lynx " "and Netscape browsers)." msgstr "" -#: library/http.cookiejar.rst:330 +#: library/http.cookiejar.rst:342 msgid "" "This loses information about :rfc:`2965` cookies, and also about newer or " "non-standard cookie-attributes such as ``port``." msgstr "" -#: library/http.cookiejar.rst:335 +#: library/http.cookiejar.rst:347 msgid "" "Back up your cookies before saving if you have cookies whose loss / " "corruption would be inconvenient (there are some subtleties which may lead " "to slight changes in the file over a load / save round-trip)." msgstr "" -#: library/http.cookiejar.rst:339 +#: library/http.cookiejar.rst:351 msgid "" "Also note that cookies saved while Mozilla is running will get clobbered by " "Mozilla." msgstr "" -#: library/http.cookiejar.rst:345 +#: library/http.cookiejar.rst:357 msgid "" "A :class:`FileCookieJar` that can load from and save cookies to disk in " "format compatible with the libwww-perl library's ``Set-Cookie3`` file " @@ -474,47 +480,47 @@ msgid "" "file." msgstr "" -#: library/http.cookiejar.rst:356 -msgid "CookiePolicy Objects" +#: library/http.cookiejar.rst:368 +msgid "CookiePolicy objects" msgstr "" -#: library/http.cookiejar.rst:358 +#: library/http.cookiejar.rst:370 msgid "" "Objects implementing the :class:`CookiePolicy` interface have the following " "methods:" msgstr "" -#: library/http.cookiejar.rst:364 +#: library/http.cookiejar.rst:376 msgid "" "Return boolean value indicating whether cookie should be accepted from " "server." msgstr "" -#: library/http.cookiejar.rst:366 +#: library/http.cookiejar.rst:378 msgid "" "*cookie* is a :class:`Cookie` instance. *request* is an object implementing " "the interface defined by the documentation for :meth:`CookieJar." "extract_cookies`." msgstr "" -#: library/http.cookiejar.rst:373 +#: library/http.cookiejar.rst:385 msgid "" "Return boolean value indicating whether cookie should be returned to server." msgstr "" -#: library/http.cookiejar.rst:375 +#: library/http.cookiejar.rst:387 msgid "" "*cookie* is a :class:`Cookie` instance. *request* is an object implementing " "the interface defined by the documentation for :meth:`CookieJar." "add_cookie_header`." msgstr "" -#: library/http.cookiejar.rst:382 +#: library/http.cookiejar.rst:394 msgid "" "Return ``False`` if cookies should not be returned, given cookie domain." msgstr "" -#: library/http.cookiejar.rst:384 +#: library/http.cookiejar.rst:396 msgid "" "This method is an optimization. It removes the need for checking every " "cookie with a particular domain (which might involve reading many files). " @@ -522,7 +528,7 @@ msgid "" "leaves all the work to :meth:`return_ok`." msgstr "" -#: library/http.cookiejar.rst:389 +#: library/http.cookiejar.rst:401 msgid "" "If :meth:`domain_return_ok` returns true for the cookie domain, :meth:" "`path_return_ok` is called for the cookie path. Otherwise, :meth:" @@ -532,7 +538,7 @@ msgid "" "`return_ok` is never called for that cookie path." msgstr "" -#: library/http.cookiejar.rst:396 +#: library/http.cookiejar.rst:408 msgid "" "Note that :meth:`domain_return_ok` is called for every *cookie* domain, not " "just for the *request* domain. For example, the function might be called " @@ -540,19 +546,19 @@ msgid "" "domain is ``\"www.example.com\"``. The same goes for :meth:`path_return_ok`." msgstr "" -#: library/http.cookiejar.rst:401 +#: library/http.cookiejar.rst:413 msgid "The *request* argument is as documented for :meth:`return_ok`." msgstr "" -#: library/http.cookiejar.rst:406 +#: library/http.cookiejar.rst:418 msgid "Return ``False`` if cookies should not be returned, given cookie path." msgstr "" -#: library/http.cookiejar.rst:408 +#: library/http.cookiejar.rst:420 msgid "See the documentation for :meth:`domain_return_ok`." msgstr "" -#: library/http.cookiejar.rst:410 +#: library/http.cookiejar.rst:422 msgid "" "In addition to implementing the methods above, implementations of the :class:" "`CookiePolicy` interface must also supply the following attributes, " @@ -560,21 +566,21 @@ msgid "" "may be assigned to." msgstr "" -#: library/http.cookiejar.rst:418 +#: library/http.cookiejar.rst:430 msgid "Implement Netscape protocol." msgstr "" -#: library/http.cookiejar.rst:423 +#: library/http.cookiejar.rst:435 msgid "Implement :rfc:`2965` protocol." msgstr "" -#: library/http.cookiejar.rst:428 +#: library/http.cookiejar.rst:440 msgid "" "Don't add :mailheader:`Cookie2` header to requests (the presence of this " "header indicates to the server that we understand :rfc:`2965` cookies)." msgstr "" -#: library/http.cookiejar.rst:431 +#: library/http.cookiejar.rst:443 msgid "" "The most useful way to define a :class:`CookiePolicy` class is by " "subclassing from :class:`DefaultCookiePolicy` and overriding some or all of " @@ -583,28 +589,28 @@ msgid "" "to be useful)." msgstr "" -#: library/http.cookiejar.rst:440 -msgid "DefaultCookiePolicy Objects" +#: library/http.cookiejar.rst:452 +msgid "DefaultCookiePolicy objects" msgstr "" -#: library/http.cookiejar.rst:442 +#: library/http.cookiejar.rst:454 msgid "Implements the standard rules for accepting and returning cookies." msgstr "" -#: library/http.cookiejar.rst:444 +#: library/http.cookiejar.rst:456 msgid "" "Both :rfc:`2965` and Netscape cookies are covered. RFC 2965 handling is " "switched off by default." msgstr "" -#: library/http.cookiejar.rst:447 +#: library/http.cookiejar.rst:459 msgid "" "The easiest way to provide your own policy is to override this class and " "call its methods in your overridden implementations before adding your own " "additional checks::" msgstr "" -#: library/http.cookiejar.rst:451 +#: library/http.cookiejar.rst:463 msgid "" "import http.cookiejar\n" "class MyCookiePolicy(http.cookiejar.DefaultCookiePolicy):\n" @@ -617,7 +623,7 @@ msgid "" " return True" msgstr "" -#: library/http.cookiejar.rst:460 +#: library/http.cookiejar.rst:472 msgid "" "In addition to the features required to implement the :class:`CookiePolicy` " "interface, this class allows you to block and allow domains from setting and " @@ -626,18 +632,18 @@ msgid "" "cost of blocking some benign cookies)." msgstr "" -#: library/http.cookiejar.rst:466 +#: library/http.cookiejar.rst:478 msgid "" "A domain blocklist and allowlist is provided (both off by default). Only " "domains not in the blocklist and present in the allowlist (if the allowlist " "is active) participate in cookie setting and returning. Use the " -"*blocked_domains* constructor argument, and :meth:`blocked_domains` and :" -"meth:`set_blocked_domains` methods (and the corresponding argument and " -"methods for *allowed_domains*). If you set an allowlist, you can turn it " -"off again by setting it to :const:`None`." +"*blocked_domains* constructor argument, and :meth:`~DefaultCookiePolicy." +"blocked_domains` and :meth:`~DefaultCookiePolicy.set_blocked_domains` " +"methods (and the corresponding argument and methods for *allowed_domains*). " +"If you set an allowlist, you can turn it off again by setting it to ``None``." msgstr "" -#: library/http.cookiejar.rst:474 +#: library/http.cookiejar.rst:486 msgid "" "Domains in block or allow lists that do not start with a dot must equal the " "cookie domain to be matched. For example, ``\"example.com\"`` matches a " @@ -650,73 +656,73 @@ msgid "" "192.168.1.2 is blocked, but 193.168.1.2 is not." msgstr "" -#: library/http.cookiejar.rst:483 +#: library/http.cookiejar.rst:495 msgid "" ":class:`DefaultCookiePolicy` implements the following additional methods:" msgstr "" -#: library/http.cookiejar.rst:488 +#: library/http.cookiejar.rst:500 msgid "Return the sequence of blocked domains (as a tuple)." msgstr "" -#: library/http.cookiejar.rst:493 +#: library/http.cookiejar.rst:505 msgid "Set the sequence of blocked domains." msgstr "" -#: library/http.cookiejar.rst:498 +#: library/http.cookiejar.rst:510 msgid "" "Return ``True`` if *domain* is on the blocklist for setting or receiving " "cookies." msgstr "" -#: library/http.cookiejar.rst:504 -msgid "Return :const:`None`, or the sequence of allowed domains (as a tuple)." +#: library/http.cookiejar.rst:516 +msgid "Return ``None``, or the sequence of allowed domains (as a tuple)." msgstr "" -#: library/http.cookiejar.rst:509 -msgid "Set the sequence of allowed domains, or :const:`None`." +#: library/http.cookiejar.rst:521 +msgid "Set the sequence of allowed domains, or ``None``." msgstr "" -#: library/http.cookiejar.rst:514 +#: library/http.cookiejar.rst:526 msgid "" "Return ``True`` if *domain* is not on the allowlist for setting or receiving " "cookies." msgstr "" -#: library/http.cookiejar.rst:517 +#: library/http.cookiejar.rst:529 msgid "" ":class:`DefaultCookiePolicy` instances have the following attributes, which " "are all initialised from the constructor arguments of the same name, and " "which may all be assigned to." msgstr "" -#: library/http.cookiejar.rst:524 +#: library/http.cookiejar.rst:536 msgid "" "If true, request that the :class:`CookieJar` instance downgrade :rfc:`2109` " -"cookies (ie. cookies received in a :mailheader:`Set-Cookie` header with a " -"version cookie-attribute of 1) to Netscape cookies by setting the version " -"attribute of the :class:`Cookie` instance to 0. The default value is :const:" -"`None`, in which case RFC 2109 cookies are downgraded if and only if :rfc:" +"cookies (that is, cookies received in a :mailheader:`Set-Cookie` header with " +"a version cookie-attribute of 1) to Netscape cookies by setting the version " +"attribute of the :class:`Cookie` instance to 0. The default value is " +"``None``, in which case RFC 2109 cookies are downgraded if and only if :rfc:" "`2965` handling is turned off. Therefore, RFC 2109 cookies are downgraded " "by default." msgstr "" -#: library/http.cookiejar.rst:532 +#: library/http.cookiejar.rst:544 msgid "General strictness switches:" msgstr "" -#: library/http.cookiejar.rst:536 +#: library/http.cookiejar.rst:548 msgid "" "Don't allow sites to set two-component domains with country-code top-level " "domains like ``.co.uk``, ``.gov.uk``, ``.co.nz``.etc. This is far from " "perfect and isn't guaranteed to work!" msgstr "" -#: library/http.cookiejar.rst:541 +#: library/http.cookiejar.rst:553 msgid ":rfc:`2965` protocol strictness switches:" msgstr "" -#: library/http.cookiejar.rst:545 +#: library/http.cookiejar.rst:557 msgid "" "Follow :rfc:`2965` rules on unverifiable transactions (usually, an " "unverifiable transaction is one resulting from a redirect or a request for " @@ -724,78 +730,78 @@ msgid "" "blocked on the basis of verifiability" msgstr "" -#: library/http.cookiejar.rst:551 +#: library/http.cookiejar.rst:563 msgid "Netscape protocol strictness switches:" msgstr "" -#: library/http.cookiejar.rst:555 +#: library/http.cookiejar.rst:567 msgid "" "Apply :rfc:`2965` rules on unverifiable transactions even to Netscape " "cookies." msgstr "" -#: library/http.cookiejar.rst:560 +#: library/http.cookiejar.rst:572 msgid "" "Flags indicating how strict to be with domain-matching rules for Netscape " "cookies. See below for acceptable values." msgstr "" -#: library/http.cookiejar.rst:566 +#: library/http.cookiejar.rst:578 msgid "" "Ignore cookies in Set-Cookie: headers that have names starting with ``'$'``." msgstr "" -#: library/http.cookiejar.rst:571 +#: library/http.cookiejar.rst:583 msgid "Don't allow setting cookies whose path doesn't path-match request URI." msgstr "" -#: library/http.cookiejar.rst:573 +#: library/http.cookiejar.rst:585 msgid "" ":attr:`~DefaultCookiePolicy.strict_ns_domain` is a collection of flags. Its " "value is constructed by or-ing together (for example, ``DomainStrictNoDots|" "DomainStrictNonDomain`` means both flags are set)." msgstr "" -#: library/http.cookiejar.rst:580 +#: library/http.cookiejar.rst:592 msgid "" -"When setting cookies, the 'host prefix' must not contain a dot (eg. ``www." -"foo.bar.com`` can't set a cookie for ``.bar.com``, because ``www.foo`` " +"When setting cookies, the 'host prefix' must not contain a dot (for example, " +"``www.foo.bar.com`` can't set a cookie for ``.bar.com``, because ``www.foo`` " "contains a dot)." msgstr "" -#: library/http.cookiejar.rst:587 +#: library/http.cookiejar.rst:599 msgid "" "Cookies that did not explicitly specify a ``domain`` cookie-attribute can " -"only be returned to a domain equal to the domain that set the cookie (eg. " -"``spam.example.com`` won't be returned cookies from ``example.com`` that had " -"no ``domain`` cookie-attribute)." +"only be returned to a domain equal to the domain that set the cookie (for " +"example, ``spam.example.com`` won't be returned cookies from ``example.com`` " +"that had no ``domain`` cookie-attribute)." msgstr "" -#: library/http.cookiejar.rst:595 +#: library/http.cookiejar.rst:607 msgid "When setting cookies, require a full :rfc:`2965` domain-match." msgstr "" -#: library/http.cookiejar.rst:597 +#: library/http.cookiejar.rst:609 msgid "" "The following attributes are provided for convenience, and are the most " "useful combinations of the above flags:" msgstr "" -#: library/http.cookiejar.rst:603 +#: library/http.cookiejar.rst:615 msgid "" -"Equivalent to 0 (ie. all of the above Netscape domain strictness flags " +"Equivalent to 0 (that is, all of the above Netscape domain strictness flags " "switched off)." msgstr "" -#: library/http.cookiejar.rst:609 +#: library/http.cookiejar.rst:621 msgid "Equivalent to ``DomainStrictNoDots|DomainStrictNonDomain``." msgstr "" -#: library/http.cookiejar.rst:613 -msgid "Cookie Objects" +#: library/http.cookiejar.rst:625 +msgid "Cookie objects" msgstr "" -#: library/http.cookiejar.rst:615 +#: library/http.cookiejar.rst:627 msgid "" ":class:`Cookie` instances have Python attributes roughly corresponding to " "the standard cookie-attributes specified in the various cookie standards. " @@ -806,135 +812,135 @@ msgid "" "(Netscape) cookies." msgstr "" -#: library/http.cookiejar.rst:623 +#: library/http.cookiejar.rst:635 msgid "" "Assignment to these attributes should not be necessary other than in rare " "circumstances in a :class:`CookiePolicy` method. The class does not enforce " "internal consistency, so you should know what you're doing if you do that." msgstr "" -#: library/http.cookiejar.rst:630 +#: library/http.cookiejar.rst:642 msgid "" -"Integer or :const:`None`. Netscape cookies have :attr:`version` 0. :rfc:" -"`2965` and :rfc:`2109` cookies have a ``version`` cookie-attribute of 1. " -"However, note that :mod:`http.cookiejar` may 'downgrade' RFC 2109 cookies to " -"Netscape cookies, in which case :attr:`version` is 0." +"Integer or ``None``. Netscape cookies have :attr:`version` 0. :rfc:`2965` " +"and :rfc:`2109` cookies have a ``version`` cookie-attribute of 1. However, " +"note that :mod:`http.cookiejar` may 'downgrade' RFC 2109 cookies to Netscape " +"cookies, in which case :attr:`version` is 0." msgstr "" -#: library/http.cookiejar.rst:638 +#: library/http.cookiejar.rst:650 msgid "Cookie name (a string)." msgstr "" -#: library/http.cookiejar.rst:643 -msgid "Cookie value (a string), or :const:`None`." +#: library/http.cookiejar.rst:655 +msgid "Cookie value (a string), or ``None``." msgstr "" -#: library/http.cookiejar.rst:648 +#: library/http.cookiejar.rst:660 msgid "" -"String representing a port or a set of ports (eg. '80', or '80,8080'), or :" -"const:`None`." +"String representing a port or a set of ports (for example, '80', or " +"'80,8080'), or ``None``." msgstr "" -#: library/http.cookiejar.rst:654 +#: library/http.cookiejar.rst:666 msgid "Cookie domain (a string)." msgstr "" -#: library/http.cookiejar.rst:659 -msgid "Cookie path (a string, eg. ``'/acme/rocket_launchers'``)." +#: library/http.cookiejar.rst:671 +msgid "Cookie path (a string, for example, ``'/acme/rocket_launchers'``)." msgstr "" -#: library/http.cookiejar.rst:664 +#: library/http.cookiejar.rst:676 msgid "``True`` if cookie should only be returned over a secure connection." msgstr "" -#: library/http.cookiejar.rst:669 +#: library/http.cookiejar.rst:681 msgid "" -"Integer expiry date in seconds since epoch, or :const:`None`. See also the :" -"meth:`is_expired` method." +"Integer expiry date in seconds since epoch, or ``None``. See also the :meth:" +"`is_expired` method." msgstr "" -#: library/http.cookiejar.rst:675 +#: library/http.cookiejar.rst:687 msgid "``True`` if this is a session cookie." msgstr "" -#: library/http.cookiejar.rst:680 +#: library/http.cookiejar.rst:692 msgid "" -"String comment from the server explaining the function of this cookie, or :" -"const:`None`." +"String comment from the server explaining the function of this cookie, or " +"``None``." msgstr "" -#: library/http.cookiejar.rst:686 +#: library/http.cookiejar.rst:698 msgid "" "URL linking to a comment from the server explaining the function of this " -"cookie, or :const:`None`." +"cookie, or ``None``." msgstr "" -#: library/http.cookiejar.rst:692 +#: library/http.cookiejar.rst:704 msgid "" -"``True`` if this cookie was received as an :rfc:`2109` cookie (ie. the " +"``True`` if this cookie was received as an :rfc:`2109` cookie (that is, the " "cookie arrived in a :mailheader:`Set-Cookie` header, and the value of the " "Version cookie-attribute in that header was 1). This attribute is provided " "because :mod:`http.cookiejar` may 'downgrade' RFC 2109 cookies to Netscape " "cookies, in which case :attr:`version` is 0." msgstr "" -#: library/http.cookiejar.rst:701 +#: library/http.cookiejar.rst:713 msgid "" "``True`` if a port or set of ports was explicitly specified by the server " "(in the :mailheader:`Set-Cookie` / :mailheader:`Set-Cookie2` header)." msgstr "" -#: library/http.cookiejar.rst:707 +#: library/http.cookiejar.rst:719 msgid "``True`` if a domain was explicitly specified by the server." msgstr "" -#: library/http.cookiejar.rst:712 +#: library/http.cookiejar.rst:724 msgid "" "``True`` if the domain explicitly specified by the server began with a dot " "(``'.'``)." msgstr "" -#: library/http.cookiejar.rst:715 +#: library/http.cookiejar.rst:727 msgid "" "Cookies may have additional non-standard cookie-attributes. These may be " "accessed using the following methods:" msgstr "" -#: library/http.cookiejar.rst:721 +#: library/http.cookiejar.rst:733 msgid "Return ``True`` if cookie has the named cookie-attribute." msgstr "" -#: library/http.cookiejar.rst:726 +#: library/http.cookiejar.rst:738 msgid "" "If cookie has the named cookie-attribute, return its value. Otherwise, " "return *default*." msgstr "" -#: library/http.cookiejar.rst:732 +#: library/http.cookiejar.rst:744 msgid "Set the value of the named cookie-attribute." msgstr "" -#: library/http.cookiejar.rst:734 +#: library/http.cookiejar.rst:746 msgid "The :class:`Cookie` class also defines the following method:" msgstr "" -#: library/http.cookiejar.rst:739 +#: library/http.cookiejar.rst:751 msgid "" "``True`` if cookie has passed the time at which the server requested it " "should expire. If *now* is given (in seconds since the epoch), return " "whether the cookie has expired at the specified time." msgstr "" -#: library/http.cookiejar.rst:745 +#: library/http.cookiejar.rst:757 msgid "Examples" msgstr "" -#: library/http.cookiejar.rst:747 +#: library/http.cookiejar.rst:759 msgid "" "The first example shows the most common usage of :mod:`http.cookiejar`::" msgstr "" -#: library/http.cookiejar.rst:749 +#: library/http.cookiejar.rst:761 msgid "" "import http.cookiejar, urllib.request\n" "cj = http.cookiejar.CookieJar()\n" @@ -943,14 +949,14 @@ msgid "" "r = opener.open(\"http://example.com/\")" msgstr "" -#: library/http.cookiejar.rst:754 +#: library/http.cookiejar.rst:766 msgid "" "This example illustrates how to open a URL using your Netscape, Mozilla, or " "Lynx cookies (assumes Unix/Netscape convention for location of the cookies " "file)::" msgstr "" -#: library/http.cookiejar.rst:757 +#: library/http.cookiejar.rst:769 msgid "" "import os, http.cookiejar, urllib.request\n" "cj = http.cookiejar.MozillaCookieJar()\n" @@ -961,7 +967,7 @@ msgid "" "r = opener.open(\"http://example.com/\")" msgstr "" -#: library/http.cookiejar.rst:763 +#: library/http.cookiejar.rst:775 msgid "" "The next example illustrates the use of :class:`DefaultCookiePolicy`. Turn " "on :rfc:`2965` cookies, be more strict about domains when setting and " @@ -969,7 +975,7 @@ msgid "" "having them returned::" msgstr "" -#: library/http.cookiejar.rst:768 +#: library/http.cookiejar.rst:780 msgid "" "import urllib.request\n" "from http.cookiejar import CookieJar, DefaultCookiePolicy\n" diff --git a/library/http.cookies.po b/library/http.cookies.po index bc25bd9d8..99f190a37 100644 --- a/library/http.cookies.po +++ b/library/http.cookies.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -312,9 +312,9 @@ msgid "" "Set-Cookie: chips=ahoy\n" "Set-Cookie: vienna=finger\n" ">>> C = cookies.SimpleCookie()\n" -">>> C.load('keebler=\"E=everybody; L=\\\\\"Loves\\\\\"; fudge=\\\\012;\";')\n" +">>> C.load('keebler=\"E=everybody; L=\\\\\"Loves\\\\\"; fudge=;\";')\n" ">>> print(C)\n" -"Set-Cookie: keebler=\"E=everybody; L=\\\"Loves\\\"; fudge=\\012;\"\n" +"Set-Cookie: keebler=\"E=everybody; L=\\\"Loves\\\"; fudge=;\"\n" ">>> C = cookies.SimpleCookie()\n" ">>> C[\"oreo\"] = \"doublestuff\"\n" ">>> C[\"oreo\"][\"path\"] = \"/\"\n" diff --git a/library/http.po b/library/http.po index b29ef6cd3..899751518 100644 --- a/library/http.po +++ b/library/http.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/http.server.po b/library/http.server.po index 436546a81..127b3bda1 100644 --- a/library/http.server.po +++ b/library/http.server.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -65,10 +65,19 @@ msgid "" "This class builds on the :class:`~socketserver.TCPServer` class by storing " "the server address as instance variables named :attr:`server_name` and :attr:" "`server_port`. The server is accessible by the handler, typically through " -"the handler's :attr:`server` instance variable." +"the handler's :attr:`~socketserver.BaseRequestHandler.server` instance " +"variable." msgstr "" -#: library/http.server.rst:46 +#: library/http.server.rst:47 +msgid "The HTTP server's fully qualified domain name." +msgstr "" + +#: library/http.server.rst:51 +msgid "The HTTP server's port number obtained from *server_address*." +msgstr "" + +#: library/http.server.rst:56 msgid "" "This class is identical to HTTPServer but uses threads to handle requests by " "using the :class:`~socketserver.ThreadingMixIn`. This is useful to handle " @@ -76,23 +85,23 @@ msgid "" "indefinitely." msgstr "" -#: library/http.server.rst:54 +#: library/http.server.rst:64 msgid "" "The :class:`HTTPServer` and :class:`ThreadingHTTPServer` must be given a " "*RequestHandlerClass* on instantiation, of which this module provides three " "different variants:" msgstr "" -#: library/http.server.rst:60 +#: library/http.server.rst:70 msgid "" "This class is used to handle the HTTP requests that arrive at the server. " "By itself, it cannot respond to any actual HTTP requests; it must be " -"subclassed to handle each request method (e.g. GET or POST). :class:" -"`BaseHTTPRequestHandler` provides a number of class and instance variables, " -"and methods for use by subclasses." +"subclassed to handle each request method (for example, ``'GET'`` or " +"``'POST'``). :class:`BaseHTTPRequestHandler` provides a number of class and " +"instance variables, and methods for use by subclasses." msgstr "" -#: library/http.server.rst:66 +#: library/http.server.rst:76 msgid "" "The handler will parse the request and the headers, then call a method " "specific to the request type. The method name is constructed from the " @@ -102,28 +111,28 @@ msgid "" "override or extend the :meth:`!__init__` method." msgstr "" -#: library/http.server.rst:73 +#: library/http.server.rst:83 msgid ":class:`BaseHTTPRequestHandler` has the following instance variables:" msgstr "" -#: library/http.server.rst:77 +#: library/http.server.rst:87 msgid "" "Contains a tuple of the form ``(host, port)`` referring to the client's " "address." msgstr "" -#: library/http.server.rst:82 +#: library/http.server.rst:92 msgid "Contains the server instance." msgstr "" -#: library/http.server.rst:86 +#: library/http.server.rst:96 msgid "" "Boolean that should be set before :meth:`handle_one_request` returns, " "indicating if another request may be expected, or if the connection should " "be shut down." msgstr "" -#: library/http.server.rst:92 +#: library/http.server.rst:102 msgid "" "Contains the string representation of the HTTP request line. The terminating " "CRLF is stripped. This attribute should be set by :meth:" @@ -131,23 +140,23 @@ msgid "" "set to the empty string." msgstr "" -#: library/http.server.rst:99 +#: library/http.server.rst:109 msgid "Contains the command (request type). For example, ``'GET'``." msgstr "" -#: library/http.server.rst:103 +#: library/http.server.rst:113 msgid "" -"Contains the request path. If query component of the URL is present, then " -"``path`` includes the query. Using the terminology of :rfc:`3986`, ``path`` " -"here includes ``hier-part`` and the ``query``." +"Contains the request path. If the query component of the URL is present, " +"then ``path`` includes the query. Using the terminology of :rfc:`3986`, " +"``path`` here includes ``hier-part`` and the ``query``." msgstr "" -#: library/http.server.rst:109 +#: library/http.server.rst:119 msgid "" "Contains the version string from the request. For example, ``'HTTP/1.0'``." msgstr "" -#: library/http.server.rst:113 +#: library/http.server.rst:123 msgid "" "Holds an instance of the class specified by the :attr:`MessageClass` class " "variable. This instance parses and manages the headers in the HTTP request. " @@ -156,56 +165,56 @@ msgid "" "valid :rfc:`5322` style header." msgstr "" -#: library/http.server.rst:121 +#: library/http.server.rst:131 msgid "" "An :class:`io.BufferedIOBase` input stream, ready to read from the start of " "the optional input data." msgstr "" -#: library/http.server.rst:126 +#: library/http.server.rst:136 msgid "" "Contains the output stream for writing a response back to the client. Proper " "adherence to the HTTP protocol must be used when writing to this stream in " "order to achieve successful interoperation with HTTP clients." msgstr "" -#: library/http.server.rst:131 +#: library/http.server.rst:141 msgid "This is an :class:`io.BufferedIOBase` stream." msgstr "" -#: library/http.server.rst:134 +#: library/http.server.rst:144 msgid ":class:`BaseHTTPRequestHandler` has the following attributes:" msgstr "" -#: library/http.server.rst:138 +#: library/http.server.rst:148 msgid "" "Specifies the server software version. You may want to override this. The " "format is multiple whitespace-separated strings, where each string is of the " "form name[/version]. For example, ``'BaseHTTP/0.2'``." msgstr "" -#: library/http.server.rst:144 +#: library/http.server.rst:154 msgid "" "Contains the Python system version, in a form usable by the :attr:" "`version_string` method and the :attr:`server_version` class variable. For " "example, ``'Python/1.4'``." msgstr "" -#: library/http.server.rst:150 +#: library/http.server.rst:160 msgid "" "Specifies a format string that should be used by :meth:`send_error` method " "for building an error response to the client. The string is filled by " -"default with variables from :attr:`responses` based on the status code that " +"default with variables from :attr:`responses` based on the status code " "passed to :meth:`send_error`." msgstr "" -#: library/http.server.rst:157 +#: library/http.server.rst:167 msgid "" "Specifies the Content-Type HTTP header of error responses sent to the " "client. The default value is ``'text/html'``." msgstr "" -#: library/http.server.rst:162 +#: library/http.server.rst:172 msgid "" "Specifies the HTTP version to which the server is conformant. It is sent in " "responses to let the client know the server's communication capabilities for " @@ -216,14 +225,14 @@ msgid "" "``'HTTP/1.0'``." msgstr "" -#: library/http.server.rst:172 +#: library/http.server.rst:182 msgid "" "Specifies an :class:`email.message.Message`\\ -like class to parse HTTP " "headers. Typically, this is not overridden, and it defaults to :class:`http." "client.HTTPMessage`." msgstr "" -#: library/http.server.rst:178 +#: library/http.server.rst:188 msgid "" "This attribute contains a mapping of error code integers to two-element " "tuples containing a short and long message. For example, ``{code: " @@ -232,33 +241,33 @@ msgid "" "It is used by :meth:`send_response_only` and :meth:`send_error` methods." msgstr "" -#: library/http.server.rst:184 +#: library/http.server.rst:194 msgid "A :class:`BaseHTTPRequestHandler` instance has the following methods:" msgstr "" -#: library/http.server.rst:188 +#: library/http.server.rst:198 msgid "" "Calls :meth:`handle_one_request` once (or, if persistent connections are " "enabled, multiple times) to handle incoming HTTP requests. You should never " "need to override it; instead, implement appropriate :meth:`!do_\\*` methods." msgstr "" -#: library/http.server.rst:195 +#: library/http.server.rst:205 msgid "" "This method will parse and dispatch the request to the appropriate :meth:`!" "do_\\*` method. You should never need to override it." msgstr "" -#: library/http.server.rst:200 +#: library/http.server.rst:210 msgid "" "When an HTTP/1.1 conformant server receives an ``Expect: 100-continue`` " -"request header it responds back with a ``100 Continue`` followed by ``200 " -"OK`` headers. This method can be overridden to raise an error if the server " -"does not want the client to continue. For e.g. server can choose to send " +"request header it responds with a ``100 Continue`` followed by ``200 OK`` " +"headers. This method can be overridden to raise an error if the server does " +"not want the client to continue. For example, the server can choose to send " "``417 Expectation Failed`` as a response header and ``return False``." msgstr "" -#: library/http.server.rst:211 +#: library/http.server.rst:221 msgid "" "Sends and logs a complete error reply to the client. The numeric *code* " "specifies the HTTP error code, with *message* as an optional, short, human " @@ -273,13 +282,13 @@ msgid "" "``205 Reset Content``, ``304 Not Modified``." msgstr "" -#: library/http.server.rst:223 +#: library/http.server.rst:233 msgid "" "The error response includes a Content-Length header. Added the *explain* " "argument." msgstr "" -#: library/http.server.rst:229 +#: library/http.server.rst:239 msgid "" "Adds a response header to the headers buffer and logs the accepted request. " "The HTTP response line is written to the internal buffer, followed by " @@ -290,13 +299,13 @@ msgid "" "followed by an :meth:`end_headers` call." msgstr "" -#: library/http.server.rst:238 +#: library/http.server.rst:248 msgid "" "Headers are stored to an internal buffer and :meth:`end_headers` needs to be " "called explicitly." msgstr "" -#: library/http.server.rst:244 +#: library/http.server.rst:254 msgid "" "Adds the HTTP header to an internal buffer which will be written to the " "output stream when either :meth:`end_headers` or :meth:`flush_headers` is " @@ -305,164 +314,180 @@ msgid "" "`end_headers` MUST BE called in order to complete the operation." msgstr "" -#: library/http.server.rst:250 +#: library/http.server.rst:260 +msgid "This method does not reject input containing CRLF sequences." +msgstr "" + +#: library/http.server.rst:262 msgid "Headers are stored in an internal buffer." msgstr "" -#: library/http.server.rst:255 +#: library/http.server.rst:267 msgid "" "Sends the response header only, used for the purposes when ``100 Continue`` " -"response is sent by the server to the client. The headers not buffered and " -"sent directly the output stream.If the *message* is not specified, the HTTP " -"message corresponding the response *code* is sent." +"response is sent by the server to the client. The headers are not buffered " +"and sent directly the output stream. If the *message* is not specified, the " +"HTTP message corresponding the response *code* is sent." +msgstr "" + +#: library/http.server.rst:272 +msgid "This method does not reject *message* containing CRLF sequences." msgstr "" -#: library/http.server.rst:264 +#: library/http.server.rst:278 msgid "" "Adds a blank line (indicating the end of the HTTP headers in the response) " "to the headers buffer and calls :meth:`flush_headers`." msgstr "" -#: library/http.server.rst:268 +#: library/http.server.rst:282 msgid "The buffered headers are written to the output stream." msgstr "" -#: library/http.server.rst:273 +#: library/http.server.rst:287 msgid "" "Finally send the headers to the output stream and flush the internal headers " "buffer." msgstr "" -#: library/http.server.rst:280 +#: library/http.server.rst:294 msgid "" "Logs an accepted (successful) request. *code* should specify the numeric " "HTTP code associated with the response. If a size of the response is " "available, then it should be passed as the *size* parameter." msgstr "" -#: library/http.server.rst:286 +#: library/http.server.rst:300 msgid "" "Logs an error when a request cannot be fulfilled. By default, it passes the " "message to :meth:`log_message`, so it takes the same arguments (*format* and " "additional values)." msgstr "" -#: library/http.server.rst:293 +#: library/http.server.rst:307 msgid "" "Logs an arbitrary message to ``sys.stderr``. This is typically overridden to " "create custom error logging mechanisms. The *format* argument is a standard " "printf-style format string, where the additional arguments to :meth:" -"`log_message` are applied as inputs to the formatting. The client ip address " +"`log_message` are applied as inputs to the formatting. The client IP address " "and current date and time are prefixed to every message logged." msgstr "" -#: library/http.server.rst:301 +#: library/http.server.rst:315 msgid "" "Returns the server software's version string. This is a combination of the :" "attr:`server_version` and :attr:`sys_version` attributes." msgstr "" -#: library/http.server.rst:306 +#: library/http.server.rst:320 msgid "" "Returns the date and time given by *timestamp* (which must be ``None`` or in " "the format returned by :func:`time.time`), formatted for a message header. " "If *timestamp* is omitted, it uses the current date and time." msgstr "" -#: library/http.server.rst:310 +#: library/http.server.rst:324 msgid "The result looks like ``'Sun, 06 Nov 1994 08:49:37 GMT'``." msgstr "" -#: library/http.server.rst:314 +#: library/http.server.rst:328 msgid "Returns the current date and time, formatted for logging." msgstr "" -#: library/http.server.rst:318 +#: library/http.server.rst:332 msgid "Returns the client address." msgstr "" -#: library/http.server.rst:320 +#: library/http.server.rst:334 msgid "" "Previously, a name lookup was performed. To avoid name resolution delays, it " "now always returns the IP address." msgstr "" -#: library/http.server.rst:327 +#: library/http.server.rst:341 msgid "" "This class serves files from the directory *directory* and below, or the " "current directory if *directory* is not provided, directly mapping the " "directory structure to HTTP requests." msgstr "" -#: library/http.server.rst:331 +#: library/http.server.rst:345 msgid "Added the *directory* parameter." msgstr "" -#: library/http.server.rst:334 +#: library/http.server.rst:348 msgid "The *directory* parameter accepts a :term:`path-like object`." msgstr "" -#: library/http.server.rst:337 +#: library/http.server.rst:351 msgid "" "A lot of the work, such as parsing the request, is done by the base class :" "class:`BaseHTTPRequestHandler`. This class implements the :func:`do_GET` " "and :func:`do_HEAD` functions." msgstr "" -#: library/http.server.rst:341 +#: library/http.server.rst:355 msgid "" "The following are defined as class-level attributes of :class:" "`SimpleHTTPRequestHandler`:" msgstr "" -#: library/http.server.rst:346 +#: library/http.server.rst:360 msgid "" "This will be ``\"SimpleHTTP/\" + __version__``, where ``__version__`` is " "defined at the module level." msgstr "" -#: library/http.server.rst:351 +#: library/http.server.rst:365 +msgid "Specifies the filenames that are treated as directory index pages." +msgstr "" + +#: library/http.server.rst:367 +msgid "Defaults to ``(\"index.html\", \"index.htm\")``." +msgstr "" + +#: library/http.server.rst:373 msgid "" "A dictionary mapping suffixes into MIME types, contains custom overrides for " "the default system mappings. The mapping is used case-insensitively, and so " "should contain only lower-cased keys." msgstr "" -#: library/http.server.rst:355 +#: library/http.server.rst:377 msgid "" "This dictionary is no longer filled with the default system mappings, but " "only contains overrides." msgstr "" -#: library/http.server.rst:359 +#: library/http.server.rst:381 msgid "" "The :class:`SimpleHTTPRequestHandler` class defines the following methods:" msgstr "" -#: library/http.server.rst:363 +#: library/http.server.rst:385 msgid "" "This method serves the ``'HEAD'`` request type: it sends the headers it " "would send for the equivalent ``GET`` request. See the :meth:`do_GET` method " "for a more complete explanation of the possible headers." msgstr "" -#: library/http.server.rst:369 +#: library/http.server.rst:391 msgid "" "The request is mapped to a local file by interpreting the request as a path " "relative to the current working directory." msgstr "" -#: library/http.server.rst:372 +#: library/http.server.rst:394 msgid "" -"If the request was mapped to a directory, the directory is checked for a " -"file named ``index.html`` or ``index.htm`` (in that order). If found, the " -"file's contents are returned; otherwise a directory listing is generated by " -"calling the :meth:`list_directory` method. This method uses :func:`os." -"listdir` to scan the directory, and returns a ``404`` error response if the :" -"func:`~os.listdir` fails." +"If the request was mapped to a directory, the directory is checked for an " +"index page as specified by :attr:`index_pages`. If found, the file's " +"contents are returned; otherwise a directory listing is generated by calling " +"the :meth:`list_directory` method. This method uses :func:`os.listdir` to " +"scan the directory, and returns a ``404`` error response if the :func:`~os." +"listdir` fails." msgstr "" -#: library/http.server.rst:379 +#: library/http.server.rst:401 msgid "" "If the request was mapped to a file, it is opened. Any :exc:`OSError` " "exception in opening the requested file is mapped to a ``404``, ``'File not " @@ -473,37 +498,68 @@ msgid "" "*extensions_map* variable, and the file contents are returned." msgstr "" -#: library/http.server.rst:387 +#: library/http.server.rst:409 msgid "" "A ``'Content-type:'`` header with the guessed content type is output, " "followed by a ``'Content-Length:'`` header with the file's size and a " "``'Last-Modified:'`` header with the file's modification time." msgstr "" -#: library/http.server.rst:391 +#: library/http.server.rst:413 msgid "" "Then follows a blank line signifying the end of the headers, and then the " "contents of the file are output." msgstr "" -#: library/http.server.rst:394 +#: library/http.server.rst:416 msgid "" "For example usage, see the implementation of the ``test`` function in :" "source:`Lib/http/server.py`." msgstr "" -#: library/http.server.rst:397 +#: library/http.server.rst:419 msgid "Support of the ``'If-Modified-Since'`` header." msgstr "" -#: library/http.server.rst:400 +#: library/http.server.rst:424 +msgid "Helper to list the contents of *path* when no index page is present." +msgstr "" + +#: library/http.server.rst:426 +msgid "" +"This returns either a :term:`file-like object` (which must be closed by the " +"caller) or ``None`` to indicate an error, in which case the caller has " +"nothing further to do. In either case, the headers are sent." +msgstr "" + +#: library/http.server.rst:432 +msgid "Guess the type of the file at the given *path*." +msgstr "" + +#: library/http.server.rst:434 +msgid "" +"This returns a string of the form ``type/subtype``, usable for a MIME " +"Content-type header." +msgstr "" + +#: library/http.server.rst:437 +msgid "" +"The default implementation looks the file's extension up in :attr:" +"`extensions_map`, falling back to :func:`mimetypes.guess_file_type` and then " +"to ``'application/octet-stream'``." +msgstr "" + +#: library/http.server.rst:442 +msgid "Add :func:`mimetypes.guess_file_type` as a fallback." +msgstr "" + +#: library/http.server.rst:446 msgid "" -"The :class:`SimpleHTTPRequestHandler` class can be used in the following " -"manner in order to create a very basic webserver serving files relative to " -"the current directory::" +"The :class:`SimpleHTTPRequestHandler` class can be used to create a very " +"basic webserver serving files relative to the current directory as follows::" msgstr "" -#: library/http.server.rst:404 +#: library/http.server.rst:449 msgid "" "import http.server\n" "import socketserver\n" @@ -517,28 +573,28 @@ msgid "" " httpd.serve_forever()" msgstr "" -#: library/http.server.rst:416 +#: library/http.server.rst:461 msgid "" ":class:`SimpleHTTPRequestHandler` can also be subclassed to enhance " "behavior, such as using different index file names by overriding the class " -"attribute :attr:`index_pages`." +"attribute :attr:`~SimpleHTTPRequestHandler.index_pages`." msgstr "" -#: library/http.server.rst:423 +#: library/http.server.rst:468 msgid "" "This class is used to serve either files or output of CGI scripts from the " "current directory and below. Note that mapping HTTP hierarchic structure to " "local directory structure is exactly as in :class:`SimpleHTTPRequestHandler`." msgstr "" -#: library/http.server.rst:429 +#: library/http.server.rst:474 msgid "" "CGI scripts run by the :class:`CGIHTTPRequestHandler` class cannot execute " "redirects (HTTP code 302), because code 200 (script output follows) is sent " "prior to execution of the CGI script. This pre-empts the status code." msgstr "" -#: library/http.server.rst:434 +#: library/http.server.rst:479 msgid "" "The class will however, run the CGI script, instead of serving it as a file, " "if it guesses it to be a CGI script. Only directory-based CGI are used --- " @@ -546,41 +602,42 @@ msgid "" "denoting CGI scripts." msgstr "" -#: library/http.server.rst:439 +#: library/http.server.rst:484 msgid "" -"The :func:`do_GET` and :func:`do_HEAD` functions are modified to run CGI " +"The :func:`~SimpleHTTPRequestHandler.do_GET` and :func:" +"`~SimpleHTTPRequestHandler.do_HEAD` functions are modified to run CGI " "scripts and serve the output, instead of serving files, if the request leads " "to somewhere below the ``cgi_directories`` path." msgstr "" -#: library/http.server.rst:443 +#: library/http.server.rst:490 msgid "The :class:`CGIHTTPRequestHandler` defines the following data member:" msgstr "" -#: library/http.server.rst:447 +#: library/http.server.rst:494 msgid "" "This defaults to ``['/cgi-bin', '/htbin']`` and describes directories to " "treat as containing CGI scripts." msgstr "" -#: library/http.server.rst:450 +#: library/http.server.rst:497 msgid "The :class:`CGIHTTPRequestHandler` defines the following method:" msgstr "" -#: library/http.server.rst:454 +#: library/http.server.rst:501 msgid "" "This method serves the ``'POST'`` request type, only allowed for CGI " "scripts. Error 501, \"Can only POST to CGI scripts\", is output when trying " "to POST to a non-CGI url." msgstr "" -#: library/http.server.rst:458 +#: library/http.server.rst:505 msgid "" "Note that CGI scripts will be run with UID of user nobody, for security " "reasons. Problems with the CGI script will be translated to error 403." msgstr "" -#: library/http.server.rst:463 +#: library/http.server.rst:510 msgid "" ":class:`CGIHTTPRequestHandler` is being removed in 3.15. CGI has not been " "considered a good way to do things for well over a decade. This code has " @@ -589,108 +646,116 @@ msgid "" "server-security>`." msgstr "" -#: library/http.server.rst:473 +#: library/http.server.rst:520 msgid "Command-line interface" msgstr "" -#: library/http.server.rst:475 +#: library/http.server.rst:522 msgid "" ":mod:`http.server` can also be invoked directly using the :option:`-m` " "switch of the interpreter. The following example illustrates how to serve " -"files relative to the current directory::" +"files relative to the current directory:" msgstr "" -#: library/http.server.rst:479 +#: library/http.server.rst:526 msgid "python -m http.server [OPTIONS] [port]" msgstr "" -#: library/http.server.rst:481 +#: library/http.server.rst:530 msgid "The following options are accepted:" msgstr "" -#: library/http.server.rst:487 +#: library/http.server.rst:536 msgid "" "The server listens to port 8000 by default. The default can be overridden by " -"passing the desired port number as an argument::" +"passing the desired port number as an argument:" msgstr "" -#: library/http.server.rst:490 +#: library/http.server.rst:539 msgid "python -m http.server 9000" msgstr "" -#: library/http.server.rst:494 +#: library/http.server.rst:545 msgid "" "Specifies a specific address to which it should bind. Both IPv4 and IPv6 " "addresses are supported. By default, the server binds itself to all " "interfaces. For example, the following command causes the server to bind to " -"localhost only::" +"localhost only:" msgstr "" -#: library/http.server.rst:499 +#: library/http.server.rst:550 msgid "python -m http.server --bind 127.0.0.1" msgstr "" -#: library/http.server.rst:503 +#: library/http.server.rst:556 msgid "Support IPv6 in the ``--bind`` option." msgstr "" -#: library/http.server.rst:508 +#: library/http.server.rst:561 msgid "" "Specifies a directory to which it should serve the files. By default, the " "server uses the current directory. For example, the following command uses a " -"specific directory::" +"specific directory:" msgstr "" -#: library/http.server.rst:512 +#: library/http.server.rst:565 msgid "python -m http.server --directory /tmp/" msgstr "" -#: library/http.server.rst:518 +#: library/http.server.rst:573 msgid "" "Specifies the HTTP version to which the server is conformant. By default, " "the server is conformant to HTTP/1.0. For example, the following command " -"runs an HTTP/1.1 conformant server::" +"runs an HTTP/1.1 conformant server:" msgstr "" -#: library/http.server.rst:522 +#: library/http.server.rst:577 msgid "python -m http.server --protocol HTTP/1.1" msgstr "" -#: library/http.server.rst:528 +#: library/http.server.rst:585 msgid "" ":class:`CGIHTTPRequestHandler` can be enabled in the command line by passing " -"the ``--cgi`` option::" +"the ``--cgi`` option:" msgstr "" -#: library/http.server.rst:531 +#: library/http.server.rst:588 msgid "python -m http.server --cgi" msgstr "" -#: library/http.server.rst:535 +#: library/http.server.rst:594 msgid "" ":mod:`http.server` command line ``--cgi`` support is being removed because :" "class:`CGIHTTPRequestHandler` is being removed." msgstr "" -#: library/http.server.rst:540 +#: library/http.server.rst:599 msgid "" ":class:`CGIHTTPRequestHandler` and the ``--cgi`` command-line option are not " "intended for use by untrusted clients and may be vulnerable to exploitation. " "Always use within a secure environment." msgstr "" -#: library/http.server.rst:548 +#: library/http.server.rst:607 msgid "Security considerations" msgstr "" -#: library/http.server.rst:552 +#: library/http.server.rst:611 msgid "" ":class:`SimpleHTTPRequestHandler` will follow symbolic links when handling " -"requests, this makes it possible for files outside of the specified " +"requests which makes it possible for files outside of the specified " "directory to be served." msgstr "" -#: library/http.server.rst:556 +#: library/http.server.rst:615 +msgid "" +"Methods :meth:`BaseHTTPRequestHandler.send_header` and :meth:" +"`BaseHTTPRequestHandler.send_response_only` assume sanitized input and do " +"not perform input validation such as checking for the presence of CRLF " +"sequences. Untrusted input may result in HTTP header injection attacks." +msgstr "" + +#: library/http.server.rst:620 msgid "" "Earlier versions of Python did not scrub control characters from the log " "messages emitted to stderr from ``python -m http.server`` or the default :" @@ -699,7 +764,7 @@ msgid "" "codes to your terminal." msgstr "" -#: library/http.server.rst:562 +#: library/http.server.rst:626 msgid "Control characters are scrubbed in stderr logs." msgstr "" @@ -727,10 +792,10 @@ msgstr "" msgid "httpd" msgstr "" -#: library/http.server.rst:550 +#: library/http.server.rst:609 msgid "http.server" msgstr "" -#: library/http.server.rst:550 +#: library/http.server.rst:609 msgid "security" msgstr "" diff --git a/library/i18n.po b/library/i18n.po index cd8cea565..3173524bf 100644 --- a/library/i18n.po +++ b/library/i18n.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/idle.po b/library/idle.po index 4b9339f5e..b96c0d3d3 100644 --- a/library/idle.po +++ b/library/idle.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -65,11 +65,22 @@ msgstr "" msgid "configuration, browsers, and other dialogs" msgstr "" -#: library/idle.rst:41 +#: library/idle.rst:40 +msgid "The IDLE application is implemented in the :mod:`idlelib` package." +msgstr "" + +#: library/idle.rst:42 +msgid "" +"This is an optional module. If it is missing from your copy of CPython, look " +"for documentation from your distributor (that is, whoever provided Python to " +"you). If you are the distributor, see Requirements for optional modules." +msgstr "" + +#: library/idle.rst:46 msgid "Menus" msgstr "" -#: library/idle.rst:43 +#: library/idle.rst:48 msgid "" "IDLE has two main window types, the Shell window and the Editor window. It " "is possible to have multiple editor windows simultaneously. On Windows and " @@ -77,81 +88,81 @@ msgid "" "which window type it is associated with." msgstr "" -#: library/idle.rst:48 +#: library/idle.rst:53 msgid "" "Output windows, such as used for Edit => Find in Files, are a subtype of " "editor window. They currently have the same top menu but a different " "default title and context menu." msgstr "" -#: library/idle.rst:52 +#: library/idle.rst:57 msgid "" "On macOS, there is one application menu. It dynamically changes according " "to the window currently selected. It has an IDLE menu, and some entries " "described below are moved around to conform to Apple guidelines." msgstr "" -#: library/idle.rst:57 +#: library/idle.rst:62 msgid "File menu (Shell and Editor)" msgstr "" -#: library/idle.rst:59 +#: library/idle.rst:64 msgid "New File" msgstr "" -#: library/idle.rst:60 +#: library/idle.rst:65 msgid "Create a new file editing window." msgstr "" -#: library/idle.rst:62 +#: library/idle.rst:67 msgid "Open..." msgstr "" -#: library/idle.rst:63 +#: library/idle.rst:68 msgid "Open an existing file with an Open dialog." msgstr "" -#: library/idle.rst:65 +#: library/idle.rst:70 msgid "Open Module..." msgstr "" -#: library/idle.rst:66 +#: library/idle.rst:71 msgid "Open an existing module (searches sys.path)." msgstr "" -#: library/idle.rst:68 +#: library/idle.rst:73 msgid "Recent Files" msgstr "" -#: library/idle.rst:69 +#: library/idle.rst:74 msgid "Open a list of recent files. Click one to open it." msgstr "" -#: library/idle.rst:75 +#: library/idle.rst:80 msgid "Module Browser" msgstr "" -#: library/idle.rst:76 +#: library/idle.rst:81 msgid "" "Show functions, classes, and methods in the current Editor file in a tree " "structure. In the shell, open a module first." msgstr "" -#: library/idle.rst:79 +#: library/idle.rst:84 msgid "Path Browser" msgstr "" -#: library/idle.rst:80 +#: library/idle.rst:85 msgid "" "Show sys.path directories, modules, functions, classes and methods in a tree " "structure." msgstr "" -#: library/idle.rst:83 +#: library/idle.rst:88 msgid "Save" msgstr "" -#: library/idle.rst:84 +#: library/idle.rst:89 msgid "" "Save the current window to the associated file, if there is one. Windows " "that have been changed since being opened or last saved have a \\* before " @@ -159,11 +170,11 @@ msgid "" "instead." msgstr "" -#: library/idle.rst:89 +#: library/idle.rst:94 msgid "Save As..." msgstr "" -#: library/idle.rst:90 +#: library/idle.rst:95 msgid "" "Save the current window with a Save As dialog. The file saved becomes the " "new associated file for the window. (If your file manager is set to hide " @@ -172,280 +183,280 @@ msgid "" "text files, except that on macOS Aqua,'.py' is added for all files.)" msgstr "" -#: library/idle.rst:96 +#: library/idle.rst:101 msgid "Save Copy As..." msgstr "" -#: library/idle.rst:97 +#: library/idle.rst:102 msgid "" "Save the current window to different file without changing the associated " "file. (See Save As note above about filename extensions.)" msgstr "" -#: library/idle.rst:100 +#: library/idle.rst:105 msgid "Print Window" msgstr "" -#: library/idle.rst:101 +#: library/idle.rst:106 msgid "Print the current window to the default printer." msgstr "" -#: library/idle.rst:103 +#: library/idle.rst:108 msgid "Close Window" msgstr "" -#: library/idle.rst:104 +#: library/idle.rst:109 msgid "" "Close the current window (if an unsaved editor, ask to save; if an unsaved " "Shell, ask to quit execution). Calling ``exit()`` or ``close()`` in the " "Shell window also closes Shell. If this is the only window, also exit IDLE." msgstr "" -#: library/idle.rst:108 +#: library/idle.rst:113 msgid "Exit IDLE" msgstr "" -#: library/idle.rst:109 +#: library/idle.rst:114 msgid "Close all windows and quit IDLE (ask to save unsaved edit windows)." msgstr "" -#: library/idle.rst:112 +#: library/idle.rst:117 msgid "Edit menu (Shell and Editor)" msgstr "" -#: library/idle.rst:114 +#: library/idle.rst:119 msgid "Undo" msgstr "" -#: library/idle.rst:115 +#: library/idle.rst:120 msgid "" "Undo the last change to the current window. A maximum of 1000 changes may " "be undone." msgstr "" -#: library/idle.rst:118 +#: library/idle.rst:123 msgid "Redo" msgstr "" -#: library/idle.rst:119 +#: library/idle.rst:124 msgid "Redo the last undone change to the current window." msgstr "" -#: library/idle.rst:121 +#: library/idle.rst:126 msgid "Select All" msgstr "" -#: library/idle.rst:122 +#: library/idle.rst:127 msgid "Select the entire contents of the current window." msgstr "" -#: library/idle.rst:356 library/idle.rst:370 +#: library/idle.rst:361 library/idle.rst:375 msgid "Cut" msgstr "" -#: library/idle.rst:371 +#: library/idle.rst:376 msgid "" "Copy selection into the system-wide clipboard; then delete the selection." msgstr "" -#: library/idle.rst:356 library/idle.rst:373 +#: library/idle.rst:361 library/idle.rst:378 msgid "Copy" msgstr "" -#: library/idle.rst:374 +#: library/idle.rst:379 msgid "Copy selection into the system-wide clipboard." msgstr "" -#: library/idle.rst:356 library/idle.rst:376 +#: library/idle.rst:361 library/idle.rst:381 msgid "Paste" msgstr "" -#: library/idle.rst:377 +#: library/idle.rst:382 msgid "Insert contents of the system-wide clipboard into the current window." msgstr "" -#: library/idle.rst:133 +#: library/idle.rst:138 msgid "The clipboard functions are also available in context menus." msgstr "" -#: library/idle.rst:135 +#: library/idle.rst:140 msgid "Find..." msgstr "" -#: library/idle.rst:136 +#: library/idle.rst:141 msgid "Open a search dialog with many options" msgstr "" -#: library/idle.rst:138 +#: library/idle.rst:143 msgid "Find Again" msgstr "" -#: library/idle.rst:139 +#: library/idle.rst:144 msgid "Repeat the last search, if there is one." msgstr "" -#: library/idle.rst:141 +#: library/idle.rst:146 msgid "Find Selection" msgstr "" -#: library/idle.rst:142 +#: library/idle.rst:147 msgid "Search for the currently selected string, if there is one." msgstr "" -#: library/idle.rst:144 +#: library/idle.rst:149 msgid "Find in Files..." msgstr "" -#: library/idle.rst:145 +#: library/idle.rst:150 msgid "Open a file search dialog. Put results in a new output window." msgstr "" -#: library/idle.rst:147 +#: library/idle.rst:152 msgid "Replace..." msgstr "" -#: library/idle.rst:148 +#: library/idle.rst:153 msgid "Open a search-and-replace dialog." msgstr "" -#: library/idle.rst:150 +#: library/idle.rst:155 msgid "Go to Line" msgstr "" -#: library/idle.rst:151 +#: library/idle.rst:156 msgid "" "Move the cursor to the beginning of the line requested and make that line " "visible. A request past the end of the file goes to the end. Clear any " "selection and update the line and column status." msgstr "" -#: library/idle.rst:155 +#: library/idle.rst:160 msgid "Show Completions" msgstr "" -#: library/idle.rst:156 +#: library/idle.rst:161 msgid "" "Open a scrollable list allowing selection of existing names. See :ref:" -"`Completions ` in the Editing and navigation section below." +"`Completions ` in the Editing and Navigation section below." msgstr "" -#: library/idle.rst:159 +#: library/idle.rst:164 msgid "Expand Word" msgstr "" -#: library/idle.rst:160 +#: library/idle.rst:165 msgid "" "Expand a prefix you have typed to match a full word in the same window; " "repeat to get a different expansion." msgstr "" -#: library/idle.rst:163 +#: library/idle.rst:168 msgid "Show Call Tip" msgstr "" -#: library/idle.rst:164 +#: library/idle.rst:169 msgid "" "After an unclosed parenthesis for a function, open a small window with " "function parameter hints. See :ref:`Calltips ` in the Editing and " -"navigation section below." +"Navigation section below." msgstr "" -#: library/idle.rst:168 +#: library/idle.rst:173 msgid "Show Surrounding Parens" msgstr "" -#: library/idle.rst:169 +#: library/idle.rst:174 msgid "Highlight the surrounding parenthesis." msgstr "" -#: library/idle.rst:174 +#: library/idle.rst:179 msgid "Format menu (Editor window only)" msgstr "" -#: library/idle.rst:176 +#: library/idle.rst:181 msgid "Format Paragraph" msgstr "" -#: library/idle.rst:177 +#: library/idle.rst:182 msgid "" -"Reformat the current blank-line-delimited paragraph in comment block or " -"multiline string or selected line in a string. All lines in the paragraph " -"will be formatted to less than N columns, where N defaults to 72." +"Rewrap the text block containing the text insert cursor. Avoid code lines. " +"See :ref:`Format block` in the Editing and Navigation section " +"below." msgstr "" -#: library/idle.rst:181 +#: library/idle.rst:186 msgid "Indent Region" msgstr "" -#: library/idle.rst:182 +#: library/idle.rst:187 msgid "Shift selected lines right by the indent width (default 4 spaces)." msgstr "" -#: library/idle.rst:184 +#: library/idle.rst:189 msgid "Dedent Region" msgstr "" -#: library/idle.rst:185 +#: library/idle.rst:190 msgid "Shift selected lines left by the indent width (default 4 spaces)." msgstr "" -#: library/idle.rst:187 +#: library/idle.rst:192 msgid "Comment Out Region" msgstr "" -#: library/idle.rst:188 +#: library/idle.rst:193 msgid "Insert ## in front of selected lines." msgstr "" -#: library/idle.rst:190 +#: library/idle.rst:195 msgid "Uncomment Region" msgstr "" -#: library/idle.rst:191 +#: library/idle.rst:196 msgid "Remove leading # or ## from selected lines." msgstr "" -#: library/idle.rst:193 +#: library/idle.rst:198 msgid "Tabify Region" msgstr "" -#: library/idle.rst:194 +#: library/idle.rst:199 msgid "" "Turn *leading* stretches of spaces into tabs. (Note: We recommend using 4 " "space blocks to indent Python code.)" msgstr "" -#: library/idle.rst:197 +#: library/idle.rst:202 msgid "Untabify Region" msgstr "" -#: library/idle.rst:198 +#: library/idle.rst:203 msgid "Turn *all* tabs into the correct number of spaces." msgstr "" -#: library/idle.rst:200 +#: library/idle.rst:205 msgid "Toggle Tabs" msgstr "" -#: library/idle.rst:201 +#: library/idle.rst:206 msgid "Open a dialog to switch between indenting with spaces and tabs." msgstr "" -#: library/idle.rst:203 +#: library/idle.rst:208 msgid "New Indent Width" msgstr "" -#: library/idle.rst:204 +#: library/idle.rst:209 msgid "" "Open a dialog to change indent width. The accepted default by the Python " "community is 4 spaces." msgstr "" -#: library/idle.rst:207 +#: library/idle.rst:212 msgid "Strip Trailing Whitespace" msgstr "" -#: library/idle.rst:208 +#: library/idle.rst:213 msgid "" "Remove trailing space and other whitespace characters after the last non-" "whitespace character of a line by applying :meth:`str.rstrip` to each line, " @@ -453,15 +464,15 @@ msgid "" "extra newlines at the end of the file." msgstr "" -#: library/idle.rst:217 +#: library/idle.rst:222 msgid "Run menu (Editor window only)" msgstr "" -#: library/idle.rst:221 +#: library/idle.rst:226 msgid "Run Module" msgstr "" -#: library/idle.rst:222 +#: library/idle.rst:227 msgid "" "Do :ref:`Check Module `. If no error, restart the shell to " "clean the environment, then execute the module. Output is displayed in the " @@ -471,22 +482,22 @@ msgid "" "similar to executing a file with ``python -i file`` at a command line." msgstr "" -#: library/idle.rst:232 +#: library/idle.rst:237 msgid "Run... Customized" msgstr "" -#: library/idle.rst:233 +#: library/idle.rst:238 msgid "" "Same as :ref:`Run Module `, but run the module with customized " "settings. *Command Line Arguments* extend :data:`sys.argv` as if passed on " "a command line. The module can be run in the Shell without restarting." msgstr "" -#: library/idle.rst:239 +#: library/idle.rst:244 msgid "Check Module" msgstr "" -#: library/idle.rst:240 +#: library/idle.rst:245 msgid "" "Check the syntax of the module currently open in the Editor window. If the " "module has not been saved IDLE will either prompt the user to save or " @@ -495,70 +506,70 @@ msgid "" "window." msgstr "" -#: library/idle.rst:248 +#: library/idle.rst:253 msgid "Python Shell" msgstr "" -#: library/idle.rst:249 +#: library/idle.rst:254 msgid "Open or wake up the Python Shell window." msgstr "" -#: library/idle.rst:253 +#: library/idle.rst:258 msgid "Shell menu (Shell window only)" msgstr "" -#: library/idle.rst:255 +#: library/idle.rst:260 msgid "View Last Restart" msgstr "" -#: library/idle.rst:256 +#: library/idle.rst:261 msgid "Scroll the shell window to the last Shell restart." msgstr "" -#: library/idle.rst:258 +#: library/idle.rst:263 msgid "Restart Shell" msgstr "" -#: library/idle.rst:259 +#: library/idle.rst:264 msgid "" "Restart the shell to clean the environment and reset display and exception " "handling." msgstr "" -#: library/idle.rst:261 +#: library/idle.rst:266 msgid "Previous History" msgstr "" -#: library/idle.rst:262 +#: library/idle.rst:267 msgid "" "Cycle through earlier commands in history which match the current entry." msgstr "" -#: library/idle.rst:264 +#: library/idle.rst:269 msgid "Next History" msgstr "" -#: library/idle.rst:265 +#: library/idle.rst:270 msgid "Cycle through later commands in history which match the current entry." msgstr "" -#: library/idle.rst:267 +#: library/idle.rst:272 msgid "Interrupt Execution" msgstr "" -#: library/idle.rst:268 +#: library/idle.rst:273 msgid "Stop a running program." msgstr "" -#: library/idle.rst:271 +#: library/idle.rst:276 msgid "Debug menu (Shell window only)" msgstr "" -#: library/idle.rst:273 +#: library/idle.rst:278 msgid "Go to File/Line" msgstr "" -#: library/idle.rst:274 +#: library/idle.rst:279 msgid "" "Look on the current line. with the cursor, and the line above for a filename " "and line number. If found, open the file if not already open, and show the " @@ -567,45 +578,45 @@ msgid "" "Shell window and Output windows." msgstr "" -#: library/idle.rst:284 +#: library/idle.rst:289 msgid "Debugger (toggle)" msgstr "" -#: library/idle.rst:285 +#: library/idle.rst:290 msgid "" "When activated, code entered in the Shell or run from an Editor will run " "under the debugger. In the Editor, breakpoints can be set with the context " "menu. This feature is still incomplete and somewhat experimental." msgstr "" -#: library/idle.rst:289 +#: library/idle.rst:294 msgid "Stack Viewer" msgstr "" -#: library/idle.rst:290 +#: library/idle.rst:295 msgid "" "Show the stack traceback of the last exception in a tree widget, with access " "to locals and globals." msgstr "" -#: library/idle.rst:293 +#: library/idle.rst:298 msgid "Auto-open Stack Viewer" msgstr "" -#: library/idle.rst:294 +#: library/idle.rst:299 msgid "" "Toggle automatically opening the stack viewer on an unhandled exception." msgstr "" -#: library/idle.rst:297 +#: library/idle.rst:302 msgid "Options menu (Shell and Editor)" msgstr "" -#: library/idle.rst:299 +#: library/idle.rst:304 msgid "Configure IDLE" msgstr "" -#: library/idle.rst:300 +#: library/idle.rst:305 msgid "" "Open a configuration dialog and change preferences for the following: fonts, " "indentation, keybindings, text color themes, startup windows and size, " @@ -614,39 +625,39 @@ msgid "" "see :ref:`Setting preferences ` under Help and preferences." msgstr "" -#: library/idle.rst:307 +#: library/idle.rst:312 msgid "" "Most configuration options apply to all windows or all future windows. The " "option items below only apply to the active window." msgstr "" -#: library/idle.rst:310 +#: library/idle.rst:315 msgid "Show/Hide Code Context (Editor Window only)" msgstr "" -#: library/idle.rst:311 +#: library/idle.rst:316 msgid "" "Open a pane at the top of the edit window which shows the block context of " "the code which has scrolled above the top of the window. See :ref:`Code " "Context ` in the Editing and Navigation section below." msgstr "" -#: library/idle.rst:316 +#: library/idle.rst:321 msgid "Show/Hide Line Numbers (Editor Window only)" msgstr "" -#: library/idle.rst:317 +#: library/idle.rst:322 msgid "" "Open a column to the left of the edit window which shows the number of each " "line of text. The default is off, which may be changed in the preferences " "(see :ref:`Setting preferences `)." msgstr "" -#: library/idle.rst:321 +#: library/idle.rst:326 msgid "Zoom/Restore Height" msgstr "" -#: library/idle.rst:322 +#: library/idle.rst:327 msgid "" "Toggles the window between normal size and maximum height. The initial size " "defaults to 40 lines by 80 chars unless changed on the General tab of the " @@ -656,74 +667,74 @@ msgid "" "no effect when a window is maximized." msgstr "" -#: library/idle.rst:330 +#: library/idle.rst:335 msgid "Window menu (Shell and Editor)" msgstr "" -#: library/idle.rst:332 +#: library/idle.rst:337 msgid "" "Lists the names of all open windows; select one to bring it to the " "foreground (deiconifying it if necessary)." msgstr "" -#: library/idle.rst:336 +#: library/idle.rst:341 msgid "Help menu (Shell and Editor)" msgstr "" -#: library/idle.rst:338 +#: library/idle.rst:343 msgid "About IDLE" msgstr "" -#: library/idle.rst:339 +#: library/idle.rst:344 msgid "Display version, copyright, license, credits, and more." msgstr "" -#: library/idle.rst:341 +#: library/idle.rst:346 msgid "IDLE Help" msgstr "" -#: library/idle.rst:342 +#: library/idle.rst:347 msgid "" "Display this IDLE document, detailing the menu options, basic editing and " "navigation, and other tips." msgstr "" -#: library/idle.rst:345 +#: library/idle.rst:350 msgid "Python Docs" msgstr "" -#: library/idle.rst:346 +#: library/idle.rst:351 msgid "" "Access local Python documentation, if installed, or start a web browser and " "open docs.python.org showing the latest Python documentation." msgstr "" -#: library/idle.rst:349 +#: library/idle.rst:354 msgid "Turtle Demo" msgstr "" -#: library/idle.rst:350 +#: library/idle.rst:355 msgid "Run the turtledemo module with example Python code and turtle drawings." msgstr "" -#: library/idle.rst:352 +#: library/idle.rst:357 msgid "" "Additional help sources may be added here with the Configure IDLE dialog " "under the General tab. See the :ref:`Help sources ` subsection " "below for more on Help menu choices." msgstr "" -#: library/idle.rst:365 +#: library/idle.rst:370 msgid "Context menus" msgstr "" -#: library/idle.rst:367 +#: library/idle.rst:372 msgid "" "Open a context menu by right-clicking in a window (Control-click on macOS). " "Context menus have the standard clipboard functions also on the Edit menu." msgstr "" -#: library/idle.rst:379 +#: library/idle.rst:384 msgid "" "Editor windows also have breakpoint functions. Lines with a breakpoint set " "are specially marked. Breakpoints only have an effect when running under " @@ -731,66 +742,66 @@ msgid "" "directory." msgstr "" -#: library/idle.rst:384 +#: library/idle.rst:389 msgid "Set Breakpoint" msgstr "" -#: library/idle.rst:385 +#: library/idle.rst:390 msgid "Set a breakpoint on the current line." msgstr "" -#: library/idle.rst:387 +#: library/idle.rst:392 msgid "Clear Breakpoint" msgstr "" -#: library/idle.rst:388 +#: library/idle.rst:393 msgid "Clear the breakpoint on that line." msgstr "" -#: library/idle.rst:390 +#: library/idle.rst:395 msgid "Shell and Output windows also have the following." msgstr "" -#: library/idle.rst:392 +#: library/idle.rst:397 msgid "Go to file/line" msgstr "" -#: library/idle.rst:393 +#: library/idle.rst:398 msgid "Same as in Debug menu." msgstr "" -#: library/idle.rst:395 +#: library/idle.rst:400 msgid "" "The Shell window also has an output squeezing facility explained in the " "*Python Shell window* subsection below." msgstr "" -#: library/idle.rst:398 +#: library/idle.rst:403 msgid "Squeeze" msgstr "" -#: library/idle.rst:399 +#: library/idle.rst:404 msgid "" "If the cursor is over an output line, squeeze all the output between the " "code above and the prompt below down to a 'Squeezed text' label." msgstr "" -#: library/idle.rst:406 +#: library/idle.rst:411 msgid "Editing and Navigation" msgstr "" -#: library/idle.rst:409 +#: library/idle.rst:414 msgid "Editor windows" msgstr "" -#: library/idle.rst:411 +#: library/idle.rst:416 msgid "" "IDLE may open editor windows when it starts, depending on settings and how " "you start IDLE. Thereafter, use the File menu. There can be only one open " "editor window for a given file." msgstr "" -#: library/idle.rst:415 +#: library/idle.rst:420 msgid "" "The title bar contains the name of the file, the full path, and the version " "of Python and IDLE running the window. The status bar contains the line " @@ -798,17 +809,17 @@ msgid "" "numbers with 0." msgstr "" -#: library/idle.rst:420 +#: library/idle.rst:425 msgid "" "IDLE assumes that files with a known .py* extension contain Python code and " "that other files do not. Run Python code with the Run menu." msgstr "" -#: library/idle.rst:424 +#: library/idle.rst:429 msgid "Key bindings" msgstr "" -#: library/idle.rst:426 +#: library/idle.rst:431 msgid "" "The IDLE insertion cursor is a thin vertical bar between character " "positions. When characters are entered, the insertion cursor and everything " @@ -816,7 +827,7 @@ msgid "" "the new space." msgstr "" -#: library/idle.rst:431 +#: library/idle.rst:436 msgid "" "Several non-character keys move the cursor and possibly delete characters. " "Deletion does not puts text on the clipboard, but IDLE has an undo list. " @@ -825,52 +836,52 @@ msgid "" "discussions assume that the keys have not been re-bound to something else.)" msgstr "" -#: library/idle.rst:438 +#: library/idle.rst:443 msgid "Arrow keys move the cursor one character or line." msgstr "" -#: library/idle.rst:440 +#: library/idle.rst:445 msgid "" ":kbd:`C-LeftArrow` and :kbd:`C-RightArrow` moves left or right one word." msgstr "" -#: library/idle.rst:442 +#: library/idle.rst:447 msgid ":kbd:`Home` and :kbd:`End` go to the beginning or end of the line." msgstr "" -#: library/idle.rst:444 +#: library/idle.rst:449 msgid ":kbd:`Page Up` and :kbd:`Page Down` go up or down one screen." msgstr "" -#: library/idle.rst:446 +#: library/idle.rst:451 msgid ":kbd:`C-Home` and :kbd:`C-End` go to beginning or end of the file." msgstr "" -#: library/idle.rst:448 +#: library/idle.rst:453 msgid "" ":kbd:`Backspace` and :kbd:`Del` (or :kbd:`C-d`) delete the previous or next " "character." msgstr "" -#: library/idle.rst:451 +#: library/idle.rst:456 msgid ":kbd:`C-Backspace` and :kbd:`C-Del` delete one word left or right." msgstr "" -#: library/idle.rst:453 +#: library/idle.rst:458 msgid ":kbd:`C-k` deletes ('kills') everything to the right." msgstr "" -#: library/idle.rst:455 +#: library/idle.rst:460 msgid "" "Standard keybindings (like :kbd:`C-c` to copy and :kbd:`C-v` to paste) may " "work. Keybindings are selected in the Configure IDLE dialog." msgstr "" -#: library/idle.rst:459 +#: library/idle.rst:464 msgid "Automatic indentation" msgstr "" -#: library/idle.rst:461 +#: library/idle.rst:466 msgid "" "After a block-opening statement, the next line is indented by 4 spaces (in " "the Python Shell window by one tab). After certain keywords (break, return " @@ -880,17 +891,17 @@ msgid "" "tabs are restricted to four spaces due to Tcl/Tk limitations." msgstr "" -#: library/idle.rst:468 +#: library/idle.rst:473 msgid "" "See also the indent/dedent region commands on the :ref:`Format menu `." msgstr "" -#: library/idle.rst:472 +#: library/idle.rst:477 msgid "Search and Replace" msgstr "" -#: library/idle.rst:474 +#: library/idle.rst:479 msgid "" "Any selection becomes a search target. However, only selections within a " "line work because searches are only performed within lines with the terminal " @@ -898,11 +909,11 @@ msgid "" "interpreted according to the Python re module." msgstr "" -#: library/idle.rst:482 +#: library/idle.rst:487 msgid "Completions" msgstr "" -#: library/idle.rst:484 +#: library/idle.rst:489 msgid "" "Completions are supplied, when requested and available, for module names, " "attributes of classes or functions, or filenames. Each request method " @@ -915,7 +926,7 @@ msgid "" "box. A double click within the box selects and closes." msgstr "" -#: library/idle.rst:495 +#: library/idle.rst:500 msgid "" "One way to open a box is to type a key character and wait for a predefined " "interval. This defaults to 2 seconds; customize it in the settings dialog. " @@ -927,7 +938,7 @@ msgid "" "directory name and a separator." msgstr "" -#: library/idle.rst:505 +#: library/idle.rst:510 msgid "" "Instead of waiting, or after a box is closed, open a completion box " "immediately with Show Completions on the Edit menu. The default hot key is :" @@ -938,7 +949,7 @@ msgid "" "directory." msgstr "" -#: library/idle.rst:513 +#: library/idle.rst:518 msgid "" "Hitting :kbd:`Tab` after a prefix usually has the same effect as Show " "Completions. (With no prefix, it indents.) However, if there is only one " @@ -946,14 +957,14 @@ msgid "" "without opening a box." msgstr "" -#: library/idle.rst:518 +#: library/idle.rst:523 msgid "" "Invoking 'Show Completions', or hitting :kbd:`Tab` after a prefix, outside " "of a string and without a preceding '.' opens a box with keywords, builtin " "names, and available module-level names." msgstr "" -#: library/idle.rst:522 +#: library/idle.rst:527 msgid "" "When editing code in an editor (as oppose to Shell), increase the available " "module-level names by running your code and not restarting the Shell " @@ -961,18 +972,18 @@ msgid "" "file. This also increases possible attribute completions." msgstr "" -#: library/idle.rst:528 +#: library/idle.rst:533 msgid "" "Completion boxes initially exclude names beginning with '_' or, for modules, " "not included in '__all__'. The hidden names can be accessed by typing '_' " "after '.', either before or after the box is opened." msgstr "" -#: library/idle.rst:535 +#: library/idle.rst:540 msgid "Calltips" msgstr "" -#: library/idle.rst:537 +#: library/idle.rst:542 msgid "" "A calltip is shown automatically when one types :kbd:`(` after the name of " "an *accessible* function. A function name expression may include dots and " @@ -982,7 +993,7 @@ msgid "" "or enter its shortcut to display a calltip." msgstr "" -#: library/idle.rst:544 +#: library/idle.rst:549 msgid "" "The calltip consists of the function's signature and docstring up to the " "latter's first blank line or the fifth non-blank line. (Some builtin " @@ -991,14 +1002,14 @@ msgid "" "or name (keyword) only. Details are subject to change." msgstr "" -#: library/idle.rst:550 +#: library/idle.rst:555 msgid "" "In Shell, the accessible functions depends on what modules have been " "imported into the user process, including those imported by Idle itself, and " "which definitions have been run, all since the last restart." msgstr "" -#: library/idle.rst:554 +#: library/idle.rst:559 msgid "" "For example, restart the Shell and enter ``itertools.count(``. A calltip " "appears because Idle imports itertools into the user process for its own " @@ -1008,18 +1019,33 @@ msgid "" "display a calltip." msgstr "" -#: library/idle.rst:561 +#: library/idle.rst:566 msgid "" "In an editor, import statements have no effect until one runs the file. One " "might want to run a file after writing import statements, after adding " "function definitions, or after opening an existing file." msgstr "" -#: library/idle.rst:568 +#: library/idle.rst:573 +msgid "Format block" +msgstr "" + +#: library/idle.rst:575 +msgid "" +"Reformat Paragraph rewraps a block ('paragraph') of contiguous equally " +"indented non-blank comments, a similar block of text within a multiline " +"string, or a selected subset of either. If needed, add a blank line to " +"separate string from code. Partial lines in a selection expand to complete " +"lines. The resulting lines have the same indent as before but have maximum " +"total length of N columns (characters). Change the default N of 72 on the " +"Window tab of IDLE Settings." +msgstr "" + +#: library/idle.rst:587 msgid "Code Context" msgstr "" -#: library/idle.rst:570 +#: library/idle.rst:589 msgid "" "Within an editor window containing Python code, code context can be toggled " "in order to show or hide a pane at the top of the window. When shown, this " @@ -1033,23 +1059,23 @@ msgid "" "the top of the editor." msgstr "" -#: library/idle.rst:581 +#: library/idle.rst:600 msgid "" "The text and background colors for the context pane can be configured under " "the Highlights tab in the Configure IDLE dialog." msgstr "" -#: library/idle.rst:585 +#: library/idle.rst:604 msgid "Shell window" msgstr "" -#: library/idle.rst:587 +#: library/idle.rst:606 msgid "" "In IDLE's Shell, enter, edit, and recall complete statements. (Most consoles " "and terminals only work with a single physical line at a time)." msgstr "" -#: library/idle.rst:590 +#: library/idle.rst:609 msgid "" "Submit a single-line statement for execution by hitting :kbd:`Return` with " "the cursor anywhere on the line. If a line is extended with Backslash (:kbd:" @@ -1057,7 +1083,7 @@ msgid "" "compound statement by entering a blank line after the statement." msgstr "" -#: library/idle.rst:596 +#: library/idle.rst:615 msgid "" "When one pastes code into Shell, it is not compiled and possibly executed " "until one hits :kbd:`Return`, as specified above. One may edit pasted code " @@ -1066,7 +1092,7 @@ msgid "" "one." msgstr "" -#: library/idle.rst:602 +#: library/idle.rst:621 msgid "" "Lines containing ``RESTART`` mean that the user execution process has been " "re-started. This occurs when the user execution process has crashed, when " @@ -1074,38 +1100,38 @@ msgid "" "window." msgstr "" -#: library/idle.rst:607 +#: library/idle.rst:626 msgid "" "The editing features described in previous subsections work when entering " "code interactively. IDLE's Shell window also responds to the following:" msgstr "" -#: library/idle.rst:610 +#: library/idle.rst:629 msgid ":kbd:`C-c` attempts to interrupt statement execution (but may fail)." msgstr "" -#: library/idle.rst:612 +#: library/idle.rst:631 msgid ":kbd:`C-d` closes Shell if typed at a ``>>>`` prompt." msgstr "" -#: library/idle.rst:614 +#: library/idle.rst:633 msgid "" ":kbd:`Alt-p` and :kbd:`Alt-n` (:kbd:`C-p` and :kbd:`C-n` on macOS) retrieve " "to the current prompt the previous or next previously entered statement that " "matches anything already typed." msgstr "" -#: library/idle.rst:618 +#: library/idle.rst:637 msgid "" ":kbd:`Return` while the cursor is on any previous statement appends the " "latter to anything already typed at the prompt." msgstr "" -#: library/idle.rst:622 +#: library/idle.rst:641 msgid "Text colors" msgstr "" -#: library/idle.rst:624 +#: library/idle.rst:643 msgid "" "Idle defaults to black on white text, but colors text with special meanings. " "For the shell, these are shell output, shell error, user output, and user " @@ -1115,7 +1141,7 @@ msgid "" "(when present), found text (when possible), and selected text." msgstr "" -#: library/idle.rst:631 +#: library/idle.rst:650 msgid "" "IDLE also highlights the :ref:`soft keywords ` :keyword:" "`match`, :keyword:`case `, and :keyword:`_ ` in " @@ -1124,7 +1150,7 @@ msgid "" "patterns." msgstr "" -#: library/idle.rst:637 +#: library/idle.rst:656 msgid "" "Text coloring is done in the background, so uncolorized text is occasionally " "visible. To change the color scheme, use the Configure IDLE dialog " @@ -1132,11 +1158,11 @@ msgid "" "and text in popups and dialogs is not user-configurable." msgstr "" -#: library/idle.rst:644 +#: library/idle.rst:663 msgid "Startup and Code Execution" msgstr "" -#: library/idle.rst:646 +#: library/idle.rst:665 msgid "" "Upon startup with the ``-s`` option, IDLE will execute the file referenced " "by the environment variables :envvar:`IDLESTARTUP` or :envvar:" @@ -1148,7 +1174,7 @@ msgid "" "modules." msgstr "" -#: library/idle.rst:654 +#: library/idle.rst:673 msgid "" "In addition, ``Tk`` also loads a startup file if it is present. Note that " "the Tk file is loaded unconditionally. This additional file is ``.Idle.py`` " @@ -1157,72 +1183,72 @@ msgid "" "importing functions to be used from IDLE's Python shell." msgstr "" -#: library/idle.rst:663 +#: library/idle.rst:682 msgid "Command-line usage" msgstr "" -#: library/idle.rst:667 +#: library/idle.rst:686 msgid "" "IDLE can be invoked from the command line with various options. The general " "syntax is:" msgstr "" -#: library/idle.rst:669 +#: library/idle.rst:688 msgid "python -m idlelib [options] [file ...]" msgstr "" -#: library/idle.rst:673 +#: library/idle.rst:692 msgid "The following options are available:" msgstr "" -#: library/idle.rst:677 +#: library/idle.rst:696 msgid "" "Run the specified Python command in the shell window. For example, pass ``-c " "\"print('Hello, World!')\"``. On Windows, the outer quotes must be double " "quotes as shown." msgstr "" -#: library/idle.rst:683 +#: library/idle.rst:702 msgid "Enable the debugger and open the shell window." msgstr "" -#: library/idle.rst:687 +#: library/idle.rst:706 msgid "Open an editor window." msgstr "" -#: library/idle.rst:691 +#: library/idle.rst:710 msgid "Print a help message with legal combinations of options and exit." msgstr "" -#: library/idle.rst:695 +#: library/idle.rst:714 msgid "Open a shell window." msgstr "" -#: library/idle.rst:699 +#: library/idle.rst:718 msgid "Run the specified file in the shell window." msgstr "" -#: library/idle.rst:703 +#: library/idle.rst:722 msgid "" "Run the startup file (as defined by the environment variables :envvar:" "`IDLESTARTUP` or :envvar:`PYTHONSTARTUP`) before opening the shell window." msgstr "" -#: library/idle.rst:707 +#: library/idle.rst:726 msgid "Set the title of the shell window." msgstr "" -#: library/idle.rst:711 +#: library/idle.rst:730 msgid "" "Read and execute standard input in the shell window. This option must be the " "last one before any arguments." msgstr "" -#: library/idle.rst:713 +#: library/idle.rst:732 msgid "If arguments are provided:" msgstr "" -#: library/idle.rst:715 +#: library/idle.rst:734 msgid "" "If ``-``, ``-c``, or ``-r`` is used, all arguments are placed in ``sys." "argv[1:]``, and ``sys.argv[0]`` is set to ``''``, ``'-c'``, or ``'-r'`` " @@ -1230,17 +1256,17 @@ msgid "" "the *Options* dialog." msgstr "" -#: library/idle.rst:718 +#: library/idle.rst:737 msgid "" "Otherwise, arguments are treated as files to be opened for editing, and " "``sys.argv`` reflects the arguments passed to IDLE itself." msgstr "" -#: library/idle.rst:722 +#: library/idle.rst:741 msgid "Startup failure" msgstr "" -#: library/idle.rst:724 +#: library/idle.rst:743 msgid "" "IDLE uses a socket to communicate between the IDLE GUI process and the user " "code execution process. A connection must be established whenever the Shell " @@ -1250,7 +1276,7 @@ msgid "" "directs the user here. It then exits." msgstr "" -#: library/idle.rst:731 +#: library/idle.rst:750 msgid "" "One specific connection failure on Unix systems results from misconfigured " "masquerading rules somewhere in a system's network setup. When IDLE is " @@ -1260,7 +1286,7 @@ msgid "" "``tcplisten `` in another." msgstr "" -#: library/idle.rst:739 +#: library/idle.rst:758 msgid "" "A common cause of failure is a user-written file with the same name as a " "standard library module, such as *random.py* and *tkinter.py*. When such a " @@ -1269,7 +1295,7 @@ msgid "" "file." msgstr "" -#: library/idle.rst:745 +#: library/idle.rst:764 msgid "" "Though less common than in the past, an antivirus or firewall program may " "stop the connection. If the program cannot be taught to allow the " @@ -1279,7 +1305,7 @@ msgid "" "connections." msgstr "" -#: library/idle.rst:752 +#: library/idle.rst:771 msgid "" "Python installation issues occasionally stop IDLE: multiple versions can " "clash, or a single installation might need admin access. If one undo the " @@ -1287,7 +1313,7 @@ msgid "" "completely remove Python and start over." msgstr "" -#: library/idle.rst:757 +#: library/idle.rst:776 msgid "" "A zombie pythonw.exe process could be a problem. On Windows, use Task " "Manager to check for one and stop it if there is. Sometimes a restart " @@ -1296,7 +1322,7 @@ msgid "" "may fix a temporary problem." msgstr "" -#: library/idle.rst:763 +#: library/idle.rst:782 msgid "" "When IDLE first starts, it attempts to read user configuration files in ``~/." "idlerc/`` (~ is one's home directory). If there is a problem, an error " @@ -1307,14 +1333,14 @@ msgid "" "with the settings dialog." msgstr "" -#: library/idle.rst:771 +#: library/idle.rst:790 msgid "" "If IDLE quits with no message, and it was not started from a console, try " "starting it from a console or terminal (``python -m idlelib``) and see if " "this results in an error message." msgstr "" -#: library/idle.rst:775 +#: library/idle.rst:794 msgid "" "On Unix-based systems with tcl/tk older than ``8.6.11`` (see ``About IDLE``) " "certain characters of certain fonts can cause a tk failure with a message to " @@ -1323,11 +1349,11 @@ msgid "" "upgrade tcl/tk, then re-configure IDLE to use a font that works better." msgstr "" -#: library/idle.rst:783 +#: library/idle.rst:802 msgid "Running user code" msgstr "" -#: library/idle.rst:785 +#: library/idle.rst:804 msgid "" "With rare exceptions, the result of executing Python code with IDLE is " "intended to be the same as executing the same code by the default method, " @@ -1337,7 +1363,7 @@ msgid "" "``threading.active_count()`` returns 2 instead of 1." msgstr "" -#: library/idle.rst:792 +#: library/idle.rst:811 msgid "" "By default, IDLE runs user code in a separate OS process rather than in the " "user interface process that runs the shell and editor. In the execution " @@ -1347,7 +1373,7 @@ msgid "" "__stderr__`` are not touched, but may be ``None``." msgstr "" -#: library/idle.rst:799 +#: library/idle.rst:818 msgid "" "Sending print output from one process to a text widget in another is slower " "than printing to a system terminal in the same process. This has the most " @@ -1359,7 +1385,7 @@ msgid "" "fields and lines." msgstr "" -#: library/idle.rst:808 +#: library/idle.rst:827 msgid "" "IDLE's standard stream replacements are not inherited by subprocesses " "created in the execution process, whether directly by user code or by " @@ -1370,14 +1396,14 @@ msgid "" "attached to that window for input and output." msgstr "" -#: library/idle.rst:817 +#: library/idle.rst:836 msgid "" "If ``sys`` is reset by user code, such as with ``importlib.reload(sys)``, " "IDLE's changes are lost and input from the keyboard and output to the screen " "will not work correctly." msgstr "" -#: library/idle.rst:821 +#: library/idle.rst:840 msgid "" "When Shell has the focus, it controls the keyboard and screen. This is " "normally transparent, but functions that directly access the keyboard and " @@ -1385,7 +1411,7 @@ msgid "" "determine whether a key has been pressed and if so, which." msgstr "" -#: library/idle.rst:826 +#: library/idle.rst:845 msgid "" "The IDLE code running in the execution process adds frames to the call stack " "that would not be there otherwise. IDLE wraps ``sys.getrecursionlimit`` and " @@ -1393,17 +1419,17 @@ msgid "" "frames." msgstr "" -#: library/idle.rst:831 +#: library/idle.rst:850 msgid "" "When user code raises SystemExit either directly or by calling sys.exit, " "IDLE returns to a Shell prompt instead of exiting." msgstr "" -#: library/idle.rst:835 +#: library/idle.rst:854 msgid "User output in Shell" msgstr "" -#: library/idle.rst:837 +#: library/idle.rst:856 msgid "" "When a program outputs text, the result is determined by the corresponding " "output device. When IDLE executes user code, ``sys.stdout`` and ``sys." @@ -1413,7 +1439,7 @@ msgid "" "rather than production runs." msgstr "" -#: library/idle.rst:844 +#: library/idle.rst:863 msgid "" "For instance, Shell never throws away output. A program that sends " "unlimited output to Shell will eventually fill memory, resulting in a memory " @@ -1422,7 +1448,7 @@ msgid "" "lines, with 300 the default." msgstr "" -#: library/idle.rst:850 +#: library/idle.rst:869 msgid "" "A Tk Text widget, and hence IDLE's Shell, displays characters (codepoints) " "in the BMP (Basic Multilingual Plane) subset of Unicode. Which characters " @@ -1436,7 +1462,7 @@ msgid "" "spacing behavior.) ::" msgstr "" -#: library/idle.rst:860 +#: library/idle.rst:879 msgid "" ">>> s = 'a\\tb\\a<\\x02><\\r>\\bc\\nd' # Enter 22 chars.\n" ">>> len(s)\n" @@ -1447,7 +1473,7 @@ msgid "" "# Result varies by OS and font. Try it." msgstr "" -#: library/idle.rst:868 +#: library/idle.rst:887 msgid "" "The ``repr`` function is used for interactive echo of expression values. It " "returns an altered version of the input string in which control codes, some " @@ -1456,13 +1482,13 @@ msgid "" "regardless of how they are displayed." msgstr "" -#: library/idle.rst:874 +#: library/idle.rst:893 msgid "" "Normal and error output are generally kept separate (on separate lines) from " "code input and each other. They each get different highlight colors." msgstr "" -#: library/idle.rst:877 +#: library/idle.rst:896 msgid "" "For SyntaxError tracebacks, the normal '^' marking where the error was " "detected is replaced by coloring the text with an error highlight. When code " @@ -1471,7 +1497,7 @@ msgid "" "opened if necessary." msgstr "" -#: library/idle.rst:883 +#: library/idle.rst:902 msgid "" "Shell has a special facility for squeezing output lines down to a 'Squeezed " "text' label. This is done automatically for output over N lines (N = 50 by " @@ -1480,18 +1506,18 @@ msgid "" "on the output. This can be useful lines long enough to slow down scrolling." msgstr "" -#: library/idle.rst:891 +#: library/idle.rst:910 msgid "" "Squeezed output is expanded in place by double-clicking the label. It can " "also be sent to the clipboard or a separate view window by right-clicking " "the label." msgstr "" -#: library/idle.rst:896 +#: library/idle.rst:915 msgid "Developing tkinter applications" msgstr "" -#: library/idle.rst:898 +#: library/idle.rst:917 msgid "" "IDLE is intentionally different from standard Python in order to facilitate " "development of tkinter programs. Enter ``import tkinter as tk; root = tk." @@ -1503,7 +1529,7 @@ msgid "" "changes in standard Python until one enters ``root.update()``." msgstr "" -#: library/idle.rst:907 +#: library/idle.rst:926 msgid "" "Most tkinter programs run ``root.mainloop()``, which usually does not return " "until the tk app is destroyed. If the program is run with ``python -i`` or " @@ -1511,7 +1537,7 @@ msgid "" "``mainloop()`` returns, at which time there is nothing left to interact with." msgstr "" -#: library/idle.rst:913 +#: library/idle.rst:932 msgid "" "When running a tkinter program from an IDLE editor, one can comment out the " "mainloop call. One then gets a shell prompt immediately and can interact " @@ -1519,11 +1545,11 @@ msgid "" "mainloop call when running in standard Python." msgstr "" -#: library/idle.rst:919 +#: library/idle.rst:938 msgid "Running without a subprocess" msgstr "" -#: library/idle.rst:921 +#: library/idle.rst:940 msgid "" "By default, IDLE executes user code in a separate subprocess via a socket, " "which uses the internal loopback interface. This connection is not " @@ -1531,7 +1557,7 @@ msgid "" "firewall software complains anyway, you can ignore it." msgstr "" -#: library/idle.rst:926 +#: library/idle.rst:945 msgid "" "If the attempt to make the socket connection fails, Idle will notify you. " "Such failures are sometimes transient, but if persistent, the problem may be " @@ -1540,7 +1566,7 @@ msgid "" "command line switch." msgstr "" -#: library/idle.rst:932 +#: library/idle.rst:951 msgid "" "If IDLE is started with the -n command line switch it will run in a single " "process and will not create the subprocess which runs the RPC Python " @@ -1554,15 +1580,15 @@ msgid "" "at all possible." msgstr "" -#: library/idle.rst:947 +#: library/idle.rst:966 msgid "Help and Preferences" msgstr "" -#: library/idle.rst:952 +#: library/idle.rst:971 msgid "Help sources" msgstr "" -#: library/idle.rst:954 +#: library/idle.rst:973 msgid "" "Help menu entry \"IDLE Help\" displays a formatted html version of the IDLE " "chapter of the Library Reference. The result, in a read-only tkinter text " @@ -1572,7 +1598,7 @@ msgid "" "the opened box." msgstr "" -#: library/idle.rst:962 +#: library/idle.rst:981 msgid "" "Help menu entry \"Python Docs\" opens the extensive sources of help, " "including tutorials, available at ``docs.python.org/x.y``, where 'x.y' is " @@ -1581,17 +1607,17 @@ msgid "" "instead." msgstr "" -#: library/idle.rst:968 +#: library/idle.rst:987 msgid "" "Selected URLs can be added or removed from the help menu at any time using " "the General tab of the Configure IDLE dialog." msgstr "" -#: library/idle.rst:974 +#: library/idle.rst:993 msgid "Setting preferences" msgstr "" -#: library/idle.rst:976 +#: library/idle.rst:995 msgid "" "The font preferences, highlighting, keys, and general preferences can be " "changed via Configure IDLE on the Option menu. Non-default user settings are " @@ -1600,7 +1626,7 @@ msgid "" "or more of the files in ``.idlerc``." msgstr "" -#: library/idle.rst:982 +#: library/idle.rst:1001 msgid "" "On the Font tab, see the text sample for the effect of font face and size on " "multiple characters in multiple languages. Edit the sample to add other " @@ -1609,7 +1635,7 @@ msgid "" "them to the top of the sample and try changing first size and then font." msgstr "" -#: library/idle.rst:989 +#: library/idle.rst:1008 msgid "" "On the Highlights and Keys tab, select a built-in or custom color theme and " "key set. To use a newer built-in color theme or key set with older IDLEs, " @@ -1617,22 +1643,22 @@ msgid "" "IDLEs." msgstr "" -#: library/idle.rst:995 +#: library/idle.rst:1014 msgid "IDLE on macOS" msgstr "" -#: library/idle.rst:997 +#: library/idle.rst:1016 msgid "" "Under System Preferences: Dock, one can set \"Prefer tabs when opening " "documents\" to \"Always\". This setting is not compatible with the tk/" "tkinter GUI framework used by IDLE, and it breaks a few IDLE features." msgstr "" -#: library/idle.rst:1002 +#: library/idle.rst:1021 msgid "Extensions" msgstr "" -#: library/idle.rst:1004 +#: library/idle.rst:1023 msgid "" "IDLE contains an extension facility. Preferences for extensions can be " "changed with the Extensions tab of the preferences dialog. See the beginning " @@ -1641,21 +1667,21 @@ msgid "" "testing." msgstr "" -#: library/idle.rst:1012 +#: library/idle.rst:1031 msgid "idlelib --- implementation of IDLE application" msgstr "" -#: library/idle.rst:1017 +#: library/idle.rst:1036 msgid "**Source code:** :source:`Lib/idlelib`" msgstr "" -#: library/idle.rst:1021 +#: library/idle.rst:1040 msgid "" "The Lib/idlelib package implements the IDLE application. See the rest of " "this page for how to use IDLE." msgstr "" -#: library/idle.rst:1024 +#: library/idle.rst:1043 msgid "" "The files in idlelib are described in idlelib/README.txt. Access it either " "in idlelib or click Help => About IDLE on the IDLE menu. This file also " @@ -1676,26 +1702,26 @@ msgstr "" msgid "Integrated Development Environment" msgstr "" -#: library/idle.rst:71 +#: library/idle.rst:76 msgid "Module browser" msgstr "" -#: library/idle.rst:71 +#: library/idle.rst:76 msgid "Path browser" msgstr "" -#: library/idle.rst:213 +#: library/idle.rst:218 msgid "Run script" msgstr "" -#: library/idle.rst:280 +#: library/idle.rst:285 msgid "debugger" msgstr "" -#: library/idle.rst:280 +#: library/idle.rst:285 msgid "stack viewer" msgstr "" -#: library/idle.rst:356 +#: library/idle.rst:361 msgid "breakpoints" msgstr "" diff --git a/library/imaplib.po b/library/imaplib.po index b34a26a47..d1373d55e 100644 --- a/library/imaplib.po +++ b/library/imaplib.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -30,7 +30,7 @@ msgid "" "This module defines three classes, :class:`IMAP4`, :class:`IMAP4_SSL` and :" "class:`IMAP4_stream`, which encapsulate a connection to an IMAP4 server and " "implement a large subset of the IMAP4rev1 client protocol as defined in :rfc:" -"`2060`. It is backward compatible with IMAP4 (:rfc:`1730`) servers, but note " +"`3501`. It is backward compatible with IMAP4 (:rfc:`1730`) servers, but note " "that the ``STATUS`` command is not supported in IMAP4." msgstr "" @@ -81,7 +81,7 @@ msgstr "" msgid "Support for the :keyword:`with` statement was added." msgstr "" -#: library/imaplib.rst:111 +#: library/imaplib.rst:118 msgid "The optional *timeout* parameter was added." msgstr "" @@ -126,60 +126,70 @@ msgid "" "for best practices." msgstr "" -#: library/imaplib.rst:99 +#: library/imaplib.rst:523 +msgid "" +"With the default *ssl_context*, the connection is encrypted but the server " +"certificate and hostname are not verified. To verify them, pass a context " +"created by :func:`ssl.create_default_context`." +msgstr "" + +#: library/imaplib.rst:106 msgid "" "The optional *timeout* parameter specifies a timeout in seconds for the " "connection attempt. If timeout is not given or is ``None``, the global " "default socket timeout is used." msgstr "" -#: library/imaplib.rst:103 +#: library/imaplib.rst:110 msgid "*ssl_context* parameter was added." msgstr "" -#: library/imaplib.rst:106 +#: library/imaplib.rst:113 msgid "" "The class now supports hostname check with :attr:`ssl.SSLContext." "check_hostname` and *Server Name Indication* (see :const:`ssl.HAS_SNI`)." msgstr "" -#: library/imaplib.rst:114 +#: library/imaplib.rst:121 msgid "The deprecated *keyfile* and *certfile* parameters have been removed." msgstr "" -#: library/imaplib.rst:117 +#: library/imaplib.rst:124 msgid "The second subclass allows for connections created by a child process:" msgstr "" -#: library/imaplib.rst:122 +#: library/imaplib.rst:129 msgid "" "This is a subclass derived from :class:`IMAP4` that connects to the ``stdin/" "stdout`` file descriptors created by passing *command* to ``subprocess." "Popen()``." msgstr "" -#: library/imaplib.rst:127 +#: library/imaplib.rst:134 msgid "The following utility functions are defined:" msgstr "" -#: library/imaplib.rst:132 +#: library/imaplib.rst:139 msgid "" -"Parse an IMAP4 ``INTERNALDATE`` string and return corresponding local time. " -"The return value is a :class:`time.struct_time` tuple or ``None`` if the " -"string has wrong format." +"Parse a :term:`bytes-like object` containing an IMAP4 ``INTERNALDATE`` " +"response and return the corresponding local time. The return value is a :" +"class:`time.struct_time` tuple or ``None`` if the input has wrong format." msgstr "" -#: library/imaplib.rst:138 +#: library/imaplib.rst:145 msgid "" "Converts an integer into a bytes representation using characters from the " "set [``A`` .. ``P``]." msgstr "" -#: library/imaplib.rst:144 -msgid "Converts an IMAP4 ``FLAGS`` response to a tuple of individual flags." +#: library/imaplib.rst:151 +msgid "" +"Converts a :term:`bytes-like object` containing an IMAP4 ``FLAGS`` response " +"to a tuple of individual flags as :class:`bytes`. The return value is an " +"empty tuple if the input has wrong format." msgstr "" -#: library/imaplib.rst:149 +#: library/imaplib.rst:158 msgid "" "Convert *date_time* to an IMAP4 ``INTERNALDATE`` representation. The return " "value is a string in the form: ``\"DD-Mmm-YYYY HH:MM:SS +HHMM\"`` (including " @@ -191,7 +201,7 @@ msgid "" "already be in the correct format." msgstr "" -#: library/imaplib.rst:159 +#: library/imaplib.rst:168 msgid "" "Note that IMAP4 message numbers change as the mailbox changes; in " "particular, after an ``EXPUNGE`` command performs deletions the remaining " @@ -199,30 +209,30 @@ msgid "" "the UID command." msgstr "" -#: library/imaplib.rst:163 +#: library/imaplib.rst:172 msgid "" "At the end of the module, there is a test section that contains a more " "extensive example of usage." msgstr "" -#: library/imaplib.rst:169 +#: library/imaplib.rst:178 msgid "" "Documents describing the protocol, sources for servers implementing it, by " "the University of Washington's IMAP Information Center can all be found at " "(**Source Code**) https://github.com/uw-imap/imap (**Not Maintained**)." msgstr "" -#: library/imaplib.rst:177 +#: library/imaplib.rst:186 msgid "IMAP4 Objects" msgstr "" -#: library/imaplib.rst:179 +#: library/imaplib.rst:188 msgid "" "All IMAP4rev1 commands are represented by methods of the same name, either " "uppercase or lowercase." msgstr "" -#: library/imaplib.rst:182 +#: library/imaplib.rst:191 msgid "" "All arguments to commands are converted to strings, except for " "``AUTHENTICATE``, and the last argument to ``APPEND`` which is passed as an " @@ -231,10 +241,13 @@ msgid "" "string is quoted. However, the *password* argument to the ``LOGIN`` command " "is always quoted. If you want to avoid having an argument string quoted (eg: " "the *flags* argument to ``STORE``) then enclose the string in parentheses " -"(eg: ``r'(\\Deleted)'``)." +"(eg: ``r'(\\Deleted)'``). In general, pass arguments unquoted and let the " +"module quote them as needed. An argument that is already enclosed in double " +"quotes is left unchanged, so that code which quotes arguments itself keeps " +"working." msgstr "" -#: library/imaplib.rst:190 +#: library/imaplib.rst:202 msgid "" "Each command returns a tuple: ``(type, [data, ...])`` where *type* is " "usually ``'OK'`` or ``'NO'``, and *data* is either the text from the command " @@ -243,7 +256,7 @@ msgid "" "response, and the second part contains the data (ie: 'literal' value)." msgstr "" -#: library/imaplib.rst:196 +#: library/imaplib.rst:208 msgid "" "The *message_set* options to commands below is a string specifying one or " "more messages to be acted upon. It may be a simple message number " @@ -252,34 +265,41 @@ msgid "" "an asterisk to indicate an infinite upper bound (``'3:*'``)." msgstr "" -#: library/imaplib.rst:202 +#: library/imaplib.rst:214 msgid "An :class:`IMAP4` instance has the following methods:" msgstr "" -#: library/imaplib.rst:207 +#: library/imaplib.rst:219 msgid "Append *message* to named mailbox." msgstr "" -#: library/imaplib.rst:212 +#: library/imaplib.rst:221 +msgid "" +"*flags* may be ``None`` or a string of IMAP flag tokens. Multiple flags are " +"separated by spaces, for example ``r'\\Seen \\Answered'``. If *flags* is not " +"already enclosed in parentheses, parentheses are added automatically." +msgstr "" + +#: library/imaplib.rst:229 msgid "Authenticate command --- requires response processing." msgstr "" -#: library/imaplib.rst:214 +#: library/imaplib.rst:231 msgid "" "*mechanism* specifies which authentication mechanism is to be used - it " "should appear in the instance variable ``capabilities`` in the form " "``AUTH=mechanism``." msgstr "" -#: library/imaplib.rst:217 +#: library/imaplib.rst:234 msgid "*authobject* must be a callable object::" msgstr "" -#: library/imaplib.rst:219 +#: library/imaplib.rst:236 msgid "data = authobject(response)" msgstr "" -#: library/imaplib.rst:221 +#: library/imaplib.rst:238 msgid "" "It will be called to process server continuation responses; the *response* " "argument it is passed will be ``bytes``. It should return ``bytes`` *data* " @@ -287,139 +307,139 @@ msgid "" "``None`` if the client abort response ``*`` should be sent instead." msgstr "" -#: library/imaplib.rst:226 +#: library/imaplib.rst:243 msgid "" "string usernames and passwords are now encoded to ``utf-8`` instead of being " "limited to ASCII." msgstr "" -#: library/imaplib.rst:233 +#: library/imaplib.rst:250 msgid "Checkpoint mailbox on server." msgstr "" -#: library/imaplib.rst:238 +#: library/imaplib.rst:255 msgid "" "Close currently selected mailbox. Deleted messages are removed from writable " "mailbox. This is the recommended command before ``LOGOUT``." msgstr "" -#: library/imaplib.rst:244 +#: library/imaplib.rst:261 msgid "Copy *message_set* messages onto end of *new_mailbox*." msgstr "" -#: library/imaplib.rst:249 +#: library/imaplib.rst:266 msgid "Create new mailbox named *mailbox*." msgstr "" -#: library/imaplib.rst:254 +#: library/imaplib.rst:271 msgid "Delete old mailbox named *mailbox*." msgstr "" -#: library/imaplib.rst:259 +#: library/imaplib.rst:276 msgid "Delete the ACLs (remove any rights) set for who on mailbox." msgstr "" -#: library/imaplib.rst:264 +#: library/imaplib.rst:281 msgid "" "Enable *capability* (see :rfc:`5161`). Most capabilities do not need to be " "enabled. Currently only the ``UTF8=ACCEPT`` capability is supported (see :" "RFC:`6855`)." msgstr "" -#: library/imaplib.rst:268 +#: library/imaplib.rst:285 msgid "The :meth:`enable` method itself, and :RFC:`6855` support." msgstr "" -#: library/imaplib.rst:274 +#: library/imaplib.rst:291 msgid "" "Permanently remove deleted items from selected mailbox. Generates an " "``EXPUNGE`` response for each deleted message. Returned data contains a list " "of ``EXPUNGE`` message numbers in order received." msgstr "" -#: library/imaplib.rst:281 +#: library/imaplib.rst:298 msgid "" "Fetch (parts of) messages. *message_parts* should be a string of message " "part names enclosed within parentheses, eg: ``\"(UID BODY[TEXT])\"``. " "Returned data are tuples of message part envelope and data." msgstr "" -#: library/imaplib.rst:288 +#: library/imaplib.rst:305 msgid "" "Get the ``ACL``\\ s for *mailbox*. The method is non-standard, but is " "supported by the ``Cyrus`` server." msgstr "" -#: library/imaplib.rst:294 +#: library/imaplib.rst:311 msgid "" "Retrieve the specified ``ANNOTATION``\\ s for *mailbox*. The method is non-" "standard, but is supported by the ``Cyrus`` server." msgstr "" -#: library/imaplib.rst:300 +#: library/imaplib.rst:317 msgid "" "Get the ``quota`` *root*'s resource usage and limits. This method is part of " "the IMAP4 QUOTA extension defined in rfc2087." msgstr "" -#: library/imaplib.rst:306 +#: library/imaplib.rst:323 msgid "" "Get the list of ``quota`` ``roots`` for the named *mailbox*. This method is " "part of the IMAP4 QUOTA extension defined in rfc2087." msgstr "" -#: library/imaplib.rst:312 +#: library/imaplib.rst:329 msgid "" "List mailbox names in *directory* matching *pattern*. *directory* defaults " "to the top-level mail folder, and *pattern* defaults to match anything. " "Returned data contains a list of ``LIST`` responses." msgstr "" -#: library/imaplib.rst:319 +#: library/imaplib.rst:336 msgid "" "Identify the client using a plaintext password. The *password* will be " "quoted." msgstr "" -#: library/imaplib.rst:324 +#: library/imaplib.rst:341 msgid "" "Force use of ``CRAM-MD5`` authentication when identifying the client to " "protect the password. Will only work if the server ``CAPABILITY`` response " "includes the phrase ``AUTH=CRAM-MD5``." msgstr "" -#: library/imaplib.rst:328 +#: library/imaplib.rst:345 msgid "An :exc:`IMAP4.error` is raised if MD5 support is not available." msgstr "" -#: library/imaplib.rst:334 +#: library/imaplib.rst:351 msgid "Shutdown connection to server. Returns server ``BYE`` response." msgstr "" -#: library/imaplib.rst:336 +#: library/imaplib.rst:353 msgid "The method no longer ignores silently arbitrary exceptions." msgstr "" -#: library/imaplib.rst:342 +#: library/imaplib.rst:359 msgid "" "List subscribed mailbox names in directory matching pattern. *directory* " "defaults to the top level directory and *pattern* defaults to match any " "mailbox. Returned data are tuples of message part envelope and data." msgstr "" -#: library/imaplib.rst:349 +#: library/imaplib.rst:366 msgid "Show my ACLs for a mailbox (i.e. the rights that I have on mailbox)." msgstr "" -#: library/imaplib.rst:354 +#: library/imaplib.rst:371 msgid "Returns IMAP namespaces as defined in :rfc:`2342`." msgstr "" -#: library/imaplib.rst:359 +#: library/imaplib.rst:376 msgid "Send ``NOOP`` to server." msgstr "" -#: library/imaplib.rst:364 +#: library/imaplib.rst:381 msgid "" "Opens socket to *port* at *host*. The optional *timeout* parameter specifies " "a timeout in seconds for the connection attempt. If timeout is not given or " @@ -432,54 +452,54 @@ msgid "" "You may override this method." msgstr "" -#: library/imaplib.rst:374 +#: library/imaplib.rst:391 msgid "" "Raises an :ref:`auditing event ` ``imaplib.open`` with arguments " "``self``, ``host``, ``port``." msgstr "" -#: library/imaplib.rst:376 +#: library/imaplib.rst:393 msgid "The *timeout* parameter was added." msgstr "" -#: library/imaplib.rst:381 +#: library/imaplib.rst:398 msgid "" "Fetch truncated part of a message. Returned data is a tuple of message part " "envelope and data." msgstr "" -#: library/imaplib.rst:387 +#: library/imaplib.rst:404 msgid "" "Assume authentication as *user*. Allows an authorised administrator to proxy " "into any user's mailbox." msgstr "" -#: library/imaplib.rst:393 +#: library/imaplib.rst:410 msgid "" "Reads *size* bytes from the remote server. You may override this method." msgstr "" -#: library/imaplib.rst:398 +#: library/imaplib.rst:415 msgid "Reads one line from the remote server. You may override this method." msgstr "" -#: library/imaplib.rst:403 +#: library/imaplib.rst:420 msgid "" "Prompt server for an update. Returned data is ``None`` if no new messages, " "else value of ``RECENT`` response." msgstr "" -#: library/imaplib.rst:409 +#: library/imaplib.rst:426 msgid "Rename mailbox named *oldmailbox* to *newmailbox*." msgstr "" -#: library/imaplib.rst:414 +#: library/imaplib.rst:431 msgid "" "Return data for response *code* if received, or ``None``. Returns the given " "code, instead of the usual type." msgstr "" -#: library/imaplib.rst:420 +#: library/imaplib.rst:437 msgid "" "Search mailbox for matching messages. *charset* may be ``None``, in which " "case no ``CHARSET`` will be specified in the request to the server. The " @@ -489,11 +509,11 @@ msgid "" "`enable` command." msgstr "" -#: library/imaplib.rst:427 +#: library/imaplib.rst:444 msgid "Example::" msgstr "" -#: library/imaplib.rst:429 +#: library/imaplib.rst:446 msgid "" "# M is a connected IMAP4 instance...\n" "typ, msgnums = M.search(None, 'FROM', '\"LDJ\"')\n" @@ -502,59 +522,59 @@ msgid "" "typ, msgnums = M.search(None, '(FROM \"LDJ\")')" msgstr "" -#: library/imaplib.rst:438 +#: library/imaplib.rst:455 msgid "" "Select a mailbox. Returned data is the count of messages in *mailbox* " "(``EXISTS`` response). The default *mailbox* is ``'INBOX'``. If the " "*readonly* flag is set, modifications to the mailbox are not allowed." msgstr "" -#: library/imaplib.rst:445 +#: library/imaplib.rst:462 msgid "Sends ``data`` to the remote server. You may override this method." msgstr "" -#: library/imaplib.rst:447 +#: library/imaplib.rst:464 msgid "" "Raises an :ref:`auditing event ` ``imaplib.send`` with arguments " "``self``, ``data``." msgstr "" -#: library/imaplib.rst:452 +#: library/imaplib.rst:469 msgid "" "Set an ``ACL`` for *mailbox*. The method is non-standard, but is supported " "by the ``Cyrus`` server." msgstr "" -#: library/imaplib.rst:458 +#: library/imaplib.rst:475 msgid "" "Set ``ANNOTATION``\\ s for *mailbox*. The method is non-standard, but is " "supported by the ``Cyrus`` server." msgstr "" -#: library/imaplib.rst:464 +#: library/imaplib.rst:481 msgid "" "Set the ``quota`` *root*'s resource *limits*. This method is part of the " "IMAP4 QUOTA extension defined in rfc2087." msgstr "" -#: library/imaplib.rst:470 +#: library/imaplib.rst:487 msgid "" "Close connection established in ``open``. This method is implicitly called " "by :meth:`IMAP4.logout`. You may override this method." msgstr "" -#: library/imaplib.rst:476 +#: library/imaplib.rst:493 msgid "Returns socket instance used to connect to server." msgstr "" -#: library/imaplib.rst:481 +#: library/imaplib.rst:498 msgid "" "The ``sort`` command is a variant of ``search`` with sorting semantics for " "the results. Returned data contains a space separated list of matching " "message numbers." msgstr "" -#: library/imaplib.rst:485 +#: library/imaplib.rst:502 msgid "" "Sort has two arguments before the *search_criterion* argument(s); a " "parenthesized list of *sort_criteria*, and the searching *charset*. Note " @@ -566,39 +586,39 @@ msgid "" "searching criteria. It then returns the numbers of matching messages." msgstr "" -#: library/imaplib.rst:565 +#: library/imaplib.rst:589 msgid "This is an ``IMAP4rev1`` extension command." msgstr "" -#: library/imaplib.rst:499 +#: library/imaplib.rst:516 msgid "" "Send a ``STARTTLS`` command. The *ssl_context* argument is optional and " "should be a :class:`ssl.SSLContext` object. This will enable encryption on " "the IMAP connection. Please read :ref:`ssl-security` for best practices." msgstr "" -#: library/imaplib.rst:506 +#: library/imaplib.rst:530 msgid "" "The method now supports hostname check with :attr:`ssl.SSLContext." "check_hostname` and *Server Name Indication* (see :const:`ssl.HAS_SNI`)." msgstr "" -#: library/imaplib.rst:514 +#: library/imaplib.rst:538 msgid "Request named status conditions for *mailbox*." msgstr "" -#: library/imaplib.rst:519 +#: library/imaplib.rst:543 msgid "" "Alters flag dispositions for messages in mailbox. *command* is specified by " -"section 6.4.6 of :rfc:`2060` as being one of \"FLAGS\", \"+FLAGS\", or \"-" +"section 6.4.6 of :rfc:`3501` as being one of \"FLAGS\", \"+FLAGS\", or \"-" "FLAGS\", optionally with a suffix of \".SILENT\"." msgstr "" -#: library/imaplib.rst:523 +#: library/imaplib.rst:547 msgid "For example, to set the delete flag on all messages::" msgstr "" -#: library/imaplib.rst:525 +#: library/imaplib.rst:549 msgid "" "typ, data = M.search(None, 'ALL')\n" "for num in data[0].split():\n" @@ -606,36 +626,36 @@ msgid "" "M.expunge()" msgstr "" -#: library/imaplib.rst:532 +#: library/imaplib.rst:556 msgid "" "Creating flags containing ']' (for example: \"[test]\") violates :rfc:`3501` " "(the IMAP protocol). However, imaplib has historically allowed creation of " -"such tags, and popular IMAP servers, such as Gmail, accept and produce such " -"flags. There are non-Python programs which also create such tags. Although " -"it is an RFC violation and IMAP clients and servers are supposed to be " -"strict, imaplib still continues to allow such tags to be created for " +"such flags, and popular IMAP servers, such as Gmail, accept and produce such " +"flags. There are non-Python programs which also create such flags. " +"Although it is an RFC violation and IMAP clients and servers are supposed to " +"be strict, imaplib still continues to allow such flags to be created for " "backward compatibility reasons, and as of Python 3.6, handles them if they " "are sent from the server, since this improves real-world compatibility." msgstr "" -#: library/imaplib.rst:544 +#: library/imaplib.rst:568 msgid "Subscribe to new mailbox." msgstr "" -#: library/imaplib.rst:549 +#: library/imaplib.rst:573 msgid "" "The ``thread`` command is a variant of ``search`` with threading semantics " "for the results. Returned data contains a space separated list of thread " "members." msgstr "" -#: library/imaplib.rst:552 +#: library/imaplib.rst:576 msgid "" "Thread members consist of zero or more messages numbers, delimited by " "spaces, indicating successive parent and child." msgstr "" -#: library/imaplib.rst:555 +#: library/imaplib.rst:579 msgid "" "Thread has two arguments before the *search_criterion* argument(s); a " "*threading_algorithm*, and the searching *charset*. Note that unlike " @@ -648,7 +668,7 @@ msgid "" "specified threading algorithm." msgstr "" -#: library/imaplib.rst:570 +#: library/imaplib.rst:594 msgid "" "Execute command args with messages identified by UID, rather than message " "number. Returns response appropriate to command. At least one argument " @@ -656,11 +676,11 @@ msgid "" "an exception will be raised." msgstr "" -#: library/imaplib.rst:578 +#: library/imaplib.rst:602 msgid "Unsubscribe from old mailbox." msgstr "" -#: library/imaplib.rst:582 +#: library/imaplib.rst:606 msgid "" ":meth:`imaplib.IMAP4.unselect` frees server's resources associated with the " "selected mailbox and returns the server to the authenticated state. This " @@ -668,46 +688,46 @@ msgid "" "that no messages are permanently removed from the currently selected mailbox." msgstr "" -#: library/imaplib.rst:592 +#: library/imaplib.rst:616 msgid "" "Allow simple extension commands notified by server in ``CAPABILITY`` " "response." msgstr "" -#: library/imaplib.rst:595 +#: library/imaplib.rst:619 msgid "The following attributes are defined on instances of :class:`IMAP4`:" msgstr "" -#: library/imaplib.rst:599 +#: library/imaplib.rst:623 msgid "" "The most recent supported protocol in the ``CAPABILITY`` response from the " "server." msgstr "" -#: library/imaplib.rst:605 +#: library/imaplib.rst:629 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:611 +#: library/imaplib.rst:635 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:621 +#: library/imaplib.rst:645 msgid "IMAP4 Example" msgstr "" -#: library/imaplib.rst:623 +#: library/imaplib.rst:647 msgid "" "Here is a minimal example (without error checking) that opens a mailbox and " "retrieves and prints all messages::" msgstr "" -#: library/imaplib.rst:626 +#: library/imaplib.rst:650 msgid "" "import getpass, imaplib\n" "\n" @@ -722,6 +742,13 @@ msgid "" "M.logout()" msgstr "" +#: library/imaplib.rst:664 +msgid "" +"A ``FETCH`` response may contain additional or unsolicited data (see :rfc:" +"`3501`, section 7.4.2), so production code should inspect the whole response " +"rather than rely on ``data[0][1]``." +msgstr "" + #: library/imaplib.rst:16 msgid "IMAP4" msgstr "" diff --git a/library/imghdr.po b/library/imghdr.po index 980b029f0..c76222750 100644 --- a/library/imghdr.po +++ b/library/imghdr.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/imp.po b/library/imp.po index 85566679f..80dfd46ee 100644 --- a/library/imp.po +++ b/library/imp.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/importlib.metadata.po b/library/importlib.metadata.po index 2e3cb9689..d66615eae 100644 --- a/library/importlib.metadata.po +++ b/library/importlib.metadata.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/importlib.po b/library/importlib.po index cb57bccd5..d84dc0437 100644 --- a/library/importlib.po +++ b/library/importlib.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/importlib.resources.abc.po b/library/importlib.resources.abc.po index 96b7888f3..45c0617d5 100644 --- a/library/importlib.resources.abc.po +++ b/library/importlib.resources.abc.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -91,11 +91,15 @@ msgstr "" #: library/importlib.resources.abc.rst:69 msgid "" -"Returns ``True`` if the named *name* is considered a resource. :exc:" -"`FileNotFoundError` is raised if *name* does not exist." +"Returns ``True`` if the named *path* is considered a resource. :exc:" +"`FileNotFoundError` is raised if *path* does not exist." msgstr "" -#: library/importlib.resources.abc.rst:75 +#: library/importlib.resources.abc.rst:72 +msgid "The argument *name* was renamed to *path*." +msgstr "" + +#: library/importlib.resources.abc.rst:78 msgid "" "Returns an :term:`iterable` of strings over the contents of the package. Do " "note that it is not required that all names returned by the iterator be " @@ -103,7 +107,7 @@ msgid "" "`is_resource` would be false." msgstr "" -#: library/importlib.resources.abc.rst:81 +#: library/importlib.resources.abc.rst:84 msgid "" "Allowing non-resource names to be returned is to allow for situations where " "how a package and its resources are stored are known a priori and the non-" @@ -112,58 +116,58 @@ msgid "" "stored on the file system then those subdirectory names can be used directly." msgstr "" -#: library/importlib.resources.abc.rst:89 +#: library/importlib.resources.abc.rst:92 msgid "The abstract method returns an iterable of no items." msgstr "" -#: library/importlib.resources.abc.rst:94 +#: library/importlib.resources.abc.rst:97 msgid "" "An object with a subset of :class:`pathlib.Path` methods suitable for " "traversing directories and opening files." msgstr "" -#: library/importlib.resources.abc.rst:97 +#: library/importlib.resources.abc.rst:100 msgid "" "For a representation of the object on the file-system, use :meth:`importlib." "resources.as_file`." msgstr "" -#: library/importlib.resources.abc.rst:102 +#: library/importlib.resources.abc.rst:105 msgid "Abstract. The base name of this object without any parent references." msgstr "" -#: library/importlib.resources.abc.rst:107 +#: library/importlib.resources.abc.rst:110 msgid "Yield Traversable objects in self." msgstr "" -#: library/importlib.resources.abc.rst:112 +#: library/importlib.resources.abc.rst:115 msgid "Return ``True`` if self is a directory." msgstr "" -#: library/importlib.resources.abc.rst:117 +#: library/importlib.resources.abc.rst:120 msgid "Return ``True`` if self is a file." msgstr "" -#: library/importlib.resources.abc.rst:122 +#: library/importlib.resources.abc.rst:125 msgid "" "Traverse directories according to *pathsegments* and return the result as :" "class:`!Traversable`." msgstr "" -#: library/importlib.resources.abc.rst:125 +#: library/importlib.resources.abc.rst:128 msgid "" "Each *pathsegments* argument may contain multiple names separated by forward " "slashes (``/``, ``posixpath.sep`` ). For example, the following are " "equivalent::" msgstr "" -#: library/importlib.resources.abc.rst:129 +#: library/importlib.resources.abc.rst:132 msgid "" "files.joinpath('subdir', 'subsuddir', 'file.txt')\n" "files.joinpath('subdir/subsuddir/file.txt')" msgstr "" -#: library/importlib.resources.abc.rst:132 +#: library/importlib.resources.abc.rst:135 msgid "" "Note that some :class:`!Traversable` implementations might not be updated to " "the latest version of the protocol. For compatibility with such " @@ -171,42 +175,42 @@ msgid "" "call to ``joinpath``. For example::" msgstr "" -#: library/importlib.resources.abc.rst:137 +#: library/importlib.resources.abc.rst:140 msgid "files.joinpath('subdir').joinpath('subsubdir').joinpath('file.txt')" msgstr "" -#: library/importlib.resources.abc.rst:141 +#: library/importlib.resources.abc.rst:144 msgid "" "``joinpath`` accepts multiple *pathsegments*, and these segments may contain " "forward slashes as path separators. Previously, only a single *child* " "argument was accepted." msgstr "" -#: library/importlib.resources.abc.rst:148 +#: library/importlib.resources.abc.rst:151 msgid "Return Traversable child in self. Equivalent to ``joinpath(child)``." msgstr "" -#: library/importlib.resources.abc.rst:154 +#: library/importlib.resources.abc.rst:157 msgid "" "*mode* may be 'r' or 'rb' to open as text or binary. Return a handle " "suitable for reading (same as :attr:`pathlib.Path.open`)." msgstr "" -#: library/importlib.resources.abc.rst:157 +#: library/importlib.resources.abc.rst:160 msgid "" "When opening as text, accepts encoding parameters such as those accepted by :" "class:`io.TextIOWrapper`." msgstr "" -#: library/importlib.resources.abc.rst:162 +#: library/importlib.resources.abc.rst:165 msgid "Read contents of self as bytes." msgstr "" -#: library/importlib.resources.abc.rst:166 +#: library/importlib.resources.abc.rst:169 msgid "Read contents of self as text." msgstr "" -#: library/importlib.resources.abc.rst:171 +#: library/importlib.resources.abc.rst:174 msgid "" "An abstract base class for resource readers capable of serving the :meth:" "`importlib.resources.files` interface. Subclasses :class:`ResourceReader` " @@ -215,13 +219,13 @@ msgid "" "TraversableResources` also supplies :class:`!ResourceReader`." msgstr "" -#: library/importlib.resources.abc.rst:178 +#: library/importlib.resources.abc.rst:181 msgid "" "Loaders that wish to support resource reading are expected to implement this " "interface." msgstr "" -#: library/importlib.resources.abc.rst:184 +#: library/importlib.resources.abc.rst:187 msgid "" "Returns a :class:`importlib.resources.abc.Traversable` object for the loaded " "package." diff --git a/library/importlib.resources.po b/library/importlib.resources.po index 6e5d6d3c2..6e154bd71 100644 --- a/library/importlib.resources.po +++ b/library/importlib.resources.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: 2025-11-27 09:00+0200\n" "Last-Translator: Marios Giannopoulos \n" "Language-Team: PyGreece \n" @@ -81,6 +81,13 @@ msgstr "" #: library/importlib.resources.rst:36 msgid "" +":mod:`importlib.resources` follows the same security model as the built-in :" +"func:`open` function. Passing untrusted inputs to the functions in this " +"module is unsafe." +msgstr "" + +#: library/importlib.resources.rst:42 +msgid "" "This module provides functionality similar to `pkg_resources `_ `Basic Resource " "Access `_." -#: library/importlib.resources.rst:50 +#: library/importlib.resources.rst:56 msgid "" ":class:`Loaders ` that wish to support resource " "reading should implement a ``get_resource_reader(fullname)`` method as " @@ -119,7 +126,7 @@ msgstr "" "``get_resource_reader(fullname)`` όπως ορίζεται από την κλάση :class:" "`importlib.resources.abc.ResourceReader`." -#: library/importlib.resources.rst:56 +#: library/importlib.resources.rst:62 msgid "" "Represents an anchor for resources, either a :class:`module object ` or a module name as a string. Defined as ``Union[str, " @@ -129,7 +136,7 @@ msgstr "" "object ` είτε ένα όνομα module ως συμβολοσειρά. Ορίζεται " "ως ``Union[str, ModuleType]``." -#: library/importlib.resources.rst:62 +#: library/importlib.resources.rst:68 msgid "" "Returns a :class:`~importlib.resources.abc.Traversable` object representing " "the resource container (think directory) and its resources (think files). A " @@ -140,7 +147,7 @@ msgstr "" "του (σκεφτείτε αρχεία). Ένα Traversable μπορεί να περιέχει και άλλα δοχεία " "(σκεφτείτε υποκαταλόγους)." -#: library/importlib.resources.rst:67 +#: library/importlib.resources.rst:73 msgid "" "*anchor* is an optional :class:`Anchor`. If the anchor is a package, " "resources are resolved from that package. If a module, resources are " @@ -152,7 +159,7 @@ msgstr "" "επιλύονται δίπλα σε αυτό το module (στο ίδιο πακέτο ή στη ρίζα του πακέτου). " "Αν το anchor παραλειφθεί, χρησιμοποιείται το module του καλούντος." -#: library/importlib.resources.rst:75 +#: library/importlib.resources.rst:81 msgid "" "*package* parameter was renamed to *anchor*. *anchor* can now be a non-" "package module and if omitted will default to the caller's module. *package* " @@ -168,7 +175,7 @@ msgstr "" "``importlib_resources >= 5.10`` για συμβατή διεπαφή σε παλαιότερες εκδόσεις " "Python." -#: library/importlib.resources.rst:85 +#: library/importlib.resources.rst:91 msgid "" "Given a :class:`~importlib.resources.abc.Traversable` object representing a " "file or directory, typically from :func:`importlib.resources.files`, return " @@ -181,7 +188,7 @@ msgstr "" "`with` πρόταση. Ο context manager παρέχει ένα αντικείμενο :class:`pathlib." "Path`." -#: library/importlib.resources.rst:90 +#: library/importlib.resources.rst:96 msgid "" "Exiting the context manager cleans up any temporary file or directory " "created when the resource was extracted from e.g. a zip file." @@ -189,7 +196,7 @@ msgstr "" "Η έξοδος από τον context manager καθαρίζει οποιοδήποτε προσωρινό αρχείο ή " "κατάλογο που δημιουργήθηκε όταν ο πόρος εξήχθη, π.χ. από ένα αρχείο zip." -#: library/importlib.resources.rst:93 +#: library/importlib.resources.rst:99 msgid "" "Use ``as_file`` when the Traversable methods (``read_text``, etc) are " "insufficient and an actual file or directory on the file system is required." @@ -198,16 +205,16 @@ msgstr "" "``read_text``, κλπ) δεν επαρκούν και απαιτείται ένα πραγματικό αρχείο ή " "κατάλογος στο σύστημα αρχείων." -#: library/importlib.resources.rst:99 +#: library/importlib.resources.rst:105 msgid "Added support for *traversable* representing a directory." msgstr "" "Προστέθηκε υποστήριξη για *traversable* που αντιπροσωπεύει έναν κατάλογο." -#: library/importlib.resources.rst:106 +#: library/importlib.resources.rst:112 msgid "Functional API" msgstr "Λειτουργικό API" -#: library/importlib.resources.rst:108 +#: library/importlib.resources.rst:114 msgid "" "A set of simplified, backwards-compatible helpers is available. These allow " "common operations in a single function call." @@ -215,11 +222,11 @@ msgstr "" "Ένα σύνολο απλοποιημένων, βοηθών συμβατών με προηγούμενες εκδόσεις είναι " "διαθέσιμο. Αυτά επιτρέπουν κοινές λειτουργίες σε μια κλήση συνάρτησης." -#: library/importlib.resources.rst:111 +#: library/importlib.resources.rst:117 msgid "For all the following functions:" msgstr "Για όλες τις παρακάτω λειτουργίες:" -#: library/importlib.resources.rst:113 +#: library/importlib.resources.rst:119 msgid "" "*anchor* is an :class:`~importlib.resources.Anchor`, as in :func:`~importlib." "resources.files`. Unlike in ``files``, it may not be omitted." @@ -228,7 +235,7 @@ msgstr "" "`~importlib.resources.files`. Σε αντίθεση με τα ``αρχεία``, ενδέχεται να μην " "παραλειφθεί." -#: library/importlib.resources.rst:117 +#: library/importlib.resources.rst:123 msgid "" "*path_names* are components of a resource's path name, relative to the " "anchor. For example, to get the text of resource named ``info.txt``, use::" @@ -237,11 +244,11 @@ msgstr "" "με το anchor. Για παράδειγμα, για να λάβετε το κείμενο του πόρου με το όνομα " "``info.txt``, χρησιμοποιήστε::" -#: library/importlib.resources.rst:121 +#: library/importlib.resources.rst:127 msgid "importlib.resources.read_text(my_module, \"info.txt\")" msgstr "importlib.resources.read_text(my_module, \"info.txt\")" -#: library/importlib.resources.rst:123 +#: library/importlib.resources.rst:129 msgid "" "Like :meth:`Traversable.joinpath `, The " "individual components should use forward slashes (``/``) as path separators. " @@ -251,7 +258,7 @@ msgstr "" "μεμονωμένα στοιχεία θα πρέπει να χρησιμοποιούν κάθετε (``/``) ως διαχωριστές " "διαδρομή. Για παράδειγμα, τα ακόλουθα είναι ισοδύναμα::" -#: library/importlib.resources.rst:128 +#: library/importlib.resources.rst:134 msgid "" "importlib.resources.read_binary(my_module, \"pics/painting.png\")\n" "importlib.resources.read_binary(my_module, \"pics\", \"painting.png\")" @@ -259,7 +266,7 @@ msgstr "" "importlib.resources.read_binary(my_module, \"pics/painting.png\")\n" "importlib.resources.read_binary(my_module, \"pics\", \"painting.png\")" -#: library/importlib.resources.rst:131 +#: library/importlib.resources.rst:137 msgid "" "For backward compatibility reasons, functions that read text require an " "explicit *encoding* argument if multiple *path_names* are given. For " @@ -270,7 +277,7 @@ msgstr "" "παράδειγμα, για να λάβετε το κείμενο του ``info/chapter1.txt``, " "χρησιμοποιήστε::" -#: library/importlib.resources.rst:135 +#: library/importlib.resources.rst:141 msgid "" "importlib.resources.read_text(my_module, \"info\", \"chapter1.txt\",\n" " encoding='utf-8')" @@ -278,13 +285,13 @@ msgstr "" "importlib.resources.read_text(my_module, \"info\", \"chapter1.txt\",\n" " encoding='utf-8')" -#: library/importlib.resources.rst:140 +#: library/importlib.resources.rst:146 msgid "Open the named resource for binary reading." msgstr "Ανοίξτε τον πόρο με όνομα για δυαδική ανάγνωση." -#: library/importlib.resources.rst:142 library/importlib.resources.rst:185 -#: library/importlib.resources.rst:233 library/importlib.resources.rst:250 -#: library/importlib.resources.rst:268 +#: library/importlib.resources.rst:148 library/importlib.resources.rst:191 +#: library/importlib.resources.rst:239 library/importlib.resources.rst:255 +#: library/importlib.resources.rst:273 msgid "" "See :ref:`the introduction ` for details on " "*anchor* and *path_names*." @@ -292,7 +299,7 @@ msgstr "" "Δείτε :ref:`the introduction ` για " "λεπτομέρειες σχετικά με το *anchor* και *path_names*." -#: library/importlib.resources.rst:145 +#: library/importlib.resources.rst:151 msgid "" "This function returns a :class:`~typing.BinaryIO` object, that is, a binary " "stream open for reading." @@ -300,23 +307,23 @@ msgstr "" "Αυτή η συνάρτηση επιστρέφει ένα αντικείμενο :class:`~typing.BinaryIO`, ένα " "δυαδικό ρεύμα εισόδου για ανάγνωση." -#: library/importlib.resources.rst:148 library/importlib.resources.rst:172 -#: library/importlib.resources.rst:188 library/importlib.resources.rst:209 -#: library/importlib.resources.rst:236 library/importlib.resources.rst:253 -#: library/importlib.resources.rst:271 +#: library/importlib.resources.rst:154 library/importlib.resources.rst:178 +#: library/importlib.resources.rst:194 library/importlib.resources.rst:215 +#: library/importlib.resources.rst:242 library/importlib.resources.rst:258 +#: library/importlib.resources.rst:276 msgid "This function is roughly equivalent to::" msgstr "Αυτή η συνάρτηση είναι περίπου ισοδύναμη με::" -#: library/importlib.resources.rst:150 +#: library/importlib.resources.rst:156 msgid "files(anchor).joinpath(*path_names).open('rb')" msgstr "files(anchor).joinpath(*path_names).open('rb')" -#: library/importlib.resources.rst:152 library/importlib.resources.rst:192 -#: library/importlib.resources.rst:257 +#: library/importlib.resources.rst:158 library/importlib.resources.rst:198 +#: library/importlib.resources.rst:246 library/importlib.resources.rst:262 msgid "Multiple *path_names* are accepted." msgstr "Γίνονται αποδεκτά πολλά *path_names*." -#: library/importlib.resources.rst:158 +#: library/importlib.resources.rst:164 msgid "" "Open the named resource for text reading. By default, the contents are read " "as strict UTF-8." @@ -324,7 +331,7 @@ msgstr "" "Ανοίγει τον δεδομένο πόρο για ανάγνωση κειμένου. Από προεπιλογή, τα " "περιεχόμενα διαβάζονται ως αυστηρά UTF-8." -#: library/importlib.resources.rst:161 library/importlib.resources.rst:201 +#: library/importlib.resources.rst:167 library/importlib.resources.rst:207 msgid "" "See :ref:`the introduction ` for details on " "*anchor* and *path_names*. *encoding* and *errors* have the same meaning as " @@ -334,7 +341,7 @@ msgstr "" "λεπτομέρειες σχετικά με το *anchor* και το *path_names*. Τα *encoding* και " "*errors* έχουν την ίδια σημασία όπως στο ενσωματωμένο :func:`open`." -#: library/importlib.resources.rst:165 library/importlib.resources.rst:205 +#: library/importlib.resources.rst:171 library/importlib.resources.rst:211 msgid "" "For backward compatibility reasons, the *encoding* argument must be given " "explicitly if there are multiple *path_names*. This limitation is scheduled " @@ -344,7 +351,7 @@ msgstr "" "πρέπει να δίνεται ρητά εάν υπάρχουν πολλά *path_names*. Αυτό ο περιορισμός " "έχει προγραμματιστεί να καταργηθεί στην Python 3.15." -#: library/importlib.resources.rst:169 +#: library/importlib.resources.rst:175 msgid "" "This function returns a :class:`~typing.TextIO` object, that is, a text " "stream open for reading." @@ -352,12 +359,11 @@ msgstr "" "Αυτή η συνάρτηση επιστρέφει ένα :class:`~typing.TextIO` αντικείμενο, δηλαδή " "ένα ρεύμα εισόδου για ανάγνωση." -#: library/importlib.resources.rst:174 +#: library/importlib.resources.rst:180 msgid "files(anchor).joinpath(*path_names).open('r', encoding=encoding)" msgstr "files(anchor).joinpath(*path_names).open('r', encoding=encoding)" -#: library/importlib.resources.rst:176 library/importlib.resources.rst:213 -#: library/importlib.resources.rst:240 +#: library/importlib.resources.rst:182 library/importlib.resources.rst:219 msgid "" "Multiple *path_names* are accepted. *encoding* and *errors* must be given as " "keyword arguments." @@ -365,16 +371,16 @@ msgstr "" "Πολλαπλά *path_names* γίνονται δεκτά. Τα *encoding* και *errors* πρέπει να " "δίνονται ως ορίσματα λέξεων-κλειδιών." -#: library/importlib.resources.rst:183 +#: library/importlib.resources.rst:189 msgid "Read and return the contents of the named resource as :class:`bytes`." msgstr "" "Διαβάζει και επιστρέφει τα περιεχόμενα του δεδομένου πόρου ως :class:`bytes`." -#: library/importlib.resources.rst:190 +#: library/importlib.resources.rst:196 msgid "files(anchor).joinpath(*path_names).read_bytes()" msgstr "files(anchor).joinpath(*path_names).read_bytes()" -#: library/importlib.resources.rst:198 +#: library/importlib.resources.rst:204 msgid "" "Read and return the contents of the named resource as :class:`str`. By " "default, the contents are read as strict UTF-8." @@ -382,11 +388,11 @@ msgstr "" "Διαβάζει και επιστρέφει τα περιεχόμενα του δεδομένου πόρου μέσα στο ως :" "class:`str`. Από προεπιλογή, τα περιεχόμενα διαβάζονται ως αυστηρό UTF-8." -#: library/importlib.resources.rst:211 +#: library/importlib.resources.rst:217 msgid "files(anchor).joinpath(*path_names).read_text(encoding=encoding)" msgstr "files(anchor).joinpath(*path_names).read_text(encoding=encoding)" -#: library/importlib.resources.rst:220 +#: library/importlib.resources.rst:226 msgid "" "Provides the path to the *resource* as an actual file system path. This " "function returns a context manager for use in a :keyword:`with` statement. " @@ -397,7 +403,7 @@ msgstr "" "σε μια :keyword:`with` πρόταση. Ο διαχειριστής περιεχομένου παρέχει ένα " "αντικείμενο :class:`pathlib.Path`." -#: library/importlib.resources.rst:224 +#: library/importlib.resources.rst:230 msgid "" "Exiting the context manager cleans up any temporary files created, e.g. when " "the resource needs to be extracted from a zip file." @@ -405,7 +411,7 @@ msgstr "" "Η έξοδος από τον context manager καθαρίζει οποιοδήποτε προσωρινό αρχείο που " "δημιουργήθηκε, π.χ. όταν ο πόρος χρειάστηκε να εξαχθεί από ένα αρχείο zip." -#: library/importlib.resources.rst:227 +#: library/importlib.resources.rst:233 msgid "" "For example, the :meth:`~pathlib.Path.stat` method requires an actual file " "system path; it can be used like this::" @@ -413,7 +419,7 @@ msgstr "" "Για παράδειγμα, η μέθοδος :meth:`~pathlib.Path.stat` απαιτεί μια πραγματική " "διαδρομή συστήματος αρχείων· μπορεί να χρησιμοποιηθεί ως εξής::" -#: library/importlib.resources.rst:230 +#: library/importlib.resources.rst:236 msgid "" "with importlib.resources.path(anchor, \"resource.txt\") as fspath:\n" " result = fspath.stat()" @@ -421,11 +427,11 @@ msgstr "" "with importlib.resources.path(anchor, \"resource.txt\") as fspath:\n" " result = fspath.stat()" -#: library/importlib.resources.rst:238 +#: library/importlib.resources.rst:244 msgid "as_file(files(anchor).joinpath(*path_names))" msgstr "as_file(files(anchor).joinpath(*path_names))" -#: library/importlib.resources.rst:247 +#: library/importlib.resources.rst:252 msgid "" "Return ``True`` if the named resource exists, otherwise ``False``. This " "function does not consider directories to be resources." @@ -433,11 +439,11 @@ msgstr "" "Επιστρέφετε ``True`` εάν υπάρχει ο δεδομένος πόρος, διαφορετικά ``False``. " "Αυτή η συνάρτηση δεν θεωρεί τους καταλόγους ως πόρους." -#: library/importlib.resources.rst:255 +#: library/importlib.resources.rst:260 msgid "files(anchor).joinpath(*path_names).is_file()" msgstr "files(anchor).joinpath(*path_names).is_file()" -#: library/importlib.resources.rst:263 +#: library/importlib.resources.rst:268 msgid "" "Return an iterable over the named items within the package or path. The " "iterable returns names of resources (e.g. files) and non-resources (e.g. " @@ -449,7 +455,7 @@ msgstr "" "πόρους (π.χ. καταλόγους) ως :class:`str`. Το iterable δεν επαναλαμβάνεται σε " "υποκαταλόγους." -#: library/importlib.resources.rst:273 +#: library/importlib.resources.rst:278 msgid "" "for resource in files(anchor).joinpath(*path_names).iterdir():\n" " yield resource.name" @@ -457,7 +463,7 @@ msgstr "" "for resource in files(anchor).joinpath(*path_names).iterdir():\n" " yield resource.name" -#: library/importlib.resources.rst:276 +#: library/importlib.resources.rst:281 msgid "" "Prefer ``iterdir()`` as above, which offers more control over the results " "and richer functionality." diff --git a/library/index.po b/library/index.po index 8fd4d3abd..ca4ecb972 100644 --- a/library/index.po +++ b/library/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/inspect.po b/library/inspect.po index ab867b4b7..ffa8a221f 100644 --- a/library/inspect.po +++ b/library/inspect.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -72,16 +72,16 @@ msgstr "" msgid "class" msgstr "" -#: library/inspect.rst:63 library/inspect.rst:264 +#: library/inspect.rst:63 library/inspect.rst:270 msgid "__doc__" msgstr "" -#: library/inspect.rst:63 library/inspect.rst:264 +#: library/inspect.rst:63 library/inspect.rst:270 msgid "documentation string" msgstr "" -#: library/inspect.rst:65 library/inspect.rst:217 library/inspect.rst:247 -#: library/inspect.rst:266 +#: library/inspect.rst:65 library/inspect.rst:217 library/inspect.rst:250 +#: library/inspect.rst:272 msgid "__name__" msgstr "" @@ -89,13 +89,13 @@ msgstr "" msgid "name with which this class was defined" msgstr "" -#: library/inspect.rst:68 library/inspect.rst:219 library/inspect.rst:249 -#: library/inspect.rst:269 +#: library/inspect.rst:68 library/inspect.rst:219 library/inspect.rst:252 +#: library/inspect.rst:275 msgid "__qualname__" msgstr "" -#: library/inspect.rst:68 library/inspect.rst:219 library/inspect.rst:249 -#: library/inspect.rst:269 +#: library/inspect.rst:68 library/inspect.rst:219 library/inspect.rst:252 +#: library/inspect.rst:275 msgid "qualified name" msgstr "" @@ -133,7 +133,7 @@ msgstr "" msgid "function object containing implementation of method" msgstr "" -#: library/inspect.rst:271 +#: library/inspect.rst:277 msgid "__self__" msgstr "" @@ -249,7 +249,7 @@ msgstr "" msgid "next inner traceback object (called by this level)" msgstr "" -#: library/inspect.rst:221 library/inspect.rst:254 +#: library/inspect.rst:221 library/inspect.rst:257 msgid "frame" msgstr "" @@ -309,7 +309,7 @@ msgstr "" msgid "tracing function for this frame, or ``None``" msgstr "" -#: library/inspect.rst:228 library/inspect.rst:258 +#: library/inspect.rst:228 library/inspect.rst:264 msgid "code" msgstr "" @@ -456,7 +456,7 @@ msgstr "" msgid "generator" msgstr "" -#: library/inspect.rst:234 library/inspect.rst:247 +#: library/inspect.rst:234 library/inspect.rst:250 msgid "name" msgstr "" @@ -476,7 +476,7 @@ msgstr "" msgid "gi_suspended" msgstr "" -#: library/inspect.rst:225 +#: library/inspect.rst:245 msgid "is the generator suspended?" msgstr "" @@ -500,7 +500,7 @@ msgstr "" msgid "ag_await" msgstr "" -#: library/inspect.rst:251 +#: library/inspect.rst:254 msgid "object being awaited on, or ``None``" msgstr "" @@ -513,72 +513,96 @@ msgid "ag_running" msgstr "" #: library/inspect.rst:245 +msgid "ag_suspended" +msgstr "" + +#: library/inspect.rst:248 msgid "ag_code" msgstr "" -#: library/inspect.rst:247 +#: library/inspect.rst:250 msgid "coroutine" msgstr "" -#: library/inspect.rst:251 +#: library/inspect.rst:254 msgid "cr_await" msgstr "" -#: library/inspect.rst:254 +#: library/inspect.rst:257 msgid "cr_frame" msgstr "" -#: library/inspect.rst:256 +#: library/inspect.rst:259 msgid "cr_running" msgstr "" -#: library/inspect.rst:256 +#: library/inspect.rst:259 msgid "is the coroutine running?" msgstr "" -#: library/inspect.rst:258 +#: library/inspect.rst:261 +msgid "cr_suspended" +msgstr "" + +#: library/inspect.rst:261 +msgid "is the coroutine suspended?" +msgstr "" + +#: library/inspect.rst:264 msgid "cr_code" msgstr "" -#: library/inspect.rst:260 +#: library/inspect.rst:266 msgid "cr_origin" msgstr "" -#: library/inspect.rst:260 +#: library/inspect.rst:266 msgid "where coroutine was created, or ``None``. See |coroutine-origin-link|" msgstr "" -#: library/inspect.rst:264 +#: library/inspect.rst:270 msgid "builtin" msgstr "" -#: library/inspect.rst:266 +#: library/inspect.rst:272 msgid "original name of this function or method" msgstr "" -#: library/inspect.rst:271 +#: library/inspect.rst:277 msgid "instance to which a method is bound, or ``None``" msgstr "" -#: library/inspect.rst:278 +#: library/inspect.rst:284 msgid "Add ``__qualname__`` and ``gi_yieldfrom`` attributes to generators." msgstr "" -#: library/inspect.rst:280 +#: library/inspect.rst:286 msgid "" "The ``__name__`` attribute of generators is now set from the function name, " "instead of the code name, and it can now be modified." msgstr "" -#: library/inspect.rst:285 +#: library/inspect.rst:291 msgid "Add ``cr_origin`` attribute to coroutines." msgstr "" -#: library/inspect.rst:289 +#: library/inspect.rst:295 msgid "Add ``__builtins__`` attribute to functions." msgstr "" -#: library/inspect.rst:293 +#: library/inspect.rst:299 +msgid "Add ``gi_suspended`` attribute to generators." +msgstr "" + +#: library/inspect.rst:303 +msgid "Add ``cr_suspended`` attribute to coroutines." +msgstr "" + +#: library/inspect.rst:307 +msgid "Add ``ag_suspended`` attribute to async generators." +msgstr "" + +#: library/inspect.rst:312 msgid "" "Return all the members of an object in a list of ``(name, value)`` pairs " "sorted by name. If the optional *predicate* argument—which will be called " @@ -586,14 +610,14 @@ msgid "" "the predicate returns a true value are included." msgstr "" -#: library/inspect.rst:300 +#: library/inspect.rst:319 msgid "" ":func:`getmembers` will only return class attributes defined in the " "metaclass when the argument is a class and those attributes have been listed " "in the metaclass' custom :meth:`~object.__dir__`." msgstr "" -#: library/inspect.rst:307 +#: library/inspect.rst:326 msgid "" "Return all the members of an object in a list of ``(name, value)`` pairs " "sorted by name without triggering dynamic lookup via the descriptor " @@ -601,7 +625,7 @@ msgid "" "that satisfy a given predicate." msgstr "" -#: library/inspect.rst:314 +#: library/inspect.rst:333 msgid "" ":func:`getmembers_static` may not be able to retrieve all members that " "getmembers can fetch (like dynamically created attributes) and may find " @@ -610,7 +634,7 @@ msgid "" "cases." msgstr "" -#: library/inspect.rst:325 +#: library/inspect.rst:344 msgid "" "Return the name of the module named by the file *path*, without including " "the names of enclosing packages. The file extension is checked against all " @@ -619,58 +643,64 @@ msgid "" "``None`` is returned." msgstr "" -#: library/inspect.rst:331 +#: library/inspect.rst:350 msgid "" "Note that this function *only* returns a meaningful name for actual Python " "modules - paths that potentially refer to Python packages will still return " "``None``." msgstr "" -#: library/inspect.rst:335 +#: library/inspect.rst:354 msgid "The function is based directly on :mod:`importlib`." msgstr "" -#: library/inspect.rst:341 +#: library/inspect.rst:360 msgid "Return ``True`` if the object is a module." msgstr "" -#: library/inspect.rst:346 +#: library/inspect.rst:365 msgid "" "Return ``True`` if the object is a class, whether built-in or created in " "Python code." msgstr "" -#: library/inspect.rst:352 +#: library/inspect.rst:368 +msgid "" +"This function returns ``False`` for :ref:`generic aliases ` of classes, such as ``list[int]``." +msgstr "" + +#: library/inspect.rst:374 msgid "Return ``True`` if the object is a bound method written in Python." msgstr "" -#: library/inspect.rst:357 +#: library/inspect.rst:379 msgid "" "Return ``True`` if the object is a Python function, which includes functions " "created by a :term:`lambda` expression." msgstr "" -#: library/inspect.rst:363 +#: library/inspect.rst:385 msgid "Return ``True`` if the object is a Python generator function." msgstr "" -#: library/inspect.rst:365 +#: library/inspect.rst:387 msgid "" "Functions wrapped in :func:`functools.partial` now return ``True`` if the " "wrapped function is a Python generator function." msgstr "" -#: library/inspect.rst:369 +#: library/inspect.rst:391 msgid "" "Functions wrapped in :func:`functools.partialmethod` now return ``True`` if " "the wrapped function is a Python generator function." msgstr "" -#: library/inspect.rst:375 +#: library/inspect.rst:397 msgid "Return ``True`` if the object is a generator." msgstr "" -#: library/inspect.rst:380 +#: library/inspect.rst:402 msgid "" "Return ``True`` if the object is a :term:`coroutine function` (a function " "defined with an :keyword:`async def` syntax), a :func:`functools.partial` " @@ -678,60 +708,60 @@ msgid "" "`markcoroutinefunction`." msgstr "" -#: library/inspect.rst:387 +#: library/inspect.rst:409 msgid "" "Functions wrapped in :func:`functools.partial` now return ``True`` if the " "wrapped function is a :term:`coroutine function`." msgstr "" -#: library/inspect.rst:391 +#: library/inspect.rst:413 msgid "" "Sync functions marked with :func:`markcoroutinefunction` now return ``True``." msgstr "" -#: library/inspect.rst:465 +#: library/inspect.rst:417 msgid "" "Functions wrapped in :func:`functools.partialmethod` now return ``True`` if " "the wrapped function is a :term:`coroutine function`." msgstr "" -#: library/inspect.rst:402 +#: library/inspect.rst:424 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:405 +#: library/inspect.rst:427 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:408 +#: library/inspect.rst:430 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:417 +#: library/inspect.rst:439 msgid "" "Return ``True`` if the object is a :term:`coroutine` created by an :keyword:" "`async def` function." msgstr "" -#: library/inspect.rst:425 +#: library/inspect.rst:447 msgid "" "Return ``True`` if the object can be used in :keyword:`await` expression." msgstr "" -#: library/inspect.rst:427 +#: library/inspect.rst:449 msgid "" "Can also be used to distinguish generator-based coroutines from regular " "generators:" msgstr "" -#: library/inspect.rst:430 +#: library/inspect.rst:452 msgid "" "import types\n" "\n" @@ -745,13 +775,13 @@ msgid "" "assert isawaitable(gen_coro())" msgstr "" -#: library/inspect.rst:448 +#: library/inspect.rst:470 msgid "" "Return ``True`` if the object is an :term:`asynchronous generator` function, " "for example:" msgstr "" -#: library/inspect.rst:451 +#: library/inspect.rst:473 msgid "" ">>> async def agen():\n" "... yield 1\n" @@ -760,65 +790,71 @@ msgid "" "True" msgstr "" -#: library/inspect.rst:461 +#: library/inspect.rst:483 msgid "" "Functions wrapped in :func:`functools.partial` now return ``True`` if the " "wrapped function is an :term:`asynchronous generator` function." msgstr "" -#: library/inspect.rst:471 +#: library/inspect.rst:487 +msgid "" +"Functions wrapped in :func:`functools.partialmethod` now return ``True`` if " +"the wrapped function is a :term:`asynchronous generator` function." +msgstr "" + +#: library/inspect.rst:493 msgid "" "Return ``True`` if the object is an :term:`asynchronous generator iterator` " "created by an :term:`asynchronous generator` function." msgstr "" -#: library/inspect.rst:478 +#: library/inspect.rst:500 msgid "Return ``True`` if the object is a traceback." msgstr "" -#: library/inspect.rst:483 +#: library/inspect.rst:505 msgid "Return ``True`` if the object is a frame." msgstr "" -#: library/inspect.rst:488 +#: library/inspect.rst:510 msgid "Return ``True`` if the object is a code." msgstr "" -#: library/inspect.rst:493 +#: library/inspect.rst:515 msgid "" "Return ``True`` if the object is a built-in function or a bound built-in " "method." msgstr "" -#: library/inspect.rst:498 +#: library/inspect.rst:520 msgid "" "Return ``True`` if the type of object is a :class:`~types.MethodWrapperType`." msgstr "" -#: library/inspect.rst:500 +#: library/inspect.rst:522 msgid "" "These are instances of :class:`~types.MethodWrapperType`, such as :meth:" "`~object.__str__`, :meth:`~object.__eq__` and :meth:`~object.__repr__`." msgstr "" -#: library/inspect.rst:508 +#: library/inspect.rst:530 msgid "" "Return ``True`` if the object is a user-defined or built-in function or " "method." msgstr "" -#: library/inspect.rst:513 +#: library/inspect.rst:535 msgid "Return ``True`` if the object is an abstract base class." msgstr "" -#: library/inspect.rst:518 +#: library/inspect.rst:540 msgid "" "Return ``True`` if the object is a method descriptor, but not if :func:" "`ismethod`, :func:`isclass`, :func:`isfunction` or :func:`isbuiltin` are " "true." msgstr "" -#: library/inspect.rst:522 +#: library/inspect.rst:544 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__` " @@ -827,7 +863,7 @@ msgid "" "sensible, and :attr:`~definition.__doc__` often is." msgstr "" -#: library/inspect.rst:528 +#: library/inspect.rst:550 msgid "" "Methods implemented via descriptors that also pass one of the other tests " "return ``False`` from the :func:`ismethoddescriptor` test, simply because " @@ -835,7 +871,7 @@ msgid "" "`~method.__func__` attribute (etc) when an object passes :func:`ismethod`." msgstr "" -#: library/inspect.rst:534 +#: library/inspect.rst:556 msgid "" "This function no longer incorrectly reports objects with :meth:`~object." "__get__` and :meth:`~object.__delete__`, but not :meth:`~object.__set__`, as " @@ -843,11 +879,11 @@ msgid "" "descriptors)." msgstr "" -#: library/inspect.rst:542 +#: library/inspect.rst:564 msgid "Return ``True`` if the object is a data descriptor." msgstr "" -#: library/inspect.rst:544 +#: library/inspect.rst:566 msgid "" "Data descriptors have a :attr:`~object.__set__` or a :attr:`~object." "__delete__` method. Examples are properties (defined in Python), getsets, " @@ -858,33 +894,33 @@ msgid "" "and members have both of these attributes), but this is not guaranteed." msgstr "" -#: library/inspect.rst:555 +#: library/inspect.rst:577 msgid "Return ``True`` if the object is a getset descriptor." msgstr "" -#: library/inspect.rst:559 +#: library/inspect.rst:581 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:566 +#: library/inspect.rst:588 msgid "Return ``True`` if the object is a member descriptor." msgstr "" -#: library/inspect.rst:570 +#: library/inspect.rst:592 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:578 +#: library/inspect.rst:600 msgid "Retrieving source code" msgstr "" -#: library/inspect.rst:582 +#: library/inspect.rst:604 msgid "" "Get the documentation string for an object, cleaned up with :func:" "`cleandoc`. If the documentation string for an object is not provided and " @@ -893,11 +929,11 @@ msgid "" "documentation string is invalid or missing." msgstr "" -#: library/inspect.rst:588 +#: library/inspect.rst:610 msgid "Documentation strings are now inherited if not overridden." msgstr "" -#: library/inspect.rst:594 +#: library/inspect.rst:616 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 " @@ -906,27 +942,27 @@ msgid "" "been defined in C or the interactive shell." msgstr "" -#: library/inspect.rst:603 +#: library/inspect.rst:625 msgid "" "Return the name of the (text or binary) file in which an object was defined. " "This will fail with a :exc:`TypeError` if the object is a built-in module, " "class, or function." msgstr "" -#: library/inspect.rst:610 +#: library/inspect.rst:632 msgid "" "Try to guess which module an object was defined in. Return ``None`` if the " "module cannot be determined." msgstr "" -#: library/inspect.rst:616 +#: library/inspect.rst:638 msgid "" "Return the name of the Python source file in which an object was defined or " "``None`` if no way can be identified to get the source. This will fail with " "a :exc:`TypeError` if the object is a built-in module, class, or function." msgstr "" -#: library/inspect.rst:624 +#: library/inspect.rst:646 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 " @@ -937,13 +973,13 @@ msgid "" "built-in module, class, or function." msgstr "" -#: library/inspect.rst:647 +#: library/inspect.rst:669 msgid "" ":exc:`OSError` is raised instead of :exc:`IOError`, now an alias of the " "former." msgstr "" -#: library/inspect.rst:640 +#: library/inspect.rst:662 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 " @@ -952,13 +988,13 @@ msgid "" "object is a built-in module, class, or function." msgstr "" -#: library/inspect.rst:654 +#: library/inspect.rst:676 msgid "" "Clean up indentation from docstrings that are indented to line up with " "blocks of code." msgstr "" -#: library/inspect.rst:657 +#: library/inspect.rst:679 msgid "" "All leading whitespace is removed from the first line. Any leading " "whitespace that can be uniformly removed from the second line onwards is " @@ -966,22 +1002,22 @@ msgid "" "Also, all tabs are expanded to spaces." msgstr "" -#: library/inspect.rst:666 +#: library/inspect.rst:688 msgid "Introspecting callables with the Signature object" msgstr "" -#: library/inspect.rst:670 +#: library/inspect.rst:692 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:677 +#: library/inspect.rst:699 msgid "Return a :class:`Signature` object for the given *callable*:" msgstr "" -#: library/inspect.rst:679 +#: library/inspect.rst:701 msgid "" ">>> from inspect import signature\n" ">>> def foo(a, *, b:int, **kwargs):\n" @@ -999,13 +1035,13 @@ msgid "" "" msgstr "" -#: library/inspect.rst:696 +#: library/inspect.rst:718 msgid "" "Accepts a wide range of Python callables, from plain functions and classes " "to :func:`functools.partial` objects." msgstr "" -#: library/inspect.rst:699 +#: library/inspect.rst:721 msgid "" "For objects defined in modules using stringized annotations (``from " "__future__ import annotations``), :func:`signature` will attempt to " @@ -1015,7 +1051,7 @@ msgid "" "func:`get_annotations` for instructions on how to use these parameters." msgstr "" -#: library/inspect.rst:708 +#: library/inspect.rst:730 msgid "" "Raises :exc:`ValueError` if no signature can be provided, and :exc:" "`TypeError` if that type of object is not supported. Also, if the " @@ -1024,32 +1060,32 @@ msgid "" "potentially raise any kind of exception." msgstr "" -#: library/inspect.rst:714 +#: library/inspect.rst:736 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:718 +#: library/inspect.rst:740 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:848 +#: library/inspect.rst:870 msgid "The *globals*, *locals*, and *eval_str* parameters were added." msgstr "" -#: library/inspect.rst:729 +#: library/inspect.rst:751 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:735 +#: library/inspect.rst:757 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 " @@ -1057,14 +1093,14 @@ msgid "" "semantics." msgstr "" -#: library/inspect.rst:743 +#: library/inspect.rst:765 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:748 +#: library/inspect.rst:770 msgid "" "The optional *parameters* argument is a sequence of :class:`Parameter` " "objects, which is validated to check that there are no parameters with " @@ -1073,54 +1109,54 @@ msgid "" "defaults follow parameters without defaults." msgstr "" -#: library/inspect.rst:754 +#: library/inspect.rst:776 msgid "" "The optional *return_annotation* argument can be an arbitrary Python object. " "It represents the \"return\" annotation of the callable." msgstr "" -#: library/inspect.rst:757 +#: library/inspect.rst:779 msgid "" ":class:`!Signature` objects are *immutable*. Use :meth:`Signature.replace` " "or :func:`copy.replace` to make a modified copy." msgstr "" -#: library/inspect.rst:760 +#: library/inspect.rst:782 msgid ":class:`!Signature` objects are now picklable and :term:`hashable`." msgstr "" -#: library/inspect.rst:765 +#: library/inspect.rst:787 msgid "A special class-level marker to specify absence of a return annotation." msgstr "" -#: library/inspect.rst:769 +#: library/inspect.rst:791 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:1128 +#: library/inspect.rst:1150 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:780 +#: library/inspect.rst:802 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:785 +#: library/inspect.rst:807 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:791 +#: library/inspect.rst:813 msgid "" "Works the same way as :meth:`Signature.bind`, but allows the omission of " "some required arguments (mimics :func:`functools.partial` behavior.) " @@ -1128,7 +1164,7 @@ msgid "" "arguments do not match the signature." msgstr "" -#: library/inspect.rst:798 +#: library/inspect.rst:820 msgid "" "Create a new :class:`Signature` instance based on the instance :meth:" "`replace` was invoked on. It is possible to pass different *parameters* and/" @@ -1137,7 +1173,7 @@ msgid "" "Signature`, pass in :attr:`Signature.empty`." msgstr "" -#: library/inspect.rst:806 +#: library/inspect.rst:828 msgid "" ">>> def test(a, b):\n" "... pass\n" @@ -1148,34 +1184,34 @@ msgid "" "\"(a, b) -> 'new return anno'\"" msgstr "" -#: library/inspect.rst:816 +#: library/inspect.rst:838 msgid "" ":class:`Signature` objects are also supported by the generic function :func:" "`copy.replace`." msgstr "" -#: library/inspect.rst:821 +#: library/inspect.rst:843 msgid "Create a string representation of the :class:`Signature` object." msgstr "" -#: library/inspect.rst:823 +#: library/inspect.rst:845 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:832 +#: library/inspect.rst:854 msgid "" "Return a :class:`Signature` (or its subclass) object for a given callable " "*obj*." msgstr "" -#: library/inspect.rst:835 +#: library/inspect.rst:857 msgid "This method simplifies subclassing of :class:`Signature`:" msgstr "" -#: library/inspect.rst:837 +#: library/inspect.rst:859 msgid "" "class MySignature(Signature):\n" " pass\n" @@ -1183,129 +1219,129 @@ msgid "" "assert isinstance(sig, MySignature)" msgstr "" -#: library/inspect.rst:844 +#: library/inspect.rst:866 msgid "Its behavior is otherwise identical to that of :func:`signature`." msgstr "" -#: library/inspect.rst:854 +#: library/inspect.rst:876 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:858 +#: library/inspect.rst:880 msgid "Parameter objects are now picklable and :term:`hashable`." msgstr "" -#: library/inspect.rst:863 +#: library/inspect.rst:885 msgid "" "A special class-level marker to specify absence of default values and " "annotations." msgstr "" -#: library/inspect.rst:868 +#: library/inspect.rst:890 msgid "" "The name of the parameter as a string. The name must be a valid Python " "identifier." msgstr "" -#: library/inspect.rst:873 +#: library/inspect.rst:895 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:877 +#: library/inspect.rst:899 msgid "" "These parameter names are now exposed by this module as names like " "``implicit0``." msgstr "" -#: library/inspect.rst:883 +#: library/inspect.rst:905 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:888 +#: library/inspect.rst:910 msgid "" "The annotation for the parameter. If the parameter has no annotation, this " "attribute is set to :attr:`Parameter.empty`." msgstr "" -#: library/inspect.rst:893 +#: library/inspect.rst:915 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:900 +#: library/inspect.rst:922 msgid "Name" msgstr "" -#: library/inspect.rst:900 +#: library/inspect.rst:922 msgid "Meaning" msgstr "" -#: library/inspect.rst:902 +#: library/inspect.rst:924 msgid "*POSITIONAL_ONLY*" msgstr "" -#: library/inspect.rst:902 +#: library/inspect.rst:924 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:907 +#: library/inspect.rst:929 msgid "*POSITIONAL_OR_KEYWORD*" msgstr "" -#: library/inspect.rst:907 +#: library/inspect.rst:929 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:912 +#: library/inspect.rst:934 msgid "*VAR_POSITIONAL*" msgstr "" -#: library/inspect.rst:912 +#: library/inspect.rst:934 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:917 +#: library/inspect.rst:939 msgid "*KEYWORD_ONLY*" msgstr "" -#: library/inspect.rst:917 +#: library/inspect.rst:939 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:922 +#: library/inspect.rst:944 msgid "*VAR_KEYWORD*" msgstr "" -#: library/inspect.rst:922 +#: library/inspect.rst:944 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:928 +#: library/inspect.rst:950 msgid "Example: print all keyword-only arguments without default values:" msgstr "" -#: library/inspect.rst:930 +#: library/inspect.rst:952 msgid "" ">>> def foo(a, b, *, c, d=10):\n" "... pass\n" @@ -1318,15 +1354,15 @@ msgid "" "Parameter: c" msgstr "" -#: library/inspect.rst:944 +#: library/inspect.rst:966 msgid "Describes an enum value of :attr:`Parameter.kind`." msgstr "" -#: library/inspect.rst:948 +#: library/inspect.rst:970 msgid "Example: print all descriptions of arguments:" msgstr "" -#: library/inspect.rst:950 +#: library/inspect.rst:972 msgid "" ">>> def foo(a, b, *, c, d=10):\n" "... pass\n" @@ -1340,7 +1376,7 @@ msgid "" "keyword-only" msgstr "" -#: library/inspect.rst:965 +#: library/inspect.rst:987 msgid "" "Create a new :class:`Parameter` instance based on the instance replaced was " "invoked on. To override a :class:`!Parameter` attribute, pass the " @@ -1348,7 +1384,7 @@ msgid "" "a :class:`!Parameter`, pass :attr:`Parameter.empty`." msgstr "" -#: library/inspect.rst:970 +#: library/inspect.rst:992 msgid "" ">>> from inspect import Parameter\n" ">>> param = Parameter('foo', Parameter.KEYWORD_ONLY, default=42)\n" @@ -1362,83 +1398,83 @@ msgid "" "\"foo: 'spam'\"" msgstr "" -#: library/inspect.rst:983 +#: library/inspect.rst:1005 msgid "" ":class:`Parameter` objects are also supported by the generic function :func:" "`copy.replace`." msgstr "" -#: library/inspect.rst:986 +#: library/inspect.rst:1008 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:993 +#: library/inspect.rst:1015 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:998 +#: library/inspect.rst:1020 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:1002 +#: library/inspect.rst:1024 msgid "" "Should be used in conjunction with :attr:`Signature.parameters` for any " "argument processing purposes." msgstr "" -#: library/inspect.rst:1007 +#: library/inspect.rst:1029 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:1012 +#: library/inspect.rst:1034 msgid "" ":attr:`arguments` is now of type :class:`dict`. Formerly, it was of type :" "class:`collections.OrderedDict`." msgstr "" -#: library/inspect.rst:1018 +#: library/inspect.rst:1040 msgid "" "A tuple of positional arguments values. Dynamically computed from the :attr:" "`arguments` attribute." msgstr "" -#: library/inspect.rst:1023 +#: library/inspect.rst:1045 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:1029 +#: library/inspect.rst:1051 msgid "A reference to the parent :class:`Signature` object." msgstr "" -#: library/inspect.rst:1033 +#: library/inspect.rst:1055 msgid "Set default values for missing arguments." msgstr "" -#: library/inspect.rst:1035 +#: library/inspect.rst:1057 msgid "" "For variable-positional arguments (``*args``) the default is an empty tuple." msgstr "" -#: library/inspect.rst:1038 +#: library/inspect.rst:1060 msgid "" "For variable-keyword arguments (``**kwargs``) the default is an empty dict." msgstr "" -#: library/inspect.rst:1041 +#: library/inspect.rst:1063 msgid "" ">>> def foo(a, b='ham', *args): pass\n" ">>> ba = inspect.signature(foo).bind('spam')\n" @@ -1447,13 +1483,13 @@ msgid "" "{'a': 'spam', 'b': 'ham', 'args': ()}" msgstr "" -#: library/inspect.rst:1051 +#: library/inspect.rst:1073 msgid "" "The :attr:`args` and :attr:`kwargs` properties can be used to invoke " "functions:" msgstr "" -#: library/inspect.rst:1054 +#: library/inspect.rst:1076 msgid "" "def test(a, *, b):\n" " ...\n" @@ -1463,19 +1499,19 @@ msgid "" "test(*ba.args, **ba.kwargs)" msgstr "" -#: library/inspect.rst:1066 +#: library/inspect.rst:1088 msgid ":pep:`362` - Function Signature Object." msgstr "" -#: library/inspect.rst:1067 +#: library/inspect.rst:1089 msgid "The detailed specification, implementation details and examples." msgstr "" -#: library/inspect.rst:1073 +#: library/inspect.rst:1095 msgid "Classes and functions" msgstr "" -#: library/inspect.rst:1077 +#: library/inspect.rst:1099 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 " @@ -1486,19 +1522,19 @@ msgid "" "will appear multiple times." msgstr "" -#: library/inspect.rst:1088 +#: library/inspect.rst:1110 msgid "" "Get the names and default values of a Python function's parameters. A :term:" "`named tuple` is returned:" msgstr "" -#: library/inspect.rst:1091 +#: library/inspect.rst:1113 msgid "" "``FullArgSpec(args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, " "annotations)``" msgstr "" -#: library/inspect.rst:1094 +#: library/inspect.rst:1116 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 " @@ -1513,7 +1549,7 @@ msgid "" "report the function return value annotation (if any)." msgstr "" -#: library/inspect.rst:1109 +#: library/inspect.rst:1131 msgid "" "Note that :func:`signature` and :ref:`Signature Object ` provide the recommended API for callable introspection, and support " @@ -1523,22 +1559,22 @@ msgid "" "``inspect`` module API." msgstr "" -#: library/inspect.rst:1116 +#: library/inspect.rst:1138 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:1121 +#: library/inspect.rst:1143 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 " "restore a clearly supported standard interface for single-source Python 2/3 " -"code migrating away from the legacy :func:`getargspec` API." +"code migrating away from the legacy :func:`!getargspec` API." msgstr "" -#: library/inspect.rst:1136 +#: library/inspect.rst:1158 msgid "" "Get information about arguments passed into a particular frame. A :term:" "`named tuple` ``ArgInfo(args, varargs, keywords, locals)`` is returned. " @@ -1547,18 +1583,18 @@ msgid "" "dictionary of the given frame." msgstr "" -#: library/inspect.rst:1153 +#: library/inspect.rst:1175 msgid "This function was inadvertently marked as deprecated in Python 3.5." msgstr "" -#: library/inspect.rst:1148 +#: library/inspect.rst:1170 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:1158 +#: library/inspect.rst:1180 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 " @@ -1566,7 +1602,7 @@ msgid "" "user-defined metatype is in use, cls will be the first element of the tuple." msgstr "" -#: library/inspect.rst:1166 +#: library/inspect.rst:1188 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 " @@ -1579,7 +1615,7 @@ msgid "" "example:" msgstr "" -#: library/inspect.rst:1175 +#: library/inspect.rst:1197 msgid "" ">>> from inspect import getcallargs\n" ">>> def f(a, b=1, *pos, **named):\n" @@ -1596,11 +1632,11 @@ msgid "" "TypeError: f() missing 1 required positional argument: 'a'" msgstr "" -#: library/inspect.rst:1192 +#: library/inspect.rst:1214 msgid "Use :meth:`Signature.bind` and :meth:`Signature.bind_partial` instead." msgstr "" -#: library/inspect.rst:1198 +#: library/inspect.rst:1220 msgid "" "Get the mapping of external name references in a Python function or method " "*func* to their current values. A :term:`named tuple` " @@ -1612,18 +1648,18 @@ msgid "" "builtins." msgstr "" -#: library/inspect.rst:1207 +#: library/inspect.rst:1229 msgid "" ":exc:`TypeError` is raised if *func* is not a Python function or method." msgstr "" -#: library/inspect.rst:1214 +#: library/inspect.rst:1236 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:1217 +#: library/inspect.rst:1239 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 " @@ -1633,80 +1669,80 @@ msgid "" "``__signature__`` attribute defined." msgstr "" -#: library/inspect.rst:1224 +#: library/inspect.rst:1246 msgid ":exc:`ValueError` is raised if a cycle is encountered." msgstr "" -#: library/inspect.rst:1231 +#: library/inspect.rst:1253 msgid "Compute the annotations dict for an object." msgstr "" -#: library/inspect.rst:1233 +#: library/inspect.rst:1255 msgid "" "``obj`` may be a callable, class, or module. Passing in an object of any " "other type raises :exc:`TypeError`." msgstr "" -#: library/inspect.rst:1236 +#: library/inspect.rst:1258 msgid "" "Returns a dict. ``get_annotations()`` returns a new dict every time it's " "called; calling it twice on the same object will return two different but " "equivalent dicts." msgstr "" -#: library/inspect.rst:1240 +#: library/inspect.rst:1262 msgid "This function handles several details for you:" msgstr "" -#: library/inspect.rst:1242 +#: library/inspect.rst:1264 msgid "" "If ``eval_str`` is true, values of type ``str`` will be un-stringized using :" "func:`eval`. This is intended for use with stringized annotations (``from " "__future__ import annotations``)." msgstr "" -#: library/inspect.rst:1246 +#: library/inspect.rst:1268 msgid "" "If ``obj`` doesn't have an annotations dict, returns an empty dict. " "(Functions and methods always have an annotations dict; classes, modules, " "and other types of callables may not.)" msgstr "" -#: library/inspect.rst:1250 +#: library/inspect.rst:1272 msgid "" "Ignores inherited annotations on classes. If a class doesn't have its own " "annotations dict, returns an empty dict." msgstr "" -#: library/inspect.rst:1252 +#: library/inspect.rst:1274 msgid "" "All accesses to object members and dict values are done using ``getattr()`` " "and ``dict.get()`` for safety." msgstr "" -#: library/inspect.rst:1254 +#: library/inspect.rst:1276 msgid "Always, always, always returns a freshly created dict." msgstr "" -#: library/inspect.rst:1256 +#: library/inspect.rst:1278 msgid "" "``eval_str`` controls whether or not values of type ``str`` are replaced " "with the result of calling :func:`eval` on those values:" msgstr "" -#: library/inspect.rst:1259 +#: library/inspect.rst:1281 msgid "" "If eval_str is true, :func:`eval` is called on values of type ``str``. (Note " "that ``get_annotations`` doesn't catch exceptions; if :func:`eval` raises an " "exception, it will unwind the stack past the ``get_annotations`` call.)" msgstr "" -#: library/inspect.rst:1263 +#: library/inspect.rst:1285 msgid "" "If eval_str is false (the default), values of type ``str`` are unchanged." msgstr "" -#: library/inspect.rst:1265 +#: library/inspect.rst:1287 msgid "" "``globals`` and ``locals`` are passed in to :func:`eval`; see the " "documentation for :func:`eval` for more information. If ``globals`` or " @@ -1714,35 +1750,35 @@ msgid "" "specific default, contingent on ``type(obj)``:" msgstr "" -#: library/inspect.rst:1270 +#: library/inspect.rst:1292 msgid "If ``obj`` is a module, ``globals`` defaults to ``obj.__dict__``." msgstr "" -#: library/inspect.rst:1271 +#: library/inspect.rst:1293 msgid "" "If ``obj`` is a class, ``globals`` defaults to ``sys.modules[obj.__module__]." "__dict__`` and ``locals`` defaults to the ``obj`` class namespace." msgstr "" -#: library/inspect.rst:1274 +#: library/inspect.rst:1296 msgid "" "If ``obj`` is a callable, ``globals`` defaults to :attr:`obj.__globals__ " "`, although if ``obj`` is a wrapped function (using :" "func:`functools.update_wrapper`) it is first unwrapped." msgstr "" -#: library/inspect.rst:1279 +#: library/inspect.rst:1301 msgid "" "Calling ``get_annotations`` is best practice for accessing the annotations " "dict of any object. See :ref:`annotations-howto` for more information on " "annotations best practices." msgstr "" -#: library/inspect.rst:1289 +#: library/inspect.rst:1311 msgid "The interpreter stack" msgstr "" -#: library/inspect.rst:1291 +#: library/inspect.rst:1313 msgid "" "Some of the following functions return :class:`FrameInfo` objects. For " "backwards compatibility these objects allow tuple-like operations on all " @@ -1750,95 +1786,95 @@ msgid "" "may be removed in the future." msgstr "" -#: library/inspect.rst:1300 +#: library/inspect.rst:1322 msgid "The :ref:`frame object ` that the record corresponds to." msgstr "" -#: library/inspect.rst:1304 +#: library/inspect.rst:1326 msgid "" "The file name associated with the code being executed by the frame this " "record corresponds to." msgstr "" -#: library/inspect.rst:1309 +#: library/inspect.rst:1331 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:1314 +#: library/inspect.rst:1336 msgid "" "The function name that is being executed by the frame this record " "corresponds to." msgstr "" -#: library/inspect.rst:1318 +#: library/inspect.rst:1340 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:1362 +#: library/inspect.rst:1384 msgid "" "The index of the current line being executed in the :attr:`code_context` " "list." msgstr "" -#: library/inspect.rst:1327 +#: library/inspect.rst:1349 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:1331 +#: library/inspect.rst:1353 msgid "Return a :term:`named tuple` instead of a :class:`tuple`." msgstr "" -#: library/inspect.rst:1334 +#: library/inspect.rst:1356 msgid "" ":class:`!FrameInfo` is now a class instance (that is backwards compatible " "with the previous :term:`named tuple`)." msgstr "" -#: library/inspect.rst:1343 +#: library/inspect.rst:1365 msgid "" "The file name associated with the code being executed by the frame this " "traceback corresponds to." msgstr "" -#: library/inspect.rst:1348 +#: library/inspect.rst:1370 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:1353 +#: library/inspect.rst:1375 msgid "" "The function name that is being executed by the frame this traceback " "corresponds to." msgstr "" -#: library/inspect.rst:1357 +#: library/inspect.rst:1379 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:1366 +#: library/inspect.rst:1388 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:1371 +#: library/inspect.rst:1393 msgid "" ":class:`!Traceback` is now a class instance (that is backwards compatible " "with the previous :term:`named tuple`)." msgstr "" -#: library/inspect.rst:1378 +#: library/inspect.rst:1400 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 " @@ -1850,7 +1886,7 @@ msgid "" "consumption which occurs." msgstr "" -#: library/inspect.rst:1386 +#: library/inspect.rst:1408 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 :" @@ -1858,7 +1894,7 @@ msgid "" "disabled when Python was compiled or using :func:`gc.disable`. For example::" msgstr "" -#: library/inspect.rst:1391 +#: library/inspect.rst:1413 msgid "" "def handle_stackframe_without_leak():\n" " frame = inspect.currentframe()\n" @@ -1868,31 +1904,31 @@ msgid "" " del frame" msgstr "" -#: library/inspect.rst:1398 +#: library/inspect.rst:1420 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:1402 +#: library/inspect.rst:1424 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:1409 +#: library/inspect.rst:1431 msgid "" "Get information about a frame or traceback object. A :class:`Traceback` " "object is returned." msgstr "" -#: library/inspect.rst:1412 +#: library/inspect.rst:1434 msgid "A :class:`Traceback` object is returned instead of a named tuple." msgstr "" -#: library/inspect.rst:1417 +#: library/inspect.rst:1439 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 " @@ -1900,17 +1936,17 @@ msgid "" "represents the outermost call on *frame*'s stack." msgstr "" -#: library/inspect.rst:1437 library/inspect.rst:1478 +#: library/inspect.rst:1459 library/inspect.rst:1500 msgid "" "A list of :term:`named tuples ` ``FrameInfo(frame, filename, " "lineno, function, code_context, index)`` is returned." msgstr "" -#: library/inspect.rst:1442 library/inspect.rst:1483 +#: library/inspect.rst:1464 library/inspect.rst:1505 msgid "A list of :class:`FrameInfo` objects is returned." msgstr "" -#: library/inspect.rst:1432 +#: library/inspect.rst:1454 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 " @@ -1918,11 +1954,11 @@ msgid "" "represents where the exception was raised." msgstr "" -#: library/inspect.rst:1447 +#: library/inspect.rst:1469 msgid "Return the frame object for the caller's stack frame." msgstr "" -#: library/inspect.rst:1451 +#: library/inspect.rst:1473 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 " @@ -1930,14 +1966,14 @@ msgid "" "``None``." msgstr "" -#: library/inspect.rst:1459 +#: library/inspect.rst:1481 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:1473 +#: library/inspect.rst:1495 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 " @@ -1945,11 +1981,11 @@ msgid "" "entry represents where the exception was raised." msgstr "" -#: library/inspect.rst:1487 +#: library/inspect.rst:1509 msgid "Fetching attributes statically" msgstr "" -#: library/inspect.rst:1489 +#: library/inspect.rst:1511 msgid "" "Both :func:`getattr` and :func:`hasattr` can trigger code execution when " "fetching or checking for the existence of attributes. Descriptors, like " @@ -1957,20 +1993,20 @@ msgid "" "`~object.__getattribute__` may be called." msgstr "" -#: library/inspect.rst:1495 +#: library/inspect.rst:1517 msgid "" "For cases where you want passive introspection, like documentation tools, " -"this can be inconvenient. :func:`getattr_static` has the same signature as :" +"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:1501 +#: library/inspect.rst:1524 msgid "" "Retrieve attributes without triggering dynamic lookup via the descriptor " "protocol, :meth:`~object.__getattr__` or :meth:`~object.__getattribute__`." msgstr "" -#: library/inspect.rst:1505 +#: library/inspect.rst:1528 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 " @@ -1978,27 +2014,27 @@ msgid "" "return descriptors objects instead of instance members." msgstr "" -#: library/inspect.rst:1511 +#: library/inspect.rst:1534 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:1517 +#: library/inspect.rst:1540 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:1521 +#: library/inspect.rst:1544 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:1525 +#: library/inspect.rst:1548 msgid "" "# example code for resolving the builtin descriptor types\n" "class _foo:\n" @@ -2021,11 +2057,11 @@ msgid "" " pass" msgstr "" -#: library/inspect.rst:1547 +#: library/inspect.rst:1570 msgid "Current State of Generators, Coroutines, and Asynchronous Generators" msgstr "" -#: library/inspect.rst:1549 +#: library/inspect.rst:1572 msgid "" "When implementing coroutine schedulers and for other advanced uses of " "generators, it is useful to determine whether a generator is currently " @@ -2034,31 +2070,31 @@ msgid "" "generator to be determined easily." msgstr "" -#: library/inspect.rst:1557 +#: library/inspect.rst:1580 msgid "Get current state of a generator-iterator." msgstr "" -#: library/inspect.rst:1575 library/inspect.rst:1592 +#: library/inspect.rst:1598 library/inspect.rst:1615 msgid "Possible states are:" msgstr "" -#: library/inspect.rst:1561 +#: library/inspect.rst:1584 msgid "GEN_CREATED: Waiting to start execution." msgstr "" -#: library/inspect.rst:1562 +#: library/inspect.rst:1585 msgid "GEN_RUNNING: Currently being executed by the interpreter." msgstr "" -#: library/inspect.rst:1563 +#: library/inspect.rst:1586 msgid "GEN_SUSPENDED: Currently suspended at a yield expression." msgstr "" -#: library/inspect.rst:1564 +#: library/inspect.rst:1587 msgid "GEN_CLOSED: Execution has completed." msgstr "" -#: library/inspect.rst:1570 +#: library/inspect.rst:1593 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 " @@ -2066,23 +2102,23 @@ msgid "" "``cr_frame`` attributes." msgstr "" -#: library/inspect.rst:1577 +#: library/inspect.rst:1600 msgid "CORO_CREATED: Waiting to start execution." msgstr "" -#: library/inspect.rst:1578 +#: library/inspect.rst:1601 msgid "CORO_RUNNING: Currently being executed by the interpreter." msgstr "" -#: library/inspect.rst:1579 +#: library/inspect.rst:1602 msgid "CORO_SUSPENDED: Currently suspended at an await expression." msgstr "" -#: library/inspect.rst:1580 +#: library/inspect.rst:1603 msgid "CORO_CLOSED: Execution has completed." msgstr "" -#: library/inspect.rst:1586 +#: library/inspect.rst:1609 msgid "" "Get current state of an asynchronous generator object. The function is " "intended to be used with asynchronous iterator objects created by :keyword:" @@ -2091,30 +2127,30 @@ msgid "" "``ag_frame`` attributes." msgstr "" -#: library/inspect.rst:1594 +#: library/inspect.rst:1617 msgid "AGEN_CREATED: Waiting to start execution." msgstr "" -#: library/inspect.rst:1595 +#: library/inspect.rst:1618 msgid "AGEN_RUNNING: Currently being executed by the interpreter." msgstr "" -#: library/inspect.rst:1596 +#: library/inspect.rst:1619 msgid "AGEN_SUSPENDED: Currently suspended at a yield expression." msgstr "" -#: library/inspect.rst:1597 +#: library/inspect.rst:1620 msgid "AGEN_CLOSED: Execution has completed." msgstr "" -#: library/inspect.rst:1601 +#: library/inspect.rst:1624 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:1607 +#: library/inspect.rst:1630 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. " @@ -2122,14 +2158,14 @@ msgid "" "generator, and all the same caveats apply." msgstr "" -#: library/inspect.rst:1612 +#: library/inspect.rst:1635 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:1618 +#: library/inspect.rst:1641 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 " @@ -2137,79 +2173,79 @@ msgid "" "dictionary." msgstr "" -#: library/inspect.rst:1627 +#: library/inspect.rst:1650 msgid "" "This function is analogous to :func:`~inspect.getgeneratorlocals`, but works " "for coroutine objects created by :keyword:`async def` functions." msgstr "" -#: library/inspect.rst:1634 +#: library/inspect.rst:1657 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:1644 +#: library/inspect.rst:1667 msgid "Code Objects Bit Flags" msgstr "" -#: library/inspect.rst:1646 +#: library/inspect.rst:1669 msgid "" "Python code objects have a :attr:`~codeobject.co_flags` attribute, which is " "a bitmap of the following flags:" msgstr "" -#: library/inspect.rst:1651 +#: library/inspect.rst:1674 msgid "The code object is optimized, using fast locals." msgstr "" -#: library/inspect.rst:1655 +#: library/inspect.rst:1678 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:1660 +#: library/inspect.rst:1683 msgid "The code object has a variable positional parameter (``*args``-like)." msgstr "" -#: library/inspect.rst:1664 +#: library/inspect.rst:1687 msgid "The code object has a variable keyword parameter (``**kwargs``-like)." msgstr "" -#: library/inspect.rst:1668 +#: library/inspect.rst:1691 msgid "The flag is set when the code object is a nested function." msgstr "" -#: library/inspect.rst:1672 +#: library/inspect.rst:1695 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:1677 +#: library/inspect.rst:1700 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:1685 +#: library/inspect.rst:1708 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:1694 +#: library/inspect.rst:1717 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:1701 +#: library/inspect.rst:1724 msgid "" "The flags are specific to CPython, and may not be defined in other Python " "implementations. Furthermore, the flags are an implementation detail, and " @@ -2217,39 +2253,39 @@ msgid "" "use public APIs from the :mod:`inspect` module for any introspection needs." msgstr "" -#: library/inspect.rst:1709 +#: library/inspect.rst:1732 msgid "Buffer flags" msgstr "" -#: library/inspect.rst:1713 +#: library/inspect.rst:1736 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:1717 +#: library/inspect.rst:1740 msgid "The meaning of the flags is explained at :ref:`buffer-request-types`." msgstr "" -#: library/inspect.rst:1744 +#: library/inspect.rst:1767 msgid "Command-line interface" msgstr "" -#: library/inspect.rst:1746 +#: library/inspect.rst:1769 msgid "" "The :mod:`inspect` module also provides a basic introspection capability " "from the command line." msgstr "" -#: library/inspect.rst:1751 +#: library/inspect.rst:1774 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 " "appended a colon and the qualified name of the target object." msgstr "" -#: library/inspect.rst:1757 +#: library/inspect.rst:1780 msgid "" "Print information about the specified object rather than the source code" msgstr "" diff --git a/library/internet.po b/library/internet.po index af14ae8b3..ea66c389c 100644 --- a/library/internet.po +++ b/library/internet.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: 2024-12-15 13:44+0000\n" "Last-Translator: Artemis Leonardou \n" "Language-Team: PyGreece \n" diff --git a/library/intro.po b/library/intro.po index 86b43e805..862b05a88 100644 --- a/library/intro.po +++ b/library/intro.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/io.po b/library/io.po index f77b1520d..a0a215c41 100644 --- a/library/io.po +++ b/library/io.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -62,11 +62,11 @@ msgid "" "since :exc:`IOError` is now an alias of :exc:`OSError`." msgstr "" -#: library/io.rst:862 library/io.rst:1158 +#: library/io.rst:894 library/io.rst:1190 msgid "Text I/O" msgstr "" -#: library/io.rst:53 +#: library/io.rst:54 msgid "" "Text I/O expects and produces :class:`str` objects. This means that " "whenever the backing store is natively made of bytes (such as in the case of " @@ -74,36 +74,36 @@ msgid "" "optional translation of platform-specific newline characters." msgstr "" -#: library/io.rst:58 +#: library/io.rst:59 msgid "" "The easiest way to create a text stream is with :meth:`open`, optionally " "specifying an encoding::" msgstr "" -#: library/io.rst:61 +#: library/io.rst:62 msgid "f = open(\"myfile.txt\", \"r\", encoding=\"utf-8\")" msgstr "" -#: library/io.rst:63 +#: library/io.rst:64 msgid "" "In-memory text streams are also available as :class:`StringIO` objects::" msgstr "" -#: library/io.rst:65 +#: library/io.rst:66 msgid "f = io.StringIO(\"some initial text data\")" msgstr "" -#: library/io.rst:67 +#: library/io.rst:68 msgid "" "The text stream API is described in detail in the documentation of :class:" "`TextIOBase`." msgstr "" -#: library/io.rst:1146 +#: library/io.rst:1178 msgid "Binary I/O" msgstr "" -#: library/io.rst:74 +#: library/io.rst:76 msgid "" "Binary I/O (also called *buffered I/O*) expects :term:`bytes-like objects " "` and produces :class:`bytes` objects. No encoding, " @@ -112,42 +112,42 @@ msgid "" "the handling of text data is desired." msgstr "" -#: library/io.rst:80 +#: library/io.rst:82 msgid "" "The easiest way to create a binary stream is with :meth:`open` with ``'b'`` " "in the mode string::" msgstr "" -#: library/io.rst:83 +#: library/io.rst:85 msgid "f = open(\"myfile.jpg\", \"rb\")" msgstr "" -#: library/io.rst:85 +#: library/io.rst:87 msgid "" "In-memory binary streams are also available as :class:`BytesIO` objects::" msgstr "" -#: library/io.rst:87 +#: library/io.rst:89 msgid "f = io.BytesIO(b\"some initial binary data: \\x00\\x01\")" msgstr "" -#: library/io.rst:89 +#: library/io.rst:91 msgid "" "The binary stream API is described in detail in the docs of :class:" "`BufferedIOBase`." msgstr "" -#: library/io.rst:92 +#: library/io.rst:94 msgid "" "Other library modules may provide additional ways to create text or binary " "streams. See :meth:`socket.socket.makefile` for example." msgstr "" -#: library/io.rst:97 +#: library/io.rst:99 msgid "Raw I/O" msgstr "" -#: library/io.rst:99 +#: library/io.rst:101 msgid "" "Raw I/O (also called *unbuffered I/O*) is generally used as a low-level " "building-block for binary and text streams; it is rarely useful to directly " @@ -155,26 +155,36 @@ msgid "" "stream by opening a file in binary mode with buffering disabled::" msgstr "" -#: library/io.rst:104 +#: library/io.rst:106 msgid "f = open(\"myfile.jpg\", \"rb\", buffering=0)" msgstr "" -#: library/io.rst:106 +#: library/io.rst:108 msgid "" "The raw stream API is described in detail in the docs of :class:`RawIOBase`." msgstr "" -#: library/io.rst:112 +#: library/io.rst:111 +msgid "" +"Raw I/O is a low-level interface and methods generally must have their " +"return values checked and be explicitly retried to ensure an operation " +"completes. For instance :meth:`~RawIOBase.write` returns the number of bytes " +"written which may be less than the number of bytes provided (a partial " +"write). High-level I/O objects like :ref:`binary-io` and :ref:`text-io` " +"implement retry behavior." +msgstr "" + +#: library/io.rst:121 msgid "Text Encoding" msgstr "" -#: library/io.rst:114 +#: library/io.rst:123 msgid "" "The default encoding of :class:`TextIOWrapper` and :func:`open` is locale-" "specific (:func:`locale.getencoding`)." msgstr "" -#: library/io.rst:117 +#: library/io.rst:126 msgid "" "However, many developers forget to specify the encoding when opening text " "files encoded in UTF-8 (e.g. JSON, TOML, Markdown, etc...) since most Unix " @@ -182,14 +192,14 @@ msgid "" "encoding is not UTF-8 for most Windows users. For example::" msgstr "" -#: library/io.rst:122 +#: library/io.rst:131 msgid "" "# May not work on Windows when non-ASCII characters in the file.\n" "with open(\"README.md\") as f:\n" " long_description = f.read()" msgstr "" -#: library/io.rst:126 +#: library/io.rst:135 msgid "" "Accordingly, it is highly recommended that you specify the encoding " "explicitly when opening text files. If you want to use UTF-8, pass " @@ -197,33 +207,33 @@ msgid "" "``encoding=\"locale\"`` is supported since Python 3.10." msgstr "" -#: library/io.rst:133 +#: library/io.rst:142 msgid ":ref:`utf8-mode`" msgstr "" -#: library/io.rst:134 +#: library/io.rst:143 msgid "" "Python UTF-8 Mode can be used to change the default encoding to UTF-8 from " "locale-specific encoding." msgstr "" -#: library/io.rst:137 +#: library/io.rst:146 msgid ":pep:`686`" msgstr "" -#: library/io.rst:138 +#: library/io.rst:147 msgid "Python 3.15 will make :ref:`utf8-mode` default." msgstr "" -#: library/io.rst:143 +#: library/io.rst:152 msgid "Opt-in EncodingWarning" msgstr "" -#: library/io.rst:145 +#: library/io.rst:154 msgid "See :pep:`597` for more details." msgstr "" -#: library/io.rst:148 +#: library/io.rst:157 msgid "" "To find where the default locale encoding is used, you can enable the :" "option:`-X warn_default_encoding <-X>` command line option or set the :" @@ -231,7 +241,7 @@ msgid "" "exc:`EncodingWarning` when the default encoding is used." msgstr "" -#: library/io.rst:153 +#: library/io.rst:162 msgid "" "If you are providing an API that uses :func:`open` or :class:`TextIOWrapper` " "and passes ``encoding=None`` as a parameter, you can use :func:" @@ -240,39 +250,39 @@ msgid "" "consider using UTF-8 by default (i.e. ``encoding=\"utf-8\"``) for new APIs." msgstr "" -#: library/io.rst:162 +#: library/io.rst:171 msgid "High-level Module Interface" msgstr "" -#: library/io.rst:166 +#: library/io.rst:175 msgid "" "An int containing the default buffer size used by the module's buffered I/O " "classes. :func:`open` uses the file's blksize (as obtained by :func:`os." "stat`) if possible." msgstr "" -#: library/io.rst:173 +#: library/io.rst:182 msgid "This is an alias for the builtin :func:`open` function." msgstr "" -#: library/io.rst:177 +#: library/io.rst:186 msgid "" "This function raises an :ref:`auditing event ` ``open`` with " "arguments *path*, *mode* and *flags*. The *mode* and *flags* arguments may " "have been modified or inferred from the original call." msgstr "" -#: library/io.rst:184 +#: library/io.rst:193 msgid "" "Opens the provided file with mode ``'rb'``. This function should be used " "when the intent is to treat the contents as executable code." msgstr "" -#: library/io.rst:187 +#: library/io.rst:196 msgid "*path* should be a :class:`str` and an absolute path." msgstr "" -#: library/io.rst:189 +#: library/io.rst:198 msgid "" "The behavior of this function may be overridden by an earlier call to the :c:" "func:`PyFile_SetOpenCodeHook`. However, assuming that *path* is a :class:" @@ -281,27 +291,27 @@ msgid "" "additional validation or preprocessing of the file." msgstr "" -#: library/io.rst:200 +#: library/io.rst:209 msgid "" "This is a helper function for callables that use :func:`open` or :class:" "`TextIOWrapper` and have an ``encoding=None`` parameter." msgstr "" -#: library/io.rst:203 +#: library/io.rst:212 msgid "" "This function returns *encoding* if it is not ``None``. Otherwise, it " "returns ``\"locale\"`` or ``\"utf-8\"`` depending on :ref:`UTF-8 Mode `." msgstr "" -#: library/io.rst:207 +#: library/io.rst:216 msgid "" "This function emits an :class:`EncodingWarning` if :data:`sys.flags." "warn_default_encoding ` is true and *encoding* is ``None``. " "*stacklevel* specifies where the warning is emitted. For example::" msgstr "" -#: library/io.rst:212 +#: library/io.rst:221 msgid "" "def read_text(path, encoding=None):\n" " encoding = io.text_encoding(encoding) # stacklevel=2\n" @@ -309,49 +319,49 @@ msgid "" " return f.read()" msgstr "" -#: library/io.rst:217 +#: library/io.rst:226 msgid "" "In this example, an :class:`EncodingWarning` is emitted for the caller of " "``read_text()``." msgstr "" -#: library/io.rst:220 +#: library/io.rst:229 msgid "See :ref:`io-text-encoding` for more information." msgstr "" -#: library/io.rst:224 +#: library/io.rst:233 msgid "" ":func:`text_encoding` returns \"utf-8\" when UTF-8 mode is enabled and " "*encoding* is ``None``." msgstr "" -#: library/io.rst:231 +#: library/io.rst:240 msgid "" "This is a compatibility alias for the builtin :exc:`BlockingIOError` " "exception." msgstr "" -#: library/io.rst:237 +#: library/io.rst:246 msgid "" "An exception inheriting :exc:`OSError` and :exc:`ValueError` that is raised " "when an unsupported operation is called on a stream." msgstr "" -#: library/io.rst:243 +#: library/io.rst:252 msgid ":mod:`sys`" msgstr "" -#: library/io.rst:244 +#: library/io.rst:253 msgid "" "contains the standard IO streams: :data:`sys.stdin`, :data:`sys.stdout`, " "and :data:`sys.stderr`." msgstr "" -#: library/io.rst:249 +#: library/io.rst:258 msgid "Class hierarchy" msgstr "" -#: library/io.rst:251 +#: library/io.rst:260 msgid "" "The implementation of I/O streams is organized as a hierarchy of classes. " "First :term:`abstract base classes ` (ABCs), which are " @@ -359,7 +369,7 @@ msgid "" "providing the standard stream implementations." msgstr "" -#: library/io.rst:258 +#: library/io.rst:267 msgid "" "The abstract base classes also provide default implementations of some " "methods in order to help implementation of concrete stream classes. For " @@ -367,7 +377,7 @@ msgid "" "meth:`!readinto` and :meth:`!readline`." msgstr "" -#: library/io.rst:263 +#: library/io.rst:272 msgid "" "At the top of the I/O hierarchy is the abstract base class :class:`IOBase`. " "It defines the basic interface to a stream. Note, however, that there is no " @@ -376,14 +386,14 @@ msgid "" "operation." msgstr "" -#: library/io.rst:268 +#: library/io.rst:277 msgid "" "The :class:`RawIOBase` ABC extends :class:`IOBase`. It deals with the " "reading and writing of bytes to a stream. :class:`FileIO` subclasses :class:" "`RawIOBase` to provide an interface to files in the machine's file system." msgstr "" -#: library/io.rst:272 +#: library/io.rst:281 msgid "" "The :class:`BufferedIOBase` ABC extends :class:`IOBase`. It deals with " "buffering on a raw binary stream (:class:`RawIOBase`). Its subclasses, :" @@ -394,7 +404,7 @@ msgid "" "class:`BytesIO`, is a stream of in-memory bytes." msgstr "" -#: library/io.rst:280 +#: library/io.rst:289 msgid "" "The :class:`TextIOBase` ABC extends :class:`IOBase`. It deals with streams " "whose bytes represent text, and handles encoding and decoding to and from " @@ -403,101 +413,101 @@ msgid "" "Finally, :class:`StringIO` is an in-memory stream for text." msgstr "" -#: library/io.rst:286 +#: library/io.rst:295 msgid "" "Argument names are not part of the specification, and only the arguments of :" "func:`open` are intended to be used as keyword arguments." msgstr "" -#: library/io.rst:289 +#: library/io.rst:298 msgid "" "The following table summarizes the ABCs provided by the :mod:`io` module:" msgstr "" -#: library/io.rst:294 +#: library/io.rst:303 msgid "ABC" msgstr "" -#: library/io.rst:294 +#: library/io.rst:303 msgid "Inherits" msgstr "" -#: library/io.rst:294 +#: library/io.rst:303 msgid "Stub Methods" msgstr "" -#: library/io.rst:294 +#: library/io.rst:303 msgid "Mixin Methods and Properties" msgstr "" -#: library/io.rst:301 library/io.rst:305 +#: library/io.rst:310 library/io.rst:314 msgid ":class:`IOBase`" msgstr "" -#: library/io.rst:296 +#: library/io.rst:305 msgid "``fileno``, ``seek``, and ``truncate``" msgstr "" -#: library/io.rst:296 +#: library/io.rst:305 msgid "" "``close``, ``closed``, ``__enter__``, ``__exit__``, ``flush``, ``isatty``, " "``__iter__``, ``__next__``, ``readable``, ``readline``, ``readlines``, " "``seekable``, ``tell``, ``writable``, and ``writelines``" msgstr "" -#: library/io.rst:301 +#: library/io.rst:310 msgid ":class:`RawIOBase`" msgstr "" -#: library/io.rst:301 +#: library/io.rst:310 msgid "``readinto`` and ``write``" msgstr "" -#: library/io.rst:301 +#: library/io.rst:310 msgid "Inherited :class:`IOBase` methods, ``read``, and ``readall``" msgstr "" -#: library/io.rst:303 +#: library/io.rst:312 msgid ":class:`BufferedIOBase`" msgstr "" -#: library/io.rst:303 +#: library/io.rst:312 msgid "``detach``, ``read``, ``read1``, and ``write``" msgstr "" -#: library/io.rst:303 +#: library/io.rst:312 msgid "Inherited :class:`IOBase` methods, ``readinto``, and ``readinto1``" msgstr "" -#: library/io.rst:305 +#: library/io.rst:314 msgid ":class:`TextIOBase`" msgstr "" -#: library/io.rst:305 +#: library/io.rst:314 msgid "``detach``, ``read``, ``readline``, and ``write``" msgstr "" -#: library/io.rst:305 +#: library/io.rst:314 msgid "" "Inherited :class:`IOBase` methods, ``encoding``, ``errors``, and ``newlines``" msgstr "" -#: library/io.rst:312 +#: library/io.rst:321 msgid "I/O Base Classes" msgstr "" -#: library/io.rst:316 +#: library/io.rst:325 msgid "The abstract base class for all I/O classes." msgstr "" -#: library/io.rst:318 +#: library/io.rst:327 msgid "" "This class provides empty abstract implementations for many methods that " "derived classes can override selectively; the default implementations " "represent a file that cannot be read, written or seeked." msgstr "" -#: library/io.rst:323 +#: library/io.rst:332 msgid "" "Even though :class:`IOBase` does not declare :meth:`!read` or :meth:`!write` " "because their signatures will vary, implementations and clients should " @@ -506,20 +516,20 @@ msgid "" "they do not support are called." msgstr "" -#: library/io.rst:329 +#: library/io.rst:338 msgid "" "The basic type used for binary data read from or written to a file is :class:" "`bytes`. Other :term:`bytes-like objects ` are accepted " "as method arguments too. Text I/O classes work with :class:`str` data." msgstr "" -#: library/io.rst:333 +#: library/io.rst:342 msgid "" "Note that calling any method (even inquiries) on a closed stream is " "undefined. Implementations may raise :exc:`ValueError` in this case." msgstr "" -#: library/io.rst:336 +#: library/io.rst:345 msgid "" ":class:`IOBase` (and its subclasses) supports the iterator protocol, meaning " "that an :class:`IOBase` object can be iterated over yielding the lines in a " @@ -528,143 +538,143 @@ msgid "" "character strings). See :meth:`~IOBase.readline` below." msgstr "" -#: library/io.rst:342 +#: library/io.rst:351 msgid "" ":class:`IOBase` is also a context manager and therefore supports the :" "keyword:`with` statement. In this example, *file* is closed after the :" "keyword:`!with` statement's suite is finished---even if an exception occurs::" msgstr "" -#: library/io.rst:346 +#: library/io.rst:355 msgid "" "with open('spam.txt', 'w') as file:\n" " file.write('Spam and eggs!')" msgstr "" -#: library/io.rst:349 +#: library/io.rst:358 msgid ":class:`IOBase` provides these data attributes and methods:" msgstr "" -#: library/io.rst:353 +#: library/io.rst:362 msgid "" "Flush and close this stream. This method has no effect if the file is " "already closed. Once the file is closed, any operation on the file (e.g. " "reading or writing) will raise a :exc:`ValueError`." msgstr "" -#: library/io.rst:357 +#: library/io.rst:366 msgid "" "As a convenience, it is allowed to call this method more than once; only the " "first call, however, will have an effect." msgstr "" -#: library/io.rst:362 +#: library/io.rst:371 msgid "``True`` if the stream is closed." msgstr "" -#: library/io.rst:366 +#: library/io.rst:375 msgid "" "Return the underlying file descriptor (an integer) of the stream if it " "exists. An :exc:`OSError` is raised if the IO object does not use a file " "descriptor." msgstr "" -#: library/io.rst:372 +#: library/io.rst:381 msgid "" "Flush the write buffers of the stream if applicable. This does nothing for " "read-only and non-blocking streams." msgstr "" -#: library/io.rst:377 +#: library/io.rst:386 msgid "" "Return ``True`` if the stream is interactive (i.e., connected to a terminal/" "tty device)." msgstr "" -#: library/io.rst:382 +#: library/io.rst:391 msgid "" "Return ``True`` if the stream can be read from. If ``False``, :meth:`!read` " "will raise :exc:`OSError`." msgstr "" -#: library/io.rst:387 +#: library/io.rst:396 msgid "" "Read and return one line from the stream. If *size* is specified, at most " "*size* bytes will be read." msgstr "" -#: library/io.rst:390 +#: library/io.rst:399 msgid "" "The line terminator is always ``b'\\n'`` for binary files; for text files, " "the *newline* argument to :func:`open` can be used to select the line " "terminator(s) recognized." msgstr "" -#: library/io.rst:396 +#: library/io.rst:405 msgid "" "Read and return a list of lines from the stream. *hint* can be specified to " "control the number of lines read: no more lines will be read if the total " "size (in bytes/characters) of all lines so far exceeds *hint*." msgstr "" -#: library/io.rst:400 +#: library/io.rst:409 msgid "" "*hint* values of ``0`` or less, as well as ``None``, are treated as no hint." msgstr "" -#: library/io.rst:403 +#: library/io.rst:412 msgid "" "Note that it's already possible to iterate on file objects using ``for line " "in file: ...`` without calling :meth:`!file.readlines`." msgstr "" -#: library/io.rst:408 +#: library/io.rst:417 msgid "" "Change the stream position to the given byte *offset*, interpreted relative " "to the position indicated by *whence*, and return the new absolute position. " "Values for *whence* are:" msgstr "" -#: library/io.rst:413 +#: library/io.rst:422 msgid "" ":data:`os.SEEK_SET` or ``0`` -- start of the stream (the default); *offset* " "should be zero or positive" msgstr "" -#: library/io.rst:415 +#: library/io.rst:424 msgid "" ":data:`os.SEEK_CUR` or ``1`` -- current stream position; *offset* may be " "negative" msgstr "" -#: library/io.rst:417 +#: library/io.rst:426 msgid "" ":data:`os.SEEK_END` or ``2`` -- end of the stream; *offset* is usually " "negative" msgstr "" -#: library/io.rst:938 +#: library/io.rst:970 msgid "The :data:`!SEEK_*` constants." msgstr "" -#: library/io.rst:423 +#: library/io.rst:432 msgid "" "Some operating systems could support additional values, like :const:`os." "SEEK_HOLE` or :const:`os.SEEK_DATA`. The valid values for a file could " "depend on it being open in text or binary mode." msgstr "" -#: library/io.rst:430 +#: library/io.rst:439 msgid "" "Return ``True`` if the stream supports random access. If ``False``, :meth:" "`seek`, :meth:`tell` and :meth:`truncate` will raise :exc:`OSError`." msgstr "" -#: library/io.rst:435 +#: library/io.rst:444 msgid "Return the current stream position." msgstr "" -#: library/io.rst:439 +#: library/io.rst:448 msgid "" "Resize the stream to the given *size* in bytes (or the current position if " "*size* is not specified). The current stream position isn't changed. This " @@ -673,34 +683,34 @@ msgid "" "additional bytes are zero-filled). The new file size is returned." msgstr "" -#: library/io.rst:446 +#: library/io.rst:455 msgid "Windows will now zero-fill files when extending." msgstr "" -#: library/io.rst:451 +#: library/io.rst:460 msgid "" "Return ``True`` if the stream supports writing. If ``False``, :meth:`!" "write` and :meth:`truncate` will raise :exc:`OSError`." msgstr "" -#: library/io.rst:456 +#: library/io.rst:465 msgid "" "Write a list of lines to the stream. Line separators are not added, so it " "is usual for each of the lines provided to have a line separator at the end." msgstr "" -#: library/io.rst:462 +#: library/io.rst:471 msgid "" "Prepare for object destruction. :class:`IOBase` provides a default " "implementation of this method that calls the instance's :meth:`~IOBase." "close` method." msgstr "" -#: library/io.rst:469 +#: library/io.rst:478 msgid "Base class for raw binary streams. It inherits from :class:`IOBase`." msgstr "" -#: library/io.rst:471 +#: library/io.rst:480 msgid "" "Raw binary streams typically provide low-level access to an underlying OS " "device or API, and do not try to encapsulate it in high-level primitives " @@ -708,47 +718,66 @@ msgid "" "text streams, described later in this page)." msgstr "" -#: library/io.rst:476 +#: library/io.rst:485 msgid "" ":class:`RawIOBase` provides these methods in addition to those from :class:" "`IOBase`:" msgstr "" -#: library/io.rst:481 +#: library/io.rst:490 msgid "" "Read up to *size* bytes from the object and return them. As a convenience, " -"if *size* is unspecified or -1, all bytes until EOF are returned. Otherwise, " -"only one system call is ever made. Fewer than *size* bytes may be returned " -"if the operating system call returns fewer than *size* bytes." +"if *size* is unspecified or -1, all bytes until EOF are returned." msgstr "" -#: library/io.rst:486 +#: library/io.rst:493 +msgid "" +"Attempts to make only one system call but will retry if interrupted and the " +"signal handler does not raise an exception (see :pep:`475` for the " +"rationale). This means fewer than *size* bytes may be returned if the " +"operating system call returns fewer than *size* bytes." +msgstr "" + +#: library/io.rst:498 msgid "" "If 0 bytes are returned, and *size* was not 0, this indicates end of file. " "If the object is in non-blocking mode and no bytes are available, ``None`` " "is returned." msgstr "" -#: library/io.rst:490 +#: library/io.rst:502 msgid "" "The default implementation defers to :meth:`readall` and :meth:`readinto`." msgstr "" -#: library/io.rst:495 +#: library/io.rst:507 msgid "" "Read and return all the bytes from the stream until EOF, using multiple " "calls to the stream if necessary." msgstr "" -#: library/io.rst:500 +#: library/io.rst:510 +msgid "" +"If ``0`` bytes are returned this indicates end of file. If the object is in " +"non-blocking mode and the underlying :meth:`read` returns ``None`` " +"indicating no bytes are available, ``None`` is returned." +msgstr "" + +#: library/io.rst:516 msgid "" "Read bytes into a pre-allocated, writable :term:`bytes-like object` *b*, and " "return the number of bytes read. For example, *b* might be a :class:" -"`bytearray`. If the object is in non-blocking mode and no bytes are " -"available, ``None`` is returned." +"`bytearray`." +msgstr "" + +#: library/io.rst:520 +msgid "" +"If ``0`` is returned and ``len(b)`` is not ``0``, this indicates end of " +"file. If the object is in non-blocking mode and no bytes are available, " +"``None`` is returned." msgstr "" -#: library/io.rst:508 +#: library/io.rst:526 msgid "" "Write the given :term:`bytes-like object`, *b*, to the underlying raw " "stream, and return the number of bytes written. This can be less than the " @@ -759,20 +788,29 @@ msgid "" "the implementation should only access *b* during the method call." msgstr "" -#: library/io.rst:521 +#: library/io.rst:538 +msgid "" +"This function does not ensure all bytes are written or an exception is " +"thrown. Callers may implement that behavior by checking the return value " +"and, if it is less than the length of *b*, looping with additional write " +"calls until all unwritten bytes are written. High-level I/O objects like :" +"ref:`binary-io` and :ref:`text-io` implement retry behavior." +msgstr "" + +#: library/io.rst:546 msgid "" "Base class for binary streams that support some kind of buffering. It " "inherits from :class:`IOBase`." msgstr "" -#: library/io.rst:524 +#: library/io.rst:549 msgid "" "The main difference with :class:`RawIOBase` is that methods :meth:`read`, :" "meth:`readinto` and :meth:`write` will try (respectively) to read as much " "input as requested or to emit all provided data." msgstr "" -#: library/io.rst:528 +#: library/io.rst:553 msgid "" "In addition, if the underlying raw stream is in non-blocking mode, when the " "system returns would block :meth:`write` will raise :exc:`BlockingIOError` " @@ -780,54 +818,54 @@ msgid "" "data read so far or ``None`` if no data is available." msgstr "" -#: library/io.rst:533 +#: library/io.rst:558 msgid "" "Besides, the :meth:`read` method does not have a default implementation that " "defers to :meth:`readinto`." msgstr "" -#: library/io.rst:536 +#: library/io.rst:561 msgid "" "A typical :class:`BufferedIOBase` implementation should not inherit from a :" "class:`RawIOBase` implementation, but wrap one, like :class:`BufferedWriter` " "and :class:`BufferedReader` do." msgstr "" -#: library/io.rst:540 +#: library/io.rst:565 msgid "" ":class:`BufferedIOBase` provides or overrides these data attributes and " "methods in addition to those from :class:`IOBase`:" msgstr "" -#: library/io.rst:545 +#: library/io.rst:570 msgid "" "The underlying raw stream (a :class:`RawIOBase` instance) that :class:" "`BufferedIOBase` deals with. This is not part of the :class:" "`BufferedIOBase` API and may not exist on some implementations." msgstr "" -#: library/io.rst:551 +#: library/io.rst:576 msgid "Separate the underlying raw stream from the buffer and return it." msgstr "" -#: library/io.rst:553 +#: library/io.rst:578 msgid "" "After the raw stream has been detached, the buffer is in an unusable state." msgstr "" -#: library/io.rst:556 +#: library/io.rst:581 msgid "" "Some buffers, like :class:`BytesIO`, do not have the concept of a single raw " "stream to return from this method. They raise :exc:`UnsupportedOperation`." msgstr "" -#: library/io.rst:564 +#: library/io.rst:589 msgid "" "Read and return up to *size* bytes. If the argument is omitted, ``None``, or " "negative read as much as possible." msgstr "" -#: library/io.rst:567 +#: library/io.rst:592 msgid "" "Fewer bytes may be returned than requested. An empty :class:`bytes` object " "is returned if the stream is already at EOF. More than one read may be made " @@ -836,7 +874,7 @@ msgid "" "does not imply that EOF is imminent." msgstr "" -#: library/io.rst:573 +#: library/io.rst:598 msgid "" "When reading as much as possible the default implementation will use ``raw." "readall`` if available (which should implement :meth:`RawIOBase.readall`), " @@ -845,14 +883,14 @@ msgid "" "non-blocking streams more data may become available." msgstr "" -#: library/io.rst:595 +#: library/io.rst:620 msgid "" "When the underlying raw stream is non-blocking, implementations may either " "raise :exc:`BlockingIOError` or return ``None`` if no data is available. :" "mod:`io` implementations return ``None``." msgstr "" -#: library/io.rst:588 +#: library/io.rst:613 msgid "" "Read and return up to *size* bytes, calling :meth:`~RawIOBase.readinto` " "which may retry if :py:const:`~errno.EINTR` is encountered per :pep:`475`. " @@ -860,26 +898,26 @@ msgid "" "arbitrary value for *size*." msgstr "" -#: library/io.rst:601 +#: library/io.rst:626 msgid "" "Read bytes into a pre-allocated, writable :term:`bytes-like object` *b* and " "return the number of bytes read. For example, *b* might be a :class:" "`bytearray`." msgstr "" -#: library/io.rst:605 +#: library/io.rst:630 msgid "" "Like :meth:`read`, multiple reads may be issued to the underlying raw " "stream, unless the latter is interactive." msgstr "" -#: library/io.rst:618 +#: library/io.rst:643 msgid "" "A :exc:`BlockingIOError` is raised if the underlying raw stream is in non " "blocking-mode, and has no data available at the moment." msgstr "" -#: library/io.rst:613 +#: library/io.rst:638 msgid "" "Read bytes into a pre-allocated, writable :term:`bytes-like object` *b*, " "using at most one call to the underlying raw stream's :meth:`~RawIOBase." @@ -887,7 +925,7 @@ msgid "" "read." msgstr "" -#: library/io.rst:625 +#: library/io.rst:650 msgid "" "Write the given :term:`bytes-like object`, *b*, and return the number of " "bytes written (always equal to the length of *b* in bytes, since if the " @@ -896,41 +934,45 @@ msgid "" "or held in a buffer for performance and latency reasons." msgstr "" -#: library/io.rst:632 +#: library/io.rst:657 msgid "" "When in non-blocking mode, a :exc:`BlockingIOError` is raised if the data " "needed to be written to the raw stream but it couldn't accept all the data " "without blocking." msgstr "" -#: library/io.rst:636 +#: library/io.rst:661 msgid "" "The caller may release or mutate *b* after this method returns, so the " "implementation should only access *b* during the method call." msgstr "" -#: library/io.rst:641 +#: library/io.rst:666 msgid "Raw File I/O" msgstr "" -#: library/io.rst:645 +#: library/io.rst:670 msgid "" "A raw binary stream representing an OS-level file containing bytes data. It " -"inherits from :class:`RawIOBase`." +"inherits from :class:`RawIOBase` and implements its low-level access design. " +"This means :meth:`~RawIOBase.write` does not guarantee all bytes are written " +"and :meth:`~RawIOBase.read` may read less bytes than requested even when " +"more bytes may be present in the underlying file. To get \"write all\" and " +"\"read at least\" behavior, use :ref:`binary-io`." msgstr "" -#: library/io.rst:648 +#: library/io.rst:677 msgid "The *name* can be one of two things:" msgstr "" -#: library/io.rst:650 +#: library/io.rst:679 msgid "" "a character string or :class:`bytes` object representing the path to the " "file which will be opened. In this case closefd must be ``True`` (the " "default) otherwise an error will be raised." msgstr "" -#: library/io.rst:653 +#: library/io.rst:682 msgid "" "an integer representing the number of an existing OS-level file descriptor " "to which the resulting :class:`FileIO` object will give access. When the " @@ -938,7 +980,7 @@ msgid "" "set to ``False``." msgstr "" -#: library/io.rst:658 +#: library/io.rst:687 msgid "" "The *mode* can be ``'r'``, ``'w'``, ``'x'`` or ``'a'`` for reading " "(default), writing, exclusive creation or appending. The file will be " @@ -949,14 +991,7 @@ msgid "" "``'+'`` to the mode to allow simultaneous reading and writing." msgstr "" -#: library/io.rst:666 -msgid "" -"The :meth:`~RawIOBase.read` (when called with a positive argument), :meth:" -"`~RawIOBase.readinto` and :meth:`~RawIOBase.write` methods on this class " -"will only make one system call." -msgstr "" - -#: library/io.rst:670 +#: library/io.rst:695 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 " @@ -965,77 +1000,86 @@ msgid "" "similar to passing ``None``)." msgstr "" -#: library/io.rst:676 +#: library/io.rst:701 msgid "The newly created file is :ref:`non-inheritable `." msgstr "" -#: library/io.rst:678 +#: library/io.rst:703 msgid "" "See the :func:`open` built-in function for examples on using the *opener* " "parameter." msgstr "" -#: library/io.rst:681 +#: library/io.rst:707 +msgid "" +":class:`FileIO` is a low-level I/O object and members, such as :meth:" +"`~RawIOBase.read` and :meth:`~RawIOBase.write`, need to have their return " +"values checked explicitly in a retry loop to implement \"write all\" and " +"\"read at least\" behavior. High-level I/O objects :ref:`binary-io` and :ref:" +"`text-io` implement retry behavior." +msgstr "" + +#: library/io.rst:713 msgid "The *opener* parameter was added. The ``'x'`` mode was added." msgstr "" -#: library/io.rst:685 +#: library/io.rst:717 msgid "The file is now non-inheritable." msgstr "" -#: library/io.rst:688 +#: library/io.rst:720 msgid "" ":class:`FileIO` provides these data attributes in addition to those from :" "class:`RawIOBase` and :class:`IOBase`:" msgstr "" -#: library/io.rst:693 +#: library/io.rst:725 msgid "The mode as given in the constructor." msgstr "" -#: library/io.rst:697 +#: library/io.rst:729 msgid "" "The file name. This is the file descriptor of the file when no name is " "given in the constructor." msgstr "" -#: library/io.rst:702 +#: library/io.rst:734 msgid "Buffered Streams" msgstr "" -#: library/io.rst:704 +#: library/io.rst:736 msgid "" "Buffered I/O streams provide a higher-level interface to an I/O device than " "raw I/O does." msgstr "" -#: library/io.rst:709 +#: library/io.rst:741 msgid "" "A binary stream using an in-memory bytes buffer. It inherits from :class:" "`BufferedIOBase`. The buffer is discarded when the :meth:`~IOBase.close` " "method is called." msgstr "" -#: library/io.rst:713 +#: library/io.rst:745 msgid "" "The optional argument *initial_bytes* is a :term:`bytes-like object` that " "contains initial data." msgstr "" -#: library/io.rst:716 +#: library/io.rst:748 msgid "" ":class:`BytesIO` provides or overrides these methods in addition to those " "from :class:`BufferedIOBase` and :class:`IOBase`:" msgstr "" -#: library/io.rst:721 +#: library/io.rst:753 msgid "" "Return a readable and writable view over the contents of the buffer without " "copying them. Also, mutating the view will transparently update the " "contents of the buffer::" msgstr "" -#: library/io.rst:725 +#: library/io.rst:757 msgid "" ">>> b = io.BytesIO(b\"abcdef\")\n" ">>> view = b.getbuffer()\n" @@ -1044,126 +1088,126 @@ msgid "" "b'ab56ef'" msgstr "" -#: library/io.rst:732 +#: library/io.rst:764 msgid "" "As long as the view exists, the :class:`BytesIO` object cannot be resized or " "closed." msgstr "" -#: library/io.rst:739 +#: library/io.rst:771 msgid "Return :class:`bytes` containing the entire contents of the buffer." msgstr "" -#: library/io.rst:744 +#: library/io.rst:776 msgid "In :class:`BytesIO`, this is the same as :meth:`~BufferedIOBase.read`." msgstr "" -#: library/io.rst:786 +#: library/io.rst:818 msgid "The *size* argument is now optional." msgstr "" -#: library/io.rst:751 +#: library/io.rst:783 msgid "" "In :class:`BytesIO`, this is the same as :meth:`~BufferedIOBase.readinto`." msgstr "" -#: library/io.rst:757 +#: library/io.rst:789 msgid "" "A buffered binary stream providing higher-level access to a readable, non " "seekable :class:`RawIOBase` raw binary stream. It inherits from :class:" "`BufferedIOBase`." msgstr "" -#: library/io.rst:761 +#: library/io.rst:793 msgid "" "When reading data from this object, a larger amount of data may be requested " "from the underlying raw stream, and kept in an internal buffer. The buffered " "data can then be returned directly on subsequent reads." msgstr "" -#: library/io.rst:765 +#: library/io.rst:797 msgid "" "The constructor creates a :class:`BufferedReader` for the given readable " "*raw* stream and *buffer_size*. If *buffer_size* is omitted, :data:" "`DEFAULT_BUFFER_SIZE` is used." msgstr "" -#: library/io.rst:769 +#: library/io.rst:801 msgid "" ":class:`BufferedReader` provides or overrides these methods in addition to " "those from :class:`BufferedIOBase` and :class:`IOBase`:" msgstr "" -#: library/io.rst:774 +#: library/io.rst:806 msgid "" "Return bytes from the stream without advancing the position. The number of " "bytes returned may be less or more than requested. If the underlying raw " "stream is non-blocking and the operation would block, returns empty bytes." msgstr "" -#: library/io.rst:780 +#: library/io.rst:812 msgid "" "In :class:`BufferedReader` this is the same as :meth:`io.BufferedIOBase.read`" msgstr "" -#: library/io.rst:784 +#: library/io.rst:816 msgid "" "In :class:`BufferedReader` this is the same as :meth:`io.BufferedIOBase." "read1`" msgstr "" -#: library/io.rst:792 +#: library/io.rst:824 msgid "" "A buffered binary stream providing higher-level access to a writeable, non " "seekable :class:`RawIOBase` raw binary stream. It inherits from :class:" "`BufferedIOBase`." msgstr "" -#: library/io.rst:796 +#: library/io.rst:828 msgid "" "When writing to this object, data is normally placed into an internal " "buffer. The buffer will be written out to the underlying :class:`RawIOBase` " "object under various conditions, including:" msgstr "" -#: library/io.rst:800 +#: library/io.rst:832 msgid "when the buffer gets too small for all pending data;" msgstr "" -#: library/io.rst:801 +#: library/io.rst:833 msgid "when :meth:`flush` is called;" msgstr "" -#: library/io.rst:802 +#: library/io.rst:834 msgid "" "when a :meth:`~IOBase.seek` is requested (for :class:`BufferedRandom` " "objects);" msgstr "" -#: library/io.rst:803 +#: library/io.rst:835 msgid "when the :class:`BufferedWriter` object is closed or destroyed." msgstr "" -#: library/io.rst:805 +#: library/io.rst:837 msgid "" "The constructor creates a :class:`BufferedWriter` for the given writeable " "*raw* stream. If the *buffer_size* is not given, it defaults to :data:" "`DEFAULT_BUFFER_SIZE`." msgstr "" -#: library/io.rst:809 +#: library/io.rst:841 msgid "" ":class:`BufferedWriter` provides or overrides these methods in addition to " "those from :class:`BufferedIOBase` and :class:`IOBase`:" msgstr "" -#: library/io.rst:814 +#: library/io.rst:846 msgid "" "Force bytes held in the buffer into the raw stream. A :exc:" "`BlockingIOError` should be raised if the raw stream blocks." msgstr "" -#: library/io.rst:819 +#: library/io.rst:851 msgid "" "Write the :term:`bytes-like object`, *b*, and return the number of bytes " "written. When in non-blocking mode, a :exc:`BlockingIOError` with :attr:" @@ -1171,175 +1215,175 @@ msgid "" "written out but the raw stream blocks." msgstr "" -#: library/io.rst:827 +#: library/io.rst:859 msgid "" -"A buffered binary stream providing higher-level access to a seekable :class:" -"`RawIOBase` raw binary stream. It inherits from :class:`BufferedReader` " -"and :class:`BufferedWriter`." +"A buffered binary stream implementing :class:`BufferedIOBase` interfaces " +"providing higher-level access to a seekable :class:`RawIOBase` raw binary " +"stream." msgstr "" -#: library/io.rst:831 +#: library/io.rst:863 msgid "" "The constructor creates a reader and writer for a seekable raw stream, given " "in the first argument. If the *buffer_size* is omitted it defaults to :data:" "`DEFAULT_BUFFER_SIZE`." msgstr "" -#: library/io.rst:835 +#: library/io.rst:867 msgid "" ":class:`BufferedRandom` is capable of anything :class:`BufferedReader` or :" "class:`BufferedWriter` can do. In addition, :meth:`~IOBase.seek` and :meth:" "`~IOBase.tell` are guaranteed to be implemented." msgstr "" -#: library/io.rst:842 +#: library/io.rst:874 msgid "" "A buffered binary stream providing higher-level access to two non seekable :" "class:`RawIOBase` raw binary streams---one readable, the other writeable. It " "inherits from :class:`BufferedIOBase`." msgstr "" -#: library/io.rst:846 +#: library/io.rst:878 msgid "" "*reader* and *writer* are :class:`RawIOBase` objects that are readable and " "writeable respectively. If the *buffer_size* is omitted it defaults to :" "data:`DEFAULT_BUFFER_SIZE`." msgstr "" -#: library/io.rst:850 +#: library/io.rst:882 msgid "" ":class:`BufferedRWPair` implements all of :class:`BufferedIOBase`\\'s " "methods except for :meth:`~BufferedIOBase.detach`, which raises :exc:" "`UnsupportedOperation`." msgstr "" -#: library/io.rst:856 +#: library/io.rst:888 msgid "" ":class:`BufferedRWPair` does not attempt to synchronize accesses to its " "underlying raw streams. You should not pass it the same object as reader " "and writer; use :class:`BufferedRandom` instead." msgstr "" -#: library/io.rst:866 +#: library/io.rst:898 msgid "" "Base class for text streams. This class provides a character and line based " "interface to stream I/O. It inherits from :class:`IOBase`." msgstr "" -#: library/io.rst:869 +#: library/io.rst:901 msgid "" ":class:`TextIOBase` provides or overrides these data attributes and methods " "in addition to those from :class:`IOBase`:" msgstr "" -#: library/io.rst:874 +#: library/io.rst:906 msgid "" "The name of the encoding used to decode the stream's bytes into strings, and " "to encode strings into bytes." msgstr "" -#: library/io.rst:879 +#: library/io.rst:911 msgid "The error setting of the decoder or encoder." msgstr "" -#: library/io.rst:883 +#: library/io.rst:915 msgid "" "A string, a tuple of strings, or ``None``, indicating the newlines " "translated so far. Depending on the implementation and the initial " "constructor flags, this may not be available." msgstr "" -#: library/io.rst:889 +#: library/io.rst:921 msgid "" "The underlying binary buffer (a :class:`BufferedIOBase` or :class:" "`RawIOBase` instance) that :class:`TextIOBase` deals with. This is not part " "of the :class:`TextIOBase` API and may not exist in some implementations." msgstr "" -#: library/io.rst:896 +#: library/io.rst:928 msgid "" "Separate the underlying binary buffer from the :class:`TextIOBase` and " "return it." msgstr "" -#: library/io.rst:899 +#: library/io.rst:931 msgid "" "After the underlying buffer has been detached, the :class:`TextIOBase` is in " "an unusable state." msgstr "" -#: library/io.rst:902 +#: library/io.rst:934 msgid "" "Some :class:`TextIOBase` implementations, like :class:`StringIO`, may not " "have the concept of an underlying buffer and calling this method will raise :" "exc:`UnsupportedOperation`." msgstr "" -#: library/io.rst:910 +#: library/io.rst:942 msgid "" "Read and return at most *size* characters from the stream as a single :class:" "`str`. If *size* is negative or ``None``, reads until EOF." msgstr "" -#: library/io.rst:915 +#: library/io.rst:947 msgid "" "Read until newline or EOF and return a single :class:`str`. If the stream " "is already at EOF, an empty string is returned." msgstr "" -#: library/io.rst:918 +#: library/io.rst:950 msgid "If *size* is specified, at most *size* characters will be read." msgstr "" -#: library/io.rst:922 +#: library/io.rst:954 msgid "" "Change the stream position to the given *offset*. Behaviour depends on the " "*whence* parameter. The default value for *whence* is :data:`!SEEK_SET`." msgstr "" -#: library/io.rst:926 +#: library/io.rst:958 msgid "" ":data:`!SEEK_SET` or ``0``: seek from the start of the stream (the default); " "*offset* must either be a number returned by :meth:`TextIOBase.tell`, or " "zero. Any other *offset* value produces undefined behaviour." msgstr "" -#: library/io.rst:930 +#: library/io.rst:962 msgid "" ":data:`!SEEK_CUR` or ``1``: \"seek\" to the current position; *offset* must " "be zero, which is a no-operation (all other values are unsupported)." msgstr "" -#: library/io.rst:933 +#: library/io.rst:965 msgid "" ":data:`!SEEK_END` or ``2``: seek to the end of the stream; *offset* must be " "zero (all other values are unsupported)." msgstr "" -#: library/io.rst:936 +#: library/io.rst:968 msgid "Return the new absolute position as an opaque number." msgstr "" -#: library/io.rst:943 +#: library/io.rst:975 msgid "" "Return the current stream position as an opaque number. The number does not " "usually represent a number of bytes in the underlying binary storage." msgstr "" -#: library/io.rst:949 +#: library/io.rst:981 msgid "" "Write the string *s* to the stream and return the number of characters " "written." msgstr "" -#: library/io.rst:956 +#: library/io.rst:988 msgid "" "A buffered text stream providing higher-level access to a :class:" "`BufferedIOBase` buffered binary stream. It inherits from :class:" "`TextIOBase`." msgstr "" -#: library/io.rst:960 +#: library/io.rst:992 msgid "" "*encoding* gives the name of the encoding that the stream will be decoded or " "encoded with. In :ref:`UTF-8 Mode `, this defaults to UTF-8. " @@ -1348,7 +1392,7 @@ msgid "" "explicitly. See :ref:`io-text-encoding` for more information." msgstr "" -#: library/io.rst:966 +#: library/io.rst:998 msgid "" "*errors* is an optional string that specifies how encoding and decoding " "errors are to be handled. Pass ``'strict'`` to raise a :exc:`ValueError` " @@ -1363,13 +1407,13 @@ msgid "" "that has been registered with :func:`codecs.register_error` is also valid." msgstr "" -#: library/io.rst:982 +#: library/io.rst:1014 msgid "" "*newline* controls how line endings are handled. It can be ``None``, " "``''``, ``'\\n'``, ``'\\r'``, and ``'\\r\\n'``. It works as follows:" msgstr "" -#: library/io.rst:985 +#: library/io.rst:1017 msgid "" "When reading input from the stream, if *newline* is ``None``, :term:" "`universal newlines` mode is enabled. Lines in the input can end in " @@ -1381,7 +1425,7 @@ msgid "" "returned to the caller untranslated." msgstr "" -#: library/io.rst:994 +#: library/io.rst:1026 msgid "" "When writing output to the stream, if *newline* is ``None``, any ``'\\n'`` " "characters written are translated to the system default line separator, :" @@ -1390,13 +1434,13 @@ msgid "" "characters written are translated to the given string." msgstr "" -#: library/io.rst:1000 +#: library/io.rst:1032 msgid "" "If *line_buffering* is ``True``, :meth:`~IOBase.flush` is implied when a " "call to write contains a newline character or a carriage return." msgstr "" -#: library/io.rst:1003 +#: library/io.rst:1035 msgid "" "If *write_through* is ``True``, calls to :meth:`~BufferedIOBase.write` are " "guaranteed not to be buffered: any data written on the :class:" @@ -1404,11 +1448,11 @@ msgid "" "*buffer*." msgstr "" -#: library/io.rst:1007 +#: library/io.rst:1039 msgid "The *write_through* argument has been added." msgstr "" -#: library/io.rst:1010 +#: library/io.rst:1042 msgid "" "The default *encoding* is now ``locale.getpreferredencoding(False)`` instead " "of ``locale.getpreferredencoding()``. Don't change temporary the locale " @@ -1416,108 +1460,108 @@ msgid "" "instead of the user preferred encoding." msgstr "" -#: library/io.rst:1016 +#: library/io.rst:1048 msgid "" "The *encoding* argument now supports the ``\"locale\"`` dummy encoding name." msgstr "" -#: library/io.rst:1019 +#: library/io.rst:1051 msgid "" ":class:`TextIOWrapper` provides these data attributes and methods in " "addition to those from :class:`TextIOBase` and :class:`IOBase`:" msgstr "" -#: library/io.rst:1024 +#: library/io.rst:1056 msgid "Whether line buffering is enabled." msgstr "" -#: library/io.rst:1028 +#: library/io.rst:1060 msgid "Whether writes are passed immediately to the underlying binary buffer." msgstr "" -#: library/io.rst:1036 +#: library/io.rst:1068 msgid "" "Reconfigure this text stream using new settings for *encoding*, *errors*, " "*newline*, *line_buffering* and *write_through*." msgstr "" -#: library/io.rst:1039 +#: library/io.rst:1071 msgid "" "Parameters not specified keep current settings, except ``errors='strict'`` " "is used when *encoding* is specified but *errors* is not specified." msgstr "" -#: library/io.rst:1043 +#: library/io.rst:1075 msgid "" "It is not possible to change the encoding or newline if some data has " "already been read from the stream. On the other hand, changing encoding " "after write is possible." msgstr "" -#: library/io.rst:1047 +#: library/io.rst:1079 msgid "" "This method does an implicit stream flush before setting the new parameters." msgstr "" -#: library/io.rst:1052 +#: library/io.rst:1084 msgid "The method supports ``encoding=\"locale\"`` option." msgstr "" -#: library/io.rst:1057 +#: library/io.rst:1089 msgid "" "Set the stream position. Return the new stream position as an :class:`int`." msgstr "" -#: library/io.rst:1060 +#: library/io.rst:1092 msgid "" "Four operations are supported, given by the following argument combinations:" msgstr "" -#: library/io.rst:1063 +#: library/io.rst:1095 msgid "``seek(0, SEEK_SET)``: Rewind to the start of the stream." msgstr "" -#: library/io.rst:1064 +#: library/io.rst:1096 msgid "" "``seek(cookie, SEEK_SET)``: Restore a previous position; *cookie* **must " "be** a number returned by :meth:`tell`." msgstr "" -#: library/io.rst:1066 +#: library/io.rst:1098 msgid "``seek(0, SEEK_END)``: Fast-forward to the end of the stream." msgstr "" -#: library/io.rst:1067 +#: library/io.rst:1099 msgid "``seek(0, SEEK_CUR)``: Leave the current stream position unchanged." msgstr "" -#: library/io.rst:1069 +#: library/io.rst:1101 msgid "Any other argument combinations are invalid, and may raise exceptions." msgstr "" -#: library/io.rst:1074 +#: library/io.rst:1106 msgid ":data:`os.SEEK_SET`, :data:`os.SEEK_CUR`, and :data:`os.SEEK_END`." msgstr "" -#: library/io.rst:1078 +#: library/io.rst:1110 msgid "" "Return the stream position as an opaque number. The return value of :meth:`!" "tell` can be given as input to :meth:`seek`, to restore a previous stream " "position." msgstr "" -#: library/io.rst:1085 +#: library/io.rst:1117 msgid "" "A text stream using an in-memory text buffer. It inherits from :class:" "`TextIOBase`." msgstr "" -#: library/io.rst:1088 +#: library/io.rst:1120 msgid "" "The text buffer is discarded when the :meth:`~IOBase.close` method is called." msgstr "" -#: library/io.rst:1091 +#: library/io.rst:1123 msgid "" "The initial value of the buffer can be set by providing *initial_value*. If " "newline translation is enabled, newlines will be encoded as if by :meth:" @@ -1529,31 +1573,31 @@ msgid "" "at the end of the buffer." msgstr "" -#: library/io.rst:1100 +#: library/io.rst:1132 msgid "" "The *newline* argument works like that of :class:`TextIOWrapper`, except " "that when writing output to the stream, if *newline* is ``None``, newlines " "are written as ``\\n`` on all platforms." msgstr "" -#: library/io.rst:1104 +#: library/io.rst:1136 msgid "" ":class:`StringIO` provides this method in addition to those from :class:" "`TextIOBase` and :class:`IOBase`:" msgstr "" -#: library/io.rst:1109 +#: library/io.rst:1141 msgid "" "Return a :class:`str` containing the entire contents of the buffer. Newlines " "are decoded as if by :meth:`~TextIOBase.read`, although the stream position " "is not changed." msgstr "" -#: library/io.rst:1113 +#: library/io.rst:1145 msgid "Example usage::" msgstr "" -#: library/io.rst:1115 +#: library/io.rst:1147 msgid "" "import io\n" "\n" @@ -1570,23 +1614,23 @@ msgid "" "output.close()" msgstr "" -#: library/io.rst:1135 +#: library/io.rst:1167 msgid "" "A helper codec that decodes newlines for :term:`universal newlines` mode. It " "inherits from :class:`codecs.IncrementalDecoder`." msgstr "" -#: library/io.rst:1140 +#: library/io.rst:1172 msgid "Performance" msgstr "" -#: library/io.rst:1142 +#: library/io.rst:1174 msgid "" "This section discusses the performance of the provided concrete I/O " "implementations." msgstr "" -#: library/io.rst:1148 +#: library/io.rst:1180 msgid "" "By reading and writing only large chunks of data even when the user asks for " "a single byte, buffered I/O hides any inefficiency in calling and executing " @@ -1599,7 +1643,7 @@ msgid "" "data." msgstr "" -#: library/io.rst:1160 +#: library/io.rst:1192 msgid "" "Text I/O over a binary storage (such as a file) is significantly slower than " "binary I/O over the same storage, because it requires conversions between " @@ -1609,24 +1653,24 @@ msgid "" "the reconstruction algorithm used." msgstr "" -#: library/io.rst:1167 +#: library/io.rst:1199 msgid "" ":class:`StringIO`, however, is a native in-memory unicode container and will " "exhibit similar speed to :class:`BytesIO`." msgstr "" -#: library/io.rst:1171 +#: library/io.rst:1203 msgid "Multi-threading" msgstr "" -#: library/io.rst:1173 +#: library/io.rst:1205 msgid "" ":class:`FileIO` objects are thread-safe to the extent that the operating " "system calls (such as :manpage:`read(2)` under Unix) they wrap are thread-" "safe too." msgstr "" -#: library/io.rst:1176 +#: library/io.rst:1208 msgid "" "Binary buffered objects (instances of :class:`BufferedReader`, :class:" "`BufferedWriter`, :class:`BufferedRandom` and :class:`BufferedRWPair`) " @@ -1634,15 +1678,15 @@ msgid "" "them from multiple threads at once." msgstr "" -#: library/io.rst:1181 +#: library/io.rst:1213 msgid ":class:`TextIOWrapper` objects are not thread-safe." msgstr "" -#: library/io.rst:1184 +#: library/io.rst:1216 msgid "Reentrancy" msgstr "" -#: library/io.rst:1186 +#: library/io.rst:1218 msgid "" "Binary buffered objects (instances of :class:`BufferedReader`, :class:" "`BufferedWriter`, :class:`BufferedRandom` and :class:`BufferedRWPair`) are " @@ -1653,7 +1697,7 @@ msgid "" "from entering the buffered object." msgstr "" -#: library/io.rst:1194 +#: library/io.rst:1226 msgid "" "The above implicitly extends to text files, since the :func:`open` function " "will wrap a buffered object inside a :class:`TextIOWrapper`. This includes " @@ -1669,14 +1713,14 @@ msgstr "" msgid "io module" msgstr "" -#: library/io.rst:1130 +#: library/io.rst:1162 msgid "universal newlines" msgstr "" -#: library/io.rst:979 +#: library/io.rst:1011 msgid "io.TextIOWrapper class" msgstr "" -#: library/io.rst:1130 +#: library/io.rst:1162 msgid "io.IncrementalNewlineDecoder class" msgstr "" diff --git a/library/ipaddress.po b/library/ipaddress.po index 7beae0cf2..f9fb918d0 100644 --- a/library/ipaddress.po +++ b/library/ipaddress.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -420,9 +420,9 @@ msgstr "" #: library/ipaddress.rst:364 msgid "" -"For addresses that appear to be IPv4 mapped addresses (starting with ``::" -"FFFF/96``), this property will report the embedded IPv4 address. For any " -"other address, this property will be ``None``." +"For addresses that appear to be IPv4 mapped addresses in the range ``::" +"FFFF:0:0/96`` as defined by :RFC:`4291`, this property reports the embedded " +"IPv4 address. For any other address, this property will be ``None``." msgstr "" #: library/ipaddress.rst:370 diff --git a/library/ipc.po b/library/ipc.po index ca7b51a52..d1fd45dd0 100644 --- a/library/ipc.po +++ b/library/ipc.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/itertools.po b/library/itertools.po index 87d53e5d0..b39149f3e 100644 --- a/library/itertools.po +++ b/library/itertools.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -145,7 +145,7 @@ msgid "(p0, p1, ..., p_n-1), ..." msgstr "" #: library/itertools.rst:50 -msgid "``batched('ABCDEFG', n=2) → AB CD EF G``" +msgid "``batched('ABCDEFG', n=3) → ABC DEF G``" msgstr "" #: library/itertools.rst:51 @@ -525,7 +525,7 @@ msgstr "" #: library/itertools.rst:183 msgid "" "def batched(iterable, n, *, strict=False):\n" -" # batched('ABCDEFG', 2) → AB CD EF G\n" +" # batched('ABCDEFG', 3) → ABC DEF G\n" " if n < 1:\n" " raise ValueError('n must be at least one')\n" " iterator = iter(iterable)\n" @@ -1337,7 +1337,7 @@ msgid "" "from contextlib import suppress\n" "from functools import reduce\n" "from math import comb, prod, sumprod, isqrt\n" -"from operator import itemgetter, getitem, mul, neg\n" +"from operator import itemgetter, getitem, mul, neg, truediv\n" "\n" "def take(n, iterable):\n" " \"Return first n items of the iterable as a list.\"\n" @@ -1348,9 +1348,10 @@ msgid "" " # prepend(1, [2, 3, 4]) → 1 2 3 4\n" " return chain([value], iterable)\n" "\n" -"def tabulate(function, start=0):\n" -" \"Return function(0), function(1), ...\"\n" -" return map(function, count(start))\n" +"def running_mean(iterable):\n" +" \"Yield the average of all values seen so far.\"\n" +" # running_mean([8.5, 9.5, 7.5, 6.5]) → 8.5 9.0 8.5 8.0\n" +" return map(truediv, accumulate(iterable), count(1))\n" "\n" "def repeatfunc(function, times=None, *args):\n" " \"Repeat calls to a function with specified arguments.\"\n" @@ -1432,10 +1433,10 @@ msgid "" " yield element\n" "\n" "def unique(iterable, key=None, reverse=False):\n" -" \"Yield unique elements in sorted order. Supports unhashable inputs.\"\n" -" # unique([[1, 2], [3, 4], [1, 2]]) → [1, 2] [3, 4]\n" -" sequenced = sorted(iterable, key=key, reverse=reverse)\n" -" return unique_justseen(sequenced, key=key)\n" +" \"Yield unique elements in sorted order. Supports unhashable inputs.\"\n" +" # unique([[1, 2], [3, 4], [1, 2]]) → [1, 2] [3, 4]\n" +" sequenced = sorted(iterable, key=key, reverse=reverse)\n" +" return unique_justseen(sequenced, key=key)\n" "\n" "def sliding_window(iterable, n):\n" " \"Collect data into overlapping fixed-length chunks or blocks.\"\n" @@ -1504,11 +1505,11 @@ msgid "" " yield function()" msgstr "" -#: library/itertools.rst:1008 +#: library/itertools.rst:1009 msgid "The following recipes have a more mathematical flavor:" msgstr "" -#: library/itertools.rst:1010 +#: library/itertools.rst:1011 msgid "" "def multinomial(*counts):\n" " \"Number of distinct arrangements of a multiset.\"\n" diff --git a/library/json.po b/library/json.po index 3e022d9e7..1e6c45137 100644 --- a/library/json.po +++ b/library/json.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -289,7 +289,7 @@ msgid "" "be pretty-printed with that indent level. A positive integer indents that " "many spaces per level; a string (such as ``\"\\t\"``) is used to indent each " "level. If zero, negative, or ``\"\"`` (the empty string), only newlines are " -"inserted. If ``None`` (the default), the most compact representation is used." +"inserted. If ``None`` (the default), no newlines are inserted." msgstr "" #: library/json.rst:220 diff --git a/library/keyword.po b/library/keyword.po index 869876cfa..7c9b95344 100644 --- a/library/keyword.po +++ b/library/keyword.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/language.po b/library/language.po index 82312a4a6..f69312646 100644 --- a/library/language.po +++ b/library/language.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/linecache.po b/library/linecache.po index 3ffe4397f..c17c18c9e 100644 --- a/library/linecache.po +++ b/library/linecache.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/locale.po b/library/locale.po index c9dcedf9c..421272e90 100644 --- a/library/locale.po +++ b/library/locale.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -74,18 +74,35 @@ msgid "" msgstr "" #: library/locale.rst:51 +msgid "Example::" +msgstr "" + +#: library/locale.rst:53 +msgid "" +">>> import locale\n" +">>> loc = locale.setlocale(locale.LC_ALL) # get current locale\n" +"# use German locale; name and availability varies with platform\n" +">>> locale.setlocale(locale.LC_ALL, 'de_DE.UTF-8')\n" +">>> locale.strcoll('f\\xe4n', 'foo') # compare a string containing an " +"umlaut\n" +">>> locale.setlocale(locale.LC_ALL, '') # use user's preferred locale\n" +">>> locale.setlocale(locale.LC_ALL, 'C') # use default (C) locale\n" +">>> locale.setlocale(locale.LC_ALL, loc) # restore saved locale" +msgstr "" + +#: library/locale.rst:62 msgid "" ":func:`setlocale` is not thread-safe on most systems. Applications typically " -"start with a call of ::" +"start with a call of::" msgstr "" -#: library/locale.rst:54 +#: library/locale.rst:65 msgid "" "import locale\n" "locale.setlocale(locale.LC_ALL, '')" msgstr "" -#: library/locale.rst:57 +#: library/locale.rst:68 msgid "" "This sets the locale for all categories to the user's default setting " "(typically specified in the :envvar:`LANG` environment variable). If the " @@ -93,41 +110,41 @@ msgid "" "problems." msgstr "" -#: library/locale.rst:64 +#: library/locale.rst:75 msgid "" "Returns the database of the local conventions as a dictionary. This " "dictionary has the following strings as keys:" msgstr "" -#: library/locale.rst:70 +#: library/locale.rst:81 msgid "Category" msgstr "" -#: library/locale.rst:70 +#: library/locale.rst:81 msgid "Key" msgstr "" -#: library/locale.rst:70 +#: library/locale.rst:81 msgid "Meaning" msgstr "" -#: library/locale.rst:72 +#: library/locale.rst:83 msgid ":const:`LC_NUMERIC`" msgstr "" -#: library/locale.rst:72 +#: library/locale.rst:83 msgid "``'decimal_point'``" msgstr "" -#: library/locale.rst:72 +#: library/locale.rst:83 msgid "Decimal point character." msgstr "" -#: library/locale.rst:74 +#: library/locale.rst:85 msgid "``'grouping'``" msgstr "" -#: library/locale.rst:74 +#: library/locale.rst:85 msgid "" "Sequence of numbers specifying which relative positions the " "``'thousands_sep'`` is expected. If the sequence is terminated with :const:" @@ -135,204 +152,204 @@ msgid "" "with a ``0``, the last group size is repeatedly used." msgstr "" -#: library/locale.rst:85 +#: library/locale.rst:96 msgid "``'thousands_sep'``" msgstr "" -#: library/locale.rst:85 +#: library/locale.rst:96 msgid "Character used between groups." msgstr "" -#: library/locale.rst:87 +#: library/locale.rst:98 msgid ":const:`LC_MONETARY`" msgstr "" -#: library/locale.rst:87 +#: library/locale.rst:98 msgid "``'int_curr_symbol'``" msgstr "" -#: library/locale.rst:87 +#: library/locale.rst:98 msgid "International currency symbol." msgstr "" -#: library/locale.rst:89 +#: library/locale.rst:100 msgid "``'currency_symbol'``" msgstr "" -#: library/locale.rst:89 +#: library/locale.rst:100 msgid "Local currency symbol." msgstr "" -#: library/locale.rst:91 +#: library/locale.rst:102 msgid "``'p_cs_precedes/n_cs_precedes'``" msgstr "" -#: library/locale.rst:91 +#: library/locale.rst:102 msgid "" "Whether the currency symbol precedes the value (for positive resp. negative " "values)." msgstr "" -#: library/locale.rst:96 +#: library/locale.rst:107 msgid "``'p_sep_by_space/n_sep_by_space'``" msgstr "" -#: library/locale.rst:96 +#: library/locale.rst:107 msgid "" "Whether the currency symbol is separated from the value by a space (for " "positive resp. negative values)." msgstr "" -#: library/locale.rst:101 +#: library/locale.rst:112 msgid "``'mon_decimal_point'``" msgstr "" -#: library/locale.rst:101 +#: library/locale.rst:112 msgid "Decimal point used for monetary values." msgstr "" -#: library/locale.rst:104 +#: library/locale.rst:115 msgid "``'frac_digits'``" msgstr "" -#: library/locale.rst:104 +#: library/locale.rst:115 msgid "" "Number of fractional digits used in local formatting of monetary values." msgstr "" -#: library/locale.rst:108 +#: library/locale.rst:119 msgid "``'int_frac_digits'``" msgstr "" -#: library/locale.rst:108 +#: library/locale.rst:119 msgid "" "Number of fractional digits used in international formatting of monetary " "values." msgstr "" -#: library/locale.rst:112 +#: library/locale.rst:123 msgid "``'mon_thousands_sep'``" msgstr "" -#: library/locale.rst:112 +#: library/locale.rst:123 msgid "Group separator used for monetary values." msgstr "" -#: library/locale.rst:115 +#: library/locale.rst:126 msgid "``'mon_grouping'``" msgstr "" -#: library/locale.rst:115 +#: library/locale.rst:126 msgid "Equivalent to ``'grouping'``, used for monetary values." msgstr "" -#: library/locale.rst:118 +#: library/locale.rst:129 msgid "``'positive_sign'``" msgstr "" -#: library/locale.rst:118 +#: library/locale.rst:129 msgid "Symbol used to annotate a positive monetary value." msgstr "" -#: library/locale.rst:121 +#: library/locale.rst:132 msgid "``'negative_sign'``" msgstr "" -#: library/locale.rst:121 +#: library/locale.rst:132 msgid "Symbol used to annotate a negative monetary value." msgstr "" -#: library/locale.rst:124 +#: library/locale.rst:135 msgid "``'p_sign_posn/n_sign_posn'``" msgstr "" -#: library/locale.rst:124 +#: library/locale.rst:135 msgid "" "The position of the sign (for positive resp. negative values), see below." msgstr "" -#: library/locale.rst:129 +#: library/locale.rst:140 msgid "" "All numeric values can be set to :const:`CHAR_MAX` to indicate that there is " "no value specified in this locale." msgstr "" -#: library/locale.rst:132 +#: library/locale.rst:143 msgid "" "The possible values for ``'p_sign_posn'`` and ``'n_sign_posn'`` are given " "below." msgstr "" -#: library/locale.rst:135 +#: library/locale.rst:146 msgid "Value" msgstr "" -#: library/locale.rst:135 +#: library/locale.rst:146 msgid "Explanation" msgstr "" -#: library/locale.rst:137 +#: library/locale.rst:148 msgid "``0``" msgstr "" -#: library/locale.rst:137 +#: library/locale.rst:148 msgid "Currency and value are surrounded by parentheses." msgstr "" -#: library/locale.rst:140 +#: library/locale.rst:151 msgid "``1``" msgstr "" -#: library/locale.rst:140 +#: library/locale.rst:151 msgid "The sign should precede the value and currency symbol." msgstr "" -#: library/locale.rst:143 +#: library/locale.rst:154 msgid "``2``" msgstr "" -#: library/locale.rst:143 +#: library/locale.rst:154 msgid "The sign should follow the value and currency symbol." msgstr "" -#: library/locale.rst:146 +#: library/locale.rst:157 msgid "``3``" msgstr "" -#: library/locale.rst:146 +#: library/locale.rst:157 msgid "The sign should immediately precede the value." msgstr "" -#: library/locale.rst:149 +#: library/locale.rst:160 msgid "``4``" msgstr "" -#: library/locale.rst:149 +#: library/locale.rst:160 msgid "The sign should immediately follow the value." msgstr "" -#: library/locale.rst:152 +#: library/locale.rst:163 msgid "``CHAR_MAX``" msgstr "" -#: library/locale.rst:152 +#: library/locale.rst:163 msgid "Nothing is specified in this locale." msgstr "" -#: library/locale.rst:155 +#: library/locale.rst:166 msgid "" "The function temporarily sets the ``LC_CTYPE`` locale to the ``LC_NUMERIC`` " "locale or the ``LC_MONETARY`` locale if locales are different and numeric or " "monetary strings are non-ASCII. This temporary change affects other threads." msgstr "" -#: library/locale.rst:159 +#: library/locale.rst:170 msgid "" "The function now temporarily sets the ``LC_CTYPE`` locale to the " "``LC_NUMERIC`` locale in some cases." msgstr "" -#: library/locale.rst:166 +#: library/locale.rst:177 msgid "" "Return some locale-specific information as a string. This function is not " "available on all systems, and the set of possible options might also vary " @@ -340,106 +357,106 @@ msgid "" "symbolic constants are available in the locale module." msgstr "" -#: library/locale.rst:171 +#: library/locale.rst:182 msgid "" "The :func:`nl_langinfo` function accepts one of the following keys. Most " "descriptions are taken from the corresponding description in the GNU C " "library." msgstr "" -#: library/locale.rst:177 +#: library/locale.rst:188 msgid "" "Get a string with the name of the character encoding used in the selected " "locale." msgstr "" -#: library/locale.rst:182 +#: library/locale.rst:193 msgid "" "Get a string that can be used as a format string for :func:`time.strftime` " "to represent date and time in a locale-specific way." msgstr "" -#: library/locale.rst:187 +#: library/locale.rst:198 msgid "" "Get a string that can be used as a format string for :func:`time.strftime` " "to represent a date in a locale-specific way." msgstr "" -#: library/locale.rst:192 +#: library/locale.rst:203 msgid "" "Get a string that can be used as a format string for :func:`time.strftime` " "to represent a time in a locale-specific way." msgstr "" -#: library/locale.rst:197 +#: library/locale.rst:208 msgid "" "Get a format string for :func:`time.strftime` to represent time in the am/pm " "format." msgstr "" -#: library/locale.rst:208 +#: library/locale.rst:219 msgid "Get the name of the n-th day of the week." msgstr "" -#: library/locale.rst:212 +#: library/locale.rst:223 msgid "" "This follows the US convention of :const:`DAY_1` being Sunday, not the " "international convention (ISO 8601) that Monday is the first day of the week." msgstr "" -#: library/locale.rst:224 +#: library/locale.rst:235 msgid "Get the abbreviated name of the n-th day of the week." msgstr "" -#: library/locale.rst:239 +#: library/locale.rst:250 msgid "Get the name of the n-th month." msgstr "" -#: library/locale.rst:254 +#: library/locale.rst:265 msgid "Get the abbreviated name of the n-th month." msgstr "" -#: library/locale.rst:258 +#: library/locale.rst:269 msgid "Get the radix character (decimal dot, decimal comma, etc.)." msgstr "" -#: library/locale.rst:262 +#: library/locale.rst:273 msgid "Get the separator character for thousands (groups of three digits)." msgstr "" -#: library/locale.rst:266 +#: library/locale.rst:277 msgid "" "Get a regular expression that can be used with the regex function to " "recognize a positive response to a yes/no question." msgstr "" -#: library/locale.rst:271 +#: library/locale.rst:282 msgid "" "Get a regular expression that can be used with the ``regex(3)`` function to " "recognize a negative response to a yes/no question." msgstr "" -#: library/locale.rst:276 +#: library/locale.rst:287 msgid "" "The regular expressions for :const:`YESEXPR` and :const:`NOEXPR` use syntax " "suitable for the ``regex`` function from the C library, which might differ " "from the syntax used in :mod:`re`." msgstr "" -#: library/locale.rst:283 +#: library/locale.rst:294 msgid "" "Get the currency symbol, preceded by \"-\" if the symbol should appear " "before the value, \"+\" if the symbol should appear after the value, or \"." "\" if the symbol should replace the radix character." msgstr "" -#: library/locale.rst:289 +#: library/locale.rst:300 msgid "" "Get a string which describes how years are counted and displayed for each " "era in a locale." msgstr "" -#: library/locale.rst:292 +#: library/locale.rst:303 msgid "" "Most locales do not define this value. An example of a locale which does " "define this value is the Japanese one. In Japan, the traditional " @@ -447,7 +464,7 @@ msgid "" "then-emperor's reign." msgstr "" -#: library/locale.rst:297 +#: library/locale.rst:308 msgid "" "Normally it should not be necessary to use this value directly. Specifying " "the ``E`` modifier in their format strings causes the :func:`time.strftime` " @@ -457,38 +474,38 @@ msgid "" "onlinepubs/9799919799/basedefs/V1_chap07.html#tag_07_03_05_02>`_." msgstr "" -#: library/locale.rst:306 +#: library/locale.rst:317 msgid "" "Get a format string for :func:`time.strftime` to represent date and time in " "a locale-specific era-based way." msgstr "" -#: library/locale.rst:311 +#: library/locale.rst:322 msgid "" "Get a format string for :func:`time.strftime` to represent a date in a " "locale-specific era-based way." msgstr "" -#: library/locale.rst:316 +#: library/locale.rst:327 msgid "" "Get a format string for :func:`time.strftime` to represent a time in a " "locale-specific era-based way." msgstr "" -#: library/locale.rst:321 +#: library/locale.rst:332 msgid "" "Get a string consisting of up to 100 semicolon-separated symbols used to " "represent the values 0 to 99 in a locale-specific way. In most locales this " "is an empty string." msgstr "" -#: library/locale.rst:328 +#: library/locale.rst:339 msgid "" "Tries to determine the default locale settings and returns them as a tuple " "of the form ``(language code, encoding)``." msgstr "" -#: library/locale.rst:331 +#: library/locale.rst:342 msgid "" "According to POSIX, a program which has not called ``setlocale(LC_ALL, '')`` " "runs using the portable ``'C'`` locale. Calling ``setlocale(LC_ALL, '')`` " @@ -497,7 +514,7 @@ msgid "" "emulate the behavior in the way described above." msgstr "" -#: library/locale.rst:337 +#: library/locale.rst:348 msgid "" "To maintain compatibility with other platforms, not only the :envvar:`LANG` " "variable is tested, but a list of variables given as envvars parameter. The " @@ -507,7 +524,7 @@ msgid "" "``'LC_CTYPE'``, ``'LANG'`` and ``'LANGUAGE'``, in that order." msgstr "" -#: library/locale.rst:359 +#: library/locale.rst:368 msgid "" "The language code has the same format as a :ref:`locale name `, " "but without encoding and ``@``-modifier. The language code and encoding may " @@ -515,7 +532,7 @@ msgid "" "represented as ``(None, None)``." msgstr "" -#: library/locale.rst:355 +#: library/locale.rst:364 msgid "" "Returns the current setting for the given locale category as a tuple " "containing the language code and encoding. *category* may be one of the :" @@ -523,7 +540,7 @@ msgid "" "`LC_CTYPE`." msgstr "" -#: library/locale.rst:368 +#: library/locale.rst:377 msgid "" "Return the :term:`locale encoding` used for text data, according to user " "preferences. User preferences are expressed differently on different " @@ -531,72 +548,72 @@ msgid "" "this function only returns a guess." msgstr "" -#: library/locale.rst:373 +#: library/locale.rst:382 msgid "" "On some systems, it is necessary to invoke :func:`setlocale` to obtain the " "user preferences, so this function is not thread-safe. If invoking setlocale " "is not necessary or desired, *do_setlocale* should be set to ``False``." msgstr "" -#: library/locale.rst:377 +#: library/locale.rst:386 msgid "" "On Android or if the :ref:`Python UTF-8 Mode ` is enabled, always " "return ``'utf-8'``, the :term:`locale encoding` and the *do_setlocale* " "argument are ignored." msgstr "" -#: library/locale.rst:399 +#: library/locale.rst:408 msgid "" "The :ref:`Python preinitialization ` configures the LC_CTYPE " "locale. See also the :term:`filesystem encoding and error handler`." msgstr "" -#: library/locale.rst:384 +#: library/locale.rst:393 msgid "" "The function now always returns ``\"utf-8\"`` on Android or if the :ref:" "`Python UTF-8 Mode ` is enabled." msgstr "" -#: library/locale.rst:391 +#: library/locale.rst:400 msgid "Get the current :term:`locale encoding`:" msgstr "" -#: library/locale.rst:393 +#: library/locale.rst:402 msgid "On Android and VxWorks, return ``\"utf-8\"``." msgstr "" -#: library/locale.rst:394 +#: library/locale.rst:403 msgid "" "On Unix, return the encoding of the current :data:`LC_CTYPE` locale. Return " "``\"utf-8\"`` if ``nl_langinfo(CODESET)`` returns an empty string: for " "example, if the current LC_CTYPE locale is not supported." msgstr "" -#: library/locale.rst:397 +#: library/locale.rst:406 msgid "On Windows, return the ANSI code page." msgstr "" -#: library/locale.rst:402 +#: library/locale.rst:411 msgid "" "This function is similar to :func:`getpreferredencoding(False) " "` except this function ignores the :ref:`Python UTF-8 " "Mode `." msgstr "" -#: library/locale.rst:411 +#: library/locale.rst:420 msgid "" "Returns a normalized locale code for the given locale name. The returned " "locale code is formatted for use with :func:`setlocale`. If normalization " "fails, the original name is returned unchanged." msgstr "" -#: library/locale.rst:415 +#: library/locale.rst:424 msgid "" "If the given encoding is not known, the function defaults to the default " "encoding for the locale code just like :func:`setlocale`." msgstr "" -#: library/locale.rst:421 +#: library/locale.rst:430 msgid "" "Compares two strings according to the current :const:`LC_COLLATE` setting. " "As any other compare function, returns a negative, or a positive value, or " @@ -604,7 +621,7 @@ msgid "" "is equal to it." msgstr "" -#: library/locale.rst:429 +#: library/locale.rst:438 msgid "" "Transforms a string to one that can be used in locale-aware comparisons. " "For example, ``strxfrm(s1) < strxfrm(s2)`` is equivalent to ``strcoll(s1, " @@ -612,7 +629,7 @@ msgid "" "repeatedly, e.g. when collating a sequence of strings." msgstr "" -#: library/locale.rst:438 +#: library/locale.rst:447 msgid "" "Formats a number *val* according to the current :const:`LC_NUMERIC` setting. " "The format follows the conventions of the ``%`` operator. For floating-" @@ -620,29 +637,29 @@ msgid "" "is ``True``, also takes the grouping into account." msgstr "" -#: library/locale.rst:443 +#: library/locale.rst:452 msgid "" "If *monetary* is true, the conversion uses monetary thousands separator and " "grouping strings." msgstr "" -#: library/locale.rst:446 +#: library/locale.rst:455 msgid "" "Processes formatting specifiers as in ``format % val``, but takes the " "current locale settings into account." msgstr "" -#: library/locale.rst:449 +#: library/locale.rst:458 msgid "The *monetary* keyword parameter was added." msgstr "" -#: library/locale.rst:455 +#: library/locale.rst:464 msgid "" "Formats a number *val* according to the current :const:`LC_MONETARY` " "settings." msgstr "" -#: library/locale.rst:457 +#: library/locale.rst:466 msgid "" "The returned string includes the currency symbol if *symbol* is true, which " "is the default. If *grouping* is ``True`` (which is not the default), " @@ -650,43 +667,43 @@ msgid "" "not the default), the international currency symbol is used." msgstr "" -#: library/locale.rst:464 +#: library/locale.rst:473 msgid "" "This function will not work with the 'C' locale, so you have to set a locale " "via :func:`setlocale` first." msgstr "" -#: library/locale.rst:470 +#: library/locale.rst:479 msgid "" "Formats a floating-point number using the same format as the built-in " "function ``str(float)``, but takes the decimal point into account." msgstr "" -#: library/locale.rst:476 +#: library/locale.rst:485 msgid "" "Converts a string into a normalized number string, following the :const:" "`LC_NUMERIC` settings." msgstr "" -#: library/locale.rst:484 +#: library/locale.rst:493 msgid "" "Converts a normalized number string into a formatted string following the :" "const:`LC_NUMERIC` settings." msgstr "" -#: library/locale.rst:492 +#: library/locale.rst:501 msgid "" "Converts a string to a number, following the :const:`LC_NUMERIC` settings, " "by calling *func* on the result of calling :func:`delocalize` on *string*." msgstr "" -#: library/locale.rst:498 +#: library/locale.rst:507 msgid "" "Converts a string to an integer, following the :const:`LC_NUMERIC` " "conventions." msgstr "" -#: library/locale.rst:503 +#: library/locale.rst:512 msgid "" "Locale category for the character type functions. Most importantly, this " "category defines the text encoding, i.e. how bytes are interpreted as " @@ -696,32 +713,32 @@ msgid "" "SSH connections." msgstr "" -#: library/locale.rst:510 +#: library/locale.rst:519 msgid "" "Python doesn't internally use locale-dependent character transformation " "functions from ``ctype.h``. Instead, ``pyctype.h`` provides locale-" "independent equivalents like :c:macro:`Py_TOLOWER`." msgstr "" -#: library/locale.rst:517 +#: library/locale.rst:526 msgid "" "Locale category for sorting strings. The functions :func:`strcoll` and :" "func:`strxfrm` of the :mod:`locale` module are affected." msgstr "" -#: library/locale.rst:523 +#: library/locale.rst:532 msgid "" "Locale category for the formatting of time. The function :func:`time." "strftime` follows these conventions." msgstr "" -#: library/locale.rst:529 +#: library/locale.rst:538 msgid "" "Locale category for formatting of monetary values. The available options " "are available from the :func:`localeconv` function." msgstr "" -#: library/locale.rst:535 +#: library/locale.rst:544 msgid "" "Locale category for message display. Python currently does not support " "application specific locale-aware messages. Messages displayed by the " @@ -729,13 +746,13 @@ msgid "" "affected by this category." msgstr "" -#: library/locale.rst:540 +#: library/locale.rst:549 msgid "" "This value may not be available on operating systems not conforming to the " "POSIX standard, most notably Windows." msgstr "" -#: library/locale.rst:546 +#: library/locale.rst:555 msgid "" "Locale category for formatting numbers. The functions :func:" "`format_string`, :func:`atoi`, :func:`atof` and :func:`.str` of the :mod:" @@ -743,7 +760,7 @@ msgid "" "operations are not affected." msgstr "" -#: library/locale.rst:554 +#: library/locale.rst:563 msgid "" "Combination of all locale settings. If this flag is used when the locale is " "changed, setting the locale for all categories is attempted. If that fails " @@ -753,34 +770,17 @@ msgid "" "settings." msgstr "" -#: library/locale.rst:563 +#: library/locale.rst:572 msgid "" "This is a symbolic constant used for different values returned by :func:" "`localeconv`." msgstr "" -#: library/locale.rst:567 -msgid "Example::" -msgstr "" - -#: library/locale.rst:569 -msgid "" -">>> import locale\n" -">>> loc = locale.getlocale() # get current locale\n" -"# use German locale; name might vary with platform\n" -">>> locale.setlocale(locale.LC_ALL, 'de_DE')\n" -">>> locale.strcoll('f\\xe4n', 'foo') # compare a string containing an " -"umlaut\n" -">>> locale.setlocale(locale.LC_ALL, '') # use user's preferred locale\n" -">>> locale.setlocale(locale.LC_ALL, 'C') # use default (C) locale\n" -">>> locale.setlocale(locale.LC_ALL, loc) # restore saved locale" -msgstr "" - -#: library/locale.rst:580 +#: library/locale.rst:577 msgid "Background, details, hints, tips and caveats" msgstr "" -#: library/locale.rst:582 +#: library/locale.rst:579 msgid "" "The C standard defines the locale as a program-wide property that may be " "relatively expensive to change. On top of that, some implementations are " @@ -788,7 +788,7 @@ msgid "" "This makes the locale somewhat painful to use correctly." msgstr "" -#: library/locale.rst:587 +#: library/locale.rst:584 msgid "" "Initially, when a program is started, the locale is the ``C`` locale, no " "matter what the user's preferred locale is. There is one exception: the :" @@ -798,7 +798,7 @@ msgid "" "categories by calling ``setlocale(LC_ALL, '')``." msgstr "" -#: library/locale.rst:594 +#: library/locale.rst:591 msgid "" "It is generally a bad idea to call :func:`setlocale` in some library " "routine, since as a side effect it affects the entire program. Saving and " @@ -806,7 +806,7 @@ msgid "" "that happen to run before the settings have been restored." msgstr "" -#: library/locale.rst:599 +#: library/locale.rst:596 msgid "" "If, when coding a module for general use, you need a locale independent " "version of an operation that is affected by the locale (such as certain " @@ -817,14 +817,14 @@ msgid "" "settings." msgstr "" -#: library/locale.rst:606 +#: library/locale.rst:603 msgid "" "The only way to perform numeric operations according to the locale is to use " "the special functions defined by this module: :func:`atof`, :func:`atoi`, :" "func:`format_string`, :func:`.str`." msgstr "" -#: library/locale.rst:610 +#: library/locale.rst:607 msgid "" "There is no way to perform case conversions and character classifications " "according to the locale. For (Unicode) text strings these are done " @@ -835,21 +835,21 @@ msgid "" "whitespace." msgstr "" -#: library/locale.rst:621 +#: library/locale.rst:618 msgid "Locale names" msgstr "" -#: library/locale.rst:623 +#: library/locale.rst:620 msgid "" "The format of the locale name is platform dependent, and the set of " "supported locales can depend on the system configuration." msgstr "" -#: library/locale.rst:626 +#: library/locale.rst:623 msgid "On Posix platforms, it usually has the format [1]_:" msgstr "" -#: library/locale.rst:631 +#: library/locale.rst:628 msgid "" "where *language* is a two- or three-letter language code from `ISO 639`_, " "*territory* is a two-letter country or region code from `ISO 3166`_, " @@ -858,13 +858,13 @@ msgid "" "\"latin\", \"valencia\", \"stroke\" and \"euro\")." msgstr "" -#: library/locale.rst:637 +#: library/locale.rst:634 msgid "" "On Windows, several formats are supported. [2]_ [3]_ A subset of `IETF BCP " "47`_ tags:" msgstr "" -#: library/locale.rst:644 +#: library/locale.rst:641 msgid "" "where *language* and *territory* have the same meaning as in Posix, *script* " "is a four-letter script code from `ISO 15924`_, and *modifier* is a language " @@ -874,11 +874,11 @@ msgid "" "allowed for BCP 47 tags." msgstr "" -#: library/locale.rst:651 +#: library/locale.rst:648 msgid "Windows also supports locale names in the format:" msgstr "" -#: library/locale.rst:656 +#: library/locale.rst:653 msgid "" "where *language* and *territory* are full names, such as \"English\" and " "\"United States\", and *charset* is either a code page number (for example, " @@ -886,34 +886,34 @@ msgid "" "format." msgstr "" -#: library/locale.rst:661 +#: library/locale.rst:658 msgid "The \"C\" locale is supported on all platforms." msgstr "" -#: library/locale.rst:668 +#: library/locale.rst:665 msgid "" "`IEEE Std 1003.1-2024; 8.2 Internationalization Variables `_" msgstr "" -#: library/locale.rst:669 +#: library/locale.rst:666 msgid "" "`UCRT Locale names, Languages, and Country/Region strings `_" msgstr "" -#: library/locale.rst:670 +#: library/locale.rst:667 msgid "" "`Locale Names `_" msgstr "" -#: library/locale.rst:676 +#: library/locale.rst:673 msgid "For extension writers and programs that embed Python" msgstr "" -#: library/locale.rst:678 +#: library/locale.rst:675 msgid "" "Extension modules should never call :func:`setlocale`, except to find out " "what the current locale is. But since the return value can only be used " @@ -921,7 +921,7 @@ msgid "" "whether or not the locale is ``C``)." msgstr "" -#: library/locale.rst:683 +#: library/locale.rst:680 msgid "" "When Python code uses the :mod:`locale` module to change the locale, this " "also affects the embedding application. If the embedding application " @@ -931,11 +931,11 @@ msgid "" "accessible as a shared library." msgstr "" -#: library/locale.rst:694 +#: library/locale.rst:691 msgid "Access to message catalogs" msgstr "" -#: library/locale.rst:703 +#: library/locale.rst:700 msgid "" "The locale module exposes the C library's gettext interface on systems that " "provide this interface. It consists of the functions :func:`gettext`, :func:" @@ -946,7 +946,7 @@ msgid "" "locating message catalogs." msgstr "" -#: library/locale.rst:710 +#: library/locale.rst:707 msgid "" "Python applications should normally find no need to invoke these functions, " "and should use :mod:`gettext` instead. A known exception to this rule are " diff --git a/library/logging.config.po b/library/logging.config.po index d75a2b379..63826b54a 100644 --- a/library/logging.config.po +++ b/library/logging.config.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/logging.handlers.po b/library/logging.handlers.po index a0a648ee9..ef13da9e7 100644 --- a/library/logging.handlers.po +++ b/library/logging.handlers.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/logging.po b/library/logging.po index c3bf0a886..7cbd42502 100644 --- a/library/logging.po +++ b/library/logging.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1262,11 +1262,11 @@ msgstr "" msgid "Attribute name" msgstr "" -#: library/logging.rst:1370 +#: library/logging.rst:1375 msgid "Format" msgstr "" -#: library/logging.rst:1370 +#: library/logging.rst:1375 msgid "Description" msgstr "" @@ -1274,7 +1274,7 @@ msgstr "" msgid "args" msgstr "" -#: library/logging.rst:1011 library/logging.rst:1057 +#: library/logging.rst:1011 library/logging.rst:1044 library/logging.rst:1062 msgid "You shouldn't need to format this yourself." msgstr "" @@ -1325,250 +1325,260 @@ msgid "" msgstr "" #: library/logging.rst:1014 -msgid "filename" +msgid "exc_text" msgstr "" #: library/logging.rst:1014 +msgid "" +"Exception information formatted as a string. This is set when :meth:" +"`Formatter.format` is invoked, or ``None`` if no exception has occurred." +msgstr "" + +#: library/logging.rst:1019 +msgid "filename" +msgstr "" + +#: library/logging.rst:1019 msgid "``%(filename)s``" msgstr "" -#: library/logging.rst:1014 +#: library/logging.rst:1019 msgid "Filename portion of ``pathname``." msgstr "" -#: library/logging.rst:1016 +#: library/logging.rst:1021 msgid "funcName" msgstr "" -#: library/logging.rst:1016 +#: library/logging.rst:1021 msgid "``%(funcName)s``" msgstr "" -#: library/logging.rst:1016 +#: library/logging.rst:1021 msgid "Name of function containing the logging call." msgstr "" -#: library/logging.rst:1018 +#: library/logging.rst:1023 msgid "levelname" msgstr "" -#: library/logging.rst:1018 +#: library/logging.rst:1023 msgid "``%(levelname)s``" msgstr "" -#: library/logging.rst:1018 +#: library/logging.rst:1023 msgid "" "Text logging level for the message (``'DEBUG'``, ``'INFO'``, ``'WARNING'``, " "``'ERROR'``, ``'CRITICAL'``)." msgstr "" -#: library/logging.rst:1022 +#: library/logging.rst:1027 msgid "levelno" msgstr "" -#: library/logging.rst:1022 +#: library/logging.rst:1027 msgid "``%(levelno)s``" msgstr "" -#: library/logging.rst:1022 +#: library/logging.rst:1027 msgid "" "Numeric logging level for the message (:const:`DEBUG`, :const:`INFO`, :const:" "`WARNING`, :const:`ERROR`, :const:`CRITICAL`)." msgstr "" -#: library/logging.rst:1027 +#: library/logging.rst:1032 msgid "lineno" msgstr "" -#: library/logging.rst:1027 +#: library/logging.rst:1032 msgid "``%(lineno)d``" msgstr "" -#: library/logging.rst:1027 +#: library/logging.rst:1032 msgid "Source line number where the logging call was issued (if available)." msgstr "" -#: library/logging.rst:1030 +#: library/logging.rst:1035 msgid "message" msgstr "" -#: library/logging.rst:1030 +#: library/logging.rst:1035 msgid "``%(message)s``" msgstr "" -#: library/logging.rst:1030 +#: library/logging.rst:1035 msgid "" "The logged message, computed as ``msg % args``. This is set when :meth:" "`Formatter.format` is invoked." msgstr "" -#: library/logging.rst:1034 +#: library/logging.rst:1039 msgid "module" msgstr "" -#: library/logging.rst:1034 +#: library/logging.rst:1039 msgid "``%(module)s``" msgstr "" -#: library/logging.rst:1034 +#: library/logging.rst:1039 msgid "Module (name portion of ``filename``)." msgstr "" -#: library/logging.rst:1036 +#: library/logging.rst:1041 msgid "msecs" msgstr "" -#: library/logging.rst:1036 +#: library/logging.rst:1041 msgid "``%(msecs)d``" msgstr "" -#: library/logging.rst:1036 +#: library/logging.rst:1041 msgid "" "Millisecond portion of the time when the :class:`LogRecord` was created." msgstr "" -#: library/logging.rst:1039 +#: library/logging.rst:1044 msgid "msg" msgstr "" -#: library/logging.rst:1039 +#: library/logging.rst:1044 msgid "" "The format string passed in the original logging call. Merged with ``args`` " "to produce ``message``, or an arbitrary object (see :ref:`arbitrary-object-" "messages`)." msgstr "" -#: library/logging.rst:1044 +#: library/logging.rst:1049 msgid "name" msgstr "" -#: library/logging.rst:1044 +#: library/logging.rst:1049 msgid "``%(name)s``" msgstr "" -#: library/logging.rst:1044 +#: library/logging.rst:1049 msgid "Name of the logger used to log the call." msgstr "" -#: library/logging.rst:1046 +#: library/logging.rst:1051 msgid "pathname" msgstr "" -#: library/logging.rst:1046 +#: library/logging.rst:1051 msgid "``%(pathname)s``" msgstr "" -#: library/logging.rst:1046 +#: library/logging.rst:1051 msgid "" "Full pathname of the source file where the logging call was issued (if " "available)." msgstr "" -#: library/logging.rst:1049 +#: library/logging.rst:1054 msgid "process" msgstr "" -#: library/logging.rst:1049 +#: library/logging.rst:1054 msgid "``%(process)d``" msgstr "" -#: library/logging.rst:1049 +#: library/logging.rst:1054 msgid "Process ID (if available)." msgstr "" -#: library/logging.rst:1051 +#: library/logging.rst:1056 msgid "processName" msgstr "" -#: library/logging.rst:1051 +#: library/logging.rst:1056 msgid "``%(processName)s``" msgstr "" -#: library/logging.rst:1051 +#: library/logging.rst:1056 msgid "Process name (if available)." msgstr "" -#: library/logging.rst:1053 +#: library/logging.rst:1058 msgid "relativeCreated" msgstr "" -#: library/logging.rst:1053 +#: library/logging.rst:1058 msgid "``%(relativeCreated)d``" msgstr "" -#: library/logging.rst:1053 +#: library/logging.rst:1058 msgid "" "Time in milliseconds when the LogRecord was created, relative to the time " "the logging module was loaded." msgstr "" -#: library/logging.rst:1057 +#: library/logging.rst:1062 msgid "stack_info" msgstr "" -#: library/logging.rst:1057 +#: library/logging.rst:1062 msgid "" "Stack frame information (where available) from the bottom of the stack in " "the current thread, up to and including the stack frame of the logging call " "which resulted in the creation of this record." msgstr "" -#: library/logging.rst:1063 +#: library/logging.rst:1068 msgid "thread" msgstr "" -#: library/logging.rst:1063 +#: library/logging.rst:1068 msgid "``%(thread)d``" msgstr "" -#: library/logging.rst:1063 +#: library/logging.rst:1068 msgid "Thread ID (if available)." msgstr "" -#: library/logging.rst:1065 +#: library/logging.rst:1070 msgid "threadName" msgstr "" -#: library/logging.rst:1065 +#: library/logging.rst:1070 msgid "``%(threadName)s``" msgstr "" -#: library/logging.rst:1065 +#: library/logging.rst:1070 msgid "Thread name (if available)." msgstr "" -#: library/logging.rst:1067 +#: library/logging.rst:1072 msgid "taskName" msgstr "" -#: library/logging.rst:1067 +#: library/logging.rst:1072 msgid "``%(taskName)s``" msgstr "" -#: library/logging.rst:1067 +#: library/logging.rst:1072 msgid ":class:`asyncio.Task` name (if available)." msgstr "" -#: library/logging.rst:1070 +#: library/logging.rst:1075 msgid "*processName* was added." msgstr "" -#: library/logging.rst:1073 +#: library/logging.rst:1078 msgid "*taskName* was added." msgstr "" -#: library/logging.rst:1079 +#: library/logging.rst:1084 msgid "LoggerAdapter Objects" msgstr "" -#: library/logging.rst:1081 +#: library/logging.rst:1086 msgid "" ":class:`LoggerAdapter` instances are used to conveniently pass contextual " "information into logging calls. For a usage example, see the section on :ref:" "`adding contextual information to your logging output `." msgstr "" -#: library/logging.rst:1087 +#: library/logging.rst:1092 msgid "" "Returns an instance of :class:`LoggerAdapter` initialized with an " "underlying :class:`Logger` instance, an optional dict-like object (*extra*), " @@ -1579,7 +1589,7 @@ msgid "" "`LoggerAdapter` instance" msgstr "" -#: library/logging.rst:1097 +#: library/logging.rst:1102 msgid "" "Modifies the message and/or keyword arguments passed to a logging call in " "order to insert contextual information. This implementation takes the object " @@ -1588,15 +1598,15 @@ msgid "" "(possibly modified) versions of the arguments passed in." msgstr "" -#: library/logging.rst:1105 +#: library/logging.rst:1110 msgid "Delegates to the underlying :attr:`!manager` on *logger*." msgstr "" -#: library/logging.rst:1109 +#: library/logging.rst:1114 msgid "Delegates to the underlying :meth:`!_log` method on *logger*." msgstr "" -#: library/logging.rst:1111 +#: library/logging.rst:1116 msgid "" "In addition to the above, :class:`LoggerAdapter` supports the following " "methods of :class:`Logger`: :meth:`~Logger.debug`, :meth:`~Logger.info`, :" @@ -1608,32 +1618,32 @@ msgid "" "interchangeably." msgstr "" -#: library/logging.rst:1122 +#: library/logging.rst:1127 msgid "" "The :meth:`~Logger.isEnabledFor`, :meth:`~Logger.getEffectiveLevel`, :meth:" "`~Logger.setLevel` and :meth:`~Logger.hasHandlers` methods were added to :" "class:`LoggerAdapter`. These methods delegate to the underlying logger." msgstr "" -#: library/logging.rst:1128 +#: library/logging.rst:1133 msgid "" "Attribute :attr:`!manager` and method :meth:`!_log` were added, which " "delegate to the underlying logger and allow adapters to be nested." msgstr "" -#: library/logging.rst:1133 +#: library/logging.rst:1138 msgid "The *extra* argument is now optional." msgstr "" -#: library/logging.rst:1137 +#: library/logging.rst:1142 msgid "The *merge_extra* parameter was added." msgstr "" -#: library/logging.rst:1141 +#: library/logging.rst:1146 msgid "Thread Safety" msgstr "" -#: library/logging.rst:1143 +#: library/logging.rst:1148 msgid "" "The logging module is intended to be thread-safe without any special work " "needing to be done by its clients. It achieves this through using threading " @@ -1642,7 +1652,7 @@ msgid "" "O." msgstr "" -#: library/logging.rst:1148 +#: library/logging.rst:1153 msgid "" "If you are implementing asynchronous signal handlers using the :mod:`signal` " "module, you may not be able to use logging from within such handlers. This " @@ -1650,17 +1660,17 @@ msgid "" "always re-entrant, and so cannot be invoked from such signal handlers." msgstr "" -#: library/logging.rst:1155 +#: library/logging.rst:1160 msgid "Module-Level Functions" msgstr "" -#: library/logging.rst:1157 +#: library/logging.rst:1162 msgid "" "In addition to the classes described above, there are a number of module-" "level functions." msgstr "" -#: library/logging.rst:1163 +#: library/logging.rst:1168 msgid "" "Return a logger with the specified name or, if name is ``None``, return the " "root logger of the hierarchy. If specified, the name is typically a dot-" @@ -1670,14 +1680,14 @@ msgid "" "for not doing that, as mentioned in :ref:`logger`." msgstr "" -#: library/logging.rst:1170 +#: library/logging.rst:1175 msgid "" "All calls to this function with a given name return the same logger " "instance. This means that logger instances never need to be passed between " "different parts of an application." msgstr "" -#: library/logging.rst:1177 +#: library/logging.rst:1182 msgid "" "Return either the standard :class:`Logger` class, or the last class passed " "to :func:`setLoggerClass`. This function may be called from within a new " @@ -1686,43 +1696,43 @@ msgid "" "example::" msgstr "" -#: library/logging.rst:1182 +#: library/logging.rst:1187 msgid "" "class MyLogger(logging.getLoggerClass()):\n" " # ... override behaviour here" msgstr "" -#: library/logging.rst:1188 +#: library/logging.rst:1193 msgid "Return a callable which is used to create a :class:`LogRecord`." msgstr "" -#: library/logging.rst:1190 +#: library/logging.rst:1195 msgid "" "This function has been provided, along with :func:`setLogRecordFactory`, to " "allow developers more control over how the :class:`LogRecord` representing a " "logging event is constructed." msgstr "" -#: library/logging.rst:1195 +#: library/logging.rst:1200 msgid "" "See :func:`setLogRecordFactory` for more information about the how the " "factory is called." msgstr "" -#: library/logging.rst:1200 +#: library/logging.rst:1205 msgid "" "This is a convenience function that calls :meth:`Logger.debug`, on the root " "logger. The handling of the arguments is in every way identical to what is " "described in that method." msgstr "" -#: library/logging.rst:1204 +#: library/logging.rst:1209 msgid "" "The only difference is that if the root logger has no handlers, then :func:" "`basicConfig` is called, prior to calling ``debug`` on the root logger." msgstr "" -#: library/logging.rst:1207 +#: library/logging.rst:1212 msgid "" "For very short scripts or quick demonstrations of ``logging`` facilities, " "``debug`` and the other module-level functions may be convenient. However, " @@ -1732,38 +1742,38 @@ msgid "" "described at the beginnning of this documentation." msgstr "" -#: library/logging.rst:1217 +#: library/logging.rst:1222 msgid "" "Logs a message with level :const:`INFO` on the root logger. The arguments " "and behavior are otherwise the same as for :func:`debug`." msgstr "" -#: library/logging.rst:1223 +#: library/logging.rst:1228 msgid "" "Logs a message with level :const:`WARNING` on the root logger. The arguments " "and behavior are otherwise the same as for :func:`debug`." msgstr "" -#: library/logging.rst:1226 +#: library/logging.rst:1231 msgid "" "There is an obsolete function ``warn`` which is functionally identical to " "``warning``. As ``warn`` is deprecated, please do not use it - use " "``warning`` instead." msgstr "" -#: library/logging.rst:1233 +#: library/logging.rst:1238 msgid "" "Logs a message with level :const:`ERROR` on the root logger. The arguments " "and behavior are otherwise the same as for :func:`debug`." msgstr "" -#: library/logging.rst:1239 +#: library/logging.rst:1244 msgid "" "Logs a message with level :const:`CRITICAL` on the root logger. The " "arguments and behavior are otherwise the same as for :func:`debug`." msgstr "" -#: library/logging.rst:1245 +#: library/logging.rst:1250 msgid "" "Logs a message with level :const:`ERROR` on the root logger. The arguments " "and behavior are otherwise the same as for :func:`debug`. Exception info is " @@ -1771,13 +1781,13 @@ msgid "" "exception handler." msgstr "" -#: library/logging.rst:1251 +#: library/logging.rst:1256 msgid "" "Logs a message with level *level* on the root logger. The arguments and " "behavior are otherwise the same as for :func:`debug`." msgstr "" -#: library/logging.rst:1256 +#: library/logging.rst:1261 msgid "" "Provides an overriding level *level* for all loggers which takes precedence " "over the logger's own level. When the need arises to temporarily throttle " @@ -1791,7 +1801,7 @@ msgid "" "individual loggers." msgstr "" -#: library/logging.rst:1267 +#: library/logging.rst:1272 msgid "" "Note that if you have defined any custom logging level higher than " "``CRITICAL`` (this is not recommended), you won't be able to rely on the " @@ -1799,13 +1809,13 @@ msgid "" "a suitable value." msgstr "" -#: library/logging.rst:1272 +#: library/logging.rst:1277 msgid "" "The *level* parameter was defaulted to level ``CRITICAL``. See :issue:" "`28524` for more information about this change." msgstr "" -#: library/logging.rst:1278 +#: library/logging.rst:1283 msgid "" "Associates level *level* with text *levelName* in an internal dictionary, " "which is used to map numeric levels to a textual representation, for example " @@ -1815,24 +1825,24 @@ msgid "" "and they should increase in increasing order of severity." msgstr "" -#: library/logging.rst:1285 +#: library/logging.rst:1290 msgid "" "If you are thinking of defining your own levels, please see the section on :" "ref:`custom-levels`." msgstr "" -#: library/logging.rst:1290 +#: library/logging.rst:1295 msgid "" "Returns a mapping from level names to their corresponding logging levels. " "For example, the string \"CRITICAL\" maps to :const:`CRITICAL`. The returned " "mapping is copied from an internal mapping on each call to this function." msgstr "" -#: library/logging.rst:1298 +#: library/logging.rst:1303 msgid "Returns the textual or numeric representation of logging level *level*." msgstr "" -#: library/logging.rst:1300 +#: library/logging.rst:1305 msgid "" "If *level* is one of the predefined levels :const:`CRITICAL`, :const:" "`ERROR`, :const:`WARNING`, :const:`INFO` or :const:`DEBUG` then you get the " @@ -1842,20 +1852,20 @@ msgid "" "the corresponding string representation is returned." msgstr "" -#: library/logging.rst:1307 +#: library/logging.rst:1312 msgid "" "The *level* parameter also accepts a string representation of the level such " "as 'INFO'. In such cases, this functions returns the corresponding numeric " "value of the level." msgstr "" -#: library/logging.rst:1311 +#: library/logging.rst:1316 msgid "" "If no matching numeric or string value is passed in, the string 'Level %s' % " "level is returned." msgstr "" -#: library/logging.rst:1314 +#: library/logging.rst:1319 msgid "" "Levels are internally integers (as they need to be compared in the logging " "logic). This function is used to convert between an integer level and the " @@ -1864,7 +1874,7 @@ msgid "" "vice versa." msgstr "" -#: library/logging.rst:1320 +#: library/logging.rst:1325 msgid "" "In Python versions earlier than 3.4, this function could also be passed a " "text level, and would return the corresponding numeric value of the level. " @@ -1872,17 +1882,17 @@ msgid "" "Python 3.4, but reinstated in 3.4.2 due to retain backward compatibility." msgstr "" -#: library/logging.rst:1328 +#: library/logging.rst:1333 msgid "" "Returns a handler with the specified *name*, or ``None`` if there is no " "handler with that name." msgstr "" -#: library/logging.rst:1335 +#: library/logging.rst:1340 msgid "Returns an immutable set of all known handler names." msgstr "" -#: library/logging.rst:1341 +#: library/logging.rst:1346 msgid "" "Creates and returns a new :class:`LogRecord` instance whose attributes are " "defined by *attrdict*. This function is useful for taking a pickled :class:" @@ -1890,7 +1900,7 @@ msgid "" "as a :class:`LogRecord` instance at the receiving end." msgstr "" -#: library/logging.rst:1349 +#: library/logging.rst:1354 msgid "" "Does basic configuration for the logging system by creating a :class:" "`StreamHandler` with a default :class:`Formatter` and adding it to the root " @@ -1899,13 +1909,13 @@ msgid "" "no handlers are defined for the root logger." msgstr "" -#: library/logging.rst:1355 +#: library/logging.rst:1360 msgid "" "This function does nothing if the root logger already has handlers " "configured, unless the keyword argument *force* is set to ``True``." msgstr "" -#: library/logging.rst:1358 +#: library/logging.rst:1363 msgid "" "This function should be called from the main thread before other threads are " "started. In versions of Python prior to 2.7.1 and 3.2, if this function is " @@ -1914,54 +1924,54 @@ msgid "" "unexpected results such as messages being duplicated in the log." msgstr "" -#: library/logging.rst:1365 +#: library/logging.rst:1370 msgid "The following keyword arguments are supported." msgstr "" -#: library/logging.rst:1372 +#: library/logging.rst:1377 msgid "*filename*" msgstr "" -#: library/logging.rst:1372 +#: library/logging.rst:1377 msgid "" "Specifies that a :class:`FileHandler` be created, using the specified " "filename, rather than a :class:`StreamHandler`." msgstr "" -#: library/logging.rst:1376 +#: library/logging.rst:1381 msgid "*filemode*" msgstr "" -#: library/logging.rst:1376 +#: library/logging.rst:1381 msgid "" "If *filename* is specified, open the file in this :ref:`mode `. " "Defaults to ``'a'``." msgstr "" -#: library/logging.rst:1380 +#: library/logging.rst:1385 msgid "*format*" msgstr "" -#: library/logging.rst:1380 +#: library/logging.rst:1385 msgid "" "Use the specified format string for the handler. Defaults to attributes " "``levelname``, ``name`` and ``message`` separated by colons." msgstr "" -#: library/logging.rst:1385 +#: library/logging.rst:1390 msgid "*datefmt*" msgstr "" -#: library/logging.rst:1385 +#: library/logging.rst:1390 msgid "" "Use the specified date/time format, as accepted by :func:`time.strftime`." msgstr "" -#: library/logging.rst:1388 +#: library/logging.rst:1393 msgid "*style*" msgstr "" -#: library/logging.rst:1388 +#: library/logging.rst:1393 msgid "" "If *format* is specified, use this style for the format string. One of " "``'%'``, ``'{'`` or ``'$'`` for :ref:`printf-style `." msgstr "" -#: library/logging.rst:1399 +#: library/logging.rst:1404 msgid "*stream*" msgstr "" -#: library/logging.rst:1399 +#: library/logging.rst:1404 msgid "" "Use the specified stream to initialize the :class:`StreamHandler`. Note that " "this argument is incompatible with *filename* - if both are present, a " "``ValueError`` is raised." msgstr "" -#: library/logging.rst:1405 +#: library/logging.rst:1410 msgid "*handlers*" msgstr "" -#: library/logging.rst:1405 +#: library/logging.rst:1410 msgid "" "If specified, this should be an iterable of already created handlers to add " "to the root logger. Any handlers which don't already have a formatter set " @@ -2001,33 +2011,33 @@ msgid "" "present, a ``ValueError`` is raised." msgstr "" -#: library/logging.rst:1414 +#: library/logging.rst:1419 msgid "*force*" msgstr "" -#: library/logging.rst:1414 +#: library/logging.rst:1419 msgid "" "If this keyword argument is specified as true, any existing handlers " "attached to the root logger are removed and closed, before carrying out the " "configuration as specified by the other arguments." msgstr "" -#: library/logging.rst:1420 +#: library/logging.rst:1425 msgid "*encoding*" msgstr "" -#: library/logging.rst:1420 +#: library/logging.rst:1425 msgid "" "If this keyword argument is specified along with *filename*, its value is " "used when the :class:`FileHandler` is created, and thus used when opening " "the output file." msgstr "" -#: library/logging.rst:1425 +#: library/logging.rst:1430 msgid "*errors*" msgstr "" -#: library/logging.rst:1425 +#: library/logging.rst:1430 msgid "" "If this keyword argument is specified along with *filename*, its value is " "used when the :class:`FileHandler` is created, and thus used when opening " @@ -2036,39 +2046,39 @@ msgid "" "`open`, which means that it will be treated the same as passing 'errors'." msgstr "" -#: library/logging.rst:1436 +#: library/logging.rst:1441 msgid "The *style* argument was added." msgstr "" -#: library/logging.rst:1439 +#: library/logging.rst:1444 msgid "" "The *handlers* argument was added. Additional checks were added to catch " "situations where incompatible arguments are specified (e.g. *handlers* " "together with *stream* or *filename*, or *stream* together with *filename*)." msgstr "" -#: library/logging.rst:1445 +#: library/logging.rst:1450 msgid "The *force* argument was added." msgstr "" -#: library/logging.rst:1448 +#: library/logging.rst:1453 msgid "The *encoding* and *errors* arguments were added." msgstr "" -#: library/logging.rst:1453 +#: library/logging.rst:1458 msgid "" "Informs the logging system to perform an orderly shutdown by flushing and " "closing all handlers. This should be called at application exit and no " "further use of the logging system should be made after this call." msgstr "" -#: library/logging.rst:1457 +#: library/logging.rst:1462 msgid "" "When the logging module is imported, it registers this function as an exit " "handler (see :mod:`atexit`), so normally there's no need to do that manually." msgstr "" -#: library/logging.rst:1464 +#: library/logging.rst:1469 msgid "" "Tells the logging system to use the class *klass* when instantiating a " "logger. The class should define :meth:`!__init__` such that only a name " @@ -2080,32 +2090,32 @@ msgid "" "loggers." msgstr "" -#: library/logging.rst:1475 +#: library/logging.rst:1480 msgid "Set a callable which is used to create a :class:`LogRecord`." msgstr "" -#: library/logging.rst:1477 +#: library/logging.rst:1482 msgid "The factory callable to be used to instantiate a log record." msgstr "" -#: library/logging.rst:1479 +#: library/logging.rst:1484 msgid "" "This function has been provided, along with :func:`getLogRecordFactory`, to " "allow developers more control over how the :class:`LogRecord` representing a " "logging event is constructed." msgstr "" -#: library/logging.rst:1484 +#: library/logging.rst:1489 msgid "The factory has the following signature:" msgstr "" -#: library/logging.rst:1486 +#: library/logging.rst:1491 msgid "" "``factory(name, level, fn, lno, msg, args, exc_info, func=None, sinfo=None, " "**kwargs)``" msgstr "" -#: library/logging.rst:1488 +#: library/logging.rst:1493 msgid "The logger name." msgstr "" @@ -2113,7 +2123,7 @@ msgstr "" msgid "level" msgstr "" -#: library/logging.rst:1489 +#: library/logging.rst:1494 msgid "The logging level (numeric)." msgstr "" @@ -2121,7 +2131,7 @@ msgstr "" msgid "fn" msgstr "" -#: library/logging.rst:1490 +#: library/logging.rst:1495 msgid "The full pathname of the file where the logging call was made." msgstr "" @@ -2129,19 +2139,19 @@ msgstr "" msgid "lno" msgstr "" -#: library/logging.rst:1491 +#: library/logging.rst:1496 msgid "The line number in the file where the logging call was made." msgstr "" -#: library/logging.rst:1492 +#: library/logging.rst:1497 msgid "The logging message." msgstr "" -#: library/logging.rst:1493 +#: library/logging.rst:1498 msgid "The arguments for the logging message." msgstr "" -#: library/logging.rst:1494 +#: library/logging.rst:1499 msgid "An exception tuple, or ``None``." msgstr "" @@ -2149,7 +2159,7 @@ msgstr "" msgid "func" msgstr "" -#: library/logging.rst:1495 +#: library/logging.rst:1500 msgid "The name of the function or method which invoked the logging call." msgstr "" @@ -2157,7 +2167,7 @@ msgstr "" msgid "sinfo" msgstr "" -#: library/logging.rst:1497 +#: library/logging.rst:1502 msgid "" "A stack traceback such as is provided by :func:`traceback.print_stack`, " "showing the call hierarchy." @@ -2167,15 +2177,15 @@ msgstr "" msgid "kwargs" msgstr "" -#: library/logging.rst:1499 +#: library/logging.rst:1504 msgid "Additional keyword arguments." msgstr "" -#: library/logging.rst:1503 +#: library/logging.rst:1508 msgid "Module-Level Attributes" msgstr "" -#: library/logging.rst:1507 +#: library/logging.rst:1512 msgid "" "A \"handler of last resort\" is available through this attribute. This is a :" "class:`StreamHandler` writing to ``sys.stderr`` with a level of ``WARNING``, " @@ -2186,15 +2196,15 @@ msgid "" "reason, ``lastResort`` can be set to ``None``." msgstr "" -#: library/logging.rst:1519 +#: library/logging.rst:1524 msgid "Used to see if exceptions during handling should be propagated." msgstr "" -#: library/logging.rst:1521 +#: library/logging.rst:1526 msgid "Default: ``True``." msgstr "" -#: library/logging.rst:1523 +#: library/logging.rst:1528 msgid "" "If :data:`raiseExceptions` is ``False``, exceptions get silently ignored. " "This is what is mostly wanted for a logging system - most users will not " @@ -2202,22 +2212,22 @@ msgid "" "application errors." msgstr "" -#: library/logging.rst:1530 +#: library/logging.rst:1535 msgid "Integration with the warnings module" msgstr "" -#: library/logging.rst:1532 +#: library/logging.rst:1537 msgid "" "The :func:`captureWarnings` function can be used to integrate :mod:`logging` " "with the :mod:`warnings` module." msgstr "" -#: library/logging.rst:1537 +#: library/logging.rst:1542 msgid "" "This function is used to turn the capture of warnings by logging on and off." msgstr "" -#: library/logging.rst:1540 +#: library/logging.rst:1545 msgid "" "If *capture* is ``True``, warnings issued by the :mod:`warnings` module will " "be redirected to the logging system. Specifically, a warning will be " @@ -2226,46 +2236,46 @@ msgid "" "`WARNING`." msgstr "" -#: library/logging.rst:1545 +#: library/logging.rst:1550 msgid "" "If *capture* is ``False``, the redirection of warnings to the logging system " "will stop, and warnings will be redirected to their original destinations (i." "e. those in effect before ``captureWarnings(True)`` was called)." msgstr "" -#: library/logging.rst:1552 +#: library/logging.rst:1557 msgid "Module :mod:`logging.config`" msgstr "" -#: library/logging.rst:1553 +#: library/logging.rst:1558 msgid "Configuration API for the logging module." msgstr "" -#: library/logging.rst:1555 +#: library/logging.rst:1560 msgid "Module :mod:`logging.handlers`" msgstr "" -#: library/logging.rst:1556 +#: library/logging.rst:1561 msgid "Useful handlers included with the logging module." msgstr "" -#: library/logging.rst:1558 +#: library/logging.rst:1563 msgid ":pep:`282` - A Logging System" msgstr "" -#: library/logging.rst:1559 +#: library/logging.rst:1564 msgid "" "The proposal which described this feature for inclusion in the Python " "standard library." msgstr "" -#: library/logging.rst:1562 +#: library/logging.rst:1567 msgid "" "`Original Python logging package `_" msgstr "" -#: library/logging.rst:1563 +#: library/logging.rst:1568 msgid "" "This is the original source for the :mod:`logging` package. The version of " "the package available from this site is suitable for use with Python 1.5.2, " diff --git a/library/lzma.po b/library/lzma.po index 100153c9c..5e03439c8 100644 --- a/library/lzma.po +++ b/library/lzma.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/mailbox.po b/library/mailbox.po index b30cf82d3..c0d977085 100644 --- a/library/mailbox.po +++ b/library/mailbox.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1205,7 +1205,7 @@ msgstr "" #: library/mailbox.rst:1027 msgid "" "Unset the flag(s) specified by *flag* without changing other flags. To " -"remove more than one flag at a time, *flag* maybe a string of more than one " +"remove more than one flag at a time, *flag* may be a string of more than one " "character. If \"info\" contains experimental information rather than flags, " "the current \"info\" is not modified." msgstr "" @@ -1458,7 +1458,7 @@ msgstr "" #: library/mailbox.rst:1564 msgid "" "Unset the flag(s) specified by *flag* without changing other flags. To " -"remove more than one flag at a time, *flag* maybe a string of more than one " +"remove more than one flag at a time, *flag* may be a string of more than one " "character." msgstr "" @@ -1797,7 +1797,7 @@ msgid "" msgstr "" #: library/mailbox.rst:1644 -msgid "The based class for all other module-specific exceptions." +msgid "The base class for all other module-specific exceptions." msgstr "" #: library/mailbox.rst:1649 @@ -1818,8 +1818,8 @@ msgstr "" msgid "" "Raised when some mailbox-related condition beyond the control of the program " "causes it to be unable to proceed, such as when failing to acquire a lock " -"that another program already holds a lock, or when a uniquely generated file " -"name already exists." +"that another program already holds, or when a uniquely generated file name " +"already exists." msgstr "" #: library/mailbox.rst:1670 diff --git a/library/mailcap.po b/library/mailcap.po index d3e7142d8..fca0e861a 100644 --- a/library/mailcap.po +++ b/library/mailcap.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/markup.po b/library/markup.po index 00463aaa3..3f68c41d3 100644 --- a/library/markup.po +++ b/library/markup.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/marshal.po b/library/marshal.po index 04ae2e0bd..814e16686 100644 --- a/library/marshal.po +++ b/library/marshal.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/math.po b/library/math.po index 28a20fb5f..a40bcfb46 100644 --- a/library/math.po +++ b/library/math.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -808,13 +808,14 @@ msgstr "" #: library/math.rst:324 msgid "" -"Return the mantissa and exponent of *x* as the pair ``(m, e)``. *m* is a " -"float and *e* is an integer such that ``x == m * 2**e`` exactly. If *x* is " -"zero, returns ``(0.0, 0)``, otherwise ``0.5 <= abs(m) < 1``. This is used " -"to \"pick apart\" the internal representation of a float in a portable way." +"Return the mantissa and exponent of *x* as the pair ``(m, e)``. If *x* is a " +"finite nonzero number, then *m* is a float with ``0.5 <= abs(m) < 1.0`` and " +"an integer *e* is such that ``x == m * 2**e`` exactly. Else, return ``(x, " +"0)``. This is used to \"pick apart\" the internal representation of a float " +"in a portable way." msgstr "" -#: library/math.rst:329 +#: library/math.rst:331 msgid "" "Note that :func:`frexp` has a different call/return pattern than its C " "equivalents: it takes a single argument and return a pair of values, rather " @@ -822,20 +823,20 @@ msgid "" "is no such thing in Python)." msgstr "" -#: library/math.rst:336 +#: library/math.rst:338 msgid "" "Return ``True`` if the values *a* and *b* are close to each other and " "``False`` otherwise." msgstr "" -#: library/math.rst:339 +#: library/math.rst:341 msgid "" "Whether or not two values are considered close is determined according to " "given absolute and relative tolerances. If no errors occur, the result will " "be: ``abs(a-b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol)``." msgstr "" -#: library/math.rst:343 +#: library/math.rst:345 msgid "" "*rel_tol* is the relative tolerance -- it is the maximum allowed difference " "between *a* and *b*, relative to the larger absolute value of *a* or *b*. " @@ -845,7 +846,7 @@ msgid "" "``1.0``." msgstr "" -#: library/math.rst:350 +#: library/math.rst:352 msgid "" "*abs_tol* is the absolute tolerance; it defaults to ``0.0`` and it must be " "nonnegative. When comparing ``x`` to ``0.0``, ``isclose(x, 0)`` is computed " @@ -854,7 +855,7 @@ msgid "" "argument to the call." msgstr "" -#: library/math.rst:356 +#: library/math.rst:358 msgid "" "The IEEE 754 special values of ``NaN``, ``inf``, and ``-inf`` will be " "handled according to IEEE rules. Specifically, ``NaN`` is not considered " @@ -862,136 +863,136 @@ msgid "" "considered close to themselves." msgstr "" -#: library/math.rst:365 +#: library/math.rst:367 msgid ":pep:`485` -- A function for testing approximate equality" msgstr "" -#: library/math.rst:370 +#: library/math.rst:372 msgid "" "Return ``True`` if *x* is neither an infinity nor a NaN, and ``False`` " "otherwise. (Note that ``0.0`` *is* considered finite.)" msgstr "" -#: library/math.rst:378 +#: library/math.rst:380 msgid "" "Return ``True`` if *x* is a positive or negative infinity, and ``False`` " "otherwise." msgstr "" -#: library/math.rst:384 +#: library/math.rst:386 msgid "" "Return ``True`` if *x* is a NaN (not a number), and ``False`` otherwise." msgstr "" -#: library/math.rst:389 +#: library/math.rst:391 msgid "" "Return ``x * (2**i)``. This is essentially the inverse of function :func:" "`frexp`." msgstr "" -#: library/math.rst:395 +#: library/math.rst:397 msgid "Return the floating-point value *steps* steps after *x* towards *y*." msgstr "" -#: library/math.rst:397 +#: library/math.rst:399 msgid "If *x* is equal to *y*, return *y*, unless *steps* is zero." msgstr "" -#: library/math.rst:399 +#: library/math.rst:401 msgid "Examples:" msgstr "" -#: library/math.rst:401 +#: library/math.rst:403 msgid "``math.nextafter(x, math.inf)`` goes up: towards positive infinity." msgstr "" -#: library/math.rst:402 +#: library/math.rst:404 msgid "``math.nextafter(x, -math.inf)`` goes down: towards minus infinity." msgstr "" -#: library/math.rst:403 +#: library/math.rst:405 msgid "``math.nextafter(x, 0.0)`` goes towards zero." msgstr "" -#: library/math.rst:404 +#: library/math.rst:406 msgid "``math.nextafter(x, math.copysign(math.inf, x))`` goes away from zero." msgstr "" -#: library/math.rst:406 +#: library/math.rst:408 msgid "See also :func:`math.ulp`." msgstr "" -#: library/math.rst:410 +#: library/math.rst:412 msgid "Added the *steps* argument." msgstr "" -#: library/math.rst:416 +#: library/math.rst:418 msgid "Return the value of the least significant bit of the float *x*:" msgstr "" -#: library/math.rst:418 +#: library/math.rst:420 msgid "If *x* is a NaN (not a number), return *x*." msgstr "" -#: library/math.rst:419 +#: library/math.rst:421 msgid "If *x* is negative, return ``ulp(-x)``." msgstr "" -#: library/math.rst:420 +#: library/math.rst:422 msgid "If *x* is a positive infinity, return *x*." msgstr "" -#: library/math.rst:421 +#: library/math.rst:423 msgid "" "If *x* is equal to zero, return the smallest positive *denormalized* " "representable float (smaller than the minimum positive *normalized* float, :" "data:`sys.float_info.min `)." msgstr "" -#: library/math.rst:424 +#: library/math.rst:426 msgid "" "If *x* is equal to the largest positive representable float, return the " "value of the least significant bit of *x*, such that the first float smaller " "than *x* is ``x - ulp(x)``." msgstr "" -#: library/math.rst:427 +#: library/math.rst:429 msgid "" "Otherwise (*x* is a positive finite number), return the value of the least " "significant bit of *x*, such that the first float bigger than *x* is ``x + " "ulp(x)``." msgstr "" -#: library/math.rst:431 +#: library/math.rst:433 msgid "ULP stands for \"Unit in the Last Place\"." msgstr "" -#: library/math.rst:433 +#: library/math.rst:435 msgid "" "See also :func:`math.nextafter` and :data:`sys.float_info.epsilon `." msgstr "" -#: library/math.rst:440 +#: library/math.rst:442 msgid "Power, exponential and logarithmic functions" msgstr "" -#: library/math.rst:444 +#: library/math.rst:446 msgid "Return the cube root of *x*." msgstr "" -#: library/math.rst:451 +#: library/math.rst:453 msgid "" "Return *e* raised to the power *x*, where *e* = 2.718281... is the base of " "natural logarithms. This is usually more accurate than ``math.e ** x`` or " "``pow(math.e, x)``." msgstr "" -#: library/math.rst:458 +#: library/math.rst:460 msgid "Return *2* raised to the power *x*." msgstr "" -#: library/math.rst:465 +#: library/math.rst:467 msgid "" "Return *e* raised to the power *x*, minus 1. Here *e* is the base of " "natural logarithms. For small floats *x*, the subtraction in ``exp(x) - 1`` " @@ -1000,41 +1001,41 @@ msgid "" "compute this quantity to full precision:" msgstr "" -#: library/math.rst:482 +#: library/math.rst:484 msgid "With one argument, return the natural logarithm of *x* (to base *e*)." msgstr "" -#: library/math.rst:484 +#: library/math.rst:486 msgid "" "With two arguments, return the logarithm of *x* to the given *base*, " "calculated as ``log(x)/log(base)``." msgstr "" -#: library/math.rst:490 +#: library/math.rst:492 msgid "" "Return the natural logarithm of *1+x* (base *e*). The result is calculated " "in a way which is accurate for *x* near zero." msgstr "" -#: library/math.rst:496 +#: library/math.rst:498 msgid "" "Return the base-2 logarithm of *x*. This is usually more accurate than " "``log(x, 2)``." msgstr "" -#: library/math.rst:503 +#: library/math.rst:505 msgid "" ":meth:`int.bit_length` returns the number of bits necessary to represent an " "integer in binary, excluding the sign and leading zeros." msgstr "" -#: library/math.rst:509 +#: library/math.rst:511 msgid "" "Return the base-10 logarithm of *x*. This is usually more accurate than " "``log(x, 10)``." msgstr "" -#: library/math.rst:515 +#: library/math.rst:517 msgid "" "Return *x* raised to the power *y*. Exceptional cases follow the IEEE 754 " "standard as far as possible. In particular, ``pow(1.0, x)`` and ``pow(x, " @@ -1043,50 +1044,50 @@ msgid "" "y)`` is undefined, and raises :exc:`ValueError`." msgstr "" -#: library/math.rst:522 +#: library/math.rst:524 msgid "" "Unlike the built-in ``**`` operator, :func:`math.pow` converts both its " "arguments to type :class:`float`. Use ``**`` or the built-in :func:`pow` " "function for computing exact integer powers." msgstr "" -#: library/math.rst:526 +#: library/math.rst:528 msgid "" "The special cases ``pow(0.0, -inf)`` and ``pow(-0.0, -inf)`` were changed to " "return ``inf`` instead of raising :exc:`ValueError`, for consistency with " "IEEE 754." msgstr "" -#: library/math.rst:534 +#: library/math.rst:536 msgid "Return the square root of *x*." msgstr "" -#: library/math.rst:538 +#: library/math.rst:540 msgid "Summation and product functions" msgstr "" -#: library/math.rst:542 +#: library/math.rst:544 msgid "" "Return the Euclidean distance between two points *p* and *q*, each given as " "a sequence (or iterable) of coordinates. The two points must have the same " "dimension." msgstr "" -#: library/math.rst:607 +#: library/math.rst:609 msgid "Roughly equivalent to::" msgstr "" -#: library/math.rst:548 +#: library/math.rst:550 msgid "sqrt(sum((px - qx) ** 2.0 for px, qx in zip(p, q)))" msgstr "" -#: library/math.rst:555 +#: library/math.rst:557 msgid "" "Return an accurate floating-point sum of values in the iterable. Avoids " "loss of precision by tracking multiple intermediate partial sums." msgstr "" -#: library/math.rst:558 +#: library/math.rst:560 msgid "" "The algorithm's accuracy depends on IEEE-754 arithmetic guarantees and the " "typical case where the rounding mode is half-even. On some non-Windows " @@ -1095,7 +1096,7 @@ msgid "" "least significant bit." msgstr "" -#: library/math.rst:564 +#: library/math.rst:566 msgid "" "For further discussion and two alternative approaches, see the `ASPN " "cookbook recipes for accurate floating-point summation `_\\." msgstr "" -#: library/math.rst:571 +#: library/math.rst:573 msgid "" "Return the Euclidean norm, ``sqrt(sum(x**2 for x in coordinates))``. This is " "the length of the vector from the origin to the point given by the " "coordinates." msgstr "" -#: library/math.rst:575 +#: library/math.rst:577 msgid "" "For a two dimensional point ``(x, y)``, this is equivalent to computing the " "hypotenuse of a right triangle using the Pythagorean theorem, ``sqrt(x*x + " "y*y)``." msgstr "" -#: library/math.rst:579 +#: library/math.rst:581 msgid "" "Added support for n-dimensional points. Formerly, only the two dimensional " "case was supported." msgstr "" -#: library/math.rst:583 +#: library/math.rst:585 msgid "" "Improved the algorithm's accuracy so that the maximum error is under 1 ulp " "(unit in the last place). More typically, the result is almost always " "correctly rounded to within 1/2 ulp." msgstr "" -#: library/math.rst:591 +#: library/math.rst:593 msgid "" "Calculate the product of all the elements in the input *iterable*. The " "default *start* value for the product is ``1``." msgstr "" -#: library/math.rst:594 +#: library/math.rst:596 msgid "" "When the iterable is empty, return the start value. This function is " "intended specifically for use with numeric values and may reject non-numeric " "types." msgstr "" -#: library/math.rst:603 +#: library/math.rst:605 msgid "Return the sum of products of values from two iterables *p* and *q*." msgstr "" -#: library/math.rst:605 +#: library/math.rst:607 msgid "Raises :exc:`ValueError` if the inputs do not have the same length." msgstr "" -#: library/math.rst:609 +#: library/math.rst:611 msgid "sum(itertools.starmap(operator.mul, zip(p, q, strict=True)))" msgstr "" -#: library/math.rst:611 +#: library/math.rst:613 msgid "" "For float and mixed int/float inputs, the intermediate products and sums are " "computed with extended precision." msgstr "" -#: library/math.rst:618 +#: library/math.rst:620 msgid "Angular conversion" msgstr "" -#: library/math.rst:622 +#: library/math.rst:624 msgid "Convert angle *x* from radians to degrees." msgstr "" -#: library/math.rst:627 +#: library/math.rst:629 msgid "Convert angle *x* from degrees to radians." msgstr "" -#: library/math.rst:631 +#: library/math.rst:633 msgid "Trigonometric functions" msgstr "" -#: library/math.rst:635 +#: library/math.rst:637 msgid "" "Return the arc cosine of *x*, in radians. The result is between ``0`` and " "``pi``." msgstr "" -#: library/math.rst:641 +#: library/math.rst:643 msgid "" "Return the arc sine of *x*, in radians. The result is between ``-pi/2`` and " "``pi/2``." msgstr "" -#: library/math.rst:647 +#: library/math.rst:649 msgid "" "Return the arc tangent of *x*, in radians. The result is between ``-pi/2`` " "and ``pi/2``." msgstr "" -#: library/math.rst:653 +#: library/math.rst:655 msgid "" "Return ``atan(y / x)``, in radians. The result is between ``-pi`` and " "``pi``. The vector in the plane from the origin to point ``(x, y)`` makes " @@ -1205,78 +1206,78 @@ msgid "" "``pi/4``, but ``atan2(-1, -1)`` is ``-3*pi/4``." msgstr "" -#: library/math.rst:663 +#: library/math.rst:665 msgid "Return the cosine of *x* radians." msgstr "" -#: library/math.rst:668 +#: library/math.rst:670 msgid "Return the sine of *x* radians." msgstr "" -#: library/math.rst:673 +#: library/math.rst:675 msgid "Return the tangent of *x* radians." msgstr "" -#: library/math.rst:677 +#: library/math.rst:679 msgid "Hyperbolic functions" msgstr "" -#: library/math.rst:679 +#: library/math.rst:681 msgid "" "`Hyperbolic functions `_ " "are analogs of trigonometric functions that are based on hyperbolas instead " "of circles." msgstr "" -#: library/math.rst:685 +#: library/math.rst:687 msgid "Return the inverse hyperbolic cosine of *x*." msgstr "" -#: library/math.rst:690 +#: library/math.rst:692 msgid "Return the inverse hyperbolic sine of *x*." msgstr "" -#: library/math.rst:695 +#: library/math.rst:697 msgid "Return the inverse hyperbolic tangent of *x*." msgstr "" -#: library/math.rst:700 +#: library/math.rst:702 msgid "Return the hyperbolic cosine of *x*." msgstr "" -#: library/math.rst:705 +#: library/math.rst:707 msgid "Return the hyperbolic sine of *x*." msgstr "" -#: library/math.rst:710 +#: library/math.rst:712 msgid "Return the hyperbolic tangent of *x*." msgstr "" -#: library/math.rst:714 +#: library/math.rst:716 msgid "Special functions" msgstr "" -#: library/math.rst:718 +#: library/math.rst:720 msgid "" "Return the `error function `_ " "at *x*." msgstr "" -#: library/math.rst:721 +#: library/math.rst:723 msgid "" "The :func:`erf` function can be used to compute traditional statistical " "functions such as the `cumulative standard normal distribution `_::" msgstr "" -#: library/math.rst:725 +#: library/math.rst:727 msgid "" "def phi(x):\n" " 'Cumulative distribution function for the standard normal distribution'\n" " return (1.0 + erf(x / sqrt(2.0))) / 2.0" msgstr "" -#: library/math.rst:734 +#: library/math.rst:736 msgid "" "Return the complementary error function at *x*. The `complementary error " "function `_ is defined as " @@ -1285,31 +1286,31 @@ msgid "" "Loss_of_significance>`_\\." msgstr "" -#: library/math.rst:745 +#: library/math.rst:747 msgid "" "Return the `Gamma function `_ " "at *x*." msgstr "" -#: library/math.rst:753 +#: library/math.rst:755 msgid "" "Return the natural logarithm of the absolute value of the Gamma function at " "*x*." msgstr "" -#: library/math.rst:760 +#: library/math.rst:762 msgid "Constants" msgstr "" -#: library/math.rst:764 +#: library/math.rst:766 msgid "The mathematical constant *π* = 3.141592..., to available precision." msgstr "" -#: library/math.rst:769 +#: library/math.rst:771 msgid "The mathematical constant *e* = 2.718281..., to available precision." msgstr "" -#: library/math.rst:774 +#: library/math.rst:776 msgid "" "The mathematical constant *τ* = 6.283185..., to available precision. Tau is " "a circle constant equal to 2\\ *π*, the ratio of a circle's circumference to " @@ -1318,13 +1319,13 @@ msgid "" "day `_ by eating twice as much pie!" msgstr "" -#: library/math.rst:785 +#: library/math.rst:787 msgid "" "A floating-point positive infinity. (For negative infinity, use ``-math." "inf``.) Equivalent to the output of ``float('inf')``." msgstr "" -#: library/math.rst:793 +#: library/math.rst:795 msgid "" "A floating-point \"not a number\" (NaN) value. Equivalent to the output of " "``float('nan')``. Due to the requirements of the `IEEE-754 standard \n" "Language-Team: LANGUAGE \n" diff --git a/library/mm.po b/library/mm.po index 7af7a3729..c18974989 100644 --- a/library/mm.po +++ b/library/mm.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/mmap.po b/library/mmap.po index d9805071c..5c4a84b6a 100644 --- a/library/mmap.po +++ b/library/mmap.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/modulefinder.po b/library/modulefinder.po index d97275797..fa8c1ae3a 100644 --- a/library/modulefinder.po +++ b/library/modulefinder.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/modules.po b/library/modules.po index e8f3b7b32..99d7937c5 100644 --- a/library/modules.po +++ b/library/modules.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/msilib.po b/library/msilib.po index 3b2075f92..b47fe5e72 100644 --- a/library/msilib.po +++ b/library/msilib.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/msvcrt.po b/library/msvcrt.po index 54cf1e061..1b2610e87 100644 --- a/library/msvcrt.po +++ b/library/msvcrt.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,7 +21,7 @@ msgstr "" msgid ":mod:`!msvcrt` --- Useful routines from the MS VC++ runtime" msgstr "" -#: library/msvcrt.rst:12 +#: library/msvcrt.rst:11 msgid "" "These functions provide access to some useful capabilities on Windows " "platforms. Some higher-level modules use these functions to build the " @@ -29,13 +29,13 @@ msgid "" "module uses this in the implementation of the :func:`getpass` function." msgstr "" -#: library/msvcrt.rst:17 +#: library/msvcrt.rst:16 msgid "" "Further documentation on these functions can be found in the Platform API " "documentation." msgstr "" -#: library/msvcrt.rst:20 +#: library/msvcrt.rst:19 msgid "" "The module implements both the normal and wide char variants of the console " "I/O api. The normal API deals only with ASCII characters and is of limited " @@ -43,21 +43,21 @@ msgid "" "where ever possible." msgstr "" -#: library/msvcrt.rst:25 +#: library/msvcrt.rst:24 msgid "Availability" msgstr "" -#: library/msvcrt.rst:27 +#: library/msvcrt.rst:26 msgid "" "Operations in this module now raise :exc:`OSError` where :exc:`IOError` was " "raised." msgstr "" -#: library/msvcrt.rst:35 +#: library/msvcrt.rst:34 msgid "File Operations" msgstr "" -#: library/msvcrt.rst:40 +#: library/msvcrt.rst:39 msgid "" "Lock part of a file based on file descriptor *fd* from the C runtime. " "Raises :exc:`OSError` on failure. The locked region of the file extends from " @@ -68,37 +68,37 @@ msgid "" "individually." msgstr "" -#: library/msvcrt.rst:47 +#: library/msvcrt.rst:46 msgid "" "Raises an :ref:`auditing event ` ``msvcrt.locking`` with arguments " "``fd``, ``mode``, ``nbytes``." msgstr "" -#: library/msvcrt.rst:53 +#: library/msvcrt.rst:52 msgid "" "Locks the specified bytes. If the bytes cannot be locked, the program " "immediately tries again after 1 second. If, after 10 attempts, the bytes " "cannot be locked, :exc:`OSError` is raised." msgstr "" -#: library/msvcrt.rst:61 +#: library/msvcrt.rst:60 msgid "" "Locks the specified bytes. If the bytes cannot be locked, :exc:`OSError` is " "raised." msgstr "" -#: library/msvcrt.rst:67 +#: library/msvcrt.rst:66 msgid "Unlocks the specified bytes, which must have been previously locked." msgstr "" -#: library/msvcrt.rst:72 +#: library/msvcrt.rst:71 msgid "" "Set the line-end translation mode for the file descriptor *fd*. To set it to " "text mode, *flags* should be :const:`os.O_TEXT`; for binary, it should be :" "const:`os.O_BINARY`." msgstr "" -#: library/msvcrt.rst:79 +#: library/msvcrt.rst:78 msgid "" "Create a C runtime file descriptor from the file handle *handle*. The " "*flags* parameter should be a bitwise OR of :const:`os.O_APPEND`, :const:`os." @@ -107,41 +107,41 @@ msgid "" "object." msgstr "" -#: library/msvcrt.rst:85 +#: library/msvcrt.rst:84 msgid "" "The file descriptor is inheritable by default. Pass :const:`os.O_NOINHERIT` " "flag to make it non inheritable." msgstr "" -#: library/msvcrt.rst:88 +#: library/msvcrt.rst:87 msgid "" "Raises an :ref:`auditing event ` ``msvcrt.open_osfhandle`` with " "arguments ``handle``, ``flags``." msgstr "" -#: library/msvcrt.rst:93 +#: library/msvcrt.rst:92 msgid "" "Return the file handle for the file descriptor *fd*. Raises :exc:`OSError` " "if *fd* is not recognized." msgstr "" -#: library/msvcrt.rst:96 +#: library/msvcrt.rst:95 msgid "" "Raises an :ref:`auditing event ` ``msvcrt.get_osfhandle`` with " "argument ``fd``." msgstr "" -#: library/msvcrt.rst:102 +#: library/msvcrt.rst:101 msgid "Console I/O" msgstr "" -#: library/msvcrt.rst:107 +#: library/msvcrt.rst:106 msgid "" "Returns a nonzero value if a keypress is waiting to be read. Otherwise, " "return 0." msgstr "" -#: library/msvcrt.rst:113 +#: library/msvcrt.rst:112 msgid "" "Read a keypress and return the resulting character as a byte string. Nothing " "is echoed to the console. This call will block if a keypress is not already " @@ -151,49 +151,49 @@ msgid "" "be read with this function." msgstr "" -#: library/msvcrt.rst:123 +#: library/msvcrt.rst:122 msgid "Wide char variant of :func:`getch`, returning a Unicode value." msgstr "" -#: library/msvcrt.rst:128 +#: library/msvcrt.rst:127 msgid "" "Similar to :func:`getch`, but the keypress will be echoed if it represents a " "printable character." msgstr "" -#: library/msvcrt.rst:134 +#: library/msvcrt.rst:133 msgid "Wide char variant of :func:`getche`, returning a Unicode value." msgstr "" -#: library/msvcrt.rst:139 +#: library/msvcrt.rst:138 msgid "Print the byte string *char* to the console without buffering." msgstr "" -#: library/msvcrt.rst:144 +#: library/msvcrt.rst:143 msgid "Wide char variant of :func:`putch`, accepting a Unicode value." msgstr "" -#: library/msvcrt.rst:149 +#: library/msvcrt.rst:148 msgid "" "Cause the byte string *char* to be \"pushed back\" into the console buffer; " "it will be the next character read by :func:`getch` or :func:`getche`." msgstr "" -#: library/msvcrt.rst:155 +#: library/msvcrt.rst:154 msgid "Wide char variant of :func:`ungetch`, accepting a Unicode value." msgstr "" -#: library/msvcrt.rst:161 +#: library/msvcrt.rst:160 msgid "Other Functions" msgstr "" -#: library/msvcrt.rst:166 +#: library/msvcrt.rst:165 msgid "" "Force the :c:func:`malloc` heap to clean itself up and return unused blocks " "to the operating system. On failure, this raises :exc:`OSError`." msgstr "" -#: library/msvcrt.rst:172 +#: library/msvcrt.rst:171 msgid "" "Changes the location where the C runtime writes an error message for an " "error that might end the program. *mode* must be one of the :const:`!" @@ -202,31 +202,31 @@ msgid "" "Python `." msgstr "" -#: library/msvcrt.rst:181 +#: library/msvcrt.rst:180 msgid "" "Error sink is determined by the app's type. Only available in :ref:`debug " "build of Python `." msgstr "" -#: library/msvcrt.rst:187 +#: library/msvcrt.rst:186 msgid "" "Error sink is a standard error. Only available in :ref:`debug build of " "Python `." msgstr "" -#: library/msvcrt.rst:193 +#: library/msvcrt.rst:192 msgid "" "Error sink is a message box. Only available in :ref:`debug build of Python " "`." msgstr "" -#: library/msvcrt.rst:199 +#: library/msvcrt.rst:198 msgid "" "Report the current error mode value. Only available in :ref:`debug build of " "Python `." msgstr "" -#: library/msvcrt.rst:205 +#: library/msvcrt.rst:204 msgid "" "Specifies the destination or destinations for a specific report type " "generated by :c:func:`!_CrtDbgReport` in the MS VC++ runtime. *type* must be " @@ -235,7 +235,7 @@ msgid "" "`debug build of Python `." msgstr "" -#: library/msvcrt.rst:214 +#: library/msvcrt.rst:213 msgid "" "After you use :func:`CrtSetReportMode` to specify :const:`CRTDBG_MODE_FILE`, " "you can specify the file handle to receive the message text. *type* must be " @@ -244,51 +244,51 @@ msgid "" "Python `." msgstr "" -#: library/msvcrt.rst:223 +#: library/msvcrt.rst:222 msgid "" "Warnings, messages, and information that doesn't need immediate attention." msgstr "" -#: library/msvcrt.rst:228 +#: library/msvcrt.rst:227 msgid "" "Errors, unrecoverable problems, and issues that require immediate attention." msgstr "" -#: library/msvcrt.rst:233 +#: library/msvcrt.rst:232 msgid "Assertion failures." msgstr "" -#: library/msvcrt.rst:238 +#: library/msvcrt.rst:237 msgid "Writes the message to the debugger's output window." msgstr "" -#: library/msvcrt.rst:243 +#: library/msvcrt.rst:242 msgid "" "Writes the message to a user-supplied file handle. :func:`CrtSetReportFile` " "should be called to define the specific file or stream to use as the " "destination." msgstr "" -#: library/msvcrt.rst:250 +#: library/msvcrt.rst:249 msgid "" "Creates a message box to display the message along with the ``Abort``, " "``Retry``, and ``Ignore`` buttons." msgstr "" -#: library/msvcrt.rst:256 +#: library/msvcrt.rst:255 msgid "Returns current *mode* for the specified *type*." msgstr "" -#: library/msvcrt.rst:261 +#: library/msvcrt.rst:260 msgid "The CRT Assembly version, from the :file:`crtassem.h` header file." msgstr "" -#: library/msvcrt.rst:266 +#: library/msvcrt.rst:265 msgid "" "The VC Assembly public key token, from the :file:`crtassem.h` header file." msgstr "" -#: library/msvcrt.rst:271 +#: library/msvcrt.rst:270 msgid "" "The Libraries Assembly name prefix, from the :file:`crtassem.h` header file." msgstr "" diff --git a/library/multiprocessing.po b/library/multiprocessing.po index adba6e8c0..05b6c18cf 100644 --- a/library/multiprocessing.po +++ b/library/multiprocessing.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -160,10 +160,10 @@ msgstr "" #: library/multiprocessing.rst:103 msgid "" -"The arguments to :class:`Process` usually need to be unpickleable from " -"within the child process. If you tried typing the above example directly " -"into a REPL it could lead to an :exc:`AttributeError` in the child process " -"trying to locate the *f* function in the ``__main__`` module." +"The arguments to :class:`Process` usually need to be picklable so they can " +"be passed to the child process. If you tried typing the above example " +"directly into a REPL it could lead to an :exc:`AttributeError` in the child " +"process trying to locate the *f* function in the ``__main__`` module." msgstr "" #: library/multiprocessing.rst:112 @@ -719,18 +719,38 @@ msgid "" "`threading` module." msgstr "" -#: library/multiprocessing.rst:512 +#: library/multiprocessing.rst:513 +msgid "Global start method" +msgstr "" + +#: library/multiprocessing.rst:515 +msgid "" +"Python supports several ways to create and initialize a process. The global " +"start method sets the default mechanism for creating a process." +msgstr "" + +#: library/multiprocessing.rst:518 +msgid "" +"Several multiprocessing functions and methods that may also instantiate " +"certain objects will implicitly set the global start method to the system's " +"default, if it hasn’t been set already. The global start method can only be " +"set once. If you need to change the start method from the system default, " +"you must proactively set the global start method before calling functions or " +"methods, or creating these objects." +msgstr "" + +#: library/multiprocessing.rst:527 msgid ":class:`Process` and exceptions" msgstr "" -#: library/multiprocessing.rst:517 +#: library/multiprocessing.rst:532 msgid "" "Process objects represent activity that is run in a separate process. The :" "class:`Process` class has equivalents of all the methods of :class:" "`threading.Thread`." msgstr "" -#: library/multiprocessing.rst:521 +#: library/multiprocessing.rst:536 msgid "" "The constructor should always be called with keyword arguments. *group* " "should always be ``None``; it exists solely for compatibility with :class:" @@ -744,21 +764,21 @@ msgid "" "creating process." msgstr "" -#: library/multiprocessing.rst:532 +#: library/multiprocessing.rst:547 msgid "" "By default, no arguments are passed to *target*. The *args* argument, which " "defaults to ``()``, can be used to specify a list or tuple of the arguments " "to pass to *target*." msgstr "" -#: library/multiprocessing.rst:536 +#: library/multiprocessing.rst:551 msgid "" "If a subclass overrides the constructor, it must make sure it invokes the " "base class constructor (``super().__init__()``) before doing anything else " "to the process." msgstr "" -#: library/multiprocessing.rst:542 +#: library/multiprocessing.rst:557 msgid "" "In general, all arguments to :class:`Process` must be picklable. This is " "frequently observed when trying to create a :class:`Process` or use a :class:" @@ -766,7 +786,7 @@ msgid "" "*target* function." msgstr "" -#: library/multiprocessing.rst:547 +#: library/multiprocessing.rst:562 msgid "" "Passing a callable object defined in the current REPL session causes the " "child process to die via an uncaught :exc:`AttributeError` exception when " @@ -774,11 +794,11 @@ msgid "" "order to be loaded during unpickling." msgstr "" -#: library/multiprocessing.rst:552 +#: library/multiprocessing.rst:567 msgid "Example of this uncatchable error from the child::" msgstr "" -#: library/multiprocessing.rst:554 +#: library/multiprocessing.rst:569 msgid "" ">>> import multiprocessing as mp\n" ">>> def knigit():\n" @@ -795,7 +815,7 @@ msgid "" "exitcode=1>" msgstr "" -#: library/multiprocessing.rst:567 +#: library/multiprocessing.rst:582 msgid "" "See :ref:`multiprocessing-programming-spawn`. While this restriction is not " "true if using the ``\"fork\"`` start method, as of Python ``3.14`` that is " @@ -803,15 +823,15 @@ msgid "" "methods`. See also :gh:`132898`." msgstr "" -#: library/multiprocessing.rst:573 +#: library/multiprocessing.rst:588 msgid "Added the *daemon* parameter." msgstr "" -#: library/multiprocessing.rst:578 +#: library/multiprocessing.rst:593 msgid "Method representing the process's activity." msgstr "" -#: library/multiprocessing.rst:580 +#: library/multiprocessing.rst:595 msgid "" "You may override this method in a subclass. The standard :meth:`run` method " "invokes the callable object passed to the object's constructor as the target " @@ -819,17 +839,17 @@ msgid "" "*args* and *kwargs* arguments, respectively." msgstr "" -#: library/multiprocessing.rst:585 +#: library/multiprocessing.rst:600 msgid "" "Using a list or tuple as the *args* argument passed to :class:`Process` " "achieves the same effect." msgstr "" -#: library/multiprocessing.rst:588 +#: library/multiprocessing.rst:603 msgid "Example::" msgstr "" -#: library/multiprocessing.rst:590 +#: library/multiprocessing.rst:605 msgid "" ">>> from multiprocessing import Process\n" ">>> p = Process(target=print, args=[1])\n" @@ -840,17 +860,17 @@ msgid "" "1" msgstr "" -#: library/multiprocessing.rst:600 +#: library/multiprocessing.rst:615 msgid "Start the process's activity." msgstr "" -#: library/multiprocessing.rst:602 +#: library/multiprocessing.rst:617 msgid "" "This must be called at most once per process object. It arranges for the " "object's :meth:`run` method to be invoked in a separate process." msgstr "" -#: library/multiprocessing.rst:607 +#: library/multiprocessing.rst:622 msgid "" "If the optional argument *timeout* is ``None`` (the default), the method " "blocks until the process whose :meth:`join` method is called terminates. If " @@ -860,23 +880,23 @@ msgid "" "terminated." msgstr "" -#: library/multiprocessing.rst:614 +#: library/multiprocessing.rst:629 msgid "A process can be joined many times." msgstr "" -#: library/multiprocessing.rst:616 +#: library/multiprocessing.rst:631 msgid "" "A process cannot join itself because this would cause a deadlock. It is an " "error to attempt to join a process before it has been started." msgstr "" -#: library/multiprocessing.rst:621 +#: library/multiprocessing.rst:636 msgid "" "The process's name. The name is a string used for identification purposes " "only. It has no semantics. Multiple processes may be given the same name." msgstr "" -#: library/multiprocessing.rst:625 +#: library/multiprocessing.rst:640 msgid "" "The initial name is set by the constructor. If no explicit name is provided " "to the constructor, a name of the form 'Process-N\\ :sub:`1`:N\\ :sub:" @@ -884,33 +904,33 @@ msgid "" "child of its parent." msgstr "" -#: library/multiprocessing.rst:632 +#: library/multiprocessing.rst:647 msgid "Return whether the process is alive." msgstr "" -#: library/multiprocessing.rst:634 +#: library/multiprocessing.rst:649 msgid "" "Roughly, a process object is alive from the moment the :meth:`start` method " "returns until the child process terminates." msgstr "" -#: library/multiprocessing.rst:639 +#: library/multiprocessing.rst:654 msgid "" "The process's daemon flag, a Boolean value. This must be set before :meth:" "`start` is called." msgstr "" -#: library/multiprocessing.rst:642 +#: library/multiprocessing.rst:657 msgid "The initial value is inherited from the creating process." msgstr "" -#: library/multiprocessing.rst:644 +#: library/multiprocessing.rst:659 msgid "" "When a process exits, it attempts to terminate all of its daemonic child " "processes." msgstr "" -#: library/multiprocessing.rst:647 +#: library/multiprocessing.rst:662 msgid "" "Note that a daemonic process is not allowed to create child processes. " "Otherwise a daemonic process would leave its children orphaned if it gets " @@ -919,92 +939,92 @@ msgid "" "(and not joined) if non-daemonic processes have exited." msgstr "" -#: library/multiprocessing.rst:653 +#: library/multiprocessing.rst:668 msgid "" "In addition to the :class:`threading.Thread` API, :class:`Process` objects " "also support the following attributes and methods:" msgstr "" -#: library/multiprocessing.rst:658 +#: library/multiprocessing.rst:673 msgid "" "Return the process ID. Before the process is spawned, this will be ``None``." msgstr "" -#: library/multiprocessing.rst:663 +#: library/multiprocessing.rst:678 msgid "" "The child's exit code. This will be ``None`` if the process has not yet " "terminated." msgstr "" -#: library/multiprocessing.rst:666 +#: library/multiprocessing.rst:681 msgid "" "If the child's :meth:`run` method returned normally, the exit code will be " "0. If it terminated via :func:`sys.exit` with an integer argument *N*, the " "exit code will be *N*." msgstr "" -#: library/multiprocessing.rst:670 +#: library/multiprocessing.rst:685 msgid "" "If the child terminated due to an exception not caught within :meth:`run`, " "the exit code will be 1. If it was terminated by signal *N*, the exit code " "will be the negative value *-N*." msgstr "" -#: library/multiprocessing.rst:676 +#: library/multiprocessing.rst:691 msgid "The process's authentication key (a byte string)." msgstr "" -#: library/multiprocessing.rst:678 +#: library/multiprocessing.rst:693 msgid "" "When :mod:`multiprocessing` is initialized the main process is assigned a " "random string using :func:`os.urandom`." msgstr "" -#: library/multiprocessing.rst:681 +#: library/multiprocessing.rst:696 msgid "" "When a :class:`Process` object is created, it will inherit the " "authentication key of its parent process, although this may be changed by " "setting :attr:`authkey` to another byte string." msgstr "" -#: library/multiprocessing.rst:685 +#: library/multiprocessing.rst:700 msgid "See :ref:`multiprocessing-auth-keys`." msgstr "" -#: library/multiprocessing.rst:689 +#: library/multiprocessing.rst:704 msgid "" "A numeric handle of a system object which will become \"ready\" when the " "process ends." msgstr "" -#: library/multiprocessing.rst:692 +#: library/multiprocessing.rst:707 msgid "" "You can use this value if you want to wait on several events at once using :" "func:`multiprocessing.connection.wait`. Otherwise calling :meth:`join` is " "simpler." msgstr "" -#: library/multiprocessing.rst:696 +#: library/multiprocessing.rst:711 msgid "" "On Windows, this is an OS handle usable with the ``WaitForSingleObject`` and " "``WaitForMultipleObjects`` family of API calls. On POSIX, this is a file " "descriptor usable with primitives from the :mod:`select` module." msgstr "" -#: library/multiprocessing.rst:704 +#: library/multiprocessing.rst:719 msgid "" "Terminate the process. On POSIX this is done using the :py:const:`~signal." "SIGTERM` signal; on Windows :c:func:`!TerminateProcess` is used. Note that " "exit handlers and finally clauses, etc., will not be executed." msgstr "" -#: library/multiprocessing.rst:708 +#: library/multiprocessing.rst:723 msgid "" "Note that descendant processes of the process will *not* be terminated -- " "they will simply become orphaned." msgstr "" -#: library/multiprocessing.rst:713 +#: library/multiprocessing.rst:728 msgid "" "If this method is used when the associated process is using a pipe or queue " "then the pipe or queue is liable to become corrupted and may become unusable " @@ -1013,11 +1033,11 @@ msgid "" "deadlock." msgstr "" -#: library/multiprocessing.rst:721 +#: library/multiprocessing.rst:736 msgid "Same as :meth:`terminate` but using the ``SIGKILL`` signal on POSIX." msgstr "" -#: library/multiprocessing.rst:727 +#: library/multiprocessing.rst:742 msgid "" "Close the :class:`Process` object, releasing all resources associated with " "it. :exc:`ValueError` is raised if the underlying process is still " @@ -1025,18 +1045,18 @@ msgid "" "attributes of the :class:`Process` object will raise :exc:`ValueError`." msgstr "" -#: library/multiprocessing.rst:735 +#: library/multiprocessing.rst:750 msgid "" "Note that the :meth:`start`, :meth:`join`, :meth:`is_alive`, :meth:" "`terminate` and :attr:`exitcode` methods should only be called by the " "process that created the process object." msgstr "" -#: library/multiprocessing.rst:739 +#: library/multiprocessing.rst:754 msgid "Example usage of some of the methods of :class:`Process`:" msgstr "" -#: library/multiprocessing.rst:741 +#: library/multiprocessing.rst:756 msgid "" ">>> import multiprocessing, time, signal\n" ">>> mp_context = multiprocessing.get_context('spawn')\n" @@ -1054,48 +1074,48 @@ msgid "" "True" msgstr "" -#: library/multiprocessing.rst:760 +#: library/multiprocessing.rst:775 msgid "The base class of all :mod:`multiprocessing` exceptions." msgstr "" -#: library/multiprocessing.rst:764 +#: library/multiprocessing.rst:779 msgid "" "Exception raised by :meth:`Connection.recv_bytes_into` when the supplied " "buffer object is too small for the message read." msgstr "" -#: library/multiprocessing.rst:767 +#: library/multiprocessing.rst:782 msgid "" "If ``e`` is an instance of :exc:`BufferTooShort` then ``e.args[0]`` will " "give the message as a byte string." msgstr "" -#: library/multiprocessing.rst:772 +#: library/multiprocessing.rst:787 msgid "Raised when there is an authentication error." msgstr "" -#: library/multiprocessing.rst:776 +#: library/multiprocessing.rst:791 msgid "Raised by methods with a timeout when the timeout expires." msgstr "" -#: library/multiprocessing.rst:779 +#: library/multiprocessing.rst:794 msgid "Pipes and Queues" msgstr "" -#: library/multiprocessing.rst:781 +#: library/multiprocessing.rst:796 msgid "" "When using multiple processes, one generally uses message passing for " "communication between processes and avoids having to use any synchronization " "primitives like locks." msgstr "" -#: library/multiprocessing.rst:785 +#: library/multiprocessing.rst:800 msgid "" "For passing messages one can use :func:`Pipe` (for a connection between two " "processes) or a queue (which allows multiple producers and consumers)." msgstr "" -#: library/multiprocessing.rst:788 +#: library/multiprocessing.rst:803 msgid "" "The :class:`Queue`, :class:`SimpleQueue` and :class:`JoinableQueue` types " "are multi-producer, multi-consumer :abbr:`FIFO (first-in, first-out)` queues " @@ -1105,7 +1125,7 @@ msgid "" "Queue` class." msgstr "" -#: library/multiprocessing.rst:795 +#: library/multiprocessing.rst:810 msgid "" "If you use :class:`JoinableQueue` then you **must** call :meth:" "`JoinableQueue.task_done` for each task removed from the queue or else the " @@ -1113,7 +1133,7 @@ msgid "" "overflow, raising an exception." msgstr "" -#: library/multiprocessing.rst:800 +#: library/multiprocessing.rst:815 msgid "" "One difference from other Python queue implementations, is that :mod:" "`multiprocessing` queues serializes all objects that are put into them " @@ -1121,20 +1141,20 @@ msgid "" "object that does not share memory with the original object." msgstr "" -#: library/multiprocessing.rst:805 +#: library/multiprocessing.rst:820 msgid "" "Note that one can also create a shared queue by using a manager object -- " "see :ref:`multiprocessing-managers`." msgstr "" -#: library/multiprocessing.rst:810 +#: library/multiprocessing.rst:825 msgid "" ":mod:`multiprocessing` uses the usual :exc:`queue.Empty` and :exc:`queue." "Full` exceptions to signal a timeout. They are not available in the :mod:" "`multiprocessing` namespace so you need to import them from :mod:`queue`." msgstr "" -#: library/multiprocessing.rst:817 +#: library/multiprocessing.rst:832 msgid "" "When an object is put on a queue, the object is pickled and a background " "thread later flushes the pickled data to an underlying pipe. This has some " @@ -1143,14 +1163,14 @@ msgid "" "a queue created with a :ref:`manager `." msgstr "" -#: library/multiprocessing.rst:824 +#: library/multiprocessing.rst:839 msgid "" "After putting an object on an empty queue there may be an infinitesimal " "delay before the queue's :meth:`~Queue.empty` method returns :const:`False` " "and :meth:`~Queue.get_nowait` can return without raising :exc:`queue.Empty`." msgstr "" -#: library/multiprocessing.rst:829 +#: library/multiprocessing.rst:844 msgid "" "If multiple processes are enqueuing objects, it is possible for the objects " "to be received at the other end out-of-order. However, objects enqueued by " @@ -1158,7 +1178,7 @@ msgid "" "other." msgstr "" -#: library/multiprocessing.rst:836 +#: library/multiprocessing.rst:851 msgid "" "If a process is killed using :meth:`Process.terminate` or :func:`os.kill` " "while it is trying to use a :class:`Queue`, then the data in the queue is " @@ -1166,7 +1186,7 @@ msgid "" "exception when it tries to use the queue later on." msgstr "" -#: library/multiprocessing.rst:843 +#: library/multiprocessing.rst:858 msgid "" "As mentioned above, if a child process has put items on a queue (and it has " "not used :meth:`JoinableQueue.cancel_join_thread ` flag or :envvar:`PYTHON_CPU_COUNT` as this is merely a wrapper around " "the :mod:`os` cpu count APIs." msgstr "" -#: library/multiprocessing.rst:1084 +#: library/multiprocessing.rst:1109 msgid "" "Return the :class:`Process` object corresponding to the current process." msgstr "" -#: library/multiprocessing.rst:1086 +#: library/multiprocessing.rst:1111 msgid "An analogue of :func:`threading.current_thread`." msgstr "" -#: library/multiprocessing.rst:1090 +#: library/multiprocessing.rst:1115 msgid "" "Return the :class:`Process` object corresponding to the parent process of " "the :func:`current_process`. For the main process, ``parent_process`` will " "be ``None``." msgstr "" -#: library/multiprocessing.rst:1098 +#: library/multiprocessing.rst:1123 msgid "" "Add support for when a program which uses :mod:`multiprocessing` has been " "frozen to produce an executable. (Has been tested with **py2exe**, " "**PyInstaller** and **cx_Freeze**.)" msgstr "" -#: library/multiprocessing.rst:1102 +#: library/multiprocessing.rst:1127 msgid "" "One needs to call this function straight after the ``if __name__ == " "'__main__'`` line of the main module. For example::" msgstr "" -#: library/multiprocessing.rst:1105 +#: library/multiprocessing.rst:1130 msgid "" "from multiprocessing import Process, freeze_support\n" "\n" @@ -1518,13 +1549,13 @@ msgid "" " Process(target=f).start()" msgstr "" -#: library/multiprocessing.rst:1114 +#: library/multiprocessing.rst:1139 msgid "" "If the ``freeze_support()`` line is omitted then trying to run the frozen " "executable will raise :exc:`RuntimeError`." msgstr "" -#: library/multiprocessing.rst:1117 +#: library/multiprocessing.rst:1142 msgid "" "Calling ``freeze_support()`` has no effect when the start method is not " "*spawn*. In addition, if the module is being run normally by the Python " @@ -1532,7 +1563,7 @@ msgid "" "no effect." msgstr "" -#: library/multiprocessing.rst:1124 +#: library/multiprocessing.rst:1149 msgid "" "Returns a list of the supported start methods, the first of which is the " "default. The possible start methods are ``'fork'``, ``'spawn'`` and " @@ -1540,70 +1571,70 @@ msgid "" "`multiprocessing-start-methods`." msgstr "" -#: library/multiprocessing.rst:1133 +#: library/multiprocessing.rst:1158 msgid "" "Return a context object which has the same attributes as the :mod:" "`multiprocessing` module." msgstr "" -#: library/multiprocessing.rst:1136 +#: library/multiprocessing.rst:1161 msgid "" "If *method* is ``None`` then the default context is returned. Note that if " -"the global start method has not been set, this will set it to the default " -"method. Otherwise *method* should be ``'fork'``, ``'spawn'``, " -"``'forkserver'``. :exc:`ValueError` is raised if the specified start method " -"is not available. See :ref:`multiprocessing-start-methods`." +"the global start method has not been set, this will set it to the system " +"default See :ref:`global-start-method` for more details. Otherwise *method* " +"should be ``'fork'``, ``'spawn'``, ``'forkserver'``. :exc:`ValueError` is " +"raised if the specified start method is not available. See :ref:" +"`multiprocessing-start-methods`." msgstr "" -#: library/multiprocessing.rst:1147 +#: library/multiprocessing.rst:1172 msgid "Return the name of start method used for starting processes." msgstr "" -#: library/multiprocessing.rst:1149 +#: library/multiprocessing.rst:1174 msgid "" -"If the global start method has not been set and *allow_none* is ``False``, " -"then the start method is set to the default and the name is returned. If the " -"start method has not been set and *allow_none* is ``True`` then ``None`` is " -"returned." +"If the global start method is not set and *allow_none* is ``False``, the " +"global start method is set to the default, and its name is returned. See :" +"ref:`global-start-method` for more details." msgstr "" -#: library/multiprocessing.rst:1154 +#: library/multiprocessing.rst:1178 msgid "" "The return value can be ``'fork'``, ``'spawn'``, ``'forkserver'`` or " "``None``. See :ref:`multiprocessing-start-methods`." msgstr "" -#: library/multiprocessing.rst:1161 +#: library/multiprocessing.rst:1185 msgid "" "On macOS, the *spawn* start method is now the default. The *fork* start " "method should be considered unsafe as it can lead to crashes of the " "subprocess. See :issue:`33725`." msgstr "" -#: library/multiprocessing.rst:1167 +#: library/multiprocessing.rst:1191 msgid "" "Set the path of the Python interpreter to use when starting a child process. " "(By default :data:`sys.executable` is used). Embedders will probably need " -"to do some thing like ::" +"to do something like ::" msgstr "" -#: library/multiprocessing.rst:1171 +#: library/multiprocessing.rst:1195 msgid "set_executable(os.path.join(sys.exec_prefix, 'pythonw.exe'))" msgstr "" -#: library/multiprocessing.rst:1173 +#: library/multiprocessing.rst:1197 msgid "before they can create child processes." msgstr "" -#: library/multiprocessing.rst:1175 +#: library/multiprocessing.rst:1199 msgid "Now supported on POSIX when the ``'spawn'`` start method is used." msgstr "" -#: library/multiprocessing.rst:1178 +#: library/multiprocessing.rst:1202 msgid "Accepts a :term:`path-like object`." msgstr "" -#: library/multiprocessing.rst:1183 +#: library/multiprocessing.rst:1207 msgid "" "Set a list of module names for the forkserver main process to attempt to " "import so that their already imported state is inherited by forked " @@ -1612,19 +1643,19 @@ msgid "" "process." msgstr "" -#: library/multiprocessing.rst:1189 +#: library/multiprocessing.rst:1213 msgid "" "For this to work, it must be called before the forkserver process has been " "launched (before creating a :class:`Pool` or starting a :class:`Process`)." msgstr "" -#: library/multiprocessing.rst:1192 +#: library/multiprocessing.rst:1216 msgid "" "Only meaningful when using the ``'forkserver'`` start method. See :ref:" "`multiprocessing-start-methods`." msgstr "" -#: library/multiprocessing.rst:1199 +#: library/multiprocessing.rst:1223 msgid "" "Set the method which should be used to start child processes. The *method* " "argument can be ``'fork'``, ``'spawn'`` or ``'forkserver'``. Raises :exc:" @@ -1634,17 +1665,17 @@ msgid "" "then the context is set to the default context." msgstr "" -#: library/multiprocessing.rst:1206 +#: library/multiprocessing.rst:1230 msgid "" "Note that this should be called at most once, and it should be protected " "inside the ``if __name__ == '__main__'`` clause of the main module." msgstr "" -#: library/multiprocessing.rst:1210 +#: library/multiprocessing.rst:1234 msgid "See :ref:`multiprocessing-start-methods`." msgstr "" -#: library/multiprocessing.rst:1216 +#: library/multiprocessing.rst:1240 msgid "" ":mod:`multiprocessing` contains no analogues of :func:`threading." "active_count`, :func:`threading.enumerate`, :func:`threading.settrace`, :" @@ -1652,83 +1683,83 @@ msgid "" "local`." msgstr "" -#: library/multiprocessing.rst:1223 +#: library/multiprocessing.rst:1247 msgid "Connection Objects" msgstr "" -#: library/multiprocessing.rst:1227 +#: library/multiprocessing.rst:1251 msgid "" "Connection objects allow the sending and receiving of picklable objects or " "strings. They can be thought of as message oriented connected sockets." msgstr "" -#: library/multiprocessing.rst:1230 +#: library/multiprocessing.rst:1254 msgid "" "Connection objects are usually created using :func:`Pipe ` -- see also :ref:`multiprocessing-listeners-clients`." msgstr "" -#: library/multiprocessing.rst:1238 +#: library/multiprocessing.rst:1262 msgid "" "Send an object to the other end of the connection which should be read " "using :meth:`recv`." msgstr "" -#: library/multiprocessing.rst:1241 +#: library/multiprocessing.rst:1265 msgid "" "The object must be picklable. Very large pickles (approximately 32 MiB+, " "though it depends on the OS) may raise a :exc:`ValueError` exception." msgstr "" -#: library/multiprocessing.rst:1246 +#: library/multiprocessing.rst:1270 msgid "" "Return an object sent from the other end of the connection using :meth:" "`send`. Blocks until there is something to receive. Raises :exc:`EOFError` " "if there is nothing left to receive and the other end was closed." msgstr "" -#: library/multiprocessing.rst:1253 +#: library/multiprocessing.rst:1277 msgid "Return the file descriptor or handle used by the connection." msgstr "" -#: library/multiprocessing.rst:1257 +#: library/multiprocessing.rst:1281 msgid "Close the connection." msgstr "" -#: library/multiprocessing.rst:1259 +#: library/multiprocessing.rst:1283 msgid "This is called automatically when the connection is garbage collected." msgstr "" -#: library/multiprocessing.rst:1263 +#: library/multiprocessing.rst:1287 msgid "Return whether there is any data available to be read." msgstr "" -#: library/multiprocessing.rst:1265 +#: library/multiprocessing.rst:1289 msgid "" "If *timeout* is not specified then it will return immediately. If *timeout* " "is a number then this specifies the maximum time in seconds to block. If " "*timeout* is ``None`` then an infinite timeout is used." msgstr "" -#: library/multiprocessing.rst:1269 +#: library/multiprocessing.rst:1293 msgid "" "Note that multiple connection objects may be polled at once by using :func:" "`multiprocessing.connection.wait`." msgstr "" -#: library/multiprocessing.rst:1274 +#: library/multiprocessing.rst:1298 msgid "Send byte data from a :term:`bytes-like object` as a complete message." msgstr "" -#: library/multiprocessing.rst:1276 +#: library/multiprocessing.rst:1300 msgid "" -"If *offset* is given then data is read from that position in *buffer*. If " -"*size* is given then that many bytes will be read from buffer. Very large " +"If *offset* is given then data is read from that position in *buf*. If " +"*size* is given then that many bytes will be read from *buf*. Very large " "buffers (approximately 32 MiB+, though it depends on the OS) may raise a :" "exc:`ValueError` exception" msgstr "" -#: library/multiprocessing.rst:1283 +#: library/multiprocessing.rst:1307 msgid "" "Return a complete message of byte data sent from the other end of the " "connection as a string. Blocks until there is something to receive. Raises :" @@ -1736,58 +1767,58 @@ msgid "" "closed." msgstr "" -#: library/multiprocessing.rst:1288 +#: library/multiprocessing.rst:1312 msgid "" "If *maxlength* is specified and the message is longer than *maxlength* then :" "exc:`OSError` is raised and the connection will no longer be readable." msgstr "" -#: library/multiprocessing.rst:1292 +#: library/multiprocessing.rst:1316 msgid "" "This function used to raise :exc:`IOError`, which is now an alias of :exc:" "`OSError`." msgstr "" -#: library/multiprocessing.rst:1299 +#: library/multiprocessing.rst:1323 msgid "" -"Read into *buffer* a complete message of byte data sent from the other end " -"of the connection and return the number of bytes in the message. Blocks " -"until there is something to receive. Raises :exc:`EOFError` if there is " -"nothing left to receive and the other end was closed." +"Read into *buf* a complete message of byte data sent from the other end of " +"the connection and return the number of bytes in the message. Blocks until " +"there is something to receive. Raises :exc:`EOFError` if there is nothing " +"left to receive and the other end was closed." msgstr "" -#: library/multiprocessing.rst:1305 +#: library/multiprocessing.rst:1329 msgid "" -"*buffer* must be a writable :term:`bytes-like object`. If *offset* is given " +"*buf* must be a writable :term:`bytes-like object`. If *offset* is given " "then the message will be written into the buffer from that position. Offset " -"must be a non-negative integer less than the length of *buffer* (in bytes)." +"must be a non-negative integer less than the length of *buf* (in bytes)." msgstr "" -#: library/multiprocessing.rst:1310 +#: library/multiprocessing.rst:1334 msgid "" "If the buffer is too short then a :exc:`BufferTooShort` exception is raised " "and the complete message is available as ``e.args[0]`` where ``e`` is the " "exception instance." msgstr "" -#: library/multiprocessing.rst:1314 +#: library/multiprocessing.rst:1338 msgid "" "Connection objects themselves can now be transferred between processes " "using :meth:`Connection.send` and :meth:`Connection.recv`." msgstr "" -#: library/multiprocessing.rst:1318 +#: library/multiprocessing.rst:1342 msgid "" "Connection objects also now support the context management protocol -- see :" "ref:`typecontextmanager`. :meth:`~contextmanager.__enter__` returns the " "connection object, and :meth:`~contextmanager.__exit__` calls :meth:`close`." msgstr "" -#: library/multiprocessing.rst:1322 +#: library/multiprocessing.rst:1346 msgid "For example:" msgstr "" -#: library/multiprocessing.rst:1324 +#: library/multiprocessing.rst:1348 msgid "" ">>> from multiprocessing import Pipe\n" ">>> a, b = Pipe()\n" @@ -1807,14 +1838,14 @@ msgid "" "array('i', [0, 1, 2, 3, 4, 0, 0, 0, 0, 0])" msgstr "" -#: library/multiprocessing.rst:1347 +#: library/multiprocessing.rst:1371 msgid "" "The :meth:`Connection.recv` method automatically unpickles the data it " "receives, which can be a security risk unless you can trust the process " "which sent the message." msgstr "" -#: library/multiprocessing.rst:1351 +#: library/multiprocessing.rst:1375 msgid "" "Therefore, unless the connection object was produced using :func:`Pipe` you " "should only use the :meth:`~Connection.recv` and :meth:`~Connection.send` " @@ -1822,71 +1853,71 @@ msgid "" "`multiprocessing-auth-keys`." msgstr "" -#: library/multiprocessing.rst:1358 +#: library/multiprocessing.rst:1382 msgid "" "If a process is killed while it is trying to read or write to a pipe then " "the data in the pipe is likely to become corrupted, because it may become " "impossible to be sure where the message boundaries lie." msgstr "" -#: library/multiprocessing.rst:1364 +#: library/multiprocessing.rst:1388 msgid "Synchronization primitives" msgstr "" -#: library/multiprocessing.rst:1368 +#: library/multiprocessing.rst:1392 msgid "" "Generally synchronization primitives are not as necessary in a multiprocess " "program as they are in a multithreaded program. See the documentation for :" "mod:`threading` module." msgstr "" -#: library/multiprocessing.rst:1372 +#: library/multiprocessing.rst:1396 msgid "" "Note that one can also create synchronization primitives by using a manager " "object -- see :ref:`multiprocessing-managers`." msgstr "" -#: library/multiprocessing.rst:1377 +#: library/multiprocessing.rst:1401 msgid "A barrier object: a clone of :class:`threading.Barrier`." msgstr "" -#: library/multiprocessing.rst:1383 +#: library/multiprocessing.rst:1410 msgid "" "A bounded semaphore object: a close analog of :class:`threading." "BoundedSemaphore`." msgstr "" -#: library/multiprocessing.rst:1386 library/multiprocessing.rst:1524 +#: library/multiprocessing.rst:1416 library/multiprocessing.rst:1568 msgid "" "A solitary difference from its close analog exists: its ``acquire`` method's " "first argument is named *block*, as is consistent with :meth:`Lock.acquire`." msgstr "" -#: library/multiprocessing.rst:1390 +#: library/multiprocessing.rst:1420 msgid "" "On macOS, this is indistinguishable from :class:`Semaphore` because " "``sem_getvalue()`` is not implemented on that platform." msgstr "" -#: library/multiprocessing.rst:1395 +#: library/multiprocessing.rst:1425 msgid "A condition variable: an alias for :class:`threading.Condition`." msgstr "" -#: library/multiprocessing.rst:1397 +#: library/multiprocessing.rst:1427 msgid "" "If *lock* is specified then it should be a :class:`Lock` or :class:`RLock` " "object from :mod:`multiprocessing`." msgstr "" -#: library/multiprocessing.rst:1400 library/multiprocessing.rst:1938 +#: library/multiprocessing.rst:1433 library/multiprocessing.rst:2001 msgid "The :meth:`~threading.Condition.wait_for` method was added." msgstr "" -#: library/multiprocessing.rst:1405 +#: library/multiprocessing.rst:1438 msgid "A clone of :class:`threading.Event`." msgstr "" -#: library/multiprocessing.rst:1410 +#: library/multiprocessing.rst:1445 msgid "" "A non-recursive lock object: a close analog of :class:`threading.Lock`. Once " "a process or thread has acquired a lock, subsequent attempts to acquire it " @@ -1897,24 +1928,24 @@ msgid "" "as noted." msgstr "" -#: library/multiprocessing.rst:1418 +#: library/multiprocessing.rst:1453 msgid "" "Note that :class:`Lock` is actually a factory function which returns an " "instance of ``multiprocessing.synchronize.Lock`` initialized with a default " "context." msgstr "" -#: library/multiprocessing.rst:1422 +#: library/multiprocessing.rst:1460 msgid "" ":class:`Lock` supports the :term:`context manager` protocol and thus may be " "used in :keyword:`with` statements." msgstr "" -#: library/multiprocessing.rst:1427 library/multiprocessing.rst:1478 +#: library/multiprocessing.rst:1465 library/multiprocessing.rst:1519 msgid "Acquire a lock, blocking or non-blocking." msgstr "" -#: library/multiprocessing.rst:1429 +#: library/multiprocessing.rst:1467 msgid "" "With the *block* argument set to ``True`` (the default), the method call " "will block until the lock is in an unlocked state, then set it to locked and " @@ -1922,14 +1953,14 @@ msgid "" "that in :meth:`threading.Lock.acquire`." msgstr "" -#: library/multiprocessing.rst:1434 +#: library/multiprocessing.rst:1472 msgid "" "With the *block* argument set to ``False``, the method call does not block. " "If the lock is currently in a locked state, return ``False``; otherwise set " "the lock to a locked state and return ``True``." msgstr "" -#: library/multiprocessing.rst:1438 +#: library/multiprocessing.rst:1476 msgid "" "When invoked with a positive, floating-point value for *timeout*, block for " "at most the number of seconds specified by *timeout* as long as the lock can " @@ -1943,19 +1974,19 @@ msgid "" "acquired or ``False`` if the timeout period has elapsed." msgstr "" -#: library/multiprocessing.rst:1453 +#: library/multiprocessing.rst:1491 msgid "" "Release a lock. This can be called from any process or thread, not only the " "process or thread which originally acquired the lock." msgstr "" -#: library/multiprocessing.rst:1456 +#: library/multiprocessing.rst:1494 msgid "" "Behavior is the same as in :meth:`threading.Lock.release` except that when " "invoked on an unlocked lock, a :exc:`ValueError` is raised." msgstr "" -#: library/multiprocessing.rst:1462 +#: library/multiprocessing.rst:1500 msgid "" "A recursive lock object: a close analog of :class:`threading.RLock`. A " "recursive lock must be released by the process or thread that acquired it. " @@ -1964,20 +1995,20 @@ msgid "" "release it once for each time it has been acquired." msgstr "" -#: library/multiprocessing.rst:1468 +#: library/multiprocessing.rst:1506 msgid "" "Note that :class:`RLock` is actually a factory function which returns an " "instance of ``multiprocessing.synchronize.RLock`` initialized with a default " "context." msgstr "" -#: library/multiprocessing.rst:1472 +#: library/multiprocessing.rst:1513 msgid "" ":class:`RLock` supports the :term:`context manager` protocol and thus may be " "used in :keyword:`with` statements." msgstr "" -#: library/multiprocessing.rst:1480 +#: library/multiprocessing.rst:1521 msgid "" "When invoked with the *block* argument set to ``True``, block until the lock " "is in an unlocked state (not owned by any process or thread) unless the lock " @@ -1990,7 +2021,7 @@ msgid "" "itself." msgstr "" -#: library/multiprocessing.rst:1490 +#: library/multiprocessing.rst:1531 msgid "" "When invoked with the *block* argument set to ``False``, do not block. If " "the lock has already been acquired (and thus is owned) by another process or " @@ -2001,14 +2032,14 @@ msgid "" "a return value of ``True``." msgstr "" -#: library/multiprocessing.rst:1498 +#: library/multiprocessing.rst:1539 msgid "" "Use and behaviors of the *timeout* argument are the same as in :meth:`Lock." "acquire`. Note that some of these behaviors of *timeout* differ from the " "implemented behaviors in :meth:`threading.RLock.acquire`." msgstr "" -#: library/multiprocessing.rst:1505 +#: library/multiprocessing.rst:1546 msgid "" "Release a lock, decrementing the recursion level. If after the decrement " "the recursion level is zero, reset the lock to unlocked (not owned by any " @@ -2018,7 +2049,7 @@ msgid "" "locked and owned by the calling process or thread." msgstr "" -#: library/multiprocessing.rst:1513 +#: library/multiprocessing.rst:1554 msgid "" "Only call this method when the calling process or thread owns the lock. An :" "exc:`AssertionError` is raised if this method is called by a process or " @@ -2027,17 +2058,17 @@ msgid "" "from the implemented behavior in :meth:`threading.RLock.release`." msgstr "" -#: library/multiprocessing.rst:1522 +#: library/multiprocessing.rst:1563 msgid "A semaphore object: a close analog of :class:`threading.Semaphore`." msgstr "" -#: library/multiprocessing.rst:1529 +#: library/multiprocessing.rst:1573 msgid "" "On macOS, ``sem_timedwait`` is unsupported, so calling ``acquire()`` with a " "timeout will emulate that function's behavior using a sleeping loop." msgstr "" -#: library/multiprocessing.rst:1534 +#: library/multiprocessing.rst:1578 msgid "" "Some of this package's functionality requires a functioning shared semaphore " "implementation on the host operating system. Without one, the :mod:" @@ -2046,31 +2077,31 @@ msgid "" "additional information." msgstr "" -#: library/multiprocessing.rst:1542 +#: library/multiprocessing.rst:1586 msgid "Shared :mod:`ctypes` Objects" msgstr "" -#: library/multiprocessing.rst:1544 +#: library/multiprocessing.rst:1588 msgid "" "It is possible to create shared objects using shared memory which can be " "inherited by child processes." msgstr "" -#: library/multiprocessing.rst:1549 +#: library/multiprocessing.rst:1593 msgid "" "Return a :mod:`ctypes` object allocated from shared memory. By default the " "return value is actually a synchronized wrapper for the object. The object " "itself can be accessed via the *value* attribute of a :class:`Value`." msgstr "" -#: library/multiprocessing.rst:1553 library/multiprocessing.rst:1640 +#: library/multiprocessing.rst:1597 library/multiprocessing.rst:1690 msgid "" "*typecode_or_type* determines the type of the returned object: it is either " "a ctypes type or a one character typecode of the kind used by the :mod:" "`array` module. *\\*args* is passed on to the constructor for the type." msgstr "" -#: library/multiprocessing.rst:1557 +#: library/multiprocessing.rst:1601 msgid "" "If *lock* is ``True`` (the default) then a new recursive lock object is " "created to synchronize access to the value. If *lock* is a :class:`Lock` " @@ -2080,51 +2111,53 @@ msgid "" "\"process-safe\"." msgstr "" -#: library/multiprocessing.rst:1564 +#: library/multiprocessing.rst:1608 msgid "" "Operations like ``+=`` which involve a read and write are not atomic. So " "if, for instance, you want to atomically increment a shared value it is " "insufficient to just do ::" msgstr "" -#: library/multiprocessing.rst:1568 +#: library/multiprocessing.rst:1612 msgid "counter.value += 1" msgstr "" -#: library/multiprocessing.rst:1570 +#: library/multiprocessing.rst:1614 msgid "" "Assuming the associated lock is recursive (which it is by default) you can " "instead do ::" msgstr "" -#: library/multiprocessing.rst:1573 +#: library/multiprocessing.rst:1617 msgid "" "with counter.get_lock():\n" " counter.value += 1" msgstr "" -#: library/multiprocessing.rst:1576 library/multiprocessing.rst:1666 -#: library/multiprocessing.rst:1681 +#: library/multiprocessing.rst:1620 msgid "Note that *lock* is a keyword-only argument." msgstr "" -#: library/multiprocessing.rst:1580 +#: library/multiprocessing.rst:1624 msgid "" "Return a ctypes array allocated from shared memory. By default the return " "value is actually a synchronized wrapper for the array." msgstr "" -#: library/multiprocessing.rst:1583 +#: library/multiprocessing.rst:1627 msgid "" "*typecode_or_type* determines the type of the elements of the returned " -"array: it is either a ctypes type or a one character typecode of the kind " -"used by the :mod:`array` module. If *size_or_initializer* is an integer, " -"then it determines the length of the array, and the array will be initially " -"zeroed. Otherwise, *size_or_initializer* is a sequence which is used to " -"initialize the array and whose length determines the length of the array." +"array: it is either a :ref:`ctypes type ` or " +"a one character typecode of the kind used by the :mod:`array` module with " +"the exception of ``'w'``, which is not supported. In addition, the ``'c'`` " +"typecode is an alias for :class:`ctypes.c_char`. If *size_or_initializer* " +"is an integer, then it determines the length of the array, and the array " +"will be initially zeroed. Otherwise, *size_or_initializer* is a sequence " +"which is used to initialize the array and whose length determines the length " +"of the array." msgstr "" -#: library/multiprocessing.rst:1590 +#: library/multiprocessing.rst:1637 msgid "" "If *lock* is ``True`` (the default) then a new lock object is created to " "synchronize access to the value. If *lock* is a :class:`Lock` or :class:" @@ -2134,28 +2167,31 @@ msgid "" "safe\"." msgstr "" -#: library/multiprocessing.rst:1597 +#: library/multiprocessing.rst:1644 msgid "Note that *lock* is a keyword only argument." msgstr "" -#: library/multiprocessing.rst:1599 +#: library/multiprocessing.rst:1646 msgid "" "Note that an array of :data:`ctypes.c_char` has *value* and *raw* attributes " -"which allow one to use it to store and retrieve strings." +"which can both be used to store and retrieve byte strings. While *raw* " +"allows interaction with a :class:`bytes` object the full size of the array, " +"reading *value* will terminate after a null byte, like most programming " +"languages handle strings." msgstr "" -#: library/multiprocessing.rst:1604 +#: library/multiprocessing.rst:1654 msgid "The :mod:`multiprocessing.sharedctypes` module" msgstr "" -#: library/multiprocessing.rst:1609 +#: library/multiprocessing.rst:1659 msgid "" "The :mod:`multiprocessing.sharedctypes` module provides functions for " "allocating :mod:`ctypes` objects from shared memory which can be inherited " "by child processes." msgstr "" -#: library/multiprocessing.rst:1615 +#: library/multiprocessing.rst:1665 msgid "" "Although it is possible to store a pointer in shared memory remember that " "this will refer to a location in the address space of a specific process. " @@ -2164,11 +2200,11 @@ msgid "" "may cause a crash." msgstr "" -#: library/multiprocessing.rst:1623 +#: library/multiprocessing.rst:1673 msgid "Return a ctypes array allocated from shared memory." msgstr "" -#: library/multiprocessing.rst:1625 +#: library/multiprocessing.rst:1675 msgid "" "*typecode_or_type* determines the type of the elements of the returned " "array: it is either a ctypes type or a one character typecode of the kind " @@ -2178,39 +2214,39 @@ msgid "" "initialize the array and whose length determines the length of the array." msgstr "" -#: library/multiprocessing.rst:1632 +#: library/multiprocessing.rst:1682 msgid "" "Note that setting and getting an element is potentially non-atomic -- use :" "func:`Array` instead to make sure that access is automatically synchronized " "using a lock." msgstr "" -#: library/multiprocessing.rst:1638 +#: library/multiprocessing.rst:1688 msgid "Return a ctypes object allocated from shared memory." msgstr "" -#: library/multiprocessing.rst:1644 +#: library/multiprocessing.rst:1694 msgid "" "Note that setting and getting the value is potentially non-atomic -- use :" "func:`Value` instead to make sure that access is automatically synchronized " "using a lock." msgstr "" -#: library/multiprocessing.rst:1648 +#: library/multiprocessing.rst:1698 msgid "" "Note that an array of :data:`ctypes.c_char` has ``value`` and ``raw`` " "attributes which allow one to use it to store and retrieve strings -- see " "documentation for :mod:`ctypes`." msgstr "" -#: library/multiprocessing.rst:1654 +#: library/multiprocessing.rst:1704 msgid "" "The same as :func:`RawArray` except that depending on the value of *lock* a " "process-safe synchronization wrapper may be returned instead of a raw ctypes " "array." msgstr "" -#: library/multiprocessing.rst:1658 library/multiprocessing.rst:1674 +#: library/multiprocessing.rst:1708 library/multiprocessing.rst:1728 msgid "" "If *lock* is ``True`` (the default) then a new lock object is created to " "synchronize access to the value. If *lock* is a :class:`~multiprocessing." @@ -2220,113 +2256,125 @@ msgid "" "not necessarily be \"process-safe\"." msgstr "" -#: library/multiprocessing.rst:1670 +#: library/multiprocessing.rst:1716 library/multiprocessing.rst:1735 +#: library/multiprocessing.rst:1752 library/multiprocessing.rst:1873 +msgid "" +"*ctx* is a context object, or ``None`` (use the current context). If " +"``None``, calling this may set the global start method. See :ref:`global-" +"start-method` for more details." +msgstr "" + +#: library/multiprocessing.rst:1720 library/multiprocessing.rst:1739 +msgid "Note that *lock* and *ctx* are keyword-only parameters." +msgstr "" + +#: library/multiprocessing.rst:1724 msgid "" "The same as :func:`RawValue` except that depending on the value of *lock* a " "process-safe synchronization wrapper may be returned instead of a raw ctypes " "object." msgstr "" -#: library/multiprocessing.rst:1685 +#: library/multiprocessing.rst:1743 msgid "" "Return a ctypes object allocated from shared memory which is a copy of the " "ctypes object *obj*." msgstr "" -#: library/multiprocessing.rst:1690 +#: library/multiprocessing.rst:1748 msgid "" "Return a process-safe wrapper object for a ctypes object which uses *lock* " "to synchronize access. If *lock* is ``None`` (the default) then a :class:" "`multiprocessing.RLock` object is created automatically." msgstr "" -#: library/multiprocessing.rst:1694 +#: library/multiprocessing.rst:1756 msgid "" "A synchronized wrapper will have two methods in addition to those of the " "object it wraps: :meth:`get_obj` returns the wrapped object and :meth:" "`get_lock` returns the lock object used for synchronization." msgstr "" -#: library/multiprocessing.rst:1698 +#: library/multiprocessing.rst:1760 msgid "" "Note that accessing the ctypes object through the wrapper can be a lot " "slower than accessing the raw ctypes object." msgstr "" -#: library/multiprocessing.rst:1701 +#: library/multiprocessing.rst:1763 msgid "Synchronized objects support the :term:`context manager` protocol." msgstr "" -#: library/multiprocessing.rst:1705 +#: library/multiprocessing.rst:1767 msgid "" "The table below compares the syntax for creating shared ctypes objects from " "shared memory with the normal ctypes syntax. (In the table ``MyStruct`` is " "some subclass of :class:`ctypes.Structure`.)" msgstr "" -#: library/multiprocessing.rst:1710 +#: library/multiprocessing.rst:1772 msgid "ctypes" msgstr "" -#: library/multiprocessing.rst:1710 +#: library/multiprocessing.rst:1772 msgid "sharedctypes using type" msgstr "" -#: library/multiprocessing.rst:1710 +#: library/multiprocessing.rst:1772 msgid "sharedctypes using typecode" msgstr "" -#: library/multiprocessing.rst:1712 +#: library/multiprocessing.rst:1774 msgid "c_double(2.4)" msgstr "" -#: library/multiprocessing.rst:1712 +#: library/multiprocessing.rst:1774 msgid "RawValue(c_double, 2.4)" msgstr "" -#: library/multiprocessing.rst:1712 +#: library/multiprocessing.rst:1774 msgid "RawValue('d', 2.4)" msgstr "" -#: library/multiprocessing.rst:1713 +#: library/multiprocessing.rst:1775 msgid "MyStruct(4, 6)" msgstr "" -#: library/multiprocessing.rst:1713 +#: library/multiprocessing.rst:1775 msgid "RawValue(MyStruct, 4, 6)" msgstr "" -#: library/multiprocessing.rst:1714 +#: library/multiprocessing.rst:1776 msgid "(c_short * 7)()" msgstr "" -#: library/multiprocessing.rst:1714 +#: library/multiprocessing.rst:1776 msgid "RawArray(c_short, 7)" msgstr "" -#: library/multiprocessing.rst:1714 +#: library/multiprocessing.rst:1776 msgid "RawArray('h', 7)" msgstr "" -#: library/multiprocessing.rst:1715 +#: library/multiprocessing.rst:1777 msgid "(c_int * 3)(9, 2, 8)" msgstr "" -#: library/multiprocessing.rst:1715 +#: library/multiprocessing.rst:1777 msgid "RawArray(c_int, (9, 2, 8))" msgstr "" -#: library/multiprocessing.rst:1715 +#: library/multiprocessing.rst:1777 msgid "RawArray('i', (9, 2, 8))" msgstr "" -#: library/multiprocessing.rst:1719 +#: library/multiprocessing.rst:1781 msgid "" "Below is an example where a number of ctypes objects are modified by a child " "process::" msgstr "" -#: library/multiprocessing.rst:1722 +#: library/multiprocessing.rst:1784 msgid "" "from multiprocessing import Process, Lock\n" "from multiprocessing.sharedctypes import Value, Array\n" @@ -2361,11 +2409,11 @@ msgid "" " print([(a.x, a.y) for a in A])" msgstr "" -#: library/multiprocessing.rst:1757 +#: library/multiprocessing.rst:1819 msgid "The results printed are ::" msgstr "" -#: library/multiprocessing.rst:1759 +#: library/multiprocessing.rst:1821 msgid "" "49\n" "0.1111111111111111\n" @@ -2373,11 +2421,11 @@ msgid "" "[(3.515625, 39.0625), (33.0625, 4.0), (5.640625, 90.25)]" msgstr "" -#: library/multiprocessing.rst:1770 +#: library/multiprocessing.rst:1832 msgid "Managers" msgstr "" -#: library/multiprocessing.rst:1772 +#: library/multiprocessing.rst:1834 msgid "" "Managers provide a way to create data which can be shared between different " "processes, including sharing over a network between processes running on " @@ -2386,7 +2434,7 @@ msgid "" "proxies." msgstr "" -#: library/multiprocessing.rst:1781 +#: library/multiprocessing.rst:1843 msgid "" "Returns a started :class:`~multiprocessing.managers.SyncManager` object " "which can be used for sharing objects between processes. The returned " @@ -2394,31 +2442,31 @@ msgid "" "will create shared objects and return corresponding proxies." msgstr "" -#: library/multiprocessing.rst:1789 +#: library/multiprocessing.rst:1851 msgid "" "Manager processes will be shutdown as soon as they are garbage collected or " "their parent process exits. The manager classes are defined in the :mod:" "`multiprocessing.managers` module:" msgstr "" -#: library/multiprocessing.rst:1795 +#: library/multiprocessing.rst:1857 msgid "Create a BaseManager object." msgstr "" -#: library/multiprocessing.rst:1797 +#: library/multiprocessing.rst:1859 msgid "" "Once created one should call :meth:`start` or ``get_server()." "serve_forever()`` to ensure that the manager object refers to a started " "manager process." msgstr "" -#: library/multiprocessing.rst:1800 +#: library/multiprocessing.rst:1862 msgid "" "*address* is the address on which the manager process listens for new " "connections. If *address* is ``None`` then an arbitrary one is chosen." msgstr "" -#: library/multiprocessing.rst:1803 +#: library/multiprocessing.rst:1865 msgid "" "*authkey* is the authentication key which will be used to check the validity " "of incoming connections to the server process. If *authkey* is ``None`` " @@ -2426,19 +2474,13 @@ msgid "" "it must be a byte string." msgstr "" -#: library/multiprocessing.rst:1808 +#: library/multiprocessing.rst:1870 msgid "" "*serializer* must be ``'pickle'`` (use :mod:`pickle` serialization) or " "``'xmlrpclib'`` (use :mod:`xmlrpc.client` serialization)." msgstr "" -#: library/multiprocessing.rst:1811 -msgid "" -"*ctx* is a context object, or ``None`` (use the current context). See the :" -"func:`get_context` function." -msgstr "" - -#: library/multiprocessing.rst:1814 +#: library/multiprocessing.rst:1877 msgid "" "*shutdown_timeout* is a timeout in seconds used to wait until the process " "used by the manager completes in the :meth:`shutdown` method. If the " @@ -2446,24 +2488,24 @@ msgid "" "also times out, the process is killed." msgstr "" -#: library/multiprocessing.rst:1819 +#: library/multiprocessing.rst:1882 msgid "Added the *shutdown_timeout* parameter." msgstr "" -#: library/multiprocessing.rst:1824 +#: library/multiprocessing.rst:1887 msgid "" "Start a subprocess to start the manager. If *initializer* is not ``None`` " "then the subprocess will call ``initializer(*initargs)`` when it starts." msgstr "" -#: library/multiprocessing.rst:1829 +#: library/multiprocessing.rst:1892 msgid "" "Returns a :class:`Server` object which represents the actual server under " "the control of the Manager. The :class:`Server` object supports the :meth:" "`serve_forever` method::" msgstr "" -#: library/multiprocessing.rst:1833 +#: library/multiprocessing.rst:1896 msgid "" ">>> from multiprocessing.managers import BaseManager\n" ">>> manager = BaseManager(address=('', 50000), authkey=b'abc')\n" @@ -2471,44 +2513,44 @@ msgid "" ">>> server.serve_forever()" msgstr "" -#: library/multiprocessing.rst:1838 +#: library/multiprocessing.rst:1901 msgid ":class:`Server` additionally has an :attr:`address` attribute." msgstr "" -#: library/multiprocessing.rst:1842 +#: library/multiprocessing.rst:1905 msgid "Connect a local manager object to a remote manager process::" msgstr "" -#: library/multiprocessing.rst:1844 +#: library/multiprocessing.rst:1907 msgid "" ">>> from multiprocessing.managers import BaseManager\n" ">>> m = BaseManager(address=('127.0.0.1', 50000), authkey=b'abc')\n" ">>> m.connect()" msgstr "" -#: library/multiprocessing.rst:1850 +#: library/multiprocessing.rst:1913 msgid "" "Stop the process used by the manager. This is only available if :meth:" "`start` has been used to start the server process." msgstr "" -#: library/multiprocessing.rst:1853 +#: library/multiprocessing.rst:1916 msgid "This can be called multiple times." msgstr "" -#: library/multiprocessing.rst:1857 +#: library/multiprocessing.rst:1920 msgid "" "A classmethod which can be used for registering a type or callable with the " "manager class." msgstr "" -#: library/multiprocessing.rst:1860 +#: library/multiprocessing.rst:1923 msgid "" "*typeid* is a \"type identifier\" which is used to identify a particular " "type of shared object. This must be a string." msgstr "" -#: library/multiprocessing.rst:1863 +#: library/multiprocessing.rst:1926 msgid "" "*callable* is a callable used for creating objects for this type " "identifier. If a manager instance will be connected to the server using " @@ -2516,14 +2558,14 @@ msgid "" "then this can be left as ``None``." msgstr "" -#: library/multiprocessing.rst:1869 +#: library/multiprocessing.rst:1932 msgid "" "*proxytype* is a subclass of :class:`BaseProxy` which is used to create " "proxies for shared objects with this *typeid*. If ``None`` then a proxy " "class is created automatically." msgstr "" -#: library/multiprocessing.rst:1873 +#: library/multiprocessing.rst:1936 msgid "" "*exposed* is used to specify a sequence of method names which proxies for " "this typeid should be allowed to access using :meth:`BaseProxy." @@ -2534,7 +2576,7 @@ msgid "" "method and whose name does not begin with ``'_'``.)" msgstr "" -#: library/multiprocessing.rst:1882 +#: library/multiprocessing.rst:1945 msgid "" "*method_to_typeid* is a mapping used to specify the return type of those " "exposed methods which should return a proxy. It maps method names to typeid " @@ -2544,22 +2586,22 @@ msgid "" "returned by the method will be copied by value." msgstr "" -#: library/multiprocessing.rst:1889 +#: library/multiprocessing.rst:1952 msgid "" "*create_method* determines whether a method should be created with name " "*typeid* which can be used to tell the server process to create a new shared " "object and return a proxy for it. By default it is ``True``." msgstr "" -#: library/multiprocessing.rst:1893 +#: library/multiprocessing.rst:1956 msgid ":class:`BaseManager` instances also have one read-only property:" msgstr "" -#: library/multiprocessing.rst:1897 +#: library/multiprocessing.rst:1960 msgid "The address used by the manager." msgstr "" -#: library/multiprocessing.rst:1899 +#: library/multiprocessing.rst:1962 msgid "" "Manager objects support the context management protocol -- see :ref:" "`typecontextmanager`. :meth:`~contextmanager.__enter__` starts the server " @@ -2567,121 +2609,121 @@ msgid "" "object. :meth:`~contextmanager.__exit__` calls :meth:`shutdown`." msgstr "" -#: library/multiprocessing.rst:1905 +#: library/multiprocessing.rst:1968 msgid "" "In previous versions :meth:`~contextmanager.__enter__` did not start the " "manager's server process if it was not already started." msgstr "" -#: library/multiprocessing.rst:1910 +#: library/multiprocessing.rst:1973 msgid "" "A subclass of :class:`BaseManager` which can be used for the synchronization " "of processes. Objects of this type are returned by :func:`multiprocessing." "Manager`." msgstr "" -#: library/multiprocessing.rst:1914 +#: library/multiprocessing.rst:1977 msgid "" "Its methods create and return :ref:`multiprocessing-proxy_objects` for a " "number of commonly used data types to be synchronized across processes. This " "notably includes shared lists and dictionaries." msgstr "" -#: library/multiprocessing.rst:1920 +#: library/multiprocessing.rst:1983 msgid "" "Create a shared :class:`threading.Barrier` object and return a proxy for it." msgstr "" -#: library/multiprocessing.rst:1927 +#: library/multiprocessing.rst:1990 msgid "" "Create a shared :class:`threading.BoundedSemaphore` object and return a " "proxy for it." msgstr "" -#: library/multiprocessing.rst:1932 +#: library/multiprocessing.rst:1995 msgid "" "Create a shared :class:`threading.Condition` object and return a proxy for " "it." msgstr "" -#: library/multiprocessing.rst:1935 +#: library/multiprocessing.rst:1998 msgid "" "If *lock* is supplied then it should be a proxy for a :class:`threading." "Lock` or :class:`threading.RLock` object." msgstr "" -#: library/multiprocessing.rst:1943 +#: library/multiprocessing.rst:2006 msgid "" "Create a shared :class:`threading.Event` object and return a proxy for it." msgstr "" -#: library/multiprocessing.rst:1947 +#: library/multiprocessing.rst:2010 msgid "" "Create a shared :class:`threading.Lock` object and return a proxy for it." msgstr "" -#: library/multiprocessing.rst:1951 +#: library/multiprocessing.rst:2014 msgid "Create a shared :class:`Namespace` object and return a proxy for it." msgstr "" -#: library/multiprocessing.rst:1955 +#: library/multiprocessing.rst:2018 msgid "Create a shared :class:`queue.Queue` object and return a proxy for it." msgstr "" -#: library/multiprocessing.rst:1959 +#: library/multiprocessing.rst:2022 msgid "" "Create a shared :class:`threading.RLock` object and return a proxy for it." msgstr "" -#: library/multiprocessing.rst:1963 +#: library/multiprocessing.rst:2026 msgid "" "Create a shared :class:`threading.Semaphore` object and return a proxy for " "it." msgstr "" -#: library/multiprocessing.rst:1968 +#: library/multiprocessing.rst:2031 msgid "Create an array and return a proxy for it." msgstr "" -#: library/multiprocessing.rst:1972 +#: library/multiprocessing.rst:2035 msgid "" "Create an object with a writable ``value`` attribute and return a proxy for " "it." msgstr "" -#: library/multiprocessing.rst:1979 +#: library/multiprocessing.rst:2042 msgid "Create a shared :class:`dict` object and return a proxy for it." msgstr "" -#: library/multiprocessing.rst:1984 +#: library/multiprocessing.rst:2047 msgid "Create a shared :class:`list` object and return a proxy for it." msgstr "" -#: library/multiprocessing.rst:1986 +#: library/multiprocessing.rst:2049 msgid "" "Shared objects are capable of being nested. For example, a shared container " "object such as a shared list can contain other shared objects which will all " "be managed and synchronized by the :class:`SyncManager`." msgstr "" -#: library/multiprocessing.rst:1993 +#: library/multiprocessing.rst:2056 msgid "A type that can register with :class:`SyncManager`." msgstr "" -#: library/multiprocessing.rst:1995 +#: library/multiprocessing.rst:2058 msgid "" "A namespace object has no public methods, but does have writable attributes. " "Its representation shows the values of its attributes." msgstr "" -#: library/multiprocessing.rst:1998 +#: library/multiprocessing.rst:2061 msgid "" "However, when using a proxy for a namespace object, an attribute beginning " "with ``'_'`` will be an attribute of the proxy and not an attribute of the " "referent:" msgstr "" -#: library/multiprocessing.rst:2002 +#: library/multiprocessing.rst:2065 msgid "" ">>> mp_context = multiprocessing.get_context('spawn')\n" ">>> manager = mp_context.Manager()\n" @@ -2693,18 +2735,18 @@ msgid "" "Namespace(x=10, y='hello')" msgstr "" -#: library/multiprocessing.rst:2015 +#: library/multiprocessing.rst:2078 msgid "Customized managers" msgstr "" -#: library/multiprocessing.rst:2017 +#: library/multiprocessing.rst:2080 msgid "" "To create one's own manager, one creates a subclass of :class:`BaseManager` " "and uses the :meth:`~BaseManager.register` classmethod to register new types " "or callables with the manager class. For example::" msgstr "" -#: library/multiprocessing.rst:2021 +#: library/multiprocessing.rst:2084 msgid "" "from multiprocessing.managers import BaseManager\n" "\n" @@ -2726,23 +2768,23 @@ msgid "" " print(maths.mul(7, 8)) # prints 56" msgstr "" -#: library/multiprocessing.rst:2042 +#: library/multiprocessing.rst:2105 msgid "Using a remote manager" msgstr "" -#: library/multiprocessing.rst:2044 +#: library/multiprocessing.rst:2107 msgid "" "It is possible to run a manager server on one machine and have clients use " "it from other machines (assuming that the firewalls involved allow it)." msgstr "" -#: library/multiprocessing.rst:2047 +#: library/multiprocessing.rst:2110 msgid "" "Running the following commands creates a server for a single shared queue " "which remote clients can access::" msgstr "" -#: library/multiprocessing.rst:2050 +#: library/multiprocessing.rst:2113 msgid "" ">>> from multiprocessing.managers import BaseManager\n" ">>> from queue import Queue\n" @@ -2754,11 +2796,11 @@ msgid "" ">>> s.serve_forever()" msgstr "" -#: library/multiprocessing.rst:2059 +#: library/multiprocessing.rst:2122 msgid "One client can access the server as follows::" msgstr "" -#: library/multiprocessing.rst:2061 +#: library/multiprocessing.rst:2124 msgid "" ">>> from multiprocessing.managers import BaseManager\n" ">>> class QueueManager(BaseManager): pass\n" @@ -2770,11 +2812,11 @@ msgid "" ">>> queue.put('hello')" msgstr "" -#: library/multiprocessing.rst:2069 +#: library/multiprocessing.rst:2132 msgid "Another client can also use it::" msgstr "" -#: library/multiprocessing.rst:2071 +#: library/multiprocessing.rst:2134 msgid "" ">>> from multiprocessing.managers import BaseManager\n" ">>> class QueueManager(BaseManager): pass\n" @@ -2787,13 +2829,13 @@ msgid "" "'hello'" msgstr "" -#: library/multiprocessing.rst:2080 +#: library/multiprocessing.rst:2143 msgid "" "Local processes can also access that queue, using the code from above on the " "client to access it remotely::" msgstr "" -#: library/multiprocessing.rst:2083 +#: library/multiprocessing.rst:2146 msgid "" ">>> from multiprocessing import Process, Queue\n" ">>> from multiprocessing.managers import BaseManager\n" @@ -2815,18 +2857,18 @@ msgid "" ">>> s.serve_forever()" msgstr "" -#: library/multiprocessing.rst:2105 +#: library/multiprocessing.rst:2168 msgid "Proxy Objects" msgstr "" -#: library/multiprocessing.rst:2107 +#: library/multiprocessing.rst:2170 msgid "" "A proxy is an object which *refers* to a shared object which lives " "(presumably) in a different process. The shared object is said to be the " "*referent* of the proxy. Multiple proxy objects may have the same referent." msgstr "" -#: library/multiprocessing.rst:2111 +#: library/multiprocessing.rst:2174 msgid "" "A proxy object has methods which invoke corresponding methods of its " "referent (although not every method of the referent will necessarily be " @@ -2834,7 +2876,7 @@ msgid "" "its referent can:" msgstr "" -#: library/multiprocessing.rst:2115 +#: library/multiprocessing.rst:2178 msgid "" ">>> mp_context = multiprocessing.get_context('spawn')\n" ">>> manager = mp_context.Manager()\n" @@ -2849,14 +2891,14 @@ msgid "" "[4, 9, 16]" msgstr "" -#: library/multiprocessing.rst:2129 +#: library/multiprocessing.rst:2192 msgid "" "Notice that applying :func:`str` to a proxy will return the representation " "of the referent, whereas applying :func:`repr` will return the " "representation of the proxy." msgstr "" -#: library/multiprocessing.rst:2133 +#: library/multiprocessing.rst:2196 msgid "" "An important feature of proxy objects is that they are picklable so they can " "be passed between processes. As such, a referent can contain :ref:" @@ -2864,7 +2906,7 @@ msgid "" "lists, dicts, and other :ref:`multiprocessing-proxy_objects`:" msgstr "" -#: library/multiprocessing.rst:2138 +#: library/multiprocessing.rst:2201 msgid "" ">>> a = manager.list()\n" ">>> b = manager.list()\n" @@ -2876,11 +2918,11 @@ msgid "" "['hello'] ['hello']" msgstr "" -#: library/multiprocessing.rst:2149 +#: library/multiprocessing.rst:2212 msgid "Similarly, dict and list proxies may be nested inside one another::" msgstr "" -#: library/multiprocessing.rst:2151 +#: library/multiprocessing.rst:2214 msgid "" ">>> l_outer = manager.list([ manager.dict() for i in range(2) ])\n" ">>> d_first_inner = l_outer[0]\n" @@ -2894,7 +2936,7 @@ msgid "" "{'c': 3, 'z': 26}" msgstr "" -#: library/multiprocessing.rst:2162 +#: library/multiprocessing.rst:2225 msgid "" "If standard (non-proxy) :class:`list` or :class:`dict` objects are contained " "in a referent, modifications to those mutable values will not be propagated " @@ -2905,7 +2947,7 @@ msgid "" "assign the modified value to the container proxy::" msgstr "" -#: library/multiprocessing.rst:2170 +#: library/multiprocessing.rst:2233 msgid "" "# create a list proxy and append a mutable object (a dictionary)\n" "lproxy = manager.list()\n" @@ -2919,67 +2961,67 @@ msgid "" "lproxy[0] = d" msgstr "" -#: library/multiprocessing.rst:2181 +#: library/multiprocessing.rst:2244 msgid "" "This approach is perhaps less convenient than employing nested :ref:" "`multiprocessing-proxy_objects` for most use cases but also demonstrates a " "level of control over the synchronization." msgstr "" -#: library/multiprocessing.rst:2187 +#: library/multiprocessing.rst:2250 msgid "" "The proxy types in :mod:`multiprocessing` do nothing to support comparisons " "by value. So, for instance, we have:" msgstr "" -#: library/multiprocessing.rst:2190 +#: library/multiprocessing.rst:2253 msgid "" ">>> manager.list([1,2,3]) == [1,2,3]\n" "False" msgstr "" -#: library/multiprocessing.rst:2195 +#: library/multiprocessing.rst:2258 msgid "" "One should just use a copy of the referent instead when making comparisons." msgstr "" -#: library/multiprocessing.rst:2199 +#: library/multiprocessing.rst:2262 msgid "Proxy objects are instances of subclasses of :class:`BaseProxy`." msgstr "" -#: library/multiprocessing.rst:2203 +#: library/multiprocessing.rst:2266 msgid "Call and return the result of a method of the proxy's referent." msgstr "" -#: library/multiprocessing.rst:2205 +#: library/multiprocessing.rst:2268 msgid "" "If ``proxy`` is a proxy whose referent is ``obj`` then the expression ::" msgstr "" -#: library/multiprocessing.rst:2207 +#: library/multiprocessing.rst:2270 msgid "proxy._callmethod(methodname, args, kwds)" msgstr "" -#: library/multiprocessing.rst:2209 +#: library/multiprocessing.rst:2272 msgid "will evaluate the expression ::" msgstr "" -#: library/multiprocessing.rst:2211 +#: library/multiprocessing.rst:2274 msgid "getattr(obj, methodname)(*args, **kwds)" msgstr "" -#: library/multiprocessing.rst:2213 +#: library/multiprocessing.rst:2276 msgid "in the manager's process." msgstr "" -#: library/multiprocessing.rst:2215 +#: library/multiprocessing.rst:2278 msgid "" "The returned value will be a copy of the result of the call or a proxy to a " "new shared object -- see documentation for the *method_to_typeid* argument " "of :meth:`BaseManager.register`." msgstr "" -#: library/multiprocessing.rst:2219 +#: library/multiprocessing.rst:2282 msgid "" "If an exception is raised by the call, then is re-raised by :meth:" "`_callmethod`. If some other exception is raised in the manager's process " @@ -2987,17 +3029,17 @@ msgid "" "meth:`_callmethod`." msgstr "" -#: library/multiprocessing.rst:2224 +#: library/multiprocessing.rst:2287 msgid "" "Note in particular that an exception will be raised if *methodname* has not " "been *exposed*." msgstr "" -#: library/multiprocessing.rst:2227 +#: library/multiprocessing.rst:2290 msgid "An example of the usage of :meth:`_callmethod`:" msgstr "" -#: library/multiprocessing.rst:2229 +#: library/multiprocessing.rst:2292 msgid "" ">>> l = manager.list(range(10))\n" ">>> l._callmethod('__len__')\n" @@ -3010,68 +3052,68 @@ msgid "" "IndexError: list index out of range" msgstr "" -#: library/multiprocessing.rst:2243 +#: library/multiprocessing.rst:2306 msgid "Return a copy of the referent." msgstr "" -#: library/multiprocessing.rst:2245 +#: library/multiprocessing.rst:2308 msgid "If the referent is unpicklable then this will raise an exception." msgstr "" -#: library/multiprocessing.rst:2249 +#: library/multiprocessing.rst:2312 msgid "Return a representation of the proxy object." msgstr "" -#: library/multiprocessing.rst:2253 +#: library/multiprocessing.rst:2316 msgid "Return the representation of the referent." msgstr "" -#: library/multiprocessing.rst:2257 +#: library/multiprocessing.rst:2320 msgid "Cleanup" msgstr "" -#: library/multiprocessing.rst:2259 +#: library/multiprocessing.rst:2322 msgid "" "A proxy object uses a weakref callback so that when it gets garbage " "collected it deregisters itself from the manager which owns its referent." msgstr "" -#: library/multiprocessing.rst:2262 +#: library/multiprocessing.rst:2325 msgid "" "A shared object gets deleted from the manager process when there are no " "longer any proxies referring to it." msgstr "" -#: library/multiprocessing.rst:2267 +#: library/multiprocessing.rst:2330 msgid "Process Pools" msgstr "" -#: library/multiprocessing.rst:2272 +#: library/multiprocessing.rst:2335 msgid "" "One can create a pool of processes which will carry out tasks submitted to " "it with the :class:`Pool` class." msgstr "" -#: library/multiprocessing.rst:2277 +#: library/multiprocessing.rst:2340 msgid "" "A process pool object which controls a pool of worker processes to which " "jobs can be submitted. It supports asynchronous results with timeouts and " "callbacks and has a parallel map implementation." msgstr "" -#: library/multiprocessing.rst:2281 +#: library/multiprocessing.rst:2344 msgid "" "*processes* is the number of worker processes to use. If *processes* is " "``None`` then the number returned by :func:`os.process_cpu_count` is used." msgstr "" -#: library/multiprocessing.rst:2284 library/multiprocessing.rst:2848 +#: library/multiprocessing.rst:2347 library/multiprocessing.rst:2923 msgid "" "If *initializer* is not ``None`` then each worker process will call " "``initializer(*initargs)`` when it starts." msgstr "" -#: library/multiprocessing.rst:2287 +#: library/multiprocessing.rst:2350 msgid "" "*maxtasksperchild* is the number of tasks a worker process can complete " "before it will exit and be replaced with a fresh worker process, to enable " @@ -3079,21 +3121,23 @@ msgid "" "which means worker processes will live as long as the pool." msgstr "" -#: library/multiprocessing.rst:2292 +#: library/multiprocessing.rst:2355 msgid "" "*context* can be used to specify the context used for starting the worker " "processes. Usually a pool is created using the function :func:" "`multiprocessing.Pool` or the :meth:`Pool` method of a context object. In " -"both cases *context* is set appropriately." +"both cases *context* is set appropriately. If ``None``, calling this " +"function will have the side effect of setting the current global start " +"method if it has not been set already. See the :func:`get_context` function." msgstr "" -#: library/multiprocessing.rst:2298 +#: library/multiprocessing.rst:2363 msgid "" "Note that the methods of the pool object should only be called by the " "process which created the pool." msgstr "" -#: library/multiprocessing.rst:2302 +#: library/multiprocessing.rst:2367 msgid "" ":class:`multiprocessing.pool` objects have internal resources that need to " "be properly managed (like any other resource) by using the pool as a context " @@ -3101,39 +3145,39 @@ msgid "" "to do this can lead to the process hanging on finalization." msgstr "" -#: library/multiprocessing.rst:2307 +#: library/multiprocessing.rst:2372 msgid "" "Note that it is **not correct** to rely on the garbage collector to destroy " "the pool as CPython does not assure that the finalizer of the pool will be " "called (see :meth:`object.__del__` for more information)." msgstr "" -#: library/multiprocessing.rst:2311 +#: library/multiprocessing.rst:2376 msgid "Added the *maxtasksperchild* parameter." msgstr "" -#: library/multiprocessing.rst:2314 +#: library/multiprocessing.rst:2379 msgid "Added the *context* parameter." msgstr "" -#: library/multiprocessing.rst:2317 +#: library/multiprocessing.rst:2382 msgid "" "*processes* uses :func:`os.process_cpu_count` by default, instead of :func:" "`os.cpu_count`." msgstr "" -#: library/multiprocessing.rst:2323 +#: library/multiprocessing.rst:2388 msgid "" "Worker processes within a :class:`Pool` typically live for the complete " "duration of the Pool's work queue. A frequent pattern found in other systems " "(such as Apache, mod_wsgi, etc) to free resources held by workers is to " "allow a worker within a pool to complete only a set amount of work before " -"being exiting, being cleaned up and a new process spawned to replace the old " -"one. The *maxtasksperchild* argument to the :class:`Pool` exposes this " -"ability to the end user." +"exiting, being cleaned up and a new process spawned to replace the old one. " +"The *maxtasksperchild* argument to the :class:`Pool` exposes this ability to " +"the end user." msgstr "" -#: library/multiprocessing.rst:2333 +#: library/multiprocessing.rst:2398 msgid "" "Call *func* with arguments *args* and keyword arguments *kwds*. It blocks " "until the result is ready. Given this blocks, :meth:`apply_async` is better " @@ -3141,13 +3185,13 @@ msgid "" "executed in one of the workers of the pool." msgstr "" -#: library/multiprocessing.rst:2340 +#: library/multiprocessing.rst:2405 msgid "" "A variant of the :meth:`apply` method which returns a :class:" "`~multiprocessing.pool.AsyncResult` object." msgstr "" -#: library/multiprocessing.rst:2343 library/multiprocessing.rst:2374 +#: library/multiprocessing.rst:2408 library/multiprocessing.rst:2439 msgid "" "If *callback* is specified then it should be a callable which accepts a " "single argument. When the result becomes ready *callback* is applied to it, " @@ -3155,58 +3199,58 @@ msgid "" "applied instead." msgstr "" -#: library/multiprocessing.rst:2348 library/multiprocessing.rst:2379 +#: library/multiprocessing.rst:2413 library/multiprocessing.rst:2444 msgid "" "If *error_callback* is specified then it should be a callable which accepts " "a single argument. If the target function fails, then the *error_callback* " "is called with the exception instance." msgstr "" -#: library/multiprocessing.rst:2352 library/multiprocessing.rst:2383 +#: library/multiprocessing.rst:2417 library/multiprocessing.rst:2448 msgid "" "Callbacks should complete immediately since otherwise the thread which " "handles the results will get blocked." msgstr "" -#: library/multiprocessing.rst:2357 +#: library/multiprocessing.rst:2422 msgid "" "A parallel equivalent of the :func:`map` built-in function (it supports only " "one *iterable* argument though, for multiple iterables see :meth:`starmap`). " "It blocks until the result is ready." msgstr "" -#: library/multiprocessing.rst:2361 +#: library/multiprocessing.rst:2426 msgid "" "This method chops the iterable into a number of chunks which it submits to " "the process pool as separate tasks. The (approximate) size of these chunks " "can be specified by setting *chunksize* to a positive integer." msgstr "" -#: library/multiprocessing.rst:2365 +#: library/multiprocessing.rst:2430 msgid "" "Note that it may cause high memory usage for very long iterables. Consider " "using :meth:`imap` or :meth:`imap_unordered` with explicit *chunksize* " "option for better efficiency." msgstr "" -#: library/multiprocessing.rst:2371 +#: library/multiprocessing.rst:2436 msgid "" "A variant of the :meth:`.map` method which returns a :class:" "`~multiprocessing.pool.AsyncResult` object." msgstr "" -#: library/multiprocessing.rst:2388 +#: library/multiprocessing.rst:2453 msgid "A lazier version of :meth:`.map`." msgstr "" -#: library/multiprocessing.rst:2390 +#: library/multiprocessing.rst:2455 msgid "" "The *chunksize* argument is the same as the one used by the :meth:`.map` " "method. For very long iterables using a large value for *chunksize* can " "make the job complete **much** faster than using the default value of ``1``." msgstr "" -#: library/multiprocessing.rst:2395 +#: library/multiprocessing.rst:2460 msgid "" "Also if *chunksize* is ``1`` then the :meth:`!next` method of the iterator " "returned by the :meth:`imap` method has an optional *timeout* parameter: " @@ -3214,65 +3258,65 @@ msgid "" "result cannot be returned within *timeout* seconds." msgstr "" -#: library/multiprocessing.rst:2402 +#: library/multiprocessing.rst:2467 msgid "" "The same as :meth:`imap` except that the ordering of the results from the " "returned iterator should be considered arbitrary. (Only when there is only " "one worker process is the order guaranteed to be \"correct\".)" msgstr "" -#: library/multiprocessing.rst:2408 +#: library/multiprocessing.rst:2473 msgid "" "Like :meth:`~multiprocessing.pool.Pool.map` except that the elements of the " "*iterable* are expected to be iterables that are unpacked as arguments." msgstr "" -#: library/multiprocessing.rst:2412 +#: library/multiprocessing.rst:2477 msgid "" "Hence an *iterable* of ``[(1,2), (3, 4)]`` results in ``[func(1,2), " "func(3,4)]``." msgstr "" -#: library/multiprocessing.rst:2419 +#: library/multiprocessing.rst:2484 msgid "" "A combination of :meth:`starmap` and :meth:`map_async` that iterates over " "*iterable* of iterables and calls *func* with the iterables unpacked. " "Returns a result object." msgstr "" -#: library/multiprocessing.rst:2427 +#: library/multiprocessing.rst:2492 msgid "" "Prevents any more tasks from being submitted to the pool. Once all the " "tasks have been completed the worker processes will exit." msgstr "" -#: library/multiprocessing.rst:2432 +#: library/multiprocessing.rst:2497 msgid "" "Stops the worker processes immediately without completing outstanding work. " "When the pool object is garbage collected :meth:`terminate` will be called " "immediately." msgstr "" -#: library/multiprocessing.rst:2438 +#: library/multiprocessing.rst:2503 msgid "" "Wait for the worker processes to exit. One must call :meth:`close` or :meth:" "`terminate` before using :meth:`join`." msgstr "" -#: library/multiprocessing.rst:2441 +#: library/multiprocessing.rst:2506 msgid "" "Pool objects now support the context management protocol -- see :ref:" "`typecontextmanager`. :meth:`~contextmanager.__enter__` returns the pool " "object, and :meth:`~contextmanager.__exit__` calls :meth:`terminate`." msgstr "" -#: library/multiprocessing.rst:2449 +#: library/multiprocessing.rst:2514 msgid "" "The class of the result returned by :meth:`Pool.apply_async` and :meth:`Pool." "map_async`." msgstr "" -#: library/multiprocessing.rst:2454 +#: library/multiprocessing.rst:2519 msgid "" "Return the result when it arrives. If *timeout* is not ``None`` and the " "result does not arrive within *timeout* seconds then :exc:`multiprocessing." @@ -3280,31 +3324,31 @@ msgid "" "exception will be reraised by :meth:`get`." msgstr "" -#: library/multiprocessing.rst:2461 +#: library/multiprocessing.rst:2526 msgid "Wait until the result is available or until *timeout* seconds pass." msgstr "" -#: library/multiprocessing.rst:2465 +#: library/multiprocessing.rst:2530 msgid "Return whether the call has completed." msgstr "" -#: library/multiprocessing.rst:2469 +#: library/multiprocessing.rst:2534 msgid "" "Return whether the call completed without raising an exception. Will raise :" "exc:`ValueError` if the result is not ready." msgstr "" -#: library/multiprocessing.rst:2472 +#: library/multiprocessing.rst:2537 msgid "" "If the result is not ready, :exc:`ValueError` is raised instead of :exc:" "`AssertionError`." msgstr "" -#: library/multiprocessing.rst:2476 +#: library/multiprocessing.rst:2541 msgid "The following example demonstrates the use of a pool::" msgstr "" -#: library/multiprocessing.rst:2478 +#: library/multiprocessing.rst:2543 msgid "" "from multiprocessing import Pool\n" "import time\n" @@ -3332,17 +3376,17 @@ msgid "" "TimeoutError" msgstr "" -#: library/multiprocessing.rst:2503 +#: library/multiprocessing.rst:2568 msgid "Listeners and Clients" msgstr "" -#: library/multiprocessing.rst:2508 +#: library/multiprocessing.rst:2573 msgid "" "Usually message passing between processes is done using queues or by using :" "class:`~Connection` objects returned by :func:`~multiprocessing.Pipe`." msgstr "" -#: library/multiprocessing.rst:2512 +#: library/multiprocessing.rst:2577 msgid "" "However, the :mod:`multiprocessing.connection` module allows some extra " "flexibility. It basically gives a high level message oriented API for " @@ -3351,45 +3395,45 @@ msgid "" "multiple connections at the same time." msgstr "" -#: library/multiprocessing.rst:2521 +#: library/multiprocessing.rst:2586 msgid "" "Send a randomly generated message to the other end of the connection and " "wait for a reply." msgstr "" -#: library/multiprocessing.rst:2524 +#: library/multiprocessing.rst:2589 msgid "" "If the reply matches the digest of the message using *authkey* as the key " "then a welcome message is sent to the other end of the connection. " "Otherwise :exc:`~multiprocessing.AuthenticationError` is raised." msgstr "" -#: library/multiprocessing.rst:2530 +#: library/multiprocessing.rst:2595 msgid "" "Receive a message, calculate the digest of the message using *authkey* as " "the key, and then send the digest back." msgstr "" -#: library/multiprocessing.rst:2533 +#: library/multiprocessing.rst:2598 msgid "" "If a welcome message is not received, then :exc:`~multiprocessing." "AuthenticationError` is raised." msgstr "" -#: library/multiprocessing.rst:2538 +#: library/multiprocessing.rst:2603 msgid "" "Attempt to set up a connection to the listener which is using address " "*address*, returning a :class:`~Connection`." msgstr "" -#: library/multiprocessing.rst:2541 +#: library/multiprocessing.rst:2606 msgid "" "The type of the connection is determined by *family* argument, but this can " "generally be omitted since it can usually be inferred from the format of " "*address*. (See :ref:`multiprocessing-address-formats`)" msgstr "" -#: library/multiprocessing.rst:2545 library/multiprocessing.rst:2580 +#: library/multiprocessing.rst:2610 library/multiprocessing.rst:2645 msgid "" "If *authkey* is given and not ``None``, it should be a byte string and will " "be used as the secret key for an HMAC-based authentication challenge. No " @@ -3398,26 +3442,26 @@ msgid "" "`multiprocessing-auth-keys`." msgstr "" -#: library/multiprocessing.rst:2553 +#: library/multiprocessing.rst:2618 msgid "" "A wrapper for a bound socket or Windows named pipe which is 'listening' for " "connections." msgstr "" -#: library/multiprocessing.rst:2556 +#: library/multiprocessing.rst:2621 msgid "" "*address* is the address to be used by the bound socket or named pipe of the " "listener object." msgstr "" -#: library/multiprocessing.rst:2561 +#: library/multiprocessing.rst:2626 msgid "" "If an address of '0.0.0.0' is used, the address will not be a connectable " "end point on Windows. If you require a connectable end-point, you should use " "'127.0.0.1'." msgstr "" -#: library/multiprocessing.rst:2565 +#: library/multiprocessing.rst:2630 msgid "" "*family* is the type of socket (or named pipe) to use. This can be one of " "the strings ``'AF_INET'`` (for a TCP socket), ``'AF_UNIX'`` (for a Unix " @@ -3431,49 +3475,49 @@ msgid "" "using :func:`tempfile.mkstemp`." msgstr "" -#: library/multiprocessing.rst:2576 +#: library/multiprocessing.rst:2641 msgid "" "If the listener object uses a socket then *backlog* (1 by default) is passed " "to the :meth:`~socket.socket.listen` method of the socket once it has been " "bound." msgstr "" -#: library/multiprocessing.rst:2588 +#: library/multiprocessing.rst:2653 msgid "" "Accept a connection on the bound socket or named pipe of the listener object " "and return a :class:`~Connection` object. If authentication is attempted and " "fails, then :exc:`~multiprocessing.AuthenticationError` is raised." msgstr "" -#: library/multiprocessing.rst:2595 +#: library/multiprocessing.rst:2660 msgid "" "Close the bound socket or named pipe of the listener object. This is called " "automatically when the listener is garbage collected. However it is " "advisable to call it explicitly." msgstr "" -#: library/multiprocessing.rst:2599 +#: library/multiprocessing.rst:2664 msgid "Listener objects have the following read-only properties:" msgstr "" -#: library/multiprocessing.rst:2603 +#: library/multiprocessing.rst:2668 msgid "The address which is being used by the Listener object." msgstr "" -#: library/multiprocessing.rst:2607 +#: library/multiprocessing.rst:2672 msgid "" "The address from which the last accepted connection came. If this is " "unavailable then it is ``None``." msgstr "" -#: library/multiprocessing.rst:2610 +#: library/multiprocessing.rst:2675 msgid "" "Listener objects now support the context management protocol -- see :ref:" "`typecontextmanager`. :meth:`~contextmanager.__enter__` returns the " "listener object, and :meth:`~contextmanager.__exit__` calls :meth:`close`." msgstr "" -#: library/multiprocessing.rst:2617 +#: library/multiprocessing.rst:2682 msgid "" "Wait till an object in *object_list* is ready. Returns the list of those " "objects in *object_list* which are ready. If *timeout* is a float then the " @@ -3482,32 +3526,32 @@ msgid "" "zero timeout." msgstr "" -#: library/multiprocessing.rst:2623 +#: library/multiprocessing.rst:2688 msgid "" "For both POSIX and Windows, an object can appear in *object_list* if it is" msgstr "" -#: library/multiprocessing.rst:2626 +#: library/multiprocessing.rst:2691 msgid "a readable :class:`~multiprocessing.connection.Connection` object;" msgstr "" -#: library/multiprocessing.rst:2627 +#: library/multiprocessing.rst:2692 msgid "a connected and readable :class:`socket.socket` object; or" msgstr "" -#: library/multiprocessing.rst:2628 +#: library/multiprocessing.rst:2693 msgid "" "the :attr:`~multiprocessing.Process.sentinel` attribute of a :class:" "`~multiprocessing.Process` object." msgstr "" -#: library/multiprocessing.rst:2631 +#: library/multiprocessing.rst:2696 msgid "" "A connection or socket object is ready when there is data available to be " "read from it, or the other end has been closed." msgstr "" -#: library/multiprocessing.rst:2634 +#: library/multiprocessing.rst:2699 msgid "" "**POSIX**: ``wait(object_list, timeout)`` almost equivalent ``select." "select(object_list, [], [], timeout)``. The difference is that, if :func:" @@ -3515,7 +3559,7 @@ msgid "" "an error number of ``EINTR``, whereas :func:`wait` will not." msgstr "" -#: library/multiprocessing.rst:2640 +#: library/multiprocessing.rst:2705 msgid "" "**Windows**: An item in *object_list* must either be an integer handle which " "is waitable (according to the definition used by the documentation of the " @@ -3525,18 +3569,18 @@ msgid "" "handles.)" msgstr "" -#: library/multiprocessing.rst:2650 +#: library/multiprocessing.rst:2715 msgid "**Examples**" msgstr "" -#: library/multiprocessing.rst:2652 +#: library/multiprocessing.rst:2717 msgid "" "The following server code creates a listener which uses ``'secret " "password'`` as an authentication key. It then waits for a connection and " "sends some data to the client::" msgstr "" -#: library/multiprocessing.rst:2656 +#: library/multiprocessing.rst:2721 msgid "" "from multiprocessing.connection import Listener\n" "from array import array\n" @@ -3554,13 +3598,13 @@ msgid "" " conn.send_bytes(array('i', [42, 1729]))" msgstr "" -#: library/multiprocessing.rst:2671 +#: library/multiprocessing.rst:2736 msgid "" "The following code connects to the server and receives some data from the " "server::" msgstr "" -#: library/multiprocessing.rst:2674 +#: library/multiprocessing.rst:2739 msgid "" "from multiprocessing.connection import Client\n" "from array import array\n" @@ -3577,13 +3621,13 @@ msgid "" " print(arr) # => array('i', [42, 1729, 0, 0, 0])" msgstr "" -#: library/multiprocessing.rst:2688 +#: library/multiprocessing.rst:2753 msgid "" "The following code uses :func:`~multiprocessing.connection.wait` to wait for " "messages from multiple processes at once::" msgstr "" -#: library/multiprocessing.rst:2691 +#: library/multiprocessing.rst:2756 msgid "" "from multiprocessing import Process, Pipe, current_process\n" "from multiprocessing.connection import wait\n" @@ -3617,23 +3661,23 @@ msgid "" " print(msg)" msgstr "" -#: library/multiprocessing.rst:2726 +#: library/multiprocessing.rst:2791 msgid "Address Formats" msgstr "" -#: library/multiprocessing.rst:2728 +#: library/multiprocessing.rst:2793 msgid "" "An ``'AF_INET'`` address is a tuple of the form ``(hostname, port)`` where " "*hostname* is a string and *port* is an integer." msgstr "" -#: library/multiprocessing.rst:2731 +#: library/multiprocessing.rst:2796 msgid "" "An ``'AF_UNIX'`` address is a string representing a filename on the " "filesystem." msgstr "" -#: library/multiprocessing.rst:2734 +#: library/multiprocessing.rst:2799 msgid "" "An ``'AF_PIPE'`` address is a string of the form :samp:`r'\\\\\\\\\\\\.\\" "\\pipe\\\\\\\\{PipeName}'`. To use :func:`Client` to connect to a named " @@ -3642,17 +3686,17 @@ msgid "" "instead." msgstr "" -#: library/multiprocessing.rst:2739 +#: library/multiprocessing.rst:2804 msgid "" "Note that any string beginning with two backslashes is assumed by default to " "be an ``'AF_PIPE'`` address rather than an ``'AF_UNIX'`` address." msgstr "" -#: library/multiprocessing.rst:2746 +#: library/multiprocessing.rst:2811 msgid "Authentication keys" msgstr "" -#: library/multiprocessing.rst:2748 +#: library/multiprocessing.rst:2813 msgid "" "When one uses :meth:`Connection.recv `, the data received " "is automatically unpickled. Unfortunately unpickling data from an untrusted " @@ -3660,7 +3704,7 @@ msgid "" "use the :mod:`hmac` module to provide digest authentication." msgstr "" -#: library/multiprocessing.rst:2754 +#: library/multiprocessing.rst:2819 msgid "" "An authentication key is a byte string which can be thought of as a " "password: once a connection is established both ends will demand proof that " @@ -3668,7 +3712,7 @@ msgid "" "using the same key does **not** involve sending the key over the connection.)" msgstr "" -#: library/multiprocessing.rst:2760 +#: library/multiprocessing.rst:2825 msgid "" "If authentication is requested but no authentication key is specified then " "the return value of ``current_process().authkey`` is used (see :class:" @@ -3679,17 +3723,30 @@ msgid "" "setting up connections between themselves." msgstr "" -#: library/multiprocessing.rst:2768 +#: library/multiprocessing.rst:2833 msgid "" "Suitable authentication keys can also be generated by using :func:`os." "urandom`." msgstr "" -#: library/multiprocessing.rst:2772 +#: library/multiprocessing.rst:2835 +msgid "" +"This authentication protects :class:`Listener` and :func:`Client` " +"connections, which are reachable by address. It is not applied to the " +"anonymous pipes created by :func:`~multiprocessing.Pipe` or used internally " +"by :class:`~multiprocessing.Queue`. :mod:`multiprocessing` treats all local " +"processes running as the same user as trusted; on most operating systems " +"such processes can access each other's pipe file descriptors regardless. " +"Applications that require isolation between processes of the same user must " +"arrange it at the operating-system level -- for example, by running workers " +"under a different user account or in a sandbox." +msgstr "" + +#: library/multiprocessing.rst:2847 msgid "Logging" msgstr "" -#: library/multiprocessing.rst:2774 +#: library/multiprocessing.rst:2849 msgid "" "Some support for logging is available. Note, however, that the :mod:" "`logging` package does not use process shared locks so it is possible " @@ -3697,27 +3754,27 @@ msgid "" "mixed up." msgstr "" -#: library/multiprocessing.rst:2781 +#: library/multiprocessing.rst:2856 msgid "" "Returns the logger used by :mod:`multiprocessing`. If necessary, a new one " "will be created." msgstr "" -#: library/multiprocessing.rst:2784 +#: library/multiprocessing.rst:2859 msgid "" "When first created the logger has level :const:`logging.NOTSET` and no " "default handler. Messages sent to this logger will not by default propagate " "to the root logger." msgstr "" -#: library/multiprocessing.rst:2788 +#: library/multiprocessing.rst:2863 msgid "" "Note that on Windows child processes will only inherit the level of the " "parent process's logger -- any other customization of the logger will not be " "inherited." msgstr "" -#: library/multiprocessing.rst:2795 +#: library/multiprocessing.rst:2870 msgid "" "This function performs a call to :func:`get_logger` but in addition to " "returning the logger created by get_logger, it adds a handler which sends " @@ -3726,11 +3783,11 @@ msgid "" "``level`` argument." msgstr "" -#: library/multiprocessing.rst:2801 +#: library/multiprocessing.rst:2876 msgid "Below is an example session with logging turned on::" msgstr "" -#: library/multiprocessing.rst:2803 +#: library/multiprocessing.rst:2878 msgid "" ">>> import multiprocessing, logging\n" ">>> logger = multiprocessing.log_to_stderr()\n" @@ -3746,21 +3803,21 @@ msgid "" "[INFO/SyncManager-...] manager exiting with exitcode 0" msgstr "" -#: library/multiprocessing.rst:2816 +#: library/multiprocessing.rst:2891 msgid "For a full table of logging levels, see the :mod:`logging` module." msgstr "" -#: library/multiprocessing.rst:2820 +#: library/multiprocessing.rst:2895 msgid "The :mod:`multiprocessing.dummy` module" msgstr "" -#: library/multiprocessing.rst:2825 +#: library/multiprocessing.rst:2900 msgid "" ":mod:`multiprocessing.dummy` replicates the API of :mod:`multiprocessing` " "but is no more than a wrapper around the :mod:`threading` module." msgstr "" -#: library/multiprocessing.rst:2830 +#: library/multiprocessing.rst:2905 msgid "" "In particular, the ``Pool`` function provided by :mod:`multiprocessing." "dummy` returns an instance of :class:`ThreadPool`, which is a subclass of :" @@ -3768,7 +3825,7 @@ msgid "" "worker threads rather than worker processes." msgstr "" -#: library/multiprocessing.rst:2838 +#: library/multiprocessing.rst:2913 msgid "" "A thread pool object which controls a pool of worker threads to which jobs " "can be submitted. :class:`ThreadPool` instances are fully interface " @@ -3778,18 +3835,18 @@ msgid "" "pool.Pool.terminate` manually." msgstr "" -#: library/multiprocessing.rst:2845 +#: library/multiprocessing.rst:2920 msgid "" "*processes* is the number of worker threads to use. If *processes* is " "``None`` then the number returned by :func:`os.process_cpu_count` is used." msgstr "" -#: library/multiprocessing.rst:2851 +#: library/multiprocessing.rst:2926 msgid "" "Unlike :class:`Pool`, *maxtasksperchild* and *context* cannot be provided." msgstr "" -#: library/multiprocessing.rst:2855 +#: library/multiprocessing.rst:2930 msgid "" "A :class:`ThreadPool` shares the same interface as :class:`Pool`, which is " "designed around a pool of processes and predates the introduction of the :" @@ -3799,7 +3856,7 @@ msgid "" "is not understood by any other libraries." msgstr "" -#: library/multiprocessing.rst:2862 +#: library/multiprocessing.rst:2937 msgid "" "Users should generally prefer to use :class:`concurrent.futures." "ThreadPoolExecutor`, which has a simpler interface that was designed around " @@ -3808,69 +3865,69 @@ msgid "" "`asyncio`." msgstr "" -#: library/multiprocessing.rst:2872 +#: library/multiprocessing.rst:2947 msgid "Programming guidelines" msgstr "" -#: library/multiprocessing.rst:2874 +#: library/multiprocessing.rst:2949 msgid "" "There are certain guidelines and idioms which should be adhered to when " "using :mod:`multiprocessing`." msgstr "" -#: library/multiprocessing.rst:2879 +#: library/multiprocessing.rst:2954 msgid "All start methods" msgstr "" -#: library/multiprocessing.rst:2881 +#: library/multiprocessing.rst:2956 msgid "The following applies to all start methods." msgstr "" -#: library/multiprocessing.rst:2883 +#: library/multiprocessing.rst:2958 msgid "Avoid shared state" msgstr "" -#: library/multiprocessing.rst:2885 +#: library/multiprocessing.rst:2960 msgid "" "As far as possible one should try to avoid shifting large amounts of data " "between processes." msgstr "" -#: library/multiprocessing.rst:2888 +#: library/multiprocessing.rst:2963 msgid "" "It is probably best to stick to using queues or pipes for communication " "between processes rather than using the lower level synchronization " "primitives." msgstr "" -#: library/multiprocessing.rst:2892 +#: library/multiprocessing.rst:2967 msgid "Picklability" msgstr "" -#: library/multiprocessing.rst:2894 +#: library/multiprocessing.rst:2969 msgid "Ensure that the arguments to the methods of proxies are picklable." msgstr "" -#: library/multiprocessing.rst:2896 +#: library/multiprocessing.rst:2971 msgid "Thread safety of proxies" msgstr "" -#: library/multiprocessing.rst:2898 +#: library/multiprocessing.rst:2973 msgid "" "Do not use a proxy object from more than one thread unless you protect it " "with a lock." msgstr "" -#: library/multiprocessing.rst:2901 +#: library/multiprocessing.rst:2976 msgid "" "(There is never a problem with different processes using the *same* proxy.)" msgstr "" -#: library/multiprocessing.rst:2903 +#: library/multiprocessing.rst:2978 msgid "Joining zombie processes" msgstr "" -#: library/multiprocessing.rst:2905 +#: library/multiprocessing.rst:2980 msgid "" "On POSIX when a process finishes but has not been joined it becomes a " "zombie. There should never be very many because each time a new process " @@ -3881,11 +3938,11 @@ msgid "" "explicitly join all the processes that you start." msgstr "" -#: library/multiprocessing.rst:2913 +#: library/multiprocessing.rst:2988 msgid "Better to inherit than pickle/unpickle" msgstr "" -#: library/multiprocessing.rst:2915 +#: library/multiprocessing.rst:2990 msgid "" "When using the *spawn* or *forkserver* start methods many types from :mod:" "`multiprocessing` need to be picklable so that child processes can use " @@ -3895,11 +3952,11 @@ msgid "" "inherit it from an ancestor process." msgstr "" -#: library/multiprocessing.rst:2923 +#: library/multiprocessing.rst:2998 msgid "Avoid terminating processes" msgstr "" -#: library/multiprocessing.rst:2925 +#: library/multiprocessing.rst:3000 msgid "" "Using the :meth:`Process.terminate ` " "method to stop a process is liable to cause any shared resources (such as " @@ -3907,18 +3964,18 @@ msgid "" "become broken or unavailable to other processes." msgstr "" -#: library/multiprocessing.rst:2931 +#: library/multiprocessing.rst:3006 msgid "" "Therefore it is probably best to only consider using :meth:`Process." "terminate ` on processes which never use " "any shared resources." msgstr "" -#: library/multiprocessing.rst:2935 +#: library/multiprocessing.rst:3010 msgid "Joining processes that use queues" msgstr "" -#: library/multiprocessing.rst:2937 +#: library/multiprocessing.rst:3012 msgid "" "Bear in mind that a process that has put items in a queue will wait before " "terminating until all the buffered items are fed by the \"feeder\" thread to " @@ -3927,7 +3984,7 @@ msgid "" "queue to avoid this behaviour.)" msgstr "" -#: library/multiprocessing.rst:2943 +#: library/multiprocessing.rst:3018 msgid "" "This means that whenever you use a queue you need to make sure that all " "items which have been put on the queue will eventually be removed before the " @@ -3936,11 +3993,11 @@ msgid "" "processes will be joined automatically." msgstr "" -#: library/multiprocessing.rst:2949 +#: library/multiprocessing.rst:3024 msgid "An example which will deadlock is the following::" msgstr "" -#: library/multiprocessing.rst:2951 +#: library/multiprocessing.rst:3026 msgid "" "from multiprocessing import Process, Queue\n" "\n" @@ -3955,17 +4012,17 @@ msgid "" " obj = queue.get()" msgstr "" -#: library/multiprocessing.rst:2963 +#: library/multiprocessing.rst:3038 msgid "" "A fix here would be to swap the last two lines (or simply remove the ``p." "join()`` line)." msgstr "" -#: library/multiprocessing.rst:2966 +#: library/multiprocessing.rst:3041 msgid "Explicitly pass resources to child processes" msgstr "" -#: library/multiprocessing.rst:2968 +#: library/multiprocessing.rst:3043 msgid "" "On POSIX using the *fork* start method, a child process can make use of a " "shared resource created in a parent process using a global resource. " @@ -3973,7 +4030,7 @@ msgid "" "for the child process." msgstr "" -#: library/multiprocessing.rst:2973 +#: library/multiprocessing.rst:3048 msgid "" "Apart from making the code (potentially) compatible with Windows and the " "other start methods this also ensures that as long as the child process is " @@ -3982,11 +4039,11 @@ msgid "" "collected in the parent process." msgstr "" -#: library/multiprocessing.rst:2980 +#: library/multiprocessing.rst:3055 msgid "So for instance ::" msgstr "" -#: library/multiprocessing.rst:2982 +#: library/multiprocessing.rst:3057 msgid "" "from multiprocessing import Process, Lock\n" "\n" @@ -3999,11 +4056,11 @@ msgid "" " Process(target=f).start()" msgstr "" -#: library/multiprocessing.rst:2992 +#: library/multiprocessing.rst:3067 msgid "should be rewritten as ::" msgstr "" -#: library/multiprocessing.rst:2994 +#: library/multiprocessing.rst:3069 msgid "" "from multiprocessing import Process, Lock\n" "\n" @@ -4016,31 +4073,31 @@ msgid "" " Process(target=f, args=(lock,)).start()" msgstr "" -#: library/multiprocessing.rst:3004 +#: library/multiprocessing.rst:3079 msgid "Beware of replacing :data:`sys.stdin` with a \"file like object\"" msgstr "" -#: library/multiprocessing.rst:3006 +#: library/multiprocessing.rst:3081 msgid ":mod:`multiprocessing` originally unconditionally called::" msgstr "" -#: library/multiprocessing.rst:3008 +#: library/multiprocessing.rst:3083 msgid "os.close(sys.stdin.fileno())" msgstr "" -#: library/multiprocessing.rst:3010 +#: library/multiprocessing.rst:3085 msgid "" "in the :meth:`multiprocessing.Process._bootstrap` method --- this resulted " "in issues with processes-in-processes. This has been changed to::" msgstr "" -#: library/multiprocessing.rst:3013 +#: library/multiprocessing.rst:3088 msgid "" "sys.stdin.close()\n" "sys.stdin = open(os.open(os.devnull, os.O_RDONLY), closefd=False)" msgstr "" -#: library/multiprocessing.rst:3016 +#: library/multiprocessing.rst:3091 msgid "" "Which solves the fundamental issue of processes colliding with each other " "resulting in a bad file descriptor error, but introduces a potential danger " @@ -4050,14 +4107,14 @@ msgid "" "data being flushed to the object multiple times, resulting in corruption." msgstr "" -#: library/multiprocessing.rst:3023 +#: library/multiprocessing.rst:3098 msgid "" "If you write a file-like object and implement your own caching, you can make " "it fork-safe by storing the pid whenever you append to the cache, and " "discarding the cache when the pid changes. For example::" msgstr "" -#: library/multiprocessing.rst:3027 +#: library/multiprocessing.rst:3102 msgid "" "@property\n" "def cache(self):\n" @@ -4068,26 +4125,26 @@ msgid "" " return self._cache" msgstr "" -#: library/multiprocessing.rst:3035 +#: library/multiprocessing.rst:3110 msgid "" "For more information, see :issue:`5155`, :issue:`5313` and :issue:`5331`" msgstr "" -#: library/multiprocessing.rst:3041 +#: library/multiprocessing.rst:3116 msgid "The *spawn* and *forkserver* start methods" msgstr "" -#: library/multiprocessing.rst:3043 +#: library/multiprocessing.rst:3118 msgid "" "There are a few extra restrictions which don't apply to the *fork* start " "method." msgstr "" -#: library/multiprocessing.rst:3046 +#: library/multiprocessing.rst:3121 msgid "More picklability" msgstr "" -#: library/multiprocessing.rst:3048 +#: library/multiprocessing.rst:3123 msgid "" "Ensure that all arguments to :class:`~multiprocessing.Process` are " "picklable. Also, if you subclass ``Process.__init__``, you must make sure " @@ -4095,11 +4152,11 @@ msgid "" "` method is called." msgstr "" -#: library/multiprocessing.rst:3053 +#: library/multiprocessing.rst:3128 msgid "Global variables" msgstr "" -#: library/multiprocessing.rst:3055 +#: library/multiprocessing.rst:3130 msgid "" "Bear in mind that if code run in a child process tries to access a global " "variable, then the value it sees (if any) may not be the same as the value " @@ -4107,30 +4164,30 @@ msgid "" "Process.start>` was called." msgstr "" -#: library/multiprocessing.rst:3060 +#: library/multiprocessing.rst:3135 msgid "" "However, global variables which are just module level constants cause no " "problems." msgstr "" -#: library/multiprocessing.rst:3065 +#: library/multiprocessing.rst:3140 msgid "Safe importing of main module" msgstr "" -#: library/multiprocessing.rst:3067 +#: library/multiprocessing.rst:3142 msgid "" "Make sure that the main module can be safely imported by a new Python " "interpreter without causing unintended side effects (such as starting a new " "process)." msgstr "" -#: library/multiprocessing.rst:3071 +#: library/multiprocessing.rst:3146 msgid "" "For example, using the *spawn* or *forkserver* start method running the " "following module would fail with a :exc:`RuntimeError`::" msgstr "" -#: library/multiprocessing.rst:3075 +#: library/multiprocessing.rst:3150 msgid "" "from multiprocessing import Process\n" "\n" @@ -4141,13 +4198,13 @@ msgid "" "p.start()" msgstr "" -#: library/multiprocessing.rst:3083 +#: library/multiprocessing.rst:3158 msgid "" "Instead one should protect the \"entry point\" of the program by using ``if " "__name__ == '__main__':`` as follows::" msgstr "" -#: library/multiprocessing.rst:3086 +#: library/multiprocessing.rst:3161 msgid "" "from multiprocessing import Process, freeze_support, set_start_method\n" "\n" @@ -4161,33 +4218,33 @@ msgid "" " p.start()" msgstr "" -#: library/multiprocessing.rst:3097 +#: library/multiprocessing.rst:3172 msgid "" "(The ``freeze_support()`` line can be omitted if the program will be run " "normally instead of frozen.)" msgstr "" -#: library/multiprocessing.rst:3100 +#: library/multiprocessing.rst:3175 msgid "" "This allows the newly spawned Python interpreter to safely import the module " "and then run the module's ``foo()`` function." msgstr "" -#: library/multiprocessing.rst:3103 +#: library/multiprocessing.rst:3178 msgid "" "Similar restrictions apply if a pool or manager is created in the main " "module." msgstr "" -#: library/multiprocessing.rst:3110 +#: library/multiprocessing.rst:3185 msgid "Examples" msgstr "" -#: library/multiprocessing.rst:3112 +#: library/multiprocessing.rst:3187 msgid "Demonstration of how to create and use customized managers and proxies:" msgstr "" -#: library/multiprocessing.rst:3114 +#: library/multiprocessing.rst:3189 msgid "" "from multiprocessing import freeze_support\n" "from multiprocessing.managers import BaseManager, BaseProxy\n" @@ -4281,11 +4338,11 @@ msgid "" " test()\n" msgstr "" -#: library/multiprocessing.rst:3118 +#: library/multiprocessing.rst:3193 msgid "Using :class:`~multiprocessing.pool.Pool`:" msgstr "" -#: library/multiprocessing.rst:3120 +#: library/multiprocessing.rst:3195 msgid "" "import multiprocessing\n" "import time\n" @@ -4445,13 +4502,13 @@ msgid "" " test()\n" msgstr "" -#: library/multiprocessing.rst:3124 +#: library/multiprocessing.rst:3199 msgid "" "An example showing how to use queues to feed tasks to a collection of worker " "processes and collect the results:" msgstr "" -#: library/multiprocessing.rst:3127 +#: library/multiprocessing.rst:3202 msgid "" "import time\n" "import random\n" diff --git a/library/multiprocessing.shared_memory.po b/library/multiprocessing.shared_memory.po index 0fb024e2f..45204b333 100644 --- a/library/multiprocessing.shared_memory.po +++ b/library/multiprocessing.shared_memory.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/netdata.po b/library/netdata.po index bd19471e8..37ab9842f 100644 --- a/library/netdata.po +++ b/library/netdata.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/netrc.po b/library/netrc.po index fd8666da5..f623e5662 100644 --- a/library/netrc.po +++ b/library/netrc.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/nis.po b/library/nis.po index 32236e750..9c8cebce4 100644 --- a/library/nis.po +++ b/library/nis.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/nntplib.po b/library/nntplib.po index fb7cb1d75..734fcb5d6 100644 --- a/library/nntplib.po +++ b/library/nntplib.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/numbers.po b/library/numbers.po index 0f11a7d28..13e6e9754 100644 --- a/library/numbers.po +++ b/library/numbers.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -123,47 +123,31 @@ msgstr "" msgid "" "Implementers should be careful to make equal numbers equal and hash them to " "the same values. This may be subtle if there are two different extensions of " -"the real numbers. For example, :class:`fractions.Fraction` implements :func:" -"`hash` as follows::" +"the real numbers. See also :ref:`numeric-hash`." msgstr "" -#: library/numbers.rst:96 -msgid "" -"def __hash__(self):\n" -" if self.denominator == 1:\n" -" # Get integers right.\n" -" return hash(self.numerator)\n" -" # Expensive check, but definitely correct.\n" -" if self == float(self):\n" -" return hash(float(self))\n" -" else:\n" -" # Use tuple's hash to avoid a high collision rate on\n" -" # simple fractions.\n" -" return hash((self.numerator, self.denominator))" -msgstr "" - -#: library/numbers.rst:110 +#: library/numbers.rst:97 msgid "Adding More Numeric ABCs" msgstr "" -#: library/numbers.rst:112 +#: library/numbers.rst:99 msgid "" "There are, of course, more possible ABCs for numbers, and this would be a " "poor hierarchy if it precluded the possibility of adding those. You can add " "``MyFoo`` between :class:`Complex` and :class:`Real` with::" msgstr "" -#: library/numbers.rst:117 +#: library/numbers.rst:104 msgid "" "class MyFoo(Complex): ...\n" "MyFoo.register(Real)" msgstr "" -#: library/numbers.rst:124 +#: library/numbers.rst:111 msgid "Implementing the arithmetic operations" msgstr "" -#: library/numbers.rst:126 +#: library/numbers.rst:113 msgid "" "We want to implement the arithmetic operations so that mixed-mode operations " "either call an implementation whose author knew about the types of both " @@ -172,7 +156,7 @@ msgid "" "__add__` and :meth:`~object.__radd__` should be defined as::" msgstr "" -#: library/numbers.rst:133 +#: library/numbers.rst:120 msgid "" "class MyIntegral(Integral):\n" "\n" @@ -199,7 +183,7 @@ msgid "" " return NotImplemented" msgstr "" -#: library/numbers.rst:158 +#: library/numbers.rst:145 msgid "" "There are 5 different cases for a mixed-type operation on subclasses of :" "class:`Complex`. I'll refer to all of the above code that doesn't refer to " @@ -208,12 +192,12 @@ msgid "" "Complex``), and ``b : B <: Complex``. I'll consider ``a + b``:" msgstr "" -#: library/numbers.rst:165 +#: library/numbers.rst:152 msgid "" "If ``A`` defines an :meth:`~object.__add__` which accepts ``b``, all is well." msgstr "" -#: library/numbers.rst:167 +#: library/numbers.rst:154 msgid "" "If ``A`` falls back to the boilerplate code, and it were to return a value " "from :meth:`~object.__add__`, we'd miss the possibility that ``B`` defines a " @@ -222,26 +206,26 @@ msgid "" "meth:`!__add__` at all.)" msgstr "" -#: library/numbers.rst:173 +#: library/numbers.rst:160 msgid "" "Then ``B``'s :meth:`~object.__radd__` gets a chance. If it accepts ``a``, " "all is well." msgstr "" -#: library/numbers.rst:175 +#: library/numbers.rst:162 msgid "" "If it falls back to the boilerplate, there are no more possible methods to " "try, so this is where the default implementation should live." msgstr "" -#: library/numbers.rst:178 +#: library/numbers.rst:165 msgid "" "If ``B <: A``, Python tries ``B.__radd__`` before ``A.__add__``. This is ok, " "because it was implemented with knowledge of ``A``, so it can handle those " "instances before delegating to :class:`Complex`." msgstr "" -#: library/numbers.rst:183 +#: library/numbers.rst:170 msgid "" "If ``A <: Complex`` and ``B <: Real`` without sharing any other knowledge, " "then the appropriate shared operation is the one involving the built in :" @@ -249,7 +233,7 @@ msgid "" "b+a``." msgstr "" -#: library/numbers.rst:188 +#: library/numbers.rst:175 msgid "" "Because most of the operations on any given type will be very similar, it " "can be useful to define a helper function which generates the forward and " @@ -257,7 +241,7 @@ msgid "" "Fraction` uses::" msgstr "" -#: library/numbers.rst:193 +#: library/numbers.rst:180 msgid "" "def _operator_fallbacks(monomorphic_operator, fallback_operator):\n" " def forward(a, b):\n" diff --git a/library/numeric.po b/library/numeric.po index 97f1c814d..cf4cd7ddc 100644 --- a/library/numeric.po +++ b/library/numeric.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Loukas Sakellaridis \n" "Language-Team: PyGreece \n" diff --git a/library/operator.po b/library/operator.po index 8735ad10c..58c0c8f07 100644 --- a/library/operator.po +++ b/library/operator.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -100,7 +100,7 @@ msgid "Return ``a + b``, for *a* and *b* numbers." msgstr "" #: library/operator.rst:101 -msgid "Return the bitwise and of *a* and *b*." +msgid "Return ``a & b``." msgstr "" #: library/operator.rst:107 @@ -118,13 +118,11 @@ msgid "" msgstr "" #: library/operator.rst:125 -msgid "" -"Return the bitwise inverse of the number *obj*. This is equivalent to " -"``~obj``." +msgid "Return ``~obj``." msgstr "" #: library/operator.rst:131 -msgid "Return *a* shifted left by *b*." +msgid "Return ``a << b``." msgstr "" #: library/operator.rst:137 @@ -132,7 +130,7 @@ msgid "Return ``a % b``." msgstr "" #: library/operator.rst:143 -msgid "Return ``a * b``, for *a* and *b* numbers." +msgid "Return ``a * b``." msgstr "" #: library/operator.rst:149 @@ -144,19 +142,19 @@ msgid "Return *obj* negated (``-obj``)." msgstr "" #: library/operator.rst:163 -msgid "Return the bitwise or of *a* and *b*." +msgid "Return ``a | b``." msgstr "" #: library/operator.rst:169 -msgid "Return *obj* positive (``+obj``)." +msgid "Return ``+obj``." msgstr "" #: library/operator.rst:175 -msgid "Return ``a ** b``, for *a* and *b* numbers." +msgid "Return ``a ** b``." msgstr "" #: library/operator.rst:181 -msgid "Return *a* shifted right by *b*." +msgid "Return ``a >> b``." msgstr "" #: library/operator.rst:187 @@ -170,7 +168,7 @@ msgid "" msgstr "" #: library/operator.rst:200 -msgid "Return the bitwise exclusive or of *a* and *b*." +msgid "Return ``a ^ b``." msgstr "" #: library/operator.rst:203 @@ -425,7 +423,7 @@ msgid "``floordiv(a, b)``" msgstr "" #: library/operator.rst:394 -msgid "Bitwise And" +msgid "Bitwise And, or Intersection" msgstr "" #: library/operator.rst:394 @@ -436,343 +434,343 @@ msgstr "" msgid "``and_(a, b)``" msgstr "" -#: library/operator.rst:396 -msgid "Bitwise Exclusive Or" +#: library/operator.rst:397 +msgid "Bitwise Exclusive Or, or Symmetric Difference" msgstr "" -#: library/operator.rst:396 +#: library/operator.rst:397 msgid "``a ^ b``" msgstr "" -#: library/operator.rst:396 +#: library/operator.rst:397 msgid "``xor(a, b)``" msgstr "" -#: library/operator.rst:398 -msgid "Bitwise Inversion" +#: library/operator.rst:401 +msgid "Bitwise Inversion, or Complement" msgstr "" -#: library/operator.rst:398 +#: library/operator.rst:401 msgid "``~ a``" msgstr "" -#: library/operator.rst:398 +#: library/operator.rst:401 msgid "``invert(a)``" msgstr "" -#: library/operator.rst:400 -msgid "Bitwise Or" +#: library/operator.rst:404 +msgid "Bitwise Or, or Union" msgstr "" -#: library/operator.rst:400 +#: library/operator.rst:404 msgid "``a | b``" msgstr "" -#: library/operator.rst:400 +#: library/operator.rst:404 msgid "``or_(a, b)``" msgstr "" -#: library/operator.rst:402 +#: library/operator.rst:407 msgid "Exponentiation" msgstr "" -#: library/operator.rst:402 +#: library/operator.rst:407 msgid "``a ** b``" msgstr "" -#: library/operator.rst:402 +#: library/operator.rst:407 msgid "``pow(a, b)``" msgstr "" -#: library/operator.rst:406 +#: library/operator.rst:411 msgid "Identity" msgstr "" -#: library/operator.rst:404 +#: library/operator.rst:409 msgid "``a is b``" msgstr "" -#: library/operator.rst:404 +#: library/operator.rst:409 msgid "``is_(a, b)``" msgstr "" -#: library/operator.rst:406 +#: library/operator.rst:411 msgid "``a is not b``" msgstr "" -#: library/operator.rst:406 +#: library/operator.rst:411 msgid "``is_not(a, b)``" msgstr "" -#: library/operator.rst:408 +#: library/operator.rst:413 msgid "Indexed Assignment" msgstr "" -#: library/operator.rst:408 +#: library/operator.rst:413 msgid "``obj[k] = v``" msgstr "" -#: library/operator.rst:408 +#: library/operator.rst:413 msgid "``setitem(obj, k, v)``" msgstr "" -#: library/operator.rst:410 +#: library/operator.rst:415 msgid "Indexed Deletion" msgstr "" -#: library/operator.rst:410 +#: library/operator.rst:415 msgid "``del obj[k]``" msgstr "" -#: library/operator.rst:410 +#: library/operator.rst:415 msgid "``delitem(obj, k)``" msgstr "" -#: library/operator.rst:412 +#: library/operator.rst:417 msgid "Indexing" msgstr "" -#: library/operator.rst:412 +#: library/operator.rst:417 msgid "``obj[k]``" msgstr "" -#: library/operator.rst:412 +#: library/operator.rst:417 msgid "``getitem(obj, k)``" msgstr "" -#: library/operator.rst:414 +#: library/operator.rst:419 msgid "Left Shift" msgstr "" -#: library/operator.rst:414 +#: library/operator.rst:419 msgid "``a << b``" msgstr "" -#: library/operator.rst:414 +#: library/operator.rst:419 msgid "``lshift(a, b)``" msgstr "" -#: library/operator.rst:416 +#: library/operator.rst:421 msgid "Modulo" msgstr "" -#: library/operator.rst:416 +#: library/operator.rst:421 msgid "``a % b``" msgstr "" -#: library/operator.rst:416 +#: library/operator.rst:421 msgid "``mod(a, b)``" msgstr "" -#: library/operator.rst:418 +#: library/operator.rst:423 msgid "Multiplication" msgstr "" -#: library/operator.rst:418 +#: library/operator.rst:423 msgid "``a * b``" msgstr "" -#: library/operator.rst:418 +#: library/operator.rst:423 msgid "``mul(a, b)``" msgstr "" -#: library/operator.rst:420 +#: library/operator.rst:425 msgid "Matrix Multiplication" msgstr "" -#: library/operator.rst:420 +#: library/operator.rst:425 msgid "``a @ b``" msgstr "" -#: library/operator.rst:420 +#: library/operator.rst:425 msgid "``matmul(a, b)``" msgstr "" -#: library/operator.rst:422 +#: library/operator.rst:427 msgid "Negation (Arithmetic)" msgstr "" -#: library/operator.rst:422 +#: library/operator.rst:427 msgid "``- a``" msgstr "" -#: library/operator.rst:422 +#: library/operator.rst:427 msgid "``neg(a)``" msgstr "" -#: library/operator.rst:424 +#: library/operator.rst:429 msgid "Negation (Logical)" msgstr "" -#: library/operator.rst:424 +#: library/operator.rst:429 msgid "``not a``" msgstr "" -#: library/operator.rst:424 +#: library/operator.rst:429 msgid "``not_(a)``" msgstr "" -#: library/operator.rst:426 +#: library/operator.rst:431 msgid "Positive" msgstr "" -#: library/operator.rst:426 +#: library/operator.rst:431 msgid "``+ a``" msgstr "" -#: library/operator.rst:426 +#: library/operator.rst:431 msgid "``pos(a)``" msgstr "" -#: library/operator.rst:428 +#: library/operator.rst:433 msgid "Right Shift" msgstr "" -#: library/operator.rst:428 +#: library/operator.rst:433 msgid "``a >> b``" msgstr "" -#: library/operator.rst:428 +#: library/operator.rst:433 msgid "``rshift(a, b)``" msgstr "" -#: library/operator.rst:430 +#: library/operator.rst:435 msgid "Slice Assignment" msgstr "" -#: library/operator.rst:430 +#: library/operator.rst:435 msgid "``seq[i:j] = values``" msgstr "" -#: library/operator.rst:430 +#: library/operator.rst:435 msgid "``setitem(seq, slice(i, j), values)``" msgstr "" -#: library/operator.rst:432 +#: library/operator.rst:437 msgid "Slice Deletion" msgstr "" -#: library/operator.rst:432 +#: library/operator.rst:437 msgid "``del seq[i:j]``" msgstr "" -#: library/operator.rst:432 +#: library/operator.rst:437 msgid "``delitem(seq, slice(i, j))``" msgstr "" -#: library/operator.rst:434 +#: library/operator.rst:439 msgid "Slicing" msgstr "" -#: library/operator.rst:434 +#: library/operator.rst:439 msgid "``seq[i:j]``" msgstr "" -#: library/operator.rst:434 +#: library/operator.rst:439 msgid "``getitem(seq, slice(i, j))``" msgstr "" -#: library/operator.rst:436 +#: library/operator.rst:441 msgid "String Formatting" msgstr "" -#: library/operator.rst:436 +#: library/operator.rst:441 msgid "``s % obj``" msgstr "" -#: library/operator.rst:436 +#: library/operator.rst:441 msgid "``mod(s, obj)``" msgstr "" -#: library/operator.rst:438 +#: library/operator.rst:443 msgid "Subtraction" msgstr "" -#: library/operator.rst:438 +#: library/operator.rst:443 msgid "``a - b``" msgstr "" -#: library/operator.rst:438 +#: library/operator.rst:443 msgid "``sub(a, b)``" msgstr "" -#: library/operator.rst:440 +#: library/operator.rst:445 msgid "Truth Test" msgstr "" -#: library/operator.rst:440 +#: library/operator.rst:445 msgid "``obj``" msgstr "" -#: library/operator.rst:440 +#: library/operator.rst:445 msgid "``truth(obj)``" msgstr "" -#: library/operator.rst:444 library/operator.rst:452 +#: library/operator.rst:449 library/operator.rst:457 msgid "Ordering" msgstr "" -#: library/operator.rst:442 +#: library/operator.rst:447 msgid "``a < b``" msgstr "" -#: library/operator.rst:442 +#: library/operator.rst:447 msgid "``lt(a, b)``" msgstr "" -#: library/operator.rst:444 +#: library/operator.rst:449 msgid "``a <= b``" msgstr "" -#: library/operator.rst:444 +#: library/operator.rst:449 msgid "``le(a, b)``" msgstr "" -#: library/operator.rst:446 +#: library/operator.rst:451 msgid "Equality" msgstr "" -#: library/operator.rst:446 +#: library/operator.rst:451 msgid "``a == b``" msgstr "" -#: library/operator.rst:446 +#: library/operator.rst:451 msgid "``eq(a, b)``" msgstr "" -#: library/operator.rst:448 +#: library/operator.rst:453 msgid "Difference" msgstr "" -#: library/operator.rst:448 +#: library/operator.rst:453 msgid "``a != b``" msgstr "" -#: library/operator.rst:448 +#: library/operator.rst:453 msgid "``ne(a, b)``" msgstr "" -#: library/operator.rst:450 +#: library/operator.rst:455 msgid "``a >= b``" msgstr "" -#: library/operator.rst:450 +#: library/operator.rst:455 msgid "``ge(a, b)``" msgstr "" -#: library/operator.rst:452 +#: library/operator.rst:457 msgid "``a > b``" msgstr "" -#: library/operator.rst:452 +#: library/operator.rst:457 msgid "``gt(a, b)``" msgstr "" -#: library/operator.rst:456 +#: library/operator.rst:461 msgid "In-place Operators" msgstr "" -#: library/operator.rst:458 +#: library/operator.rst:463 msgid "" "Many operations have an \"in-place\" version. Listed below are functions " "providing a more primitive access to in-place operators than the usual " @@ -782,7 +780,7 @@ msgid "" "y``." msgstr "" -#: library/operator.rst:465 +#: library/operator.rst:470 msgid "" "In those examples, note that when an in-place method is called, the " "computation and assignment are performed in two separate steps. The in-" @@ -790,71 +788,71 @@ msgid "" "method. The second step, assignment, is not handled." msgstr "" -#: library/operator.rst:470 +#: library/operator.rst:475 msgid "" "For immutable targets such as strings, numbers, and tuples, the updated " "value is computed, but not assigned back to the input variable:" msgstr "" -#: library/operator.rst:479 +#: library/operator.rst:484 msgid "" "For mutable targets such as lists and dictionaries, the in-place method will " "perform the update, so no subsequent assignment is necessary:" msgstr "" -#: library/operator.rst:491 +#: library/operator.rst:496 msgid "``a = iadd(a, b)`` is equivalent to ``a += b``." msgstr "" -#: library/operator.rst:497 +#: library/operator.rst:502 msgid "``a = iand(a, b)`` is equivalent to ``a &= b``." msgstr "" -#: library/operator.rst:503 +#: library/operator.rst:508 msgid "" "``a = iconcat(a, b)`` is equivalent to ``a += b`` for *a* and *b* sequences." msgstr "" -#: library/operator.rst:509 +#: library/operator.rst:514 msgid "``a = ifloordiv(a, b)`` is equivalent to ``a //= b``." msgstr "" -#: library/operator.rst:515 +#: library/operator.rst:520 msgid "``a = ilshift(a, b)`` is equivalent to ``a <<= b``." msgstr "" -#: library/operator.rst:521 +#: library/operator.rst:526 msgid "``a = imod(a, b)`` is equivalent to ``a %= b``." msgstr "" -#: library/operator.rst:527 +#: library/operator.rst:532 msgid "``a = imul(a, b)`` is equivalent to ``a *= b``." msgstr "" -#: library/operator.rst:533 +#: library/operator.rst:538 msgid "``a = imatmul(a, b)`` is equivalent to ``a @= b``." msgstr "" -#: library/operator.rst:541 +#: library/operator.rst:546 msgid "``a = ior(a, b)`` is equivalent to ``a |= b``." msgstr "" -#: library/operator.rst:547 +#: library/operator.rst:552 msgid "``a = ipow(a, b)`` is equivalent to ``a **= b``." msgstr "" -#: library/operator.rst:553 +#: library/operator.rst:558 msgid "``a = irshift(a, b)`` is equivalent to ``a >>= b``." msgstr "" -#: library/operator.rst:559 +#: library/operator.rst:564 msgid "``a = isub(a, b)`` is equivalent to ``a -= b``." msgstr "" -#: library/operator.rst:565 +#: library/operator.rst:570 msgid "``a = itruediv(a, b)`` is equivalent to ``a /= b``." msgstr "" -#: library/operator.rst:571 +#: library/operator.rst:576 msgid "``a = ixor(a, b)`` is equivalent to ``a ^= b``." msgstr "" diff --git a/library/optparse.po b/library/optparse.po index 465a55e37..49b53b340 100644 --- a/library/optparse.po +++ b/library/optparse.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/os.path.po b/library/os.path.po index c862a6154..45974b465 100644 --- a/library/os.path.po +++ b/library/os.path.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -66,11 +66,11 @@ msgid "" msgstr "" #: library/os.path.rst:45 -msgid ":mod:`posixpath` for UNIX-style paths" +msgid ":mod:`!posixpath` for UNIX-style paths" msgstr "" #: library/os.path.rst:46 -msgid ":mod:`ntpath` for Windows paths" +msgid ":mod:`!ntpath` for Windows paths" msgstr "" #: library/os.path.rst:51 @@ -84,19 +84,23 @@ msgstr "" #: library/os.path.rst:59 msgid "" "Return a normalized absolutized version of the pathname *path*. On most " -"platforms, this is equivalent to calling the function :func:`normpath` as " -"follows: ``normpath(join(os.getcwd(), path))``." +"platforms, this is equivalent to calling ``normpath(join(os.getcwd(), " +"path))``." msgstr "" -#: library/os.path.rst:76 library/os.path.rst:126 library/os.path.rst:152 -#: library/os.path.rst:198 library/os.path.rst:227 library/os.path.rst:246 -#: library/os.path.rst:270 library/os.path.rst:309 library/os.path.rst:401 -#: library/os.path.rst:470 library/os.path.rst:497 library/os.path.rst:549 -#: library/os.path.rst:613 +#: library/os.path.rst:62 +msgid ":func:`os.path.join` and :func:`os.path.normpath`." +msgstr "" + +#: library/os.path.rst:77 library/os.path.rst:129 library/os.path.rst:155 +#: library/os.path.rst:201 library/os.path.rst:230 library/os.path.rst:251 +#: library/os.path.rst:275 library/os.path.rst:314 library/os.path.rst:420 +#: library/os.path.rst:489 library/os.path.rst:516 library/os.path.rst:568 +#: library/os.path.rst:632 msgid "Accepts a :term:`path-like object`." msgstr "" -#: library/os.path.rst:69 +#: library/os.path.rst:70 msgid "" "Return the base name of pathname *path*. This is the second element of the " "pair returned by passing *path* to the function :func:`split`. Note that " @@ -105,7 +109,7 @@ msgid "" "the :func:`basename` function returns an empty string (``''``)." msgstr "" -#: library/os.path.rst:82 +#: library/os.path.rst:83 msgid "" "Return the longest common sub-path of each pathname in the iterable " "*paths*. Raise :exc:`ValueError` if *paths* contain both absolute and " @@ -113,28 +117,30 @@ msgid "" "empty. Unlike :func:`commonprefix`, this returns a valid path." msgstr "" -#: library/os.path.rst:90 +#: library/os.path.rst:91 msgid "Accepts a sequence of :term:`path-like objects `." msgstr "" -#: library/os.path.rst:93 +#: library/os.path.rst:94 msgid "Any iterable can now be passed, rather than just sequences." msgstr "" -#: library/os.path.rst:99 +#: library/os.path.rst:100 msgid "" -"Return the longest path prefix (taken character-by-character) that is a " -"prefix of all paths in *list*. If *list* is empty, return the empty string " -"(``''``)." +"Return the longest string prefix (taken character-by-character) that is a " +"prefix of all strings in *list*. If *list* is empty, return the empty " +"string (``''``)." msgstr "" -#: library/os.path.rst:105 +#: library/os.path.rst:106 msgid "" "This function may return invalid paths because it works a character at a " -"time. To obtain a valid path, see :func:`commonpath`." +"time. If you need a **common path prefix**, then the algorithm implemented " +"in this function is not secure. Use :func:`commonpath` for finding a common " +"path prefix." msgstr "" -#: library/os.path.rst:111 +#: library/os.path.rst:114 msgid "" ">>> os.path.commonprefix(['/usr/lib', '/usr/local/lib'])\n" "'/usr/l'\n" @@ -143,13 +149,13 @@ msgid "" "'/usr'" msgstr "" -#: library/os.path.rst:123 +#: library/os.path.rst:126 msgid "" "Return the directory name of pathname *path*. This is the first element of " "the pair returned by passing *path* to the function :func:`split`." msgstr "" -#: library/os.path.rst:132 +#: library/os.path.rst:135 msgid "" "Return ``True`` if *path* refers to an existing path or an open file " "descriptor. Returns ``False`` for broken symbolic links. On some " @@ -158,26 +164,26 @@ msgid "" "physically exists." msgstr "" -#: library/os.path.rst:138 +#: library/os.path.rst:141 msgid "" "*path* can now be an integer: ``True`` is returned if it is an open file " "descriptor, ``False`` otherwise." msgstr "" -#: library/os.path.rst:148 +#: library/os.path.rst:151 msgid "" "Return ``True`` if *path* refers to an existing path, including broken " "symbolic links. Equivalent to :func:`exists` on platforms lacking :func:" "`os.lstat`." msgstr "" -#: library/os.path.rst:160 +#: library/os.path.rst:163 msgid "" "On Unix and Windows, return the argument with an initial component of ``~`` " "or ``~user`` replaced by that *user*'s home directory." msgstr "" -#: library/os.path.rst:165 +#: library/os.path.rst:168 msgid "" "On Unix, an initial ``~`` is replaced by the environment variable :envvar:" "`HOME` if it is set; otherwise the current user's home directory is looked " @@ -185,7 +191,7 @@ msgid "" "initial ``~user`` is looked up directly in the password directory." msgstr "" -#: library/os.path.rst:170 +#: library/os.path.rst:173 msgid "" "On Windows, :envvar:`USERPROFILE` will be used if set, otherwise a " "combination of :envvar:`HOMEPATH` and :envvar:`HOMEDRIVE` will be used. An " @@ -194,17 +200,17 @@ msgid "" "replacing it if so." msgstr "" -#: library/os.path.rst:175 +#: library/os.path.rst:178 msgid "" "If the expansion fails or if the path does not begin with a tilde, the path " "is returned unchanged." msgstr "" -#: library/os.path.rst:181 +#: library/os.path.rst:184 msgid "No longer uses :envvar:`HOME` on Windows." msgstr "" -#: library/os.path.rst:190 +#: library/os.path.rst:193 msgid "" "Return the argument with environment variables expanded. Substrings of the " "form ``$name`` or ``${name}`` are replaced by the value of environment " @@ -212,13 +218,13 @@ msgid "" "variables are left unchanged." msgstr "" -#: library/os.path.rst:195 +#: library/os.path.rst:198 msgid "" "On Windows, ``%name%`` expansions are supported in addition to ``$name`` and " "``${name}``." msgstr "" -#: library/os.path.rst:204 +#: library/os.path.rst:207 msgid "" "Return the time of last access of *path*. The return value is a floating-" "point number giving the number of seconds since the epoch (see the :mod:" @@ -226,7 +232,7 @@ msgid "" "inaccessible." msgstr "" -#: library/os.path.rst:211 +#: library/os.path.rst:214 msgid "" "Return the time of last modification of *path*. The return value is a " "floating-point number giving the number of seconds since the epoch (see " @@ -234,7 +240,7 @@ msgid "" "is inaccessible." msgstr "" -#: library/os.path.rst:221 +#: library/os.path.rst:224 msgid "" "Return the system's ctime which, on some systems (like Unix) is the time of " "the last metadata change, and, on others (like Windows), is the creation " @@ -243,13 +249,13 @@ msgid "" "file does not exist or is inaccessible." msgstr "" -#: library/os.path.rst:233 +#: library/os.path.rst:236 msgid "" "Return the size, in bytes, of *path*. Raise :exc:`OSError` if the file does " "not exist or is inaccessible." msgstr "" -#: library/os.path.rst:242 +#: library/os.path.rst:245 msgid "" "Return ``True`` if *path* is an absolute pathname. On Unix, that means it " "begins with a slash, on Windows that it begins with two (back)slashes, or a " @@ -257,40 +263,44 @@ msgid "" msgstr "" #: library/os.path.rst:249 +msgid ":func:`abspath`" +msgstr "" + +#: library/os.path.rst:254 msgid "" "On Windows, returns ``False`` if the given path starts with exactly one " "(back)slash." msgstr "" -#: library/os.path.rst:256 +#: library/os.path.rst:261 msgid "" "Return ``True`` if *path* is an :func:`existing ` regular file. This " "follows symbolic links, so both :func:`islink` and :func:`isfile` can be " "true for the same path." msgstr "" -#: library/os.path.rst:266 +#: library/os.path.rst:271 msgid "" "Return ``True`` if *path* is an :func:`existing ` directory. This " "follows symbolic links, so both :func:`islink` and :func:`isdir` can be true " "for the same path." msgstr "" -#: library/os.path.rst:276 +#: library/os.path.rst:281 msgid "" "Return ``True`` if *path* refers to an :func:`existing ` directory " "entry that is a junction. Always return ``False`` if junctions are not " "supported on the current platform." msgstr "" -#: library/os.path.rst:285 +#: library/os.path.rst:290 msgid "" "Return ``True`` if *path* refers to an :func:`existing ` directory " "entry that is a symbolic link. Always ``False`` if symbolic links are not " "supported by the Python runtime." msgstr "" -#: library/os.path.rst:295 +#: library/os.path.rst:300 msgid "" "Return ``True`` if pathname *path* is a :dfn:`mount point`: a point in a " "file system where a different file system has been mounted. On POSIX, the " @@ -305,11 +315,11 @@ msgid "" "the input path." msgstr "" -#: library/os.path.rst:306 +#: library/os.path.rst:311 msgid "Added support for detecting non-root mount points on Windows." msgstr "" -#: library/os.path.rst:315 +#: library/os.path.rst:320 msgid "" "Return ``True`` if pathname *path* is located on a Windows Dev Drive. A Dev " "Drive is optimized for developer scenarios, and offers faster performance " @@ -318,7 +328,7 @@ msgid "" "operations." msgstr "" -#: library/os.path.rst:321 +#: library/os.path.rst:326 msgid "" "May raise an error for an invalid path, for example, one without a " "recognizable drive, but returns ``False`` on platforms that do not support " @@ -326,17 +336,17 @@ msgid "" "windows/dev-drive/>`_ for information on enabling and creating Dev Drives." msgstr "" -#: library/os.path.rst:328 +#: library/os.path.rst:333 msgid "" "The function is now available on all platforms, and will always return " "``False`` on those that have no support for Dev Drives" msgstr "" -#: library/os.path.rst:334 +#: library/os.path.rst:339 msgid "Return ``True`` if *path* is a reserved pathname on the current system." msgstr "" -#: library/os.path.rst:336 +#: library/os.path.rst:341 msgid "" "On Windows, reserved filenames include those that end with a space or dot; " "those that contain colons (i.e. file streams such as \"name:stream\"), " @@ -345,7 +355,7 @@ msgid "" "\", \"AUX\", \"PRN\", \"COM1\", and \"LPT1\"." msgstr "" -#: library/os.path.rst:344 +#: library/os.path.rst:349 msgid "" "This function approximates rules for reserved paths on most Windows systems. " "These rules change over time in various Windows releases. This function may " @@ -353,43 +363,69 @@ msgid "" "available." msgstr "" -#: library/os.path.rst:349 +#: library/os.path.rst:354 msgid "Availability" msgstr "" -#: library/os.path.rst:356 +#: library/os.path.rst:361 msgid "" "Join one or more path segments intelligently. The return value is the " "concatenation of *path* and all members of *\\*paths*, with exactly one " "directory separator following each non-empty part, except the last. That is, " "the result will only end in a separator if the last part is either empty or " -"ends in a separator. If a segment is an absolute path (which on Windows " -"requires both a drive and a root), then all previous segments are ignored " -"and joining continues from the absolute path segment." +"ends in a separator." msgstr "" -#: library/os.path.rst:364 +#: library/os.path.rst:367 +msgid "" +"If a segment is an absolute path (which on Windows requires both a drive and " +"a root), then all previous segments are ignored and joining continues from " +"the absolute path segment. On Linux, for example::" +msgstr "" + +#: library/os.path.rst:371 +msgid "" +">>> os.path.join('/home/foo', 'bar')\n" +"'/home/foo/bar'\n" +">>> os.path.join('/home/foo', '/home/bar')\n" +"'/home/bar'" +msgstr "" + +#: library/os.path.rst:376 msgid "" "On Windows, the drive is not reset when a rooted path segment (e.g., " "``r'\\foo'``) is encountered. If a segment is on a different drive or is an " -"absolute path, all previous segments are ignored and the drive is reset. " +"absolute path, all previous segments are ignored and the drive is reset. For " +"example::" +msgstr "" + +#: library/os.path.rst:381 +msgid "" +">>> os.path.join('c:\\\\', 'foo')\n" +"'c:\\\\foo'\n" +">>> os.path.join('c:\\\\foo', 'd:\\\\bar')\n" +"'d:\\\\bar'" +msgstr "" + +#: library/os.path.rst:386 +msgid "" "Note that since there is a current directory for each drive, ``os.path." "join(\"c:\", \"foo\")`` represents a path relative to the current directory " "on drive :file:`C:` (:file:`c:foo`), not :file:`c:\\\\foo`." msgstr "" -#: library/os.path.rst:371 +#: library/os.path.rst:390 msgid "Accepts a :term:`path-like object` for *path* and *paths*." msgstr "" -#: library/os.path.rst:377 +#: library/os.path.rst:396 msgid "" "Normalize the case of a pathname. On Windows, convert all characters in the " "pathname to lowercase, and also convert forward slashes to backward slashes. " "On other operating systems, return the path unchanged." msgstr "" -#: library/os.path.rst:387 +#: library/os.path.rst:406 msgid "" "Normalize a pathname by collapsing redundant separators and up-level " "references so that ``A//B``, ``A/B/``, ``A/./B`` and ``A/foo/../B`` all " @@ -398,7 +434,7 @@ msgid "" "backward slashes. To normalize case, use :func:`normcase`." msgstr "" -#: library/os.path.rst:394 +#: library/os.path.rst:413 msgid "" "On POSIX systems, in accordance with `IEEE Std 1003.1 2013 Edition; 4.13 " "Pathname Resolution >> splitdrive(\"c:/dir\")\n" "(\"c:\", \"/dir\")" msgstr "" -#: library/os.path.rst:543 +#: library/os.path.rst:562 msgid "" "If the path contains a UNC path, drive will contain the host name and share::" msgstr "" -#: library/os.path.rst:546 +#: library/os.path.rst:565 msgid "" ">>> splitdrive(\"//host/computer/dir\")\n" "(\"//host/computer\", \"/dir\")" msgstr "" -#: library/os.path.rst:555 +#: library/os.path.rst:574 msgid "" "Split the pathname *path* into a 3-item tuple ``(drive, root, tail)`` where " "*drive* is a device name or mount point, *root* is a string of separators " @@ -583,7 +619,7 @@ msgid "" "same as *path*." msgstr "" -#: library/os.path.rst:561 +#: library/os.path.rst:580 msgid "" "On POSIX systems, *drive* is always empty. The *root* may be empty (if " "*path* is relative), a single forward slash (if *path* is absolute), or two " @@ -592,7 +628,7 @@ msgid "" "basedefs/V1_chap04.html#tag_04_13>`_.) For example::" msgstr "" -#: library/os.path.rst:567 +#: library/os.path.rst:586 msgid "" ">>> splitroot('/home/sam')\n" "('', '/', 'home/sam')\n" @@ -602,14 +638,14 @@ msgid "" "('', '/', '//home/sam')" msgstr "" -#: library/os.path.rst:574 +#: library/os.path.rst:593 msgid "" "On Windows, *drive* may be empty, a drive-letter name, a UNC share, or a " "device name. The *root* may be empty, a forward slash, or a backward slash. " "For example::" msgstr "" -#: library/os.path.rst:578 +#: library/os.path.rst:597 msgid "" ">>> splitroot('C:/Users/Sam')\n" "('C:', '/', 'Users/Sam')\n" @@ -617,30 +653,30 @@ msgid "" "('//Server/Share', '/', 'Users/Sam')" msgstr "" -#: library/os.path.rst:588 +#: library/os.path.rst:607 msgid "" "Split the pathname *path* into a pair ``(root, ext)`` such that ``root + " "ext == path``, and the extension, *ext*, is empty or begins with a period " "and contains at most one period." msgstr "" -#: library/os.path.rst:592 +#: library/os.path.rst:611 msgid "If the path contains no extension, *ext* will be ``''``::" msgstr "" -#: library/os.path.rst:594 +#: library/os.path.rst:613 msgid "" ">>> splitext('bar')\n" "('bar', '')" msgstr "" -#: library/os.path.rst:597 +#: library/os.path.rst:616 msgid "" "If the path contains an extension, then *ext* will be set to this extension, " "including the leading period. Note that previous periods will be ignored::" msgstr "" -#: library/os.path.rst:600 +#: library/os.path.rst:619 msgid "" ">>> splitext('foo.bar.exe')\n" "('foo.bar', '.exe')\n" @@ -648,13 +684,13 @@ msgid "" "('/foo/bar', '.exe')" msgstr "" -#: library/os.path.rst:605 +#: library/os.path.rst:624 msgid "" "Leading periods of the last component of the path are considered to be part " "of the root::" msgstr "" -#: library/os.path.rst:608 +#: library/os.path.rst:627 msgid "" ">>> splitext('.cshrc')\n" "('.cshrc', '')\n" @@ -662,7 +698,7 @@ msgid "" "('/foo/....jpg', '')" msgstr "" -#: library/os.path.rst:619 +#: library/os.path.rst:638 msgid "" "``True`` if arbitrary Unicode strings can be used as file names (within " "limitations imposed by the file system)." @@ -676,34 +712,34 @@ msgstr "" msgid "operations" msgstr "" -#: library/os.path.rst:156 +#: library/os.path.rst:159 msgid "~ (tilde)" msgstr "" -#: library/os.path.rst:156 +#: library/os.path.rst:159 msgid "home directory expansion" msgstr "" -#: library/os.path.rst:163 +#: library/os.path.rst:166 msgid "module" msgstr "" -#: library/os.path.rst:163 +#: library/os.path.rst:166 msgid "pwd" msgstr "" -#: library/os.path.rst:184 +#: library/os.path.rst:187 msgid "$ (dollar)" msgstr "" -#: library/os.path.rst:184 +#: library/os.path.rst:187 msgid "environment variables expansion" msgstr "" -#: library/os.path.rst:184 +#: library/os.path.rst:187 msgid "% (percent)" msgstr "" -#: library/os.path.rst:184 +#: library/os.path.rst:187 msgid "environment variables expansion (Windows)" msgstr "" diff --git a/library/os.po b/library/os.po index c521f3d21..fa7e78c94 100644 --- a/library/os.po +++ b/library/os.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -101,7 +101,7 @@ msgid "" "dependent version information." msgstr "" -#: library/os.rst:66 +#: library/os.rst:780 msgid "" "The :mod:`platform` module provides detailed checks for the system's " "identity." @@ -287,32 +287,34 @@ msgstr "" #: library/os.rst:435 library/os.rst:463 library/os.rst:492 library/os.rst:513 #: library/os.rst:534 library/os.rst:580 library/os.rst:594 library/os.rst:640 #: library/os.rst:662 library/os.rst:688 library/os.rst:704 library/os.rst:720 -#: library/os.rst:736 library/os.rst:832 library/os.rst:980 library/os.rst:1010 -#: library/os.rst:1039 library/os.rst:1083 library/os.rst:1106 -#: library/os.rst:1140 library/os.rst:1173 library/os.rst:1245 -#: library/os.rst:1380 library/os.rst:1404 library/os.rst:1434 -#: library/os.rst:1464 library/os.rst:1507 library/os.rst:1536 -#: library/os.rst:1575 library/os.rst:1597 library/os.rst:1663 -#: library/os.rst:1692 library/os.rst:1739 library/os.rst:1773 -#: library/os.rst:1790 library/os.rst:1838 library/os.rst:1916 -#: library/os.rst:2088 library/os.rst:2182 library/os.rst:2222 -#: library/os.rst:2256 library/os.rst:2335 library/os.rst:2379 -#: library/os.rst:2537 library/os.rst:2593 library/os.rst:3323 -#: library/os.rst:3483 library/os.rst:3717 library/os.rst:3767 -#: library/os.rst:3830 library/os.rst:3847 library/os.rst:3865 -#: library/os.rst:4000 library/os.rst:4028 library/os.rst:4047 -#: library/os.rst:4067 library/os.rst:4223 library/os.rst:4327 -#: library/os.rst:4342 library/os.rst:4356 library/os.rst:4370 -#: library/os.rst:4385 library/os.rst:4400 library/os.rst:4416 -#: library/os.rst:4432 library/os.rst:4446 library/os.rst:4522 -#: library/os.rst:4561 library/os.rst:4579 library/os.rst:4598 -#: library/os.rst:4738 library/os.rst:4787 library/os.rst:4875 -#: library/os.rst:4898 library/os.rst:4980 library/os.rst:5024 -#: library/os.rst:5099 library/os.rst:5133 library/os.rst:5165 -#: library/os.rst:5188 library/os.rst:5210 library/os.rst:5233 -#: library/os.rst:5284 library/os.rst:5307 library/os.rst:5323 -#: library/os.rst:5341 library/os.rst:5502 library/os.rst:5535 -#: library/os.rst:5571 library/os.rst:5694 +#: library/os.rst:736 library/os.rst:857 library/os.rst:1005 +#: library/os.rst:1035 library/os.rst:1064 library/os.rst:1105 +#: library/os.rst:1128 library/os.rst:1162 library/os.rst:1195 +#: library/os.rst:1267 library/os.rst:1402 library/os.rst:1426 +#: library/os.rst:1456 library/os.rst:1486 library/os.rst:1529 +#: library/os.rst:1558 library/os.rst:1597 library/os.rst:1619 +#: library/os.rst:1685 library/os.rst:1714 library/os.rst:1761 +#: library/os.rst:1795 library/os.rst:1812 library/os.rst:1860 +#: library/os.rst:1939 library/os.rst:2116 library/os.rst:2210 +#: library/os.rst:2250 library/os.rst:2284 library/os.rst:2363 +#: library/os.rst:2407 library/os.rst:2565 library/os.rst:2621 +#: library/os.rst:3344 library/os.rst:3438 library/os.rst:3454 +#: library/os.rst:3470 library/os.rst:3486 library/os.rst:3502 +#: library/os.rst:3646 library/os.rst:3880 library/os.rst:3930 +#: library/os.rst:3993 library/os.rst:4010 library/os.rst:4028 +#: library/os.rst:4163 library/os.rst:4191 library/os.rst:4210 +#: library/os.rst:4230 library/os.rst:4386 library/os.rst:4490 +#: library/os.rst:4505 library/os.rst:4519 library/os.rst:4533 +#: library/os.rst:4548 library/os.rst:4563 library/os.rst:4579 +#: library/os.rst:4595 library/os.rst:4609 library/os.rst:4685 +#: library/os.rst:4724 library/os.rst:4742 library/os.rst:4761 +#: library/os.rst:4901 library/os.rst:4950 library/os.rst:5038 +#: library/os.rst:5061 library/os.rst:5143 library/os.rst:5187 +#: library/os.rst:5262 library/os.rst:5296 library/os.rst:5328 +#: library/os.rst:5351 library/os.rst:5373 library/os.rst:5396 +#: library/os.rst:5447 library/os.rst:5470 library/os.rst:5486 +#: library/os.rst:5504 library/os.rst:5665 library/os.rst:5698 +#: library/os.rst:5734 library/os.rst:5857 msgid "Availability" msgstr "" @@ -802,65 +804,73 @@ msgstr "" #: library/os.rst:769 msgid "" "Returns information identifying the current operating system. The return " -"value is an object with five attributes:" +"value is a :class:`uname_result`." msgstr "" #: library/os.rst:772 -msgid ":attr:`sysname` - operating system name" -msgstr "" - -#: library/os.rst:773 -msgid ":attr:`nodename` - name of machine on network (implementation-defined)" +msgid "" +"On macOS, iOS and Android, this returns the *kernel* name and version (i.e., " +"``'Darwin'`` on macOS and iOS; ``'Linux'`` on Android). :func:`platform." +"uname` can be used to get the user-facing operating system name and version " +"on iOS and Android." msgstr "" -#: library/os.rst:774 -msgid ":attr:`release` - operating system release" +#: library/os.rst:778 +msgid ":data:`sys.platform` which has finer granularity." msgstr "" -#: library/os.rst:775 -msgid ":attr:`version` - operating system version" +#: library/os.rst:5168 +msgid "" +"Return type changed from a tuple to a tuple-like object with named " +"attributes." msgstr "" -#: library/os.rst:776 -msgid ":attr:`machine` - hardware identifier" +#: library/os.rst:792 +msgid "" +"Name and information about the system returned by :func:`os.uname`. These " +"attributes correspond to the members described in :manpage:`uname(2)`." msgstr "" -#: library/os.rst:778 +#: library/os.rst:795 msgid "" "For backwards compatibility, this object is also iterable, behaving like a " -"five-tuple containing :attr:`sysname`, :attr:`nodename`, :attr:`release`, :" -"attr:`version`, and :attr:`machine` in that order." +"five-tuple containing :attr:`~uname_result.sysname`, :attr:`~uname_result." +"nodename`, :attr:`~uname_result.release`, :attr:`~uname_result.version`, " +"and :attr:`~uname_result.machine` in that order." msgstr "" -#: library/os.rst:783 -msgid "" -"Some systems truncate :attr:`nodename` to 8 characters or to the leading " -"component; a better way to get the hostname is :func:`socket.gethostname` " -"or even ``socket.gethostbyaddr(socket.gethostname())``." +#: library/os.rst:803 +msgid "Operating system name." msgstr "" -#: library/os.rst:788 +#: library/os.rst:807 msgid "" -"On macOS, iOS and Android, this returns the *kernel* name and version (i.e., " -"``'Darwin'`` on macOS and iOS; ``'Linux'`` on Android). :func:`platform." -"uname` can be used to get the user-facing operating system name and version " -"on iOS and Android." +"Name of machine on network. Some systems truncate :attr:`~uname_result." +"nodename` to 8 characters or to the leading component; a better way to get " +"the hostname is :func:`socket.gethostname` or even ``socket." +"gethostbyaddr(socket.gethostname())``." msgstr "" -#: library/os.rst:5005 -msgid "" -"Return type changed from a tuple to a tuple-like object with named " -"attributes." +#: library/os.rst:814 +msgid "Operating system release." +msgstr "" + +#: library/os.rst:818 +msgid "Operating system version." +msgstr "" + +#: library/os.rst:822 +msgid "Hardware identifier." msgstr "" -#: library/os.rst:804 +#: library/os.rst:829 msgid "" "Unset (delete) the environment variable named *key*. Such changes to the " "environment affect subprocesses started with :func:`os.system`, :func:" "`popen` or :func:`fork` and :func:`execv`." msgstr "" -#: library/os.rst:808 +#: library/os.rst:833 msgid "" "Deletion of items in :data:`os.environ` is automatically translated into a " "corresponding call to :func:`unsetenv`; however, calls to :func:`unsetenv` " @@ -868,17 +878,17 @@ msgid "" "items of :data:`os.environ`." msgstr "" -#: library/os.rst:813 +#: library/os.rst:838 msgid "" "Raises an :ref:`auditing event ` ``os.unsetenv`` with argument " "``key``." msgstr "" -#: library/os.rst:815 +#: library/os.rst:840 msgid "The function is now always available and is also available on Windows." msgstr "" -#: library/os.rst:821 +#: library/os.rst:846 msgid "" "Disassociate parts of the process execution context, and move them into a " "newly created namespace. See the :manpage:`unshare(2)` man page for more " @@ -889,28 +899,28 @@ msgid "" "are made to the calling process's execution context." msgstr "" -#: library/os.rst:838 +#: library/os.rst:863 msgid "The :func:`~os.setns` function." msgstr "" -#: library/os.rst:842 +#: library/os.rst:867 msgid "" "Flags to the :func:`unshare` function, if the implementation supports them. " "See :manpage:`unshare(2)` in the Linux manual for their exact effect and " "availability." msgstr "" -#: library/os.rst:865 +#: library/os.rst:890 msgid "File Object Creation" msgstr "" -#: library/os.rst:867 +#: library/os.rst:892 msgid "" "These functions create new :term:`file objects `. (See also :" "func:`~os.open` for opening file descriptors.)" msgstr "" -#: library/os.rst:873 +#: library/os.rst:898 msgid "" "Return an open file object connected to the file descriptor *fd*. This is " "an alias of the :func:`open` built-in function and accepts the same " @@ -918,16 +928,16 @@ msgid "" "must always be an integer." msgstr "" -#: library/os.rst:882 +#: library/os.rst:907 msgid "File Descriptor Operations" msgstr "" -#: library/os.rst:884 +#: library/os.rst:909 msgid "" "These functions operate on I/O streams referenced using file descriptors." msgstr "" -#: library/os.rst:886 +#: library/os.rst:911 msgid "" "File descriptors are small integers corresponding to a file that has been " "opened by the current process. For example, standard input is usually file " @@ -937,7 +947,7 @@ msgid "" "pipes are also referenced by file descriptors." msgstr "" -#: library/os.rst:893 +#: library/os.rst:918 msgid "" "The :meth:`~io.IOBase.fileno` method can be used to obtain the file " "descriptor associated with a :term:`file object` when required. Note that " @@ -945,11 +955,11 @@ msgid "" "ignoring aspects such as internal buffering of data." msgstr "" -#: library/os.rst:901 +#: library/os.rst:926 msgid "Close file descriptor *fd*." msgstr "" -#: library/os.rst:905 +#: library/os.rst:930 msgid "" "This function is intended for low-level I/O and must be applied to a file " "descriptor as returned by :func:`os.open` or :func:`pipe`. To close a " @@ -957,13 +967,13 @@ msgid "" "`popen` or :func:`fdopen`, use its :meth:`~io.IOBase.close` method." msgstr "" -#: library/os.rst:913 +#: library/os.rst:938 msgid "" "Close all file descriptors from *fd_low* (inclusive) to *fd_high* " "(exclusive), ignoring errors. Equivalent to (but much faster than)::" msgstr "" -#: library/os.rst:916 +#: library/os.rst:941 msgid "" "for fd in range(fd_low, fd_high):\n" " try:\n" @@ -972,7 +982,7 @@ msgid "" " pass" msgstr "" -#: library/os.rst:925 +#: library/os.rst:950 msgid "" "Copy *count* bytes from file descriptor *src*, starting from offset " "*offset_src*, to file descriptor *dst*, starting from offset *offset_dst*. " @@ -980,14 +990,14 @@ msgid "" "respectively for *offset_dst*." msgstr "" -#: library/os.rst:930 +#: library/os.rst:955 msgid "" "In Linux kernel older than 5.3, the files pointed to by *src* and *dst* must " "reside in the same filesystem, otherwise an :exc:`OSError` is raised with :" "attr:`~OSError.errno` set to :const:`errno.EXDEV`." msgstr "" -#: library/os.rst:934 +#: library/os.rst:959 msgid "" "This copy is done without the additional cost of transferring data from the " "kernel to user space and then back into the kernel. Additionally, some " @@ -997,19 +1007,19 @@ msgid "" "(in the case of NFS)." msgstr "" -#: library/os.rst:941 +#: library/os.rst:966 msgid "" "The function copies bytes between two file descriptors. Text options, like " "the encoding and the line ending, are ignored." msgstr "" -#: library/os.rst:944 +#: library/os.rst:969 msgid "" "The return value is the amount of bytes copied. This could be less than the " "amount requested." msgstr "" -#: library/os.rst:949 +#: library/os.rst:974 msgid "" "On Linux, :func:`os.copy_file_range` should not be used for copying a range " "of a pseudo file from a special filesystem like procfs and sysfs. It will " @@ -1017,39 +1027,39 @@ msgid "" "known Linux kernel issue." msgstr "" -#: library/os.rst:961 +#: library/os.rst:986 msgid "" "Return a string describing the encoding of the device associated with *fd* " "if it is connected to a terminal; else return :const:`None`." msgstr "" -#: library/os.rst:964 +#: library/os.rst:989 msgid "" "On Unix, if the :ref:`Python UTF-8 Mode ` is enabled, return " "``'UTF-8'`` rather than the device encoding." msgstr "" -#: library/os.rst:967 +#: library/os.rst:992 msgid "On Unix, the function now implements the Python UTF-8 Mode." msgstr "" -#: library/os.rst:973 +#: library/os.rst:998 msgid "" "Return a duplicate of file descriptor *fd*. The new file descriptor is :ref:" "`non-inheritable `." msgstr "" -#: library/os.rst:976 +#: library/os.rst:1001 msgid "" "On Windows, when duplicating a standard stream (0: stdin, 1: stdout, 2: " "stderr), the new file descriptor is :ref:`inheritable `." msgstr "" -#: library/os.rst:1267 +#: library/os.rst:1289 msgid "The new file descriptor is now non-inheritable." msgstr "" -#: library/os.rst:988 +#: library/os.rst:1013 msgid "" "Duplicate file descriptor *fd* to *fd2*, closing the latter first if " "necessary. Return *fd2*. The new file descriptor is :ref:`inheritable " @@ -1057,62 +1067,58 @@ msgid "" "``False``." msgstr "" -#: library/os.rst:995 +#: library/os.rst:1020 msgid "Add the optional *inheritable* parameter." msgstr "" -#: library/os.rst:998 +#: library/os.rst:1023 msgid "Return *fd2* on success. Previously, ``None`` was always returned." msgstr "" -#: library/os.rst:1004 +#: library/os.rst:1029 msgid "" "Change the mode of the file given by *fd* to the numeric *mode*. See the " "docs for :func:`chmod` for possible values of *mode*. As of Python 3.3, " "this is equivalent to ``os.chmod(fd, mode)``." msgstr "" -#: library/os.rst:2137 library/os.rst:2238 +#: library/os.rst:2165 library/os.rst:2266 msgid "" "Raises an :ref:`auditing event ` ``os.chmod`` with arguments " "``path``, ``mode``, ``dir_fd``." msgstr "" -#: library/os.rst:1030 library/os.rst:1706 library/os.rst:2167 -#: library/os.rst:3462 +#: library/os.rst:1055 library/os.rst:1728 library/os.rst:2195 +#: library/os.rst:3625 msgid "" "The function is limited on WASI, see :ref:`wasm-availability` for more " "information." msgstr "" -#: library/os.rst:2245 +#: library/os.rst:2273 msgid "Added support on Windows." msgstr "" -#: library/os.rst:1021 +#: library/os.rst:1046 msgid "" "Change the owner and group id of the file given by *fd* to the numeric *uid* " "and *gid*. To leave one of the ids unchanged, set it to -1. See :func:" "`chown`. As of Python 3.3, this is equivalent to ``os.chown(fd, uid, gid)``." msgstr "" -#: library/os.rst:2163 library/os.rst:2254 +#: library/os.rst:2191 library/os.rst:2282 msgid "" "Raises an :ref:`auditing event ` ``os.chown`` with arguments " "``path``, ``uid``, ``gid``, ``dir_fd``." msgstr "" -#: library/os.rst:1036 +#: library/os.rst:1061 msgid "" "Force write of file with filedescriptor *fd* to disk. Does not force update " "of metadata." msgstr "" -#: library/os.rst:1042 -msgid "This function is not available on MacOS." -msgstr "" - -#: library/os.rst:1047 +#: library/os.rst:1069 msgid "" "Return system configuration information relevant to an open file. *name* " "specifies the configuration value to retrieve; it may be a string which is " @@ -1123,7 +1129,7 @@ msgid "" "included in that mapping, passing an integer for *name* is also accepted." msgstr "" -#: library/os.rst:2573 +#: library/os.rst:2601 msgid "" "If *name* is a string and is not known, :exc:`ValueError` is raised. If a " "specific value for *name* is not supported by the host system, even if it is " @@ -1131,98 +1137,98 @@ msgid "" "`errno.EINVAL` for the error number." msgstr "" -#: library/os.rst:1060 +#: library/os.rst:1082 msgid "As of Python 3.3, this is equivalent to ``os.pathconf(fd, name)``." msgstr "" -#: library/os.rst:1067 +#: library/os.rst:1089 msgid "" "Get the status of the file descriptor *fd*. Return a :class:`stat_result` " "object." msgstr "" -#: library/os.rst:1070 +#: library/os.rst:1092 msgid "As of Python 3.3, this is equivalent to ``os.stat(fd)``." msgstr "" -#: library/os.rst:2401 +#: library/os.rst:2429 msgid "The :func:`.stat` function." msgstr "" -#: library/os.rst:1079 +#: library/os.rst:1101 msgid "" "Return information about the filesystem containing the file associated with " -"file descriptor *fd*, like :func:`statvfs`. As of Python 3.3, this is " -"equivalent to ``os.statvfs(fd)``." +"file descriptor *fd* in a :class:`statvfs_result`, like :func:`statvfs`. As " +"of Python 3.3, this is equivalent to ``os.statvfs(fd)``." msgstr "" -#: library/os.rst:1088 +#: library/os.rst:1110 msgid "" "Force write of file with filedescriptor *fd* to disk. On Unix, this calls " "the native :c:func:`!fsync` function; on Windows, the MS :c:func:`!_commit` " "function." msgstr "" -#: library/os.rst:1091 +#: library/os.rst:1113 msgid "" "If you're starting with a buffered Python :term:`file object` *f*, first do " "``f.flush()``, and then do ``os.fsync(f.fileno())``, to ensure that all " "internal buffers associated with *f* are written to disk." msgstr "" -#: library/os.rst:1100 +#: library/os.rst:1122 msgid "" "Truncate the file corresponding to file descriptor *fd*, so that it is at " "most *length* bytes in size. As of Python 3.3, this is equivalent to ``os." "truncate(fd, length)``." msgstr "" -#: library/os.rst:1104 +#: library/os.rst:1126 msgid "" "Raises an :ref:`auditing event ` ``os.truncate`` with arguments " "``fd``, ``length``." msgstr "" -#: library/os.rst:3501 +#: library/os.rst:3664 msgid "Added support for Windows" msgstr "" -#: library/os.rst:1114 +#: library/os.rst:1136 msgid "" "Get the blocking mode of the file descriptor: ``False`` if the :data:" "`O_NONBLOCK` flag is set, ``True`` if the flag is cleared." msgstr "" -#: library/os.rst:1117 +#: library/os.rst:1139 msgid "See also :func:`set_blocking` and :meth:`socket.socket.setblocking`." msgstr "" -#: library/os.rst:1709 +#: library/os.rst:1731 msgid "On Windows, this function is limited to pipes." msgstr "" -#: library/os.rst:1713 +#: library/os.rst:1735 msgid "Added support for pipes on Windows." msgstr "" -#: library/os.rst:1134 +#: library/os.rst:1156 msgid "" "Grant access to the slave pseudo-terminal device associated with the master " "pseudo-terminal device to which the file descriptor *fd* refers. The file " "descriptor *fd* is not closed upon failure." msgstr "" -#: library/os.rst:1138 +#: library/os.rst:1160 msgid "Calls the C standard library function :c:func:`grantpt`." msgstr "" -#: library/os.rst:1147 +#: library/os.rst:1169 msgid "" "Return ``True`` if the file descriptor *fd* is open and connected to a tty(-" "like) device, else ``False``." msgstr "" -#: library/os.rst:1153 +#: library/os.rst:1175 msgid "" "Apply, test or remove a POSIX lock on an open file descriptor. *fd* is an " "open file descriptor. *cmd* specifies the command to use - one of :data:" @@ -1230,125 +1236,125 @@ msgid "" "specifies the section of the file to lock." msgstr "" -#: library/os.rst:1159 +#: library/os.rst:1181 msgid "" "Raises an :ref:`auditing event ` ``os.lockf`` with arguments " "``fd``, ``cmd``, ``len``." msgstr "" -#: library/os.rst:1171 +#: library/os.rst:1193 msgid "Flags that specify what action :func:`lockf` will take." msgstr "" -#: library/os.rst:1180 +#: library/os.rst:1202 msgid "" "Prepare the tty of which fd is a file descriptor for a new login session. " "Make the calling process a session leader; make the tty the controlling tty, " "the stdin, the stdout, and the stderr of the calling process; close fd." msgstr "" -#: library/os.rst:1191 +#: library/os.rst:1213 msgid "" "Set the current position of file descriptor *fd* to position *pos*, modified " "by *whence*, and return the new position in bytes relative to the start of " "the file. Valid values for *whence* are:" msgstr "" -#: library/os.rst:1196 +#: library/os.rst:1218 msgid "" ":const:`SEEK_SET` or ``0`` -- set *pos* relative to the beginning of the file" msgstr "" -#: library/os.rst:1197 +#: library/os.rst:1219 msgid "" ":const:`SEEK_CUR` or ``1`` -- set *pos* relative to the current file position" msgstr "" -#: library/os.rst:1198 +#: library/os.rst:1220 msgid ":const:`SEEK_END` or ``2`` -- set *pos* relative to the end of the file" msgstr "" -#: library/os.rst:1199 +#: library/os.rst:1221 msgid "" ":const:`SEEK_HOLE` -- set *pos* to the next data location, relative to *pos*" msgstr "" -#: library/os.rst:1200 +#: library/os.rst:1222 msgid "" ":const:`SEEK_DATA` -- set *pos* to the next data hole, relative to *pos*" msgstr "" -#: library/os.rst:1204 +#: library/os.rst:1226 msgid "Add support for :const:`!SEEK_HOLE` and :const:`!SEEK_DATA`." msgstr "" -#: library/os.rst:1211 +#: library/os.rst:1233 msgid "" "Parameters to the :func:`lseek` function and the :meth:`~io.IOBase.seek` " "method on :term:`file-like objects `, for whence to adjust the " "file position indicator." msgstr "" -#: library/os.rst:1215 +#: library/os.rst:1237 msgid ":const:`SEEK_SET`" msgstr "" -#: library/os.rst:1216 +#: library/os.rst:1238 msgid "Adjust the file position relative to the beginning of the file." msgstr "" -#: library/os.rst:1217 +#: library/os.rst:1239 msgid ":const:`SEEK_CUR`" msgstr "" -#: library/os.rst:1218 +#: library/os.rst:1240 msgid "Adjust the file position relative to the current file position." msgstr "" -#: library/os.rst:1219 +#: library/os.rst:1241 msgid ":const:`SEEK_END`" msgstr "" -#: library/os.rst:1220 +#: library/os.rst:1242 msgid "Adjust the file position relative to the end of the file." msgstr "" -#: library/os.rst:1222 +#: library/os.rst:1244 msgid "Their values are 0, 1, and 2, respectively." msgstr "" -#: library/os.rst:1228 +#: library/os.rst:1250 msgid "" "Parameters to the :func:`lseek` function and the :meth:`~io.IOBase.seek` " "method on :term:`file-like objects `, for seeking file data and " "holes on sparsely allocated files." msgstr "" -#: library/os.rst:1232 +#: library/os.rst:1254 msgid ":data:`!SEEK_DATA`" msgstr "" -#: library/os.rst:1233 +#: library/os.rst:1255 msgid "" "Adjust the file offset to the next location containing data, relative to the " "seek position." msgstr "" -#: library/os.rst:1236 +#: library/os.rst:1258 msgid ":data:`!SEEK_HOLE`" msgstr "" -#: library/os.rst:1237 +#: library/os.rst:1259 msgid "" "Adjust the file offset to the next location containing a hole, relative to " "the seek position. A hole is defined as a sequence of zeros." msgstr "" -#: library/os.rst:1243 +#: library/os.rst:1265 msgid "These operations only make sense for filesystems that support them." msgstr "" -#: library/os.rst:1252 +#: library/os.rst:1274 msgid "" "Open the file *path* and set various flags according to *flags* and possibly " "its mode according to *mode*. When computing *mode*, the current umask " @@ -1356,7 +1362,7 @@ msgid "" "file. The new file descriptor is :ref:`non-inheritable `." msgstr "" -#: library/os.rst:1257 +#: library/os.rst:1279 msgid "" "For a description of the flag and mode values, see the C run-time " "documentation; flag constants (like :const:`O_RDONLY` and :const:`O_WRONLY`) " @@ -1364,47 +1370,47 @@ msgid "" "const:`O_BINARY` is needed to open files in binary mode." msgstr "" -#: library/os.rst:1262 +#: library/os.rst:1284 msgid "" "This function can support :ref:`paths relative to directory descriptors " "` with the *dir_fd* parameter." msgstr "" -#: library/os.rst:1265 +#: library/os.rst:1287 msgid "" "Raises an :ref:`auditing event ` ``open`` with arguments ``path``, " "``mode``, ``flags``." msgstr "" -#: library/os.rst:1272 +#: library/os.rst:1294 msgid "" "This function is intended for low-level I/O. For normal usage, use the " "built-in function :func:`open`, which returns a :term:`file object` with :" -"meth:`~file.read` and :meth:`~file.write` methods (and many more). To wrap " -"a file descriptor in a file object, use :func:`fdopen`." +"meth:`~io.BufferedIOBase.read` and :meth:`~io.BufferedIOBase.write` methods. " +"To wrap a file descriptor in a file object, use :func:`fdopen`." msgstr "" -#: library/os.rst:2406 library/os.rst:2517 library/os.rst:2620 -#: library/os.rst:2757 library/os.rst:3517 +#: library/os.rst:2434 library/os.rst:2545 library/os.rst:2648 +#: library/os.rst:2785 library/os.rst:3680 msgid "Added the *dir_fd* parameter." msgstr "" -#: library/os.rst:1631 library/os.rst:5101 +#: library/os.rst:1653 library/os.rst:5264 msgid "" "If the system call is interrupted and the signal handler does not raise an " "exception, the function now retries the system call instead of raising an :" "exc:`InterruptedError` exception (see :pep:`475` for the rationale)." msgstr "" -#: library/os.rst:2030 library/os.rst:2093 library/os.rst:2184 -#: library/os.rst:2242 library/os.rst:2317 library/os.rst:2449 -#: library/os.rst:2520 library/os.rst:2583 library/os.rst:2672 -#: library/os.rst:3050 library/os.rst:3504 library/os.rst:3560 -#: library/os.rst:3721 library/os.rst:4298 library/os.rst:4863 +#: library/os.rst:2053 library/os.rst:2121 library/os.rst:2212 +#: library/os.rst:2270 library/os.rst:2345 library/os.rst:2477 +#: library/os.rst:2548 library/os.rst:2611 library/os.rst:2700 +#: library/os.rst:3087 library/os.rst:3667 library/os.rst:3723 +#: library/os.rst:3884 library/os.rst:4461 library/os.rst:5026 msgid "Accepts a :term:`path-like object`." msgstr "" -#: library/os.rst:1288 +#: library/os.rst:1310 msgid "" "The following constants are options for the *flags* parameter to the :func:" "`~os.open` function. They can be combined using the bitwise OR operator ``|" @@ -1414,45 +1420,45 @@ msgid "" "on Windows." msgstr "" -#: library/os.rst:1303 +#: library/os.rst:1325 msgid "The above constants are available on Unix and Windows." msgstr "" -#: library/os.rst:1314 +#: library/os.rst:1336 msgid "The above constants are only available on Unix." msgstr "" -#: library/os.rst:1316 +#: library/os.rst:1338 msgid "Add :data:`O_CLOEXEC` constant." msgstr "" -#: library/os.rst:1327 +#: library/os.rst:1349 msgid "The above constants are only available on Windows." msgstr "" -#: library/os.rst:1334 +#: library/os.rst:1356 msgid "The above constants are only available on macOS." msgstr "" -#: library/os.rst:1336 +#: library/os.rst:1358 msgid "" "Add :data:`O_EVTONLY`, :data:`O_FSYNC`, :data:`O_SYMLINK` and :data:" "`O_NOFOLLOW_ANY` constants." msgstr "" -#: library/os.rst:1350 +#: library/os.rst:1372 msgid "" "The above constants are extensions and not present if they are not defined " "by the C library." msgstr "" -#: library/os.rst:1353 +#: library/os.rst:1375 msgid "" "Add :data:`O_PATH` on systems that support it. Add :data:`O_TMPFILE`, only " "available on Linux Kernel 3.11 or newer." msgstr "" -#: library/os.rst:1363 +#: library/os.rst:1385 msgid "" "Open a new pseudo-terminal pair. Return a pair of file descriptors " "``(master, slave)`` for the pty and the tty, respectively. The new file " @@ -1460,18 +1466,18 @@ msgid "" "more portable approach, use the :mod:`pty` module." msgstr "" -#: library/os.rst:1382 +#: library/os.rst:1404 msgid "The new file descriptors are now non-inheritable." msgstr "" -#: library/os.rst:1376 +#: library/os.rst:1398 msgid "" "Create a pipe. Return a pair of file descriptors ``(r, w)`` usable for " "reading and writing, respectively. The new file descriptor is :ref:`non-" "inheritable `." msgstr "" -#: library/os.rst:1388 +#: library/os.rst:1410 msgid "" "Create a pipe with *flags* set atomically. *flags* can be constructed by " "ORing together one or more of these values: :data:`O_NONBLOCK`, :data:" @@ -1479,13 +1485,13 @@ msgid "" "and writing, respectively." msgstr "" -#: library/os.rst:1401 +#: library/os.rst:1423 msgid "" "Ensures that enough disk space is allocated for the file specified by *fd* " "starting from *offset* and continuing for *len* bytes." msgstr "" -#: library/os.rst:1411 +#: library/os.rst:1433 msgid "" "Announces an intention to access data in a specific pattern thus allowing " "the kernel to make optimizations. The advice applies to the region of the " @@ -1496,43 +1502,43 @@ msgid "" "`POSIX_FADV_DONTNEED`." msgstr "" -#: library/os.rst:1431 +#: library/os.rst:1453 msgid "" "Flags that can be used in *advice* in :func:`posix_fadvise` that specify the " "access pattern that is likely to be used." msgstr "" -#: library/os.rst:1441 +#: library/os.rst:1463 msgid "" "Read at most *n* bytes from file descriptor *fd* at a position of *offset*, " "leaving the file offset unchanged." msgstr "" -#: library/os.rst:1620 +#: library/os.rst:1642 msgid "" "Return a bytestring containing the bytes read. If the end of the file " "referred to by *fd* has been reached, an empty bytes object is returned." msgstr "" -#: library/os.rst:1454 +#: library/os.rst:1476 msgid "Open and return a file descriptor for a master pseudo-terminal device." msgstr "" -#: library/os.rst:1456 +#: library/os.rst:1478 msgid "" "Calls the C standard library function :c:func:`posix_openpt`. The *oflag* " "argument is used to set file status flags and file access modes as specified " "in the manual page of :c:func:`posix_openpt` of your system." msgstr "" -#: library/os.rst:1460 +#: library/os.rst:1482 msgid "" "The returned file descriptor is :ref:`non-inheritable `. If " "the value :data:`O_CLOEXEC` is available on the system, it is added to " "*oflag*." msgstr "" -#: library/os.rst:1471 +#: library/os.rst:1493 msgid "" "Read from a file descriptor *fd* at a position of *offset* into mutable :" "term:`bytes-like objects ` *buffers*, leaving the file " @@ -1540,91 +1546,91 @@ msgid "" "move on to the next buffer in the sequence to hold the rest of the data." msgstr "" -#: library/os.rst:1561 +#: library/os.rst:1583 msgid "" "The flags argument contains a bitwise OR of zero or more of the following " "flags:" msgstr "" -#: library/os.rst:1479 +#: library/os.rst:1501 msgid ":data:`RWF_HIPRI`" msgstr "" -#: library/os.rst:1480 +#: library/os.rst:1502 msgid ":data:`RWF_NOWAIT`" msgstr "" -#: library/os.rst:1757 +#: library/os.rst:1779 msgid "" "Return the total number of bytes actually read which can be less than the " "total capacity of all the objects." msgstr "" -#: library/os.rst:1570 library/os.rst:1835 +#: library/os.rst:1592 library/os.rst:1857 msgid "" "The operating system may set a limit (:func:`sysconf` value " "``'SC_IOV_MAX'``) on the number of buffers that can be used." msgstr "" -#: library/os.rst:1488 +#: library/os.rst:1510 msgid "Combine the functionality of :func:`os.readv` and :func:`os.pread`." msgstr "" -#: library/os.rst:1577 +#: library/os.rst:1599 msgid "Using flags requires Linux >= 4.6." msgstr "" -#: library/os.rst:1499 +#: library/os.rst:1521 msgid "" "Do not wait for data which is not immediately available. If this flag is " "specified, the system call will return instantly if it would have to read " "data from the backing storage or wait for a lock." msgstr "" -#: library/os.rst:1503 +#: library/os.rst:1525 msgid "" "If some data was successfully read, it will return the number of bytes read. " "If no bytes were read, it will return ``-1`` and set errno to :const:`errno." "EAGAIN`." msgstr "" -#: library/os.rst:1514 +#: library/os.rst:1536 msgid "" "High priority read/write. Allows block-based filesystems to use polling of " "the device, which provides lower latency, but may use additional resources." msgstr "" -#: library/os.rst:1518 +#: library/os.rst:1540 msgid "" "Currently, on Linux, this feature is usable only on a file descriptor opened " "using the :data:`O_DIRECT` flag." msgstr "" -#: library/os.rst:1528 +#: library/os.rst:1550 msgid "" "Return the name of the slave pseudo-terminal device associated with the " "master pseudo-terminal device to which the file descriptor *fd* refers. The " "file descriptor *fd* is not closed upon failure." msgstr "" -#: library/os.rst:1532 +#: library/os.rst:1554 msgid "" "Calls the reentrant C standard library function :c:func:`ptsname_r` if it is " "available; otherwise, the C standard library function :c:func:`ptsname`, " "which is not guaranteed to be thread-safe, is called." msgstr "" -#: library/os.rst:1543 +#: library/os.rst:1565 msgid "" "Write the bytestring in *str* to file descriptor *fd* at position of " "*offset*, leaving the file offset unchanged." msgstr "" -#: library/os.rst:1810 +#: library/os.rst:1832 msgid "Return the number of bytes actually written." msgstr "" -#: library/os.rst:1555 +#: library/os.rst:1577 msgid "" "Write the *buffers* contents to file descriptor *fd* at an offset *offset*, " "leaving the file offset unchanged. *buffers* must be a sequence of :term:" @@ -1633,39 +1639,39 @@ msgid "" "the second, and so on." msgstr "" -#: library/os.rst:1564 +#: library/os.rst:1586 msgid ":data:`RWF_DSYNC`" msgstr "" -#: library/os.rst:1565 +#: library/os.rst:1587 msgid ":data:`RWF_SYNC`" msgstr "" -#: library/os.rst:1566 +#: library/os.rst:1588 msgid ":data:`RWF_APPEND`" msgstr "" -#: library/os.rst:1568 +#: library/os.rst:1590 msgid "Return the total number of bytes actually written." msgstr "" -#: library/os.rst:1573 +#: library/os.rst:1595 msgid "Combine the functionality of :func:`os.writev` and :func:`os.pwrite`." msgstr "" -#: library/os.rst:1584 +#: library/os.rst:1606 msgid "" "Provide a per-write equivalent of the :data:`O_DSYNC` :func:`os.open` flag. " "This flag effect applies only to the data range written by the system call." msgstr "" -#: library/os.rst:1594 +#: library/os.rst:1616 msgid "" "Provide a per-write equivalent of the :data:`O_SYNC` :func:`os.open` flag. " "This flag effect applies only to the data range written by the system call." msgstr "" -#: library/os.rst:1604 +#: library/os.rst:1626 msgid "" "Provide a per-write equivalent of the :data:`O_APPEND` :func:`os.open` flag. " "This flag is meaningful only for :func:`os.pwritev`, and its effect applies " @@ -1675,39 +1681,39 @@ msgid "" "*offset* is updated." msgstr "" -#: library/os.rst:1618 +#: library/os.rst:1640 msgid "Read at most *n* bytes from file descriptor *fd*." msgstr "" -#: library/os.rst:1625 +#: library/os.rst:1647 msgid "" "This function is intended for low-level I/O and must be applied to a file " "descriptor as returned by :func:`os.open` or :func:`pipe`. To read a \"file " "object\" returned by the built-in function :func:`open` or by :func:`popen` " -"or :func:`fdopen`, or :data:`sys.stdin`, use its :meth:`~file.read` or :meth:" -"`~file.readline` methods." +"or :func:`fdopen`, or :data:`sys.stdin`, use its :meth:`~io.TextIOBase.read` " +"or :meth:`~io.IOBase.readline` methods." msgstr "" -#: library/os.rst:1640 +#: library/os.rst:1662 msgid "" "Copy *count* bytes from file descriptor *in_fd* to file descriptor *out_fd* " "starting at *offset*. Return the number of bytes sent. When EOF is reached " "return ``0``." msgstr "" -#: library/os.rst:1644 +#: library/os.rst:1666 msgid "" "The first function notation is supported by all platforms that define :func:" "`sendfile`." msgstr "" -#: library/os.rst:1647 +#: library/os.rst:1669 msgid "" "On Linux, if *offset* is given as ``None``, the bytes are read from the " "current position of *in_fd* and the position of *in_fd* is updated." msgstr "" -#: library/os.rst:1650 +#: library/os.rst:1672 msgid "" "The second case may be used on macOS and FreeBSD where *headers* and " "*trailers* are arbitrary sequences of buffers that are written before and " @@ -1715,58 +1721,58 @@ msgid "" "case." msgstr "" -#: library/os.rst:1654 +#: library/os.rst:1676 msgid "" "On macOS and FreeBSD, a value of ``0`` for *count* specifies to send until " "the end of *in_fd* is reached." msgstr "" -#: library/os.rst:1657 +#: library/os.rst:1679 msgid "" "All platforms support sockets as *out_fd* file descriptor, and some " "platforms allow other types (e.g. regular file, pipe) as well." msgstr "" -#: library/os.rst:1660 +#: library/os.rst:1682 msgid "" "Cross-platform applications should not use *headers*, *trailers* and *flags* " "arguments." msgstr "" -#: library/os.rst:1667 +#: library/os.rst:1689 msgid "" "For a higher-level wrapper of :func:`sendfile`, see :meth:`socket.socket." "sendfile`." msgstr "" -#: library/os.rst:1672 +#: library/os.rst:1694 msgid "Parameters *out* and *in* was renamed to *out_fd* and *in_fd*." msgstr "" -#: library/os.rst:1680 +#: library/os.rst:1702 msgid "" "Parameters to the :func:`sendfile` function, if the implementation supports " "them." msgstr "" -#: library/os.rst:1689 +#: library/os.rst:1711 msgid "" "Parameter to the :func:`sendfile` function, if the implementation supports " "it. The data won't be cached in the virtual memory and will be freed " "afterwards." msgstr "" -#: library/os.rst:1699 +#: library/os.rst:1721 msgid "" "Set the blocking mode of the specified file descriptor. Set the :data:" "`O_NONBLOCK` flag if blocking is ``False``, clear the flag otherwise." msgstr "" -#: library/os.rst:1702 +#: library/os.rst:1724 msgid "See also :func:`get_blocking` and :meth:`socket.socket.setblocking`." msgstr "" -#: library/os.rst:1719 +#: library/os.rst:1741 msgid "" "Transfer *count* bytes from file descriptor *src*, starting from offset " "*offset_src*, to file descriptor *dst*, starting from offset *offset_dst*. " @@ -1778,7 +1784,7 @@ msgid "" "`~OSError.errno` set to :const:`errno.EXDEV`." msgstr "" -#: library/os.rst:1728 +#: library/os.rst:1750 msgid "" "This copy is done without the additional cost of transferring data from the " "kernel to user space and then back into the kernel. Additionally, some " @@ -1786,7 +1792,7 @@ msgid "" "files are opened as binary." msgstr "" -#: library/os.rst:1733 +#: library/os.rst:1755 msgid "" "Upon successful completion, returns the number of bytes spliced to or from " "the pipe. A return value of 0 means end of input. If *src* refers to a pipe, " @@ -1795,7 +1801,7 @@ msgid "" "the pipe." msgstr "" -#: library/os.rst:1752 +#: library/os.rst:1774 msgid "" "Read from a file descriptor *fd* into a number of mutable :term:`bytes-like " "objects ` *buffers*. Transfer data into each buffer until " @@ -1803,50 +1809,50 @@ msgid "" "rest of the data." msgstr "" -#: library/os.rst:1770 +#: library/os.rst:1792 msgid "" "Return the process group associated with the terminal given by *fd* (an open " "file descriptor as returned by :func:`os.open`)." msgstr "" -#: library/os.rst:1778 +#: library/os.rst:1800 msgid "" "Set the process group associated with the terminal given by *fd* (an open " "file descriptor as returned by :func:`os.open`) to *pg*." msgstr "" -#: library/os.rst:1786 +#: library/os.rst:1808 msgid "" "Return a string which specifies the terminal device associated with file " "descriptor *fd*. If *fd* is not associated with a terminal device, an " "exception is raised." msgstr "" -#: library/os.rst:1795 +#: library/os.rst:1817 msgid "" "Unlock the slave pseudo-terminal device associated with the master pseudo-" "terminal device to which the file descriptor *fd* refers. The file " "descriptor *fd* is not closed upon failure." msgstr "" -#: library/os.rst:1799 +#: library/os.rst:1821 msgid "Calls the C standard library function :c:func:`unlockpt`." msgstr "" -#: library/os.rst:1808 +#: library/os.rst:1830 msgid "Write the bytestring in *str* to file descriptor *fd*." msgstr "" -#: library/os.rst:1814 +#: library/os.rst:1836 msgid "" "This function is intended for low-level I/O and must be applied to a file " "descriptor as returned by :func:`os.open` or :func:`pipe`. To write a " "\"file object\" returned by the built-in function :func:`open` or by :func:" "`popen` or :func:`fdopen`, or :data:`sys.stdout` or :data:`sys.stderr`, use " -"its :meth:`~file.write` method." +"its :meth:`~io.TextIOBase.write` method." msgstr "" -#: library/os.rst:1828 +#: library/os.rst:1850 msgid "" "Write the contents of *buffers* to file descriptor *fd*. *buffers* must be a " "sequence of :term:`bytes-like objects `. Buffers are " @@ -1854,70 +1860,72 @@ msgid "" "before proceeding to the second, and so on." msgstr "" -#: library/os.rst:1833 +#: library/os.rst:1855 msgid "Returns the total number of bytes actually written." msgstr "" -#: library/os.rst:1846 +#: library/os.rst:1868 msgid "Querying the size of a terminal" msgstr "" -#: library/os.rst:1852 +#: library/os.rst:1874 msgid "" "Return the size of the terminal window as ``(columns, lines)``, tuple of " "type :class:`terminal_size`." msgstr "" -#: library/os.rst:1855 +#: library/os.rst:1877 msgid "" "The optional argument ``fd`` (default ``STDOUT_FILENO``, or standard output) " "specifies which file descriptor should be queried." msgstr "" -#: library/os.rst:1858 +#: library/os.rst:1880 msgid "" "If the file descriptor is not connected to a terminal, an :exc:`OSError` is " "raised." msgstr "" -#: library/os.rst:1861 +#: library/os.rst:1883 msgid "" ":func:`shutil.get_terminal_size` is the high-level function which should " "normally be used, ``os.get_terminal_size`` is the low-level implementation." msgstr "" -#: library/os.rst:1869 +#: library/os.rst:1891 msgid "" "A subclass of tuple, holding ``(columns, lines)`` of the terminal window " "size." msgstr "" -#: library/os.rst:1873 +#: library/os.rst:1895 msgid "Width of the terminal window in characters." msgstr "" -#: library/os.rst:1877 +#: library/os.rst:1899 msgid "Height of the terminal window in characters." msgstr "" -#: library/os.rst:1883 +#: library/os.rst:1905 msgid "Inheritance of File Descriptors" msgstr "" -#: library/os.rst:1887 +#: library/os.rst:1909 msgid "" "A file descriptor has an \"inheritable\" flag which indicates if the file " "descriptor can be inherited by child processes. Since Python 3.4, file " "descriptors created by Python are non-inheritable by default." msgstr "" -#: library/os.rst:1891 +#: library/os.rst:1913 msgid "" "On UNIX, non-inheritable file descriptors are closed in child processes at " -"the execution of a new program, other file descriptors are inherited." +"the execution of a new program, other file descriptors are inherited. Note " +"that non-inheritable file descriptors are still *inherited* by child " +"processes on :func:`os.fork`." msgstr "" -#: library/os.rst:1894 +#: library/os.rst:1917 msgid "" "On Windows, non-inheritable handles and file descriptors are closed in child " "processes, except for standard streams (file descriptors 0, 1 and 2: stdin, " @@ -1928,38 +1936,38 @@ msgid "" "only inherited if the *close_fds* parameter is ``False``." msgstr "" -#: library/os.rst:1902 +#: library/os.rst:1925 msgid "On WebAssembly platforms, the file descriptor cannot be modified." msgstr "" -#: library/os.rst:1906 +#: library/os.rst:1929 msgid "" "Get the \"inheritable\" flag of the specified file descriptor (a boolean)." msgstr "" -#: library/os.rst:1910 +#: library/os.rst:1933 msgid "Set the \"inheritable\" flag of the specified file descriptor." msgstr "" -#: library/os.rst:1914 +#: library/os.rst:1937 msgid "Get the \"inheritable\" flag of the specified handle (a boolean)." msgstr "" -#: library/os.rst:1920 +#: library/os.rst:1943 msgid "Set the \"inheritable\" flag of the specified handle." msgstr "" -#: library/os.rst:1928 +#: library/os.rst:1951 msgid "Files and Directories" msgstr "" -#: library/os.rst:1930 +#: library/os.rst:1953 msgid "" "On some Unix platforms, many of these functions support one or more of these " "features:" msgstr "" -#: library/os.rst:1935 +#: library/os.rst:1958 msgid "" "**specifying a file descriptor:** Normally the *path* argument provided to " "functions in the :mod:`os` module must be a string specifying a file path. " @@ -1969,7 +1977,7 @@ msgid "" "function prefixed with ``f`` (e.g. call ``fchdir`` instead of ``chdir``)." msgstr "" -#: library/os.rst:1943 +#: library/os.rst:1966 msgid "" "You can check whether or not *path* can be specified as a file descriptor " "for a particular function on your platform using :data:`os.supports_fd`. If " @@ -1977,13 +1985,13 @@ msgid "" "`NotImplementedError`." msgstr "" -#: library/os.rst:1948 +#: library/os.rst:1971 msgid "" "If the function also supports *dir_fd* or *follow_symlinks* arguments, it's " "an error to specify one of those when supplying *path* as a file descriptor." msgstr "" -#: library/os.rst:1953 +#: library/os.rst:1976 msgid "" "**paths relative to directory descriptors:** If *dir_fd* is not ``None``, it " "should be a file descriptor referring to a directory, and the path to " @@ -1994,14 +2002,14 @@ msgid "" "``access``)." msgstr "" -#: library/os.rst:1960 +#: library/os.rst:1983 msgid "" "You can check whether or not *dir_fd* is supported for a particular function " "on your platform using :data:`os.supports_dir_fd`. If it's unavailable, " "using it will raise a :exc:`NotImplementedError`." msgstr "" -#: library/os.rst:1966 +#: library/os.rst:1989 msgid "" "**not following symlinks:** If *follow_symlinks* is ``False``, and the last " "element of the path to operate on is a symbolic link, the function will " @@ -2010,14 +2018,14 @@ msgid "" "function." msgstr "" -#: library/os.rst:1972 +#: library/os.rst:1995 msgid "" "You can check whether or not *follow_symlinks* is supported for a particular " "function on your platform using :data:`os.supports_follow_symlinks`. If it's " "unavailable, using it will raise a :exc:`NotImplementedError`." msgstr "" -#: library/os.rst:1980 +#: library/os.rst:2003 msgid "" "Use the real uid/gid to test for access to *path*. Note that most " "operations will use the effective uid/gid, therefore this routine can be " @@ -2029,13 +2037,13 @@ msgid "" "manpage:`access(2)` for more information." msgstr "" -#: library/os.rst:1989 +#: library/os.rst:2012 msgid "" "This function can support specifying :ref:`paths relative to directory " "descriptors ` and :ref:`not following symlinks `." msgstr "" -#: library/os.rst:1992 +#: library/os.rst:2015 msgid "" "If *effective_ids* is ``True``, :func:`access` will perform its access " "checks using the effective uid/gid instead of the real uid/gid. " @@ -2044,7 +2052,7 @@ msgid "" "unavailable, using it will raise a :exc:`NotImplementedError`." msgstr "" -#: library/os.rst:2000 +#: library/os.rst:2023 msgid "" "Using :func:`access` to check if a user is authorized to e.g. open a file " "before actually doing so using :func:`open` creates a security hole, because " @@ -2053,7 +2061,7 @@ msgid "" "For example::" msgstr "" -#: library/os.rst:2006 +#: library/os.rst:2029 msgid "" "if os.access(\"myfile\", os.R_OK):\n" " with open(\"myfile\") as fp:\n" @@ -2061,11 +2069,11 @@ msgid "" "return \"some default data\"" msgstr "" -#: library/os.rst:2011 +#: library/os.rst:2034 msgid "is better written as::" msgstr "" -#: library/os.rst:2013 +#: library/os.rst:2036 msgid "" "try:\n" " fp = open(\"myfile\")\n" @@ -2076,212 +2084,218 @@ msgid "" " return fp.read()" msgstr "" -#: library/os.rst:2023 +#: library/os.rst:2046 msgid "" "I/O operations may fail even when :func:`access` indicates that they would " "succeed, particularly for operations on network filesystems which may have " "permissions semantics beyond the usual POSIX permission-bit model." msgstr "" -#: library/os.rst:2027 +#: library/os.rst:2050 msgid "Added the *dir_fd*, *effective_ids*, and *follow_symlinks* parameters." msgstr "" -#: library/os.rst:2039 +#: library/os.rst:2062 msgid "" "Values to pass as the *mode* parameter of :func:`access` to test the " "existence, readability, writability and executability of *path*, " "respectively." msgstr "" -#: library/os.rst:2048 +#: library/os.rst:2071 msgid "Change the current working directory to *path*." msgstr "" -#: library/os.rst:2050 +#: library/os.rst:2073 msgid "" "This function can support :ref:`specifying a file descriptor `. " "The descriptor must refer to an opened directory, not an open file." msgstr "" -#: library/os.rst:2053 +#: library/os.rst:2076 msgid "" "This function can raise :exc:`OSError` and subclasses such as :exc:" "`FileNotFoundError`, :exc:`PermissionError`, and :exc:`NotADirectoryError`." msgstr "" -#: library/os.rst:2194 +#: library/os.rst:2222 msgid "" "Raises an :ref:`auditing event ` ``os.chdir`` with argument " "``path``." msgstr "" -#: library/os.rst:2058 +#: library/os.rst:2083 +msgid "" +"The :func:`contextlib.chdir` context manager, which changes the current " +"working directory on entering and restores the previous one on exit." +msgstr "" + +#: library/os.rst:2086 msgid "" "Added support for specifying *path* as a file descriptor on some platforms." msgstr "" -#: library/os.rst:2068 +#: library/os.rst:2096 msgid "" "Set the flags of *path* to the numeric *flags*. *flags* may take a " "combination (bitwise OR) of the following values (as defined in the :mod:" "`stat` module):" msgstr "" -#: library/os.rst:2071 +#: library/os.rst:2099 msgid ":const:`stat.UF_NODUMP`" msgstr "" -#: library/os.rst:2072 +#: library/os.rst:2100 msgid ":const:`stat.UF_IMMUTABLE`" msgstr "" -#: library/os.rst:2073 +#: library/os.rst:2101 msgid ":const:`stat.UF_APPEND`" msgstr "" -#: library/os.rst:2074 +#: library/os.rst:2102 msgid ":const:`stat.UF_OPAQUE`" msgstr "" -#: library/os.rst:2075 +#: library/os.rst:2103 msgid ":const:`stat.UF_NOUNLINK`" msgstr "" -#: library/os.rst:2076 +#: library/os.rst:2104 msgid ":const:`stat.UF_COMPRESSED`" msgstr "" -#: library/os.rst:2077 +#: library/os.rst:2105 msgid ":const:`stat.UF_HIDDEN`" msgstr "" -#: library/os.rst:2078 +#: library/os.rst:2106 msgid ":const:`stat.SF_ARCHIVED`" msgstr "" -#: library/os.rst:2079 +#: library/os.rst:2107 msgid ":const:`stat.SF_IMMUTABLE`" msgstr "" -#: library/os.rst:2080 +#: library/os.rst:2108 msgid ":const:`stat.SF_APPEND`" msgstr "" -#: library/os.rst:2081 +#: library/os.rst:2109 msgid ":const:`stat.SF_NOUNLINK`" msgstr "" -#: library/os.rst:2082 +#: library/os.rst:2110 msgid ":const:`stat.SF_SNAPSHOT`" msgstr "" -#: library/os.rst:2084 +#: library/os.rst:2112 msgid "" "This function can support :ref:`not following symlinks `." msgstr "" -#: library/os.rst:2220 +#: library/os.rst:2248 msgid "" "Raises an :ref:`auditing event ` ``os.chflags`` with arguments " "``path``, ``flags``." msgstr "" -#: library/os.rst:2090 +#: library/os.rst:2118 msgid "Added the *follow_symlinks* parameter." msgstr "" -#: library/os.rst:2099 +#: library/os.rst:2127 msgid "" "Change the mode of *path* to the numeric *mode*. *mode* may take one of the " "following values (as defined in the :mod:`stat` module) or bitwise ORed " "combinations of them:" msgstr "" -#: library/os.rst:2103 +#: library/os.rst:2131 msgid ":const:`stat.S_ISUID`" msgstr "" -#: library/os.rst:2104 +#: library/os.rst:2132 msgid ":const:`stat.S_ISGID`" msgstr "" -#: library/os.rst:2105 +#: library/os.rst:2133 msgid ":const:`stat.S_ENFMT`" msgstr "" -#: library/os.rst:2106 +#: library/os.rst:2134 msgid ":const:`stat.S_ISVTX`" msgstr "" -#: library/os.rst:2107 +#: library/os.rst:2135 msgid ":const:`stat.S_IREAD`" msgstr "" -#: library/os.rst:2108 +#: library/os.rst:2136 msgid ":const:`stat.S_IWRITE`" msgstr "" -#: library/os.rst:2109 +#: library/os.rst:2137 msgid ":const:`stat.S_IEXEC`" msgstr "" -#: library/os.rst:2110 +#: library/os.rst:2138 msgid ":const:`stat.S_IRWXU`" msgstr "" -#: library/os.rst:2111 +#: library/os.rst:2139 msgid ":const:`stat.S_IRUSR`" msgstr "" -#: library/os.rst:2112 +#: library/os.rst:2140 msgid ":const:`stat.S_IWUSR`" msgstr "" -#: library/os.rst:2113 +#: library/os.rst:2141 msgid ":const:`stat.S_IXUSR`" msgstr "" -#: library/os.rst:2114 +#: library/os.rst:2142 msgid ":const:`stat.S_IRWXG`" msgstr "" -#: library/os.rst:2115 +#: library/os.rst:2143 msgid ":const:`stat.S_IRGRP`" msgstr "" -#: library/os.rst:2116 +#: library/os.rst:2144 msgid ":const:`stat.S_IWGRP`" msgstr "" -#: library/os.rst:2117 +#: library/os.rst:2145 msgid ":const:`stat.S_IXGRP`" msgstr "" -#: library/os.rst:2118 +#: library/os.rst:2146 msgid ":const:`stat.S_IRWXO`" msgstr "" -#: library/os.rst:2119 +#: library/os.rst:2147 msgid ":const:`stat.S_IROTH`" msgstr "" -#: library/os.rst:2120 +#: library/os.rst:2148 msgid ":const:`stat.S_IWOTH`" msgstr "" -#: library/os.rst:2121 +#: library/os.rst:2149 msgid ":const:`stat.S_IXOTH`" msgstr "" -#: library/os.rst:2156 library/os.rst:3550 +#: library/os.rst:2184 library/os.rst:3713 msgid "" "This function can support :ref:`specifying a file descriptor `, :" "ref:`paths relative to directory descriptors ` and :ref:`not " "following symlinks `." msgstr "" -#: library/os.rst:2129 +#: library/os.rst:2157 msgid "" "Although Windows supports :func:`chmod`, you can only set the file's read-" "only flag with it (via the ``stat.S_IWRITE`` and ``stat.S_IREAD`` constants " @@ -2289,68 +2303,68 @@ msgid "" "value of *follow_symlinks* is ``False`` on Windows." msgstr "" -#: library/os.rst:2170 +#: library/os.rst:2198 msgid "" "Added support for specifying *path* as an open file descriptor, and the " "*dir_fd* and *follow_symlinks* arguments." msgstr "" -#: library/os.rst:2146 +#: library/os.rst:2174 msgid "" "Added support for a file descriptor and the *follow_symlinks* argument on " "Windows." msgstr "" -#: library/os.rst:2153 +#: library/os.rst:2181 msgid "" "Change the owner and group id of *path* to the numeric *uid* and *gid*. To " "leave one of the ids unchanged, set it to -1." msgstr "" -#: library/os.rst:2160 +#: library/os.rst:2188 msgid "" "See :func:`shutil.chown` for a higher-level function that accepts names in " "addition to numeric ids." msgstr "" -#: library/os.rst:2174 +#: library/os.rst:2202 msgid "Supports a :term:`path-like object`." msgstr "" -#: library/os.rst:2180 +#: library/os.rst:2208 msgid "Change the root directory of the current process to *path*." msgstr "" -#: library/os.rst:2190 +#: library/os.rst:2218 msgid "" "Change the current working directory to the directory represented by the " "file descriptor *fd*. The descriptor must refer to an opened directory, not " "an open file. As of Python 3.3, this is equivalent to ``os.chdir(fd)``." msgstr "" -#: library/os.rst:2201 +#: library/os.rst:2229 msgid "Return a string representing the current working directory." msgstr "" -#: library/os.rst:2206 +#: library/os.rst:2234 msgid "Return a bytestring representing the current working directory." msgstr "" -#: library/os.rst:2208 +#: library/os.rst:2236 msgid "" "The function now uses the UTF-8 encoding on Windows, rather than the ANSI " "code page: see :pep:`529` for the rationale. The function is no longer " "deprecated on Windows." msgstr "" -#: library/os.rst:2216 +#: library/os.rst:2244 msgid "" "Set the flags of *path* to the numeric *flags*, like :func:`chflags`, but do " "not follow symbolic links. As of Python 3.3, this is equivalent to ``os." "chflags(path, flags, follow_symlinks=False)``." msgstr "" -#: library/os.rst:2230 +#: library/os.rst:2258 msgid "" "Change the mode of *path* to the numeric *mode*. If path is a symlink, this " "affects the symlink rather than the target. See the docs for :func:`chmod` " @@ -2358,49 +2372,49 @@ msgid "" "chmod(path, mode, follow_symlinks=False)``." msgstr "" -#: library/os.rst:2235 +#: library/os.rst:2263 msgid "" "``lchmod()`` is not part of POSIX, but Unix implementations may have it if " "changing the mode of symbolic links is supported." msgstr "" -#: library/os.rst:2250 +#: library/os.rst:2278 msgid "" "Change the owner and group id of *path* to the numeric *uid* and *gid*. " "This function will not follow symbolic links. As of Python 3.3, this is " "equivalent to ``os.chown(path, uid, gid, follow_symlinks=False)``." msgstr "" -#: library/os.rst:2264 +#: library/os.rst:2292 msgid "Create a hard link pointing to *src* named *dst*." msgstr "" -#: library/os.rst:2266 +#: library/os.rst:2294 msgid "" "This function can support specifying *src_dir_fd* and/or *dst_dir_fd* to " "supply :ref:`paths relative to directory descriptors `, and :ref:" "`not following symlinks `." msgstr "" -#: library/os.rst:2270 +#: library/os.rst:2298 msgid "" "Raises an :ref:`auditing event ` ``os.link`` with arguments " "``src``, ``dst``, ``src_dir_fd``, ``dst_dir_fd``." msgstr "" -#: library/os.rst:4547 +#: library/os.rst:4710 msgid "Added Windows support." msgstr "" -#: library/os.rst:2277 +#: library/os.rst:2305 msgid "Added the *src_dir_fd*, *dst_dir_fd*, and *follow_symlinks* parameters." msgstr "" -#: library/os.rst:2704 library/os.rst:3472 +#: library/os.rst:2732 library/os.rst:3635 msgid "Accepts a :term:`path-like object` for *src* and *dst*." msgstr "" -#: library/os.rst:2286 +#: library/os.rst:2314 msgid "" "Return a list containing the names of the entries in the directory given by " "*path*. The list is in arbitrary order, and does not include the special " @@ -2409,7 +2423,7 @@ msgid "" "function, whether a name for that file be included is unspecified." msgstr "" -#: library/os.rst:2292 +#: library/os.rst:2320 msgid "" "*path* may be a :term:`path-like object`. If *path* is of type ``bytes`` " "(directly or indirectly through the :class:`PathLike` interface), the " @@ -2417,41 +2431,41 @@ msgid "" "circumstances, they will be of type ``str``." msgstr "" -#: library/os.rst:2789 +#: library/os.rst:2817 msgid "" "This function can also support :ref:`specifying a file descriptor " "`; the file descriptor must refer to a directory." msgstr "" -#: library/os.rst:2300 +#: library/os.rst:2328 msgid "" "Raises an :ref:`auditing event ` ``os.listdir`` with argument " "``path``." msgstr "" -#: library/os.rst:2303 +#: library/os.rst:2331 msgid "To encode ``str`` filenames to ``bytes``, use :func:`~os.fsencode`." msgstr "" -#: library/os.rst:2307 +#: library/os.rst:2335 msgid "" "The :func:`scandir` function returns directory entries along with file " "attribute information, giving better performance for many common use cases." msgstr "" -#: library/os.rst:2311 +#: library/os.rst:2339 msgid "The *path* parameter became optional." msgstr "" -#: library/os.rst:3328 +#: library/os.rst:3346 msgid "Added support for specifying *path* as an open file descriptor." msgstr "" -#: library/os.rst:2323 +#: library/os.rst:2351 msgid "Return a list containing the names of drives on a Windows system." msgstr "" -#: library/os.rst:2325 +#: library/os.rst:2353 msgid "" "A drive name typically looks like ``'C:\\\\'``. Not every drive name will be " "associated with a volume, and some may be inaccessible for a variety of " @@ -2459,22 +2473,22 @@ msgid "" "function does not test for access." msgstr "" -#: library/os.rst:2330 +#: library/os.rst:2358 msgid "May raise :exc:`OSError` if an error occurs collecting the drive names." msgstr "" -#: library/os.rst:2333 +#: library/os.rst:2361 msgid "" "Raises an :ref:`auditing event ` ``os.listdrives`` with no " "arguments." msgstr "" -#: library/os.rst:2342 +#: library/os.rst:2370 msgid "" "Return a list containing the mount points for a volume on a Windows system." msgstr "" -#: library/os.rst:2345 +#: library/os.rst:2373 msgid "" "*volume* must be represented as a GUID path, like those returned by :func:" "`os.listvolumes`. Volumes may be mounted in multiple locations or not at " @@ -2482,29 +2496,29 @@ msgid "" "associated with a volume will not be returned by this function." msgstr "" -#: library/os.rst:2351 +#: library/os.rst:2379 msgid "" "The mount points return by this function will be absolute paths, and may be " "longer than the drive name." msgstr "" -#: library/os.rst:2354 +#: library/os.rst:2382 msgid "" "Raises :exc:`OSError` if the volume is not recognized or if an error occurs " "collecting the paths." msgstr "" -#: library/os.rst:2357 +#: library/os.rst:2385 msgid "" "Raises an :ref:`auditing event ` ``os.listmounts`` with argument " "``volume``." msgstr "" -#: library/os.rst:2366 +#: library/os.rst:2394 msgid "Return a list containing the volumes in the system." msgstr "" -#: library/os.rst:2368 +#: library/os.rst:2396 msgid "" "Volumes are typically represented as a GUID path that looks like ``\\\\?" "\\Volume{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}\\``. Files can usually be " @@ -2513,46 +2527,46 @@ msgid "" "function is to retrieve mount points using :func:`os.listmounts`." msgstr "" -#: library/os.rst:2375 +#: library/os.rst:2403 msgid "May raise :exc:`OSError` if an error occurs collecting the volumes." msgstr "" -#: library/os.rst:2377 +#: library/os.rst:2405 msgid "" "Raises an :ref:`auditing event ` ``os.listvolumes`` with no " "arguments." msgstr "" -#: library/os.rst:2386 +#: library/os.rst:2414 msgid "" "Perform the equivalent of an :c:func:`!lstat` system call on the given path. " "Similar to :func:`~os.stat`, but does not follow symbolic links. Return a :" "class:`stat_result` object." msgstr "" -#: library/os.rst:2390 +#: library/os.rst:2418 msgid "" "On platforms that do not support symbolic links, this is an alias for :func:" "`~os.stat`." msgstr "" -#: library/os.rst:2393 +#: library/os.rst:2421 msgid "" "As of Python 3.3, this is equivalent to ``os.stat(path, dir_fd=dir_fd, " "follow_symlinks=False)``." msgstr "" -#: library/os.rst:2438 library/os.rst:2534 library/os.rst:2608 +#: library/os.rst:2466 library/os.rst:2562 library/os.rst:2636 msgid "" "This function can also support :ref:`paths relative to directory descriptors " "`." msgstr "" -#: library/os.rst:2617 library/os.rst:3465 +#: library/os.rst:2645 library/os.rst:3628 msgid "Added support for Windows 6.0 (Vista) symbolic links." msgstr "" -#: library/os.rst:2412 +#: library/os.rst:2440 msgid "" "On Windows, now opens reparse points that represent another path (name " "surrogates), including symbolic links and directory junctions. Other kinds " @@ -2560,18 +2574,18 @@ msgid "" "stat`." msgstr "" -#: library/os.rst:2421 +#: library/os.rst:2449 msgid "Create a directory named *path* with numeric mode *mode*." msgstr "" -#: library/os.rst:2423 +#: library/os.rst:2451 msgid "" "If the directory already exists, :exc:`FileExistsError` is raised. If a " "parent directory in the path does not exist, :exc:`FileNotFoundError` is " "raised." msgstr "" -#: library/os.rst:2428 +#: library/os.rst:2456 msgid "" "On some systems, *mode* is ignored. Where it is used, the current umask " "value is first masked out. If bits other than the last 9 (i.e. the last 3 " @@ -2580,36 +2594,36 @@ msgid "" "call :func:`chmod` explicitly to set them." msgstr "" -#: library/os.rst:2434 +#: library/os.rst:2462 msgid "" "On Windows, a *mode* of ``0o700`` is specifically handled to apply access " "control to the new directory such that only the current user and " "administrators have access. Other values of *mode* are ignored." msgstr "" -#: library/os.rst:2441 +#: library/os.rst:2469 msgid "" "It is also possible to create temporary directories; see the :mod:`tempfile` " "module's :func:`tempfile.mkdtemp` function." msgstr "" -#: library/os.rst:2481 +#: library/os.rst:2509 msgid "" "Raises an :ref:`auditing event ` ``os.mkdir`` with arguments " "``path``, ``mode``, ``dir_fd``." msgstr "" -#: library/os.rst:2452 +#: library/os.rst:2480 msgid "Windows now handles a *mode* of ``0o700``." msgstr "" -#: library/os.rst:2462 +#: library/os.rst:2490 msgid "" "Recursive directory creation function. Like :func:`mkdir`, but makes all " "intermediate-level directories needed to contain the leaf directory." msgstr "" -#: library/os.rst:2465 +#: library/os.rst:2493 msgid "" "The *mode* parameter is passed to :func:`mkdir` for creating the leaf " "directory; see :ref:`the mkdir() description ` for how it is " @@ -2618,27 +2632,27 @@ msgid "" "file permission bits of existing parent directories are not changed." msgstr "" -#: library/os.rst:2471 +#: library/os.rst:2499 msgid "" "If *exist_ok* is ``False`` (the default), a :exc:`FileExistsError` is raised " "if the target directory already exists." msgstr "" -#: library/os.rst:2476 +#: library/os.rst:2504 msgid "" ":func:`makedirs` will become confused if the path elements to create " "include :data:`pardir` (eg. \"..\" on UNIX systems)." msgstr "" -#: library/os.rst:2479 +#: library/os.rst:2507 msgid "This function handles UNC paths correctly." msgstr "" -#: library/os.rst:2483 +#: library/os.rst:2511 msgid "Added the *exist_ok* parameter." msgstr "" -#: library/os.rst:2488 +#: library/os.rst:2516 msgid "" "Before Python 3.4.1, if *exist_ok* was ``True`` and the directory existed, :" "func:`makedirs` would still raise an error if *mode* did not match the mode " @@ -2646,19 +2660,19 @@ msgid "" "safely, it was removed in Python 3.4.1. See :issue:`21082`." msgstr "" -#: library/os.rst:2496 +#: library/os.rst:2524 msgid "" "The *mode* argument no longer affects the file permission bits of newly " "created intermediate-level directories." msgstr "" -#: library/os.rst:2503 +#: library/os.rst:2531 msgid "" "Create a FIFO (a named pipe) named *path* with numeric mode *mode*. The " "current umask value is first masked out from the mode." msgstr "" -#: library/os.rst:2509 +#: library/os.rst:2537 msgid "" "FIFOs are pipes that can be accessed like regular files. FIFOs exist until " "they are deleted (for example with :func:`os.unlink`). Generally, FIFOs are " @@ -2668,7 +2682,7 @@ msgid "" "rendezvous point." msgstr "" -#: library/os.rst:2526 +#: library/os.rst:2554 msgid "" "Create a filesystem node (file, device special file or named pipe) named " "*path*. *mode* specifies both the permissions to use and the type of node to " @@ -2679,23 +2693,23 @@ msgid "" "`os.makedev`), otherwise it is ignored." msgstr "" -#: library/os.rst:2548 +#: library/os.rst:2576 msgid "" "Extract the device major number from a raw device number (usually the :attr:" "`st_dev` or :attr:`st_rdev` field from :c:struct:`stat`)." msgstr "" -#: library/os.rst:2554 +#: library/os.rst:2582 msgid "" "Extract the device minor number from a raw device number (usually the :attr:" "`st_dev` or :attr:`st_rdev` field from :c:struct:`stat`)." msgstr "" -#: library/os.rst:2560 +#: library/os.rst:2588 msgid "Compose a raw device number from the major and minor device numbers." msgstr "" -#: library/os.rst:2565 +#: library/os.rst:2593 msgid "" "Return system configuration information relevant to a named file. *name* " "specifies the configuration value to retrieve; it may be a string which is " @@ -2706,19 +2720,19 @@ msgid "" "included in that mapping, passing an integer for *name* is also accepted." msgstr "" -#: library/os.rst:3321 library/os.rst:3493 +#: library/os.rst:3342 library/os.rst:3656 msgid "" "This function can support :ref:`specifying a file descriptor `." msgstr "" -#: library/os.rst:2589 +#: library/os.rst:2617 msgid "" "Dictionary mapping names accepted by :func:`pathconf` and :func:`fpathconf` " "to the integer values defined for those names by the host operating system. " "This can be used to determine the set of names known to the system." msgstr "" -#: library/os.rst:2598 +#: library/os.rst:2626 msgid "" "Return a string representing the path to which the symbolic link points. " "The result may be either an absolute or relative pathname; if it is " @@ -2726,7 +2740,7 @@ msgid "" "join(os.path.dirname(path), result)``." msgstr "" -#: library/os.rst:2603 +#: library/os.rst:2631 msgid "" "If the *path* is a string object (directly or indirectly through a :class:" "`PathLike` interface), the result will also be a string object, and the call " @@ -2734,41 +2748,41 @@ msgid "" "indirectly), the result will be a bytes object." msgstr "" -#: library/os.rst:2611 +#: library/os.rst:2639 msgid "" "When trying to resolve a path that may contain links, use :func:`~os.path." "realpath` to properly handle recursion and platform differences." msgstr "" -#: library/os.rst:2623 +#: library/os.rst:2651 msgid "Accepts a :term:`path-like object` on Unix." msgstr "" -#: library/os.rst:2626 +#: library/os.rst:2654 msgid "Accepts a :term:`path-like object` and a bytes object on Windows." msgstr "" -#: library/os.rst:2629 +#: library/os.rst:2657 msgid "" "Added support for directory junctions, and changed to return the " "substitution path (which typically includes ``\\\\?\\`` prefix) rather than " "the optional \"print name\" field that was previously returned." msgstr "" -#: library/os.rst:2635 +#: library/os.rst:2663 msgid "" "Remove (delete) the file *path*. If *path* is a directory, an :exc:" "`OSError` is raised. Use :func:`rmdir` to remove directories. If the file " "does not exist, a :exc:`FileNotFoundError` is raised." msgstr "" -#: library/os.rst:2752 library/os.rst:3444 +#: library/os.rst:2780 library/os.rst:3607 msgid "" "This function can support :ref:`paths relative to directory descriptors " "`." msgstr "" -#: library/os.rst:2642 +#: library/os.rst:2670 msgid "" "On Windows, attempting to remove a file that is in use causes an exception " "to be raised; on Unix, the directory entry is removed but the storage " @@ -2776,17 +2790,17 @@ msgid "" "longer in use." msgstr "" -#: library/os.rst:2646 +#: library/os.rst:2674 msgid "This function is semantically identical to :func:`unlink`." msgstr "" -#: library/os.rst:2670 library/os.rst:3515 +#: library/os.rst:2698 library/os.rst:3678 msgid "" "Raises an :ref:`auditing event ` ``os.remove`` with arguments " "``path``, ``dir_fd``." msgstr "" -#: library/os.rst:2661 +#: library/os.rst:2689 msgid "" "Remove directories recursively. Works like :func:`rmdir` except that, if " "the leaf directory is successfully removed, :func:`removedirs` tries to " @@ -2798,20 +2812,20 @@ msgid "" "could not be successfully removed." msgstr "" -#: library/os.rst:2678 +#: library/os.rst:2706 msgid "" "Rename the file or directory *src* to *dst*. If *dst* exists, the operation " "will fail with an :exc:`OSError` subclass in a number of cases:" msgstr "" -#: library/os.rst:2681 +#: library/os.rst:2709 msgid "" "On Windows, if *dst* exists a :exc:`FileExistsError` is always raised. The " "operation may fail if *src* and *dst* are on different filesystems. Use :" "func:`shutil.move` to support moves to a different filesystem." msgstr "" -#: library/os.rst:2685 +#: library/os.rst:2713 msgid "" "On Unix, if *src* is a file and *dst* is a directory or vice-versa, an :exc:" "`IsADirectoryError` or a :exc:`NotADirectoryError` will be raised " @@ -2823,29 +2837,29 @@ msgid "" "operation (this is a POSIX requirement)." msgstr "" -#: library/os.rst:2734 +#: library/os.rst:2762 msgid "" "This function can support specifying *src_dir_fd* and/or *dst_dir_fd* to " "supply :ref:`paths relative to directory descriptors `." msgstr "" -#: library/os.rst:2697 +#: library/os.rst:2725 msgid "" "If you want cross-platform overwriting of the destination, use :func:" "`replace`." msgstr "" -#: library/os.rst:2720 library/os.rst:2737 +#: library/os.rst:2748 library/os.rst:2765 msgid "" "Raises an :ref:`auditing event ` ``os.rename`` with arguments " "``src``, ``dst``, ``src_dir_fd``, ``dst_dir_fd``." msgstr "" -#: library/os.rst:2701 +#: library/os.rst:2729 msgid "Added the *src_dir_fd* and *dst_dir_fd* parameters." msgstr "" -#: library/os.rst:2710 +#: library/os.rst:2738 msgid "" "Recursive directory or file renaming function. Works like :func:`rename`, " "except creation of any intermediate directories needed to make the new " @@ -2854,17 +2868,17 @@ msgid "" "using :func:`removedirs`." msgstr "" -#: library/os.rst:2717 +#: library/os.rst:2745 msgid "" "This function can fail with the new directory structure made if you lack " "permissions needed to remove the leaf directory or file." msgstr "" -#: library/os.rst:2722 +#: library/os.rst:2750 msgid "Accepts a :term:`path-like object` for *old* and *new*." msgstr "" -#: library/os.rst:2728 +#: library/os.rst:2756 msgid "" "Rename the file or directory *src* to *dst*. If *dst* is a non-empty " "directory, :exc:`OSError` will be raised. If *dst* exists and is a file, it " @@ -2873,7 +2887,7 @@ msgid "" "renaming will be an atomic operation (this is a POSIX requirement)." msgstr "" -#: library/os.rst:2747 +#: library/os.rst:2775 msgid "" "Remove (delete) the directory *path*. If the directory does not exist or is " "not empty, a :exc:`FileNotFoundError` or an :exc:`OSError` is raised " @@ -2881,13 +2895,13 @@ msgid "" "rmtree` can be used." msgstr "" -#: library/os.rst:2755 +#: library/os.rst:2783 msgid "" "Raises an :ref:`auditing event ` ``os.rmdir`` with arguments " "``path``, ``dir_fd``." msgstr "" -#: library/os.rst:2766 +#: library/os.rst:2794 msgid "" "Return an iterator of :class:`os.DirEntry` objects corresponding to the " "entries in the directory given by *path*. The entries are yielded in " @@ -2897,7 +2911,7 @@ msgid "" "unspecified." msgstr "" -#: library/os.rst:2773 +#: library/os.rst:2801 msgid "" "Using :func:`scandir` instead of :func:`listdir` can significantly increase " "the performance of code that also needs file type or file attribute " @@ -2909,7 +2923,7 @@ msgid "" "Unix but only requires one for symbolic links on Windows." msgstr "" -#: library/os.rst:2783 +#: library/os.rst:2811 msgid "" "*path* may be a :term:`path-like object`. If *path* is of type ``bytes`` " "(directly or indirectly through the :class:`PathLike` interface), the type " @@ -2918,30 +2932,30 @@ msgid "" "they will be of type ``str``." msgstr "" -#: library/os.rst:2792 +#: library/os.rst:2820 msgid "" "Raises an :ref:`auditing event ` ``os.scandir`` with argument " "``path``." msgstr "" -#: library/os.rst:2794 +#: library/os.rst:2822 msgid "" "The :func:`scandir` iterator supports the :term:`context manager` protocol " "and has the following method:" msgstr "" -#: library/os.rst:2799 +#: library/os.rst:2827 msgid "Close the iterator and free acquired resources." msgstr "" -#: library/os.rst:2801 +#: library/os.rst:2829 msgid "" "This is called automatically when the iterator is exhausted or garbage " "collected, or when an error happens during iterating. However it is " "advisable to call it explicitly or use the :keyword:`with` statement." msgstr "" -#: library/os.rst:2808 +#: library/os.rst:2836 msgid "" "The following example shows a simple use of :func:`scandir` to display all " "the files (excluding directories) in the given *path* that don't start with " @@ -2949,7 +2963,7 @@ msgid "" "system call::" msgstr "" -#: library/os.rst:2813 +#: library/os.rst:2841 msgid "" "with os.scandir(path) as it:\n" " for entry in it:\n" @@ -2957,7 +2971,7 @@ msgid "" " print(entry.name)" msgstr "" -#: library/os.rst:2820 +#: library/os.rst:2848 msgid "" "On Unix-based systems, :func:`scandir` uses the system's `opendir() `_ and " @@ -2968,7 +2982,7 @@ msgid "" "desktop/aa364428(v=vs.85).aspx>`_ functions." msgstr "" -#: library/os.rst:2832 +#: library/os.rst:2860 msgid "" "Added support for the :term:`context manager` protocol and the :func:" "`~scandir.close` method. If a :func:`scandir` iterator is neither exhausted " @@ -2976,28 +2990,28 @@ msgid "" "destructor." msgstr "" -#: library/os.rst:2838 +#: library/os.rst:2866 msgid "The function accepts a :term:`path-like object`." msgstr "" -#: library/os.rst:2840 +#: library/os.rst:2868 msgid "Added support for :ref:`file descriptors ` on Unix." msgstr "" -#: library/os.rst:2846 +#: library/os.rst:2874 msgid "" "Object yielded by :func:`scandir` to expose the file path and other file " "attributes of a directory entry." msgstr "" -#: library/os.rst:2849 +#: library/os.rst:2877 msgid "" ":func:`scandir` will provide as much of this information as possible without " "making additional system calls. When a ``stat()`` or ``lstat()`` system call " "is made, the ``os.DirEntry`` object will cache the result." msgstr "" -#: library/os.rst:2853 +#: library/os.rst:2881 msgid "" "``os.DirEntry`` instances are not intended to be stored in long-lived data " "structures; if you know the file metadata has changed or if a long time has " @@ -3005,7 +3019,7 @@ msgid "" "up-to-date information." msgstr "" -#: library/os.rst:2858 +#: library/os.rst:2886 msgid "" "Because the ``os.DirEntry`` methods can make operating system calls, they " "may also raise :exc:`OSError`. If you need very fine-grained control over " @@ -3013,83 +3027,94 @@ msgid "" "methods and handle as appropriate." msgstr "" -#: library/os.rst:2863 +#: library/os.rst:2891 msgid "" "To be directly usable as a :term:`path-like object`, ``os.DirEntry`` " "implements the :class:`PathLike` interface." msgstr "" -#: library/os.rst:2866 +#: library/os.rst:2894 +msgid "" +":class:`!DirEntry` objects are :ref:`generic ` over the type of " +"the path (:class:`str` or :class:`bytes`)." +msgstr "" + +#: library/os.rst:2897 msgid "Attributes and methods on a ``os.DirEntry`` instance are as follows:" msgstr "" -#: library/os.rst:2870 +#: library/os.rst:2901 msgid "" "The entry's base filename, relative to the :func:`scandir` *path* argument." msgstr "" -#: library/os.rst:2873 +#: library/os.rst:2904 msgid "" "The :attr:`name` attribute will be ``bytes`` if the :func:`scandir` *path* " "argument is of type ``bytes`` and ``str`` otherwise. Use :func:`~os." "fsdecode` to decode byte filenames." msgstr "" -#: library/os.rst:2879 +#: library/os.rst:2910 msgid "" -"The entry's full path name: equivalent to ``os.path.join(scandir_path, entry." -"name)`` where *scandir_path* is the :func:`scandir` *path* argument. The " -"path is only absolute if the :func:`scandir` *path* argument was absolute. " -"If the :func:`scandir` *path* argument was a :ref:`file descriptor " -"`, the :attr:`path` attribute is the same as the :attr:`name` " -"attribute." +"The entry's path name: equivalent to ``os.path.join(scandir_path, entry." +"name)`` where *scandir_path* is the original :func:`scandir` *path* " +"argument. Apart from the filename, the path preserves the original :func:" +"`scandir` argument. If the :func:`scandir` *path* argument was relative, " +"the :attr:`path` attribute is also relative. Changing the current working " +"directory after creating the :func:`scandir` iterator may cause later uses " +"of :attr:`path` to resolve differently. On some platforms, the constructed " +"path may not be valid if the original :func:`scandir` argument was usable " +"for enumeration but not for joining with the entry name. If the :func:" +"`scandir` *path* argument was a :ref:`file descriptor `, the :attr:" +"`path` attribute is the same as the :attr:`name` attribute." msgstr "" -#: library/os.rst:2886 +#: library/os.rst:2923 msgid "" "The :attr:`path` attribute will be ``bytes`` if the :func:`scandir` *path* " "argument is of type ``bytes`` and ``str`` otherwise. Use :func:`~os." "fsdecode` to decode byte filenames." msgstr "" -#: library/os.rst:2892 +#: library/os.rst:2929 msgid "Return the inode number of the entry." msgstr "" -#: library/os.rst:2894 +#: library/os.rst:2931 msgid "" "The result is cached on the ``os.DirEntry`` object. Use ``os.stat(entry." "path, follow_symlinks=False).st_ino`` to fetch up-to-date information." msgstr "" -#: library/os.rst:2898 +#: library/os.rst:2935 msgid "" "On the first, uncached call, a system call is required on Windows but not on " "Unix." msgstr "" -#: library/os.rst:2903 +#: library/os.rst:2940 msgid "" "Return ``True`` if this entry is a directory or a symbolic link pointing to " "a directory; return ``False`` if the entry is or points to any other kind of " "file, or if it doesn't exist anymore." msgstr "" -#: library/os.rst:2907 +#: library/os.rst:2944 msgid "" "If *follow_symlinks* is ``False``, return ``True`` only if this entry is a " "directory (without following symlinks); return ``False`` if the entry is any " "other kind of file or if it doesn't exist anymore." msgstr "" -#: library/os.rst:2911 +#: library/os.rst:2948 msgid "" "The result is cached on the ``os.DirEntry`` object, with a separate cache " "for *follow_symlinks* ``True`` and ``False``. Call :func:`os.stat` along " "with :func:`stat.S_ISDIR` to fetch up-to-date information." msgstr "" -#: library/os.rst:2915 +#: library/os.rst:2952 msgid "" "On the first, uncached call, no system call is required in most cases. " "Specifically, for non-symlinks, neither Windows or Unix require a system " @@ -3099,46 +3124,46 @@ msgid "" "is ``False``." msgstr "" -#: library/os.rst:2952 +#: library/os.rst:2989 msgid "" "This method can raise :exc:`OSError`, such as :exc:`PermissionError`, but :" "exc:`FileNotFoundError` is caught and not raised." msgstr "" -#: library/os.rst:2927 +#: library/os.rst:2964 msgid "" "Return ``True`` if this entry is a file or a symbolic link pointing to a " "file; return ``False`` if the entry is or points to a directory or other non-" "file entry, or if it doesn't exist anymore." msgstr "" -#: library/os.rst:2931 +#: library/os.rst:2968 msgid "" "If *follow_symlinks* is ``False``, return ``True`` only if this entry is a " "file (without following symlinks); return ``False`` if the entry is a " "directory or other non-file entry, or if it doesn't exist anymore." msgstr "" -#: library/os.rst:2935 +#: library/os.rst:2972 msgid "" "The result is cached on the ``os.DirEntry`` object. Caching, system calls " "made, and exceptions raised are as per :func:`~os.DirEntry.is_dir`." msgstr "" -#: library/os.rst:2940 +#: library/os.rst:2977 msgid "" "Return ``True`` if this entry is a symbolic link (even if broken); return " "``False`` if the entry points to a directory or any kind of file, or if it " "doesn't exist anymore." msgstr "" -#: library/os.rst:2944 +#: library/os.rst:2981 msgid "" "The result is cached on the ``os.DirEntry`` object. Call :func:`os.path." "islink` to fetch up-to-date information." msgstr "" -#: library/os.rst:2947 +#: library/os.rst:2984 msgid "" "On the first, uncached call, no system call is required in most cases. " "Specifically, neither Windows or Unix require a system call, except on " @@ -3146,48 +3171,48 @@ msgid "" "``dirent.d_type == DT_UNKNOWN``." msgstr "" -#: library/os.rst:2957 +#: library/os.rst:2994 msgid "" "Return ``True`` if this entry is a junction (even if broken); return " "``False`` if the entry points to a regular directory, any kind of file, a " "symlink, or if it doesn't exist anymore." msgstr "" -#: library/os.rst:2961 +#: library/os.rst:2998 msgid "" "The result is cached on the ``os.DirEntry`` object. Call :func:`os.path." "isjunction` to fetch up-to-date information." msgstr "" -#: library/os.rst:2968 +#: library/os.rst:3005 msgid "" "Return a :class:`stat_result` object for this entry. This method follows " "symbolic links by default; to stat a symbolic link add the " "``follow_symlinks=False`` argument." msgstr "" -#: library/os.rst:2972 +#: library/os.rst:3009 msgid "" "On Unix, this method always requires a system call. On Windows, it only " "requires a system call if *follow_symlinks* is ``True`` and the entry is a " "reparse point (for example, a symbolic link or directory junction)." msgstr "" -#: library/os.rst:2977 +#: library/os.rst:3014 msgid "" "On Windows, the ``st_ino``, ``st_dev`` and ``st_nlink`` attributes of the :" "class:`stat_result` are always set to zero. Call :func:`os.stat` to get " "these attributes." msgstr "" -#: library/os.rst:2981 +#: library/os.rst:3018 msgid "" "The result is cached on the ``os.DirEntry`` object, with a separate cache " "for *follow_symlinks* ``True`` and ``False``. Call :func:`os.stat` to fetch " "up-to-date information." msgstr "" -#: library/os.rst:2985 +#: library/os.rst:3022 msgid "" "Note that there is a nice correspondence between several attributes and " "methods of ``os.DirEntry`` and of :class:`pathlib.Path`. In particular, the " @@ -3195,13 +3220,13 @@ msgid "" "``is_file()``, ``is_symlink()``, ``is_junction()``, and ``stat()`` methods." msgstr "" -#: library/os.rst:2993 +#: library/os.rst:3030 msgid "" "Added support for the :class:`~os.PathLike` interface. Added support for :" "class:`bytes` paths on Windows." msgstr "" -#: library/os.rst:2997 +#: library/os.rst:3034 msgid "" "The ``st_ctime`` attribute of a stat result is deprecated on Windows. The " "file creation time is properly available as ``st_birthtime``, and in the " @@ -3209,7 +3234,7 @@ msgid "" "time, if available." msgstr "" -#: library/os.rst:3006 +#: library/os.rst:3043 msgid "" "Get the status of a file or a file descriptor. Perform the equivalent of a :" "c:func:`stat` system call on the given path. *path* may be specified as " @@ -3218,19 +3243,19 @@ msgid "" "`stat_result` object." msgstr "" -#: library/os.rst:3012 +#: library/os.rst:3049 msgid "" "This function normally follows symlinks; to stat a symlink add the argument " "``follow_symlinks=False``, or use :func:`lstat`." msgstr "" -#: library/os.rst:4097 library/os.rst:4129 library/os.rst:4149 +#: library/os.rst:4260 library/os.rst:4292 library/os.rst:4312 msgid "" "This function can support :ref:`specifying a file descriptor ` and :" "ref:`not following symlinks `." msgstr "" -#: library/os.rst:3018 +#: library/os.rst:3055 msgid "" "On Windows, passing ``follow_symlinks=False`` will disable following all " "name-surrogate reparse points, which includes symlinks and directory " @@ -3244,11 +3269,11 @@ msgid "" "junction points, which will raise the usual exceptions." msgstr "" -#: library/os.rst:3804 +#: library/os.rst:3967 msgid "Example::" msgstr "" -#: library/os.rst:3033 +#: library/os.rst:3070 msgid "" ">>> import os\n" ">>> statinfo = os.stat('somefile.txt')\n" @@ -3260,17 +3285,17 @@ msgid "" "264" msgstr "" -#: library/os.rst:3044 +#: library/os.rst:3081 msgid ":func:`fstat` and :func:`lstat` functions." msgstr "" -#: library/os.rst:3046 +#: library/os.rst:3083 msgid "" "Added the *dir_fd* and *follow_symlinks* parameters, specifying a file " "descriptor instead of a path." msgstr "" -#: library/os.rst:3053 +#: library/os.rst:3090 msgid "" "On Windows, all reparse points that can be resolved by the operating system " "are now followed, and passing ``follow_symlinks=False`` disables following " @@ -3280,122 +3305,122 @@ msgid "" "of raising an error." msgstr "" -#: library/os.rst:3064 +#: library/os.rst:3101 msgid "" "Object whose attributes correspond roughly to the members of the :c:struct:" "`stat` structure. It is used for the result of :func:`os.stat`, :func:`os." "fstat` and :func:`os.lstat`." msgstr "" -#: library/os.rst:3068 +#: library/os.rst:3105 msgid "Attributes:" msgstr "" -#: library/os.rst:3072 +#: library/os.rst:3109 msgid "File mode: file type and file mode bits (permissions)." msgstr "" -#: library/os.rst:3076 +#: library/os.rst:3113 msgid "" "Platform dependent, but if non-zero, uniquely identifies the file for a " "given value of ``st_dev``. Typically:" msgstr "" -#: library/os.rst:3079 +#: library/os.rst:3116 msgid "the inode number on Unix," msgstr "" -#: library/os.rst:3080 +#: library/os.rst:3117 msgid "" "the `file index `_ on " "Windows" msgstr "" -#: library/os.rst:3086 +#: library/os.rst:3123 msgid "Identifier of the device on which this file resides." msgstr "" -#: library/os.rst:3090 +#: library/os.rst:3127 msgid "Number of hard links." msgstr "" -#: library/os.rst:3094 +#: library/os.rst:3131 msgid "User identifier of the file owner." msgstr "" -#: library/os.rst:3098 +#: library/os.rst:3135 msgid "Group identifier of the file owner." msgstr "" -#: library/os.rst:3102 +#: library/os.rst:3139 msgid "" "Size of the file in bytes, if it is a regular file or a symbolic link. The " "size of a symbolic link is the length of the pathname it contains, without a " "terminating null byte." msgstr "" -#: library/os.rst:3106 +#: library/os.rst:3143 msgid "Timestamps:" msgstr "" -#: library/os.rst:3110 +#: library/os.rst:3147 msgid "Time of most recent access expressed in seconds." msgstr "" -#: library/os.rst:3114 +#: library/os.rst:3151 msgid "Time of most recent content modification expressed in seconds." msgstr "" -#: library/os.rst:3118 +#: library/os.rst:3155 msgid "Time of most recent metadata change expressed in seconds." msgstr "" -#: library/os.rst:3120 +#: library/os.rst:3157 msgid "" "``st_ctime`` is deprecated on Windows. Use ``st_birthtime`` for the file " "creation time. In the future, ``st_ctime`` will contain the time of the most " "recent metadata change, as for other platforms." msgstr "" -#: library/os.rst:3127 +#: library/os.rst:3164 msgid "Time of most recent access expressed in nanoseconds as an integer." msgstr "" -#: library/os.rst:3133 +#: library/os.rst:3170 msgid "" "Time of most recent content modification expressed in nanoseconds as an " "integer." msgstr "" -#: library/os.rst:3140 +#: library/os.rst:3177 msgid "" "Time of most recent metadata change expressed in nanoseconds as an integer." msgstr "" -#: library/os.rst:3145 +#: library/os.rst:3182 msgid "" "``st_ctime_ns`` is deprecated on Windows. Use ``st_birthtime_ns`` for the " "file creation time. In the future, ``st_ctime`` will contain the time of the " "most recent metadata change, as for other platforms." msgstr "" -#: library/os.rst:3152 +#: library/os.rst:3189 msgid "" "Time of file creation expressed in seconds. This attribute is not always " "available, and may raise :exc:`AttributeError`." msgstr "" -#: library/os.rst:3155 +#: library/os.rst:3192 msgid "``st_birthtime`` is now available on Windows." msgstr "" -#: library/os.rst:3160 +#: library/os.rst:3197 msgid "" "Time of file creation expressed in nanoseconds as an integer. This attribute " "is not always available, and may raise :exc:`AttributeError`." msgstr "" -#: library/os.rst:3168 +#: library/os.rst:3205 msgid "" "The exact meaning and resolution of the :attr:`st_atime`, :attr:`st_mtime`, :" "attr:`st_ctime` and :attr:`st_birthtime` attributes depend on the operating " @@ -3405,7 +3430,7 @@ msgid "" "details." msgstr "" -#: library/os.rst:3175 +#: library/os.rst:3212 msgid "" "Similarly, although :attr:`st_atime_ns`, :attr:`st_mtime_ns`, :attr:" "`st_ctime_ns` and :attr:`st_birthtime_ns` are always expressed in " @@ -3418,74 +3443,74 @@ msgid "" "`st_birthtime_ns`." msgstr "" -#: library/os.rst:3185 +#: library/os.rst:3222 msgid "" "On some Unix systems (such as Linux), the following attributes may also be " "available:" msgstr "" -#: library/os.rst:3190 +#: library/os.rst:3227 msgid "" "Number of 512-byte blocks allocated for file. This may be smaller than :attr:" "`st_size`/512 when the file has holes." msgstr "" -#: library/os.rst:3195 +#: library/os.rst:3232 msgid "" "\"Preferred\" blocksize for efficient file system I/O. Writing to a file in " "smaller chunks may cause an inefficient read-modify-rewrite." msgstr "" -#: library/os.rst:3200 +#: library/os.rst:3237 msgid "Type of device if an inode device." msgstr "" -#: library/os.rst:3204 +#: library/os.rst:3241 msgid "User defined flags for file." msgstr "" -#: library/os.rst:3206 +#: library/os.rst:3243 msgid "" "On other Unix systems (such as FreeBSD), the following attributes may be " "available (but may be only filled out if root tries to use them):" msgstr "" -#: library/os.rst:3211 +#: library/os.rst:3248 msgid "File generation number." msgstr "" -#: library/os.rst:3213 +#: library/os.rst:3250 msgid "" "On Solaris and derivatives, the following attributes may also be available:" msgstr "" -#: library/os.rst:3218 +#: library/os.rst:3255 msgid "" "String that uniquely identifies the type of the filesystem that contains the " "file." msgstr "" -#: library/os.rst:3221 +#: library/os.rst:3258 msgid "On macOS systems, the following attributes may also be available:" msgstr "" -#: library/os.rst:3225 +#: library/os.rst:3262 msgid "Real size of the file." msgstr "" -#: library/os.rst:3229 +#: library/os.rst:3266 msgid "Creator of the file." msgstr "" -#: library/os.rst:3233 +#: library/os.rst:3270 msgid "File type." msgstr "" -#: library/os.rst:3235 +#: library/os.rst:3272 msgid "On Windows systems, the following attributes are also available:" msgstr "" -#: library/os.rst:3239 +#: library/os.rst:3276 msgid "" "Windows file attributes: ``dwFileAttributes`` member of the " "``BY_HANDLE_FILE_INFORMATION`` structure returned by :c:func:`!" @@ -3493,7 +3518,7 @@ msgid "" "FILE_ATTRIBUTE_ARCHIVE>` constants in the :mod:`stat` module." msgstr "" -#: library/os.rst:3249 +#: library/os.rst:3286 msgid "" "When :attr:`st_file_attributes` has the :const:`~stat." "FILE_ATTRIBUTE_REPARSE_POINT` set, this field contains the tag identifying " @@ -3501,14 +3526,14 @@ msgid "" "IO_REPARSE_TAG_SYMLINK>` constants in the :mod:`stat` module." msgstr "" -#: library/os.rst:3254 +#: library/os.rst:3291 msgid "" "The standard module :mod:`stat` defines functions and constants that are " "useful for extracting information from a :c:struct:`stat` structure. (On " "Windows, some items are filled with dummy values.)" msgstr "" -#: library/os.rst:3258 +#: library/os.rst:3295 msgid "" "For backward compatibility, a :class:`stat_result` instance is also " "accessible as a tuple of at least 10 integers giving the most important (and " @@ -3520,96 +3545,169 @@ msgid "" "class:`stat_result` as a tuple always returns integers." msgstr "" -#: library/os.rst:3267 +#: library/os.rst:3304 msgid "Windows now returns the file index as :attr:`st_ino` when available." msgstr "" -#: library/os.rst:3271 +#: library/os.rst:3308 msgid "Added the :attr:`st_fstype` member to Solaris/derivatives." msgstr "" -#: library/os.rst:3274 +#: library/os.rst:3311 msgid "Added the :attr:`st_reparse_tag` member on Windows." msgstr "" -#: library/os.rst:3277 +#: library/os.rst:3314 msgid "" "On Windows, the :attr:`st_mode` member now identifies special files as :" "const:`S_IFCHR`, :const:`S_IFIFO` or :const:`S_IFBLK` as appropriate." msgstr "" -#: library/os.rst:3282 +#: library/os.rst:3319 msgid "" "On Windows, :attr:`st_ctime` is deprecated. Eventually, it will contain the " "last metadata change time, for consistency with other platforms, but for now " "still contains creation time. Use :attr:`st_birthtime` for the creation time." msgstr "" -#: library/os.rst:3288 +#: library/os.rst:3325 msgid "" "On Windows, :attr:`st_ino` may now be up to 128 bits, depending on the file " "system. Previously it would not be above 64 bits, and larger file " "identifiers would be arbitrarily packed." msgstr "" -#: library/os.rst:3292 +#: library/os.rst:3329 msgid "" "On Windows, :attr:`st_rdev` no longer returns a value. Previously it would " "contain the same as :attr:`st_dev`, which was incorrect." msgstr "" -#: library/os.rst:3295 +#: library/os.rst:3332 msgid "Added the :attr:`st_birthtime` member on Windows." msgstr "" -#: library/os.rst:3300 +#: library/os.rst:3337 msgid "" -"Perform a :c:func:`!statvfs` system call on the given path. The return " -"value is an object whose attributes describe the filesystem on the given " -"path, and correspond to the members of the :c:struct:`statvfs` structure, " -"namely: :attr:`f_bsize`, :attr:`f_frsize`, :attr:`f_blocks`, :attr:" -"`f_bfree`, :attr:`f_bavail`, :attr:`f_files`, :attr:`f_ffree`, :attr:" -"`f_favail`, :attr:`f_flag`, :attr:`f_namemax`, :attr:`f_fsid`." +"Perform a :manpage:`statvfs(3)` system call on the given path. The return " +"value is a :class:`statvfs_result` whose attributes describe the filesystem " +"on the given path and correspond to the members of the :c:struct:`statvfs` " +"structure." msgstr "" -#: library/os.rst:3307 +#: library/os.rst:3355 msgid "" -"Two module-level constants are defined for the :attr:`f_flag` attribute's " -"bit-flags: if :const:`ST_RDONLY` is set, the filesystem is mounted read-" -"only, and if :const:`ST_NOSUID` is set, the semantics of setuid/setgid bits " -"are disabled or not supported." +"Filesystem statistics returned by :func:`os.statvfs` and :func:`os." +"fstatvfs`. See :manpage:`statvfs(3)` for more details." msgstr "" -#: library/os.rst:3312 +#: library/os.rst:3360 +msgid "Block size." +msgstr "" + +#: library/os.rst:3364 +msgid "Fragment size." +msgstr "" + +#: library/os.rst:3368 msgid "" -"Additional module-level constants are defined for GNU/glibc based systems. " -"These are :const:`ST_NODEV` (disallow access to device special files), :" -"const:`ST_NOEXEC` (disallow program execution), :const:`ST_SYNCHRONOUS` " -"(writes are synced at once), :const:`ST_MANDLOCK` (allow mandatory locks on " -"an FS), :const:`ST_WRITE` (write on file/directory/symlink), :const:" -"`ST_APPEND` (append-only file), :const:`ST_IMMUTABLE` (immutable file), :" -"const:`ST_NOATIME` (do not update access times), :const:`ST_NODIRATIME` (do " -"not update directory access times), :const:`ST_RELATIME` (update atime " -"relative to mtime/ctime)." +"Number of :attr:`~statvfs_result.f_frsize` sized blocks the filesystem can " +"contain." msgstr "" -#: library/os.rst:3325 -msgid "The :const:`ST_RDONLY` and :const:`ST_NOSUID` constants were added." +#: library/os.rst:3373 +msgid "Number of free blocks." +msgstr "" + +#: library/os.rst:3377 +msgid "Number of free blocks for unprivileged users." +msgstr "" + +#: library/os.rst:3381 +msgid "Number of file entries, inodes, the filesystem can contain." +msgstr "" + +#: library/os.rst:3385 +msgid "Number of free files entries." +msgstr "" + +#: library/os.rst:3389 +msgid "Number of free file entries for unprivileged users." msgstr "" -#: library/os.rst:3331 +#: library/os.rst:3393 msgid "" -"The :const:`ST_NODEV`, :const:`ST_NOEXEC`, :const:`ST_SYNCHRONOUS`, :const:" -"`ST_MANDLOCK`, :const:`ST_WRITE`, :const:`ST_APPEND`, :const:" -"`ST_IMMUTABLE`, :const:`ST_NOATIME`, :const:`ST_NODIRATIME`, and :const:" -"`ST_RELATIME` constants were added." +"Bit-mask of mount flags. The following flags are defined: :data:" +"`ST_RDONLY`, :data:`ST_NOSUID`, :data:`ST_NODEV`, :data:`ST_NOEXEC`, :data:" +"`ST_SYNCHRONOUS`, :data:`ST_MANDLOCK`, :data:`ST_WRITE`, :data:`ST_APPEND`, :" +"data:`ST_IMMUTABLE`, :data:`ST_NOATIME`, :data:`ST_NODIRATIME`, and :data:" +"`ST_RELATIME`." msgstr "" -#: library/os.rst:3340 -msgid "Added the :attr:`f_fsid` attribute." +#: library/os.rst:3401 +msgid "" +"Filesystem max filename length. OS specific limitations such as :ref:" +"`Windows MAX_PATH ` and those described in Linux :manpage:" +"`pathname(7)` may exist." msgstr "" -#: library/os.rst:3346 +#: library/os.rst:3407 +msgid "Filesystem ID." +msgstr "" + +#: library/os.rst:3412 +msgid "The following flags are used in :attr:`statvfs_result.f_flag`." +msgstr "" + +#: library/os.rst:3416 +msgid "Read-only filesystem." +msgstr "" + +#: library/os.rst:3422 +msgid "Setuid/setgid bits are disabled or not supported." +msgstr "" + +#: library/os.rst:3428 +msgid "Disallow access to device special files." +msgstr "" + +#: library/os.rst:3436 +msgid "Disallow program execution." +msgstr "" + +#: library/os.rst:3444 +msgid "Writes are synced at once." +msgstr "" + +#: library/os.rst:3452 +msgid "Allow mandatory locks on an FS." +msgstr "" + +#: library/os.rst:3460 +msgid "Write on file/directory/symlink." +msgstr "" + +#: library/os.rst:3468 +msgid "Append-only file." +msgstr "" + +#: library/os.rst:3476 +msgid "Immutable file." +msgstr "" + +#: library/os.rst:3484 +msgid "Do not update access times." +msgstr "" + +#: library/os.rst:3492 +msgid "Do not update directory access times." +msgstr "" + +#: library/os.rst:3500 +msgid "Update atime relative to mtime/ctime." +msgstr "" + +#: library/os.rst:3509 msgid "" "A :class:`set` object indicating which functions in the :mod:`os` module " "accept an open file descriptor for their *dir_fd* parameter. Different " @@ -3621,7 +3719,7 @@ msgid "" "(Specifying ``None`` for *dir_fd* is always supported on all platforms.)" msgstr "" -#: library/os.rst:3356 +#: library/os.rst:3519 msgid "" "To check whether a particular function accepts an open file descriptor for " "its *dir_fd* parameter, use the ``in`` operator on ``supports_dir_fd``. As " @@ -3629,17 +3727,17 @@ msgid "" "open file descriptors for *dir_fd* on the local platform::" msgstr "" -#: library/os.rst:3361 +#: library/os.rst:3524 msgid "os.stat in os.supports_dir_fd" msgstr "" -#: library/os.rst:3363 +#: library/os.rst:3526 msgid "" "Currently *dir_fd* parameters only work on Unix platforms; none of them work " "on Windows." msgstr "" -#: library/os.rst:3371 +#: library/os.rst:3534 msgid "" "A :class:`set` object indicating whether :func:`os.access` permits " "specifying ``True`` for its *effective_ids* parameter on the local platform. " @@ -3648,23 +3746,23 @@ msgid "" "func:`os.access`; otherwise it will be empty." msgstr "" -#: library/os.rst:3377 +#: library/os.rst:3540 msgid "" "This expression evaluates to ``True`` if :func:`os.access` supports " "``effective_ids=True`` on the local platform::" msgstr "" -#: library/os.rst:3380 +#: library/os.rst:3543 msgid "os.access in os.supports_effective_ids" msgstr "" -#: library/os.rst:3382 +#: library/os.rst:3545 msgid "" "Currently *effective_ids* is only supported on Unix platforms; it does not " "work on Windows." msgstr "" -#: library/os.rst:3390 +#: library/os.rst:3553 msgid "" "A :class:`set` object indicating which functions in the :mod:`os` module " "permit specifying their *path* parameter as an open file descriptor on the " @@ -3673,7 +3771,7 @@ msgid "" "*path* arguments is not available on all platforms Python supports." msgstr "" -#: library/os.rst:3397 +#: library/os.rst:3560 msgid "" "To determine whether a particular function permits specifying an open file " "descriptor for its *path* parameter, use the ``in`` operator on " @@ -3682,11 +3780,11 @@ msgid "" "platform::" msgstr "" -#: library/os.rst:3403 +#: library/os.rst:3566 msgid "os.chdir in os.supports_fd" msgstr "" -#: library/os.rst:3410 +#: library/os.rst:3573 msgid "" "A :class:`set` object indicating which functions in the :mod:`os` module " "accept ``False`` for their *follow_symlinks* parameter on the local " @@ -3699,7 +3797,7 @@ msgid "" "on all platforms.)" msgstr "" -#: library/os.rst:3420 +#: library/os.rst:3583 msgid "" "To check whether a particular function accepts ``False`` for its " "*follow_symlinks* parameter, use the ``in`` operator on " @@ -3708,21 +3806,21 @@ msgid "" "stat` on the local platform::" msgstr "" -#: library/os.rst:3426 +#: library/os.rst:3589 msgid "os.stat in os.supports_follow_symlinks" msgstr "" -#: library/os.rst:3433 +#: library/os.rst:3596 msgid "Create a symbolic link pointing to *src* named *dst*." msgstr "" -#: library/os.rst:3435 +#: library/os.rst:3598 msgid "" "The *src* parameter refers to the target of the link (the file or directory " "being linked to), and *dst* is the name of the link being created." msgstr "" -#: library/os.rst:3438 +#: library/os.rst:3601 msgid "" "On Windows, a symlink represents either a file or a directory, and does not " "morph to the target dynamically. If the target is present, the type of the " @@ -3732,7 +3830,7 @@ msgid "" "ignored." msgstr "" -#: library/os.rst:3449 +#: library/os.rst:3612 msgid "" "On newer versions of Windows 10, unprivileged accounts can create symlinks " "if Developer Mode is enabled. When Developer Mode is not available/enabled, " @@ -3740,83 +3838,83 @@ msgid "" "must be run as an administrator." msgstr "" -#: library/os.rst:3455 +#: library/os.rst:3618 msgid "" ":exc:`OSError` is raised when the function is called by an unprivileged user." msgstr "" -#: library/os.rst:3458 +#: library/os.rst:3621 msgid "" "Raises an :ref:`auditing event ` ``os.symlink`` with arguments " "``src``, ``dst``, ``dir_fd``." msgstr "" -#: library/os.rst:3468 +#: library/os.rst:3631 msgid "" "Added the *dir_fd* parameter, and now allow *target_is_directory* on non-" "Windows platforms." msgstr "" -#: library/os.rst:3475 +#: library/os.rst:3638 msgid "Added support for unelevated symlinks on Windows with Developer Mode." msgstr "" -#: library/os.rst:3481 +#: library/os.rst:3644 msgid "Force write of everything to disk." msgstr "" -#: library/os.rst:3490 +#: library/os.rst:3653 msgid "" "Truncate the file corresponding to *path*, so that it is at most *length* " "bytes in size." msgstr "" -#: library/os.rst:3495 +#: library/os.rst:3658 msgid "" "Raises an :ref:`auditing event ` ``os.truncate`` with arguments " "``path``, ``length``." msgstr "" -#: library/os.rst:3510 +#: library/os.rst:3673 msgid "" "Remove (delete) the file *path*. This function is semantically identical " "to :func:`remove`; the ``unlink`` name is its traditional Unix name. Please " "see the documentation for :func:`remove` for further information." msgstr "" -#: library/os.rst:3526 +#: library/os.rst:3689 msgid "Set the access and modified times of the file specified by *path*." msgstr "" -#: library/os.rst:3528 +#: library/os.rst:3691 msgid "" ":func:`utime` takes two optional parameters, *times* and *ns*. These specify " "the times set on *path* and are used as follows:" msgstr "" -#: library/os.rst:3531 +#: library/os.rst:3694 msgid "" "If *ns* is specified, it must be a 2-tuple of the form ``(atime_ns, " "mtime_ns)`` where each member is an int expressing nanoseconds." msgstr "" -#: library/os.rst:3534 +#: library/os.rst:3697 msgid "" "If *times* is not ``None``, it must be a 2-tuple of the form ``(atime, " "mtime)`` where each member is an int or float expressing seconds." msgstr "" -#: library/os.rst:3537 +#: library/os.rst:3700 msgid "" "If *times* is ``None`` and *ns* is unspecified, this is equivalent to " "specifying ``ns=(atime_ns, mtime_ns)`` where both times are the current time." msgstr "" -#: library/os.rst:3541 +#: library/os.rst:3704 msgid "It is an error to specify tuples for both *times* and *ns*." msgstr "" -#: library/os.rst:3543 +#: library/os.rst:3706 msgid "" "Note that the exact times you set here may not be returned by a subsequent :" "func:`~os.stat` call, depending on the resolution with which your operating " @@ -3826,19 +3924,19 @@ msgid "" "func:`utime`." msgstr "" -#: library/os.rst:3554 +#: library/os.rst:3717 msgid "" "Raises an :ref:`auditing event ` ``os.utime`` with arguments " "``path``, ``times``, ``ns``, ``dir_fd``." msgstr "" -#: library/os.rst:3556 +#: library/os.rst:3719 msgid "" "Added support for specifying *path* as an open file descriptor, and the " "*dir_fd*, *follow_symlinks*, and *ns* parameters." msgstr "" -#: library/os.rst:3570 +#: library/os.rst:3733 msgid "" "Generate the file names in a directory tree by walking the tree either top-" "down or bottom-up. For each directory in the tree rooted at directory *top* " @@ -3846,7 +3944,7 @@ msgid "" "filenames)``." msgstr "" -#: library/os.rst:3575 +#: library/os.rst:3738 msgid "" "*dirpath* is a string, the path to the directory. *dirnames* is a list of " "the names of the subdirectories in *dirpath* (including symlinks to " @@ -3860,7 +3958,7 @@ msgid "" "unspecified." msgstr "" -#: library/os.rst:3586 +#: library/os.rst:3749 msgid "" "If optional argument *topdown* is ``True`` or not specified, the triple for " "a directory is generated before the triples for any of its subdirectories " @@ -3871,7 +3969,7 @@ msgid "" "its subdirectories are generated." msgstr "" -#: library/os.rst:3594 +#: library/os.rst:3757 msgid "" "When *topdown* is ``True``, the caller can modify the *dirnames* list in-" "place (perhaps using :keyword:`del` or slice assignment), and :func:`walk` " @@ -3884,7 +3982,7 @@ msgid "" "itself is generated." msgstr "" -#: library/os.rst:3603 +#: library/os.rst:3766 msgid "" "By default, errors from the :func:`scandir` call are ignored. If optional " "argument *onerror* is specified, it should be a function; it will be called " @@ -3894,35 +3992,35 @@ msgid "" "object." msgstr "" -#: library/os.rst:3609 +#: library/os.rst:3772 msgid "" "By default, :func:`walk` will not walk down into symbolic links that resolve " "to directories. Set *followlinks* to ``True`` to visit directories pointed " "to by symlinks, on systems that support them." msgstr "" -#: library/os.rst:3615 +#: library/os.rst:3778 msgid "" "Be aware that setting *followlinks* to ``True`` can lead to infinite " "recursion if a link points to a parent directory of itself. :func:`walk` " "does not keep track of the directories it visited already." msgstr "" -#: library/os.rst:3621 +#: library/os.rst:3784 msgid "" "If you pass a relative pathname, don't change the current working directory " "between resumptions of :func:`walk`. :func:`walk` never changes the current " "directory, and assumes that its caller doesn't either." msgstr "" -#: library/os.rst:3687 +#: library/os.rst:3850 msgid "" "This example displays the number of bytes taken by non-directory files in " "each directory under the starting directory, except that it doesn't look " "under any ``__pycache__`` subdirectory::" msgstr "" -#: library/os.rst:3629 +#: library/os.rst:3792 msgid "" "import os\n" "from os.path import join, getsize\n" @@ -3934,14 +4032,14 @@ msgid "" " dirs.remove('__pycache__') # don't visit __pycache__ directories" msgstr "" -#: library/os.rst:3638 +#: library/os.rst:3801 msgid "" "In the next example (simple implementation of :func:`shutil.rmtree`), " "walking the tree bottom-up is essential, :func:`rmdir` doesn't allow " "deleting a directory before the directory is empty::" msgstr "" -#: library/os.rst:3642 +#: library/os.rst:3805 msgid "" "# Delete everything reachable from the directory named in \"top\",\n" "# assuming there are no symbolic links.\n" @@ -3956,31 +4054,31 @@ msgid "" "os.rmdir(top)" msgstr "" -#: library/os.rst:3654 +#: library/os.rst:3817 msgid "" "Raises an :ref:`auditing event ` ``os.walk`` with arguments " "``top``, ``topdown``, ``onerror``, ``followlinks``." msgstr "" -#: library/os.rst:3656 +#: library/os.rst:3819 msgid "" "This function now calls :func:`os.scandir` instead of :func:`os.listdir`, " "making it faster by reducing the number of calls to :func:`os.stat`." msgstr "" -#: library/os.rst:3670 +#: library/os.rst:3833 msgid "" "This behaves exactly like :func:`walk`, except that it yields a 4-tuple " "``(dirpath, dirnames, filenames, dirfd)``, and it supports ``dir_fd``." msgstr "" -#: library/os.rst:3673 +#: library/os.rst:3836 msgid "" "*dirpath*, *dirnames* and *filenames* are identical to :func:`walk` output, " "and *dirfd* is a file descriptor referring to the directory *dirpath*." msgstr "" -#: library/os.rst:3676 +#: library/os.rst:3839 msgid "" "This function always supports :ref:`paths relative to directory descriptors " "` and :ref:`not following symlinks `. Note however " @@ -3988,14 +4086,14 @@ msgid "" "*follow_symlinks* is ``False``." msgstr "" -#: library/os.rst:3683 +#: library/os.rst:3846 msgid "" "Since :func:`fwalk` yields file descriptors, those are only valid until the " "next iteration step, so you should duplicate them (e.g. with :func:`dup`) if " "you want to keep them longer." msgstr "" -#: library/os.rst:3691 +#: library/os.rst:3854 msgid "" "import os\n" "for root, dirs, files, rootfd in os.fwalk('python/Lib/xml'):\n" @@ -4007,13 +4105,13 @@ msgid "" " dirs.remove('__pycache__') # don't visit __pycache__ directories" msgstr "" -#: library/os.rst:3700 +#: library/os.rst:3863 msgid "" "In the next example, walking the tree bottom-up is essential: :func:`rmdir` " "doesn't allow deleting a directory before the directory is empty::" msgstr "" -#: library/os.rst:3704 +#: library/os.rst:3867 msgid "" "# Delete everything reachable from the directory named in \"top\",\n" "# assuming there are no symbolic links.\n" @@ -4027,17 +4125,17 @@ msgid "" " os.rmdir(name, dir_fd=rootfd)" msgstr "" -#: library/os.rst:3715 +#: library/os.rst:3878 msgid "" "Raises an :ref:`auditing event ` ``os.fwalk`` with arguments " "``top``, ``topdown``, ``onerror``, ``follow_symlinks``, ``dir_fd``." msgstr "" -#: library/os.rst:3724 +#: library/os.rst:3887 msgid "Added support for :class:`bytes` paths." msgstr "" -#: library/os.rst:3730 +#: library/os.rst:3893 msgid "" "Create an anonymous file and return a file descriptor that refers to it. " "*flags* must be one of the ``os.MFD_*`` constants available on the system " @@ -4045,7 +4143,7 @@ msgid "" "descriptor is :ref:`non-inheritable `." msgstr "" -#: library/os.rst:3735 +#: library/os.rst:3898 msgid "" "The name supplied in *name* is used as a filename and will be displayed as " "the target of the corresponding symbolic link in the directory ``/proc/self/" @@ -4055,15 +4153,15 @@ msgid "" "side effects." msgstr "" -#: library/os.rst:3765 +#: library/os.rst:3928 msgid "These flags can be passed to :func:`memfd_create`." msgstr "" -#: library/os.rst:3769 +#: library/os.rst:3932 msgid "The ``MFD_HUGE*`` flags are only available since Linux 4.14." msgstr "" -#: library/os.rst:3776 +#: library/os.rst:3939 msgid "" "Create and return an event file descriptor. The file descriptors supports " "raw :func:`read` and :func:`write` with a buffer size of 8, :func:`~select." @@ -4072,7 +4170,7 @@ msgid "" "ref:`non-inheritable `." msgstr "" -#: library/os.rst:3782 +#: library/os.rst:3945 msgid "" "*initval* is the initial value of the event counter. The initial value must " "be a 32 bit unsigned integer. Please note that the initial value is limited " @@ -4080,44 +4178,44 @@ msgid "" "integer with a maximum value of 2\\ :sup:`64`\\ -\\ 2." msgstr "" -#: library/os.rst:3787 +#: library/os.rst:3950 msgid "" "*flags* can be constructed from :const:`EFD_CLOEXEC`, :const:`EFD_NONBLOCK`, " "and :const:`EFD_SEMAPHORE`." msgstr "" -#: library/os.rst:3790 +#: library/os.rst:3953 msgid "" "If :const:`EFD_SEMAPHORE` is specified and the event counter is non-zero, :" "func:`eventfd_read` returns 1 and decrements the counter by one." msgstr "" -#: library/os.rst:3793 +#: library/os.rst:3956 msgid "" "If :const:`EFD_SEMAPHORE` is not specified and the event counter is non-" "zero, :func:`eventfd_read` returns the current event counter value and " "resets the counter to zero." msgstr "" -#: library/os.rst:3797 +#: library/os.rst:3960 msgid "" "If the event counter is zero and :const:`EFD_NONBLOCK` is not specified, :" "func:`eventfd_read` blocks." msgstr "" -#: library/os.rst:3800 +#: library/os.rst:3963 msgid "" ":func:`eventfd_write` increments the event counter. Write blocks if the " "write operation would increment the counter to a value larger than 2\\ :sup:" "`64`\\ -\\ 2." msgstr "" -#: library/os.rst:3806 +#: library/os.rst:3969 msgid "" "import os\n" "\n" "# semaphore with start value '1'\n" -"fd = os.eventfd(1, os.EFD_SEMAPHORE | os.EFC_CLOEXEC)\n" +"fd = os.eventfd(1, os.EFD_SEMAPHORE | os.EFD_CLOEXEC)\n" "try:\n" " # acquire semaphore\n" " v = os.eventfd_read(fd)\n" @@ -4130,64 +4228,64 @@ msgid "" " os.close(fd)" msgstr "" -#: library/os.rst:3827 +#: library/os.rst:3990 msgid "" "Read value from an :func:`eventfd` file descriptor and return a 64 bit " "unsigned int. The function does not verify that *fd* is an :func:`eventfd`." msgstr "" -#: library/os.rst:3836 +#: library/os.rst:3999 msgid "" "Add value to an :func:`eventfd` file descriptor. *value* must be a 64 bit " "unsigned int. The function does not verify that *fd* is an :func:`eventfd`." msgstr "" -#: library/os.rst:3845 +#: library/os.rst:4008 msgid "Set close-on-exec flag for new :func:`eventfd` file descriptor." msgstr "" -#: library/os.rst:3853 +#: library/os.rst:4016 msgid "" "Set :const:`O_NONBLOCK` status flag for new :func:`eventfd` file descriptor." msgstr "" -#: library/os.rst:3862 +#: library/os.rst:4025 msgid "" "Provide semaphore-like semantics for reads from an :func:`eventfd` file " "descriptor. On read the internal counter is decremented by one." msgstr "" -#: library/os.rst:3873 +#: library/os.rst:4036 msgid "Timer File Descriptors" msgstr "" -#: library/os.rst:3877 +#: library/os.rst:4040 msgid "" "These functions provide support for Linux's *timer file descriptor* API. " "Naturally, they are all only available on Linux." msgstr "" -#: library/os.rst:3882 +#: library/os.rst:4045 msgid "Create and return a timer file descriptor (*timerfd*)." msgstr "" -#: library/os.rst:3884 +#: library/os.rst:4047 msgid "The file descriptor returned by :func:`timerfd_create` supports:" msgstr "" -#: library/os.rst:3886 +#: library/os.rst:4049 msgid ":func:`read`" msgstr "" -#: library/os.rst:3887 +#: library/os.rst:4050 msgid ":func:`~select.select`" msgstr "" -#: library/os.rst:3888 +#: library/os.rst:4051 msgid ":func:`~select.poll`" msgstr "" -#: library/os.rst:3890 +#: library/os.rst:4053 msgid "" "The file descriptor's :func:`read` method can be called with a buffer size " "of 8. If the timer has already expired one or more times, :func:`read` " @@ -4196,31 +4294,31 @@ msgid "" "byteorder)``." msgstr "" -#: library/os.rst:3895 +#: library/os.rst:4058 msgid "" ":func:`~select.select` and :func:`~select.poll` can be used to wait until " "timer expires and the file descriptor is readable." msgstr "" -#: library/os.rst:3898 +#: library/os.rst:4061 msgid "" "*clockid* must be a valid :ref:`clock ID `, as " "defined in the :py:mod:`time` module:" msgstr "" -#: library/os.rst:3901 +#: library/os.rst:4064 msgid ":const:`time.CLOCK_REALTIME`" msgstr "" -#: library/os.rst:3902 +#: library/os.rst:4065 msgid ":const:`time.CLOCK_MONOTONIC`" msgstr "" -#: library/os.rst:3903 +#: library/os.rst:4066 msgid ":const:`time.CLOCK_BOOTTIME` (Since Linux 3.15 for timerfd_create)" msgstr "" -#: library/os.rst:3905 +#: library/os.rst:4068 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 " @@ -4228,35 +4326,35 @@ msgid "" "`TFD_TIMER_CANCEL_ON_SET`." msgstr "" -#: library/os.rst:3910 +#: library/os.rst:4073 msgid "" "If *clockid* is :const:`time.CLOCK_MONOTONIC`, a non-settable monotonically " "increasing clock is used. Even if the system clock is changed, the timer " "setting will not be affected." msgstr "" -#: library/os.rst:3914 +#: library/os.rst:4077 msgid "" "If *clockid* is :const:`time.CLOCK_BOOTTIME`, same as :const:`time." "CLOCK_MONOTONIC` except it includes any time that the system is suspended." msgstr "" -#: library/os.rst:3917 +#: library/os.rst:4080 msgid "" "The file descriptor's behaviour can be modified by specifying a *flags* " -"value. Any of the following variables may used, combined using bitwise OR " +"value. Any of the following variables may be used, combined using bitwise OR " "(the ``|`` operator):" msgstr "" -#: library/os.rst:3921 +#: library/os.rst:4084 msgid ":const:`TFD_NONBLOCK`" msgstr "" -#: library/os.rst:3922 +#: library/os.rst:4085 msgid ":const:`TFD_CLOEXEC`" msgstr "" -#: library/os.rst:3924 +#: library/os.rst:4087 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 " @@ -4264,46 +4362,46 @@ msgid "" "raises :class:`OSError` with ``errno`` is set to :const:`errno.EAGAIN`." msgstr "" -#: library/os.rst:3930 +#: library/os.rst:4093 msgid ":const:`TFD_CLOEXEC` is always set by Python automatically." msgstr "" -#: library/os.rst:3932 +#: library/os.rst:4095 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:3935 +#: library/os.rst:4098 msgid "The :manpage:`timerfd_create(2)` man page." msgstr "" -#: library/os.rst:3944 +#: library/os.rst:4107 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:3947 +#: library/os.rst:4110 msgid "*fd* must be a valid timer file descriptor." msgstr "" -#: library/os.rst:3949 +#: library/os.rst:4112 msgid "" "The timer's behaviour can be modified by specifying a *flags* value. Any of " -"the following variables may used, combined using bitwise OR (the ``|`` " +"the following variables may be used, combined using bitwise OR (the ``|`` " "operator):" msgstr "" -#: library/os.rst:3953 +#: library/os.rst:4116 msgid ":const:`TFD_TIMER_ABSTIME`" msgstr "" -#: library/os.rst:3954 +#: library/os.rst:4117 msgid ":const:`TFD_TIMER_CANCEL_ON_SET`" msgstr "" -#: library/os.rst:3956 +#: library/os.rst:4119 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 " @@ -4311,20 +4409,20 @@ msgid "" "const:`errno.EINVAL`" msgstr "" -#: library/os.rst:3961 +#: library/os.rst:4124 msgid "" "By default the timer will fire when *initial* seconds have elapsed. (If " "*initial* is zero, timer will fire immediately.)" msgstr "" -#: library/os.rst:3964 +#: library/os.rst:4127 msgid "" "However, if the :const:`TFD_TIMER_ABSTIME` flag is set, the timer will fire " "when the timer's clock (set by *clockid* in :func:`timerfd_create`) reaches " "*initial* seconds." msgstr "" -#: library/os.rst:3968 +#: library/os.rst:4131 msgid "" "The timer's interval is set by the *interval* :py:class:`float`. If " "*interval* is zero, the timer only fires once, on the initial expiration. If " @@ -4334,7 +4432,7 @@ msgid "" "EINVAL`" msgstr "" -#: library/os.rst:3975 +#: library/os.rst:4138 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." @@ -4343,86 +4441,86 @@ msgid "" "ECANCELED." msgstr "" -#: library/os.rst:3981 +#: library/os.rst:4144 msgid "" "Linux manages system clock as UTC. A daylight-savings time transition is " "done by changing time offset only and doesn't cause discontinuous system " "clock change." msgstr "" -#: library/os.rst:3985 +#: library/os.rst:4148 msgid "" "Discontinuous system clock change will be caused by the following events:" msgstr "" -#: library/os.rst:3987 +#: library/os.rst:4150 msgid "``settimeofday``" msgstr "" -#: library/os.rst:3988 +#: library/os.rst:4151 msgid "``clock_settime``" msgstr "" -#: library/os.rst:3989 +#: library/os.rst:4152 msgid "set the system date and time by ``date`` command" msgstr "" -#: library/os.rst:3991 +#: library/os.rst:4154 msgid "" "Return a two-item tuple of (``next_expiration``, ``interval``) from the " "previous timer state, before this function executed." msgstr "" -#: library/os.rst:3996 +#: library/os.rst:4159 msgid "" ":manpage:`timerfd_create(2)`, :manpage:`timerfd_settime(2)`, :manpage:" "`settimeofday(2)`, :manpage:`clock_settime(2)`, and :manpage:`date(1)`." msgstr "" -#: library/os.rst:4007 +#: library/os.rst:4170 msgid "" "Similar to :func:`timerfd_settime`, but use time as nanoseconds. This " "function operates the same interval timer as :func:`timerfd_settime`." msgstr "" -#: library/os.rst:4017 +#: library/os.rst:4180 msgid "Return a two-item tuple of floats (``next_expiration``, ``interval``)." msgstr "" -#: library/os.rst:4019 +#: library/os.rst:4182 msgid "" -"``next_expiration`` denotes the relative time until next the timer next " -"fires, regardless of if the :const:`TFD_TIMER_ABSTIME` flag is set." +"``next_expiration`` denotes the relative time until the timer next fires, " +"regardless of if the :const:`TFD_TIMER_ABSTIME` flag is set." msgstr "" -#: library/os.rst:4022 +#: library/os.rst:4185 msgid "" "``interval`` denotes the timer's interval. If zero, the timer will only fire " "once, after ``next_expiration`` seconds have elapsed." msgstr "" -#: library/os.rst:4026 +#: library/os.rst:4189 msgid ":manpage:`timerfd_gettime(2)`" msgstr "" -#: library/os.rst:4035 +#: library/os.rst:4198 msgid "Similar to :func:`timerfd_gettime`, but return time as nanoseconds." msgstr "" -#: library/os.rst:4043 +#: library/os.rst:4206 msgid "" "A flag for the :func:`timerfd_create` function, which sets the :const:" "`O_NONBLOCK` status flag for the new timer file descriptor. If :const:" "`TFD_NONBLOCK` is not set as a flag, :func:`read` blocks." msgstr "" -#: library/os.rst:4053 +#: library/os.rst:4216 msgid "" "A flag for the :func:`timerfd_create` function, If :const:`TFD_CLOEXEC` is " "set as a flag, set close-on-exec flag for new file descriptor." msgstr "" -#: library/os.rst:4063 +#: library/os.rst:4226 msgid "" "A flag for the :func:`timerfd_settime` and :func:`timerfd_settime_ns` " "functions. If this flag is set, *initial* is interpreted as an absolute " @@ -4430,22 +4528,22 @@ msgid "" "Epoch)." msgstr "" -#: library/os.rst:4073 +#: library/os.rst:4236 msgid "" "A flag for the :func:`timerfd_settime` and :func:`timerfd_settime_ns` " "functions along with :const:`TFD_TIMER_ABSTIME`. The timer is cancelled when " "the time of the underlying clock changes discontinuously." msgstr "" -#: library/os.rst:4084 +#: library/os.rst:4247 msgid "Linux extended attributes" msgstr "" -#: library/os.rst:4088 +#: library/os.rst:4251 msgid "These functions are all available on Linux only." msgstr "" -#: library/os.rst:4092 +#: library/os.rst:4255 msgid "" "Return the value of the extended filesystem attribute *attribute* for " "*path*. *attribute* can be bytes or str (directly or indirectly through the :" @@ -4453,17 +4551,17 @@ msgid "" "encoding." msgstr "" -#: library/os.rst:4100 +#: library/os.rst:4263 msgid "" "Raises an :ref:`auditing event ` ``os.getxattr`` with arguments " "``path``, ``attribute``." msgstr "" -#: library/os.rst:4134 library/os.rst:4159 +#: library/os.rst:4297 library/os.rst:4322 msgid "Accepts a :term:`path-like object` for *path* and *attribute*." msgstr "" -#: library/os.rst:4108 +#: library/os.rst:4271 msgid "" "Return a list of the extended filesystem attributes on *path*. The " "attributes in the list are represented as strings decoded with the " @@ -4471,13 +4569,13 @@ msgid "" "the current directory." msgstr "" -#: library/os.rst:4116 +#: library/os.rst:4279 msgid "" "Raises an :ref:`auditing event ` ``os.listxattr`` with argument " "``path``." msgstr "" -#: library/os.rst:4124 +#: library/os.rst:4287 msgid "" "Removes the extended filesystem attribute *attribute* from *path*. " "*attribute* should be bytes or str (directly or indirectly through the :" @@ -4485,13 +4583,13 @@ msgid "" "`filesystem encoding and error handler`." msgstr "" -#: library/os.rst:4132 +#: library/os.rst:4295 msgid "" "Raises an :ref:`auditing event ` ``os.removexattr`` with arguments " "``path``, ``attribute``." msgstr "" -#: library/os.rst:4140 +#: library/os.rst:4303 msgid "" "Set the extended filesystem attribute *attribute* on *path* to *value*. " "*attribute* must be a bytes or str with no embedded NULs (directly or " @@ -4503,45 +4601,45 @@ msgid "" "will not be created and ``EEXISTS`` will be raised." msgstr "" -#: library/os.rst:4154 +#: library/os.rst:4317 msgid "" "A bug in Linux kernel versions less than 2.6.39 caused the flags argument to " "be ignored on some filesystems." msgstr "" -#: library/os.rst:4157 +#: library/os.rst:4320 msgid "" "Raises an :ref:`auditing event ` ``os.setxattr`` with arguments " "``path``, ``attribute``, ``value``, ``flags``." msgstr "" -#: library/os.rst:4165 +#: library/os.rst:4328 msgid "" "The maximum size the value of an extended attribute can be. Currently, this " "is 64 KiB on Linux." msgstr "" -#: library/os.rst:4171 +#: library/os.rst:4334 msgid "" "This is a possible value for the flags argument in :func:`setxattr`. It " "indicates the operation must create an attribute." msgstr "" -#: library/os.rst:4177 +#: library/os.rst:4340 msgid "" "This is a possible value for the flags argument in :func:`setxattr`. It " "indicates the operation must replace an existing attribute." msgstr "" -#: library/os.rst:4184 +#: library/os.rst:4347 msgid "Process Management" msgstr "" -#: library/os.rst:4186 +#: library/os.rst:4349 msgid "These functions may be used to create and manage processes." msgstr "" -#: library/os.rst:4188 +#: library/os.rst:4351 msgid "" "The various :func:`exec\\* ` functions take a list of arguments for " "the new program loaded into the process. In each case, the first of these " @@ -4552,7 +4650,7 @@ msgid "" "standard output; ``foo`` will seem to be ignored." msgstr "" -#: library/os.rst:4199 +#: library/os.rst:4362 msgid "" "Generate a :const:`SIGABRT` signal to the current process. On Unix, the " "default behavior is to produce a core dump; on Windows, the process " @@ -4561,37 +4659,37 @@ msgid "" "`SIGABRT` with :func:`signal.signal`." msgstr "" -#: library/os.rst:4208 +#: library/os.rst:4371 msgid "Add a path to the DLL search path." msgstr "" -#: library/os.rst:4210 +#: library/os.rst:4373 msgid "" "This search path is used when resolving dependencies for imported extension " "modules (the module itself is resolved through :data:`sys.path`), and also " "by :mod:`ctypes`." msgstr "" -#: library/os.rst:4214 +#: library/os.rst:4377 msgid "" "Remove the directory by calling **close()** on the returned object or using " "it in a :keyword:`with` statement." msgstr "" -#: library/os.rst:4217 +#: library/os.rst:4380 msgid "" "See the `Microsoft documentation `_ for more information about how " "DLLs are loaded." msgstr "" -#: library/os.rst:4221 +#: library/os.rst:4384 msgid "" "Raises an :ref:`auditing event ` ``os.add_dll_directory`` with " "argument ``path``." msgstr "" -#: library/os.rst:4225 +#: library/os.rst:4388 msgid "" "Previous versions of CPython would resolve DLLs using the default behavior " "for the current process. This led to inconsistencies, such as only sometimes " @@ -4599,14 +4697,14 @@ msgid "" "such as ``AddDllDirectory`` having no effect." msgstr "" -#: library/os.rst:4232 +#: library/os.rst:4395 msgid "" "In 3.8, the two primary ways DLLs are loaded now explicitly override the " "process-wide behavior to ensure consistency. See the :ref:`porting notes " "` for information on updating libraries." msgstr "" -#: library/os.rst:4247 +#: library/os.rst:4410 msgid "" "These functions all execute a new program, replacing the current process; " "they do not return. On Unix, the new executable is loaded into the current " @@ -4614,15 +4712,15 @@ msgid "" "reported as :exc:`OSError` exceptions." msgstr "" -#: library/os.rst:4252 +#: library/os.rst:4415 msgid "" "The current process is replaced immediately. Open file objects and " "descriptors are not flushed, so if there may be data buffered on these open " -"files, you should flush them using :func:`sys.stdout.flush` or :func:`os." +"files, you should flush them using :func:`~io.IOBase.flush` or :func:`os." "fsync` before calling an :func:`exec\\* ` function." msgstr "" -#: library/os.rst:4258 +#: library/os.rst:4421 msgid "" "The \"l\" and \"v\" variants of the :func:`exec\\* ` functions differ " "in how command-line arguments are passed. The \"l\" variants are perhaps " @@ -4635,7 +4733,7 @@ msgid "" "is not enforced." msgstr "" -#: library/os.rst:4267 +#: library/os.rst:4430 msgid "" "The variants which include a \"p\" near the end (:func:`execlp`, :func:" "`execlpe`, :func:`execvp`, and :func:`execvpe`) will use the :envvar:`PATH` " @@ -4649,7 +4747,7 @@ msgid "" "even on Windows, as plain names will not be resolved." msgstr "" -#: library/os.rst:4278 +#: library/os.rst:4441 msgid "" "For :func:`execle`, :func:`execlpe`, :func:`execve`, and :func:`execvpe` " "(note that these all end in \"e\"), the *env* parameter must be a mapping " @@ -4659,7 +4757,7 @@ msgid "" "process to inherit the environment of the current process." msgstr "" -#: library/os.rst:4285 +#: library/os.rst:4448 msgid "" "For :func:`execve` on some platforms, *path* may also be specified as an " "open file descriptor. This functionality may not be supported on your " @@ -4668,31 +4766,31 @@ msgid "" "`NotImplementedError`." msgstr "" -#: library/os.rst:4290 +#: library/os.rst:4453 msgid "" "Raises an :ref:`auditing event ` ``os.exec`` with arguments " "``path``, ``args``, ``env``." msgstr "" -#: library/os.rst:4294 +#: library/os.rst:4457 msgid "" "Added support for specifying *path* as an open file descriptor for :func:" "`execve`." msgstr "" -#: library/os.rst:4303 +#: library/os.rst:4466 msgid "" "Exit the process with status *n*, without calling cleanup handlers, flushing " "stdio buffers, etc." msgstr "" -#: library/os.rst:4308 +#: library/os.rst:4471 msgid "" "The standard way to exit is :func:`sys.exit(n) `. :func:`!_exit` " "should normally only be used in the child process after a :func:`fork`." msgstr "" -#: library/os.rst:4311 +#: library/os.rst:4474 msgid "" "The following exit codes are defined and can be used with :func:`_exit`, " "although they are not required. These are typically used for system " @@ -4700,139 +4798,139 @@ msgid "" "delivery program." msgstr "" -#: library/os.rst:4317 +#: library/os.rst:4480 msgid "" "Some of these may not be available on all Unix platforms, since there is " "some variation. These constants are defined where they are defined by the " "underlying platform." msgstr "" -#: library/os.rst:4324 +#: library/os.rst:4487 msgid "" "Exit code that means no error occurred. May be taken from the defined value " "of ``EXIT_SUCCESS`` on some platforms. Generally has a value of zero." msgstr "" -#: library/os.rst:4332 +#: library/os.rst:4495 msgid "" "Exit code that means the command was used incorrectly, such as when the " "wrong number of arguments are given." msgstr "" -#: library/os.rst:4340 +#: library/os.rst:4503 msgid "Exit code that means the input data was incorrect." msgstr "" -#: library/os.rst:4347 +#: library/os.rst:4510 msgid "Exit code that means an input file did not exist or was not readable." msgstr "" -#: library/os.rst:4354 +#: library/os.rst:4517 msgid "Exit code that means a specified user did not exist." msgstr "" -#: library/os.rst:4361 +#: library/os.rst:4524 msgid "Exit code that means a specified host did not exist." msgstr "" -#: library/os.rst:4368 +#: library/os.rst:4531 msgid "Exit code that means that a required service is unavailable." msgstr "" -#: library/os.rst:4375 +#: library/os.rst:4538 msgid "Exit code that means an internal software error was detected." msgstr "" -#: library/os.rst:4382 +#: library/os.rst:4545 msgid "" "Exit code that means an operating system error was detected, such as the " "inability to fork or create a pipe." msgstr "" -#: library/os.rst:4390 +#: library/os.rst:4553 msgid "" "Exit code that means some system file did not exist, could not be opened, or " "had some other kind of error." msgstr "" -#: library/os.rst:4398 +#: library/os.rst:4561 msgid "Exit code that means a user specified output file could not be created." msgstr "" -#: library/os.rst:4405 +#: library/os.rst:4568 msgid "" "Exit code that means that an error occurred while doing I/O on some file." msgstr "" -#: library/os.rst:4412 +#: library/os.rst:4575 msgid "" "Exit code that means a temporary failure occurred. This indicates something " "that may not really be an error, such as a network connection that couldn't " "be made during a retryable operation." msgstr "" -#: library/os.rst:4421 +#: library/os.rst:4584 msgid "" "Exit code that means that a protocol exchange was illegal, invalid, or not " "understood." msgstr "" -#: library/os.rst:4429 +#: library/os.rst:4592 msgid "" "Exit code that means that there were insufficient permissions to perform the " "operation (but not intended for file system problems)." msgstr "" -#: library/os.rst:4437 +#: library/os.rst:4600 msgid "Exit code that means that some kind of configuration error occurred." msgstr "" -#: library/os.rst:4444 +#: library/os.rst:4607 msgid "Exit code that means something like \"an entry was not found\"." msgstr "" -#: library/os.rst:4451 +#: library/os.rst:4614 msgid "" "Fork a child process. Return ``0`` in the child and the child's process id " "in the parent. If an error occurs :exc:`OSError` is raised." msgstr "" -#: library/os.rst:4454 +#: library/os.rst:4617 msgid "" "Note that some platforms including FreeBSD <= 6.3 and Cygwin have known " "issues when using ``fork()`` from a thread." msgstr "" -#: library/os.rst:4457 +#: library/os.rst:4620 msgid "" "Raises an :ref:`auditing event ` ``os.fork`` with no arguments." msgstr "" -#: library/os.rst:4461 +#: library/os.rst:4624 msgid "" "If you use TLS sockets in an application calling ``fork()``, see the warning " "in the :mod:`ssl` documentation." msgstr "" -#: library/os.rst:4510 +#: library/os.rst:4673 msgid "" "On macOS the use of this function is unsafe when mixed with using higher-" "level system APIs, and that includes using :mod:`urllib.request`." msgstr "" -#: library/os.rst:4469 +#: library/os.rst:4632 msgid "" "Calling ``fork()`` in a subinterpreter is no longer supported (:exc:" "`RuntimeError` is raised)." msgstr "" -#: library/os.rst:4473 +#: library/os.rst:4636 msgid "" "If Python is able to detect that your process has multiple threads, :func:" "`os.fork` now raises a :exc:`DeprecationWarning`." msgstr "" -#: library/os.rst:4477 +#: library/os.rst:4640 msgid "" "We chose to surface this as a warning, when detectable, to better inform " "developers of a design problem that the POSIX platform specifically notes as " @@ -4843,21 +4941,21 @@ msgid "" "``free``)." msgstr "" -#: library/os.rst:4486 +#: library/os.rst:4649 msgid "" "Users of macOS or users of libc or malloc implementations other than those " "typically found in glibc to date are among those already more likely to " "experience deadlocks running such code." msgstr "" -#: library/os.rst:4490 +#: library/os.rst:4653 msgid "" "See `this discussion on fork being incompatible with threads `_ for technical details of why we're surfacing " "this longstanding platform compatibility problem to developers." msgstr "" -#: library/os.rst:4500 +#: library/os.rst:4663 msgid "" "Fork a child process, using a new pseudo-terminal as the child's controlling " "terminal. Return a pair of ``(pid, fd)``, where *pid* is ``0`` in the child, " @@ -4866,31 +4964,31 @@ msgid "" "the :mod:`pty` module. If an error occurs :exc:`OSError` is raised." msgstr "" -#: library/os.rst:4506 +#: library/os.rst:4669 msgid "" "Raises an :ref:`auditing event ` ``os.forkpty`` with no arguments." msgstr "" -#: library/os.rst:4513 +#: library/os.rst:4676 msgid "" "Calling ``forkpty()`` in a subinterpreter is no longer supported (:exc:" "`RuntimeError` is raised)." msgstr "" -#: library/os.rst:4517 +#: library/os.rst:4680 msgid "" "If Python is able to detect that your process has multiple threads, this now " "raises a :exc:`DeprecationWarning`. See the longer explanation on :func:`os." "fork`." msgstr "" -#: library/os.rst:4531 +#: library/os.rst:4694 msgid "" "Send signal *sig* to the process *pid*. Constants for the specific signals " "available on the host platform are defined in the :mod:`signal` module." msgstr "" -#: library/os.rst:4534 +#: library/os.rst:4697 msgid "" "Windows: The :const:`signal.CTRL_C_EVENT` and :const:`signal." "CTRL_BREAK_EVENT` signals are special signals which can only be sent to " @@ -4900,43 +4998,43 @@ msgid "" "be set to *sig*." msgstr "" -#: library/os.rst:4541 +#: library/os.rst:4704 msgid "See also :func:`signal.pthread_kill`." msgstr "" -#: library/os.rst:4543 +#: library/os.rst:4706 msgid "" "Raises an :ref:`auditing event ` ``os.kill`` with arguments " "``pid``, ``sig``." msgstr "" -#: library/os.rst:4557 +#: library/os.rst:4720 msgid "Send the signal *sig* to the process group *pgid*." msgstr "" -#: library/os.rst:4559 +#: library/os.rst:4722 msgid "" "Raises an :ref:`auditing event ` ``os.killpg`` with arguments " "``pgid``, ``sig``." msgstr "" -#: library/os.rst:4566 +#: library/os.rst:4729 msgid "" "Add *increment* to the process's \"niceness\". Return the new niceness." msgstr "" -#: library/os.rst:4573 +#: library/os.rst:4736 msgid "" "Return a file descriptor referring to the process *pid* with *flags* set. " "This descriptor can be used to perform process management without races and " "signals." msgstr "" -#: library/os.rst:4577 +#: library/os.rst:4740 msgid "See the :manpage:`pidfd_open(2)` man page for more details." msgstr "" -#: library/os.rst:4584 +#: library/os.rst:4747 msgid "" "This flag indicates that the file descriptor will be non-blocking. If the " "process referred to by the file descriptor has not yet terminated, then an " @@ -4944,13 +5042,13 @@ msgid "" "immediately return the error :const:`~errno.EAGAIN` rather than blocking." msgstr "" -#: library/os.rst:4595 +#: library/os.rst:4758 msgid "" "Lock program segments into memory. The value of *op* (defined in ````) determines which segments are locked." msgstr "" -#: library/os.rst:4603 +#: library/os.rst:4766 msgid "" "Open a pipe to or from command *cmd*. The return value is an open file " "object connected to the pipe, which can be read or written depending on " @@ -4960,7 +5058,7 @@ msgid "" "rather than bytes." msgstr "" -#: library/os.rst:4611 +#: library/os.rst:4774 msgid "" "The ``close`` method returns :const:`None` if the subprocess exited " "successfully, or the subprocess's return code if there was an error. On " @@ -4972,57 +5070,57 @@ msgid "" "contains the signed integer return code from the child process." msgstr "" -#: library/os.rst:4621 +#: library/os.rst:4784 msgid "" "On Unix, :func:`waitstatus_to_exitcode` can be used to convert the ``close`` " "method result (exit status) into an exit code if it is not ``None``. On " "Windows, the ``close`` method result is directly the exit code (or ``None``)." msgstr "" -#: library/os.rst:4626 +#: library/os.rst:4789 msgid "" "This is implemented using :class:`subprocess.Popen`; see that class's " "documentation for more powerful ways to manage and communicate with " "subprocesses." msgstr "" -#: library/os.rst:4633 +#: library/os.rst:4796 msgid "" "The :ref:`Python UTF-8 Mode ` affects encodings used for *cmd* " "and pipe contents." msgstr "" -#: library/os.rst:4636 +#: library/os.rst:4799 msgid "" ":func:`popen` is a simple wrapper around :class:`subprocess.Popen`. Use :" "class:`subprocess.Popen` or :func:`subprocess.run` to control options like " "encodings." msgstr "" -#: library/os.rst:4645 +#: library/os.rst:4808 msgid "Wraps the :c:func:`!posix_spawn` C library API for use from Python." msgstr "" -#: library/os.rst:4647 +#: library/os.rst:4810 msgid "" "Most users should use :func:`subprocess.run` instead of :func:`posix_spawn`." msgstr "" -#: library/os.rst:4649 +#: library/os.rst:4812 msgid "" "The positional-only arguments *path*, *args*, and *env* are similar to :func:" "`execve`. *env* is allowed to be ``None``, in which case current process' " "environment is used." msgstr "" -#: library/os.rst:4653 +#: library/os.rst:4816 msgid "" "The *path* parameter is the path to the executable file. The *path* should " "contain a directory. Use :func:`posix_spawnp` to pass an executable file " "without directory." msgstr "" -#: library/os.rst:4657 +#: library/os.rst:4820 msgid "" "The *file_actions* argument may be a sequence of tuples describing actions " "to take on specific file descriptors in the child process between the C " @@ -5031,39 +5129,39 @@ msgid "" "describing the remaining tuple elements:" msgstr "" -#: library/os.rst:4665 +#: library/os.rst:4828 msgid "(``os.POSIX_SPAWN_OPEN``, *fd*, *path*, *flags*, *mode*)" msgstr "" -#: library/os.rst:4667 +#: library/os.rst:4830 msgid "Performs ``os.dup2(os.open(path, flags, mode), fd)``." msgstr "" -#: library/os.rst:4671 +#: library/os.rst:4834 msgid "(``os.POSIX_SPAWN_CLOSE``, *fd*)" msgstr "" -#: library/os.rst:4673 +#: library/os.rst:4836 msgid "Performs ``os.close(fd)``." msgstr "" -#: library/os.rst:4677 +#: library/os.rst:4840 msgid "(``os.POSIX_SPAWN_DUP2``, *fd*, *new_fd*)" msgstr "" -#: library/os.rst:4679 +#: library/os.rst:4842 msgid "Performs ``os.dup2(fd, new_fd)``." msgstr "" -#: library/os.rst:4683 +#: library/os.rst:4846 msgid "(``os.POSIX_SPAWN_CLOSEFROM``, *fd*)" msgstr "" -#: library/os.rst:4685 +#: library/os.rst:4848 msgid "Performs ``os.closerange(fd, INF)``." msgstr "" -#: library/os.rst:4687 +#: library/os.rst:4850 msgid "" "These tuples correspond to the C library :c:func:`!" "posix_spawn_file_actions_addopen`, :c:func:`!" @@ -5073,7 +5171,7 @@ msgid "" "c:func:`!posix_spawn` call itself." msgstr "" -#: library/os.rst:4694 +#: library/os.rst:4857 msgid "" "The *setpgroup* argument will set the process group of the child to the " "value specified. If the value specified is 0, the child's process group ID " @@ -5082,7 +5180,7 @@ msgid "" "corresponds to the C library :c:macro:`!POSIX_SPAWN_SETPGROUP` flag." msgstr "" -#: library/os.rst:4700 +#: library/os.rst:4863 msgid "" "If the *resetids* argument is ``True`` it will reset the effective UID and " "GID of the child to the real UID and GID of the parent process. If the " @@ -5093,7 +5191,7 @@ msgid "" "library :c:macro:`!POSIX_SPAWN_RESETIDS` flag." msgstr "" -#: library/os.rst:4708 +#: library/os.rst:4871 msgid "" "If the *setsid* argument is ``True``, it will create a new session ID for " "``posix_spawn``. *setsid* requires :c:macro:`!POSIX_SPAWN_SETSID` or :c:" @@ -5101,7 +5199,7 @@ msgid "" "is raised." msgstr "" -#: library/os.rst:4713 +#: library/os.rst:4876 msgid "" "The *setsigmask* argument will set the signal mask to the signal set " "specified. If the parameter is not used, then the child inherits the " @@ -5109,14 +5207,14 @@ msgid "" "POSIX_SPAWN_SETSIGMASK` flag." msgstr "" -#: library/os.rst:4718 +#: library/os.rst:4881 msgid "" "The *sigdef* argument will reset the disposition of all signals in the set " "specified. This argument corresponds to the C library :c:macro:`!" "POSIX_SPAWN_SETSIGDEF` flag." msgstr "" -#: library/os.rst:4722 +#: library/os.rst:4885 msgid "" "The *scheduler* argument must be a tuple containing the (optional) scheduler " "policy and an instance of :class:`sched_param` with the scheduler " @@ -5126,85 +5224,85 @@ msgid "" "POSIX_SPAWN_SETSCHEDULER` flags." msgstr "" -#: library/os.rst:4750 +#: library/os.rst:4913 msgid "" "Raises an :ref:`auditing event ` ``os.posix_spawn`` with arguments " "``path``, ``argv``, ``env``." msgstr "" -#: library/os.rst:4733 +#: library/os.rst:4896 msgid "" "*env* parameter accepts ``None``. ``os.POSIX_SPAWN_CLOSEFROM`` is available " "on platforms where :c:func:`!posix_spawn_file_actions_addclosefrom_np` " "exists." msgstr "" -#: library/os.rst:4744 +#: library/os.rst:4907 msgid "Wraps the :c:func:`!posix_spawnp` C library API for use from Python." msgstr "" -#: library/os.rst:4746 +#: library/os.rst:4909 msgid "" "Similar to :func:`posix_spawn` except that the system searches for the " "*executable* file in the list of directories specified by the :envvar:`PATH` " "environment variable (in the same way as for ``execvp(3)``)." msgstr "" -#: library/os.rst:4756 +#: library/os.rst:4919 msgid "See :func:`posix_spawn` documentation." msgstr "" -#: library/os.rst:4762 +#: library/os.rst:4925 msgid "" "Register callables to be executed when a new child process is forked using :" "func:`os.fork` or similar process cloning APIs. The parameters are optional " "and keyword-only. Each specifies a different call point." msgstr "" -#: library/os.rst:4767 +#: library/os.rst:4930 msgid "*before* is a function called before forking a child process." msgstr "" -#: library/os.rst:4768 +#: library/os.rst:4931 msgid "" "*after_in_parent* is a function called from the parent process after forking " "a child process." msgstr "" -#: library/os.rst:4770 +#: library/os.rst:4933 msgid "*after_in_child* is a function called from the child process." msgstr "" -#: library/os.rst:4772 +#: library/os.rst:4935 msgid "" "These calls are only made if control is expected to return to the Python " "interpreter. A typical :mod:`subprocess` launch will not trigger them as " "the child is not going to re-enter the interpreter." msgstr "" -#: library/os.rst:4776 +#: library/os.rst:4939 msgid "" "Functions registered for execution before forking are called in reverse " "registration order. Functions registered for execution after forking " "(either in the parent or in the child) are called in registration order." msgstr "" -#: library/os.rst:4781 +#: library/os.rst:4944 msgid "" "Note that :c:func:`fork` calls made by third-party C code may not call those " "functions, unless it explicitly calls :c:func:`PyOS_BeforeFork`, :c:func:" "`PyOS_AfterFork_Parent` and :c:func:`PyOS_AfterFork_Child`." msgstr "" -#: library/os.rst:4785 +#: library/os.rst:4948 msgid "There is no way to unregister a function." msgstr "" -#: library/os.rst:4801 +#: library/os.rst:4964 msgid "Execute the program *path* in a new process." msgstr "" -#: library/os.rst:4803 +#: library/os.rst:4966 msgid "" "(Note that the :mod:`subprocess` module provides more powerful facilities " "for spawning new processes and retrieving their results; using that module " @@ -5212,7 +5310,7 @@ msgid "" "`subprocess-replacements` section.)" msgstr "" -#: library/os.rst:4808 +#: library/os.rst:4971 msgid "" "If *mode* is :const:`P_NOWAIT`, this function returns the process id of the " "new process; if *mode* is :const:`P_WAIT`, returns the process's exit code " @@ -5221,13 +5319,13 @@ msgid "" "handle, so can be used with the :func:`waitpid` function." msgstr "" -#: library/os.rst:4814 +#: library/os.rst:4977 msgid "" "Note on VxWorks, this function doesn't return ``-signal`` when the new " "process is killed. Instead it raises OSError exception." msgstr "" -#: library/os.rst:4817 +#: library/os.rst:4980 msgid "" "The \"l\" and \"v\" variants of the :func:`spawn\\* ` functions " "differ in how command-line arguments are passed. The \"l\" variants are " @@ -5239,7 +5337,7 @@ msgid "" "to the child process must start with the name of the command being run." msgstr "" -#: library/os.rst:4826 +#: library/os.rst:4989 msgid "" "The variants which include a second \"p\" near the end (:func:`spawnlp`, :" "func:`spawnlpe`, :func:`spawnvp`, and :func:`spawnvpe`) will use the :envvar:" @@ -5252,7 +5350,7 @@ msgid "" "appropriate absolute or relative path." msgstr "" -#: library/os.rst:4836 +#: library/os.rst:4999 msgid "" "For :func:`spawnle`, :func:`spawnlpe`, :func:`spawnve`, and :func:`spawnvpe` " "(note that these all end in \"e\"), the *env* parameter must be a mapping " @@ -5264,13 +5362,13 @@ msgid "" "values will cause the function to fail, with a return value of ``127``." msgstr "" -#: library/os.rst:4845 +#: library/os.rst:5008 msgid "" "As an example, the following calls to :func:`spawnlp` and :func:`spawnvpe` " "are equivalent::" msgstr "" -#: library/os.rst:4848 +#: library/os.rst:5011 msgid "" "import os\n" "os.spawnlp(os.P_WAIT, 'cp', 'cp', 'index.html', '/dev/null')\n" @@ -5279,13 +5377,13 @@ msgid "" "os.spawnvpe(os.P_WAIT, 'cp', L, os.environ)" msgstr "" -#: library/os.rst:4854 +#: library/os.rst:5017 msgid "" "Raises an :ref:`auditing event ` ``os.spawn`` with arguments " "``mode``, ``path``, ``args``, ``env``." msgstr "" -#: library/os.rst:4858 +#: library/os.rst:5021 msgid "" ":func:`spawnlp`, :func:`spawnlpe`, :func:`spawnvp` and :func:`spawnvpe` are " "not available on Windows. :func:`spawnle` and :func:`spawnve` are not " @@ -5293,7 +5391,7 @@ msgid "" "instead." msgstr "" -#: library/os.rst:4870 +#: library/os.rst:5033 msgid "" "Possible values for the *mode* parameter to the :func:`spawn\\* ` " "family of functions. If either of these values is given, the :func:" @@ -5301,7 +5399,7 @@ msgid "" "been created, with the process id as the return value." msgstr "" -#: library/os.rst:4880 +#: library/os.rst:5043 msgid "" "Possible value for the *mode* parameter to the :func:`spawn\\* ` " "family of functions. If this is given as *mode*, the :func:`spawn\\* " @@ -5310,7 +5408,7 @@ msgid "" "successful, or ``-signal`` if a signal kills the process." msgstr "" -#: library/os.rst:4892 +#: library/os.rst:5055 msgid "" "Possible values for the *mode* parameter to the :func:`spawn\\* ` " "family of functions. These are less portable than those listed above. :" @@ -5320,11 +5418,11 @@ msgid "" "function will not return." msgstr "" -#: library/os.rst:4903 +#: library/os.rst:5066 msgid "Start a file with its associated application." msgstr "" -#: library/os.rst:4905 +#: library/os.rst:5068 msgid "" "When *operation* is not specified, this acts like double-clicking the file " "in Windows Explorer, or giving the file name as an argument to the :program:" @@ -5332,7 +5430,7 @@ msgid "" "whatever application (if any) its extension is associated." msgstr "" -#: library/os.rst:4910 +#: library/os.rst:5073 msgid "" "When another *operation* is given, it must be a \"command verb\" that " "specifies what should be done with the file. Common verbs documented by " @@ -5340,28 +5438,28 @@ msgid "" "as well as ``'explore'`` and ``'find'`` (to be used on directories)." msgstr "" -#: library/os.rst:4915 +#: library/os.rst:5078 msgid "" "When launching an application, specify *arguments* to be passed as a single " "string. This argument may have no effect when using this function to launch " "a document." msgstr "" -#: library/os.rst:4919 +#: library/os.rst:5082 msgid "" "The default working directory is inherited, but may be overridden by the " "*cwd* argument. This should be an absolute path. A relative *path* will be " "resolved against this argument." msgstr "" -#: library/os.rst:4923 +#: library/os.rst:5086 msgid "" "Use *show_cmd* to override the default window style. Whether this has any " "effect will depend on the application being launched. Values are integers as " "supported by the Win32 :c:func:`!ShellExecute` function." msgstr "" -#: library/os.rst:4927 +#: library/os.rst:5090 msgid "" ":func:`startfile` returns as soon as the associated application is launched. " "There is no option to wait for the application to close, and no way to " @@ -5372,32 +5470,32 @@ msgid "" "encoded for Win32." msgstr "" -#: library/os.rst:4935 +#: library/os.rst:5098 msgid "" "To reduce interpreter startup overhead, the Win32 :c:func:`!ShellExecute` " "function is not resolved until this function is first called. If the " "function cannot be resolved, :exc:`NotImplementedError` will be raised." msgstr "" -#: library/os.rst:4939 +#: library/os.rst:5102 msgid "" "Raises an :ref:`auditing event ` ``os.startfile`` with arguments " "``path``, ``operation``." msgstr "" -#: library/os.rst:4941 +#: library/os.rst:5104 msgid "" "Raises an :ref:`auditing event ` ``os.startfile/2`` with arguments " "``path``, ``operation``, ``arguments``, ``cwd``, ``show_cmd``." msgstr "" -#: library/os.rst:4945 +#: library/os.rst:5108 msgid "" "Added the *arguments*, *cwd* and *show_cmd* arguments, and the ``os." "startfile/2`` audit event." msgstr "" -#: library/os.rst:4952 +#: library/os.rst:5115 msgid "" "Execute the command (a string) in a subshell. This is implemented by " "calling the Standard C function :c:func:`system`, and has the same " @@ -5408,13 +5506,13 @@ msgid "" "value of the Python function is system-dependent." msgstr "" -#: library/os.rst:4960 +#: library/os.rst:5123 msgid "" "On Unix, the return value is the exit status of the process encoded in the " "format specified for :func:`wait`." msgstr "" -#: library/os.rst:4963 +#: library/os.rst:5126 msgid "" "On Windows, the return value is that returned by the system shell after " "running *command*. The shell is given by the Windows environment variable :" @@ -5423,7 +5521,7 @@ msgid "" "shell documentation." msgstr "" -#: library/os.rst:4969 +#: library/os.rst:5132 msgid "" "The :mod:`subprocess` module provides more powerful facilities for spawning " "new processes and retrieving their results; using that module is preferable " @@ -5431,53 +5529,53 @@ msgid "" "the :mod:`subprocess` documentation for some helpful recipes." msgstr "" -#: library/os.rst:4974 +#: library/os.rst:5137 msgid "" "On Unix, :func:`waitstatus_to_exitcode` can be used to convert the result " "(exit status) into an exit code. On Windows, the result is directly the exit " "code." msgstr "" -#: library/os.rst:4978 +#: library/os.rst:5141 msgid "" "Raises an :ref:`auditing event ` ``os.system`` with argument " "``command``." msgstr "" -#: library/os.rst:4985 +#: library/os.rst:5148 msgid "" "Returns the current global process times. The return value is an object with " "five attributes:" msgstr "" -#: library/os.rst:4988 +#: library/os.rst:5151 msgid ":attr:`!user` - user time" msgstr "" -#: library/os.rst:4989 +#: library/os.rst:5152 msgid ":attr:`!system` - system time" msgstr "" -#: library/os.rst:4990 +#: library/os.rst:5153 msgid ":attr:`!children_user` - user time of all child processes" msgstr "" -#: library/os.rst:4991 +#: library/os.rst:5154 msgid ":attr:`!children_system` - system time of all child processes" msgstr "" -#: library/os.rst:4992 +#: library/os.rst:5155 msgid ":attr:`!elapsed` - elapsed real time since a fixed point in the past" msgstr "" -#: library/os.rst:4994 +#: library/os.rst:5157 msgid "" "For backwards compatibility, this object also behaves like a five-tuple " "containing :attr:`!user`, :attr:`!system`, :attr:`!children_user`, :attr:`!" "children_system`, and :attr:`!elapsed` in that order." msgstr "" -#: library/os.rst:4998 +#: library/os.rst:5161 msgid "" "See the Unix manual page :manpage:`times(2)` and `times(3) `_ manual page on Unix or `the " @@ -5487,7 +5585,7 @@ msgid "" "attributes are zero." msgstr "" -#: library/os.rst:5012 +#: library/os.rst:5175 msgid "" "Wait for completion of a child process, and return a tuple containing its " "pid and exit status indication: a 16-bit number, whose low byte is the " @@ -5496,87 +5594,87 @@ msgid "" "if a core file was produced." msgstr "" -#: library/os.rst:5018 +#: library/os.rst:5181 msgid "" "If there are no children that could be waited for, :exc:`ChildProcessError` " "is raised." msgstr "" -#: library/os.rst:5096 +#: library/os.rst:5259 msgid "" ":func:`waitstatus_to_exitcode` can be used to convert the exit status into " "an exit code." msgstr "" -#: library/os.rst:5028 +#: library/os.rst:5191 msgid "" "The other :func:`!wait*` functions documented below can be used to wait for " "the completion of a specific child process and have more options. :func:" "`waitpid` is the only one also available on Windows." msgstr "" -#: library/os.rst:5035 +#: library/os.rst:5198 msgid "Wait for the completion of a child process." msgstr "" -#: library/os.rst:5037 +#: library/os.rst:5200 msgid "" "*idtype* can be :data:`P_PID`, :data:`P_PGID`, :data:`P_ALL`, or (on Linux) :" "data:`P_PIDFD`. The interpretation of *id* depends on it; see their " "individual descriptions." msgstr "" -#: library/os.rst:5040 +#: library/os.rst:5203 msgid "" "*options* is an OR combination of flags. At least one of :data:`WEXITED`, :" "data:`WSTOPPED` or :data:`WCONTINUED` is required; :data:`WNOHANG` and :data:" "`WNOWAIT` are additional optional flags." msgstr "" -#: library/os.rst:5044 +#: library/os.rst:5207 msgid "" "The return value is an object representing the data contained in the :c:type:" "`siginfo_t` structure with the following attributes:" msgstr "" -#: library/os.rst:5047 +#: library/os.rst:5210 msgid ":attr:`!si_pid` (process ID)" msgstr "" -#: library/os.rst:5048 +#: library/os.rst:5211 msgid ":attr:`!si_uid` (real user ID of the child)" msgstr "" -#: library/os.rst:5049 +#: library/os.rst:5212 msgid ":attr:`!si_signo` (always :const:`~signal.SIGCHLD`)" msgstr "" -#: library/os.rst:5050 +#: library/os.rst:5213 msgid "" ":attr:`!si_status` (the exit status or signal number, depending on :attr:`!" "si_code`)" msgstr "" -#: library/os.rst:5051 +#: library/os.rst:5214 msgid ":attr:`!si_code` (see :data:`CLD_EXITED` for possible values)" msgstr "" -#: library/os.rst:5053 +#: library/os.rst:5216 msgid "" "If :data:`WNOHANG` is specified and there are no matching children in the " "requested state, ``None`` is returned. Otherwise, if there are no matching " "children that could be waited for, :exc:`ChildProcessError` is raised." msgstr "" -#: library/os.rst:5062 +#: library/os.rst:5225 msgid "This function is now available on macOS as well." msgstr "" -#: library/os.rst:5068 +#: library/os.rst:5231 msgid "The details of this function differ on Unix and Windows." msgstr "" -#: library/os.rst:5070 +#: library/os.rst:5233 msgid "" "On Unix: Wait for completion of a child process given by process id *pid*, " "and return a tuple containing its process id and exit status indication " @@ -5585,7 +5683,7 @@ msgid "" "operation." msgstr "" -#: library/os.rst:5075 +#: library/os.rst:5238 msgid "" "If *pid* is greater than ``0``, :func:`waitpid` requests status information " "for that specific process. If *pid* is ``0``, the request is for the status " @@ -5595,7 +5693,7 @@ msgid "" "group ``-pid`` (the absolute value of *pid*)." msgstr "" -#: library/os.rst:5082 +#: library/os.rst:5245 msgid "" "*options* is an OR combination of flags. If it contains :data:`WNOHANG` and " "there are no matching children in the requested state, ``(0, 0)`` is " @@ -5604,7 +5702,7 @@ msgid "" "are :data:`WUNTRACED` and :data:`WCONTINUED`." msgstr "" -#: library/os.rst:5088 +#: library/os.rst:5251 msgid "" "On Windows: Wait for completion of a process given by process handle *pid*, " "and return a tuple containing *pid*, and its exit status shifted left by 8 " @@ -5616,7 +5714,7 @@ msgid "" "process handles." msgstr "" -#: library/os.rst:5109 +#: library/os.rst:5272 msgid "" "Similar to :func:`waitpid`, except no process id argument is given and a 3-" "element tuple containing the child's process id, exit status indication, and " @@ -5625,13 +5723,13 @@ msgid "" "same as that provided to :func:`waitpid` and :func:`wait4`." msgstr "" -#: library/os.rst:5130 +#: library/os.rst:5293 msgid "" ":func:`waitstatus_to_exitcode` can be used to convert the exit status into " "an exitcode." msgstr "" -#: library/os.rst:5124 +#: library/os.rst:5287 msgid "" "Similar to :func:`waitpid`, except a 3-element tuple, containing the child's " "process id, exit status indication, and resource usage information is " @@ -5640,118 +5738,118 @@ msgid "" "to :func:`waitpid`." msgstr "" -#: library/os.rst:5141 +#: library/os.rst:5304 msgid "" "These are the possible values for *idtype* in :func:`waitid`. They affect " "how *id* is interpreted:" msgstr "" -#: library/os.rst:5144 +#: library/os.rst:5307 msgid ":data:`!P_PID` - wait for the child whose PID is *id*." msgstr "" -#: library/os.rst:5145 +#: library/os.rst:5308 msgid ":data:`!P_PGID` - wait for any child whose progress group ID is *id*." msgstr "" -#: library/os.rst:5146 +#: library/os.rst:5309 msgid ":data:`!P_ALL` - wait for any child; *id* is ignored." msgstr "" -#: library/os.rst:5147 +#: library/os.rst:5310 msgid "" ":data:`!P_PIDFD` - wait for the child identified by the file descriptor *id* " "(a process file descriptor created with :func:`pidfd_open`)." msgstr "" -#: library/os.rst:5152 +#: library/os.rst:5315 msgid ":data:`!P_PIDFD` is only available on Linux >= 5.4." msgstr "" -#: library/os.rst:5155 +#: library/os.rst:5318 msgid "The :data:`!P_PIDFD` constant." msgstr "" -#: library/os.rst:5161 +#: library/os.rst:5324 msgid "" "This *options* flag for :func:`waitpid`, :func:`wait3`, :func:`wait4`, and :" "func:`waitid` causes child processes to be reported if they have been " "continued from a job control stop since they were last reported." msgstr "" -#: library/os.rst:5170 +#: library/os.rst:5333 msgid "" "This *options* flag for :func:`waitid` causes child processes that have " "terminated to be reported." msgstr "" -#: library/os.rst:5173 +#: library/os.rst:5336 msgid "" "The other ``wait*`` functions always report children that have terminated, " "so this option is not available for them." msgstr "" -#: library/os.rst:5183 +#: library/os.rst:5346 msgid "" "This *options* flag for :func:`waitid` causes child processes that have been " "stopped by the delivery of a signal to be reported." msgstr "" -#: library/os.rst:5218 +#: library/os.rst:5381 msgid "This option is not available for the other ``wait*`` functions." msgstr "" -#: library/os.rst:5195 +#: library/os.rst:5358 msgid "" "This *options* flag for :func:`waitpid`, :func:`wait3`, and :func:`wait4` " "causes child processes to also be reported if they have been stopped but " "their current state has not been reported since they were stopped." msgstr "" -#: library/os.rst:5199 +#: library/os.rst:5362 msgid "This option is not available for :func:`waitid`." msgstr "" -#: library/os.rst:5206 +#: library/os.rst:5369 msgid "" "This *options* flag causes :func:`waitpid`, :func:`wait3`, :func:`wait4`, " "and :func:`waitid` to return right away if no child process status is " "available immediately." msgstr "" -#: library/os.rst:5215 +#: library/os.rst:5378 msgid "" "This *options* flag causes :func:`waitid` to leave the child in a waitable " "state, so that a later :func:`!wait*` call can be used to retrieve the child " "status information again." msgstr "" -#: library/os.rst:5230 +#: library/os.rst:5393 msgid "" "These are the possible values for :attr:`!si_code` in the result returned " "by :func:`waitid`." msgstr "" -#: library/os.rst:5237 +#: library/os.rst:5400 msgid "Added :data:`CLD_KILLED` and :data:`CLD_STOPPED` values." msgstr "" -#: library/os.rst:5243 +#: library/os.rst:5406 msgid "Convert a wait status to an exit code." msgstr "" -#: library/os.rst:5245 +#: library/os.rst:5408 msgid "On Unix:" msgstr "" -#: library/os.rst:5247 +#: library/os.rst:5410 msgid "" "If the process exited normally (if ``WIFEXITED(status)`` is true), return " "the process exit status (return ``WEXITSTATUS(status)``): result greater " "than or equal to 0." msgstr "" -#: library/os.rst:5250 +#: library/os.rst:5413 msgid "" "If the process was terminated by a signal (if ``WIFSIGNALED(status)`` is " "true), return ``-signum`` where *signum* is the number of the signal that " @@ -5759,15 +5857,15 @@ msgid "" "than 0." msgstr "" -#: library/os.rst:5254 +#: library/os.rst:5417 msgid "Otherwise, raise a :exc:`ValueError`." msgstr "" -#: library/os.rst:5256 +#: library/os.rst:5419 msgid "On Windows, return *status* shifted right by 8 bits." msgstr "" -#: library/os.rst:5258 +#: library/os.rst:5421 msgid "" "On Unix, if the process is being traced or if :func:`waitpid` was called " "with :data:`WUNTRACED` option, the caller must first check if " @@ -5775,226 +5873,226 @@ msgid "" "``WIFSTOPPED(status)`` is true." msgstr "" -#: library/os.rst:5265 +#: library/os.rst:5428 msgid "" ":func:`WIFEXITED`, :func:`WEXITSTATUS`, :func:`WIFSIGNALED`, :func:" "`WTERMSIG`, :func:`WIFSTOPPED`, :func:`WSTOPSIG` functions." msgstr "" -#: library/os.rst:5273 +#: library/os.rst:5436 msgid "" "The following functions take a process status code as returned by :func:" "`system`, :func:`wait`, or :func:`waitpid` as a parameter. They may be used " "to determine the disposition of a process." msgstr "" -#: library/os.rst:5279 +#: library/os.rst:5442 msgid "" "Return ``True`` if a core dump was generated for the process, otherwise " "return ``False``." msgstr "" -#: library/os.rst:5348 +#: library/os.rst:5511 msgid "This function should be employed only if :func:`WIFSIGNALED` is true." msgstr "" -#: library/os.rst:5289 +#: library/os.rst:5452 msgid "" "Return ``True`` if a stopped child has been resumed by delivery of :const:" "`~signal.SIGCONT` (if the process has been continued from a job control " "stop), otherwise return ``False``." msgstr "" -#: library/os.rst:5293 +#: library/os.rst:5456 msgid "See :data:`WCONTINUED` option." msgstr "" -#: library/os.rst:5300 +#: library/os.rst:5463 msgid "" "Return ``True`` if the process was stopped by delivery of a signal, " "otherwise return ``False``." msgstr "" -#: library/os.rst:5303 +#: library/os.rst:5466 msgid "" ":func:`WIFSTOPPED` only returns ``True`` if the :func:`waitpid` call was " "done using :data:`WUNTRACED` option or when the process is being traced " "(see :manpage:`ptrace(2)`)." msgstr "" -#: library/os.rst:5311 +#: library/os.rst:5474 msgid "" "Return ``True`` if the process was terminated by a signal, otherwise return " "``False``." msgstr "" -#: library/os.rst:5319 +#: library/os.rst:5482 msgid "" "Return ``True`` if the process exited terminated normally, that is, by " "calling ``exit()`` or ``_exit()``, or by returning from ``main()``; " "otherwise return ``False``." msgstr "" -#: library/os.rst:5328 +#: library/os.rst:5491 msgid "Return the process exit status." msgstr "" -#: library/os.rst:5330 +#: library/os.rst:5493 msgid "This function should be employed only if :func:`WIFEXITED` is true." msgstr "" -#: library/os.rst:5337 +#: library/os.rst:5500 msgid "Return the signal which caused the process to stop." msgstr "" -#: library/os.rst:5339 +#: library/os.rst:5502 msgid "This function should be employed only if :func:`WIFSTOPPED` is true." msgstr "" -#: library/os.rst:5346 +#: library/os.rst:5509 msgid "Return the number of the signal that caused the process to terminate." msgstr "" -#: library/os.rst:5354 +#: library/os.rst:5517 msgid "Interface to the scheduler" msgstr "" -#: library/os.rst:5356 +#: library/os.rst:5519 msgid "" "These functions control how a process is allocated CPU time by the operating " "system. They are only available on some Unix platforms. For more detailed " "information, consult your Unix manpages." msgstr "" -#: library/os.rst:5362 +#: library/os.rst:5525 msgid "" "The following scheduling policies are exposed if they are supported by the " "operating system." msgstr "" -#: library/os.rst:5369 +#: library/os.rst:5532 msgid "The default scheduling policy." msgstr "" -#: library/os.rst:5373 +#: library/os.rst:5536 msgid "" "Scheduling policy for CPU-intensive processes that tries to preserve " "interactivity on the rest of the computer." msgstr "" -#: library/os.rst:5378 +#: library/os.rst:5541 msgid "Scheduling policy for extremely low priority background tasks." msgstr "" -#: library/os.rst:5382 +#: library/os.rst:5545 msgid "Scheduling policy for sporadic server programs." msgstr "" -#: library/os.rst:5386 +#: library/os.rst:5549 msgid "A First In First Out scheduling policy." msgstr "" -#: library/os.rst:5390 +#: library/os.rst:5553 msgid "A round-robin scheduling policy." msgstr "" -#: library/os.rst:5394 +#: library/os.rst:5557 msgid "" "This flag can be OR'ed with any other scheduling policy. When a process with " "this flag set forks, its child's scheduling policy and priority are reset to " "the default." msgstr "" -#: library/os.rst:5401 +#: library/os.rst:5564 msgid "" "This class represents tunable scheduling parameters used in :func:" "`sched_setparam`, :func:`sched_setscheduler`, and :func:`sched_getparam`. It " "is immutable." msgstr "" -#: library/os.rst:5405 +#: library/os.rst:5568 msgid "At the moment, there is only one possible parameter:" msgstr "" -#: library/os.rst:5409 +#: library/os.rst:5572 msgid "The scheduling priority for a scheduling policy." msgstr "" -#: library/os.rst:5414 +#: library/os.rst:5577 msgid "" "Get the minimum priority value for *policy*. *policy* is one of the " "scheduling policy constants above." msgstr "" -#: library/os.rst:5420 +#: library/os.rst:5583 msgid "" "Get the maximum priority value for *policy*. *policy* is one of the " "scheduling policy constants above." msgstr "" -#: library/os.rst:5426 +#: library/os.rst:5589 msgid "" "Set the scheduling policy for the process with PID *pid*. A *pid* of 0 means " "the calling process. *policy* is one of the scheduling policy constants " "above. *param* is a :class:`sched_param` instance." msgstr "" -#: library/os.rst:5433 +#: library/os.rst:5596 msgid "" "Return the scheduling policy for the process with PID *pid*. A *pid* of 0 " "means the calling process. The result is one of the scheduling policy " "constants above." msgstr "" -#: library/os.rst:5440 +#: library/os.rst:5603 msgid "" "Set the scheduling parameters for the process with PID *pid*. A *pid* of 0 " "means the calling process. *param* is a :class:`sched_param` instance." msgstr "" -#: library/os.rst:5446 +#: library/os.rst:5609 msgid "" "Return the scheduling parameters as a :class:`sched_param` instance for the " "process with PID *pid*. A *pid* of 0 means the calling process." msgstr "" -#: library/os.rst:5452 +#: library/os.rst:5615 msgid "" "Return the round-robin quantum in seconds for the process with PID *pid*. A " "*pid* of 0 means the calling process." msgstr "" -#: library/os.rst:5458 +#: library/os.rst:5621 msgid "" "Voluntarily relinquish the CPU. See :manpage:`sched_yield(2)` for details." msgstr "" -#: library/os.rst:5463 +#: library/os.rst:5626 msgid "" "Restrict the process with PID *pid* (or the current process if zero) to a " "set of CPUs. *mask* is an iterable of integers representing the set of CPUs " "to which the process should be restricted." msgstr "" -#: library/os.rst:5470 +#: library/os.rst:5633 msgid "Return the set of CPUs the process with PID *pid* is restricted to." msgstr "" -#: library/os.rst:5472 +#: library/os.rst:5635 msgid "" "If *pid* is zero, return the set of CPUs the calling thread of the current " "process is restricted to." msgstr "" -#: library/os.rst:5475 +#: library/os.rst:5638 msgid "See also the :func:`process_cpu_count` function." msgstr "" -#: library/os.rst:5481 +#: library/os.rst:5644 msgid "Miscellaneous System Information" msgstr "" -#: library/os.rst:5486 +#: library/os.rst:5649 msgid "" "Return string-valued system configuration values. *name* specifies the " "configuration value to retrieve; it may be a string which is the name of a " @@ -6005,13 +6103,13 @@ msgid "" "included in that mapping, passing an integer for *name* is also accepted." msgstr "" -#: library/os.rst:5494 +#: library/os.rst:5657 msgid "" "If the configuration value specified by *name* isn't defined, ``None`` is " "returned." msgstr "" -#: library/os.rst:5497 +#: library/os.rst:5660 msgid "" "If *name* is a string and is not known, :exc:`ValueError` is raised. If a " "specific value for *name* is not supported by the host system, even if it is " @@ -6019,62 +6117,62 @@ msgid "" "`errno.EINVAL` for the error number." msgstr "" -#: library/os.rst:5507 +#: library/os.rst:5670 msgid "" "Dictionary mapping names accepted by :func:`confstr` to the integer values " "defined for those names by the host operating system. This can be used to " "determine the set of names known to the system." msgstr "" -#: library/os.rst:5516 +#: library/os.rst:5679 msgid "" "Return the number of logical CPUs in the **system**. Returns ``None`` if " "undetermined." msgstr "" -#: library/os.rst:5519 +#: library/os.rst:5682 msgid "" "The :func:`process_cpu_count` function can be used to get the number of " "logical CPUs usable by the calling thread of the **current process**." msgstr "" -#: library/os.rst:5524 +#: library/os.rst:5687 msgid "" "If :option:`-X cpu_count <-X>` is given or :envvar:`PYTHON_CPU_COUNT` is " -"set, :func:`cpu_count` returns the overridden value *n*." +"set, :func:`cpu_count` returns the override value *n*." msgstr "" -#: library/os.rst:5531 +#: library/os.rst:5694 msgid "" "Return the number of processes in the system run queue averaged over the " "last 1, 5, and 15 minutes or raises :exc:`OSError` if the load average was " "unobtainable." msgstr "" -#: library/os.rst:5540 +#: library/os.rst:5703 msgid "" "Get the number of logical CPUs usable by the calling thread of the **current " "process**. Returns ``None`` if undetermined. It can be less than :func:" "`cpu_count` depending on the CPU affinity." msgstr "" -#: library/os.rst:5544 +#: library/os.rst:5707 msgid "" "The :func:`cpu_count` function can be used to get the number of logical CPUs " "in the **system**." msgstr "" -#: library/os.rst:5547 +#: library/os.rst:5710 msgid "" "If :option:`-X cpu_count <-X>` is given or :envvar:`PYTHON_CPU_COUNT` is " -"set, :func:`process_cpu_count` returns the overridden value *n*." +"set, :func:`process_cpu_count` returns the override value *n*." msgstr "" -#: library/os.rst:5550 +#: library/os.rst:5713 msgid "See also the :func:`sched_getaffinity` function." msgstr "" -#: library/os.rst:5557 +#: library/os.rst:5720 msgid "" "Return integer-valued system configuration values. If the configuration " "value specified by *name* isn't defined, ``-1`` is returned. The comments " @@ -6083,44 +6181,44 @@ msgid "" "``sysconf_names``." msgstr "" -#: library/os.rst:5567 +#: library/os.rst:5730 msgid "" "Dictionary mapping names accepted by :func:`sysconf` to the integer values " "defined for those names by the host operating system. This can be used to " "determine the set of names known to the system." msgstr "" -#: library/os.rst:5573 +#: library/os.rst:5736 msgid "Add ``'SC_MINSIGSTKSZ'`` name." msgstr "" -#: library/os.rst:5576 +#: library/os.rst:5739 msgid "" "The following data values are used to support path manipulation operations. " "These are defined for all platforms." msgstr "" -#: library/os.rst:5579 +#: library/os.rst:5742 msgid "" "Higher-level operations on pathnames are defined in the :mod:`os.path` " "module." msgstr "" -#: library/os.rst:5585 +#: library/os.rst:5748 msgid "" "The constant string used by the operating system to refer to the current " "directory. This is ``'.'`` for Windows and POSIX. Also available via :mod:" "`os.path`." msgstr "" -#: library/os.rst:5593 +#: library/os.rst:5756 msgid "" "The constant string used by the operating system to refer to the parent " "directory. This is ``'..'`` for Windows and POSIX. Also available via :mod:" "`os.path`." msgstr "" -#: library/os.rst:5602 +#: library/os.rst:5765 msgid "" "The character used by the operating system to separate pathname components. " "This is ``'/'`` for POSIX and ``'\\\\'`` for Windows. Note that knowing " @@ -6129,7 +6227,7 @@ msgid "" "useful. Also available via :mod:`os.path`." msgstr "" -#: library/os.rst:5612 +#: library/os.rst:5775 msgid "" "An alternative character used by the operating system to separate pathname " "components, or ``None`` if only one separator character exists. This is set " @@ -6137,27 +6235,27 @@ msgid "" "via :mod:`os.path`." msgstr "" -#: library/os.rst:5621 +#: library/os.rst:5784 msgid "" "The character which separates the base filename from the extension; for " "example, the ``'.'`` in :file:`os.py`. Also available via :mod:`os.path`." msgstr "" -#: library/os.rst:5629 +#: library/os.rst:5792 msgid "" "The character conventionally used by the operating system to separate search " "path components (as in :envvar:`PATH`), such as ``':'`` for POSIX or ``';'`` " "for Windows. Also available via :mod:`os.path`." msgstr "" -#: library/os.rst:5636 +#: library/os.rst:5799 msgid "" "The default search path used by :func:`exec\\*p\\* ` and :func:" "`spawn\\*p\\* ` if the environment doesn't have a ``'PATH'`` key. " "Also available via :mod:`os.path`." msgstr "" -#: library/os.rst:5643 +#: library/os.rst:5806 msgid "" "The string used to separate (or, rather, terminate) lines on the current " "platform. This may be a single character, such as ``'\\n'`` for POSIX, or " @@ -6166,36 +6264,36 @@ msgid "" "default); use a single ``'\\n'`` instead, on all platforms." msgstr "" -#: library/os.rst:5652 +#: library/os.rst:5815 msgid "" "The file path of the null device. For example: ``'/dev/null'`` for POSIX, " "``'nul'`` for Windows. Also available via :mod:`os.path`." msgstr "" -#: library/os.rst:5663 +#: library/os.rst:5826 msgid "" "Flags for use with the :func:`~sys.setdlopenflags` and :func:`~sys." "getdlopenflags` functions. See the Unix manual page :manpage:`dlopen(3)` " "for what the different flags mean." msgstr "" -#: library/os.rst:5671 +#: library/os.rst:5834 msgid "Random numbers" msgstr "" -#: library/os.rst:5676 +#: library/os.rst:5839 msgid "" "Get up to *size* random bytes. The function can return less bytes than " "requested." msgstr "" -#: library/os.rst:5679 +#: library/os.rst:5842 msgid "" "These bytes can be used to seed user-space random number generators or for " "cryptographic purposes." msgstr "" -#: library/os.rst:5682 +#: library/os.rst:5845 msgid "" "``getrandom()`` relies on entropy gathered from device drivers and other " "sources of environmental noise. Unnecessarily reading large quantities of " @@ -6203,32 +6301,32 @@ msgid "" "``/dev/urandom`` devices." msgstr "" -#: library/os.rst:5687 +#: library/os.rst:5850 msgid "" "The flags argument is a bit mask that can contain zero or more of the " "following values ORed together: :py:const:`os.GRND_RANDOM` and :py:data:" "`GRND_NONBLOCK`." msgstr "" -#: library/os.rst:5691 +#: library/os.rst:5854 msgid "" "See also the `Linux getrandom() manual page `_." msgstr "" -#: library/os.rst:5700 +#: library/os.rst:5863 msgid "" "Return a bytestring of *size* random bytes suitable for cryptographic use." msgstr "" -#: library/os.rst:5702 +#: library/os.rst:5865 msgid "" "This function returns random bytes from an OS-specific randomness source. " "The returned data should be unpredictable enough for cryptographic " "applications, though its exact quality depends on the OS implementation." msgstr "" -#: library/os.rst:5706 +#: library/os.rst:5869 msgid "" "On Linux, if the ``getrandom()`` syscall is available, it is used in " "blocking mode: block until the system urandom entropy pool is initialized " @@ -6238,63 +6336,63 @@ msgid "" "to poll until the system urandom entropy pool is initialized." msgstr "" -#: library/os.rst:5713 +#: library/os.rst:5876 msgid "" "On a Unix-like system, random bytes are read from the ``/dev/urandom`` " "device. If the ``/dev/urandom`` device is not available or not readable, " "the :exc:`NotImplementedError` exception is raised." msgstr "" -#: library/os.rst:5717 +#: library/os.rst:5880 msgid "On Windows, it will use ``BCryptGenRandom()``." msgstr "" -#: library/os.rst:5720 +#: library/os.rst:5883 msgid "" "The :mod:`secrets` module provides higher level functions. For an easy-to-" "use interface to the random number generator provided by your platform, " "please see :class:`random.SystemRandom`." msgstr "" -#: library/os.rst:5724 +#: library/os.rst:5887 msgid "" "On Linux 3.17 and newer, the ``getrandom()`` syscall is now used when " "available. On OpenBSD 5.6 and newer, the C ``getentropy()`` function is now " "used. These functions avoid the usage of an internal file descriptor." msgstr "" -#: library/os.rst:5730 +#: library/os.rst:5893 msgid "" "On Linux, if the ``getrandom()`` syscall blocks (the urandom entropy pool is " "not initialized yet), fall back on reading ``/dev/urandom``." msgstr "" -#: library/os.rst:5734 +#: library/os.rst:5897 msgid "" "On Linux, ``getrandom()`` is now used in blocking mode to increase the " "security." msgstr "" -#: library/os.rst:5738 +#: library/os.rst:5901 msgid "" "On Windows, ``BCryptGenRandom()`` is used instead of ``CryptGenRandom()`` " "which is deprecated." msgstr "" -#: library/os.rst:5744 +#: library/os.rst:5907 msgid "" "By default, when reading from ``/dev/random``, :func:`getrandom` blocks if " "no random bytes are available, and when reading from ``/dev/urandom``, it " "blocks if the entropy pool has not yet been initialized." msgstr "" -#: library/os.rst:5748 +#: library/os.rst:5911 msgid "" "If the :py:data:`GRND_NONBLOCK` flag is set, then :func:`getrandom` does not " "block in these cases, but instead immediately raises :exc:`BlockingIOError`." msgstr "" -#: library/os.rst:5755 +#: library/os.rst:5918 msgid "" "If this bit is set, then random bytes are drawn from the ``/dev/" "random`` pool instead of the ``/dev/urandom`` pool." @@ -6308,7 +6406,7 @@ msgstr "" msgid "effective id" msgstr "" -#: library/os.rst:439 library/os.rst:457 library/os.rst:667 library/os.rst:4553 +#: library/os.rst:439 library/os.rst:457 library/os.rst:667 library/os.rst:4716 msgid "process" msgstr "" @@ -6328,7 +6426,7 @@ msgstr "" msgid "scheduling priority" msgstr "" -#: library/os.rst:802 +#: library/os.rst:827 msgid "environment variables" msgstr "" @@ -6348,90 +6446,90 @@ msgstr "" msgid "gethostbyaddr() (in module socket)" msgstr "" -#: library/os.rst:2659 +#: library/os.rst:2687 msgid "deleting" msgstr "" -#: library/os.rst:3029 +#: library/os.rst:3066 msgid "module" msgstr "" -#: library/os.rst:1361 +#: library/os.rst:1383 msgid "pty" msgstr "" -#: library/os.rst:2458 library/os.rst:3566 library/os.rst:3666 +#: library/os.rst:2486 library/os.rst:3729 library/os.rst:3829 msgid "directory" msgstr "" -#: library/os.rst:2046 +#: library/os.rst:2069 msgid "changing" msgstr "" -#: library/os.rst:2458 +#: library/os.rst:2486 msgid "creating" msgstr "" -#: library/os.rst:2458 +#: library/os.rst:2486 msgid "UNC paths" msgstr "" -#: library/os.rst:2458 +#: library/os.rst:2486 msgid "and os.makedirs()" msgstr "" -#: library/os.rst:3029 +#: library/os.rst:3066 msgid "stat" msgstr "" -#: library/os.rst:3666 +#: library/os.rst:3829 msgid "walking" msgstr "" -#: library/os.rst:3666 +#: library/os.rst:3829 msgid "traversal" msgstr "" -#: library/os.rst:4553 +#: library/os.rst:4716 msgid "killing" msgstr "" -#: library/os.rst:4553 +#: library/os.rst:4716 msgid "signalling" msgstr "" -#: library/os.rst:5618 +#: library/os.rst:5781 msgid ". (dot)" msgstr "" -#: library/os.rst:5590 library/os.rst:5609 library/os.rst:5618 +#: library/os.rst:5753 library/os.rst:5772 library/os.rst:5781 msgid "in pathnames" msgstr "" -#: library/os.rst:5590 +#: library/os.rst:5753 msgid ".." msgstr "" -#: library/os.rst:5609 +#: library/os.rst:5772 msgid "/ (slash)" msgstr "" -#: library/os.rst:5599 +#: library/os.rst:5762 msgid "\\ (backslash)" msgstr "" -#: library/os.rst:5599 +#: library/os.rst:5762 msgid "in pathnames (Windows)" msgstr "" -#: library/os.rst:5625 +#: library/os.rst:5788 msgid ": (colon)" msgstr "" -#: library/os.rst:5625 +#: library/os.rst:5788 msgid "path separator (POSIX)" msgstr "" -#: library/os.rst:5625 +#: library/os.rst:5788 msgid "; (semicolon)" msgstr "" diff --git a/library/ossaudiodev.po b/library/ossaudiodev.po index 1e4dbf396..39159c2b4 100644 --- a/library/ossaudiodev.po +++ b/library/ossaudiodev.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/pathlib.po b/library/pathlib.po index 953b54fd7..a397d523d 100644 --- a/library/pathlib.po +++ b/library/pathlib.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -465,7 +465,7 @@ msgstr "" #: library/pathlib.rst:313 msgid "" "The implementation of the :mod:`os.path` module used for low-level path " -"parsing and joining: either :mod:`posixpath` or :mod:`ntpath`." +"parsing and joining: either :mod:`!posixpath` or :mod:`!ntpath`." msgstr "" #: library/pathlib.rst:320 @@ -805,7 +805,7 @@ msgid "" "True" msgstr "" -#: library/pathlib.rst:1291 +#: library/pathlib.rst:1295 msgid ":ref:`pathlib-pattern-language` documentation." msgstr "" @@ -850,11 +850,11 @@ msgid "" "False" msgstr "" -#: library/pathlib.rst:1310 library/pathlib.rst:1335 +#: library/pathlib.rst:1319 library/pathlib.rst:1353 msgid "The *pattern* parameter accepts a :term:`path-like object`." msgstr "" -#: library/pathlib.rst:1304 library/pathlib.rst:1329 +#: library/pathlib.rst:1313 library/pathlib.rst:1347 msgid "The *case_sensitive* parameter was added." msgstr "" @@ -1346,8 +1346,8 @@ msgid "" "1327883547.852554" msgstr "" -#: library/pathlib.rst:1039 library/pathlib.rst:1069 library/pathlib.rst:1616 -#: library/pathlib.rst:1637 +#: library/pathlib.rst:1039 library/pathlib.rst:1069 library/pathlib.rst:1634 +#: library/pathlib.rst:1655 msgid "The *follow_symlinks* parameter was added." msgstr "" @@ -1626,7 +1626,13 @@ msgid "" " PosixPath('test_pathlib.py')]" msgstr "" -#: library/pathlib.rst:1293 +#: library/pathlib.rst:1334 +msgid "" +"The paths are returned in no particular order. If you need a specific order, " +"sort the results." +msgstr "" + +#: library/pathlib.rst:1297 msgid "" "By default, or when the *case_sensitive* keyword-only argument is set to " "``None``, this method matches paths using platform-specific casing rules: " @@ -1634,60 +1640,67 @@ msgid "" "*case_sensitive* to ``True`` or ``False`` to override this behaviour." msgstr "" -#: library/pathlib.rst:1298 +#: library/pathlib.rst:1302 msgid "" "By default, or when the *recurse_symlinks* keyword-only argument is set to " "``False``, this method follows symlinks except when expanding \"``**``\" " "wildcards. Set *recurse_symlinks* to ``True`` to always follow symlinks." msgstr "" -#: library/pathlib.rst:1302 +#: library/pathlib.rst:1338 +msgid "" +"Any :exc:`OSError` exceptions raised from scanning the filesystem are " +"suppressed. This includes :exc:`PermissionError` when accessing directories " +"without read permission." +msgstr "" + +#: library/pathlib.rst:1311 msgid "" "Raises an :ref:`auditing event ` ``pathlib.Path.glob`` with " "arguments ``self``, ``pattern``." msgstr "" -#: library/pathlib.rst:1332 +#: library/pathlib.rst:1350 msgid "The *recurse_symlinks* parameter was added." msgstr "" -#: library/pathlib.rst:1313 +#: library/pathlib.rst:1322 msgid "" "Any :exc:`OSError` exceptions raised from scanning the filesystem are " "suppressed. In previous versions, such exceptions are suppressed in many " "cases, but not all." msgstr "" -#: library/pathlib.rst:1321 +#: library/pathlib.rst:1330 msgid "" "Glob the given relative *pattern* recursively. This is like calling :func:" "`Path.glob` with \"``**/``\" added in front of the *pattern*." msgstr "" -#: library/pathlib.rst:1325 +#: library/pathlib.rst:1343 msgid ":ref:`pathlib-pattern-language` and :meth:`Path.glob` documentation." msgstr "" -#: library/pathlib.rst:1327 +#: library/pathlib.rst:1345 msgid "" "Raises an :ref:`auditing event ` ``pathlib.Path.rglob`` with " "arguments ``self``, ``pattern``." msgstr "" -#: library/pathlib.rst:1341 +#: library/pathlib.rst:1359 msgid "" "Generate the file names in a directory tree by walking the tree either top-" "down or bottom-up." msgstr "" -#: library/pathlib.rst:1344 +#: library/pathlib.rst:1362 msgid "" "For each directory in the directory tree rooted at *self* (including *self* " "but excluding '.' and '..'), the method yields a 3-tuple of ``(dirpath, " "dirnames, filenames)``." msgstr "" -#: library/pathlib.rst:1348 +#: library/pathlib.rst:1366 msgid "" "*dirpath* is a :class:`Path` to the directory currently being walked, " "*dirnames* is a list of strings for the names of subdirectories in *dirpath* " @@ -1697,7 +1710,7 @@ msgid "" "name``. Whether or not the lists are sorted is file system-dependent." msgstr "" -#: library/pathlib.rst:1356 +#: library/pathlib.rst:1374 msgid "" "If the optional argument *top_down* is true (which is the default), the " "triple for a directory is generated before the triples for any of its " @@ -1708,7 +1721,7 @@ msgid "" "the directory and its subdirectories are walked." msgstr "" -#: library/pathlib.rst:1364 +#: library/pathlib.rst:1382 msgid "" "When *top_down* is true, the caller can modify the *dirnames* list in-place " "(for example, using :keyword:`del` or slice assignment), and :meth:`Path." @@ -1721,7 +1734,7 @@ msgid "" "generated by the time *dirnames* is yielded to the caller." msgstr "" -#: library/pathlib.rst:1374 +#: library/pathlib.rst:1392 msgid "" "By default, errors from :func:`os.scandir` are ignored. If the optional " "argument *on_error* is specified, it should be a callable; it will be called " @@ -1730,7 +1743,7 @@ msgid "" "filename is available as the ``filename`` attribute of the exception object." msgstr "" -#: library/pathlib.rst:1380 +#: library/pathlib.rst:1398 msgid "" "By default, :meth:`Path.walk` does not follow symbolic links, and instead " "adds them to the *filenames* list. Set *follow_symlinks* to true to resolve " @@ -1739,14 +1752,14 @@ msgid "" "(where supported)." msgstr "" -#: library/pathlib.rst:1387 +#: library/pathlib.rst:1405 msgid "" "Be aware that setting *follow_symlinks* to true can lead to infinite " "recursion if a link points to a parent directory of itself. :meth:`Path." "walk` does not keep track of the directories it has already visited." msgstr "" -#: library/pathlib.rst:1392 +#: library/pathlib.rst:1410 msgid "" ":meth:`Path.walk` assumes the directories it walks are not modified during " "execution. For example, if a directory from *dirnames* has been replaced " @@ -1755,19 +1768,19 @@ msgid "" "*dirnames* as appropriate." msgstr "" -#: library/pathlib.rst:1400 +#: library/pathlib.rst:1418 msgid "" "Unlike :func:`os.walk`, :meth:`Path.walk` lists symlinks to directories in " "*filenames* if *follow_symlinks* is false." msgstr "" -#: library/pathlib.rst:1403 +#: library/pathlib.rst:1421 msgid "" "This example displays the number of bytes used by all files in each " "directory, while ignoring ``__pycache__`` directories::" msgstr "" -#: library/pathlib.rst:1406 +#: library/pathlib.rst:1424 msgid "" "from pathlib import Path\n" "for root, dirs, files in Path(\"cpython/Lib/concurrent\")." @@ -1784,14 +1797,14 @@ msgid "" " dirs.remove('__pycache__')" msgstr "" -#: library/pathlib.rst:1419 +#: library/pathlib.rst:1437 msgid "" "This next example is a simple implementation of :func:`shutil.rmtree`. " "Walking the tree bottom-up is essential as :func:`rmdir` doesn't allow " "deleting a directory before it is empty::" msgstr "" -#: library/pathlib.rst:1423 +#: library/pathlib.rst:1441 msgid "" "# Delete everything reachable from the directory \"top\".\n" "# CAUTION: This is dangerous! For example, if top == Path('/'),\n" @@ -1803,11 +1816,11 @@ msgid "" " (root / name).rmdir()" msgstr "" -#: library/pathlib.rst:1436 +#: library/pathlib.rst:1454 msgid "Creating files and directories" msgstr "" -#: library/pathlib.rst:1440 +#: library/pathlib.rst:1458 msgid "" "Create a file at this given path. If *mode* is given, it is combined with " "the process's ``umask`` value to determine the file mode and access flags. " @@ -1816,54 +1829,54 @@ msgid "" "`FileExistsError` is raised." msgstr "" -#: library/pathlib.rst:1447 +#: library/pathlib.rst:1465 msgid "" "The :meth:`~Path.open`, :meth:`~Path.write_text` and :meth:`~Path." "write_bytes` methods are often used to create files." msgstr "" -#: library/pathlib.rst:1453 +#: library/pathlib.rst:1471 msgid "" "Create a new directory at this given path. If *mode* is given, it is " "combined with the process's ``umask`` value to determine the file mode and " "access flags. If the path already exists, :exc:`FileExistsError` is raised." msgstr "" -#: library/pathlib.rst:1458 +#: library/pathlib.rst:1476 msgid "" "If *parents* is true, any missing parents of this path are created as " "needed; they are created with the default permissions without taking *mode* " "into account (mimicking the POSIX ``mkdir -p`` command)." msgstr "" -#: library/pathlib.rst:1462 +#: library/pathlib.rst:1480 msgid "" "If *parents* is false (the default), a missing parent raises :exc:" "`FileNotFoundError`." msgstr "" -#: library/pathlib.rst:1465 +#: library/pathlib.rst:1483 msgid "" "If *exist_ok* is false (the default), :exc:`FileExistsError` is raised if " "the target directory already exists." msgstr "" -#: library/pathlib.rst:1468 +#: library/pathlib.rst:1486 msgid "" "If *exist_ok* is true, :exc:`FileExistsError` will not be raised unless the " "given path already exists in the file system and is not a directory (same " "behavior as the POSIX ``mkdir -p`` command)." msgstr "" -#: library/pathlib.rst:1472 +#: library/pathlib.rst:1490 msgid "The *exist_ok* parameter was added." msgstr "" -#: library/pathlib.rst:1478 +#: library/pathlib.rst:1496 msgid "Make this path a symbolic link pointing to *target*." msgstr "" -#: library/pathlib.rst:1480 +#: library/pathlib.rst:1498 msgid "" "On Windows, a symlink represents either a file or a directory, and does not " "morph to the target dynamically. If the target is present, the type of the " @@ -1872,7 +1885,7 @@ msgid "" "otherwise. On non-Windows platforms, *target_is_directory* is ignored." msgstr "" -#: library/pathlib.rst:1488 +#: library/pathlib.rst:1506 msgid "" ">>> p = Path('mylink')\n" ">>> p.symlink_to('setup.py')\n" @@ -1884,37 +1897,37 @@ msgid "" "8" msgstr "" -#: library/pathlib.rst:1498 +#: library/pathlib.rst:1516 msgid "" "The order of arguments (link, target) is the reverse of :func:`os.symlink`'s." msgstr "" -#: library/pathlib.rst:1501 +#: library/pathlib.rst:1519 msgid "" "Raises :exc:`UnsupportedOperation` if :func:`os.symlink` is not available. " "In previous versions, :exc:`NotImplementedError` was raised." msgstr "" -#: library/pathlib.rst:1508 +#: library/pathlib.rst:1526 msgid "Make this path a hard link to the same file as *target*." msgstr "" -#: library/pathlib.rst:1511 +#: library/pathlib.rst:1529 msgid "" "The order of arguments (link, target) is the reverse of :func:`os.link`'s." msgstr "" -#: library/pathlib.rst:1516 +#: library/pathlib.rst:1534 msgid "" "Raises :exc:`UnsupportedOperation` if :func:`os.link` is not available. In " "previous versions, :exc:`NotImplementedError` was raised." msgstr "" -#: library/pathlib.rst:1522 +#: library/pathlib.rst:1540 msgid "Renaming and deleting" msgstr "" -#: library/pathlib.rst:1526 +#: library/pathlib.rst:1544 msgid "" "Rename this file or directory to the given *target*, and return a new :class:" "`!Path` instance pointing to *target*. On Unix, if *target* exists and is a " @@ -1923,7 +1936,7 @@ msgid "" "either a string or another path object::" msgstr "" -#: library/pathlib.rst:1532 +#: library/pathlib.rst:1550 msgid "" ">>> p = Path('foo')\n" ">>> p.open('w').write('some text')\n" @@ -1935,108 +1948,108 @@ msgid "" "'some text'" msgstr "" -#: library/pathlib.rst:1557 +#: library/pathlib.rst:1575 msgid "" "The target path may be absolute or relative. Relative paths are interpreted " "relative to the current working directory, *not* the directory of the :class:" "`!Path` object." msgstr "" -#: library/pathlib.rst:1545 +#: library/pathlib.rst:1563 msgid "" "It is implemented in terms of :func:`os.rename` and gives the same " "guarantees." msgstr "" -#: library/pathlib.rst:1561 +#: library/pathlib.rst:1579 msgid "Added return value, return the new :class:`!Path` instance." msgstr "" -#: library/pathlib.rst:1553 +#: library/pathlib.rst:1571 msgid "" "Rename this file or directory to the given *target*, and return a new :class:" "`!Path` instance pointing to *target*. If *target* points to an existing " "file or empty directory, it will be unconditionally replaced." msgstr "" -#: library/pathlib.rst:1567 +#: library/pathlib.rst:1585 msgid "" "Remove this file or symbolic link. If the path points to a directory, use :" "func:`Path.rmdir` instead." msgstr "" -#: library/pathlib.rst:1570 +#: library/pathlib.rst:1588 msgid "" "If *missing_ok* is false (the default), :exc:`FileNotFoundError` is raised " "if the path does not exist." msgstr "" -#: library/pathlib.rst:1573 +#: library/pathlib.rst:1591 msgid "" "If *missing_ok* is true, :exc:`FileNotFoundError` exceptions will be ignored " "(same behavior as the POSIX ``rm -f`` command)." msgstr "" -#: library/pathlib.rst:1576 +#: library/pathlib.rst:1594 msgid "The *missing_ok* parameter was added." msgstr "" -#: library/pathlib.rst:1582 +#: library/pathlib.rst:1600 msgid "Remove this directory. The directory must be empty." msgstr "" -#: library/pathlib.rst:1586 +#: library/pathlib.rst:1604 msgid "Permissions and ownership" msgstr "" -#: library/pathlib.rst:1590 +#: library/pathlib.rst:1608 msgid "" "Return the name of the user owning the file. :exc:`KeyError` is raised if " "the file's user identifier (UID) isn't found in the system database." msgstr "" -#: library/pathlib.rst:1593 +#: library/pathlib.rst:1611 msgid "" "This method normally follows symlinks; to get the owner of the symlink, add " "the argument ``follow_symlinks=False``." msgstr "" -#: library/pathlib.rst:1596 +#: library/pathlib.rst:1614 msgid "" "Raises :exc:`UnsupportedOperation` if the :mod:`pwd` module is not " "available. In earlier versions, :exc:`NotImplementedError` was raised." msgstr "" -#: library/pathlib.rst:1606 +#: library/pathlib.rst:1624 msgid "" "Return the name of the group owning the file. :exc:`KeyError` is raised if " "the file's group identifier (GID) isn't found in the system database." msgstr "" -#: library/pathlib.rst:1609 +#: library/pathlib.rst:1627 msgid "" "This method normally follows symlinks; to get the group of the symlink, add " "the argument ``follow_symlinks=False``." msgstr "" -#: library/pathlib.rst:1612 +#: library/pathlib.rst:1630 msgid "" "Raises :exc:`UnsupportedOperation` if the :mod:`grp` module is not " "available. In earlier versions, :exc:`NotImplementedError` was raised." msgstr "" -#: library/pathlib.rst:1622 +#: library/pathlib.rst:1640 msgid "Change the file mode and permissions, like :func:`os.chmod`." msgstr "" -#: library/pathlib.rst:1624 +#: library/pathlib.rst:1642 msgid "" "This method normally follows symlinks. Some Unix flavours support changing " "permissions on the symlink itself; on these platforms you may add the " "argument ``follow_symlinks=False``, or use :meth:`~Path.lchmod`." msgstr "" -#: library/pathlib.rst:1630 +#: library/pathlib.rst:1648 msgid "" ">>> p = Path('setup.py')\n" ">>> p.stat().st_mode\n" @@ -2046,59 +2059,59 @@ msgid "" "33060" msgstr "" -#: library/pathlib.rst:1643 +#: library/pathlib.rst:1661 msgid "" "Like :meth:`Path.chmod` but, if the path points to a symbolic link, the " "symbolic link's mode is changed rather than its target's." msgstr "" -#: library/pathlib.rst:1650 +#: library/pathlib.rst:1668 msgid "Pattern language" msgstr "" -#: library/pathlib.rst:1652 +#: library/pathlib.rst:1670 msgid "" "The following wildcards are supported in patterns for :meth:`~PurePath." "full_match`, :meth:`~Path.glob` and :meth:`~Path.rglob`:" msgstr "" -#: library/pathlib.rst:1655 +#: library/pathlib.rst:1673 msgid "``**`` (entire segment)" msgstr "" -#: library/pathlib.rst:1656 +#: library/pathlib.rst:1674 msgid "Matches any number of file or directory segments, including zero." msgstr "" -#: library/pathlib.rst:1657 +#: library/pathlib.rst:1675 msgid "``*`` (entire segment)" msgstr "" -#: library/pathlib.rst:1658 +#: library/pathlib.rst:1676 msgid "Matches one file or directory segment." msgstr "" -#: library/pathlib.rst:1659 +#: library/pathlib.rst:1677 msgid "``*`` (part of a segment)" msgstr "" -#: library/pathlib.rst:1660 +#: library/pathlib.rst:1678 msgid "Matches any number of non-separator characters, including zero." msgstr "" -#: library/pathlib.rst:1661 +#: library/pathlib.rst:1679 msgid "``?``" msgstr "" -#: library/pathlib.rst:1662 +#: library/pathlib.rst:1680 msgid "Matches one non-separator character." msgstr "" -#: library/pathlib.rst:1663 +#: library/pathlib.rst:1681 msgid "``[seq]``" msgstr "" -#: library/pathlib.rst:1664 +#: library/pathlib.rst:1682 msgid "" "Matches one character in *seq*, where *seq* is a sequence of characters. " "Range expressions are supported; for example, ``[a-z]`` matches any " @@ -2106,134 +2119,134 @@ msgid "" "matches any ASCII letter, digit, or underscore." msgstr "" -#: library/pathlib.rst:1668 +#: library/pathlib.rst:1686 msgid "``[!seq]``" msgstr "" -#: library/pathlib.rst:1669 +#: library/pathlib.rst:1687 msgid "" "Matches one character not in *seq*, where *seq* follows the same rules as " "above." msgstr "" -#: library/pathlib.rst:1671 +#: library/pathlib.rst:1689 msgid "" "For a literal match, wrap the meta-characters in brackets. For example, " "``\"[?]\"`` matches the character ``\"?\"``." msgstr "" -#: library/pathlib.rst:1674 +#: library/pathlib.rst:1692 msgid "The \"``**``\" wildcard enables recursive globbing. A few examples:" msgstr "" -#: library/pathlib.rst:1677 +#: library/pathlib.rst:1695 msgid "Pattern" msgstr "" -#: library/pathlib.rst:1677 +#: library/pathlib.rst:1695 msgid "Meaning" msgstr "" -#: library/pathlib.rst:1679 +#: library/pathlib.rst:1697 msgid "\"``**/*``\"" msgstr "" -#: library/pathlib.rst:1679 +#: library/pathlib.rst:1697 msgid "Any path with at least one segment." msgstr "" -#: library/pathlib.rst:1680 +#: library/pathlib.rst:1698 msgid "\"``**/*.py``\"" msgstr "" -#: library/pathlib.rst:1680 +#: library/pathlib.rst:1698 msgid "Any path with a final segment ending \"``.py``\"." msgstr "" -#: library/pathlib.rst:1681 +#: library/pathlib.rst:1699 msgid "\"``assets/**``\"" msgstr "" -#: library/pathlib.rst:1681 +#: library/pathlib.rst:1699 msgid "Any path starting with \"``assets/``\"." msgstr "" -#: library/pathlib.rst:1682 +#: library/pathlib.rst:1700 msgid "\"``assets/**/*``\"" msgstr "" -#: library/pathlib.rst:1682 +#: library/pathlib.rst:1700 msgid "" "Any path starting with \"``assets/``\", excluding \"``assets/``\" itself." msgstr "" -#: library/pathlib.rst:1686 +#: library/pathlib.rst:1704 msgid "" "Globbing with the \"``**``\" wildcard visits every directory in the tree. " "Large directory trees may take a long time to search." msgstr "" -#: library/pathlib.rst:1689 +#: library/pathlib.rst:1707 msgid "" "Globbing with a pattern that ends with \"``**``\" returns both files and " "directories. In previous versions, only directories were returned." msgstr "" -#: library/pathlib.rst:1693 +#: library/pathlib.rst:1711 msgid "" "In :meth:`Path.glob` and :meth:`~Path.rglob`, a trailing slash may be added " "to the pattern to match only directories." msgstr "" -#: library/pathlib.rst:1696 +#: library/pathlib.rst:1714 msgid "" "Globbing with a pattern that ends with a pathname components separator (:" "data:`~os.sep` or :data:`~os.altsep`) returns only directories." msgstr "" -#: library/pathlib.rst:1702 +#: library/pathlib.rst:1720 msgid "Comparison to the :mod:`glob` module" msgstr "" -#: library/pathlib.rst:1704 +#: library/pathlib.rst:1722 msgid "" "The patterns accepted and results generated by :meth:`Path.glob` and :meth:" "`Path.rglob` differ slightly from those by the :mod:`glob` module:" msgstr "" -#: library/pathlib.rst:1707 +#: library/pathlib.rst:1725 msgid "" "Files beginning with a dot are not special in pathlib. This is like passing " "``include_hidden=True`` to :func:`glob.glob`." msgstr "" -#: library/pathlib.rst:1709 +#: library/pathlib.rst:1727 msgid "" "\"``**``\" pattern components are always recursive in pathlib. This is like " "passing ``recursive=True`` to :func:`glob.glob`." msgstr "" -#: library/pathlib.rst:1711 +#: library/pathlib.rst:1729 msgid "" "\"``**``\" pattern components do not follow symlinks by default in pathlib. " "This behaviour has no equivalent in :func:`glob.glob`, but you can pass " "``recurse_symlinks=True`` to :meth:`Path.glob` for compatible behaviour." msgstr "" -#: library/pathlib.rst:1714 +#: library/pathlib.rst:1732 msgid "" "Like all :class:`PurePath` and :class:`Path` objects, the values returned " "from :meth:`Path.glob` and :meth:`Path.rglob` don't include trailing slashes." msgstr "" -#: library/pathlib.rst:1717 +#: library/pathlib.rst:1735 msgid "" "The values returned from pathlib's ``path.glob()`` and ``path.rglob()`` " "include the *path* as a prefix, unlike the results of ``glob." "glob(root_dir=path)``." msgstr "" -#: library/pathlib.rst:1720 +#: library/pathlib.rst:1738 msgid "" "The values returned from pathlib's ``path.glob()`` and ``path.rglob()`` may " "include *path* itself, for example when globbing \"``**``\", whereas the " @@ -2241,11 +2254,11 @@ msgid "" "would correspond to *path*." msgstr "" -#: library/pathlib.rst:1727 +#: library/pathlib.rst:1745 msgid "Comparison to the :mod:`os` and :mod:`os.path` modules" msgstr "" -#: library/pathlib.rst:1729 +#: library/pathlib.rst:1747 msgid "" "pathlib implements path operations using :class:`PurePath` and :class:`Path` " "objects, and so it's said to be *object-oriented*. On the other hand, the :" @@ -2254,21 +2267,21 @@ msgid "" "Some users consider the object-oriented style to be more readable." msgstr "" -#: library/pathlib.rst:1735 +#: library/pathlib.rst:1753 msgid "" "Many functions in :mod:`os` and :mod:`os.path` support ``bytes`` paths and :" "ref:`paths relative to directory descriptors `. These features " "aren't available in pathlib." msgstr "" -#: library/pathlib.rst:1739 +#: library/pathlib.rst:1757 msgid "" "Python's ``str`` and ``bytes`` types, and portions of the :mod:`os` and :mod:" "`os.path` modules, are written in C and are very speedy. pathlib is written " "in pure Python and is often slower, but rarely slow enough to matter." msgstr "" -#: library/pathlib.rst:1743 +#: library/pathlib.rst:1761 msgid "" "pathlib's path normalization is slightly more opinionated and consistent " "than :mod:`os.path`. For example, whereas :func:`os.path.abspath` eliminates " @@ -2277,12 +2290,12 @@ msgid "" "safety." msgstr "" -#: library/pathlib.rst:1748 +#: library/pathlib.rst:1766 msgid "" "pathlib's path normalization may render it unsuitable for some applications:" msgstr "" -#: library/pathlib.rst:1750 +#: library/pathlib.rst:1768 msgid "" "pathlib normalizes ``Path(\"my_folder/\")`` to ``Path(\"my_folder\")``, " "which changes a path's meaning when supplied to various operating system " @@ -2291,7 +2304,7 @@ msgid "" "rather than a directory only." msgstr "" -#: library/pathlib.rst:1755 +#: library/pathlib.rst:1773 msgid "" "pathlib normalizes ``Path(\"./my_program\")`` to ``Path(\"my_program\")``, " "which changes a path's meaning when used as an executable search path, such " @@ -2300,283 +2313,283 @@ msgid "" "rather than the current directory." msgstr "" -#: library/pathlib.rst:1761 +#: library/pathlib.rst:1779 msgid "" "As a consequence of these differences, pathlib is not a drop-in replacement " "for :mod:`os.path`." msgstr "" -#: library/pathlib.rst:1766 +#: library/pathlib.rst:1784 msgid "Corresponding tools" msgstr "" -#: library/pathlib.rst:1768 +#: library/pathlib.rst:1786 msgid "" "Below is a table mapping various :mod:`os` functions to their corresponding :" "class:`PurePath`/:class:`Path` equivalent." msgstr "" -#: library/pathlib.rst:1772 +#: library/pathlib.rst:1790 msgid ":mod:`os` and :mod:`os.path`" msgstr "" -#: library/pathlib.rst:1772 +#: library/pathlib.rst:1790 msgid ":mod:`pathlib`" msgstr "" -#: library/pathlib.rst:1774 +#: library/pathlib.rst:1792 msgid ":func:`os.path.dirname`" msgstr "" -#: library/pathlib.rst:1774 +#: library/pathlib.rst:1792 msgid ":attr:`PurePath.parent`" msgstr "" -#: library/pathlib.rst:1775 +#: library/pathlib.rst:1793 msgid ":func:`os.path.basename`" msgstr "" -#: library/pathlib.rst:1775 +#: library/pathlib.rst:1793 msgid ":attr:`PurePath.name`" msgstr "" -#: library/pathlib.rst:1776 +#: library/pathlib.rst:1794 msgid ":func:`os.path.splitext`" msgstr "" -#: library/pathlib.rst:1776 +#: library/pathlib.rst:1794 msgid ":attr:`PurePath.stem`, :attr:`PurePath.suffix`" msgstr "" -#: library/pathlib.rst:1777 +#: library/pathlib.rst:1795 msgid ":func:`os.path.join`" msgstr "" -#: library/pathlib.rst:1777 +#: library/pathlib.rst:1795 msgid ":meth:`PurePath.joinpath`" msgstr "" -#: library/pathlib.rst:1778 +#: library/pathlib.rst:1796 msgid ":func:`os.path.isabs`" msgstr "" -#: library/pathlib.rst:1778 +#: library/pathlib.rst:1796 msgid ":meth:`PurePath.is_absolute`" msgstr "" -#: library/pathlib.rst:1779 +#: library/pathlib.rst:1797 msgid ":func:`os.path.relpath`" msgstr "" -#: library/pathlib.rst:1779 +#: library/pathlib.rst:1797 msgid ":meth:`PurePath.relative_to` [1]_" msgstr "" -#: library/pathlib.rst:1780 +#: library/pathlib.rst:1798 msgid ":func:`os.path.expanduser`" msgstr "" -#: library/pathlib.rst:1780 +#: library/pathlib.rst:1798 msgid ":meth:`Path.expanduser` [2]_" msgstr "" -#: library/pathlib.rst:1781 +#: library/pathlib.rst:1799 msgid ":func:`os.path.realpath`" msgstr "" -#: library/pathlib.rst:1781 +#: library/pathlib.rst:1799 msgid ":meth:`Path.resolve`" msgstr "" -#: library/pathlib.rst:1782 +#: library/pathlib.rst:1800 msgid ":func:`os.path.abspath`" msgstr "" -#: library/pathlib.rst:1782 +#: library/pathlib.rst:1800 msgid ":meth:`Path.absolute` [3]_" msgstr "" -#: library/pathlib.rst:1783 +#: library/pathlib.rst:1801 msgid ":func:`os.path.exists`" msgstr "" -#: library/pathlib.rst:1783 +#: library/pathlib.rst:1801 msgid ":meth:`Path.exists`" msgstr "" -#: library/pathlib.rst:1784 +#: library/pathlib.rst:1802 msgid ":func:`os.path.isfile`" msgstr "" -#: library/pathlib.rst:1784 +#: library/pathlib.rst:1802 msgid ":meth:`Path.is_file`" msgstr "" -#: library/pathlib.rst:1785 +#: library/pathlib.rst:1803 msgid ":func:`os.path.isdir`" msgstr "" -#: library/pathlib.rst:1785 +#: library/pathlib.rst:1803 msgid ":meth:`Path.is_dir`" msgstr "" -#: library/pathlib.rst:1786 +#: library/pathlib.rst:1804 msgid ":func:`os.path.islink`" msgstr "" -#: library/pathlib.rst:1786 +#: library/pathlib.rst:1804 msgid ":meth:`Path.is_symlink`" msgstr "" -#: library/pathlib.rst:1787 +#: library/pathlib.rst:1805 msgid ":func:`os.path.isjunction`" msgstr "" -#: library/pathlib.rst:1787 +#: library/pathlib.rst:1805 msgid ":meth:`Path.is_junction`" msgstr "" -#: library/pathlib.rst:1788 +#: library/pathlib.rst:1806 msgid ":func:`os.path.ismount`" msgstr "" -#: library/pathlib.rst:1788 +#: library/pathlib.rst:1806 msgid ":meth:`Path.is_mount`" msgstr "" -#: library/pathlib.rst:1789 +#: library/pathlib.rst:1807 msgid ":func:`os.path.samefile`" msgstr "" -#: library/pathlib.rst:1789 +#: library/pathlib.rst:1807 msgid ":meth:`Path.samefile`" msgstr "" -#: library/pathlib.rst:1790 +#: library/pathlib.rst:1808 msgid ":func:`os.getcwd`" msgstr "" -#: library/pathlib.rst:1790 +#: library/pathlib.rst:1808 msgid ":meth:`Path.cwd`" msgstr "" -#: library/pathlib.rst:1791 +#: library/pathlib.rst:1809 msgid ":func:`os.stat`" msgstr "" -#: library/pathlib.rst:1791 +#: library/pathlib.rst:1809 msgid ":meth:`Path.stat`" msgstr "" -#: library/pathlib.rst:1792 +#: library/pathlib.rst:1810 msgid ":func:`os.lstat`" msgstr "" -#: library/pathlib.rst:1792 +#: library/pathlib.rst:1810 msgid ":meth:`Path.lstat`" msgstr "" -#: library/pathlib.rst:1793 +#: library/pathlib.rst:1811 msgid ":func:`os.listdir`" msgstr "" -#: library/pathlib.rst:1793 +#: library/pathlib.rst:1811 msgid ":meth:`Path.iterdir`" msgstr "" -#: library/pathlib.rst:1794 +#: library/pathlib.rst:1812 msgid ":func:`os.walk`" msgstr "" -#: library/pathlib.rst:1794 +#: library/pathlib.rst:1812 msgid ":meth:`Path.walk` [4]_" msgstr "" -#: library/pathlib.rst:1795 +#: library/pathlib.rst:1813 msgid ":func:`os.mkdir`, :func:`os.makedirs`" msgstr "" -#: library/pathlib.rst:1795 +#: library/pathlib.rst:1813 msgid ":meth:`Path.mkdir`" msgstr "" -#: library/pathlib.rst:1796 +#: library/pathlib.rst:1814 msgid ":func:`os.link`" msgstr "" -#: library/pathlib.rst:1796 +#: library/pathlib.rst:1814 msgid ":meth:`Path.hardlink_to`" msgstr "" -#: library/pathlib.rst:1797 +#: library/pathlib.rst:1815 msgid ":func:`os.symlink`" msgstr "" -#: library/pathlib.rst:1797 +#: library/pathlib.rst:1815 msgid ":meth:`Path.symlink_to`" msgstr "" -#: library/pathlib.rst:1798 +#: library/pathlib.rst:1816 msgid ":func:`os.readlink`" msgstr "" -#: library/pathlib.rst:1798 +#: library/pathlib.rst:1816 msgid ":meth:`Path.readlink`" msgstr "" -#: library/pathlib.rst:1799 +#: library/pathlib.rst:1817 msgid ":func:`os.rename`" msgstr "" -#: library/pathlib.rst:1799 +#: library/pathlib.rst:1817 msgid ":meth:`Path.rename`" msgstr "" -#: library/pathlib.rst:1800 +#: library/pathlib.rst:1818 msgid ":func:`os.replace`" msgstr "" -#: library/pathlib.rst:1800 +#: library/pathlib.rst:1818 msgid ":meth:`Path.replace`" msgstr "" -#: library/pathlib.rst:1801 +#: library/pathlib.rst:1819 msgid ":func:`os.remove`, :func:`os.unlink`" msgstr "" -#: library/pathlib.rst:1801 +#: library/pathlib.rst:1819 msgid ":meth:`Path.unlink`" msgstr "" -#: library/pathlib.rst:1802 +#: library/pathlib.rst:1820 msgid ":func:`os.rmdir`" msgstr "" -#: library/pathlib.rst:1802 +#: library/pathlib.rst:1820 msgid ":meth:`Path.rmdir`" msgstr "" -#: library/pathlib.rst:1803 +#: library/pathlib.rst:1821 msgid ":func:`os.chmod`" msgstr "" -#: library/pathlib.rst:1803 +#: library/pathlib.rst:1821 msgid ":meth:`Path.chmod`" msgstr "" -#: library/pathlib.rst:1804 +#: library/pathlib.rst:1822 msgid ":func:`os.lchmod`" msgstr "" -#: library/pathlib.rst:1804 +#: library/pathlib.rst:1822 msgid ":meth:`Path.lchmod`" msgstr "" -#: library/pathlib.rst:1808 +#: library/pathlib.rst:1826 msgid "Footnotes" msgstr "" -#: library/pathlib.rst:1809 +#: library/pathlib.rst:1827 msgid "" ":func:`os.path.relpath` calls :func:`~os.path.abspath` to make paths " "absolute and remove \"``..``\" parts, whereas :meth:`PurePath.relative_to` " @@ -2584,21 +2597,21 @@ msgid "" "anchors differ (e.g. if one path is absolute and the other relative.)" msgstr "" -#: library/pathlib.rst:1813 +#: library/pathlib.rst:1831 msgid "" ":func:`os.path.expanduser` returns the path unchanged if the home directory " "can't be resolved, whereas :meth:`Path.expanduser` raises :exc:" "`RuntimeError`." msgstr "" -#: library/pathlib.rst:1816 +#: library/pathlib.rst:1834 msgid "" ":func:`os.path.abspath` removes \"``..``\" components without resolving " "symlinks, which may change the meaning of the path, whereas :meth:`Path." "absolute` leaves any \"``..``\" components in the path." msgstr "" -#: library/pathlib.rst:1819 +#: library/pathlib.rst:1837 msgid "" ":func:`os.walk` always follows symlinks when categorizing paths into " "*dirnames* and *filenames*, whereas :meth:`Path.walk` categorizes all " diff --git a/library/pdb.po b/library/pdb.po index b863d10f7..cbc1b66ab 100644 --- a/library/pdb.po +++ b/library/pdb.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/persistence.po b/library/persistence.po index 666c9ddef..7305c5c03 100644 --- a/library/persistence.po +++ b/library/persistence.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/pickle.po b/library/pickle.po index b5b323a07..da5c59ac4 100644 --- a/library/pickle.po +++ b/library/pickle.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -84,33 +84,13 @@ msgstr "" #: library/pickle.rst:59 msgid "" -"The :mod:`pickle` module keeps track of the objects it has already " -"serialized, so that later references to the same object won't be serialized " -"again. :mod:`marshal` doesn't do this." -msgstr "" - -#: library/pickle.rst:63 -msgid "" -"This has implications both for recursive objects and object sharing. " -"Recursive objects are objects that contain references to themselves. These " -"are not handled by marshal, and in fact, attempting to marshal recursive " -"objects will crash your Python interpreter. Object sharing happens when " -"there are multiple references to the same object in different places in the " -"object hierarchy being serialized. :mod:`pickle` stores such objects only " -"once, and ensures that all other references point to the master copy. " -"Shared objects remain shared, which can be very important for mutable " -"objects." -msgstr "" - -#: library/pickle.rst:72 -msgid "" ":mod:`marshal` cannot be used to serialize user-defined classes and their " "instances. :mod:`pickle` can save and restore class instances " "transparently, however the class definition must be importable and live in " -"the same module as when the object was stored." +"the same module as when the object was pickled." msgstr "" -#: library/pickle.rst:77 +#: library/pickle.rst:64 msgid "" "The :mod:`marshal` serialization format is not guaranteed to be portable " "across Python versions. Because its primary job in life is to support :file:" @@ -123,34 +103,34 @@ msgid "" "boundary." msgstr "" -#: library/pickle.rst:90 +#: library/pickle.rst:77 msgid "Comparison with ``json``" msgstr "" -#: library/pickle.rst:92 +#: library/pickle.rst:79 msgid "" "There are fundamental differences between the pickle protocols and `JSON " "(JavaScript Object Notation) `_:" msgstr "" -#: library/pickle.rst:95 +#: library/pickle.rst:82 msgid "" "JSON is a text serialization format (it outputs unicode text, although most " "of the time it is then encoded to ``utf-8``), while pickle is a binary " "serialization format;" msgstr "" -#: library/pickle.rst:99 +#: library/pickle.rst:86 msgid "JSON is human-readable, while pickle is not;" msgstr "" -#: library/pickle.rst:101 +#: library/pickle.rst:88 msgid "" "JSON is interoperable and widely used outside of the Python ecosystem, while " "pickle is Python-specific;" msgstr "" -#: library/pickle.rst:104 +#: library/pickle.rst:91 msgid "" "JSON, by default, can only represent a subset of the Python built-in types, " "and no custom classes; pickle can represent an extremely large number of " @@ -159,23 +139,23 @@ msgid "" "`specific object APIs `);" msgstr "" -#: library/pickle.rst:110 +#: library/pickle.rst:97 msgid "" "Unlike pickle, deserializing untrusted JSON does not in itself create an " "arbitrary code execution vulnerability." msgstr "" -#: library/pickle.rst:114 +#: library/pickle.rst:101 msgid "" "The :mod:`json` module: a standard library module allowing JSON " "serialization and deserialization." msgstr "" -#: library/pickle.rst:121 +#: library/pickle.rst:108 msgid "Data stream format" msgstr "" -#: library/pickle.rst:126 +#: library/pickle.rst:113 msgid "" "The data format used by :mod:`pickle` is Python-specific. This has the " "advantage that there are no restrictions imposed by external standards such " @@ -183,54 +163,54 @@ msgid "" "Python programs may not be able to reconstruct pickled Python objects." msgstr "" -#: library/pickle.rst:131 +#: library/pickle.rst:118 msgid "" "By default, the :mod:`pickle` data format uses a relatively compact binary " "representation. If you need optimal size characteristics, you can " "efficiently :doc:`compress ` pickled data." msgstr "" -#: library/pickle.rst:135 +#: library/pickle.rst:122 msgid "" "The module :mod:`pickletools` contains tools for analyzing data streams " "generated by :mod:`pickle`. :mod:`pickletools` source code has extensive " "comments about opcodes used by pickle protocols." msgstr "" -#: library/pickle.rst:139 +#: library/pickle.rst:126 msgid "" "There are currently 6 different protocols which can be used for pickling. " "The higher the protocol used, the more recent the version of Python needed " "to read the pickle produced." msgstr "" -#: library/pickle.rst:143 +#: library/pickle.rst:130 msgid "" "Protocol version 0 is the original \"human-readable\" protocol and is " "backwards compatible with earlier versions of Python." msgstr "" -#: library/pickle.rst:146 +#: library/pickle.rst:133 msgid "" "Protocol version 1 is an old binary format which is also compatible with " "earlier versions of Python." msgstr "" -#: library/pickle.rst:149 +#: library/pickle.rst:136 msgid "" "Protocol version 2 was introduced in Python 2.3. It provides much more " "efficient pickling of :term:`new-style classes `. Refer " "to :pep:`307` for information about improvements brought by protocol 2." msgstr "" -#: library/pickle.rst:153 +#: library/pickle.rst:140 msgid "" "Protocol version 3 was added in Python 3.0. It has explicit support for :" "class:`bytes` objects and cannot be unpickled by Python 2.x. This was the " "default protocol in Python 3.0--3.7." msgstr "" -#: library/pickle.rst:157 +#: library/pickle.rst:144 msgid "" "Protocol version 4 was added in Python 3.4. It adds support for very large " "objects, pickling more kinds of objects, and some data format " @@ -238,14 +218,14 @@ msgid "" "to :pep:`3154` for information about improvements brought by protocol 4." msgstr "" -#: library/pickle.rst:163 +#: library/pickle.rst:150 msgid "" "Protocol version 5 was added in Python 3.8. It adds support for out-of-band " "data and speedup for in-band data. Refer to :pep:`574` for information " "about improvements brought by protocol 5." msgstr "" -#: library/pickle.rst:168 +#: library/pickle.rst:155 msgid "" "Serialization is a more primitive notion than persistence; although :mod:" "`pickle` reads and writes file objects, it does not handle the issue of " @@ -259,11 +239,11 @@ msgid "" "and unpickle objects on DBM-style database files." msgstr "" -#: library/pickle.rst:181 +#: library/pickle.rst:168 msgid "Module Interface" msgstr "" -#: library/pickle.rst:183 +#: library/pickle.rst:170 msgid "" "To serialize an object hierarchy, you simply call the :func:`dumps` " "function. Similarly, to de-serialize a data stream, you call the :func:" @@ -272,18 +252,18 @@ msgid "" "object, respectively." msgstr "" -#: library/pickle.rst:188 +#: library/pickle.rst:175 msgid "The :mod:`pickle` module provides the following constants:" msgstr "" -#: library/pickle.rst:193 +#: library/pickle.rst:180 msgid "" "An integer, the highest :ref:`protocol version ` " "available. This value can be passed as a *protocol* value to functions :" "func:`dump` and :func:`dumps` as well as the :class:`Pickler` constructor." msgstr "" -#: library/pickle.rst:200 +#: library/pickle.rst:187 msgid "" "An integer, the default :ref:`protocol version ` used for " "pickling. May be less than :data:`HIGHEST_PROTOCOL`. Currently the default " @@ -291,130 +271,130 @@ msgid "" "versions." msgstr "" -#: library/pickle.rst:207 +#: library/pickle.rst:194 msgid "The default protocol is 3." msgstr "" -#: library/pickle.rst:211 +#: library/pickle.rst:198 msgid "The default protocol is 4." msgstr "" -#: library/pickle.rst:213 +#: library/pickle.rst:200 msgid "" "The :mod:`pickle` module provides the following functions to make the " "pickling process more convenient:" msgstr "" -#: library/pickle.rst:218 +#: library/pickle.rst:205 msgid "" "Write the pickled representation of the object *obj* to the open :term:`file " "object` *file*. This is equivalent to ``Pickler(file, protocol).dump(obj)``." msgstr "" -#: library/pickle.rst:222 +#: library/pickle.rst:209 msgid "" "Arguments *file*, *protocol*, *fix_imports* and *buffer_callback* have the " "same meaning as in the :class:`Pickler` constructor." msgstr "" -#: library/pickle.rst:236 library/pickle.rst:328 +#: library/pickle.rst:223 library/pickle.rst:315 msgid "The *buffer_callback* argument was added." msgstr "" -#: library/pickle.rst:230 +#: library/pickle.rst:217 msgid "" "Return the pickled representation of the object *obj* as a :class:`bytes` " "object, instead of writing it to a file." msgstr "" -#: library/pickle.rst:233 +#: library/pickle.rst:220 msgid "" "Arguments *protocol*, *fix_imports* and *buffer_callback* have the same " "meaning as in the :class:`Pickler` constructor." msgstr "" -#: library/pickle.rst:241 +#: library/pickle.rst:228 msgid "" "Read the pickled representation of an object from the open :term:`file " "object` *file* and return the reconstituted object hierarchy specified " "therein. This is equivalent to ``Unpickler(file).load()``." msgstr "" -#: library/pickle.rst:260 +#: library/pickle.rst:247 msgid "" "The protocol version of the pickle is detected automatically, so no protocol " "argument is needed. Bytes past the pickled representation of the object are " "ignored." msgstr "" -#: library/pickle.rst:249 +#: library/pickle.rst:236 msgid "" "Arguments *file*, *fix_imports*, *encoding*, *errors*, *strict* and " "*buffers* have the same meaning as in the :class:`Unpickler` constructor." msgstr "" -#: library/pickle.rst:267 library/pickle.rst:433 +#: library/pickle.rst:254 library/pickle.rst:420 msgid "The *buffers* argument was added." msgstr "" -#: library/pickle.rst:257 +#: library/pickle.rst:244 msgid "" "Return the reconstituted object hierarchy of the pickled representation " "*data* of an object. *data* must be a :term:`bytes-like object`." msgstr "" -#: library/pickle.rst:264 +#: library/pickle.rst:251 msgid "" "Arguments *fix_imports*, *encoding*, *errors*, *strict* and *buffers* have " "the same meaning as in the :class:`Unpickler` constructor." msgstr "" -#: library/pickle.rst:271 +#: library/pickle.rst:258 msgid "The :mod:`pickle` module defines three exceptions:" msgstr "" -#: library/pickle.rst:275 +#: library/pickle.rst:262 msgid "" "Common base class for the other pickling exceptions. It inherits from :exc:" "`Exception`." msgstr "" -#: library/pickle.rst:280 +#: library/pickle.rst:267 msgid "" "Error raised when an unpicklable object is encountered by :class:`Pickler`. " "It inherits from :exc:`PickleError`." msgstr "" -#: library/pickle.rst:283 +#: library/pickle.rst:270 msgid "" "Refer to :ref:`pickle-picklable` to learn what kinds of objects can be " "pickled." msgstr "" -#: library/pickle.rst:288 +#: library/pickle.rst:275 msgid "" "Error raised when there is a problem unpickling an object, such as a data " "corruption or a security violation. It inherits from :exc:`PickleError`." msgstr "" -#: library/pickle.rst:291 +#: library/pickle.rst:278 msgid "" "Note that other exceptions may also be raised during unpickling, including " "(but not necessarily limited to) AttributeError, EOFError, ImportError, and " "IndexError." msgstr "" -#: library/pickle.rst:296 +#: library/pickle.rst:283 msgid "" "The :mod:`pickle` module exports three classes, :class:`Pickler`, :class:" "`Unpickler` and :class:`PickleBuffer`:" msgstr "" -#: library/pickle.rst:301 +#: library/pickle.rst:288 msgid "This takes a binary file for writing a pickle data stream." msgstr "" -#: library/pickle.rst:303 +#: library/pickle.rst:290 msgid "" "The optional *protocol* argument, an integer, tells the pickler to use the " "given protocol; supported protocols are 0 to :data:`HIGHEST_PROTOCOL`. If " @@ -422,7 +402,7 @@ msgid "" "number is specified, :data:`HIGHEST_PROTOCOL` is selected." msgstr "" -#: library/pickle.rst:308 +#: library/pickle.rst:295 msgid "" "The *file* argument must have a write() method that accepts a single bytes " "argument. It can thus be an on-disk file opened for binary writing, an :" @@ -430,20 +410,20 @@ msgid "" "interface." msgstr "" -#: library/pickle.rst:313 +#: library/pickle.rst:300 msgid "" "If *fix_imports* is true and *protocol* is less than 3, pickle will try to " "map the new Python 3 names to the old module names used in Python 2, so that " "the pickle data stream is readable with Python 2." msgstr "" -#: library/pickle.rst:317 +#: library/pickle.rst:304 msgid "" "If *buffer_callback* is ``None`` (the default), buffer views are serialized " "into *file* as part of the pickle stream." msgstr "" -#: library/pickle.rst:320 +#: library/pickle.rst:307 msgid "" "If *buffer_callback* is not ``None``, then it can be called any number of " "times with a buffer view. If the callback returns a false value (such as " @@ -451,23 +431,23 @@ msgid "" "the buffer is serialized in-band, i.e. inside the pickle stream." msgstr "" -#: library/pickle.rst:325 +#: library/pickle.rst:312 msgid "" "It is an error if *buffer_callback* is not ``None`` and *protocol* is " "``None`` or smaller than 5." msgstr "" -#: library/pickle.rst:333 +#: library/pickle.rst:320 msgid "" "Write the pickled representation of *obj* to the open file object given in " "the constructor." msgstr "" -#: library/pickle.rst:338 +#: library/pickle.rst:325 msgid "Do nothing by default. This exists so a subclass can override it." msgstr "" -#: library/pickle.rst:340 +#: library/pickle.rst:327 msgid "" "If :meth:`persistent_id` returns ``None``, *obj* is pickled as usual. Any " "other value causes :class:`Pickler` to emit the returned value as a " @@ -476,17 +456,17 @@ msgid "" "by :meth:`persistent_id` cannot itself have a persistent ID." msgstr "" -#: library/pickle.rst:451 +#: library/pickle.rst:438 msgid "See :ref:`pickle-persistent` for details and examples of uses." msgstr "" -#: library/pickle.rst:348 +#: library/pickle.rst:335 msgid "" "Add the default implementation of this method in the C implementation of :" "class:`!Pickler`." msgstr "" -#: library/pickle.rst:354 +#: library/pickle.rst:341 msgid "" "A pickler object's dispatch table is a registry of *reduction functions* of " "the kind which can be declared using :func:`copyreg.pickle`. It is a " @@ -495,7 +475,7 @@ msgid "" "should conform to the same interface as a :meth:`~object.__reduce__` method." msgstr "" -#: library/pickle.rst:362 +#: library/pickle.rst:349 msgid "" "By default, a pickler object will not have a :attr:`dispatch_table` " "attribute, and it will instead use the global dispatch table managed by the :" @@ -506,11 +486,11 @@ msgid "" "table for instances of that class." msgstr "" -#: library/pickle.rst:371 +#: library/pickle.rst:358 msgid "See :ref:`pickle-dispatch` for usage examples." msgstr "" -#: library/pickle.rst:377 +#: library/pickle.rst:364 msgid "" "Special reducer that can be defined in :class:`Pickler` subclasses. This " "method has priority over any reducer in the :attr:`dispatch_table`. It " @@ -519,11 +499,11 @@ msgid "" "`dispatch_table`-registered reducers to pickle ``obj``." msgstr "" -#: library/pickle.rst:383 +#: library/pickle.rst:370 msgid "For a detailed example, see :ref:`reducer_override`." msgstr "" -#: library/pickle.rst:389 +#: library/pickle.rst:376 msgid "" "Deprecated. Enable fast mode if set to a true value. The fast mode disables " "the usage of memo, therefore speeding the pickling process by not generating " @@ -531,21 +511,21 @@ msgid "" "objects, doing otherwise will cause :class:`Pickler` to recurse infinitely." msgstr "" -#: library/pickle.rst:395 +#: library/pickle.rst:382 msgid "Use :func:`pickletools.optimize` if you need more compact pickles." msgstr "" -#: library/pickle.rst:400 +#: library/pickle.rst:387 msgid "This takes a binary file for reading a pickle data stream." msgstr "" -#: library/pickle.rst:402 +#: library/pickle.rst:389 msgid "" "The protocol version of the pickle is detected automatically, so no protocol " "argument is needed." msgstr "" -#: library/pickle.rst:405 +#: library/pickle.rst:392 msgid "" "The argument *file* must have three methods, a read() method that takes an " "integer argument, a readinto() method that takes a buffer argument and a " @@ -555,7 +535,7 @@ msgid "" "that meets this interface." msgstr "" -#: library/pickle.rst:412 +#: library/pickle.rst:399 msgid "" "The optional arguments *fix_imports*, *encoding* and *errors* are used to " "control compatibility support for pickle stream generated by Python 2. If " @@ -569,7 +549,7 @@ msgid "" "Python 2." msgstr "" -#: library/pickle.rst:423 +#: library/pickle.rst:410 msgid "" "If *buffers* is ``None`` (the default), then all data necessary for " "deserialization must be contained in the pickle stream. This means that the " @@ -577,7 +557,7 @@ msgid "" "instantiated (or when :func:`dump` or :func:`dumps` was called)." msgstr "" -#: library/pickle.rst:428 +#: library/pickle.rst:415 msgid "" "If *buffers* is not ``None``, it should be an iterable of buffer-enabled " "objects that is consumed each time the pickle stream references an :ref:`out-" @@ -585,31 +565,31 @@ msgid "" "the *buffer_callback* of a Pickler object." msgstr "" -#: library/pickle.rst:438 +#: library/pickle.rst:425 msgid "" "Read the pickled representation of an object from the open file object given " "in the constructor, and return the reconstituted object hierarchy specified " "therein. Bytes past the pickled representation of the object are ignored." msgstr "" -#: library/pickle.rst:445 +#: library/pickle.rst:432 msgid "Raise an :exc:`UnpicklingError` by default." msgstr "" -#: library/pickle.rst:447 +#: library/pickle.rst:434 msgid "" "If defined, :meth:`persistent_load` should return the object specified by " "the persistent ID *pid*. If an invalid persistent ID is encountered, an :" "exc:`UnpicklingError` should be raised." msgstr "" -#: library/pickle.rst:453 +#: library/pickle.rst:440 msgid "" "Add the default implementation of this method in the C implementation of :" "class:`!Unpickler`." msgstr "" -#: library/pickle.rst:459 +#: library/pickle.rst:446 msgid "" "Import *module* if necessary and return the object called *name* from it, " "where the *module* and *name* arguments are :class:`str` objects. Note, " @@ -617,41 +597,41 @@ msgid "" "functions." msgstr "" -#: library/pickle.rst:464 +#: library/pickle.rst:451 msgid "" "Subclasses may override this to gain control over what type of objects and " "how they can be loaded, potentially reducing security risks. Refer to :ref:" "`pickle-restrict` for details." msgstr "" -#: library/pickle.rst:468 +#: library/pickle.rst:455 msgid "" "Raises an :ref:`auditing event ` ``pickle.find_class`` with " "arguments ``module``, ``name``." msgstr "" -#: library/pickle.rst:472 +#: library/pickle.rst:459 msgid "" "A wrapper for a buffer representing picklable data. *buffer* must be a :ref:" "`buffer-providing ` object, such as a :term:`bytes-like " "object` or a N-dimensional array." msgstr "" -#: library/pickle.rst:476 +#: library/pickle.rst:463 msgid "" ":class:`PickleBuffer` is itself a buffer provider, therefore it is possible " "to pass it to other APIs expecting a buffer-providing object, such as :class:" "`memoryview`." msgstr "" -#: library/pickle.rst:480 +#: library/pickle.rst:467 msgid "" ":class:`PickleBuffer` objects can only be serialized using pickle protocol 5 " "or higher. They are eligible for :ref:`out-of-band serialization `." msgstr "" -#: library/pickle.rst:488 +#: library/pickle.rst:475 msgid "" "Return a :class:`memoryview` of the memory area underlying this buffer. The " "returned object is a one-dimensional, C-contiguous memoryview with format " @@ -659,54 +639,54 @@ msgid "" "neither C- nor Fortran-contiguous." msgstr "" -#: library/pickle.rst:495 +#: library/pickle.rst:482 msgid "Release the underlying buffer exposed by the PickleBuffer object." msgstr "" -#: library/pickle.rst:501 +#: library/pickle.rst:488 msgid "What can be pickled and unpickled?" msgstr "" -#: library/pickle.rst:503 +#: library/pickle.rst:490 msgid "The following types can be pickled:" msgstr "" -#: library/pickle.rst:505 +#: library/pickle.rst:492 msgid "" "built-in constants (``None``, ``True``, ``False``, ``Ellipsis``, and :data:" "`NotImplemented`);" msgstr "" -#: library/pickle.rst:508 +#: library/pickle.rst:495 msgid "integers, floating-point numbers, complex numbers;" msgstr "" -#: library/pickle.rst:510 +#: library/pickle.rst:497 msgid "strings, bytes, bytearrays;" msgstr "" -#: library/pickle.rst:512 +#: library/pickle.rst:499 msgid "" "tuples, lists, sets, and dictionaries containing only picklable objects;" msgstr "" -#: library/pickle.rst:514 +#: library/pickle.rst:501 msgid "" "functions (built-in and user-defined) accessible from the top level of a " "module (using :keyword:`def`, not :keyword:`lambda`);" msgstr "" -#: library/pickle.rst:517 +#: library/pickle.rst:504 msgid "classes accessible from the top level of a module;" msgstr "" -#: library/pickle.rst:519 +#: library/pickle.rst:506 msgid "" -"instances of such classes whose the result of calling :meth:`~object." +"instances of such classes for which the result of calling :meth:`~object." "__getstate__` is picklable (see section :ref:`pickle-inst` for details)." msgstr "" -#: library/pickle.rst:522 +#: library/pickle.rst:509 msgid "" "Attempts to pickle unpicklable objects will raise the :exc:`PicklingError` " "exception; when this happens, an unspecified number of bytes may have " @@ -716,7 +696,7 @@ msgid "" "limit with :func:`sys.setrecursionlimit`." msgstr "" -#: library/pickle.rst:529 +#: library/pickle.rst:516 msgid "" "Note that functions (built-in and user-defined) are pickled by fully :term:" "`qualified name`, not by value. [#]_ This means that only the function name " @@ -727,7 +707,7 @@ msgid "" "exception will be raised. [#]_" msgstr "" -#: library/pickle.rst:536 +#: library/pickle.rst:523 msgid "" "Similarly, classes are pickled by fully qualified name, so the same " "restrictions in the unpickling environment apply. Note that none of the " @@ -735,7 +715,7 @@ msgid "" "attribute ``attr`` is not restored in the unpickling environment::" msgstr "" -#: library/pickle.rst:541 +#: library/pickle.rst:528 msgid "" "class Foo:\n" " attr = 'A class attribute'\n" @@ -743,13 +723,13 @@ msgid "" "picklestring = pickle.dumps(Foo)" msgstr "" -#: library/pickle.rst:546 +#: library/pickle.rst:533 msgid "" "These restrictions are why picklable functions and classes must be defined " "at the top level of a module." msgstr "" -#: library/pickle.rst:549 +#: library/pickle.rst:536 msgid "" "Similarly, when class instances are pickled, their class's code and data are " "not pickled along with them. Only the instance data are pickled. This is " @@ -761,17 +741,17 @@ msgid "" "__setstate__` method." msgstr "" -#: library/pickle.rst:561 +#: library/pickle.rst:548 msgid "Pickling Class Instances" msgstr "" -#: library/pickle.rst:565 +#: library/pickle.rst:552 msgid "" "In this section, we describe the general mechanisms available to you to " "define, customize, and control how class instances are pickled and unpickled." msgstr "" -#: library/pickle.rst:568 +#: library/pickle.rst:555 msgid "" "In most cases, no additional code is needed to make instances picklable. By " "default, pickle will retrieve the class and the attributes of an instance " @@ -781,7 +761,7 @@ msgid "" "The following code shows an implementation of this behaviour::" msgstr "" -#: library/pickle.rst:575 +#: library/pickle.rst:562 msgid "" "def save(obj):\n" " return (obj.__class__, obj.__dict__)\n" @@ -792,15 +772,15 @@ msgid "" " return obj" msgstr "" -#: library/pickle.rst:583 +#: library/pickle.rst:570 msgid "" "Classes can alter the default behaviour by providing one or several special " "methods:" msgstr "" -#: library/pickle.rst:588 +#: library/pickle.rst:575 msgid "" -"In protocols 2 and newer, classes that implements the :meth:" +"In protocols 2 and newer, classes that implement the :meth:" "`__getnewargs_ex__` method can dictate the values passed to the :meth:" "`__new__` method upon unpickling. The method must return a pair ``(args, " "kwargs)`` where *args* is a tuple of positional arguments and *kwargs* a " @@ -808,37 +788,37 @@ msgid "" "passed to the :meth:`__new__` method upon unpickling." msgstr "" -#: library/pickle.rst:596 +#: library/pickle.rst:583 msgid "" "You should implement this method if the :meth:`__new__` method of your class " "requires keyword-only arguments. Otherwise, it is recommended for " "compatibility to implement :meth:`__getnewargs__`." msgstr "" -#: library/pickle.rst:600 +#: library/pickle.rst:587 msgid ":meth:`__getnewargs_ex__` is now used in protocols 2 and 3." msgstr "" -#: library/pickle.rst:606 +#: library/pickle.rst:593 msgid "" "This method serves a similar purpose as :meth:`__getnewargs_ex__`, but " "supports only positional arguments. It must return a tuple of arguments " "``args`` which will be passed to the :meth:`__new__` method upon unpickling." msgstr "" -#: library/pickle.rst:610 +#: library/pickle.rst:597 msgid "" ":meth:`__getnewargs__` will not be called if :meth:`__getnewargs_ex__` is " "defined." msgstr "" -#: library/pickle.rst:613 +#: library/pickle.rst:600 msgid "" "Before Python 3.6, :meth:`__getnewargs__` was called instead of :meth:" "`__getnewargs_ex__` in protocols 2 and 3." msgstr "" -#: library/pickle.rst:620 +#: library/pickle.rst:607 msgid "" "Classes can further influence how their instances are pickled by overriding " "the method :meth:`__getstate__`. It is called and the returned object is " @@ -846,19 +826,19 @@ msgid "" "are several cases:" msgstr "" -#: library/pickle.rst:625 +#: library/pickle.rst:612 msgid "" "For a class that has no instance :attr:`~object.__dict__` and no :attr:" "`~object.__slots__`, the default state is ``None``." msgstr "" -#: library/pickle.rst:628 +#: library/pickle.rst:615 msgid "" "For a class that has an instance :attr:`~object.__dict__` and no :attr:" "`~object.__slots__`, the default state is ``self.__dict__``." msgstr "" -#: library/pickle.rst:631 +#: library/pickle.rst:618 msgid "" "For a class that has an instance :attr:`~object.__dict__` and :attr:`~object." "__slots__`, the default state is a tuple consisting of two dictionaries: " @@ -866,7 +846,7 @@ msgid "" "slots that have a value are included in the latter." msgstr "" -#: library/pickle.rst:637 +#: library/pickle.rst:624 msgid "" "For a class that has :attr:`~object.__slots__` and no instance :attr:" "`~object.__dict__`, the default state is a tuple whose first item is " @@ -874,13 +854,13 @@ msgid "" "values described in the previous bullet." msgstr "" -#: library/pickle.rst:642 +#: library/pickle.rst:629 msgid "" "Added the default implementation of the ``__getstate__()`` method in the :" "class:`object` class." msgstr "" -#: library/pickle.rst:649 +#: library/pickle.rst:636 msgid "" "Upon unpickling, if the class defines :meth:`__setstate__`, it is called " "with the unpickled state. In that case, there is no requirement for the " @@ -888,20 +868,20 @@ msgid "" "dictionary and its items are assigned to the new instance's dictionary." msgstr "" -#: library/pickle.rst:656 +#: library/pickle.rst:643 msgid "" "If :meth:`__reduce__` returns a state with value ``None`` at pickling, the :" "meth:`__setstate__` method will not be called upon unpickling." msgstr "" -#: library/pickle.rst:660 +#: library/pickle.rst:647 msgid "" "Refer to the section :ref:`pickle-state` for more information about how to " "use the methods :meth:`~object.__getstate__` and :meth:`~object." "__setstate__`." msgstr "" -#: library/pickle.rst:665 +#: library/pickle.rst:652 msgid "" "At unpickling time, some methods like :meth:`~object.__getattr__`, :meth:" "`~object.__getattribute__`, or :meth:`~object.__setattr__` may be called " @@ -911,7 +891,7 @@ msgid "" "an instance." msgstr "" -#: library/pickle.rst:674 +#: library/pickle.rst:661 msgid "" "As we shall see, pickle does not use directly the methods described above. " "In fact, these methods are part of the copy protocol which implements the :" @@ -920,7 +900,7 @@ msgid "" "objects. [#]_" msgstr "" -#: library/pickle.rst:680 +#: library/pickle.rst:667 msgid "" "Although powerful, implementing :meth:`~object.__reduce__` directly in your " "classes is error prone. For this reason, class designers should use the " @@ -930,41 +910,44 @@ msgid "" "option or leads to more efficient pickling or both." msgstr "" -#: library/pickle.rst:689 +#: library/pickle.rst:676 msgid "" "The interface is currently defined as follows. The :meth:`__reduce__` " "method takes no argument and shall return either a string or preferably a " "tuple (the returned object is often referred to as the \"reduce value\")." msgstr "" -#: library/pickle.rst:693 +#: library/pickle.rst:680 msgid "" "If a string is returned, the string should be interpreted as the name of a " "global variable. It should be the object's local name relative to its " "module; the pickle module searches the module namespace to determine the " -"object's module. This behaviour is typically useful for singletons." +"object's module: for a given ``obj`` to be pickled, the ``__module__`` " +"attribute is looked up on ``obj`` directly, which falls back to a lookup on " +"the type of ``obj`` if no ``__module__`` instance attribute is set. This " +"behaviour is typically useful for singletons." msgstr "" -#: library/pickle.rst:698 +#: library/pickle.rst:688 msgid "" "When a tuple is returned, it must be between two and six items long. " "Optional items can either be omitted, or ``None`` can be provided as their " "value. The semantics of each item are in order:" msgstr "" -#: library/pickle.rst:704 +#: library/pickle.rst:694 msgid "" "A callable object that will be called to create the initial version of the " "object." msgstr "" -#: library/pickle.rst:707 +#: library/pickle.rst:697 msgid "" "A tuple of arguments for the callable object. An empty tuple must be given " "if the callable does not accept any argument." msgstr "" -#: library/pickle.rst:710 +#: library/pickle.rst:700 msgid "" "Optionally, the object's state, which will be passed to the object's :meth:" "`__setstate__` method as previously described. If the object has no such " @@ -972,7 +955,7 @@ msgid "" "object's :attr:`~object.__dict__` attribute." msgstr "" -#: library/pickle.rst:715 +#: library/pickle.rst:705 msgid "" "Optionally, an iterator (and not a sequence) yielding successive items. " "These items will be appended to the object either using ``obj.append(item)`` " @@ -984,7 +967,7 @@ msgid "" "items to append, so both must be supported.)" msgstr "" -#: library/pickle.rst:725 +#: library/pickle.rst:715 msgid "" "Optionally, an iterator (not a sequence) yielding successive key-value " "pairs. These items will be stored to the object using ``obj[key] = " @@ -992,7 +975,7 @@ msgid "" "by other classes as long as they implement :meth:`__setitem__`." msgstr "" -#: library/pickle.rst:730 +#: library/pickle.rst:720 msgid "" "Optionally, a callable with a ``(obj, state)`` signature. This callable " "allows the user to programmatically control the state-updating behavior of a " @@ -1001,11 +984,11 @@ msgid "" "meth:`__setstate__`." msgstr "" -#: library/pickle.rst:736 +#: library/pickle.rst:726 msgid "The optional sixth tuple item, ``(obj, state)``, was added." msgstr "" -#: library/pickle.rst:742 +#: library/pickle.rst:732 msgid "" "Alternatively, a :meth:`__reduce_ex__` method may be defined. The only " "difference is this method should take a single integer argument, the " @@ -1015,11 +998,11 @@ msgid "" "provide backwards-compatible reduce values for older Python releases." msgstr "" -#: library/pickle.rst:754 +#: library/pickle.rst:744 msgid "Persistence of External Objects" msgstr "" -#: library/pickle.rst:760 +#: library/pickle.rst:750 msgid "" "For the benefit of object persistence, the :mod:`pickle` module supports the " "notion of a reference to an object outside the pickled data stream. Such " @@ -1028,7 +1011,7 @@ msgid "" "(for any newer protocol)." msgstr "" -#: library/pickle.rst:766 +#: library/pickle.rst:756 msgid "" "The resolution of such persistent IDs is not defined by the :mod:`pickle` " "module; it will delegate this resolution to the user-defined methods on the " @@ -1036,7 +1019,7 @@ msgid "" "persistent_load` respectively." msgstr "" -#: library/pickle.rst:771 +#: library/pickle.rst:761 msgid "" "To pickle objects that have an external persistent ID, the pickler must have " "a custom :meth:`~Pickler.persistent_id` method that takes an object as an " @@ -1047,20 +1030,20 @@ msgid "" "persistent ID." msgstr "" -#: library/pickle.rst:778 +#: library/pickle.rst:768 msgid "" "To unpickle external objects, the unpickler must have a custom :meth:" "`~Unpickler.persistent_load` method that takes a persistent ID object and " "returns the referenced object." msgstr "" -#: library/pickle.rst:782 +#: library/pickle.rst:772 msgid "" "Here is a comprehensive example presenting how persistent ID can be used to " "pickle external objects by reference." msgstr "" -#: library/pickle.rst:785 +#: library/pickle.rst:775 msgid "" "# Simple example presenting how persistent ID can be used to pickle\n" "# external objects by reference.\n" @@ -1158,29 +1141,29 @@ msgid "" " main()\n" msgstr "" -#: library/pickle.rst:790 +#: library/pickle.rst:780 msgid "Dispatch Tables" msgstr "" -#: library/pickle.rst:792 +#: library/pickle.rst:782 msgid "" "If one wants to customize pickling of some classes without disturbing any " "other code which depends on pickling, then one can create a pickler with a " "private dispatch table." msgstr "" -#: library/pickle.rst:796 +#: library/pickle.rst:786 msgid "" "The global dispatch table managed by the :mod:`copyreg` module is available " "as :data:`!copyreg.dispatch_table`. Therefore, one may choose to use a " "modified copy of :data:`!copyreg.dispatch_table` as a private dispatch table." msgstr "" -#: library/pickle.rst:801 +#: library/pickle.rst:791 msgid "For example ::" msgstr "" -#: library/pickle.rst:803 +#: library/pickle.rst:793 msgid "" "f = io.BytesIO()\n" "p = pickle.Pickler(f)\n" @@ -1188,13 +1171,13 @@ msgid "" "p.dispatch_table[SomeClass] = reduce_SomeClass" msgstr "" -#: library/pickle.rst:808 +#: library/pickle.rst:798 msgid "" "creates an instance of :class:`pickle.Pickler` with a private dispatch table " "which handles the ``SomeClass`` class specially. Alternatively, the code ::" msgstr "" -#: library/pickle.rst:812 +#: library/pickle.rst:802 msgid "" "class MyPickler(pickle.Pickler):\n" " dispatch_table = copyreg.dispatch_table.copy()\n" @@ -1203,30 +1186,30 @@ msgid "" "p = MyPickler(f)" msgstr "" -#: library/pickle.rst:818 +#: library/pickle.rst:808 msgid "" "does the same but all instances of ``MyPickler`` will by default share the " "private dispatch table. On the other hand, the code ::" msgstr "" -#: library/pickle.rst:821 +#: library/pickle.rst:811 msgid "" "copyreg.pickle(SomeClass, reduce_SomeClass)\n" "f = io.BytesIO()\n" "p = pickle.Pickler(f)" msgstr "" -#: library/pickle.rst:825 +#: library/pickle.rst:815 msgid "" "modifies the global dispatch table shared by all users of the :mod:`copyreg` " "module." msgstr "" -#: library/pickle.rst:830 +#: library/pickle.rst:820 msgid "Handling Stateful Objects" msgstr "" -#: library/pickle.rst:836 +#: library/pickle.rst:826 msgid "" "Here's an example that shows how to modify pickling behavior for a class. " "The :class:`!TextReader` class below opens a text file, and returns the line " @@ -1238,7 +1221,7 @@ msgid "" "behavior. ::" msgstr "" -#: library/pickle.rst:844 +#: library/pickle.rst:834 msgid "" "class TextReader:\n" " \"\"\"Print and number lines in a text file.\"\"\"\n" @@ -1278,11 +1261,11 @@ msgid "" " self.file = file" msgstr "" -#: library/pickle.rst:882 +#: library/pickle.rst:872 msgid "A sample usage might be something like this::" msgstr "" -#: library/pickle.rst:884 +#: library/pickle.rst:874 msgid "" ">>> reader = TextReader(\"hello.txt\")\n" ">>> reader.readline()\n" @@ -1294,11 +1277,11 @@ msgid "" "'3: Goodbye!'" msgstr "" -#: library/pickle.rst:896 +#: library/pickle.rst:886 msgid "Custom Reduction for Types, Functions, and Other Objects" msgstr "" -#: library/pickle.rst:900 +#: library/pickle.rst:890 msgid "" "Sometimes, :attr:`~Pickler.dispatch_table` may not be flexible enough. In " "particular we may want to customize pickling based on another criterion than " @@ -1306,7 +1289,7 @@ msgid "" "classes." msgstr "" -#: library/pickle.rst:905 +#: library/pickle.rst:895 msgid "" "For those cases, it is possible to subclass from the :class:`Pickler` class " "and implement a :meth:`~Pickler.reducer_override` method. This method can " @@ -1315,14 +1298,14 @@ msgid "" "behavior." msgstr "" -#: library/pickle.rst:910 +#: library/pickle.rst:900 msgid "" "If both the :attr:`~Pickler.dispatch_table` and :meth:`~Pickler." "reducer_override` are defined, then :meth:`~Pickler.reducer_override` method " "takes priority." msgstr "" -#: library/pickle.rst:915 +#: library/pickle.rst:905 msgid "" "For performance reasons, :meth:`~Pickler.reducer_override` may not be called " "for the following objects: ``None``, ``True``, ``False``, and exact " @@ -1331,13 +1314,13 @@ msgid "" "`tuple`." msgstr "" -#: library/pickle.rst:921 +#: library/pickle.rst:911 msgid "" "Here is a simple example where we allow pickling and reconstructing a given " "class::" msgstr "" -#: library/pickle.rst:924 +#: library/pickle.rst:914 msgid "" "import io\n" "import pickle\n" @@ -1368,11 +1351,11 @@ msgid "" "assert unpickled_class.my_attribute == 1" msgstr "" -#: library/pickle.rst:956 +#: library/pickle.rst:946 msgid "Out-of-band Buffers" msgstr "" -#: library/pickle.rst:960 +#: library/pickle.rst:950 msgid "" "In some contexts, the :mod:`pickle` module is used to transfer massive " "amounts of data. Therefore, it can be important to minimize the number of " @@ -1382,7 +1365,7 @@ msgid "" "involves copying data to and from the pickle stream." msgstr "" -#: library/pickle.rst:967 +#: library/pickle.rst:957 msgid "" "This constraint can be eschewed if both the *provider* (the implementation " "of the object types to be transferred) and the *consumer* (the " @@ -1390,11 +1373,11 @@ msgid "" "transfer facilities provided by pickle protocol 5 and higher." msgstr "" -#: library/pickle.rst:973 +#: library/pickle.rst:963 msgid "Provider API" msgstr "" -#: library/pickle.rst:975 +#: library/pickle.rst:965 msgid "" "The large data objects to be pickled must implement a :meth:`~object." "__reduce_ex__` method specialized for protocol 5 and higher, which returns " @@ -1402,7 +1385,7 @@ msgid "" "for any large data." msgstr "" -#: library/pickle.rst:980 +#: library/pickle.rst:970 msgid "" "A :class:`PickleBuffer` object *signals* that the underlying buffer is " "eligible for out-of-band data transfer. Those objects remain compatible " @@ -1411,17 +1394,17 @@ msgid "" "themselves." msgstr "" -#: library/pickle.rst:987 +#: library/pickle.rst:977 msgid "Consumer API" msgstr "" -#: library/pickle.rst:989 +#: library/pickle.rst:979 msgid "" "A communications system can enable custom handling of the :class:" "`PickleBuffer` objects generated when serializing an object graph." msgstr "" -#: library/pickle.rst:992 +#: library/pickle.rst:982 msgid "" "On the sending side, it needs to pass a *buffer_callback* argument to :class:" "`Pickler` (or to the :func:`dump` or :func:`dumps` function), which will be " @@ -1430,7 +1413,7 @@ msgid "" "copied into the pickle stream, only a cheap marker will be inserted." msgstr "" -#: library/pickle.rst:999 +#: library/pickle.rst:989 msgid "" "On the receiving side, it needs to pass a *buffers* argument to :class:" "`Unpickler` (or to the :func:`load` or :func:`loads` function), which is an " @@ -1441,7 +1424,7 @@ msgid "" "`PickleBuffer` objects." msgstr "" -#: library/pickle.rst:1007 +#: library/pickle.rst:997 msgid "" "Between the sending side and the receiving side, the communications system " "is free to implement its own transfer mechanism for out-of-band buffers. " @@ -1449,17 +1432,17 @@ msgid "" "dependent compression." msgstr "" -#: library/pickle.rst:1013 +#: library/pickle.rst:1003 msgid "Example" msgstr "" -#: library/pickle.rst:1015 +#: library/pickle.rst:1005 msgid "" "Here is a trivial example where we implement a :class:`bytearray` subclass " "able to participate in out-of-band buffer pickling::" msgstr "" -#: library/pickle.rst:1018 +#: library/pickle.rst:1008 msgid "" "class ZeroCopyByteArray(bytearray):\n" "\n" @@ -1483,20 +1466,20 @@ msgid "" " return cls(obj)" msgstr "" -#: library/pickle.rst:1039 +#: library/pickle.rst:1029 msgid "" "The reconstructor (the ``_reconstruct`` class method) returns the buffer's " "providing object if it has the right type. This is an easy way to simulate " "zero-copy behaviour on this toy example." msgstr "" -#: library/pickle.rst:1043 +#: library/pickle.rst:1033 msgid "" "On the consumer side, we can pickle those objects the usual way, which when " "unserialized will give us a copy of the original object::" msgstr "" -#: library/pickle.rst:1046 +#: library/pickle.rst:1036 msgid "" "b = ZeroCopyByteArray(b\"abc\")\n" "data = pickle.dumps(b, protocol=5)\n" @@ -1505,13 +1488,13 @@ msgid "" "print(b is new_b) # False: a copy was made" msgstr "" -#: library/pickle.rst:1052 +#: library/pickle.rst:1042 msgid "" "But if we pass a *buffer_callback* and then give back the accumulated " "buffers when unserializing, we are able to get back the original object::" msgstr "" -#: library/pickle.rst:1055 +#: library/pickle.rst:1045 msgid "" "b = ZeroCopyByteArray(b\"abc\")\n" "buffers = []\n" @@ -1521,7 +1504,7 @@ msgid "" "print(b is new_b) # True: no copy was made" msgstr "" -#: library/pickle.rst:1062 +#: library/pickle.rst:1052 msgid "" "This example is limited by the fact that :class:`bytearray` allocates its " "own memory: you cannot create a :class:`bytearray` instance that is backed " @@ -1531,15 +1514,15 @@ msgid "" "processes or systems." msgstr "" -#: library/pickle.rst:1069 +#: library/pickle.rst:1059 msgid ":pep:`574` -- Pickle protocol 5 with out-of-band data" msgstr "" -#: library/pickle.rst:1075 +#: library/pickle.rst:1065 msgid "Restricting Globals" msgstr "" -#: library/pickle.rst:1080 +#: library/pickle.rst:1070 msgid "" "By default, unpickling will import any class or function that it finds in " "the pickle data. For many applications, this behaviour is unacceptable as " @@ -1547,7 +1530,7 @@ msgid "" "what this hand-crafted pickle data stream does when loaded::" msgstr "" -#: library/pickle.rst:1085 +#: library/pickle.rst:1075 msgid "" ">>> import pickle\n" ">>> pickle.loads(b\"cos\\nsystem\\n(S'echo hello world'\\ntR.\")\n" @@ -1555,7 +1538,7 @@ msgid "" "0" msgstr "" -#: library/pickle.rst:1090 +#: library/pickle.rst:1080 msgid "" "In this example, the unpickler imports the :func:`os.system` function and " "then apply the string argument \"echo hello world\". Although this example " @@ -1563,7 +1546,7 @@ msgid "" "system." msgstr "" -#: library/pickle.rst:1094 +#: library/pickle.rst:1084 msgid "" "For this reason, you may want to control what gets unpickled by customizing :" "meth:`Unpickler.find_class`. Unlike its name suggests, :meth:`Unpickler." @@ -1572,13 +1555,13 @@ msgid "" "restrict them to a safe subset." msgstr "" -#: library/pickle.rst:1100 +#: library/pickle.rst:1090 msgid "" "Here is an example of an unpickler allowing only few safe classes from the :" "mod:`builtins` module to be loaded::" msgstr "" -#: library/pickle.rst:1103 +#: library/pickle.rst:1093 msgid "" "import builtins\n" "import io\n" @@ -1607,11 +1590,11 @@ msgid "" " return RestrictedUnpickler(io.BytesIO(s)).load()" msgstr "" -#: library/pickle.rst:1129 +#: library/pickle.rst:1119 msgid "A sample usage of our unpickler working as intended::" msgstr "" -#: library/pickle.rst:1131 +#: library/pickle.rst:1121 msgid "" ">>> restricted_loads(pickle.dumps([1, 2, range(15)]))\n" "[1, 2, range(0, 15)]\n" @@ -1627,7 +1610,7 @@ msgid "" "pickle.UnpicklingError: global 'builtins.eval' is forbidden" msgstr "" -#: library/pickle.rst:1148 +#: library/pickle.rst:1138 msgid "" "As our examples shows, you have to be careful with what you allow to be " "unpickled. Therefore if security is a concern, you may want to consider " @@ -1635,27 +1618,27 @@ msgid "" "party solutions." msgstr "" -#: library/pickle.rst:1155 +#: library/pickle.rst:1145 msgid "Performance" msgstr "" -#: library/pickle.rst:1157 +#: library/pickle.rst:1147 msgid "" "Recent versions of the pickle protocol (from protocol 2 and upwards) feature " "efficient binary encodings for several common features and built-in types. " "Also, the :mod:`pickle` module has a transparent optimizer written in C." msgstr "" -#: library/pickle.rst:1165 +#: library/pickle.rst:1155 msgid "Examples" msgstr "" -#: library/pickle.rst:1167 +#: library/pickle.rst:1157 msgid "" "For the simplest code, use the :func:`dump` and :func:`load` functions. ::" msgstr "" -#: library/pickle.rst:1169 +#: library/pickle.rst:1159 msgid "" "import pickle\n" "\n" @@ -1671,11 +1654,11 @@ msgid "" " pickle.dump(data, f, pickle.HIGHEST_PROTOCOL)" msgstr "" -#: library/pickle.rst:1183 +#: library/pickle.rst:1173 msgid "The following example reads the resulting pickled data. ::" msgstr "" -#: library/pickle.rst:1185 +#: library/pickle.rst:1175 msgid "" "import pickle\n" "\n" @@ -1685,73 +1668,73 @@ msgid "" " data = pickle.load(f)" msgstr "" -#: library/pickle.rst:1199 +#: library/pickle.rst:1189 msgid "Module :mod:`copyreg`" msgstr "" -#: library/pickle.rst:1200 +#: library/pickle.rst:1190 msgid "Pickle interface constructor registration for extension types." msgstr "" -#: library/pickle.rst:1202 +#: library/pickle.rst:1192 msgid "Module :mod:`pickletools`" msgstr "" -#: library/pickle.rst:1203 +#: library/pickle.rst:1193 msgid "Tools for working with and analyzing pickled data." msgstr "" -#: library/pickle.rst:1205 +#: library/pickle.rst:1195 msgid "Module :mod:`shelve`" msgstr "" -#: library/pickle.rst:1206 +#: library/pickle.rst:1196 msgid "Indexed databases of objects; uses :mod:`pickle`." msgstr "" -#: library/pickle.rst:1208 +#: library/pickle.rst:1198 msgid "Module :mod:`copy`" msgstr "" -#: library/pickle.rst:1209 +#: library/pickle.rst:1199 msgid "Shallow and deep object copying." msgstr "" -#: library/pickle.rst:1211 +#: library/pickle.rst:1201 msgid "Module :mod:`marshal`" msgstr "" -#: library/pickle.rst:1212 +#: library/pickle.rst:1202 msgid "High-performance serialization of built-in types." msgstr "" -#: library/pickle.rst:1216 +#: library/pickle.rst:1206 msgid "Footnotes" msgstr "" -#: library/pickle.rst:1217 +#: library/pickle.rst:1207 msgid "Don't confuse this with the :mod:`marshal` module" msgstr "" -#: library/pickle.rst:1219 +#: library/pickle.rst:1209 msgid "" "This is why :keyword:`lambda` functions cannot be pickled: all :keyword:`!" "lambda` functions share the same name: ````." msgstr "" -#: library/pickle.rst:1222 +#: library/pickle.rst:1212 msgid "" "The exception raised will likely be an :exc:`ImportError` or an :exc:" "`AttributeError` but it could be something else." msgstr "" -#: library/pickle.rst:1225 +#: library/pickle.rst:1215 msgid "" "The :mod:`copy` module uses this protocol for shallow and deep copying " "operations." msgstr "" -#: library/pickle.rst:1228 +#: library/pickle.rst:1218 msgid "" "The limitation on alphanumeric characters is due to the fact that persistent " "IDs in protocol 0 are delimited by the newline character. Therefore if any " @@ -1787,34 +1770,34 @@ msgstr "" msgid "pickling" msgstr "" -#: library/pickle.rst:123 +#: library/pickle.rst:110 msgid "External Data Representation" msgstr "" -#: library/pickle.rst:672 +#: library/pickle.rst:659 msgid "copy" msgstr "" -#: library/pickle.rst:672 +#: library/pickle.rst:659 msgid "protocol" msgstr "" -#: library/pickle.rst:756 +#: library/pickle.rst:746 msgid "persistent_id (pickle protocol)" msgstr "" -#: library/pickle.rst:756 +#: library/pickle.rst:746 msgid "persistent_load (pickle protocol)" msgstr "" -#: library/pickle.rst:832 +#: library/pickle.rst:822 msgid "__getstate__() (copy protocol)" msgstr "" -#: library/pickle.rst:832 +#: library/pickle.rst:822 msgid "__setstate__() (copy protocol)" msgstr "" -#: library/pickle.rst:1077 +#: library/pickle.rst:1067 msgid "find_class() (pickle protocol)" msgstr "" diff --git a/library/pickletools.po b/library/pickletools.po index 54df1e6c3..12656d783 100644 --- a/library/pickletools.po +++ b/library/pickletools.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/pipes.po b/library/pipes.po index 4011b1117..c5ff83c2a 100644 --- a/library/pipes.po +++ b/library/pipes.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/pkgutil.po b/library/pkgutil.po index 49a706ae5..d14c3fe9f 100644 --- a/library/pkgutil.po +++ b/library/pkgutil.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -228,29 +228,58 @@ msgid "" "ResourceLoader.get_data>` API. The *package* argument should be the name of " "a package, in standard module format (``foo.bar``). The *resource* argument " "should be in the form of a relative filename, using ``/`` as the path " -"separator. The parent directory name ``..`` is not allowed, and nor is a " -"rooted name (starting with a ``/``)." +"separator." msgstr "" -#: library/pkgutil.rst:197 +#: library/pkgutil.rst:196 msgid "" "The function returns a binary string that is the contents of the specified " "resource." msgstr "" -#: library/pkgutil.rst:200 +#: library/pkgutil.rst:199 +msgid "" +"This function uses the :term:`loader` method :func:`~importlib.abc." +"FileLoader.get_data` to support modules installed in the filesystem, but " +"also in zip files, databases, or elsewhere." +msgstr "" + +#: library/pkgutil.rst:204 msgid "" "For packages located in the filesystem, which have already been imported, " "this is the rough equivalent of::" msgstr "" -#: library/pkgutil.rst:203 +#: library/pkgutil.rst:207 msgid "" "d = os.path.dirname(sys.modules[package].__file__)\n" "data = open(os.path.join(d, resource), 'rb').read()" msgstr "" -#: library/pkgutil.rst:206 +#: library/pkgutil.rst:210 +msgid "" +"Like the :func:`open` function, :func:`!get_data` can follow parent " +"directories (``../``) and absolute paths (starting with ``/`` or ``C:/``, " +"for example). It can open compilation/installation artifacts like ``.py`` " +"and ``.pyc`` files or files with :func:`reserved filenames `. To be compatible with non-filesystem loaders, avoid using " +"these features." +msgstr "" + +#: library/pkgutil.rst:219 +msgid "" +"This function is intended for trusted input. It does not verify that " +"*resource* \"belongs\" to *package*." +msgstr "" + +#: library/pkgutil.rst:222 +msgid "" +"If you use a user-provided *resource* path, consider verifying it. For " +"example, require an alphanumeric filename with a known extension, or install " +"and check a list of known resources." +msgstr "" + +#: library/pkgutil.rst:226 msgid "" "If the package cannot be located or loaded, or it uses a :term:`loader` " "which does not support :meth:`get_data `." msgstr "" -#: library/pkgutil.rst:215 +#: library/pkgutil.rst:234 +msgid "" +"The :mod:`importlib.resources` module provides structured access to module " +"resources." +msgstr "" + +#: library/pkgutil.rst:239 msgid "Resolve a name to an object." msgstr "" -#: library/pkgutil.rst:217 +#: library/pkgutil.rst:241 msgid "" "This functionality is used in numerous places in the standard library (see :" "issue:`12915`) - and equivalent functionality is also in widely used third-" "party packages such as setuptools, Django and Pyramid." msgstr "" -#: library/pkgutil.rst:221 +#: library/pkgutil.rst:245 msgid "" "It is expected that *name* will be a string in one of the following formats, " "where W is shorthand for a valid Python identifier and dot stands for a " "literal period in these pseudo-regexes:" msgstr "" -#: library/pkgutil.rst:225 +#: library/pkgutil.rst:249 msgid "``W(.W)*``" msgstr "" -#: library/pkgutil.rst:226 +#: library/pkgutil.rst:250 msgid "``W(.W)*:(W(.W)*)?``" msgstr "" -#: library/pkgutil.rst:228 +#: library/pkgutil.rst:252 msgid "" "The first form is intended for backward compatibility only. It assumes that " "some part of the dotted name is a package, and the rest is an object " @@ -295,7 +330,7 @@ msgid "" "form." msgstr "" -#: library/pkgutil.rst:235 +#: library/pkgutil.rst:259 msgid "" "In the second form, the caller makes the division point clear through the " "provision of a single colon: the dotted name to the left of the colon is a " @@ -304,21 +339,21 @@ msgid "" "ends with the colon, then a module object is returned." msgstr "" -#: library/pkgutil.rst:241 +#: library/pkgutil.rst:265 msgid "" "The function will return an object (which might be a module), or raise one " "of the following exceptions:" msgstr "" -#: library/pkgutil.rst:244 +#: library/pkgutil.rst:268 msgid ":exc:`ValueError` -- if *name* isn't in a recognised format." msgstr "" -#: library/pkgutil.rst:246 +#: library/pkgutil.rst:270 msgid ":exc:`ImportError` -- if an import failed when it shouldn't have." msgstr "" -#: library/pkgutil.rst:248 +#: library/pkgutil.rst:272 msgid "" ":exc:`AttributeError` -- If a failure occurred when traversing the object " "hierarchy within the imported package to get to the desired object." diff --git a/library/platform.po b/library/platform.po index 250057b8b..3a1dc11c6 100644 --- a/library/platform.po +++ b/library/platform.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: 2025-05-05 21:41+0200\n" "Last-Translator: Marios Giannopoulos \n" "Language-Team: PyGreece \n" diff --git a/library/plistlib.po b/library/plistlib.po index cb99f1b0a..a82532a8a 100644 --- a/library/plistlib.po +++ b/library/plistlib.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -249,7 +249,7 @@ msgstr "" #: library/plistlib.rst:187 msgid "" -"import datetime\n" +"import datetime as dt\n" "import plistlib\n" "\n" "pl = dict(\n" @@ -265,7 +265,7 @@ msgid "" " ),\n" " someData = b\"\",\n" " someMoreData = b\"\" * 10,\n" -" aDate = datetime.datetime.now()\n" +" aDate = dt.datetime.now()\n" ")\n" "print(plistlib.dumps(pl).decode())" msgstr "" diff --git a/library/poplib.po b/library/poplib.po index 808237876..4d5194149 100644 --- a/library/poplib.po +++ b/library/poplib.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/posix.po b/library/posix.po index bfea1a0e8..c61bd6e01 100644 --- a/library/posix.po +++ b/library/posix.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,18 +21,18 @@ msgstr "" msgid ":mod:`!posix` --- The most common POSIX system calls" msgstr "" -#: library/posix.rst:10 +#: library/posix.rst:9 msgid "" "This module provides access to operating system functionality that is " "standardized by the C Standard and the POSIX standard (a thinly disguised " "Unix interface)." msgstr "" -#: library/posix.rst:14 +#: library/posix.rst:13 msgid "Availability" msgstr "" -#: library/posix.rst:18 +#: library/posix.rst:17 msgid "" "**Do not import this module directly.** Instead, import the module :mod:" "`os`, which provides a *portable* version of this interface. On Unix, the :" @@ -45,17 +45,17 @@ msgid "" "environ`` is changed." msgstr "" -#: library/posix.rst:27 +#: library/posix.rst:26 msgid "" "Errors are reported as exceptions; the usual exceptions are given for type " "errors, while errors reported by the system calls raise :exc:`OSError`." msgstr "" -#: library/posix.rst:34 +#: library/posix.rst:33 msgid "Large File Support" msgstr "" -#: library/posix.rst:42 +#: library/posix.rst:41 msgid "" "Several operating systems (including AIX and Solaris) provide support for " "files that are larger than 2 GiB from a C programming model where :c:expr:" @@ -64,7 +64,7 @@ msgid "" "are sometimes referred to as :dfn:`large files`." msgstr "" -#: library/posix.rst:48 +#: library/posix.rst:47 msgid "" "Large file support is enabled in Python when the size of an :c:type:`off_t` " "is larger than a :c:expr:`long` and the :c:expr:`long long` is at least as " @@ -73,34 +73,34 @@ msgid "" "Solaris 2.6 and 2.7 you need to do something like::" msgstr "" -#: library/posix.rst:55 +#: library/posix.rst:54 msgid "" "CFLAGS=\"`getconf LFS_CFLAGS`\" OPT=\"-g -O2 $CFLAGS\" \\\n" " ./configure" msgstr "" -#: library/posix.rst:58 +#: library/posix.rst:57 msgid "On large-file-capable Linux systems, this might work::" msgstr "" -#: library/posix.rst:60 +#: library/posix.rst:59 msgid "" "CFLAGS='-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64' OPT=\"-g -O2 $CFLAGS\" " "\\\n" " ./configure" msgstr "" -#: library/posix.rst:67 +#: library/posix.rst:66 msgid "Notable Module Contents" msgstr "" -#: library/posix.rst:69 +#: library/posix.rst:68 msgid "" "In addition to many functions described in the :mod:`os` module " "documentation, :mod:`posix` defines the following data item:" msgstr "" -#: library/posix.rst:74 +#: library/posix.rst:73 msgid "" "A dictionary representing the string environment at the time the interpreter " "was started. Keys and values are bytes on Unix and str on Windows. For " @@ -108,7 +108,7 @@ msgid "" "pathname of your home directory, equivalent to ``getenv(\"HOME\")`` in C." msgstr "" -#: library/posix.rst:79 +#: library/posix.rst:78 msgid "" "Modifying this dictionary does not affect the string environment passed on " "by :func:`~os.execv`, :func:`~os.popen` or :func:`~os.system`; if you need " @@ -117,11 +117,11 @@ msgid "" "`~os.system` or :func:`~os.popen`." msgstr "" -#: library/posix.rst:85 +#: library/posix.rst:84 msgid "On Unix, keys and values are bytes." msgstr "" -#: library/posix.rst:90 +#: library/posix.rst:89 msgid "" "The :mod:`os` module provides an alternate implementation of ``environ`` " "which updates the environment on modification. Note also that updating :data:" @@ -130,18 +130,18 @@ msgid "" "module." msgstr "" -#: library/posix.rst:16 +#: library/posix.rst:15 msgid "module" msgstr "" -#: library/posix.rst:16 +#: library/posix.rst:15 msgid "os" msgstr "" -#: library/posix.rst:36 +#: library/posix.rst:35 msgid "large files" msgstr "" -#: library/posix.rst:36 +#: library/posix.rst:35 msgid "file" msgstr "" diff --git a/library/pprint.po b/library/pprint.po index bf57dbbde..b4498c8c7 100644 --- a/library/pprint.po +++ b/library/pprint.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/profile.po b/library/profile.po index 0c0f56d31..d25f3472b 100644 --- a/library/profile.po +++ b/library/profile.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/pty.po b/library/pty.po index 4861e333c..fa2151262 100644 --- a/library/pty.po +++ b/library/pty.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,33 +21,33 @@ msgstr "" msgid ":mod:`!pty` --- Pseudo-terminal utilities" msgstr "" -#: library/pty.rst:11 +#: library/pty.rst:10 msgid "**Source code:** :source:`Lib/pty.py`" msgstr "" -#: library/pty.rst:15 +#: library/pty.rst:14 msgid "" "The :mod:`pty` module defines operations for handling the pseudo-terminal " "concept: starting another process and being able to write to and read from " "its controlling terminal programmatically." msgstr "" -#: library/pty.rst:19 +#: library/pty.rst:18 msgid "Availability" msgstr "" -#: library/pty.rst:21 +#: library/pty.rst:20 msgid "" "Pseudo-terminal handling is highly platform dependent. This code is mainly " "tested on Linux, FreeBSD, and macOS (it is supposed to work on other POSIX " "platforms but it's not been thoroughly tested)." msgstr "" -#: library/pty.rst:25 +#: library/pty.rst:24 msgid "The :mod:`pty` module defines the following functions:" msgstr "" -#: library/pty.rst:30 +#: library/pty.rst:29 msgid "" "Fork. Connect the child's controlling terminal to a pseudo-terminal. Return " "value is ``(pid, fd)``. Note that the child gets *pid* 0, and the *fd* is " @@ -56,20 +56,20 @@ msgid "" "the child's standard input and output)." msgstr "" -#: library/pty.rst:36 +#: library/pty.rst:35 msgid "" "On macOS the use of this function is unsafe when mixed with using higher-" "level system APIs, and that includes using :mod:`urllib.request`." msgstr "" -#: library/pty.rst:42 +#: library/pty.rst:41 msgid "" "Open a new pseudo-terminal pair, using :func:`os.openpty` if possible, or " "emulation code for generic Unix systems. Return a pair of file descriptors " "``(master, slave)``, for the master and the slave end, respectively." msgstr "" -#: library/pty.rst:49 +#: library/pty.rst:48 msgid "" "Spawn a process, and connect its controlling terminal with the current " "process's standard io. This is often used to baffle programs which insist on " @@ -78,14 +78,14 @@ msgid "" "will return." msgstr "" -#: library/pty.rst:55 +#: library/pty.rst:54 msgid "" "A loop copies STDIN of the current process to the child and data received " "from the child to STDOUT of the current process. It is not signaled to the " "child if STDIN of the current process closes down." msgstr "" -#: library/pty.rst:59 +#: library/pty.rst:58 msgid "" "The functions *master_read* and *stdin_read* are passed a file descriptor " "which they should read from, and they should always return a byte string. In " @@ -93,7 +93,7 @@ msgid "" "array should be returned to signal end of file." msgstr "" -#: library/pty.rst:64 +#: library/pty.rst:63 msgid "" "The default implementation for both functions will read and return up to " "1024 bytes each time the function is called. The *master_read* callback is " @@ -102,7 +102,7 @@ msgid "" "the parent process's standard input." msgstr "" -#: library/pty.rst:70 +#: library/pty.rst:69 msgid "" "Returning an empty byte string from either callback is interpreted as an end-" "of-file (EOF) condition, and that callback will not be called after that. If " @@ -112,41 +112,41 @@ msgid "" "signals EOF the same behavior results (on linux at least)." msgstr "" -#: library/pty.rst:77 +#: library/pty.rst:76 msgid "" "Return the exit status value from :func:`os.waitpid` on the child process." msgstr "" -#: library/pty.rst:79 +#: library/pty.rst:78 msgid "" ":func:`os.waitstatus_to_exitcode` can be used to convert the exit status " "into an exit code." msgstr "" -#: library/pty.rst:82 +#: library/pty.rst:81 msgid "" "Raises an :ref:`auditing event ` ``pty.spawn`` with argument " "``argv``." msgstr "" -#: library/pty.rst:84 +#: library/pty.rst:83 msgid "" ":func:`spawn` now returns the status value from :func:`os.waitpid` on the " "child process." msgstr "" -#: library/pty.rst:89 +#: library/pty.rst:88 msgid "Example" msgstr "" -#: library/pty.rst:93 +#: library/pty.rst:92 msgid "" "The following program acts like the Unix command :manpage:`script(1)`, using " "a pseudo-terminal to record all input and output of a terminal session in a " "\"typescript\". ::" msgstr "" -#: library/pty.rst:97 +#: library/pty.rst:96 msgid "" "import argparse\n" "import os\n" diff --git a/library/pwd.po b/library/pwd.po index 6de230efe..1bff6b2fe 100644 --- a/library/pwd.po +++ b/library/pwd.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,126 +21,126 @@ msgstr "" msgid ":mod:`!pwd` --- The password database" msgstr "" -#: library/pwd.rst:10 +#: library/pwd.rst:9 msgid "" "This module provides access to the Unix user account and password database. " "It is available on all Unix versions." msgstr "" -#: library/pwd.rst:13 +#: library/pwd.rst:12 msgid "Availability" msgstr "" -#: library/pwd.rst:15 +#: library/pwd.rst:14 msgid "" "Password database entries are reported as a tuple-like object, whose " "attributes correspond to the members of the ``passwd`` structure (Attribute " "field below, see ````):" msgstr "" -#: library/pwd.rst:20 +#: library/pwd.rst:19 msgid "Index" msgstr "" -#: library/pwd.rst:20 +#: library/pwd.rst:19 msgid "Attribute" msgstr "" -#: library/pwd.rst:20 +#: library/pwd.rst:19 msgid "Meaning" msgstr "" -#: library/pwd.rst:22 +#: library/pwd.rst:21 msgid "0" msgstr "" -#: library/pwd.rst:22 +#: library/pwd.rst:21 msgid "``pw_name``" msgstr "" -#: library/pwd.rst:22 +#: library/pwd.rst:21 msgid "Login name" msgstr "" -#: library/pwd.rst:24 +#: library/pwd.rst:23 msgid "1" msgstr "" -#: library/pwd.rst:24 +#: library/pwd.rst:23 msgid "``pw_passwd``" msgstr "" -#: library/pwd.rst:24 +#: library/pwd.rst:23 msgid "Optional encrypted password" msgstr "" -#: library/pwd.rst:26 +#: library/pwd.rst:25 msgid "2" msgstr "" -#: library/pwd.rst:26 +#: library/pwd.rst:25 msgid "``pw_uid``" msgstr "" -#: library/pwd.rst:26 +#: library/pwd.rst:25 msgid "Numerical user ID" msgstr "" -#: library/pwd.rst:28 +#: library/pwd.rst:27 msgid "3" msgstr "" -#: library/pwd.rst:28 +#: library/pwd.rst:27 msgid "``pw_gid``" msgstr "" -#: library/pwd.rst:28 +#: library/pwd.rst:27 msgid "Numerical group ID" msgstr "" -#: library/pwd.rst:30 +#: library/pwd.rst:29 msgid "4" msgstr "" -#: library/pwd.rst:30 +#: library/pwd.rst:29 msgid "``pw_gecos``" msgstr "" -#: library/pwd.rst:30 +#: library/pwd.rst:29 msgid "User name or comment field" msgstr "" -#: library/pwd.rst:32 +#: library/pwd.rst:31 msgid "5" msgstr "" -#: library/pwd.rst:32 +#: library/pwd.rst:31 msgid "``pw_dir``" msgstr "" -#: library/pwd.rst:32 +#: library/pwd.rst:31 msgid "User home directory" msgstr "" -#: library/pwd.rst:34 +#: library/pwd.rst:33 msgid "6" msgstr "" -#: library/pwd.rst:34 +#: library/pwd.rst:33 msgid "``pw_shell``" msgstr "" -#: library/pwd.rst:34 +#: library/pwd.rst:33 msgid "User command interpreter" msgstr "" -#: library/pwd.rst:37 +#: library/pwd.rst:36 msgid "" "The uid and gid items are integers, all others are strings. :exc:`KeyError` " "is raised if the entry asked for cannot be found." msgstr "" -#: library/pwd.rst:42 +#: library/pwd.rst:41 msgid "" "In traditional Unix the field ``pw_passwd`` usually contains a password " "encrypted with a DES derived algorithm. However most modern unices use a " @@ -151,27 +151,27 @@ msgid "" "system-dependent." msgstr "" -#: library/pwd.rst:50 +#: library/pwd.rst:49 msgid "It defines the following items:" msgstr "" -#: library/pwd.rst:55 +#: library/pwd.rst:54 msgid "Return the password database entry for the given numeric user ID." msgstr "" -#: library/pwd.rst:60 +#: library/pwd.rst:59 msgid "Return the password database entry for the given user name." msgstr "" -#: library/pwd.rst:65 +#: library/pwd.rst:64 msgid "" "Return a list of all available password database entries, in arbitrary order." msgstr "" -#: library/pwd.rst:70 +#: library/pwd.rst:69 msgid "Module :mod:`grp`" msgstr "" -#: library/pwd.rst:71 +#: library/pwd.rst:70 msgid "An interface to the group database, similar to this." msgstr "" diff --git a/library/py_compile.po b/library/py_compile.po index 5fddec35c..c12d988dd 100644 --- a/library/py_compile.po +++ b/library/py_compile.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/pyclbr.po b/library/pyclbr.po index 17a30fc24..0f770b02c 100644 --- a/library/pyclbr.po +++ b/library/pyclbr.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/pydoc.po b/library/pydoc.po index da584469b..a200bb1f8 100644 --- a/library/pydoc.po +++ b/library/pydoc.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -109,7 +109,13 @@ msgid "" "arbitrary unused port." msgstr "" -#: library/pydoc.rst:74 +#: library/pydoc.rst:76 +msgid "" +"The :mod:`!pydoc` HTTP server is intended for local use during development " +"and is not suitable for production use." +msgstr "" + +#: library/pydoc.rst:79 msgid "" ":program:`python -m pydoc -n ` will start the server listening at " "the given hostname. By default the hostname is 'localhost' but if you want " @@ -118,7 +124,7 @@ msgid "" "especially useful if you want to run pydoc from within a container." msgstr "" -#: library/pydoc.rst:80 +#: library/pydoc.rst:85 msgid "" ":program:`python -m pydoc -b` will start the server and additionally open a " "web browser to a module index page. Each served page has a navigation bar " @@ -127,7 +133,7 @@ msgid "" "*Topics* and *Keywords* pages." msgstr "" -#: library/pydoc.rst:86 +#: library/pydoc.rst:91 msgid "" "When :program:`pydoc` generates documentation, it uses the current " "environment and path to locate modules. Thus, invoking :program:`pydoc " @@ -135,7 +141,7 @@ msgid "" "started the Python interpreter and typed ``import spam``." msgstr "" -#: library/pydoc.rst:91 +#: library/pydoc.rst:96 msgid "" "Module docs for core modules are assumed to reside in ``https://docs.python." "org/X.Y/library/`` where ``X`` and ``Y`` are the major and minor version " @@ -144,21 +150,21 @@ msgid "" "directory containing the Library Reference Manual pages." msgstr "" -#: library/pydoc.rst:98 +#: library/pydoc.rst:103 msgid "Added the ``-b`` option." msgstr "" -#: library/pydoc.rst:101 +#: library/pydoc.rst:106 msgid "The ``-g`` command line option was removed." msgstr "" -#: library/pydoc.rst:104 +#: library/pydoc.rst:109 msgid "" ":mod:`!pydoc` now uses :func:`inspect.signature` rather than :func:`inspect." "getfullargspec` to extract signature information from callables." msgstr "" -#: library/pydoc.rst:109 +#: library/pydoc.rst:114 msgid "Added the ``-n`` option." msgstr "" diff --git a/library/pyexpat.po b/library/pyexpat.po index 95daeee98..65b7a7108 100644 --- a/library/pyexpat.po +++ b/library/pyexpat.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -275,57 +275,71 @@ msgstr "" #: library/pyexpat.rst:241 msgid "" -":class:`!xmlparser` objects have the following methods to mitigate some " -"common XML vulnerabilities." +":class:`!xmlparser` objects have the following methods to tune protections " +"against some common XML vulnerabilities." msgstr "" #: library/pyexpat.rst:246 msgid "" -"Sets the number of allocated bytes of dynamic memory needed to activate " -"protection against disproportionate use of RAM." +"Sets the number of output bytes needed to activate protection against " +"`billion laughs`_ attacks." msgstr "" #: library/pyexpat.rst:249 msgid "" -"By default, parser objects have an allocation activation threshold of 64 " -"MiB, or equivalently 67,108,864 bytes." +"The number of output bytes includes amplification from entity expansion and " +"reading DTD files." msgstr "" #: library/pyexpat.rst:252 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:307 +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:261 +#: library/pyexpat.rst:262 msgid "" -"Sets the maximum amplification factor between direct input and bytes of " -"dynamic memory allocated." +"Activation thresholds below 4 MiB are known to break support for DITA 1.3 " +"payload and are hence not recommended." msgstr "" -#: library/pyexpat.rst:264 +#: library/pyexpat.rst:269 msgid "" -"The amplification factor is calculated as ``allocated / direct`` while " -"parsing, where ``direct`` is the number of bytes read from the primary " -"document in parsing and ``allocated`` is the number of bytes of dynamic " -"memory allocated in the parser hierarchy." +"Sets the maximum tolerated amplification factor for protection against " +"`billion laughs`_ attacks." msgstr "" -#: library/pyexpat.rst:269 +#: library/pyexpat.rst:272 +msgid "" +"The amplification factor is calculated as ``(direct + indirect) / direct`` " +"while parsing, where ``direct`` is the number of bytes read from the primary " +"document in parsing and ``indirect`` is the number of bytes added by " +"expanding entities and reading of external DTD files." +msgstr "" + +#: library/pyexpat.rst:277 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 " -"near the start of parsing even with benign files in practice. In particular, " -"the activation threshold should be carefully chosen to avoid false positives." +"or equal to 1.0. Peak amplifications of factor 15,000 for the entire payload " +"and of factor 30,000 in the middle of parsing have been observed with small " +"benign files in practice. In particular, the activation threshold should be " +"carefully chosen to avoid false positives." msgstr "" -#: library/pyexpat.rst:274 +#: library/pyexpat.rst:329 msgid "" -"By default, parser objects have a maximum amplification factor of 100.0." +"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:276 +#: library/pyexpat.rst:332 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 " @@ -333,24 +347,65 @@ msgid "" "should not be used as they may have no special meaning." msgstr "" -#: library/pyexpat.rst:283 +#: library/pyexpat.rst:293 +msgid "" +"The maximum amplification factor is only considered if the threshold that " +"can be adjusted by :meth:`." +"SetBillionLaughsAttackProtectionActivationThreshold` is exceeded." +msgstr "" + +#: library/pyexpat.rst:301 +msgid "" +"Sets the number of allocated bytes of dynamic memory needed to activate " +"protection against disproportionate use of RAM." +msgstr "" + +#: library/pyexpat.rst:304 +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:316 +msgid "" +"Sets the maximum amplification factor between direct input and bytes of " +"dynamic memory allocated." +msgstr "" + +#: library/pyexpat.rst:319 +msgid "" +"The amplification factor is calculated as ``allocated / direct`` while " +"parsing, where ``direct`` is the number of bytes read from the primary " +"document in parsing and ``allocated`` is the number of bytes of dynamic " +"memory allocated in the parser hierarchy." +msgstr "" + +#: library/pyexpat.rst:324 +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 " +"near the start of parsing even with benign files in practice. In particular, " +"the activation threshold should be carefully chosen to avoid false positives." +msgstr "" + +#: library/pyexpat.rst:339 msgid "" "The maximum amplification factor is only considered if the threshold that " "can be adjusted by :meth:`.SetAllocTrackerActivationThreshold` is exceeded." msgstr "" -#: library/pyexpat.rst:290 +#: library/pyexpat.rst:346 msgid ":class:`xmlparser` objects have the following attributes:" msgstr "" -#: library/pyexpat.rst:295 +#: library/pyexpat.rst:351 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:303 +#: library/pyexpat.rst:359 msgid "" "Setting this to true causes the :class:`xmlparser` object to buffer textual " "content returned by Expat to avoid multiple calls to the :meth:" @@ -361,14 +416,14 @@ msgid "" "newlines may be chunked too." msgstr "" -#: library/pyexpat.rst:314 +#: library/pyexpat.rst:370 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:321 +#: library/pyexpat.rst:377 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 " @@ -378,7 +433,7 @@ msgid "" "is false; it may be changed at any time." msgstr "" -#: library/pyexpat.rst:331 +#: library/pyexpat.rst:387 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 " @@ -389,7 +444,7 @@ msgid "" "time." msgstr "" -#: library/pyexpat.rst:339 +#: library/pyexpat.rst:395 msgid "" "The following attributes contain values relating to the most recent error " "encountered by an :class:`xmlparser` object, and will only have correct " @@ -397,26 +452,26 @@ msgid "" "`xml.parsers.expat.ExpatError` exception." msgstr "" -#: library/pyexpat.rst:347 +#: library/pyexpat.rst:403 msgid "Byte index at which an error occurred." msgstr "" -#: library/pyexpat.rst:352 +#: library/pyexpat.rst:408 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:359 +#: library/pyexpat.rst:415 msgid "Column number at which an error occurred." msgstr "" -#: library/pyexpat.rst:364 +#: library/pyexpat.rst:420 msgid "Line number at which an error occurred." msgstr "" -#: library/pyexpat.rst:366 +#: library/pyexpat.rst:422 msgid "" "The following attributes contain values relating to the current parse " "location in an :class:`xmlparser` object. During a callback reporting a " @@ -426,19 +481,19 @@ msgid "" "whether there was an associated callback)." msgstr "" -#: library/pyexpat.rst:376 +#: library/pyexpat.rst:432 msgid "Current byte index in the parser input." msgstr "" -#: library/pyexpat.rst:381 +#: library/pyexpat.rst:437 msgid "Current column number in the parser input." msgstr "" -#: library/pyexpat.rst:386 +#: library/pyexpat.rst:442 msgid "Current line number in the parser input." msgstr "" -#: library/pyexpat.rst:388 +#: library/pyexpat.rst:444 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 " @@ -447,7 +502,7 @@ msgid "" "unless otherwise stated." msgstr "" -#: library/pyexpat.rst:397 +#: library/pyexpat.rst:453 msgid "" "Called when the XML declaration is parsed. The XML declaration is the " "(optional) declaration of the applicable version of the XML recommendation, " @@ -458,29 +513,29 @@ msgid "" "only available with Expat version 1.95.0 or newer." msgstr "" -#: library/pyexpat.rst:408 +#: library/pyexpat.rst:464 msgid "" "Called when Expat begins parsing the document type declaration (``'``." msgstr "" -#: library/pyexpat.rst:525 +#: library/pyexpat.rst:581 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:532 +#: library/pyexpat.rst:588 msgid "Called at the end of a CDATA section." msgstr "" -#: library/pyexpat.rst:537 +#: library/pyexpat.rst:593 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 " @@ -592,14 +647,14 @@ msgid "" "supplied." msgstr "" -#: library/pyexpat.rst:544 +#: library/pyexpat.rst:600 msgid "" "This is the same as the :func:`DefaultHandler`, but doesn't inhibit " "expansion of internal entities. The entity reference will not be passed to " "the default handler." msgstr "" -#: library/pyexpat.rst:551 +#: library/pyexpat.rst:607 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 " @@ -609,7 +664,7 @@ msgid "" "set, no exception is raised by the parser for this condition." msgstr "" -#: library/pyexpat.rst:563 +#: library/pyexpat.rst:619 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:570 +#: library/pyexpat.rst:626 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 " @@ -627,7 +682,7 @@ msgid "" "is opaque and should only be used as described below." msgstr "" -#: library/pyexpat.rst:576 +#: library/pyexpat.rst:632 msgid "" "For external entities to be parsed, this handler must be implemented. It is " "responsible for creating the sub-parser using " @@ -637,28 +692,28 @@ msgid "" "`XML_ERROR_EXTERNAL_ENTITY_HANDLING` error, otherwise parsing will continue." msgstr "" -#: library/pyexpat.rst:584 +#: library/pyexpat.rst:640 msgid "" "If this handler is not provided, external entities are reported by the :attr:" "`DefaultHandler` callback, if provided." msgstr "" -#: library/pyexpat.rst:591 +#: library/pyexpat.rst:647 msgid "ExpatError Exceptions" msgstr "" -#: library/pyexpat.rst:596 +#: library/pyexpat.rst:652 msgid ":exc:`ExpatError` exceptions have a number of interesting attributes:" msgstr "" -#: library/pyexpat.rst:601 +#: library/pyexpat.rst:657 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:605 +#: library/pyexpat.rst:661 msgid "" "from xml.parsers.expat import ParserCreate, ExpatError, errors\n" "\n" @@ -669,36 +724,36 @@ msgid "" " print(\"Error:\", errors.messages[err.code])" msgstr "" -#: library/pyexpat.rst:613 +#: library/pyexpat.rst:669 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:620 +#: library/pyexpat.rst:676 msgid "" "Line number on which the error was detected. The first line is numbered " "``1``." msgstr "" -#: library/pyexpat.rst:625 +#: library/pyexpat.rst:681 msgid "" "Character offset into the line where the error occurred. The first column " "is numbered ``0``." msgstr "" -#: library/pyexpat.rst:632 +#: library/pyexpat.rst:688 msgid "Example" msgstr "" -#: library/pyexpat.rst:634 +#: library/pyexpat.rst:690 msgid "" "The following program defines three handlers that just print out their " "arguments. ::" msgstr "" -#: library/pyexpat.rst:637 +#: library/pyexpat.rst:693 msgid "" "import xml.parsers.expat\n" "\n" @@ -722,11 +777,11 @@ msgid "" "\"\"\", 1)" msgstr "" -#: library/pyexpat.rst:658 +#: library/pyexpat.rst:714 msgid "The output from this program is::" msgstr "" -#: library/pyexpat.rst:660 +#: library/pyexpat.rst:716 msgid "" "Start element: parent {'id': 'top'}\n" "Start element: child1 {'name': 'paul'}\n" @@ -740,76 +795,76 @@ msgid "" "End element: parent" msgstr "" -#: library/pyexpat.rst:675 +#: library/pyexpat.rst:731 msgid "Content Model Descriptions" msgstr "" -#: library/pyexpat.rst:681 +#: library/pyexpat.rst:737 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:685 +#: library/pyexpat.rst:741 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:689 +#: library/pyexpat.rst:745 msgid "The constants in the model type group are:" msgstr "" -#: library/pyexpat.rst:695 +#: library/pyexpat.rst:751 msgid "" "The element named by the model name was declared to have a content model of " "``ANY``." msgstr "" -#: library/pyexpat.rst:702 +#: library/pyexpat.rst:758 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:709 +#: library/pyexpat.rst:765 msgid "Elements which are declared to be ``EMPTY`` have this model type." msgstr "" -#: library/pyexpat.rst:723 +#: library/pyexpat.rst:779 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:726 +#: library/pyexpat.rst:782 msgid "The constants in the quantifier group are:" msgstr "" -#: library/pyexpat.rst:732 +#: library/pyexpat.rst:788 msgid "No modifier is given, so it can appear exactly once, as for ``A``." msgstr "" -#: library/pyexpat.rst:738 +#: library/pyexpat.rst:794 msgid "The model is optional: it can appear once or not at all, as for ``A?``." msgstr "" -#: library/pyexpat.rst:744 +#: library/pyexpat.rst:800 msgid "The model must occur one or more times (like ``A+``)." msgstr "" -#: library/pyexpat.rst:750 +#: library/pyexpat.rst:806 msgid "The model must occur zero or more times, as for ``A*``." msgstr "" -#: library/pyexpat.rst:756 +#: library/pyexpat.rst:812 msgid "Expat error constants" msgstr "" -#: library/pyexpat.rst:760 +#: library/pyexpat.rst:816 msgid "" "The following constants are provided in the :mod:`xml.parsers.expat.errors` " "module. These constants are useful in interpreting some of the attributes " @@ -820,205 +875,205 @@ msgid "" "XML_ERROR_{CONSTANT_NAME}]`." msgstr "" -#: library/pyexpat.rst:768 +#: library/pyexpat.rst:824 msgid "The ``errors`` module has the following attributes:" msgstr "" -#: library/pyexpat.rst:772 +#: library/pyexpat.rst:828 msgid "A dictionary mapping string descriptions to their error codes." msgstr "" -#: library/pyexpat.rst:779 +#: library/pyexpat.rst:835 msgid "A dictionary mapping numeric error codes to their string descriptions." msgstr "" -#: library/pyexpat.rst:789 +#: library/pyexpat.rst:845 msgid "" "An entity reference in an attribute value referred to an external entity " "instead of an internal entity." msgstr "" -#: library/pyexpat.rst:795 +#: library/pyexpat.rst:851 msgid "" "A character reference referred to a character which is illegal in XML (for " "example, character ``0``, or '``�``')." msgstr "" -#: library/pyexpat.rst:801 +#: library/pyexpat.rst:857 msgid "" "An entity reference referred to an entity which was declared with a " "notation, so cannot be parsed." msgstr "" -#: library/pyexpat.rst:807 +#: library/pyexpat.rst:863 msgid "An attribute was used more than once in a start tag." msgstr "" -#: library/pyexpat.rst:815 +#: library/pyexpat.rst:871 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:821 +#: library/pyexpat.rst:877 msgid "Something other than whitespace occurred after the document element." msgstr "" -#: library/pyexpat.rst:826 +#: library/pyexpat.rst:882 msgid "" "An XML declaration was found somewhere other than the start of the input " "data." msgstr "" -#: library/pyexpat.rst:831 +#: library/pyexpat.rst:887 msgid "" "The document contains no elements (XML requires all documents to contain " "exactly one top-level element).." msgstr "" -#: library/pyexpat.rst:837 +#: library/pyexpat.rst:893 msgid "Expat was not able to allocate memory internally." msgstr "" -#: library/pyexpat.rst:842 +#: library/pyexpat.rst:898 msgid "A parameter entity reference was found where it was not allowed." msgstr "" -#: library/pyexpat.rst:847 +#: library/pyexpat.rst:903 msgid "An incomplete character was found in the input." msgstr "" -#: library/pyexpat.rst:852 +#: library/pyexpat.rst:908 msgid "" "An entity reference contained another reference to the same entity; possibly " "via a different name, and possibly indirectly." msgstr "" -#: library/pyexpat.rst:858 +#: library/pyexpat.rst:914 msgid "Some unspecified syntax error was encountered." msgstr "" -#: library/pyexpat.rst:863 +#: library/pyexpat.rst:919 msgid "An end tag did not match the innermost open start tag." msgstr "" -#: library/pyexpat.rst:868 +#: library/pyexpat.rst:924 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:874 +#: library/pyexpat.rst:930 msgid "A reference was made to an entity which was not defined." msgstr "" -#: library/pyexpat.rst:879 +#: library/pyexpat.rst:935 msgid "The document encoding is not supported by Expat." msgstr "" -#: library/pyexpat.rst:884 +#: library/pyexpat.rst:940 msgid "A CDATA marked section was not closed." msgstr "" -#: library/pyexpat.rst:892 +#: library/pyexpat.rst:948 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:905 +#: library/pyexpat.rst:961 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:912 +#: library/pyexpat.rst:968 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:919 +#: library/pyexpat.rst:975 msgid "An undeclared prefix was found when namespace processing was enabled." msgstr "" -#: library/pyexpat.rst:924 +#: library/pyexpat.rst:980 msgid "" "The document attempted to remove the namespace declaration associated with a " "prefix." msgstr "" -#: library/pyexpat.rst:930 +#: library/pyexpat.rst:986 msgid "A parameter entity contained incomplete markup." msgstr "" -#: library/pyexpat.rst:935 +#: library/pyexpat.rst:991 msgid "The document contained no document element at all." msgstr "" -#: library/pyexpat.rst:940 +#: library/pyexpat.rst:996 msgid "There was an error parsing a text declaration in an external entity." msgstr "" -#: library/pyexpat.rst:945 +#: library/pyexpat.rst:1001 msgid "Characters were found in the public id that are not allowed." msgstr "" -#: library/pyexpat.rst:950 +#: library/pyexpat.rst:1006 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:956 +#: library/pyexpat.rst:1012 msgid "" "An attempt to resume the parser was made when the parser had not been " "suspended." msgstr "" -#: library/pyexpat.rst:994 library/pyexpat.rst:999 +#: library/pyexpat.rst:1050 library/pyexpat.rst:1055 msgid "This should not be reported to Python applications." msgstr "" -#: library/pyexpat.rst:966 +#: library/pyexpat.rst:1022 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:976 +#: library/pyexpat.rst:1032 msgid "" "An attempt was made to undeclare reserved namespace prefix ``xml`` or to " "bind it to another namespace URI." msgstr "" -#: library/pyexpat.rst:983 +#: library/pyexpat.rst:1039 msgid "" "An attempt was made to declare or undeclare reserved namespace prefix " "``xmlns``." msgstr "" -#: library/pyexpat.rst:988 +#: library/pyexpat.rst:1044 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:1004 +#: library/pyexpat.rst:1060 msgid "" "The limit on input amplification factor (from DTD and entities) has been " "breached." msgstr "" -#: library/pyexpat.rst:1009 +#: library/pyexpat.rst:1065 msgid "Footnotes" msgstr "" -#: library/pyexpat.rst:1010 +#: library/pyexpat.rst:1066 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 https://" diff --git a/library/python.po b/library/python.po index 1dd96b9d7..e42811d1a 100644 --- a/library/python.po +++ b/library/python.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/queue.po b/library/queue.po index d135e9a8a..4920b5223 100644 --- a/library/queue.po +++ b/library/queue.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -119,42 +119,47 @@ msgid "" "Simple queues lack advanced functionality such as task tracking." msgstr "" -#: library/queue.rst:84 +#: library/queue.rst:79 +msgid "" +"Simple queues are :ref:`generic ` over the type of their items." +msgstr "" + +#: library/queue.rst:86 msgid "" "Exception raised when non-blocking :meth:`~Queue.get` (or :meth:`~Queue." "get_nowait`) is called on a :class:`Queue` object which is empty." msgstr "" -#: library/queue.rst:91 +#: library/queue.rst:93 msgid "" "Exception raised when non-blocking :meth:`~Queue.put` (or :meth:`~Queue." "put_nowait`) is called on a :class:`Queue` object which is full." msgstr "" -#: library/queue.rst:98 +#: library/queue.rst:100 msgid "" "Exception raised when :meth:`~Queue.put` or :meth:`~Queue.get` is called on " "a :class:`Queue` object which has been shut down." msgstr "" -#: library/queue.rst:107 +#: library/queue.rst:109 msgid "Queue Objects" msgstr "" -#: library/queue.rst:109 +#: library/queue.rst:111 msgid "" "Queue objects (:class:`Queue`, :class:`LifoQueue`, or :class:" "`PriorityQueue`) provide the public methods described below." msgstr "" -#: library/queue.rst:115 +#: library/queue.rst:117 msgid "" "Return the approximate size of the queue. Note, qsize() > 0 doesn't " "guarantee that a subsequent get() will not block, nor will qsize() < maxsize " "guarantee that put() will not block." msgstr "" -#: library/queue.rst:122 +#: library/queue.rst:124 msgid "" "Return ``True`` if the queue is empty, ``False`` otherwise. If empty() " "returns ``True`` it doesn't guarantee that a subsequent call to put() will " @@ -162,7 +167,7 @@ msgid "" "that a subsequent call to get() will not block." msgstr "" -#: library/queue.rst:130 +#: library/queue.rst:132 msgid "" "Return ``True`` if the queue is full, ``False`` otherwise. If full() " "returns ``True`` it doesn't guarantee that a subsequent call to get() will " @@ -170,7 +175,7 @@ msgid "" "a subsequent call to put() will not block." msgstr "" -#: library/queue.rst:138 +#: library/queue.rst:140 msgid "" "Put *item* into the queue. If optional args *block* is true and *timeout* " "is ``None`` (the default), block if necessary until a free slot is " @@ -181,15 +186,15 @@ msgid "" "(*timeout* is ignored in that case)." msgstr "" -#: library/queue.rst:146 +#: library/queue.rst:148 msgid "Raises :exc:`ShutDown` if the queue has been shut down." msgstr "" -#: library/queue.rst:151 +#: library/queue.rst:153 msgid "Equivalent to ``put(item, block=False)``." msgstr "" -#: library/queue.rst:314 +#: library/queue.rst:316 msgid "" "Remove and return an item from the queue. If optional args *block* is true " "and *timeout* is ``None`` (the default), block if necessary until an item is " @@ -200,7 +205,7 @@ msgid "" "ignored in that case)." msgstr "" -#: library/queue.rst:163 +#: library/queue.rst:165 msgid "" "Prior to 3.0 on POSIX systems, and for all versions on Windows, if *block* " "is true and *timeout* is ``None``, this operation goes into an " @@ -209,47 +214,47 @@ msgid "" "`KeyboardInterrupt`." msgstr "" -#: library/queue.rst:168 +#: library/queue.rst:170 msgid "" "Raises :exc:`ShutDown` if the queue has been shut down and is empty, or if " "the queue has been shut down immediately." msgstr "" -#: library/queue.rst:324 +#: library/queue.rst:326 msgid "Equivalent to ``get(False)``." msgstr "" -#: library/queue.rst:176 +#: library/queue.rst:178 msgid "" "Two methods are offered to support tracking whether enqueued tasks have been " "fully processed by daemon consumer threads." msgstr "" -#: library/queue.rst:182 +#: library/queue.rst:184 msgid "" "Indicate that a formerly enqueued task is complete. Used by queue consumer " "threads. For each :meth:`get` used to fetch a task, a subsequent call to :" "meth:`task_done` tells the queue that the processing on the task is complete." msgstr "" -#: library/queue.rst:186 +#: library/queue.rst:188 msgid "" "If a :meth:`join` is currently blocking, it will resume when all items have " "been processed (meaning that a :meth:`task_done` call was received for every " "item that had been :meth:`put` into the queue)." msgstr "" -#: library/queue.rst:190 +#: library/queue.rst:192 msgid "" "Raises a :exc:`ValueError` if called more times than there were items placed " "in the queue." msgstr "" -#: library/queue.rst:196 +#: library/queue.rst:198 msgid "Blocks until all items in the queue have been gotten and processed." msgstr "" -#: library/queue.rst:198 +#: library/queue.rst:200 msgid "" "The count of unfinished tasks goes up whenever an item is added to the " "queue. The count goes down whenever a consumer thread calls :meth:" @@ -258,15 +263,15 @@ msgid "" "unblocks." msgstr "" -#: library/queue.rst:205 +#: library/queue.rst:207 msgid "Waiting for task completion" msgstr "" -#: library/queue.rst:207 +#: library/queue.rst:209 msgid "Example of how to wait for enqueued tasks to be completed::" msgstr "" -#: library/queue.rst:209 +#: library/queue.rst:211 msgid "" "import threading\n" "import queue\n" @@ -292,46 +297,46 @@ msgid "" "print('All work completed')" msgstr "" -#: library/queue.rst:234 +#: library/queue.rst:236 msgid "Terminating queues" msgstr "" -#: library/queue.rst:236 +#: library/queue.rst:238 msgid "" "When no longer needed, :class:`Queue` objects can be wound down until empty " "or terminated immediately with a hard shutdown." msgstr "" -#: library/queue.rst:241 +#: library/queue.rst:243 msgid "Put a :class:`Queue` instance into a shutdown mode." msgstr "" -#: library/queue.rst:243 +#: library/queue.rst:245 msgid "" "The queue can no longer grow. Future calls to :meth:`~Queue.put` raise :exc:" "`ShutDown`. Currently blocked callers of :meth:`~Queue.put` will be " "unblocked and will raise :exc:`ShutDown` in the formerly blocked thread." msgstr "" -#: library/queue.rst:248 +#: library/queue.rst:250 msgid "" "If *immediate* is false (the default), the queue can be wound down normally " "with :meth:`~Queue.get` calls to extract tasks that have already been loaded." msgstr "" -#: library/queue.rst:252 +#: library/queue.rst:254 msgid "" "And if :meth:`~Queue.task_done` is called for each remaining task, a " "pending :meth:`~Queue.join` will be unblocked normally." msgstr "" -#: library/queue.rst:255 +#: library/queue.rst:257 msgid "" "Once the queue is empty, future calls to :meth:`~Queue.get` will raise :exc:" "`ShutDown`." msgstr "" -#: library/queue.rst:258 +#: library/queue.rst:260 msgid "" "If *immediate* is true, the queue is terminated immediately. The queue is " "drained to be completely empty and the count of unfinished tasks is reduced " @@ -340,36 +345,36 @@ msgid "" "get` are unblocked and will raise :exc:`ShutDown` because the queue is empty." msgstr "" -#: library/queue.rst:266 +#: library/queue.rst:268 msgid "" "Use caution when using :meth:`~Queue.join` with *immediate* set to true. " "This unblocks the join even when no work has been done on the tasks, " "violating the usual invariant for joining a queue." msgstr "" -#: library/queue.rst:274 +#: library/queue.rst:276 msgid "SimpleQueue Objects" msgstr "" -#: library/queue.rst:276 +#: library/queue.rst:278 msgid "" ":class:`SimpleQueue` objects provide the public methods described below." msgstr "" -#: library/queue.rst:280 +#: library/queue.rst:282 msgid "" "Return the approximate size of the queue. Note, qsize() > 0 doesn't " "guarantee that a subsequent get() will not block." msgstr "" -#: library/queue.rst:286 +#: library/queue.rst:288 msgid "" "Return ``True`` if the queue is empty, ``False`` otherwise. If empty() " "returns ``False`` it doesn't guarantee that a subsequent call to get() will " "not block." msgstr "" -#: library/queue.rst:293 +#: library/queue.rst:295 msgid "" "Put *item* into the queue. The method never blocks and always succeeds " "(except for potential low-level errors such as failure to allocate memory). " @@ -377,7 +382,7 @@ msgid "" "compatibility with :meth:`Queue.put`." msgstr "" -#: library/queue.rst:299 +#: library/queue.rst:301 msgid "" "This method has a C implementation which is reentrant. That is, a ``put()`` " "or ``get()`` call can be interrupted by another ``put()`` call in the same " @@ -386,23 +391,23 @@ msgid "" "or :mod:`weakref` callbacks." msgstr "" -#: library/queue.rst:308 +#: library/queue.rst:310 msgid "" "Equivalent to ``put(item, block=False)``, provided for compatibility with :" "meth:`Queue.put_nowait`." msgstr "" -#: library/queue.rst:329 +#: library/queue.rst:331 msgid "Class :class:`multiprocessing.Queue`" msgstr "" -#: library/queue.rst:330 +#: library/queue.rst:332 msgid "" "A queue class for use in a multi-processing (rather than multi-threading) " "context." msgstr "" -#: library/queue.rst:333 +#: library/queue.rst:335 msgid "" ":class:`collections.deque` is an alternative implementation of unbounded " "queues with fast atomic :meth:`~collections.deque.append` and :meth:" diff --git a/library/quopri.po b/library/quopri.po index c15b04a23..488456762 100644 --- a/library/quopri.po +++ b/library/quopri.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/random.po b/library/random.po index a4a97bd77..d4db75797 100644 --- a/library/random.po +++ b/library/random.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -126,7 +126,7 @@ msgid "" msgstr "" #: library/random.rst:81 -msgid "If *a* is an int, it is used directly." +msgid "If *a* is an int, its absolute value is used directly." msgstr "" #: library/random.rst:83 @@ -828,9 +828,11 @@ msgstr "" #: library/random.rst:635 msgid "" -"def random_product(*args, repeat=1):\n" -" \"Random selection from itertools.product(*args, **kwds)\"\n" -" pools = [tuple(pool) for pool in args] * repeat\n" +"import random\n" +"\n" +"def random_product(*iterables, repeat=1):\n" +" \"Random selection from itertools.product(*iterables, repeat=repeat)\"\n" +" pools = tuple(map(tuple, iterables)) * repeat\n" " return tuple(map(random.choice, pools))\n" "\n" "def random_permutation(iterable, r=None):\n" @@ -854,10 +856,25 @@ msgid "" " pool = tuple(iterable)\n" " n = len(pool)\n" " indices = sorted(random.choices(range(n), k=r))\n" -" return tuple(pool[i] for i in indices)" -msgstr "" - -#: library/random.rst:664 +" return tuple(pool[i] for i in indices)\n" +"\n" +"def random_derangement(iterable):\n" +" \"Choose a permutation where no element stays in its original position." +"\"\n" +" seq = tuple(iterable)\n" +" if len(seq) < 2:\n" +" if not seq:\n" +" return ()\n" +" raise IndexError('No derangments to choose from')\n" +" perm = list(range(len(seq)))\n" +" start = tuple(perm)\n" +" while True:\n" +" random.shuffle(perm)\n" +" if all(p != q for p, q in zip(start, perm)):\n" +" return tuple([seq[i] for i in perm])" +msgstr "" + +#: library/random.rst:750 msgid "" "The default :func:`.random` returns multiples of 2⁻⁵³ in the range *0.0 ≤ x " "< 1.0*. All such numbers are evenly spaced and are exactly representable as " @@ -866,7 +883,7 @@ msgid "" "integer multiple of 2⁻⁵³." msgstr "" -#: library/random.rst:670 +#: library/random.rst:756 msgid "" "The following recipe takes a different approach. All floats in the interval " "are possible selections. The mantissa comes from a uniform distribution of " @@ -875,7 +892,7 @@ msgid "" "often as the next larger exponent." msgstr "" -#: library/random.rst:678 +#: library/random.rst:764 msgid "" "from random import Random\n" "from math import ldexp\n" @@ -892,13 +909,13 @@ msgid "" " return ldexp(mantissa, exponent)" msgstr "" -#: library/random.rst:692 +#: library/random.rst:778 msgid "" "All :ref:`real valued distributions ` in the " "class will use the new method::" msgstr "" -#: library/random.rst:695 +#: library/random.rst:781 msgid "" ">>> fr = FullRandom()\n" ">>> fr.random()\n" @@ -907,7 +924,7 @@ msgid "" "8.87925541791544" msgstr "" -#: library/random.rst:701 +#: library/random.rst:787 msgid "" "The recipe is conceptually equivalent to an algorithm that chooses from all " "the multiples of 2⁻¹⁰⁷⁴ in the range *0.0 ≤ x < 1.0*. All such numbers are " @@ -916,7 +933,7 @@ msgid "" "and is equal to ``math.ulp(0.0)``.)" msgstr "" -#: library/random.rst:710 +#: library/random.rst:796 msgid "" "`Generating Pseudo-random Floating-Point Values `_ a paper by Allen B. Downey describing " @@ -924,67 +941,67 @@ msgid "" "random`." msgstr "" -#: library/random.rst:718 +#: library/random.rst:804 msgid "Command-line usage" msgstr "" -#: library/random.rst:722 +#: library/random.rst:808 msgid "The :mod:`!random` module can be executed from the command line." msgstr "" -#: library/random.rst:724 +#: library/random.rst:810 msgid "" "python -m random [-h] [-c CHOICE [CHOICE ...] | -i N | -f N] [input ...]" msgstr "" -#: library/random.rst:728 +#: library/random.rst:814 msgid "The following options are accepted:" msgstr "" -#: library/random.rst:734 +#: library/random.rst:820 msgid "Show the help message and exit." msgstr "" -#: library/random.rst:739 +#: library/random.rst:825 msgid "Print a random choice, using :meth:`choice`." msgstr "" -#: library/random.rst:744 +#: library/random.rst:830 msgid "" "Print a random integer between 1 and N inclusive, using :meth:`randint`." msgstr "" -#: library/random.rst:749 +#: library/random.rst:835 msgid "" "Print a random floating-point number between 0 and N inclusive, using :meth:" "`uniform`." msgstr "" -#: library/random.rst:752 +#: library/random.rst:838 msgid "If no options are given, the output depends on the input:" msgstr "" -#: library/random.rst:754 +#: library/random.rst:840 msgid "String or multiple: same as :option:`--choice`." msgstr "" -#: library/random.rst:755 +#: library/random.rst:841 msgid "Integer: same as :option:`--integer`." msgstr "" -#: library/random.rst:756 +#: library/random.rst:842 msgid "Float: same as :option:`--float`." msgstr "" -#: library/random.rst:761 +#: library/random.rst:847 msgid "Command-line example" msgstr "" -#: library/random.rst:763 +#: library/random.rst:849 msgid "Here are some examples of the :mod:`!random` command-line interface:" msgstr "" -#: library/random.rst:765 +#: library/random.rst:851 msgid "" "$ # Choose one at random\n" "$ python -m random egg bacon sausage spam \"Lobster Thermidor aux crevettes " diff --git a/library/re.po b/library/re.po index 51e64d91d..dccd45cca 100644 --- a/library/re.po +++ b/library/re.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -145,7 +145,7 @@ msgstr "" msgid "The special characters are:" msgstr "" -#: library/re.rst:1660 +#: library/re.rst:1667 msgid "``.``" msgstr "" @@ -723,18 +723,19 @@ msgid "" "Will try to match with ``yes-pattern`` if the group with given *id* or " "*name* exists, and with ``no-pattern`` if it doesn't. ``no-pattern`` is " "optional and can be omitted. For example, ``(<)?(\\w+@\\w+(?:\\.\\w+)+)(?" -"(1)>|$)`` is a poor email matching pattern, which will match with " -"``''`` as well as ``'user@host.com'``, but not with " -"``''``." +"(1)>|$)`` is a poor email matching pattern, which matches ``''`` as well as ``'user@host.com'``, but does not match ``''`` in their entirety (:func:`re.search` finds " +"only ``'user@host.com'`` in the former)." msgstr "" -#: library/re.rst:518 +#: library/re.rst:519 msgid "" "Group *id* can only contain ASCII digits. In :class:`bytes` patterns, group " "*name* can only contain bytes in the ASCII range (``b'\\x00'``-``b'\\x7f'``)." msgstr "" -#: library/re.rst:526 +#: library/re.rst:527 msgid "" "The special sequences consist of ``'\\'`` and a character from the list " "below. If the ordinary character is not an ASCII digit or an ASCII letter, " @@ -742,11 +743,11 @@ msgid "" "matches the character ``'$'``." msgstr "" -#: library/re.rst:533 +#: library/re.rst:534 msgid "``\\number``" msgstr "" -#: library/re.rst:534 +#: library/re.rst:535 msgid "" "Matches the contents of the group of the same number. Groups are numbered " "starting from 1. For example, ``(.+) \\1`` matches ``'the the'`` or ``'55 " @@ -758,19 +759,19 @@ msgid "" "escapes are treated as characters." msgstr "" -#: library/re.rst:545 +#: library/re.rst:546 msgid "``\\A``" msgstr "" -#: library/re.rst:546 +#: library/re.rst:547 msgid "Matches only at the start of the string." msgstr "" -#: library/re.rst:550 +#: library/re.rst:551 msgid "``\\b``" msgstr "" -#: library/re.rst:551 +#: library/re.rst:552 msgid "" "Matches the empty string, but only at the beginning or end of a word. A word " "is defined as a sequence of word characters. Note that formally, ``\\b`` is " @@ -780,7 +781,7 @@ msgid "" "``'as at ay'`` but not ``'attempt'`` or ``'atlas'``." msgstr "" -#: library/re.rst:559 +#: library/re.rst:560 msgid "" "The default word characters in Unicode (str) patterns are Unicode " "alphanumerics and the underscore, but this can be changed by using the :py:" @@ -788,17 +789,17 @@ msgid "" "if the :py:const:`~re.LOCALE` flag is used." msgstr "" -#: library/re.rst:567 +#: library/re.rst:568 msgid "" "Inside a character range, ``\\b`` represents the backspace character, for " "compatibility with Python's string literals." msgstr "" -#: library/re.rst:572 +#: library/re.rst:573 msgid "``\\B``" msgstr "" -#: library/re.rst:573 +#: library/re.rst:574 msgid "" "Matches the empty string, but only when it is *not* at the beginning or end " "of a word. This means that ``r'at\\B'`` matches ``'athens'``, ``'atom'``, " @@ -809,61 +810,61 @@ msgid "" "current locale if the :py:const:`~re.LOCALE` flag is used." msgstr "" -#: library/re.rst:586 +#: library/re.rst:587 msgid "" "Note that ``\\B`` does not match an empty string, which differs from RE " "implementations in other programming languages such as Perl. This behavior " "is kept for compatibility reasons." msgstr "" -#: library/re.rst:592 +#: library/re.rst:593 msgid "``\\d``" msgstr "" -#: library/re.rst:617 library/re.rst:639 +#: library/re.rst:618 library/re.rst:640 msgid "For Unicode (str) patterns:" msgstr "" -#: library/re.rst:594 +#: library/re.rst:595 msgid "" "Matches any Unicode decimal digit (that is, any character in Unicode " "character category `[Nd]`__). This includes ``[0-9]``, and also many other " "digit characters." msgstr "" -#: library/re.rst:598 +#: library/re.rst:599 msgid "Matches ``[0-9]`` if the :py:const:`~re.ASCII` flag is used." msgstr "" -#: library/re.rst:624 library/re.rst:647 +#: library/re.rst:625 library/re.rst:648 msgid "For 8-bit (bytes) patterns:" msgstr "" -#: library/re.rst:603 +#: library/re.rst:604 msgid "" "Matches any decimal digit in the ASCII character set; this is equivalent to " "``[0-9]``." msgstr "" -#: library/re.rst:608 +#: library/re.rst:609 msgid "``\\D``" msgstr "" -#: library/re.rst:609 +#: library/re.rst:610 msgid "" "Matches any character which is not a decimal digit. This is the opposite of " "``\\d``." msgstr "" -#: library/re.rst:612 +#: library/re.rst:613 msgid "Matches ``[^0-9]`` if the :py:const:`~re.ASCII` flag is used." msgstr "" -#: library/re.rst:616 +#: library/re.rst:617 msgid "``\\s``" msgstr "" -#: library/re.rst:618 +#: library/re.rst:619 msgid "" "Matches Unicode whitespace characters (as defined by :py:meth:`str." "isspace`). This includes ``[ \\t\\n\\r\\f\\v]``, and also many other " @@ -871,48 +872,48 @@ msgid "" "in many languages." msgstr "" -#: library/re.rst:622 +#: library/re.rst:623 msgid "" "Matches ``[ \\t\\n\\r\\f\\v]`` if the :py:const:`~re.ASCII` flag is used." msgstr "" -#: library/re.rst:625 +#: library/re.rst:626 msgid "" "Matches characters considered whitespace in the ASCII character set; this is " "equivalent to ``[ \\t\\n\\r\\f\\v]``." msgstr "" -#: library/re.rst:630 +#: library/re.rst:631 msgid "``\\S``" msgstr "" -#: library/re.rst:631 +#: library/re.rst:632 msgid "" "Matches any character which is not a whitespace character. This is the " "opposite of ``\\s``." msgstr "" -#: library/re.rst:634 +#: library/re.rst:635 msgid "" "Matches ``[^ \\t\\n\\r\\f\\v]`` if the :py:const:`~re.ASCII` flag is used." msgstr "" -#: library/re.rst:638 +#: library/re.rst:639 msgid "``\\w``" msgstr "" -#: library/re.rst:640 +#: library/re.rst:641 msgid "" "Matches Unicode word characters; this includes all Unicode alphanumeric " "characters (as defined by :py:meth:`str.isalnum`), as well as the underscore " "(``_``)." msgstr "" -#: library/re.rst:645 +#: library/re.rst:646 msgid "Matches ``[a-zA-Z0-9_]`` if the :py:const:`~re.ASCII` flag is used." msgstr "" -#: library/re.rst:648 +#: library/re.rst:649 msgid "" "Matches characters considered alphanumeric in the ASCII character set; this " "is equivalent to ``[a-zA-Z0-9_]``. If the :py:const:`~re.LOCALE` flag is " @@ -920,62 +921,62 @@ msgid "" "the underscore." msgstr "" -#: library/re.rst:655 +#: library/re.rst:656 msgid "``\\W``" msgstr "" -#: library/re.rst:656 +#: library/re.rst:657 msgid "" "Matches any character which is not a word character. This is the opposite of " "``\\w``. By default, matches non-underscore (``_``) characters for which :py:" "meth:`str.isalnum` returns ``False``." msgstr "" -#: library/re.rst:661 +#: library/re.rst:662 msgid "Matches ``[^a-zA-Z0-9_]`` if the :py:const:`~re.ASCII` flag is used." msgstr "" -#: library/re.rst:663 +#: library/re.rst:664 msgid "" "If the :py:const:`~re.LOCALE` flag is used, matches characters which are " "neither alphanumeric in the current locale nor the underscore." msgstr "" -#: library/re.rst:669 +#: library/re.rst:670 msgid "``\\Z``" msgstr "" -#: library/re.rst:670 +#: library/re.rst:671 msgid "Matches only at the end of the string." msgstr "" -#: library/re.rst:686 +#: library/re.rst:687 msgid "" "Most of the :ref:`escape sequences ` supported by Python " "string literals are also accepted by the regular expression parser::" msgstr "" -#: library/re.rst:689 +#: library/re.rst:690 msgid "" "\\a \\b \\f \\n\n" "\\N \\r \\t \\u\n" "\\U \\v \\x \\\\" msgstr "" -#: library/re.rst:693 +#: library/re.rst:694 msgid "" "(Note that ``\\b`` is used to represent word boundaries, and means " "\"backspace\" only inside character classes.)" msgstr "" -#: library/re.rst:696 +#: library/re.rst:697 msgid "" "``'\\u'``, ``'\\U'``, and ``'\\N'`` escape sequences are only recognized in " "Unicode (str) patterns. In bytes patterns they are errors. Unknown escapes " "of ASCII letters are reserved for future use and treated as errors." msgstr "" -#: library/re.rst:702 +#: library/re.rst:703 msgid "" "Octal escapes are included in a limited form. If the first digit is a 0, or " "if there are three octal digits, it is considered an octal escape. " @@ -983,27 +984,27 @@ msgid "" "are always at most three digits in length." msgstr "" -#: library/re.rst:707 +#: library/re.rst:708 msgid "The ``'\\u'`` and ``'\\U'`` escape sequences have been added." msgstr "" -#: library/re.rst:710 +#: library/re.rst:711 msgid "" "Unknown escapes consisting of ``'\\'`` and an ASCII letter now are errors." msgstr "" -#: library/re.rst:713 +#: library/re.rst:714 msgid "" "The :samp:`'\\\\N\\\\{{name}\\\\}'` escape sequence has been added. As in " "string literals, it expands to the named Unicode character (e.g. ``'\\N{EM " "DASH}'``)." msgstr "" -#: library/re.rst:721 +#: library/re.rst:722 msgid "Module Contents" msgstr "" -#: library/re.rst:723 +#: library/re.rst:724 msgid "" "The module defines several functions, constants, and an exception. Some of " "the functions are simplified versions of the full featured methods for " @@ -1011,26 +1012,26 @@ msgid "" "compiled form." msgstr "" -#: library/re.rst:730 +#: library/re.rst:731 msgid "Flags" msgstr "" -#: library/re.rst:732 +#: library/re.rst:733 msgid "" "Flag constants are now instances of :class:`RegexFlag`, which is a subclass " "of :class:`enum.IntFlag`." msgstr "" -#: library/re.rst:739 +#: library/re.rst:740 msgid "" "An :class:`enum.IntFlag` class containing the regex options listed below." msgstr "" -#: library/re.rst:741 +#: library/re.rst:742 msgid "- added to ``__all__``" msgstr "" -#: library/re.rst:746 +#: library/re.rst:747 msgid "" "Make ``\\w``, ``\\W``, ``\\b``, ``\\B``, ``\\d``, ``\\D``, ``\\s`` and " "``\\S`` perform ASCII-only matching instead of full Unicode matching. This " @@ -1038,11 +1039,11 @@ msgid "" "patterns." msgstr "" -#: library/re.rst:750 +#: library/re.rst:751 msgid "Corresponds to the inline flag ``(?a)``." msgstr "" -#: library/re.rst:754 +#: library/re.rst:755 msgid "" "The :py:const:`~re.U` flag still exists for backward compatibility, but is " "redundant in Python 3 since matches are Unicode by default for ``str`` " @@ -1050,15 +1051,15 @@ msgid "" "`~re.UNICODE` and the inline flag ``(?u)`` are similarly redundant." msgstr "" -#: library/re.rst:763 +#: library/re.rst:764 msgid "Display debug information about compiled expression." msgstr "" -#: library/re.rst:765 +#: library/re.rst:766 msgid "No corresponding inline flag." msgstr "" -#: library/re.rst:771 +#: library/re.rst:772 msgid "" "Perform case-insensitive matching; expressions like ``[A-Z]`` will also " "match lowercase letters. Full Unicode matching (such as ``Ü`` matching " @@ -1067,11 +1068,11 @@ msgid "" "flag unless the :py:const:`~re.LOCALE` flag is also used." msgstr "" -#: library/re.rst:779 +#: library/re.rst:780 msgid "Corresponds to the inline flag ``(?i)``." msgstr "" -#: library/re.rst:781 +#: library/re.rst:782 msgid "" "Note that when the Unicode patterns ``[a-z]`` or ``[A-Z]`` are used in " "combination with the :const:`IGNORECASE` flag, they will match the 52 ASCII " @@ -1082,18 +1083,18 @@ msgid "" "'Z' are matched." msgstr "" -#: library/re.rst:792 +#: library/re.rst:793 msgid "" "Make ``\\w``, ``\\W``, ``\\b``, ``\\B`` and case-insensitive matching " "dependent on the current locale. This flag can be used only with bytes " "patterns." msgstr "" -#: library/re.rst:796 +#: library/re.rst:797 msgid "Corresponds to the inline flag ``(?L)``." msgstr "" -#: library/re.rst:800 +#: library/re.rst:801 msgid "" "This flag is discouraged; consider Unicode matching instead. The locale " "mechanism is very unreliable as it only handles one \"culture\" at a time " @@ -1102,20 +1103,20 @@ msgid "" "languages." msgstr "" -#: library/re.rst:807 +#: library/re.rst:808 msgid "" ":py:const:`~re.LOCALE` can be used only with bytes patterns and is not " "compatible with :py:const:`~re.ASCII`." msgstr "" -#: library/re.rst:811 +#: library/re.rst:812 msgid "" "Compiled regular expression objects with the :py:const:`~re.LOCALE` flag no " "longer depend on the locale at compile time. Only the locale at matching " "time affects the result of matching." msgstr "" -#: library/re.rst:820 +#: library/re.rst:821 msgid "" "When specified, the pattern character ``'^'`` matches at the beginning of " "the string and at the beginning of each line (immediately following each " @@ -1126,11 +1127,11 @@ msgid "" "the end of the string." msgstr "" -#: library/re.rst:827 +#: library/re.rst:828 msgid "Corresponds to the inline flag ``(?m)``." msgstr "" -#: library/re.rst:831 +#: library/re.rst:832 msgid "" "Indicates no flag being applied, the value is ``0``. This flag may be used " "as a default value for a function keyword argument or as a base value that " @@ -1138,35 +1139,35 @@ msgid "" "value::" msgstr "" -#: library/re.rst:836 +#: library/re.rst:837 msgid "" "def myfunc(text, flag=re.NOFLAG):\n" " return re.match(text, flag)" msgstr "" -#: library/re.rst:844 +#: library/re.rst:845 msgid "" "Make the ``'.'`` special character match any character at all, including a " "newline; without this flag, ``'.'`` will match anything *except* a newline." msgstr "" -#: library/re.rst:847 +#: library/re.rst:848 msgid "Corresponds to the inline flag ``(?s)``." msgstr "" -#: library/re.rst:853 +#: library/re.rst:854 msgid "" "In Python 3, Unicode characters are matched by default for ``str`` patterns. " "This flag is therefore redundant with **no effect** and is only kept for " "backward compatibility." msgstr "" -#: library/re.rst:858 +#: library/re.rst:859 msgid "" "See :py:const:`~re.ASCII` to restrict matching to ASCII characters instead." msgstr "" -#: library/re.rst:865 +#: library/re.rst:866 msgid "" "This flag allows you to write regular expressions that look nicer and are " "more readable by allowing you to visually separate logical sections of the " @@ -1179,13 +1180,13 @@ msgid "" "ignored." msgstr "" -#: library/re.rst:875 +#: library/re.rst:876 msgid "" "This means that the two following regular expression objects that match a " "decimal number are functionally equal::" msgstr "" -#: library/re.rst:878 +#: library/re.rst:879 msgid "" "a = re.compile(r\"\"\"\\d + # the integral part\n" " \\. # the decimal point\n" @@ -1193,55 +1194,55 @@ msgid "" "b = re.compile(r\"\\d+\\.\\d*\")" msgstr "" -#: library/re.rst:883 +#: library/re.rst:884 msgid "Corresponds to the inline flag ``(?x)``." msgstr "" -#: library/re.rst:887 +#: library/re.rst:888 msgid "Functions" msgstr "" -#: library/re.rst:891 +#: library/re.rst:892 msgid "" "Compile a regular expression pattern into a :ref:`regular expression object " "`, which can be used for matching using its :func:`~Pattern." "match`, :func:`~Pattern.search` and other methods, described below." msgstr "" -#: library/re.rst:928 library/re.rst:957 library/re.rst:1037 -#: library/re.rst:1114 library/re.rst:1149 +#: library/re.rst:929 library/re.rst:958 library/re.rst:1038 +#: library/re.rst:1115 library/re.rst:1150 msgid "" "The expression's behaviour can be modified by specifying a *flags* value. " "Values can be any of the `flags`_ variables, combined using bitwise OR (the " "``|`` operator)." msgstr "" -#: library/re.rst:900 +#: library/re.rst:901 msgid "The sequence ::" msgstr "" -#: library/re.rst:902 +#: library/re.rst:903 msgid "" "prog = re.compile(pattern)\n" "result = prog.match(string)" msgstr "" -#: library/re.rst:905 +#: library/re.rst:906 msgid "is equivalent to ::" msgstr "" -#: library/re.rst:907 +#: library/re.rst:908 msgid "result = re.match(pattern, string)" msgstr "" -#: library/re.rst:909 +#: library/re.rst:910 msgid "" "but using :func:`re.compile` and saving the resulting regular expression " "object for reuse is more efficient when the expression will be used several " "times in a single program." msgstr "" -#: library/re.rst:915 +#: library/re.rst:916 msgid "" "The compiled versions of the most recent patterns passed to :func:`re." "compile` and the module-level matching functions are cached, so programs " @@ -1249,7 +1250,7 @@ msgid "" "compiling regular expressions." msgstr "" -#: library/re.rst:923 +#: library/re.rst:924 msgid "" "Scan through *string* looking for the first location where the regular " "expression *pattern* produces a match, and return a corresponding :class:" @@ -1258,7 +1259,7 @@ msgid "" "some point in the string." msgstr "" -#: library/re.rst:935 +#: library/re.rst:936 msgid "" "If zero or more characters at the beginning of *string* match the regular " "expression *pattern*, return a corresponding :class:`~re.Match`. Return " @@ -1266,26 +1267,26 @@ msgid "" "different from a zero-length match." msgstr "" -#: library/re.rst:940 +#: library/re.rst:941 msgid "" "Note that even in :const:`MULTILINE` mode, :func:`re.match` will only match " "at the beginning of the string and not at the beginning of each line." msgstr "" -#: library/re.rst:943 +#: library/re.rst:944 msgid "" "If you want to locate a match anywhere in *string*, use :func:`search` " "instead (see also :ref:`search-vs-match`)." msgstr "" -#: library/re.rst:953 +#: library/re.rst:954 msgid "" "If the whole *string* matches the regular expression *pattern*, return a " "corresponding :class:`~re.Match`. Return ``None`` if the string does not " "match the pattern; note that this is different from a zero-length match." msgstr "" -#: library/re.rst:966 +#: library/re.rst:967 msgid "" "Split *string* by the occurrences of *pattern*. If capturing parentheses " "are used in *pattern*, then the text of all groups in the pattern are also " @@ -1294,7 +1295,7 @@ msgid "" "final element of the list. ::" msgstr "" -#: library/re.rst:972 +#: library/re.rst:973 msgid "" ">>> re.split(r'\\W+', 'Words, words, words.')\n" "['Words', 'words', 'words', '']\n" @@ -1306,32 +1307,32 @@ msgid "" "['0', '3', '9']" msgstr "" -#: library/re.rst:981 +#: library/re.rst:982 msgid "" "If there are capturing groups in the separator and it matches at the start " "of the string, the result will start with an empty string. The same holds " "for the end of the string::" msgstr "" -#: library/re.rst:985 +#: library/re.rst:986 msgid "" ">>> re.split(r'(\\W+)', '...words, words...')\n" "['', '...', 'words', ', ', 'words', '...', '']" msgstr "" -#: library/re.rst:988 +#: library/re.rst:989 msgid "" "That way, separator components are always found at the same relative indices " "within the result list." msgstr "" -#: library/re.rst:991 +#: library/re.rst:992 msgid "" "Adjacent empty matches are not possible, but an empty match can occur " "immediately after a non-empty match." msgstr "" -#: library/re.rst:994 +#: library/re.rst:995 msgid "" ">>> re.split(r'\\b', 'Words, words, words.')\n" "['', 'Words', ', ', 'words', ', ', 'words', '.']\n" @@ -1342,30 +1343,30 @@ msgid "" "'']" msgstr "" -#: library/re.rst:1118 +#: library/re.rst:1119 msgid "Added the optional flags argument." msgstr "" -#: library/re.rst:1010 +#: library/re.rst:1011 msgid "" "Added support of splitting on a pattern that could match an empty string." msgstr "" -#: library/re.rst:1013 +#: library/re.rst:1014 msgid "" "Passing *maxsplit* and *flags* as positional arguments is deprecated. In " "future Python versions they will be :ref:`keyword-only parameters `." msgstr "" -#: library/re.rst:1021 +#: library/re.rst:1022 msgid "" "Return all non-overlapping matches of *pattern* in *string*, as a list of " "strings or tuples. The *string* is scanned left-to-right, and matches are " "returned in the order found. Empty matches are included in the result." msgstr "" -#: library/re.rst:1025 +#: library/re.rst:1026 msgid "" "The result depends on the number of capturing groups in the pattern. If " "there are no groups, return a list of strings matching the whole pattern. " @@ -1375,11 +1376,11 @@ msgid "" "result." msgstr "" -#: library/re.rst:1056 +#: library/re.rst:1057 msgid "Non-empty matches can now start just after a previous empty match." msgstr "" -#: library/re.rst:1047 +#: library/re.rst:1048 msgid "" "Return an :term:`iterator` yielding :class:`~re.Match` objects over all non-" "overlapping matches for the RE *pattern* in *string*. The *string* is " @@ -1387,7 +1388,7 @@ msgid "" "matches are included in the result." msgstr "" -#: library/re.rst:1062 +#: library/re.rst:1063 msgid "" "Return the string obtained by replacing the leftmost non-overlapping " "occurrences of *pattern* in *string* by the replacement *repl*. If the " @@ -1401,7 +1402,7 @@ msgid "" "For example::" msgstr "" -#: library/re.rst:1073 +#: library/re.rst:1074 msgid "" ">>> re.sub(r'def\\s+([a-zA-Z_][a-zA-Z_0-9]*)\\s*\\(\\s*\\):',\n" "... r'static PyObject*\\npy_\\1(void)\\n{',\n" @@ -1409,14 +1410,14 @@ msgid "" "'static PyObject*\\npy_myfunc(void)\\n{'" msgstr "" -#: library/re.rst:1078 +#: library/re.rst:1079 msgid "" "If *repl* is a function, it is called for every non-overlapping occurrence " "of *pattern*. The function takes a single :class:`~re.Match` argument, and " "returns the replacement string. For example::" msgstr "" -#: library/re.rst:1082 +#: library/re.rst:1083 msgid "" ">>> def dashrepl(matchobj):\n" "... if matchobj.group(0) == '-': return ' '\n" @@ -1429,25 +1430,25 @@ msgid "" "'Baked Beans & Spam'" msgstr "" -#: library/re.rst:1091 +#: library/re.rst:1092 msgid "The pattern may be a string or a :class:`~re.Pattern`." msgstr "" -#: library/re.rst:1093 +#: library/re.rst:1094 msgid "" "The optional argument *count* is the maximum number of pattern occurrences " "to be replaced; *count* must be a non-negative integer. If omitted or zero, " "all occurrences will be replaced." msgstr "" -#: library/re.rst:1097 +#: library/re.rst:1098 msgid "" "Adjacent empty matches are not possible, but an empty match can occur " "immediately after a non-empty match. As a result, ``sub('x*', '-', 'abxd')`` " "returns ``'-a-b--d-'`` instead of ``'-a-b-d-'``." msgstr "" -#: library/re.rst:1104 +#: library/re.rst:1105 msgid "" "In string-type *repl* arguments, in addition to the character escapes and " "backreferences described above, ``\\g`` will use the substring matched " @@ -1460,50 +1461,50 @@ msgid "" "RE." msgstr "" -#: library/re.rst:1398 +#: library/re.rst:1405 msgid "Unmatched groups are replaced with an empty string." msgstr "" -#: library/re.rst:1124 +#: library/re.rst:1125 msgid "" "Unknown escapes in *pattern* consisting of ``'\\'`` and an ASCII letter now " "are errors." msgstr "" -#: library/re.rst:1128 +#: library/re.rst:1129 msgid "" "Unknown escapes in *repl* consisting of ``'\\'`` and an ASCII letter now are " "errors. An empty match can occur immediately after a non-empty match." msgstr "" -#: library/re.rst:1133 +#: library/re.rst:1134 msgid "" "Group *id* can only contain ASCII digits. In :class:`bytes` replacement " "strings, group *name* can only contain bytes in the ASCII range " "(``b'\\x00'``-``b'\\x7f'``)." msgstr "" -#: library/re.rst:1138 +#: library/re.rst:1139 msgid "" "Passing *count* and *flags* as positional arguments is deprecated. In future " "Python versions they will be :ref:`keyword-only parameters `." msgstr "" -#: library/re.rst:1146 +#: library/re.rst:1147 msgid "" "Perform the same operation as :func:`sub`, but return a tuple ``(new_string, " "number_of_subs_made)``." msgstr "" -#: library/re.rst:1156 +#: library/re.rst:1157 msgid "" "Escape special characters in *pattern*. This is useful if you want to match " "an arbitrary literal string that may have regular expression metacharacters " "in it. For example::" msgstr "" -#: library/re.rst:1160 +#: library/re.rst:1161 msgid "" ">>> print(re.escape('https://www.python.org'))\n" "https://www\\.python\\.org\n" @@ -1518,13 +1519,13 @@ msgid "" "/|\\-|\\+|\\*\\*|\\*" msgstr "" -#: library/re.rst:1171 +#: library/re.rst:1172 msgid "" "This function must not be used for the replacement string in :func:`sub` " "and :func:`subn`, only backslashes should be escaped. For example::" msgstr "" -#: library/re.rst:1174 +#: library/re.rst:1175 msgid "" ">>> digits_re = r'\\d+'\n" ">>> sample = '/usr/sbin/sendmail - 0 errors, 12 warnings'\n" @@ -1532,11 +1533,11 @@ msgid "" "/usr/sbin/sendmail - \\d+ errors, \\d+ warnings" msgstr "" -#: library/re.rst:1179 +#: library/re.rst:1180 msgid "The ``'_'`` character is no longer escaped." msgstr "" -#: library/re.rst:1182 +#: library/re.rst:1183 msgid "" "Only characters that can have special meaning in a regular expression are " "escaped. As a result, ``'!'``, ``'\"'``, ``'%'``, ``\"'\"``, ``','``, " @@ -1544,15 +1545,15 @@ msgid "" "are no longer escaped." msgstr "" -#: library/re.rst:1191 +#: library/re.rst:1192 msgid "Clear the regular expression cache." msgstr "" -#: library/re.rst:1195 +#: library/re.rst:1196 msgid "Exceptions" msgstr "" -#: library/re.rst:1199 +#: library/re.rst:1200 msgid "" "Exception raised when a string passed to one of the functions here is not a " "valid regular expression (for example, it might contain unmatched " @@ -1562,51 +1563,57 @@ msgid "" "attributes:" msgstr "" -#: library/re.rst:1207 +#: library/re.rst:1208 msgid "The unformatted error message." msgstr "" -#: library/re.rst:1211 +#: library/re.rst:1212 msgid "The regular expression pattern." msgstr "" -#: library/re.rst:1215 +#: library/re.rst:1216 msgid "The index in *pattern* where compilation failed (may be ``None``)." msgstr "" -#: library/re.rst:1219 +#: library/re.rst:1220 msgid "The line corresponding to *pos* (may be ``None``)." msgstr "" -#: library/re.rst:1223 +#: library/re.rst:1224 msgid "The column corresponding to *pos* (may be ``None``)." msgstr "" -#: library/re.rst:1225 +#: library/re.rst:1226 msgid "Added additional attributes." msgstr "" -#: library/re.rst:1228 +#: library/re.rst:1229 msgid "" "``PatternError`` was originally named ``error``; the latter is kept as an " "alias for backward compatibility." msgstr "" -#: library/re.rst:1235 +#: library/re.rst:1236 msgid "Regular Expression Objects" msgstr "" -#: library/re.rst:1239 +#: library/re.rst:1240 msgid "Compiled regular expression object returned by :func:`re.compile`." msgstr "" -#: library/re.rst:1241 +#: library/re.rst:1242 +msgid "" +"Patterns are :ref:`generic ` over the type of string they handle (:" +"class:`str` or :class:`bytes`)." +msgstr "" + +#: library/re.rst:1245 msgid "" ":py:class:`re.Pattern` supports ``[]`` to indicate a Unicode (str) or bytes " "pattern. See :ref:`types-genericalias`." msgstr "" -#: library/re.rst:1247 +#: library/re.rst:1251 msgid "" "Scan through *string* looking for the first location where this regular " "expression produces a match, and return a corresponding :class:`~re.Match`. " @@ -1615,7 +1622,7 @@ msgid "" "string." msgstr "" -#: library/re.rst:1252 +#: library/re.rst:1256 msgid "" "The optional second parameter *pos* gives an index in the string where the " "search is to start; it defaults to ``0``. This is not completely equivalent " @@ -1624,7 +1631,7 @@ msgid "" "necessarily at the index where the search is to start." msgstr "" -#: library/re.rst:1258 +#: library/re.rst:1262 msgid "" "The optional parameter *endpos* limits how far the string will be searched; " "it will be as if the string is *endpos* characters long, so only the " @@ -1634,7 +1641,7 @@ msgid "" "equivalent to ``rx.search(string[:50], 0)``. ::" msgstr "" -#: library/re.rst:1265 +#: library/re.rst:1269 msgid "" ">>> pattern = re.compile(\"d\")\n" ">>> pattern.search(\"dog\") # Match at index 0\n" @@ -1642,7 +1649,7 @@ msgid "" ">>> pattern.search(\"dog\", 1) # No match; search doesn't include the \"d\"" msgstr "" -#: library/re.rst:1273 +#: library/re.rst:1277 msgid "" "If zero or more characters at the *beginning* of *string* match this regular " "expression, return a corresponding :class:`~re.Match`. Return ``None`` if " @@ -1650,13 +1657,13 @@ msgid "" "zero-length match." msgstr "" -#: library/re.rst:1296 +#: library/re.rst:1300 msgid "" "The optional *pos* and *endpos* parameters have the same meaning as for the :" "meth:`~Pattern.search` method. ::" msgstr "" -#: library/re.rst:1281 +#: library/re.rst:1285 msgid "" ">>> pattern = re.compile(\"o\")\n" ">>> pattern.match(\"dog\") # No match as \"o\" is not at the start of " @@ -1666,20 +1673,20 @@ msgid "" "" msgstr "" -#: library/re.rst:1286 +#: library/re.rst:1290 msgid "" "If you want to locate a match anywhere in *string*, use :meth:`~Pattern." "search` instead (see also :ref:`search-vs-match`)." msgstr "" -#: library/re.rst:1292 +#: library/re.rst:1296 msgid "" "If the whole *string* matches this regular expression, return a " "corresponding :class:`~re.Match`. Return ``None`` if the string does not " "match the pattern; note that this is different from a zero-length match." msgstr "" -#: library/re.rst:1299 +#: library/re.rst:1303 msgid "" ">>> pattern = re.compile(\"o[gh]\")\n" ">>> pattern.fullmatch(\"dog\") # No match as \"o\" is not at the start " @@ -1690,89 +1697,95 @@ msgid "" "" msgstr "" -#: library/re.rst:1310 +#: library/re.rst:1314 msgid "Identical to the :func:`split` function, using the compiled pattern." msgstr "" -#: library/re.rst:1315 +#: library/re.rst:1319 msgid "" "Similar to the :func:`findall` function, using the compiled pattern, but " "also accepts optional *pos* and *endpos* parameters that limit the search " "region like for :meth:`search`." msgstr "" -#: library/re.rst:1322 +#: library/re.rst:1326 msgid "" "Similar to the :func:`finditer` function, using the compiled pattern, but " "also accepts optional *pos* and *endpos* parameters that limit the search " "region like for :meth:`search`." msgstr "" -#: library/re.rst:1329 +#: library/re.rst:1333 msgid "Identical to the :func:`sub` function, using the compiled pattern." msgstr "" -#: library/re.rst:1334 +#: library/re.rst:1338 msgid "Identical to the :func:`subn` function, using the compiled pattern." msgstr "" -#: library/re.rst:1339 +#: library/re.rst:1343 msgid "" "The regex matching flags. This is a combination of the flags given to :func:" "`.compile`, any ``(?...)`` inline flags in the pattern, and implicit flags " "such as :py:const:`~re.UNICODE` if the pattern is a Unicode string." msgstr "" -#: library/re.rst:1346 +#: library/re.rst:1350 msgid "The number of capturing groups in the pattern." msgstr "" -#: library/re.rst:1351 +#: library/re.rst:1355 msgid "" "A dictionary mapping any symbolic group names defined by ``(?P)`` to " "group numbers. The dictionary is empty if no symbolic groups were used in " "the pattern." msgstr "" -#: library/re.rst:1358 +#: library/re.rst:1362 msgid "The pattern string from which the pattern object was compiled." msgstr "" -#: library/re.rst:1361 +#: library/re.rst:1365 msgid "" "Added support of :func:`copy.copy` and :func:`copy.deepcopy`. Compiled " "regular expression objects are considered atomic." msgstr "" -#: library/re.rst:1369 +#: library/re.rst:1373 msgid "Match Objects" msgstr "" -#: library/re.rst:1371 +#: library/re.rst:1375 msgid "" "Match objects always have a boolean value of ``True``. Since :meth:`~Pattern." "match` and :meth:`~Pattern.search` return ``None`` when there is no match, " "you can test whether there was a match with a simple ``if`` statement::" msgstr "" -#: library/re.rst:1376 +#: library/re.rst:1380 msgid "" "match = re.search(pattern, string)\n" "if match:\n" " process(match)" msgstr "" -#: library/re.rst:1382 +#: library/re.rst:1386 msgid "Match object returned by successful ``match``\\ es and ``search``\\ es." msgstr "" -#: library/re.rst:1384 +#: library/re.rst:1388 +msgid "" +"Matches are :ref:`generic ` over the type of string which was " +"matched (:class:`str` or :class:`bytes`)." +msgstr "" + +#: library/re.rst:1391 msgid "" ":py:class:`re.Match` supports ``[]`` to indicate a Unicode (str) or bytes " "match. See :ref:`types-genericalias`." msgstr "" -#: library/re.rst:1390 +#: library/re.rst:1397 msgid "" "Return the string obtained by doing backslash substitution on the template " "string *template*, as done by the :meth:`~Pattern.sub` method. Escapes such " @@ -1782,22 +1795,22 @@ msgid "" "backreference ``\\g<0>`` will be replaced by the entire match." msgstr "" -#: library/re.rst:1403 +#: library/re.rst:1410 msgid "" "Returns one or more subgroups of the match. If there is a single argument, " "the result is a single string; if there are multiple arguments, the result " "is a tuple with one item per argument. Without arguments, *group1* defaults " "to zero (the whole match is returned). If a *groupN* argument is zero, the " -"corresponding return value is the entire matching string; if it is in the " -"inclusive range [1..99], it is the string matching the corresponding " -"parenthesized group. If a group number is negative or larger than the " -"number of groups defined in the pattern, an :exc:`IndexError` exception is " -"raised. If a group is contained in a part of the pattern that did not match, " -"the corresponding result is ``None``. If a group is contained in a part of " -"the pattern that matched multiple times, the last match is returned. ::" +"corresponding return value is the entire matching string; if it is a " +"positive integer, it is the string matching the corresponding parenthesized " +"group. If a group number is negative or larger than the number of groups " +"defined in the pattern, an :exc:`IndexError` exception is raised. If a group " +"is contained in a part of the pattern that did not match, the corresponding " +"result is ``None``. If a group is contained in a part of the pattern that " +"matched multiple times, the last match is returned. ::" msgstr "" -#: library/re.rst:1415 +#: library/re.rst:1422 msgid "" ">>> m = re.match(r\"(\\w+) (\\w+)\", \"Isaac Newton, physicist\")\n" ">>> m.group(0) # The entire match\n" @@ -1810,7 +1823,7 @@ msgid "" "('Isaac', 'Newton')" msgstr "" -#: library/re.rst:1425 +#: library/re.rst:1432 msgid "" "If the regular expression uses the ``(?P...)`` syntax, the *groupN* " "arguments may also be strings identifying groups by their group name. If a " @@ -1818,11 +1831,11 @@ msgid "" "`IndexError` exception is raised." msgstr "" -#: library/re.rst:1430 +#: library/re.rst:1437 msgid "A moderately complicated example::" msgstr "" -#: library/re.rst:1432 +#: library/re.rst:1439 msgid "" ">>> m = re.match(r\"(?P\\w+) (?P\\w+)\", \"Malcolm " "Reynolds\")\n" @@ -1832,11 +1845,11 @@ msgid "" "'Reynolds'" msgstr "" -#: library/re.rst:1438 +#: library/re.rst:1445 msgid "Named groups can also be referred to by their index::" msgstr "" -#: library/re.rst:1440 +#: library/re.rst:1447 msgid "" ">>> m.group(1)\n" "'Malcolm'\n" @@ -1844,24 +1857,24 @@ msgid "" "'Reynolds'" msgstr "" -#: library/re.rst:1445 +#: library/re.rst:1452 msgid "If a group matches multiple times, only the last match is accessible::" msgstr "" -#: library/re.rst:1447 +#: library/re.rst:1454 msgid "" ">>> m = re.match(r\"(..)+\", \"a1b2c3\") # Matches 3 times.\n" ">>> m.group(1) # Returns only the last match.\n" "'c3'" msgstr "" -#: library/re.rst:1454 +#: library/re.rst:1461 msgid "" "This is identical to ``m.group(g)``. This allows easier access to an " "individual group from a match::" msgstr "" -#: library/re.rst:1457 +#: library/re.rst:1464 msgid "" ">>> m = re.match(r\"(\\w+) (\\w+)\", \"Isaac Newton, physicist\")\n" ">>> m[0] # The entire match\n" @@ -1872,11 +1885,11 @@ msgid "" "'Newton'" msgstr "" -#: library/re.rst:1465 +#: library/re.rst:1472 msgid "Named groups are supported as well::" msgstr "" -#: library/re.rst:1467 +#: library/re.rst:1474 msgid "" ">>> m = re.match(r\"(?P\\w+) (?P\\w+)\", \"Isaac " "Newton\")\n" @@ -1886,32 +1899,32 @@ msgid "" "'Newton'" msgstr "" -#: library/re.rst:1478 +#: library/re.rst:1485 msgid "" "Return a tuple containing all the subgroups of the match, from 1 up to " "however many groups are in the pattern. The *default* argument is used for " "groups that did not participate in the match; it defaults to ``None``." msgstr "" -#: library/re.rst:1707 +#: library/re.rst:1714 msgid "For example::" msgstr "" -#: library/re.rst:1484 +#: library/re.rst:1491 msgid "" ">>> m = re.match(r\"(\\d+)\\.(\\d+)\", \"24.1632\")\n" ">>> m.groups()\n" "('24', '1632')" msgstr "" -#: library/re.rst:1488 +#: library/re.rst:1495 msgid "" "If we make the decimal place and everything after it optional, not all " "groups might participate in the match. These groups will default to " "``None`` unless the *default* argument is given::" msgstr "" -#: library/re.rst:1492 +#: library/re.rst:1499 msgid "" ">>> m = re.match(r\"(\\d+)\\.?(\\d+)?\", \"24\")\n" ">>> m.groups() # Second group defaults to None.\n" @@ -1920,14 +1933,14 @@ msgid "" "('24', '0')" msgstr "" -#: library/re.rst:1501 +#: library/re.rst:1508 msgid "" "Return a dictionary containing all the *named* subgroups of the match, keyed " "by the subgroup name. The *default* argument is used for groups that did " "not participate in the match; it defaults to ``None``. For example::" msgstr "" -#: library/re.rst:1505 +#: library/re.rst:1512 msgid "" ">>> m = re.match(r\"(?P\\w+) (?P\\w+)\", \"Malcolm " "Reynolds\")\n" @@ -1935,7 +1948,7 @@ msgid "" "{'first_name': 'Malcolm', 'last_name': 'Reynolds'}" msgstr "" -#: library/re.rst:1513 +#: library/re.rst:1520 msgid "" "Return the indices of the start and end of the substring matched by *group*; " "*group* defaults to zero (meaning the whole matched substring). Return " @@ -1944,11 +1957,11 @@ msgid "" "matched by group *g* (equivalent to ``m.group(g)``) is ::" msgstr "" -#: library/re.rst:1519 +#: library/re.rst:1526 msgid "m.string[m.start(g):m.end(g)]" msgstr "" -#: library/re.rst:1521 +#: library/re.rst:1528 msgid "" "Note that ``m.start(group)`` will equal ``m.end(group)`` if *group* matched " "a null string. For example, after ``m = re.search('b(c?)', 'cba')``, ``m." @@ -1956,11 +1969,11 @@ msgid "" "2, and ``m.start(2)`` raises an :exc:`IndexError` exception." msgstr "" -#: library/re.rst:1526 +#: library/re.rst:1533 msgid "An example that will remove *remove_this* from email addresses::" msgstr "" -#: library/re.rst:1528 +#: library/re.rst:1535 msgid "" ">>> email = \"tony@tiremove_thisger.net\"\n" ">>> m = re.search(\"remove_this\", email)\n" @@ -1968,28 +1981,28 @@ msgid "" "'tony@tiger.net'" msgstr "" -#: library/re.rst:1536 +#: library/re.rst:1543 msgid "" "For a match *m*, return the 2-tuple ``(m.start(group), m.end(group))``. Note " "that if *group* did not contribute to the match, this is ``(-1, -1)``. " "*group* defaults to zero, the entire match." msgstr "" -#: library/re.rst:1543 +#: library/re.rst:1550 msgid "" "The value of *pos* which was passed to the :meth:`~Pattern.search` or :meth:" "`~Pattern.match` method of a :ref:`regex object `. This is the " "index into the string at which the RE engine started looking for a match." msgstr "" -#: library/re.rst:1550 +#: library/re.rst:1557 msgid "" "The value of *endpos* which was passed to the :meth:`~Pattern.search` or :" "meth:`~Pattern.match` method of a :ref:`regex object `. This is " "the index into the string beyond which the RE engine will not go." msgstr "" -#: library/re.rst:1557 +#: library/re.rst:1564 msgid "" "The integer index of the last matched capturing group, or ``None`` if no " "group was matched at all. For example, the expressions ``(a)b``, ``((a)" @@ -1998,43 +2011,43 @@ msgid "" "applied to the same string." msgstr "" -#: library/re.rst:1566 +#: library/re.rst:1573 msgid "" "The name of the last matched capturing group, or ``None`` if the group " "didn't have a name, or if no group was matched at all." msgstr "" -#: library/re.rst:1572 +#: library/re.rst:1579 msgid "" "The :ref:`regular expression object ` whose :meth:`~Pattern." "match` or :meth:`~Pattern.search` method produced this match instance." msgstr "" -#: library/re.rst:1578 +#: library/re.rst:1585 msgid "The string passed to :meth:`~Pattern.match` or :meth:`~Pattern.search`." msgstr "" -#: library/re.rst:1581 +#: library/re.rst:1588 msgid "" "Added support of :func:`copy.copy` and :func:`copy.deepcopy`. Match objects " "are considered atomic." msgstr "" -#: library/re.rst:1589 +#: library/re.rst:1596 msgid "Regular Expression Examples" msgstr "" -#: library/re.rst:1593 +#: library/re.rst:1600 msgid "Checking for a Pair" msgstr "" -#: library/re.rst:1595 +#: library/re.rst:1602 msgid "" "In this example, we'll use the following helper function to display match " "objects a little more gracefully::" msgstr "" -#: library/re.rst:1598 +#: library/re.rst:1605 msgid "" "def displaymatch(match):\n" " if match is None:\n" @@ -2042,7 +2055,7 @@ msgid "" " return '' % (match.group(), match.groups())" msgstr "" -#: library/re.rst:1603 +#: library/re.rst:1610 msgid "" "Suppose you are writing a poker program where a player's hand is represented " "as a 5-character string with each character representing a card, \"a\" for " @@ -2050,11 +2063,11 @@ msgid "" "\"2\" through \"9\" representing the card with that value." msgstr "" -#: library/re.rst:1608 +#: library/re.rst:1615 msgid "To see if a given string is a valid hand, one could do the following::" msgstr "" -#: library/re.rst:1610 +#: library/re.rst:1617 msgid "" ">>> valid = re.compile(r\"^[a2-9tjqk]{5}$\")\n" ">>> displaymatch(valid.match(\"akt5q\")) # Valid.\n" @@ -2065,14 +2078,14 @@ msgid "" "\"\"" msgstr "" -#: library/re.rst:1618 +#: library/re.rst:1625 msgid "" "That last hand, ``\"727ak\"``, contained a pair, or two of the same valued " "cards. To match this with a regular expression, one could use backreferences " "as such::" msgstr "" -#: library/re.rst:1621 +#: library/re.rst:1628 msgid "" ">>> pair = re.compile(r\".*(.).*\\1\")\n" ">>> displaymatch(pair.match(\"717ak\")) # Pair of 7s.\n" @@ -2082,13 +2095,13 @@ msgid "" "\"\"" msgstr "" -#: library/re.rst:1628 +#: library/re.rst:1635 msgid "" "To find out what card the pair consists of, one could use the :meth:`~Match." "group` method of the match object in the following manner::" msgstr "" -#: library/re.rst:1631 +#: library/re.rst:1638 msgid "" ">>> pair = re.compile(r\".*(.).*\\1\")\n" ">>> pair.match(\"717ak\").group(1)\n" @@ -2106,11 +2119,11 @@ msgid "" "'a'" msgstr "" -#: library/re.rst:1647 +#: library/re.rst:1654 msgid "Simulating scanf()" msgstr "" -#: library/re.rst:1651 +#: library/re.rst:1658 msgid "" "Python does not currently have an equivalent to :c:func:`!scanf`. Regular " "expressions are generally more powerful, though also more verbose, than :c:" @@ -2119,130 +2132,130 @@ msgid "" "expressions." msgstr "" -#: library/re.rst:1658 +#: library/re.rst:1665 msgid ":c:func:`!scanf` Token" msgstr "" -#: library/re.rst:1658 +#: library/re.rst:1665 msgid "Regular Expression" msgstr "" -#: library/re.rst:1660 +#: library/re.rst:1667 msgid "``%c``" msgstr "" -#: library/re.rst:1662 +#: library/re.rst:1669 msgid "``%5c``" msgstr "" -#: library/re.rst:1662 +#: library/re.rst:1669 msgid "``.{5}``" msgstr "" -#: library/re.rst:1664 +#: library/re.rst:1671 msgid "``%d``" msgstr "" -#: library/re.rst:1664 +#: library/re.rst:1671 msgid "``[-+]?\\d+``" msgstr "" -#: library/re.rst:1666 +#: library/re.rst:1673 msgid "``%e``, ``%E``, ``%f``, ``%g``" msgstr "" -#: library/re.rst:1666 +#: library/re.rst:1673 msgid "``[-+]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?``" msgstr "" -#: library/re.rst:1668 +#: library/re.rst:1675 msgid "``%i``" msgstr "" -#: library/re.rst:1668 +#: library/re.rst:1675 msgid "``[-+]?(0[xX][\\dA-Fa-f]+|0[0-7]*|\\d+)``" msgstr "" -#: library/re.rst:1670 +#: library/re.rst:1677 msgid "``%o``" msgstr "" -#: library/re.rst:1670 +#: library/re.rst:1677 msgid "``[-+]?[0-7]+``" msgstr "" -#: library/re.rst:1672 +#: library/re.rst:1679 msgid "``%s``" msgstr "" -#: library/re.rst:1672 +#: library/re.rst:1679 msgid "``\\S+``" msgstr "" -#: library/re.rst:1674 +#: library/re.rst:1681 msgid "``%u``" msgstr "" -#: library/re.rst:1674 +#: library/re.rst:1681 msgid "``\\d+``" msgstr "" -#: library/re.rst:1676 +#: library/re.rst:1683 msgid "``%x``, ``%X``" msgstr "" -#: library/re.rst:1676 +#: library/re.rst:1683 msgid "``[-+]?(0[xX])?[\\dA-Fa-f]+``" msgstr "" -#: library/re.rst:1679 +#: library/re.rst:1686 msgid "To extract the filename and numbers from a string like ::" msgstr "" -#: library/re.rst:1681 +#: library/re.rst:1688 msgid "/usr/sbin/sendmail - 0 errors, 4 warnings" msgstr "" -#: library/re.rst:1683 +#: library/re.rst:1690 msgid "you would use a :c:func:`!scanf` format like ::" msgstr "" -#: library/re.rst:1685 +#: library/re.rst:1692 msgid "%s - %d errors, %d warnings" msgstr "" -#: library/re.rst:1687 +#: library/re.rst:1694 msgid "The equivalent regular expression would be ::" msgstr "" -#: library/re.rst:1689 +#: library/re.rst:1696 msgid "(\\S+) - (\\d+) errors, (\\d+) warnings" msgstr "" -#: library/re.rst:1695 +#: library/re.rst:1702 msgid "search() vs. match()" msgstr "" -#: library/re.rst:1699 +#: library/re.rst:1706 msgid "" "Python offers different primitive operations based on regular expressions:" msgstr "" -#: library/re.rst:1701 +#: library/re.rst:1708 msgid ":func:`re.match` checks for a match only at the beginning of the string" msgstr "" -#: library/re.rst:1702 +#: library/re.rst:1709 msgid "" ":func:`re.search` checks for a match anywhere in the string (this is what " "Perl does by default)" msgstr "" -#: library/re.rst:1704 +#: library/re.rst:1711 msgid ":func:`re.fullmatch` checks for entire string to be a match" msgstr "" -#: library/re.rst:1709 +#: library/re.rst:1716 msgid "" ">>> re.match(\"c\", \"abcdef\") # No match\n" ">>> re.search(\"c\", \"abcdef\") # Match\n" @@ -2252,13 +2265,13 @@ msgid "" ">>> re.fullmatch(\"r.*n\", \"python\") # No match" msgstr "" -#: library/re.rst:1716 +#: library/re.rst:1723 msgid "" "Regular expressions beginning with ``'^'`` can be used with :func:`search` " "to restrict the match at the beginning of the string::" msgstr "" -#: library/re.rst:1719 +#: library/re.rst:1726 msgid "" ">>> re.match(\"c\", \"abcdef\") # No match\n" ">>> re.search(\"^c\", \"abcdef\") # No match\n" @@ -2266,7 +2279,7 @@ msgid "" "" msgstr "" -#: library/re.rst:1724 +#: library/re.rst:1731 msgid "" "Note however that in :const:`MULTILINE` mode :func:`match` only matches at " "the beginning of the string, whereas using :func:`search` with a regular " @@ -2274,18 +2287,18 @@ msgid "" "line. ::" msgstr "" -#: library/re.rst:1728 +#: library/re.rst:1735 msgid "" ">>> re.match(\"X\", \"A\\nB\\nX\", re.MULTILINE) # No match\n" ">>> re.search(\"^X\", \"A\\nB\\nX\", re.MULTILINE) # Match\n" "" msgstr "" -#: library/re.rst:1734 +#: library/re.rst:1741 msgid "Making a Phonebook" msgstr "" -#: library/re.rst:1736 +#: library/re.rst:1743 msgid "" ":func:`split` splits a string into a list delimited by the passed pattern. " "The method is invaluable for converting textual data into data structures " @@ -2293,13 +2306,13 @@ msgid "" "following example that creates a phonebook." msgstr "" -#: library/re.rst:1741 +#: library/re.rst:1748 msgid "" "First, here is the input. Normally it may come from a file, here we are " "using triple-quoted string syntax" msgstr "" -#: library/re.rst:1744 +#: library/re.rst:1751 msgid "" ">>> text = \"\"\"Ross McFluff: 834.345.1254 155 Elm Street\n" "...\n" @@ -2310,13 +2323,13 @@ msgid "" "... Heather Albrecht: 548.326.4584 919 Park Place\"\"\"" msgstr "" -#: library/re.rst:1754 +#: library/re.rst:1761 msgid "" "The entries are separated by one or more newlines. Now we convert the string " "into a list with each nonempty line having its own entry:" msgstr "" -#: library/re.rst:1757 +#: library/re.rst:1764 msgid "" ">>> entries = re.split(\"\\n+\", text)\n" ">>> entries\n" @@ -2326,14 +2339,14 @@ msgid "" "'Heather Albrecht: 548.326.4584 919 Park Place']" msgstr "" -#: library/re.rst:1767 +#: library/re.rst:1774 msgid "" "Finally, split each entry into a list with first name, last name, telephone " "number, and address. We use the ``maxsplit`` parameter of :func:`split` " "because the address has spaces, our splitting pattern, in it:" msgstr "" -#: library/re.rst:1771 +#: library/re.rst:1778 msgid "" ">>> [re.split(\":? \", entry, maxsplit=3) for entry in entries]\n" "[['Ross', 'McFluff', '834.345.1254', '155 Elm Street'],\n" @@ -2342,14 +2355,14 @@ msgid "" "['Heather', 'Albrecht', '548.326.4584', '919 Park Place']]" msgstr "" -#: library/re.rst:1780 +#: library/re.rst:1787 msgid "" "The ``:?`` pattern matches the colon after the last name, so that it does " "not occur in the result list. With a ``maxsplit`` of ``4``, we could " "separate the house number from the street name:" msgstr "" -#: library/re.rst:1784 +#: library/re.rst:1791 msgid "" ">>> [re.split(\":? \", entry, maxsplit=4) for entry in entries]\n" "[['Ross', 'McFluff', '834.345.1254', '155', 'Elm Street'],\n" @@ -2358,11 +2371,11 @@ msgid "" "['Heather', 'Albrecht', '548.326.4584', '919', 'Park Place']]" msgstr "" -#: library/re.rst:1795 +#: library/re.rst:1802 msgid "Text Munging" msgstr "" -#: library/re.rst:1797 +#: library/re.rst:1804 msgid "" ":func:`sub` replaces every occurrence of a pattern with a string or the " "result of a function. This example demonstrates using :func:`sub` with a " @@ -2370,7 +2383,7 @@ msgid "" "each word of a sentence except for the first and last characters::" msgstr "" -#: library/re.rst:1802 +#: library/re.rst:1809 msgid "" ">>> def repl(m):\n" "... inner_word = list(m.group(2))\n" @@ -2384,11 +2397,11 @@ msgid "" "'Pofsroser Aodlambelk, plasee reoprt yuor asnebces potlmrpy.'" msgstr "" -#: library/re.rst:1815 +#: library/re.rst:1822 msgid "Finding all Adverbs" msgstr "" -#: library/re.rst:1817 +#: library/re.rst:1824 msgid "" ":func:`findall` matches *all* occurrences of a pattern, not just the first " "one as :func:`search` does. For example, if a writer wanted to find all of " @@ -2396,18 +2409,18 @@ msgid "" "manner::" msgstr "" -#: library/re.rst:1822 +#: library/re.rst:1829 msgid "" ">>> text = \"He was carefully disguised but captured quickly by police.\"\n" ">>> re.findall(r\"\\w+ly\\b\", text)\n" "['carefully', 'quickly']" msgstr "" -#: library/re.rst:1828 +#: library/re.rst:1835 msgid "Finding all Adverbs and their Positions" msgstr "" -#: library/re.rst:1830 +#: library/re.rst:1837 msgid "" "If one wants more information about all matches of a pattern than the " "matched text, :func:`finditer` is useful as it provides :class:`~re.Match` " @@ -2416,7 +2429,7 @@ msgid "" "they would use :func:`finditer` in the following manner::" msgstr "" -#: library/re.rst:1836 +#: library/re.rst:1843 msgid "" ">>> text = \"He was carefully disguised but captured quickly by police.\"\n" ">>> for m in re.finditer(r\"\\w+ly\\b\", text):\n" @@ -2425,11 +2438,11 @@ msgid "" "40-47: quickly" msgstr "" -#: library/re.rst:1844 +#: library/re.rst:1851 msgid "Raw String Notation" msgstr "" -#: library/re.rst:1846 +#: library/re.rst:1853 msgid "" "Raw string notation (``r\"text\"``) keeps regular expressions sane. Without " "it, every backslash (``'\\'``) in a regular expression would have to be " @@ -2437,7 +2450,7 @@ msgid "" "lines of code are functionally identical::" msgstr "" -#: library/re.rst:1851 +#: library/re.rst:1858 msgid "" ">>> re.match(r\"\\W(.)\\1\\W\", \" ff \")\n" "\n" @@ -2445,7 +2458,7 @@ msgid "" "" msgstr "" -#: library/re.rst:1856 +#: library/re.rst:1863 msgid "" "When one wants to match a literal backslash, it must be escaped in the " "regular expression. With raw string notation, this means ``r\"\\\\\"``. " @@ -2453,7 +2466,7 @@ msgid "" "following lines of code functionally identical::" msgstr "" -#: library/re.rst:1861 +#: library/re.rst:1868 msgid "" ">>> re.match(r\"\\\\\", r\"\\\\\")\n" "\n" @@ -2461,32 +2474,32 @@ msgid "" "" msgstr "" -#: library/re.rst:1868 +#: library/re.rst:1875 msgid "Writing a Tokenizer" msgstr "" -#: library/re.rst:1870 +#: library/re.rst:1877 msgid "" "A `tokenizer or scanner `_ " "analyzes a string to categorize groups of characters. This is a useful " "first step in writing a compiler or interpreter." msgstr "" -#: library/re.rst:1874 +#: library/re.rst:1881 msgid "" "The text categories are specified with regular expressions. The technique " "is to combine those into a single master regular expression and to loop over " "successive matches::" msgstr "" -#: library/re.rst:1878 +#: library/re.rst:1885 msgid "" "from typing import NamedTuple\n" "import re\n" "\n" "class Token(NamedTuple):\n" " type: str\n" -" value: str\n" +" value: int | float | str\n" " line: int\n" " column: int\n" "\n" @@ -2535,11 +2548,11 @@ msgid "" " print(token)" msgstr "" -#: library/re.rst:1930 +#: library/re.rst:1937 msgid "The tokenizer produces the following output::" msgstr "" -#: library/re.rst:1932 +#: library/re.rst:1939 msgid "" "Token(type='IF', value='IF', line=2, column=4)\n" "Token(type='ID', value='quantity', line=2, column=7)\n" @@ -2562,7 +2575,7 @@ msgid "" "Token(type='END', value=';', line=5, column=9)" msgstr "" -#: library/re.rst:1953 +#: library/re.rst:1960 msgid "" "Friedl, Jeffrey. Mastering Regular Expressions. 3rd ed., O'Reilly Media, " "2009. The third edition of the book no longer covers Python at all, but the " @@ -2577,8 +2590,8 @@ msgstr "" #: library/re.rst:112 library/re.rst:130 library/re.rst:143 library/re.rst:181 #: library/re.rst:235 library/re.rst:258 library/re.rst:304 library/re.rst:327 #: library/re.rst:414 library/re.rst:452 library/re.rst:464 library/re.rst:498 -#: library/re.rst:531 library/re.rst:548 library/re.rst:590 library/re.rst:614 -#: library/re.rst:636 library/re.rst:667 library/re.rst:863 library/re.rst:1102 +#: library/re.rst:532 library/re.rst:549 library/re.rst:591 library/re.rst:615 +#: library/re.rst:637 library/re.rst:668 library/re.rst:864 library/re.rst:1103 msgid "in regular expressions" msgstr "" @@ -2630,7 +2643,7 @@ msgstr "" msgid "{} (curly brackets)" msgstr "" -#: library/re.rst:258 library/re.rst:531 +#: library/re.rst:258 library/re.rst:532 msgid "\\ (backslash)" msgstr "" @@ -2690,98 +2703,98 @@ msgstr "" msgid "(?(" msgstr "" -#: library/re.rst:543 +#: library/re.rst:544 msgid "\\A" msgstr "" -#: library/re.rst:672 +#: library/re.rst:673 msgid "\\b" msgstr "" -#: library/re.rst:570 +#: library/re.rst:571 msgid "\\B" msgstr "" -#: library/re.rst:590 +#: library/re.rst:591 msgid "\\d" msgstr "" -#: library/re.rst:606 +#: library/re.rst:607 msgid "\\D" msgstr "" -#: library/re.rst:614 +#: library/re.rst:615 msgid "\\s" msgstr "" -#: library/re.rst:628 +#: library/re.rst:629 msgid "\\S" msgstr "" -#: library/re.rst:636 +#: library/re.rst:637 msgid "\\w" msgstr "" -#: library/re.rst:653 +#: library/re.rst:654 msgid "\\W" msgstr "" -#: library/re.rst:667 +#: library/re.rst:668 msgid "\\Z" msgstr "" -#: library/re.rst:672 +#: library/re.rst:673 msgid "\\a" msgstr "" -#: library/re.rst:672 +#: library/re.rst:673 msgid "\\f" msgstr "" -#: library/re.rst:672 +#: library/re.rst:673 msgid "\\n" msgstr "" -#: library/re.rst:672 +#: library/re.rst:673 msgid "\\N" msgstr "" -#: library/re.rst:672 +#: library/re.rst:673 msgid "\\r" msgstr "" -#: library/re.rst:672 +#: library/re.rst:673 msgid "\\t" msgstr "" -#: library/re.rst:672 +#: library/re.rst:673 msgid "\\u" msgstr "" -#: library/re.rst:672 +#: library/re.rst:673 msgid "\\U" msgstr "" -#: library/re.rst:672 +#: library/re.rst:673 msgid "\\v" msgstr "" -#: library/re.rst:672 +#: library/re.rst:673 msgid "\\x" msgstr "" -#: library/re.rst:672 +#: library/re.rst:673 msgid "\\\\" msgstr "" -#: library/re.rst:863 +#: library/re.rst:864 msgid "# (hash)" msgstr "" -#: library/re.rst:1102 +#: library/re.rst:1103 msgid "\\g" msgstr "" -#: library/re.rst:1649 +#: library/re.rst:1656 msgid "scanf (C function)" msgstr "" diff --git a/library/readline.po b/library/readline.po index a8a65fe76..2932b6507 100644 --- a/library/readline.po +++ b/library/readline.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,7 +21,7 @@ msgstr "" msgid ":mod:`!readline` --- GNU readline interface" msgstr "" -#: library/readline.rst:12 +#: library/readline.rst:11 msgid "" "The :mod:`readline` module defines a number of functions to facilitate " "completion and reading/writing of history files from the Python interpreter. " @@ -32,7 +32,7 @@ msgid "" "func:`input` function." msgstr "" -#: library/readline.rst:20 +#: library/readline.rst:19 msgid "" "Readline keybindings may be configured via an initialization file, typically " "``.inputrc`` in your home directory. See `Readline Init File ` or :ref:`WebAssembly platforms `." msgstr "" -#: library/readline.rst:31 +#: library/readline.rst:32 msgid "" "The underlying Readline library API may be implemented by the ``editline`` " "(``libedit``) library instead of GNU readline. On macOS the :mod:`readline` " "module detects which library is being used at run time." msgstr "" -#: library/readline.rst:36 +#: library/readline.rst:37 msgid "" "The configuration file for ``editline`` is different from that of GNU " "readline. If you programmatically load configuration strings you can use :" "data:`backend` to determine which library is being used." msgstr "" -#: library/readline.rst:40 +#: library/readline.rst:41 msgid "" "If you use ``editline``/``libedit`` readline emulation on macOS, the " "initialization file located in your home directory is named ``.editrc``. For " @@ -74,95 +74,95 @@ msgid "" "keybindings and TAB completion::" msgstr "" -#: library/readline.rst:45 +#: library/readline.rst:46 msgid "" "python:bind -v\n" "python:bind ^I rl_complete" msgstr "" -#: library/readline.rst:48 +#: library/readline.rst:49 msgid "" "Also note that different libraries may use different history file formats. " "When switching the underlying library, existing history files may become " "unusable." msgstr "" -#: library/readline.rst:54 +#: library/readline.rst:55 msgid "" "The name of the underlying Readline library being used, either " "``\"readline\"`` or ``\"editline\"``." msgstr "" -#: library/readline.rst:60 +#: library/readline.rst:61 msgid "Init file" msgstr "" -#: library/readline.rst:62 +#: library/readline.rst:63 msgid "The following functions relate to the init file and user configuration:" msgstr "" -#: library/readline.rst:67 +#: library/readline.rst:68 msgid "" "Execute the init line provided in the *string* argument. This calls :c:func:" "`!rl_parse_and_bind` in the underlying library." msgstr "" -#: library/readline.rst:73 +#: library/readline.rst:74 msgid "" "Execute a readline initialization file. The default filename is the last " "filename used. This calls :c:func:`!rl_read_init_file` in the underlying " "library." msgstr "" -#: library/readline.rst:78 +#: library/readline.rst:79 msgid "Line buffer" msgstr "" -#: library/readline.rst:80 +#: library/readline.rst:81 msgid "The following functions operate on the line buffer:" msgstr "" -#: library/readline.rst:85 +#: library/readline.rst:86 msgid "" "Return the current contents of the line buffer (:c:data:`!rl_line_buffer` in " "the underlying library)." msgstr "" -#: library/readline.rst:91 +#: library/readline.rst:92 msgid "" "Insert text into the line buffer at the cursor position. This calls :c:func:" "`!rl_insert_text` in the underlying library, but ignores the return value." msgstr "" -#: library/readline.rst:98 +#: library/readline.rst:99 msgid "" "Change what's displayed on the screen to reflect the current contents of the " "line buffer. This calls :c:func:`!rl_redisplay` in the underlying library." msgstr "" -#: library/readline.rst:103 +#: library/readline.rst:104 msgid "History file" msgstr "" -#: library/readline.rst:105 +#: library/readline.rst:106 msgid "The following functions operate on a history file:" msgstr "" -#: library/readline.rst:110 +#: library/readline.rst:111 msgid "" "Load a readline history file, and append it to the history list. The default " "filename is :file:`~/.history`. This calls :c:func:`!read_history` in the " "underlying library." msgstr "" -#: library/readline.rst:117 +#: library/readline.rst:118 msgid "" "Save the history list to a readline history file, overwriting any existing " "file. The default filename is :file:`~/.history`. This calls :c:func:`!" "write_history` in the underlying library." msgstr "" -#: library/readline.rst:124 +#: library/readline.rst:125 msgid "" "Append the last *nelements* items of history to a file. The default " "filename is :file:`~/.history`. The file must already exist. This calls :c:" @@ -170,7 +170,7 @@ msgid "" "if Python was compiled for a version of the library that supports it." msgstr "" -#: library/readline.rst:136 +#: library/readline.rst:137 msgid "" "Set or return the desired number of lines to save in the history file. The :" "func:`write_history_file` function uses this value to truncate the history " @@ -178,72 +178,72 @@ msgid "" "library. Negative values imply unlimited history file size." msgstr "" -#: library/readline.rst:144 +#: library/readline.rst:145 msgid "History list" msgstr "" -#: library/readline.rst:146 +#: library/readline.rst:147 msgid "The following functions operate on a global history list:" msgstr "" -#: library/readline.rst:151 +#: library/readline.rst:152 msgid "" "Clear the current history. This calls :c:func:`!clear_history` in the " "underlying library. The Python function only exists if Python was compiled " "for a version of the library that supports it." msgstr "" -#: library/readline.rst:158 +#: library/readline.rst:159 msgid "" "Return the number of items currently in the history. (This is different " "from :func:`get_history_length`, which returns the maximum number of lines " "that will be written to a history file.)" msgstr "" -#: library/readline.rst:165 +#: library/readline.rst:166 msgid "" "Return the current contents of history item at *index*. The item index is " "one-based. This calls :c:func:`!history_get` in the underlying library." msgstr "" -#: library/readline.rst:171 +#: library/readline.rst:172 msgid "" "Remove history item specified by its position from the history. The position " "is zero-based. This calls :c:func:`!remove_history` in the underlying " "library." msgstr "" -#: library/readline.rst:178 +#: library/readline.rst:179 msgid "" "Replace history item specified by its position with *line*. The position is " "zero-based. This calls :c:func:`!replace_history_entry` in the underlying " "library." msgstr "" -#: library/readline.rst:185 +#: library/readline.rst:186 msgid "" "Append *line* to the history buffer, as if it was the last line typed. This " "calls :c:func:`!add_history` in the underlying library." msgstr "" -#: library/readline.rst:191 +#: library/readline.rst:192 msgid "" "Enable or disable automatic calls to :c:func:`!add_history` when reading " "input via readline. The *enabled* argument should be a Boolean value that " "when true, enables auto history, and that when false, disables auto history." msgstr "" -#: library/readline.rst:199 +#: library/readline.rst:200 msgid "" "Auto history is enabled by default, and changes to this do not persist " "across multiple sessions." msgstr "" -#: library/readline.rst:204 +#: library/readline.rst:205 msgid "Startup hooks" msgstr "" -#: library/readline.rst:209 +#: library/readline.rst:210 msgid "" "Set or remove the function invoked by the :c:data:`!rl_startup_hook` " "callback of the underlying library. If *function* is specified, it will be " @@ -252,7 +252,7 @@ msgid "" "readline prints the first prompt." msgstr "" -#: library/readline.rst:218 +#: library/readline.rst:219 msgid "" "Set or remove the function invoked by the :c:data:`!rl_pre_input_hook` " "callback of the underlying library. If *function* is specified, it will be " @@ -263,11 +263,11 @@ msgid "" "of the library that supports it." msgstr "" -#: library/readline.rst:230 +#: library/readline.rst:231 msgid "Completion" msgstr "" -#: library/readline.rst:232 +#: library/readline.rst:233 msgid "" "The following functions relate to implementing a custom word completion " "function. This is typically operated by the Tab key, and can suggest and " @@ -277,7 +277,7 @@ msgid "" "custom completer, a different set of word delimiters should be set." msgstr "" -#: library/readline.rst:242 +#: library/readline.rst:243 msgid "" "Set or remove the completer function. If *function* is specified, it will " "be used as the new completer function; if omitted or ``None``, any completer " @@ -287,7 +287,7 @@ msgid "" "starting with *text*." msgstr "" -#: library/readline.rst:249 +#: library/readline.rst:250 msgid "" "The installed completer function is invoked by the *entry_func* callback " "passed to :c:func:`!rl_completion_matches` in the underlying library. The " @@ -295,19 +295,19 @@ msgid "" "rl_attempted_completion_function` callback of the underlying library." msgstr "" -#: library/readline.rst:258 +#: library/readline.rst:259 msgid "" "Get the completer function, or ``None`` if no completer function has been " "set." msgstr "" -#: library/readline.rst:263 +#: library/readline.rst:264 msgid "" "Get the type of completion being attempted. This returns the :c:data:`!" "rl_completion_type` variable in the underlying library as an integer." msgstr "" -#: library/readline.rst:271 +#: library/readline.rst:272 msgid "" "Get the beginning or ending index of the completion scope. These indexes are " "the *start* and *end* arguments passed to the :c:data:`!" @@ -317,7 +317,7 @@ msgid "" "differently than libreadline." msgstr "" -#: library/readline.rst:282 +#: library/readline.rst:283 msgid "" "Set or get the word delimiters for completion. These determine the start of " "the word to be considered for completion (the completion scope). These " @@ -325,7 +325,7 @@ msgid "" "in the underlying library." msgstr "" -#: library/readline.rst:290 +#: library/readline.rst:291 msgid "" "Set or remove the completion display function. If *function* is specified, " "it will be used as the new completion display function; if omitted or " @@ -336,11 +336,11 @@ msgid "" "each time matches need to be displayed." msgstr "" -#: library/readline.rst:303 +#: library/readline.rst:304 msgid "Example" msgstr "" -#: library/readline.rst:305 +#: library/readline.rst:306 msgid "" "The following example demonstrates how to use the :mod:`readline` module's " "history reading and writing functions to automatically load and save a " @@ -349,7 +349,7 @@ msgid "" "sessions from the user's :envvar:`PYTHONSTARTUP` file. ::" msgstr "" -#: library/readline.rst:311 +#: library/readline.rst:312 msgid "" "import atexit\n" "import os\n" @@ -366,19 +366,19 @@ msgid "" "atexit.register(readline.write_history_file, histfile)" msgstr "" -#: library/readline.rst:325 +#: library/readline.rst:326 msgid "" "This code is actually automatically run when Python is run in :ref:" "`interactive mode ` (see :ref:`rlcompleter-config`)." msgstr "" -#: library/readline.rst:328 +#: library/readline.rst:329 msgid "" "The following example achieves the same goal but supports concurrent " "interactive sessions, by only appending the new history. ::" msgstr "" -#: library/readline.rst:331 +#: library/readline.rst:332 msgid "" "import atexit\n" "import os\n" @@ -399,13 +399,13 @@ msgid "" "atexit.register(save, h_len, histfile)" msgstr "" -#: library/readline.rst:349 +#: library/readline.rst:350 msgid "" "The following example extends the :class:`code.InteractiveConsole` class to " "support history save/restore. ::" msgstr "" -#: library/readline.rst:352 +#: library/readline.rst:353 msgid "" "import atexit\n" "import code\n" @@ -431,3 +431,10 @@ msgid "" " readline.set_history_length(1000)\n" " readline.write_history_file(histfile)" msgstr "" + +#: library/readline.rst:379 +msgid "" +"The new :term:`REPL` introduced in version 3.13 doesn't support readline. " +"However, readline can still be used by setting the :envvar:" +"`PYTHON_BASIC_REPL` environment variable." +msgstr "" diff --git a/library/removed.po b/library/removed.po index 6b1e368c2..a65980d1c 100644 --- a/library/removed.po +++ b/library/removed.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/reprlib.po b/library/reprlib.po index 761730693..3264e052b 100644 --- a/library/reprlib.po +++ b/library/reprlib.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/resource.po b/library/resource.po index 98d19ab5b..0cd750a7c 100644 --- a/library/resource.po +++ b/library/resource.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,40 +21,40 @@ msgstr "" msgid ":mod:`!resource` --- Resource usage information" msgstr "" -#: library/resource.rst:13 +#: library/resource.rst:12 msgid "" "This module provides basic mechanisms for measuring and controlling system " "resources utilized by a program." msgstr "" -#: library/resource.rst:104 library/resource.rst:193 library/resource.rst:211 -#: library/resource.rst:230 library/resource.rst:255 library/resource.rst:273 +#: library/resource.rst:103 library/resource.rst:192 library/resource.rst:210 +#: library/resource.rst:229 library/resource.rst:254 library/resource.rst:272 msgid "Availability" msgstr "" -#: library/resource.rst:18 +#: library/resource.rst:17 msgid "" "Symbolic constants are used to specify particular system resources and to " "request usage information about either the current process or its children." msgstr "" -#: library/resource.rst:21 +#: library/resource.rst:20 msgid "An :exc:`OSError` is raised on syscall failure." msgstr "" -#: library/resource.rst:26 +#: library/resource.rst:25 msgid "A deprecated alias of :exc:`OSError`." msgstr "" -#: library/resource.rst:28 +#: library/resource.rst:27 msgid "Following :pep:`3151`, this class was made an alias of :exc:`OSError`." msgstr "" -#: library/resource.rst:33 +#: library/resource.rst:32 msgid "Resource Limits" msgstr "" -#: library/resource.rst:35 +#: library/resource.rst:34 msgid "" "Resources usage can be limited using the :func:`setrlimit` function " "described below. Each resource is controlled by a pair of limits: a soft " @@ -65,7 +65,7 @@ msgid "" "super-user can raise a hard limit.)" msgstr "" -#: library/resource.rst:43 +#: library/resource.rst:42 msgid "" "The specific resources that can be limited are system dependent. They are " "described in the :manpage:`getrlimit(2)` man page. The resources listed " @@ -74,18 +74,18 @@ msgid "" "not defined in this module for those platforms." msgstr "" -#: library/resource.rst:52 +#: library/resource.rst:51 msgid "Constant used to represent the limit for an unlimited resource." msgstr "" -#: library/resource.rst:57 +#: library/resource.rst:56 msgid "" "Returns a tuple ``(soft, hard)`` with the current soft and hard limits of " "*resource*. Raises :exc:`ValueError` if an invalid resource is specified, " "or :exc:`error` if the underlying system call fails unexpectedly." msgstr "" -#: library/resource.rst:64 +#: library/resource.rst:63 msgid "" "Sets new limits of consumption of *resource*. The *limits* argument must be " "a tuple ``(soft, hard)`` of two integers describing the new limits. A value " @@ -93,7 +93,7 @@ msgid "" "unlimited." msgstr "" -#: library/resource.rst:69 +#: library/resource.rst:68 msgid "" "Raises :exc:`ValueError` if an invalid resource is specified, if the new " "soft limit exceeds the hard limit, or if a process tries to raise its hard " @@ -104,23 +104,23 @@ msgid "" "be raised if the requested limit exceeds the system imposed limit." msgstr "" -#: library/resource.rst:78 +#: library/resource.rst:77 msgid "" "``setrlimit`` may also raise :exc:`error` if the underlying system call " "fails." msgstr "" -#: library/resource.rst:81 +#: library/resource.rst:80 msgid "VxWorks only supports setting :const:`RLIMIT_NOFILE`." msgstr "" -#: library/resource.rst:83 +#: library/resource.rst:82 msgid "" "Raises an :ref:`auditing event ` ``resource.setrlimit`` with " "arguments ``resource``, ``limits``." msgstr "" -#: library/resource.rst:88 +#: library/resource.rst:87 msgid "" "Combines :func:`setrlimit` and :func:`getrlimit` in one function and " "supports to get and set the resources limits of an arbitrary process. If " @@ -129,34 +129,34 @@ msgid "" "is optional." msgstr "" -#: library/resource.rst:94 +#: library/resource.rst:93 msgid "" "When *limits* is not given the function returns the *resource* limit of the " "process *pid*. When *limits* is given the *resource* limit of the process is " "set and the former resource limit is returned." msgstr "" -#: library/resource.rst:98 +#: library/resource.rst:97 msgid "" "Raises :exc:`ProcessLookupError` when *pid* can't be found and :exc:" "`PermissionError` when the user doesn't have ``CAP_SYS_RESOURCE`` for the " "process." msgstr "" -#: library/resource.rst:102 +#: library/resource.rst:101 msgid "" "Raises an :ref:`auditing event ` ``resource.prlimit`` with " "arguments ``pid``, ``resource``, ``limits``." msgstr "" -#: library/resource.rst:109 +#: library/resource.rst:108 msgid "" "These symbols define resources whose consumption can be controlled using " "the :func:`setrlimit` and :func:`getrlimit` functions described below. The " "values of these symbols are exactly the constants used by C programs." msgstr "" -#: library/resource.rst:113 +#: library/resource.rst:112 msgid "" "The Unix man page for :manpage:`getrlimit(2)` lists the available resources. " "Note that not all systems use the same symbol or same value to denote the " @@ -165,14 +165,14 @@ msgid "" "module on that platform." msgstr "" -#: library/resource.rst:122 +#: library/resource.rst:121 msgid "" "The maximum size (in bytes) of a core file that the current process can " "create. This may result in the creation of a partial core file if a larger " "core would be required to contain the entire process image." msgstr "" -#: library/resource.rst:129 +#: library/resource.rst:128 msgid "" "The maximum amount of processor time (in seconds) that a process can use. If " "this limit is exceeded, a :const:`~signal.SIGXCPU` signal is sent to the " @@ -181,83 +181,83 @@ msgid "" "disk.)" msgstr "" -#: library/resource.rst:137 +#: library/resource.rst:136 msgid "The maximum size of a file which the process may create." msgstr "" -#: library/resource.rst:142 +#: library/resource.rst:141 msgid "The maximum size (in bytes) of the process's heap." msgstr "" -#: library/resource.rst:147 +#: library/resource.rst:146 msgid "" "The maximum size (in bytes) of the call stack for the current process. This " "only affects the stack of the main thread in a multi-threaded process." msgstr "" -#: library/resource.rst:153 +#: library/resource.rst:152 msgid "" "The maximum resident set size that should be made available to the process." msgstr "" -#: library/resource.rst:158 +#: library/resource.rst:157 msgid "The maximum number of processes the current process may create." msgstr "" -#: library/resource.rst:163 +#: library/resource.rst:162 msgid "The maximum number of open file descriptors for the current process." msgstr "" -#: library/resource.rst:168 +#: library/resource.rst:167 msgid "The BSD name for :const:`RLIMIT_NOFILE`." msgstr "" -#: library/resource.rst:173 +#: library/resource.rst:172 msgid "The maximum address space which may be locked in memory." msgstr "" -#: library/resource.rst:178 +#: library/resource.rst:177 msgid "" "The largest area of mapped memory which the process may occupy. Usually an " "alias of :const:`RLIMIT_AS`." msgstr "" -#: library/resource.rst:186 +#: library/resource.rst:185 msgid "" "The maximum area (in bytes) of address space which may be taken by the " "process." msgstr "" -#: library/resource.rst:191 +#: library/resource.rst:190 msgid "The number of bytes that can be allocated for POSIX message queues." msgstr "" -#: library/resource.rst:200 +#: library/resource.rst:199 msgid "The ceiling for the process's nice level (calculated as 20 - rlim_cur)." msgstr "" -#: library/resource.rst:209 +#: library/resource.rst:208 msgid "The ceiling of the real-time priority." msgstr "" -#: library/resource.rst:218 +#: library/resource.rst:217 msgid "" "The time limit (in microseconds) on CPU time that a process can spend under " "real-time scheduling without making a blocking syscall." msgstr "" -#: library/resource.rst:228 +#: library/resource.rst:227 msgid "The number of signals which the process may queue." msgstr "" -#: library/resource.rst:237 +#: library/resource.rst:236 msgid "" "The maximum size (in bytes) of socket buffer usage for this user. This " "limits the amount of network memory, and hence the amount of mbufs, that " "this user may hold at any time." msgstr "" -#: library/resource.rst:248 +#: library/resource.rst:247 msgid "" "The maximum size (in bytes) of the swap space that may be reserved or used " "by all of this user id's processes. This limit is enforced only if bit 1 of " @@ -266,23 +266,23 @@ msgid "" "this sysctl." msgstr "" -#: library/resource.rst:262 +#: library/resource.rst:261 msgid "The maximum number of pseudo-terminals created by this user id." msgstr "" -#: library/resource.rst:271 +#: library/resource.rst:270 msgid "The maximum number of kqueues this user id is allowed to create." msgstr "" -#: library/resource.rst:279 +#: library/resource.rst:278 msgid "Resource Usage" msgstr "" -#: library/resource.rst:281 +#: library/resource.rst:280 msgid "These functions are used to retrieve resource usage information:" msgstr "" -#: library/resource.rst:286 +#: library/resource.rst:285 msgid "" "This function returns an object that describes the resources consumed by " "either the current process or its children, as specified by the *who* " @@ -290,11 +290,11 @@ msgid "" "`!RUSAGE_\\*` constants described below." msgstr "" -#: library/resource.rst:291 +#: library/resource.rst:290 msgid "A simple example::" msgstr "" -#: library/resource.rst:293 +#: library/resource.rst:292 msgid "" "from resource import *\n" "import time\n" @@ -309,22 +309,22 @@ msgid "" "print(getrusage(RUSAGE_SELF))" msgstr "" -#: library/resource.rst:305 +#: library/resource.rst:304 msgid "" "The fields of the return value each describe how a particular system " -"resource has been used, e.g. amount of time spent running is user mode or " +"resource has been used, e.g. amount of time spent running in user mode or " "number of times the process was swapped out of main memory. Some values are " -"dependent on the clock tick internal, e.g. the amount of memory the process " +"dependent on the clock tick interval, e.g. the amount of memory the process " "is using." msgstr "" -#: library/resource.rst:310 +#: library/resource.rst:309 msgid "" "For backward compatibility, the return value is also accessible as a tuple " "of 16 elements." msgstr "" -#: library/resource.rst:313 +#: library/resource.rst:312 msgid "" "The fields :attr:`!ru_utime` and :attr:`!ru_stime` of the return value are " "floating-point values representing the amount of time spent executing in " @@ -334,249 +334,249 @@ msgid "" "summary is presented here:" msgstr "" -#: library/resource.rst:320 +#: library/resource.rst:319 msgid "Index" msgstr "" -#: library/resource.rst:320 +#: library/resource.rst:319 msgid "Field" msgstr "" -#: library/resource.rst:320 +#: library/resource.rst:319 msgid "Resource" msgstr "" -#: library/resource.rst:322 +#: library/resource.rst:321 msgid "``0``" msgstr "" -#: library/resource.rst:322 +#: library/resource.rst:321 msgid ":attr:`!ru_utime`" msgstr "" -#: library/resource.rst:322 +#: library/resource.rst:321 msgid "time in user mode (float seconds)" msgstr "" -#: library/resource.rst:324 +#: library/resource.rst:323 msgid "``1``" msgstr "" -#: library/resource.rst:324 +#: library/resource.rst:323 msgid ":attr:`!ru_stime`" msgstr "" -#: library/resource.rst:324 +#: library/resource.rst:323 msgid "time in system mode (float seconds)" msgstr "" -#: library/resource.rst:326 +#: library/resource.rst:325 msgid "``2``" msgstr "" -#: library/resource.rst:326 +#: library/resource.rst:325 msgid ":attr:`!ru_maxrss`" msgstr "" -#: library/resource.rst:326 +#: library/resource.rst:325 msgid "maximum resident set size" msgstr "" -#: library/resource.rst:328 +#: library/resource.rst:327 msgid "``3``" msgstr "" -#: library/resource.rst:328 +#: library/resource.rst:327 msgid ":attr:`!ru_ixrss`" msgstr "" -#: library/resource.rst:328 +#: library/resource.rst:327 msgid "shared memory size" msgstr "" -#: library/resource.rst:330 +#: library/resource.rst:329 msgid "``4``" msgstr "" -#: library/resource.rst:330 +#: library/resource.rst:329 msgid ":attr:`!ru_idrss`" msgstr "" -#: library/resource.rst:330 +#: library/resource.rst:329 msgid "unshared memory size" msgstr "" -#: library/resource.rst:332 +#: library/resource.rst:331 msgid "``5``" msgstr "" -#: library/resource.rst:332 +#: library/resource.rst:331 msgid ":attr:`!ru_isrss`" msgstr "" -#: library/resource.rst:332 +#: library/resource.rst:331 msgid "unshared stack size" msgstr "" -#: library/resource.rst:334 +#: library/resource.rst:333 msgid "``6``" msgstr "" -#: library/resource.rst:334 +#: library/resource.rst:333 msgid ":attr:`!ru_minflt`" msgstr "" -#: library/resource.rst:334 +#: library/resource.rst:333 msgid "page faults not requiring I/O" msgstr "" -#: library/resource.rst:336 +#: library/resource.rst:335 msgid "``7``" msgstr "" -#: library/resource.rst:336 +#: library/resource.rst:335 msgid ":attr:`!ru_majflt`" msgstr "" -#: library/resource.rst:336 +#: library/resource.rst:335 msgid "page faults requiring I/O" msgstr "" -#: library/resource.rst:338 +#: library/resource.rst:337 msgid "``8``" msgstr "" -#: library/resource.rst:338 +#: library/resource.rst:337 msgid ":attr:`!ru_nswap`" msgstr "" -#: library/resource.rst:338 +#: library/resource.rst:337 msgid "number of swap outs" msgstr "" -#: library/resource.rst:340 +#: library/resource.rst:339 msgid "``9``" msgstr "" -#: library/resource.rst:340 +#: library/resource.rst:339 msgid ":attr:`!ru_inblock`" msgstr "" -#: library/resource.rst:340 +#: library/resource.rst:339 msgid "block input operations" msgstr "" -#: library/resource.rst:342 +#: library/resource.rst:341 msgid "``10``" msgstr "" -#: library/resource.rst:342 +#: library/resource.rst:341 msgid ":attr:`!ru_oublock`" msgstr "" -#: library/resource.rst:342 +#: library/resource.rst:341 msgid "block output operations" msgstr "" -#: library/resource.rst:344 +#: library/resource.rst:343 msgid "``11``" msgstr "" -#: library/resource.rst:344 +#: library/resource.rst:343 msgid ":attr:`!ru_msgsnd`" msgstr "" -#: library/resource.rst:344 +#: library/resource.rst:343 msgid "messages sent" msgstr "" -#: library/resource.rst:346 +#: library/resource.rst:345 msgid "``12``" msgstr "" -#: library/resource.rst:346 +#: library/resource.rst:345 msgid ":attr:`!ru_msgrcv`" msgstr "" -#: library/resource.rst:346 +#: library/resource.rst:345 msgid "messages received" msgstr "" -#: library/resource.rst:348 +#: library/resource.rst:347 msgid "``13``" msgstr "" -#: library/resource.rst:348 +#: library/resource.rst:347 msgid ":attr:`!ru_nsignals`" msgstr "" -#: library/resource.rst:348 +#: library/resource.rst:347 msgid "signals received" msgstr "" -#: library/resource.rst:350 +#: library/resource.rst:349 msgid "``14``" msgstr "" -#: library/resource.rst:350 +#: library/resource.rst:349 msgid ":attr:`!ru_nvcsw`" msgstr "" -#: library/resource.rst:350 +#: library/resource.rst:349 msgid "voluntary context switches" msgstr "" -#: library/resource.rst:352 +#: library/resource.rst:351 msgid "``15``" msgstr "" -#: library/resource.rst:352 +#: library/resource.rst:351 msgid ":attr:`!ru_nivcsw`" msgstr "" -#: library/resource.rst:352 +#: library/resource.rst:351 msgid "involuntary context switches" msgstr "" -#: library/resource.rst:355 +#: library/resource.rst:354 msgid "" "This function will raise a :exc:`ValueError` if an invalid *who* parameter " "is specified. It may also raise :exc:`error` exception in unusual " "circumstances." msgstr "" -#: library/resource.rst:361 +#: library/resource.rst:360 msgid "" "Returns the number of bytes in a system page. (This need not be the same as " "the hardware page size.)" msgstr "" -#: library/resource.rst:364 +#: library/resource.rst:363 msgid "" "The following :const:`!RUSAGE_\\*` symbols are passed to the :func:" "`getrusage` function to specify which processes information should be " "provided for." msgstr "" -#: library/resource.rst:370 +#: library/resource.rst:369 msgid "" "Pass to :func:`getrusage` to request resources consumed by the calling " "process, which is the sum of resources used by all threads in the process." msgstr "" -#: library/resource.rst:376 +#: library/resource.rst:375 msgid "" "Pass to :func:`getrusage` to request resources consumed by child processes " "of the calling process which have been terminated and waited for." msgstr "" -#: library/resource.rst:382 +#: library/resource.rst:381 msgid "" "Pass to :func:`getrusage` to request resources consumed by both the current " "process and child processes. May not be available on all systems." msgstr "" -#: library/resource.rst:388 +#: library/resource.rst:387 msgid "" "Pass to :func:`getrusage` to request resources consumed by the current " "thread. May not be available on all systems." diff --git a/library/rlcompleter.po b/library/rlcompleter.po index 0365b46a1..8298e2037 100644 --- a/library/rlcompleter.po +++ b/library/rlcompleter.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/runpy.po b/library/runpy.po index 3a7c24c46..4dc321c96 100644 --- a/library/runpy.po +++ b/library/runpy.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/sched.po b/library/sched.po index fca35b8e4..3252b865c 100644 --- a/library/sched.po +++ b/library/sched.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -150,12 +150,14 @@ msgstr "" #: library/sched.rst:122 msgid "" -"If *blocking* is false executes the scheduled events due to expire soonest " -"(if any) and then return the deadline of the next scheduled call in the " -"scheduler (if any)." +"If *blocking* is false, immediately executes all events in the queue which " +"have a time value less than or equal to the current *timefunc* value (if " +"any) and returns the difference between the current *timefunc* value and the " +"time value of the next scheduled event in the scheduler's event queue. If " +"the queue is empty, returns ``None``." msgstr "" -#: library/sched.rst:126 +#: library/sched.rst:128 msgid "" "Either *action* or *delayfunc* can raise an exception. In either case, the " "scheduler will maintain a consistent state and propagate the exception. If " @@ -163,7 +165,7 @@ msgid "" "future calls to :meth:`run`." msgstr "" -#: library/sched.rst:131 +#: library/sched.rst:133 msgid "" "If a sequence of events takes longer to run than the time available before " "the next event, the scheduler will simply fall behind. No events will be " @@ -171,11 +173,11 @@ msgid "" "longer pertinent." msgstr "" -#: library/sched.rst:136 +#: library/sched.rst:138 msgid "*blocking* parameter was added." msgstr "" -#: library/sched.rst:141 +#: library/sched.rst:143 msgid "" "Read-only attribute returning a list of upcoming events in the order they " "will be run. Each event is shown as a :term:`named tuple` with the " diff --git a/library/secrets.po b/library/secrets.po index 8e9d68d7e..9f220359e 100644 --- a/library/secrets.po +++ b/library/secrets.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -84,49 +84,51 @@ msgid "" msgstr "" #: library/secrets.rst:67 +msgid "Return a random byte string containing *nbytes* number of bytes." +msgstr "" + +#: library/secrets.rst:83 library/secrets.rst:97 msgid "" -"Return a random byte string containing *nbytes* number of bytes. If *nbytes* " -"is ``None`` or not supplied, a reasonable default is used." +"If *nbytes* is not specified or ``None``, :const:`DEFAULT_ENTROPY` is used " +"instead." msgstr "" -#: library/secrets.rst:71 +#: library/secrets.rst:72 msgid "" ">>> token_bytes(16)\n" "b'\\xebr\\x17D*t\\xae\\xd4\\xe3S\\xb6\\xe2\\xebP1\\x8b'" msgstr "" -#: library/secrets.rst:79 +#: library/secrets.rst:80 msgid "" "Return a random text string, in hexadecimal. The string has *nbytes* random " -"bytes, each byte converted to two hex digits. If *nbytes* is ``None`` or " -"not supplied, a reasonable default is used." +"bytes, each byte converted to two hex digits." msgstr "" -#: library/secrets.rst:83 +#: library/secrets.rst:86 msgid "" ">>> token_hex(16)\n" "'f9bf78b9a18ce6d46a0cd2b0b86df9da'" msgstr "" -#: library/secrets.rst:90 +#: library/secrets.rst:93 msgid "" "Return a random URL-safe text string, containing *nbytes* random bytes. The " "text is Base64 encoded, so on average each byte results in approximately 1.3 " -"characters. If *nbytes* is ``None`` or not supplied, a reasonable default " -"is used." +"characters." msgstr "" -#: library/secrets.rst:95 +#: library/secrets.rst:100 msgid "" ">>> token_urlsafe(16)\n" "'Drmhze6EPcv0fN_81Bj-nA'" msgstr "" -#: library/secrets.rst:102 +#: library/secrets.rst:107 msgid "How many bytes should tokens use?" msgstr "" -#: library/secrets.rst:104 +#: library/secrets.rst:109 msgid "" "To be secure against `brute-force attacks `_, tokens need to have sufficient randomness. " @@ -137,7 +139,7 @@ msgid "" "module." msgstr "" -#: library/secrets.rst:112 +#: library/secrets.rst:117 msgid "" "For those who want to manage their own token length, you can explicitly " "specify how much randomness is used for tokens by giving an :class:`int` " @@ -145,23 +147,28 @@ msgid "" "the number of bytes of randomness to use." msgstr "" -#: library/secrets.rst:117 +#: library/secrets.rst:122 msgid "" "Otherwise, if no argument is provided, or if the argument is ``None``, the " -"``token_*`` functions will use a reasonable default instead." +"``token_*`` functions use :const:`DEFAULT_ENTROPY` instead." msgstr "" -#: library/secrets.rst:122 +#: library/secrets.rst:127 msgid "" -"That default is subject to change at any time, including during maintenance " -"releases." +"Default number of bytes of randomness used by the ``token_*`` functions." msgstr "" -#: library/secrets.rst:127 +#: library/secrets.rst:129 +msgid "" +"The exact value is subject to change at any time, including during " +"maintenance releases." +msgstr "" + +#: library/secrets.rst:134 msgid "Other functions" msgstr "" -#: library/secrets.rst:131 +#: library/secrets.rst:138 msgid "" "Return ``True`` if strings or :term:`bytes-like objects ` " "*a* and *b* are equal, otherwise ``False``, using a \"constant-time " @@ -170,21 +177,21 @@ msgid "" "details." msgstr "" -#: library/secrets.rst:140 +#: library/secrets.rst:147 msgid "Recipes and best practices" msgstr "" -#: library/secrets.rst:142 +#: library/secrets.rst:149 msgid "" "This section shows recipes and best practices for using :mod:`secrets` to " "manage a basic level of security." msgstr "" -#: library/secrets.rst:145 +#: library/secrets.rst:152 msgid "Generate an eight-character alphanumeric password:" msgstr "" -#: library/secrets.rst:147 +#: library/secrets.rst:154 msgid "" "import string\n" "import secrets\n" @@ -192,20 +199,20 @@ msgid "" "password = ''.join(secrets.choice(alphabet) for i in range(8))" msgstr "" -#: library/secrets.rst:157 +#: library/secrets.rst:164 msgid "" "Applications should not :cwe:`store passwords in a recoverable format " "<257>`, whether plain text or encrypted. They should be salted and hashed " "using a cryptographically strong one-way (irreversible) hash function." msgstr "" -#: library/secrets.rst:163 +#: library/secrets.rst:170 msgid "" "Generate a ten-character alphanumeric password with at least one lowercase " "character, at least one uppercase character, and at least three digits:" msgstr "" -#: library/secrets.rst:167 +#: library/secrets.rst:174 msgid "" "import string\n" "import secrets\n" @@ -218,11 +225,11 @@ msgid "" " break" msgstr "" -#: library/secrets.rst:180 +#: library/secrets.rst:187 msgid "Generate an `XKCD-style passphrase `_:" msgstr "" -#: library/secrets.rst:182 +#: library/secrets.rst:189 msgid "" "import secrets\n" "# On standard Linux systems, use a convenient dictionary file.\n" @@ -232,13 +239,13 @@ msgid "" " password = ' '.join(secrets.choice(words) for i in range(4))" msgstr "" -#: library/secrets.rst:192 +#: library/secrets.rst:199 msgid "" "Generate a hard-to-guess temporary URL containing a security token suitable " "for password recovery applications:" msgstr "" -#: library/secrets.rst:195 +#: library/secrets.rst:202 msgid "" "import secrets\n" "url = 'https://example.com/reset=' + secrets.token_urlsafe()" diff --git a/library/security_warnings.po b/library/security_warnings.po index 7a1b1b87a..f79055fe5 100644 --- a/library/security_warnings.po +++ b/library/security_warnings.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/select.po b/library/select.po index f3599ef86..5e35d8ce7 100644 --- a/library/select.po +++ b/library/select.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -40,6 +40,7 @@ msgid "" "precise control over the OS-level primitives used." msgstr "" +#: library/select.rst:94 library/select.rst:117 library/select.rst:188 #: includes/wasm-notavail.rst:3 msgid "Availability" msgstr "" @@ -64,9 +65,8 @@ msgstr "" #: library/select.rst:40 msgid "" -"(Only supported on Solaris and derivatives.) Returns a ``/dev/poll`` " -"polling object; see section :ref:`devpoll-objects` below for the methods " -"supported by devpoll objects." +"Returns a ``/dev/poll`` polling object; see section :ref:`devpoll-objects` " +"below for the methods supported by devpoll objects." msgstr "" #: library/select.rst:44 @@ -77,21 +77,21 @@ msgid "" "devpoll` may return an incomplete list of active file descriptors." msgstr "" -#: library/select.rst:79 library/select.rst:106 +#: library/select.rst:81 library/select.rst:112 msgid "The new file descriptor is :ref:`non-inheritable `." msgstr "" -#: library/select.rst:108 +#: library/select.rst:114 msgid "The new file descriptor is now non-inheritable." msgstr "" -#: library/select.rst:59 +#: library/select.rst:61 msgid "" -"(Only supported on Linux 2.5.44 and newer.) Return an edge polling object, " -"which can be used as Edge or Level Triggered interface for I/O events." +"Return an edge polling object, which can be used as Edge or Level Triggered " +"interface for I/O events." msgstr "" -#: library/select.rst:63 +#: library/select.rst:65 msgid "" "*sizehint* informs epoll about the expected number of events to be " "registered. It must be positive, or ``-1`` to use the default. It is only " @@ -99,63 +99,62 @@ msgid "" "otherwise it has no effect (though its value is still checked)." msgstr "" -#: library/select.rst:68 +#: library/select.rst:70 msgid "" "*flags* is deprecated and completely ignored. However, when supplied, its " "value must be ``0`` or ``select.EPOLL_CLOEXEC``, otherwise ``OSError`` is " "raised." msgstr "" -#: library/select.rst:72 +#: library/select.rst:74 msgid "" "See the :ref:`epoll-objects` section below for the methods supported by " "epolling objects." msgstr "" -#: library/select.rst:75 +#: library/select.rst:77 msgid "" "``epoll`` objects support the context management protocol: when used in a :" "keyword:`with` statement, the new file descriptor is automatically closed at " "the end of the block." msgstr "" -#: library/select.rst:81 +#: library/select.rst:83 msgid "Added the *flags* parameter." msgstr "" -#: library/select.rst:84 +#: library/select.rst:86 msgid "" "Support for the :keyword:`with` statement was added. The new file descriptor " "is now non-inheritable." msgstr "" -#: library/select.rst:88 +#: library/select.rst:90 msgid "" "The *flags* parameter. ``select.EPOLL_CLOEXEC`` is used by default now. " "Use :func:`os.set_inheritable` to make the file descriptor inheritable." msgstr "" -#: library/select.rst:95 +#: library/select.rst:99 msgid "" -"(Not supported by all operating systems.) Returns a polling object, which " -"supports registering and unregistering file descriptors, and then polling " -"them for I/O events; see section :ref:`poll-objects` below for the methods " -"supported by polling objects." +"Returns a polling object, which supports registering and unregistering file " +"descriptors, and then polling them for I/O events; see section :ref:`poll-" +"objects` below for the methods supported by polling objects." msgstr "" -#: library/select.rst:103 +#: library/select.rst:109 msgid "" -"(Only supported on BSD.) Returns a kernel queue object; see section :ref:" -"`kqueue-objects` below for the methods supported by kqueue objects." +"Returns a kernel queue object; see section :ref:`kqueue-objects` below for " +"the methods supported by kqueue objects." msgstr "" -#: library/select.rst:114 +#: library/select.rst:122 msgid "" -"(Only supported on BSD.) Returns a kernel event object; see section :ref:" -"`kevent-objects` below for the methods supported by kevent objects." +"Returns a kernel event object; see section :ref:`kevent-objects` below for " +"the methods supported by kevent objects." msgstr "" -#: library/select.rst:120 +#: library/select.rst:130 msgid "" "This is a straightforward interface to the Unix :c:func:`!select` system " "call. The first three arguments are iterables of 'waitable objects': either " @@ -163,38 +162,38 @@ msgid "" "method named :meth:`~io.IOBase.fileno` returning such an integer:" msgstr "" -#: library/select.rst:125 +#: library/select.rst:135 msgid "*rlist*: wait until ready for reading" msgstr "" -#: library/select.rst:126 +#: library/select.rst:136 msgid "*wlist*: wait until ready for writing" msgstr "" -#: library/select.rst:127 +#: library/select.rst:137 msgid "" "*xlist*: wait for an \"exceptional condition\" (see the manual page for what " "your system considers such a condition)" msgstr "" -#: library/select.rst:130 +#: library/select.rst:140 msgid "" "Empty iterables are allowed, but acceptance of three empty iterables is " "platform-dependent. (It is known to work on Unix but not on Windows.) The " "optional *timeout* argument specifies a time-out as a floating-point number " -"in seconds. When the *timeout* argument is omitted the function blocks " -"until at least one file descriptor is ready. A time-out value of zero " -"specifies a poll and never blocks." +"in seconds. When the *timeout* argument is omitted or ``None``, the function " +"blocks until at least one file descriptor is ready. A time-out value of " +"zero specifies a poll and never blocks." msgstr "" -#: library/select.rst:137 +#: library/select.rst:148 msgid "" "The return value is a triple of lists of objects that are ready: subsets of " "the first three arguments. When the time-out is reached without a file " "descriptor becoming ready, three empty lists are returned." msgstr "" -#: library/select.rst:145 +#: library/select.rst:156 msgid "" "Among the acceptable object types in the iterables are Python :term:`file " "objects ` (e.g. ``sys.stdin``, or objects returned by :func:" @@ -204,7 +203,7 @@ msgid "" "file descriptor, not just a random integer)." msgstr "" -#: library/select.rst:156 +#: library/select.rst:167 msgid "" "File objects on Windows are not acceptable, but sockets are. On Windows, " "the underlying :c:func:`!select` function is provided by the WinSock " @@ -212,54 +211,54 @@ msgid "" "WinSock." msgstr "" -#: library/select.rst:267 library/select.rst:455 library/select.rst:496 +#: library/select.rst:278 library/select.rst:466 library/select.rst:507 msgid "" "The function is now retried with a recomputed timeout when interrupted by a " "signal, except if the signal handler raises an exception (see :pep:`475` for " "the rationale), instead of raising :exc:`InterruptedError`." msgstr "" -#: library/select.rst:170 +#: library/select.rst:181 msgid "" "The minimum number of bytes which can be written without blocking to a pipe " "when the pipe has been reported as ready for writing by :func:`~select." "select`, :func:`!poll` or another interface in this module. This doesn't " -"apply to other kind of file-like objects such as sockets." +"apply to other kinds of file-like objects such as sockets." msgstr "" -#: library/select.rst:175 +#: library/select.rst:186 msgid "This value is guaranteed by POSIX to be at least 512." msgstr "" -#: library/select.rst:185 -msgid "``/dev/poll`` Polling Objects" +#: library/select.rst:196 +msgid "``/dev/poll`` polling objects" msgstr "" -#: library/select.rst:187 +#: library/select.rst:198 msgid "" "Solaris and derivatives have ``/dev/poll``. While :c:func:`!select` is *O*\\ " "(*highest file descriptor*) and :c:func:`!poll` is *O*\\ (*number of file " "descriptors*), ``/dev/poll`` is *O*\\ (*active file descriptors*)." msgstr "" -#: library/select.rst:191 +#: library/select.rst:202 msgid "" "``/dev/poll`` behaviour is very close to the standard :c:func:`!poll` object." msgstr "" -#: library/select.rst:197 +#: library/select.rst:208 msgid "Close the file descriptor of the polling object." msgstr "" -#: library/select.rst:204 +#: library/select.rst:215 msgid "``True`` if the polling object is closed." msgstr "" -#: library/select.rst:211 +#: library/select.rst:222 msgid "Return the file descriptor number of the polling object." msgstr "" -#: library/select.rst:390 +#: library/select.rst:401 msgid "" "Register a file descriptor with the polling object. Future calls to the :" "meth:`poll` method will then check whether the file descriptor has any " @@ -268,41 +267,41 @@ msgid "" "implement :meth:`!fileno`, so they can also be used as the argument." msgstr "" -#: library/select.rst:224 +#: library/select.rst:235 msgid "" "*eventmask* is an optional bitmask describing the type of events you want to " -"check for. The constants are the same that with :c:func:`!poll` object. The " +"check for. The constants are the same as with :c:func:`!poll` object. The " "default value is a combination of the constants :const:`POLLIN`, :const:" "`POLLPRI`, and :const:`POLLOUT`." msgstr "" -#: library/select.rst:231 +#: library/select.rst:242 msgid "" "Registering a file descriptor that's already registered is not an error, but " "the result is undefined. The appropriate action is to unregister or modify " "it first. This is an important difference compared with :c:func:`!poll`." msgstr "" -#: library/select.rst:239 +#: library/select.rst:250 msgid "" "This method does an :meth:`unregister` followed by a :meth:`register`. It is " -"(a bit) more efficient that doing the same explicitly." +"(a bit) more efficient than doing the same explicitly." msgstr "" -#: library/select.rst:434 +#: library/select.rst:445 msgid "" "Remove a file descriptor being tracked by a polling object. Just like the :" "meth:`register` method, *fd* can be an integer or an object with a :meth:" "`~io.IOBase.fileno` method that returns an integer." msgstr "" -#: library/select.rst:250 +#: library/select.rst:261 msgid "" "Attempting to remove a file descriptor that was never registered is safely " "ignored." msgstr "" -#: library/select.rst:256 +#: library/select.rst:267 msgid "" "Polls the set of registered file descriptors, and returns a possibly empty " "list containing ``(fd, event)`` 2-tuples for the descriptors that have " @@ -316,192 +315,192 @@ msgid "" "the call will block until there is an event for this poll object." msgstr "" -#: library/select.rst:277 -msgid "Edge and Level Trigger Polling (epoll) Objects" +#: library/select.rst:288 +msgid "Edge and level trigger polling (epoll) objects" msgstr "" -#: library/select.rst:279 +#: library/select.rst:290 msgid "https://linux.die.net/man/4/epoll" msgstr "" -#: library/select.rst:281 -msgid "*eventmask*" +#: library/select.rst:292 +msgid "The *eventmask* is a bit mask using the following constants:" msgstr "" -#: library/select.rst:402 library/select.rst:551 library/select.rst:590 -#: library/select.rst:633 +#: library/select.rst:413 library/select.rst:562 library/select.rst:601 +#: library/select.rst:644 msgid "Constant" msgstr "" -#: library/select.rst:402 library/select.rst:551 library/select.rst:590 -#: library/select.rst:633 +#: library/select.rst:413 library/select.rst:562 library/select.rst:601 +#: library/select.rst:644 msgid "Meaning" msgstr "" -#: library/select.rst:286 +#: library/select.rst:297 msgid ":const:`EPOLLIN`" msgstr "" -#: library/select.rst:286 -msgid "Available for read" +#: library/select.rst:297 +msgid "Available for read." msgstr "" -#: library/select.rst:288 +#: library/select.rst:299 msgid ":const:`EPOLLOUT`" msgstr "" -#: library/select.rst:288 -msgid "Available for write" +#: library/select.rst:299 +msgid "Available for write." msgstr "" -#: library/select.rst:290 +#: library/select.rst:301 msgid ":const:`EPOLLPRI`" msgstr "" -#: library/select.rst:290 -msgid "Urgent data for read" +#: library/select.rst:301 +msgid "Urgent data for read." msgstr "" -#: library/select.rst:292 +#: library/select.rst:303 msgid ":const:`EPOLLERR`" msgstr "" -#: library/select.rst:292 -msgid "Error condition happened on the assoc. fd" +#: library/select.rst:303 +msgid "Error condition happened on the associated fd." msgstr "" -#: library/select.rst:294 +#: library/select.rst:305 msgid ":const:`EPOLLHUP`" msgstr "" -#: library/select.rst:294 -msgid "Hang up happened on the assoc. fd" +#: library/select.rst:305 +msgid "Hang up happened on the associated fd." msgstr "" -#: library/select.rst:296 +#: library/select.rst:307 msgid ":const:`EPOLLET`" msgstr "" -#: library/select.rst:296 -msgid "Set Edge Trigger behavior, the default is Level Trigger behavior" +#: library/select.rst:307 +msgid "Set Edge Trigger behavior, the default is Level Trigger behavior." msgstr "" -#: library/select.rst:299 +#: library/select.rst:310 msgid ":const:`EPOLLONESHOT`" msgstr "" -#: library/select.rst:299 +#: library/select.rst:310 msgid "" "Set one-shot behavior. After one event is pulled out, the fd is internally " -"disabled" +"disabled." msgstr "" -#: library/select.rst:302 +#: library/select.rst:313 msgid ":const:`EPOLLEXCLUSIVE`" msgstr "" -#: library/select.rst:302 +#: library/select.rst:313 msgid "" "Wake only one epoll object when the associated fd has an event. The default " -"(if this flag is not set) is to wake all epoll objects polling on a fd." +"(if this flag is not set) is to wake all epoll objects polling on an fd." msgstr "" -#: library/select.rst:307 +#: library/select.rst:318 msgid ":const:`EPOLLRDHUP`" msgstr "" -#: library/select.rst:307 +#: library/select.rst:318 msgid "" "Stream socket peer closed connection or shut down writing half of connection." msgstr "" -#: library/select.rst:310 +#: library/select.rst:321 msgid ":const:`EPOLLRDNORM`" msgstr "" -#: library/select.rst:310 +#: library/select.rst:321 msgid "Equivalent to :const:`EPOLLIN`" msgstr "" -#: library/select.rst:312 +#: library/select.rst:323 msgid ":const:`EPOLLRDBAND`" msgstr "" -#: library/select.rst:312 +#: library/select.rst:323 msgid "Priority data band can be read." msgstr "" -#: library/select.rst:314 +#: library/select.rst:325 msgid ":const:`EPOLLWRNORM`" msgstr "" -#: library/select.rst:314 -msgid "Equivalent to :const:`EPOLLOUT`" +#: library/select.rst:325 +msgid "Equivalent to :const:`EPOLLOUT`." msgstr "" -#: library/select.rst:316 +#: library/select.rst:327 msgid ":const:`EPOLLWRBAND`" msgstr "" -#: library/select.rst:316 +#: library/select.rst:327 msgid "Priority data may be written." msgstr "" -#: library/select.rst:318 +#: library/select.rst:329 msgid ":const:`EPOLLMSG`" msgstr "" -#: library/select.rst:318 +#: library/select.rst:329 msgid "Ignored." msgstr "" -#: library/select.rst:321 +#: library/select.rst:332 msgid "" ":const:`EPOLLEXCLUSIVE` was added. It's only supported by Linux Kernel 4.5 " "or later." msgstr "" -#: library/select.rst:327 +#: library/select.rst:338 msgid "Close the control file descriptor of the epoll object." msgstr "" -#: library/select.rst:332 +#: library/select.rst:343 msgid "``True`` if the epoll object is closed." msgstr "" -#: library/select.rst:479 +#: library/select.rst:490 msgid "Return the file descriptor number of the control fd." msgstr "" -#: library/select.rst:342 +#: library/select.rst:353 msgid "Create an epoll object from a given file descriptor." msgstr "" -#: library/select.rst:347 -msgid "Register a fd descriptor with the epoll object." +#: library/select.rst:358 +msgid "Register a file descriptor *fd* with the epoll object." msgstr "" -#: library/select.rst:352 -msgid "Modify a registered file descriptor." +#: library/select.rst:363 +msgid "Modify a registered file descriptor *fd*." msgstr "" -#: library/select.rst:357 +#: library/select.rst:368 msgid "Remove a registered file descriptor from the epoll object." msgstr "" -#: library/select.rst:359 +#: library/select.rst:370 msgid "The method no longer ignores the :data:`~errno.EBADF` error." msgstr "" -#: library/select.rst:365 +#: library/select.rst:376 msgid "Wait for events. timeout in seconds (float)" msgstr "" -#: library/select.rst:377 -msgid "Polling Objects" +#: library/select.rst:388 +msgid "Polling objects" msgstr "" -#: library/select.rst:379 +#: library/select.rst:390 msgid "" "The :c:func:`!poll` system call, supported on most Unix systems, provides " "better scalability for network servers that service many, many clients at " @@ -513,7 +512,7 @@ msgid "" "of file descriptors*)." msgstr "" -#: library/select.rst:396 +#: library/select.rst:407 msgid "" "*eventmask* is an optional bitmask describing the type of events you want to " "check for, and can be a combination of the constants :const:`POLLIN`, :const:" @@ -521,70 +520,71 @@ msgid "" "specified, the default value used will check for all 3 types of events." msgstr "" -#: library/select.rst:404 +#: library/select.rst:415 msgid ":const:`POLLIN`" msgstr "" -#: library/select.rst:404 -msgid "There is data to read" +#: library/select.rst:415 +msgid "There is data to read." msgstr "" -#: library/select.rst:406 +#: library/select.rst:417 msgid ":const:`POLLPRI`" msgstr "" -#: library/select.rst:406 -msgid "There is urgent data to read" +#: library/select.rst:417 +msgid "There is urgent data to read." msgstr "" -#: library/select.rst:408 +#: library/select.rst:419 msgid ":const:`POLLOUT`" msgstr "" -#: library/select.rst:408 -msgid "Ready for output: writing will not block" +#: library/select.rst:419 +msgid "Ready for output: writing will not block." msgstr "" -#: library/select.rst:410 +#: library/select.rst:421 msgid ":const:`POLLERR`" msgstr "" -#: library/select.rst:410 -msgid "Error condition of some sort" +#: library/select.rst:421 +msgid "Error condition of some sort." msgstr "" -#: library/select.rst:412 +#: library/select.rst:423 msgid ":const:`POLLHUP`" msgstr "" -#: library/select.rst:412 -msgid "Hung up" +#: library/select.rst:423 +msgid "Hung up." msgstr "" -#: library/select.rst:414 +#: library/select.rst:425 msgid ":const:`POLLRDHUP`" msgstr "" -#: library/select.rst:414 +#: library/select.rst:425 msgid "" -"Stream socket peer closed connection, or shut down writing half of connection" +"Stream socket peer closed connection, or shut down writing half of " +"connection." msgstr "" -#: library/select.rst:417 +#: library/select.rst:428 msgid ":const:`POLLNVAL`" msgstr "" -#: library/select.rst:417 -msgid "Invalid request: descriptor not open" +#: library/select.rst:428 +msgid "Invalid request: descriptor not open." msgstr "" -#: library/select.rst:420 +#: library/select.rst:431 msgid "" "Registering a file descriptor that's already registered is not an error, and " "has the same effect as registering the descriptor exactly once." msgstr "" -#: library/select.rst:426 +#: library/select.rst:437 msgid "" "Modifies an already registered fd. This has the same effect as " "``register(fd, eventmask)``. Attempting to modify a file descriptor that " @@ -592,13 +592,13 @@ msgid "" "`ENOENT` to be raised." msgstr "" -#: library/select.rst:438 +#: library/select.rst:449 msgid "" "Attempting to remove a file descriptor that was never registered causes a :" "exc:`KeyError` exception to be raised." msgstr "" -#: library/select.rst:444 +#: library/select.rst:455 msgid "" "Polls the set of registered file descriptors, and returns a possibly empty " "list containing ``(fd, event)`` 2-tuples for the descriptors that have " @@ -612,49 +612,49 @@ msgid "" "`None`, the call will block until there is an event for this poll object." msgstr "" -#: library/select.rst:465 -msgid "Kqueue Objects" +#: library/select.rst:476 +msgid "Kqueue objects" msgstr "" -#: library/select.rst:469 +#: library/select.rst:480 msgid "Close the control file descriptor of the kqueue object." msgstr "" -#: library/select.rst:474 +#: library/select.rst:485 msgid "``True`` if the kqueue object is closed." msgstr "" -#: library/select.rst:484 +#: library/select.rst:495 msgid "Create a kqueue object from a given file descriptor." msgstr "" -#: library/select.rst:489 +#: library/select.rst:500 msgid "Low level interface to kevent" msgstr "" -#: library/select.rst:491 +#: library/select.rst:502 msgid "changelist must be an iterable of kevent objects or ``None``" msgstr "" -#: library/select.rst:492 +#: library/select.rst:503 msgid "max_events must be 0 or a positive integer" msgstr "" -#: library/select.rst:493 +#: library/select.rst:504 msgid "" "timeout in seconds (floats possible); the default is ``None``, to wait " "forever" msgstr "" -#: library/select.rst:506 -msgid "Kevent Objects" +#: library/select.rst:517 +msgid "Kevent objects" msgstr "" -#: library/select.rst:508 +#: library/select.rst:519 msgid "https://man.freebsd.org/cgi/man.cgi?query=kqueue&sektion=2" msgstr "" -#: library/select.rst:512 +#: library/select.rst:523 msgid "" "Value used to identify the event. The interpretation depends on the filter " "but it's usually the file descriptor. In the constructor ident can either be " @@ -662,340 +662,341 @@ msgid "" "the integer internally." msgstr "" -#: library/select.rst:519 +#: library/select.rst:530 msgid "Name of the kernel filter." msgstr "" -#: library/select.rst:524 +#: library/select.rst:535 msgid ":const:`KQ_FILTER_READ`" msgstr "" -#: library/select.rst:524 -msgid "Takes a descriptor and returns whenever there is data available to read" +#: library/select.rst:535 +msgid "" +"Takes a descriptor and returns whenever there is data available to read." msgstr "" -#: library/select.rst:527 +#: library/select.rst:538 msgid ":const:`KQ_FILTER_WRITE`" msgstr "" -#: library/select.rst:527 +#: library/select.rst:538 msgid "" -"Takes a descriptor and returns whenever there is data available to write" +"Takes a descriptor and returns whenever there is data available to write." msgstr "" -#: library/select.rst:530 +#: library/select.rst:541 msgid ":const:`KQ_FILTER_AIO`" msgstr "" -#: library/select.rst:530 -msgid "AIO requests" +#: library/select.rst:541 +msgid "AIO requests." msgstr "" -#: library/select.rst:532 +#: library/select.rst:543 msgid ":const:`KQ_FILTER_VNODE`" msgstr "" -#: library/select.rst:532 +#: library/select.rst:543 msgid "" -"Returns when one or more of the requested events watched in *fflag* occurs" +"Returns when one or more of the requested events watched in *fflag* occurs." msgstr "" -#: library/select.rst:535 +#: library/select.rst:546 msgid ":const:`KQ_FILTER_PROC`" msgstr "" -#: library/select.rst:535 -msgid "Watch for events on a process id" +#: library/select.rst:546 +msgid "Watch for events on a process ID." msgstr "" -#: library/select.rst:537 +#: library/select.rst:548 msgid ":const:`KQ_FILTER_NETDEV`" msgstr "" -#: library/select.rst:537 -msgid "Watch for events on a network device [not available on macOS]" +#: library/select.rst:548 +msgid "Watch for events on a network device (not available on macOS)." msgstr "" -#: library/select.rst:540 +#: library/select.rst:551 msgid ":const:`KQ_FILTER_SIGNAL`" msgstr "" -#: library/select.rst:540 -msgid "Returns whenever the watched signal is delivered to the process" +#: library/select.rst:551 +msgid "Returns whenever the watched signal is delivered to the process." msgstr "" -#: library/select.rst:543 +#: library/select.rst:554 msgid ":const:`KQ_FILTER_TIMER`" msgstr "" -#: library/select.rst:543 -msgid "Establishes an arbitrary timer" +#: library/select.rst:554 +msgid "Establishes an arbitrary timer." msgstr "" -#: library/select.rst:548 +#: library/select.rst:559 msgid "Filter action." msgstr "" -#: library/select.rst:553 +#: library/select.rst:564 msgid ":const:`KQ_EV_ADD`" msgstr "" -#: library/select.rst:553 -msgid "Adds or modifies an event" +#: library/select.rst:564 +msgid "Adds or modifies an event." msgstr "" -#: library/select.rst:555 +#: library/select.rst:566 msgid ":const:`KQ_EV_DELETE`" msgstr "" -#: library/select.rst:555 -msgid "Removes an event from the queue" +#: library/select.rst:566 +msgid "Removes an event from the queue." msgstr "" -#: library/select.rst:557 +#: library/select.rst:568 msgid ":const:`KQ_EV_ENABLE`" msgstr "" -#: library/select.rst:557 -msgid "Permitscontrol() to returns the event" +#: library/select.rst:568 +msgid "Permits control() to return the event." msgstr "" -#: library/select.rst:559 +#: library/select.rst:570 msgid ":const:`KQ_EV_DISABLE`" msgstr "" -#: library/select.rst:559 -msgid "Disablesevent" +#: library/select.rst:570 +msgid "Disables event." msgstr "" -#: library/select.rst:561 +#: library/select.rst:572 msgid ":const:`KQ_EV_ONESHOT`" msgstr "" -#: library/select.rst:561 -msgid "Removes event after first occurrence" +#: library/select.rst:572 +msgid "Removes event after first occurrence." msgstr "" -#: library/select.rst:563 +#: library/select.rst:574 msgid ":const:`KQ_EV_CLEAR`" msgstr "" -#: library/select.rst:563 -msgid "Reset the state after an event is retrieved" +#: library/select.rst:574 +msgid "Reset the state after an event is retrieved." msgstr "" -#: library/select.rst:565 +#: library/select.rst:576 msgid ":const:`KQ_EV_SYSFLAGS`" msgstr "" -#: library/select.rst:567 -msgid "internal event" +#: library/select.rst:578 +msgid "Internal event." msgstr "" -#: library/select.rst:567 +#: library/select.rst:578 msgid ":const:`KQ_EV_FLAG1`" msgstr "" -#: library/select.rst:569 +#: library/select.rst:580 msgid ":const:`KQ_EV_EOF`" msgstr "" -#: library/select.rst:569 -msgid "Filter specific EOF condition" +#: library/select.rst:580 +msgid "Filter-specific EOF condition." msgstr "" -#: library/select.rst:571 +#: library/select.rst:582 msgid ":const:`KQ_EV_ERROR`" msgstr "" -#: library/select.rst:571 -msgid "See return values" +#: library/select.rst:582 +msgid "See return values." msgstr "" -#: library/select.rst:577 -msgid "Filter specific flags." +#: library/select.rst:588 +msgid "Filter-specific flags." msgstr "" -#: library/select.rst:579 +#: library/select.rst:590 msgid ":const:`KQ_FILTER_READ` and :const:`KQ_FILTER_WRITE` filter flags:" msgstr "" -#: library/select.rst:584 +#: library/select.rst:595 msgid ":const:`KQ_NOTE_LOWAT`" msgstr "" -#: library/select.rst:584 -msgid "low water mark of a socket buffer" +#: library/select.rst:595 +msgid "Low water mark of a socket buffer." msgstr "" -#: library/select.rst:587 +#: library/select.rst:598 msgid ":const:`KQ_FILTER_VNODE` filter flags:" msgstr "" -#: library/select.rst:592 +#: library/select.rst:603 msgid ":const:`KQ_NOTE_DELETE`" msgstr "" -#: library/select.rst:592 -msgid "*unlink()* was called" +#: library/select.rst:603 +msgid "*unlink()* was called." msgstr "" -#: library/select.rst:594 +#: library/select.rst:605 msgid ":const:`KQ_NOTE_WRITE`" msgstr "" -#: library/select.rst:594 -msgid "a write occurred" +#: library/select.rst:605 +msgid "A write occurred." msgstr "" -#: library/select.rst:596 +#: library/select.rst:607 msgid ":const:`KQ_NOTE_EXTEND`" msgstr "" -#: library/select.rst:596 -msgid "the file was extended" +#: library/select.rst:607 +msgid "The file was extended." msgstr "" -#: library/select.rst:598 +#: library/select.rst:609 msgid ":const:`KQ_NOTE_ATTRIB`" msgstr "" -#: library/select.rst:598 -msgid "an attribute was changed" +#: library/select.rst:609 +msgid "An attribute was changed." msgstr "" -#: library/select.rst:600 +#: library/select.rst:611 msgid ":const:`KQ_NOTE_LINK`" msgstr "" -#: library/select.rst:600 -msgid "the link count has changed" +#: library/select.rst:611 +msgid "The link count has changed." msgstr "" -#: library/select.rst:602 +#: library/select.rst:613 msgid ":const:`KQ_NOTE_RENAME`" msgstr "" -#: library/select.rst:602 -msgid "the file was renamed" +#: library/select.rst:613 +msgid "The file was renamed." msgstr "" -#: library/select.rst:604 +#: library/select.rst:615 msgid ":const:`KQ_NOTE_REVOKE`" msgstr "" -#: library/select.rst:604 -msgid "access to the file was revoked" +#: library/select.rst:615 +msgid "Access to the file was revoked." msgstr "" -#: library/select.rst:607 +#: library/select.rst:618 msgid ":const:`KQ_FILTER_PROC` filter flags:" msgstr "" -#: library/select.rst:612 +#: library/select.rst:623 msgid ":const:`KQ_NOTE_EXIT`" msgstr "" -#: library/select.rst:612 -msgid "the process has exited" +#: library/select.rst:623 +msgid "The process has exited." msgstr "" -#: library/select.rst:614 +#: library/select.rst:625 msgid ":const:`KQ_NOTE_FORK`" msgstr "" -#: library/select.rst:614 -msgid "the process has called *fork()*" +#: library/select.rst:625 +msgid "The process has called *fork()*." msgstr "" -#: library/select.rst:616 +#: library/select.rst:627 msgid ":const:`KQ_NOTE_EXEC`" msgstr "" -#: library/select.rst:616 -msgid "the process has executed a new process" +#: library/select.rst:627 +msgid "The process has executed a new process." msgstr "" -#: library/select.rst:618 +#: library/select.rst:629 msgid ":const:`KQ_NOTE_PCTRLMASK`" msgstr "" -#: library/select.rst:620 -msgid "internal filter flag" +#: library/select.rst:631 +msgid "Internal filter flag." msgstr "" -#: library/select.rst:620 +#: library/select.rst:631 msgid ":const:`KQ_NOTE_PDATAMASK`" msgstr "" -#: library/select.rst:622 +#: library/select.rst:633 msgid ":const:`KQ_NOTE_TRACK`" msgstr "" -#: library/select.rst:622 -msgid "follow a process across *fork()*" +#: library/select.rst:633 +msgid "Follow a process across *fork()*." msgstr "" -#: library/select.rst:624 +#: library/select.rst:635 msgid ":const:`KQ_NOTE_CHILD`" msgstr "" -#: library/select.rst:624 -msgid "returned on the child process for *NOTE_TRACK*" +#: library/select.rst:635 +msgid "Returned on the child process for *NOTE_TRACK*." msgstr "" -#: library/select.rst:627 +#: library/select.rst:638 msgid ":const:`KQ_NOTE_TRACKERR`" msgstr "" -#: library/select.rst:627 -msgid "unable to attach to a child" +#: library/select.rst:638 +msgid "Unable to attach to a child." msgstr "" -#: library/select.rst:630 +#: library/select.rst:641 msgid ":const:`KQ_FILTER_NETDEV` filter flags (not available on macOS):" msgstr "" -#: library/select.rst:635 +#: library/select.rst:646 msgid ":const:`KQ_NOTE_LINKUP`" msgstr "" -#: library/select.rst:635 -msgid "link is up" +#: library/select.rst:646 +msgid "Link is up." msgstr "" -#: library/select.rst:637 +#: library/select.rst:648 msgid ":const:`KQ_NOTE_LINKDOWN`" msgstr "" -#: library/select.rst:637 -msgid "link is down" +#: library/select.rst:648 +msgid "Link is down." msgstr "" -#: library/select.rst:639 +#: library/select.rst:650 msgid ":const:`KQ_NOTE_LINKINV`" msgstr "" -#: library/select.rst:639 -msgid "link state is invalid" +#: library/select.rst:650 +msgid "Link state is invalid." msgstr "" -#: library/select.rst:645 -msgid "Filter specific data." +#: library/select.rst:656 +msgid "Filter-specific data." msgstr "" -#: library/select.rst:650 -msgid "User defined value." +#: library/select.rst:661 +msgid "User-defined value." msgstr "" -#: library/select.rst:141 +#: library/select.rst:152 msgid "socket() (in module socket)" msgstr "" -#: library/select.rst:141 +#: library/select.rst:152 msgid "popen() (in module os)" msgstr "" -#: library/select.rst:154 +#: library/select.rst:165 msgid "WinSock" msgstr "" diff --git a/library/selectors.po b/library/selectors.po index 82da1f6b6..976fdfd6e 100644 --- a/library/selectors.po +++ b/library/selectors.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -101,7 +101,7 @@ msgstr "" msgid "" "In the following, *events* is a bitwise mask indicating which I/O events " "should be waited for on a given file object. It can be a combination of the " -"modules constants below:" +"module's constants below:" msgstr "" #: library/selectors.rst:61 diff --git a/library/shelve.po b/library/shelve.po index 460f8425d..6bdd46756 100644 --- a/library/shelve.po +++ b/library/shelve.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -98,7 +98,7 @@ msgstr "" #: library/shelve.rst:68 msgid "" -"Shelf objects support most of methods and operations supported by " +"Shelf objects support most of the methods and operations supported by " "dictionaries (except copying, constructors and operators ``|`` and ``|=``). " "This eases the transition from dictionary based scripts to those requiring " "persistent storage." diff --git a/library/shlex.po b/library/shlex.po index a3dc08560..45b3f12d8 100644 --- a/library/shlex.po +++ b/library/shlex.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -373,8 +373,8 @@ msgstr "" #: library/shlex.rst:346 msgid "" -"When operating in non-POSIX mode, :class:`~shlex.shlex` will try to obey to " -"the following rules." +"When operating in non-POSIX mode, :class:`~shlex.shlex` will try to obey the " +"following rules." msgstr "" #: library/shlex.rst:349 @@ -417,7 +417,7 @@ msgstr "" #: library/shlex.rst:369 msgid "" -"When operating in POSIX mode, :class:`~shlex.shlex` will try to obey to the " +"When operating in POSIX mode, :class:`~shlex.shlex` will try to obey the " "following parsing rules." msgstr "" @@ -445,9 +445,9 @@ msgid "" "Enclosing characters in quotes which are part of :attr:`~shlex." "escapedquotes` (e.g. ``'\"'``) preserves the literal value of all characters " "within the quotes, with the exception of the characters mentioned in :attr:" -"`~shlex.escape`. The escape characters retain its special meaning only when " -"followed by the quote in use, or the escape character itself. Otherwise the " -"escape character will be considered a normal character." +"`~shlex.escape`. The escape characters retain their special meaning only " +"when followed by the quote in use, or the escape character itself. Otherwise " +"the escape character will be considered a normal character." msgstr "" #: library/shlex.rst:390 diff --git a/library/shutil.po b/library/shutil.po index 177cb0bfa..68d1ad0a6 100644 --- a/library/shutil.po +++ b/library/shutil.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -110,7 +110,7 @@ msgid "" "subclass of the latter, this change is backward compatible." msgstr "" -#: library/shutil.rst:192 library/shutil.rst:294 library/shutil.rst:407 +#: library/shutil.rst:192 library/shutil.rst:294 library/shutil.rst:411 msgid "" "Platform-specific fast-copy syscalls may be used internally in order to copy " "the file more efficiently. See :ref:`shutil-platform-dependent-efficient-" @@ -483,13 +483,21 @@ msgstr "" #: library/shutil.rst:384 msgid "" -"If the destination is on the current filesystem, then :func:`os.rename` is " -"used. Otherwise, *src* is copied to the destination using *copy_function* " -"and then removed. In case of symlinks, a new symlink pointing to the target " -"of *src* will be created as the destination and *src* will be removed." +":func:`os.rename` is preferably used internally when *src* and the " +"destination are on the same filesystem. In case :func:`os.rename` fails due " +"to :exc:`OSError` (e.g. the user has write permission to the destination " +"file but not to its parent directory), this method falls back to using " +"*copy_function*, in which case *src* is copied to the destination using " +"*copy_function* and then removed." msgstr "" -#: library/shutil.rst:389 +#: library/shutil.rst:390 +msgid "" +"In case of symlinks, a new symlink pointing to the target of *src* will be " +"created in or as the destination, and *src* will be removed." +msgstr "" + +#: library/shutil.rst:393 msgid "" "If *copy_function* is given, it must be a callable that takes two arguments, " "*src* and the destination, and will be used to copy *src* to the destination " @@ -500,85 +508,85 @@ msgid "" "copy the metadata, at the expense of not copying any of the metadata." msgstr "" -#: library/shutil.rst:397 +#: library/shutil.rst:401 msgid "" "Raises an :ref:`auditing event ` ``shutil.move`` with arguments " "``src``, ``dst``." msgstr "" -#: library/shutil.rst:399 +#: library/shutil.rst:403 msgid "" "Added explicit symlink handling for foreign filesystems, thus adapting it to " "the behavior of GNU's :program:`mv`. Now returns *dst*." msgstr "" -#: library/shutil.rst:404 +#: library/shutil.rst:408 msgid "Added the *copy_function* keyword argument." msgstr "" -#: library/shutil.rst:412 +#: library/shutil.rst:416 msgid "Accepts a :term:`path-like object` for both *src* and *dst*." msgstr "" -#: library/shutil.rst:417 +#: library/shutil.rst:421 msgid "" "Return disk usage statistics about the given path as a :term:`named tuple` " "with the attributes *total*, *used* and *free*, which are the amount of " "total, used and free space, in bytes. *path* may be a file or a directory." msgstr "" -#: library/shutil.rst:424 +#: library/shutil.rst:428 msgid "" "On Unix filesystems, *path* must point to a path within a **mounted** " "filesystem partition. On those platforms, CPython doesn't attempt to " "retrieve disk usage information from non-mounted filesystems." msgstr "" -#: library/shutil.rst:430 +#: library/shutil.rst:434 msgid "On Windows, *path* can now be a file or directory." msgstr "" -#: library/shutil.rst:447 +#: library/shutil.rst:451 msgid "Availability" msgstr "" -#: library/shutil.rst:438 +#: library/shutil.rst:442 msgid "Change owner *user* and/or *group* of the given *path*." msgstr "" -#: library/shutil.rst:440 +#: library/shutil.rst:444 msgid "" "*user* can be a system user name or a uid; the same applies to *group*. At " "least one argument is required." msgstr "" -#: library/shutil.rst:443 +#: library/shutil.rst:447 msgid "See also :func:`os.chown`, the underlying function." msgstr "" -#: library/shutil.rst:445 +#: library/shutil.rst:449 msgid "" "Raises an :ref:`auditing event ` ``shutil.chown`` with arguments " "``path``, ``user``, ``group``." msgstr "" -#: library/shutil.rst:451 +#: library/shutil.rst:455 msgid "Added *dir_fd* and *follow_symlinks* parameters." msgstr "" -#: library/shutil.rst:457 +#: library/shutil.rst:461 msgid "" "Return the path to an executable which would be run if the given *cmd* was " "called. If no *cmd* would be called, return ``None``." msgstr "" -#: library/shutil.rst:460 +#: library/shutil.rst:464 msgid "" "*mode* is a permission mask passed to :func:`os.access`, by default " "determining if the file exists and is executable." msgstr "" -#: library/shutil.rst:463 +#: library/shutil.rst:467 msgid "" "*path* is a \"``PATH`` string\" specifying the directories to look in, " "delimited by :data:`os.pathsep`. When no *path* is specified, the :envvar:" @@ -586,14 +594,14 @@ msgid "" "to :data:`os.defpath` if it is not set." msgstr "" -#: library/shutil.rst:468 +#: library/shutil.rst:472 msgid "" "If *cmd* contains a directory component, :func:`!which` only checks the " "specified path directly and does not search the directories listed in *path* " "or in the system's :envvar:`PATH` environment variable." msgstr "" -#: library/shutil.rst:472 +#: library/shutil.rst:476 msgid "" "On Windows, the current directory is prepended to the *path* if *mode* does " "not include ``os.X_OK``. When the *mode* does include ``os.X_OK``, the " @@ -603,7 +611,7 @@ msgid "" "environment variable ``NoDefaultCurrentDirectoryInExePath``." msgstr "" -#: library/shutil.rst:479 +#: library/shutil.rst:483 msgid "" "Also on Windows, the :envvar:`PATHEXT` environment variable is used to " "resolve commands that may not already include an extension. For example, if " @@ -612,31 +620,31 @@ msgid "" "directories. For example, on Windows::" msgstr "" -#: library/shutil.rst:485 +#: library/shutil.rst:489 msgid "" ">>> shutil.which(\"python\")\n" "'C:\\\\Python33\\\\python.EXE'" msgstr "" -#: library/shutil.rst:488 +#: library/shutil.rst:492 msgid "" "This is also applied when *cmd* is a path that contains a directory " "component::" msgstr "" -#: library/shutil.rst:491 +#: library/shutil.rst:495 msgid "" ">>> shutil.which(\"C:\\\\Python33\\\\python\")\n" "'C:\\\\Python33\\\\python.EXE'" msgstr "" -#: library/shutil.rst:496 +#: library/shutil.rst:500 msgid "" "The :class:`bytes` type is now accepted. If *cmd* type is :class:`bytes`, " "the result type is also :class:`bytes`." msgstr "" -#: library/shutil.rst:500 +#: library/shutil.rst:504 msgid "" "On Windows, the current directory is no longer prepended to the search path " "if *mode* includes ``os.X_OK`` and WinAPI " @@ -647,18 +655,18 @@ msgid "" "now be found." msgstr "" -#: library/shutil.rst:511 +#: library/shutil.rst:515 msgid "" "This exception collects exceptions that are raised during a multi-file " "operation. For :func:`copytree`, the exception argument is a list of 3-" "tuples (*srcname*, *dstname*, *exception*)." msgstr "" -#: library/shutil.rst:518 +#: library/shutil.rst:522 msgid "Platform-dependent efficient copy operations" msgstr "" -#: library/shutil.rst:520 +#: library/shutil.rst:524 msgid "" "Starting from Python 3.8, all functions involving a file copy (:func:" "`copyfile`, :func:`~shutil.copy`, :func:`copy2`, :func:`copytree`, and :func:" @@ -668,54 +676,54 @@ msgid "" "buffers in Python as in \"``outfd.write(infd.read())``\"." msgstr "" -#: library/shutil.rst:528 +#: library/shutil.rst:532 msgid "On macOS `fcopyfile`_ is used to copy the file content (not metadata)." msgstr "" -#: library/shutil.rst:530 +#: library/shutil.rst:534 msgid "On Linux :func:`os.sendfile` is used." msgstr "" -#: library/shutil.rst:532 +#: library/shutil.rst:536 msgid "" "On Windows :func:`shutil.copyfile` uses a bigger default buffer size (1 MiB " "instead of 64 KiB) and a :func:`memoryview`-based variant of :func:`shutil." "copyfileobj` is used." msgstr "" -#: library/shutil.rst:536 +#: library/shutil.rst:540 msgid "" "If the fast-copy operation fails and no data was written in the destination " -"file then shutil will silently fallback on using less efficient :func:" +"file then shutil will silently fall back to less efficient :func:" "`copyfileobj` function internally." msgstr "" -#: library/shutil.rst:545 +#: library/shutil.rst:549 msgid "copytree example" msgstr "" -#: library/shutil.rst:547 +#: library/shutil.rst:551 msgid "An example that uses the :func:`ignore_patterns` helper::" msgstr "" -#: library/shutil.rst:549 +#: library/shutil.rst:553 msgid "" "from shutil import copytree, ignore_patterns\n" "\n" "copytree(source, destination, ignore=ignore_patterns('*.pyc', 'tmp*'))" msgstr "" -#: library/shutil.rst:553 +#: library/shutil.rst:557 msgid "" "This will copy everything except ``.pyc`` files and files or directories " "whose name starts with ``tmp``." msgstr "" -#: library/shutil.rst:556 +#: library/shutil.rst:560 msgid "Another example that uses the *ignore* argument to add a logging call::" msgstr "" -#: library/shutil.rst:558 +#: library/shutil.rst:562 msgid "" "from shutil import copytree\n" "import logging\n" @@ -727,11 +735,11 @@ msgid "" "copytree(source, destination, ignore=_logpath)" msgstr "" -#: library/shutil.rst:571 +#: library/shutil.rst:575 msgid "rmtree example" msgstr "" -#: library/shutil.rst:573 +#: library/shutil.rst:577 msgid "" "This example shows how to remove a directory tree on Windows where some of " "the files have their read-only bit set. It uses the onexc callback to clear " @@ -739,7 +747,7 @@ msgid "" "propagate. ::" msgstr "" -#: library/shutil.rst:578 +#: library/shutil.rst:582 msgid "" "import os, stat\n" "import shutil\n" @@ -752,31 +760,31 @@ msgid "" "shutil.rmtree(directory, onexc=remove_readonly)" msgstr "" -#: library/shutil.rst:591 +#: library/shutil.rst:595 msgid "Archiving operations" msgstr "" -#: library/shutil.rst:595 +#: library/shutil.rst:599 msgid "Added support for the *xztar* format." msgstr "" -#: library/shutil.rst:599 +#: library/shutil.rst:603 msgid "" "High-level utilities to create and read compressed and archived files are " "also provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules." msgstr "" -#: library/shutil.rst:604 +#: library/shutil.rst:608 msgid "Create an archive file (such as zip or tar) and return its name." msgstr "" -#: library/shutil.rst:606 +#: library/shutil.rst:610 msgid "" "*base_name* is the name of the file to create, including the path, minus any " "format-specific extension." msgstr "" -#: library/shutil.rst:609 +#: library/shutil.rst:613 msgid "" "*format* is the archive format: one of \"zip\" (if the :mod:`zlib` module is " "available), \"tar\", \"gztar\" (if the :mod:`zlib` module is available), " @@ -784,14 +792,14 @@ msgid "" "`lzma` module is available)." msgstr "" -#: library/shutil.rst:614 +#: library/shutil.rst:618 msgid "" "*root_dir* is a directory that will be the root directory of the archive, " "all paths in the archive will be relative to it; for example, we typically " "chdir into *root_dir* before creating the archive." msgstr "" -#: library/shutil.rst:618 +#: library/shutil.rst:622 msgid "" "*base_dir* is the directory where we start archiving from; i.e. *base_dir* " "will be the common prefix of all files and directories in the archive. " @@ -799,39 +807,39 @@ msgid "" "example-with-basedir` for how to use *base_dir* and *root_dir* together." msgstr "" -#: library/shutil.rst:624 +#: library/shutil.rst:628 msgid "*root_dir* and *base_dir* both default to the current directory." msgstr "" -#: library/shutil.rst:626 +#: library/shutil.rst:630 msgid "" "If *dry_run* is true, no archive is created, but the operations that would " "be executed are logged to *logger*." msgstr "" -#: library/shutil.rst:629 +#: library/shutil.rst:633 msgid "" "*owner* and *group* are used when creating a tar archive. By default, uses " "the current owner and group." msgstr "" -#: library/shutil.rst:632 +#: library/shutil.rst:636 msgid "" "*logger* must be an object compatible with :pep:`282`, usually an instance " "of :class:`logging.Logger`." msgstr "" -#: library/shutil.rst:635 +#: library/shutil.rst:639 msgid "The *verbose* argument is unused and deprecated." msgstr "" -#: library/shutil.rst:637 +#: library/shutil.rst:641 msgid "" "Raises an :ref:`auditing event ` ``shutil.make_archive`` with " "arguments ``base_name``, ``format``, ``root_dir``, ``base_dir``." msgstr "" -#: library/shutil.rst:641 +#: library/shutil.rst:645 msgid "" "This function is not thread-safe when custom archivers registered with :func:" "`register_archive_format` do not support the *root_dir* argument. In this " @@ -839,69 +847,69 @@ msgid "" "*root_dir* to perform archiving." msgstr "" -#: library/shutil.rst:647 +#: library/shutil.rst:651 msgid "" "The modern pax (POSIX.1-2001) format is now used instead of the legacy GNU " "format for archives created with ``format=\"tar\"``." msgstr "" -#: library/shutil.rst:651 +#: library/shutil.rst:655 msgid "" "This function is now made thread-safe during creation of standard ``.zip`` " "and tar archives." msgstr "" -#: library/shutil.rst:657 +#: library/shutil.rst:661 msgid "" "Return a list of supported formats for archiving. Each element of the " "returned sequence is a tuple ``(name, description)``." msgstr "" -#: library/shutil.rst:771 +#: library/shutil.rst:775 msgid "By default :mod:`shutil` provides these formats:" msgstr "" -#: library/shutil.rst:662 +#: library/shutil.rst:666 msgid "*zip*: ZIP file (if the :mod:`zlib` module is available)." msgstr "" -#: library/shutil.rst:663 +#: library/shutil.rst:667 msgid "" "*tar*: Uncompressed tar file. Uses POSIX.1-2001 pax format for new archives." msgstr "" -#: library/shutil.rst:776 +#: library/shutil.rst:780 msgid "*gztar*: gzip'ed tar-file (if the :mod:`zlib` module is available)." msgstr "" -#: library/shutil.rst:777 +#: library/shutil.rst:781 msgid "*bztar*: bzip2'ed tar-file (if the :mod:`bz2` module is available)." msgstr "" -#: library/shutil.rst:778 +#: library/shutil.rst:782 msgid "*xztar*: xz'ed tar-file (if the :mod:`lzma` module is available)." msgstr "" -#: library/shutil.rst:668 +#: library/shutil.rst:672 msgid "" "You can register new formats or provide your own archiver for any existing " "formats, by using :func:`register_archive_format`." msgstr "" -#: library/shutil.rst:674 +#: library/shutil.rst:678 msgid "Register an archiver for the format *name*." msgstr "" -#: library/shutil.rst:676 +#: library/shutil.rst:680 msgid "" -"*function* is the callable that will be used to unpack archives. The " +"*function* is the callable that will be used to create archives. The " "callable will receive the *base_name* of the file to create, followed by the " "*base_dir* (which defaults to :data:`os.curdir`) to start archiving from. " "Further arguments are passed as keyword arguments: *owner*, *group*, " "*dry_run* and *logger* (as passed in :func:`make_archive`)." msgstr "" -#: library/shutil.rst:682 +#: library/shutil.rst:686 msgid "" "If *function* has the custom attribute ``function.supports_root_dir`` set to " "``True``, the *root_dir* argument is passed as a keyword argument. Otherwise " @@ -910,37 +918,37 @@ msgid "" "not thread-safe." msgstr "" -#: library/shutil.rst:688 +#: library/shutil.rst:692 msgid "" "If given, *extra_args* is a sequence of ``(name, value)`` pairs that will be " "used as extra keywords arguments when the archiver callable is used." msgstr "" -#: library/shutil.rst:691 +#: library/shutil.rst:695 msgid "" "*description* is used by :func:`get_archive_formats` which returns the list " "of archivers. Defaults to an empty string." msgstr "" -#: library/shutil.rst:694 +#: library/shutil.rst:698 msgid "Added support for functions supporting the *root_dir* argument." msgstr "" -#: library/shutil.rst:700 +#: library/shutil.rst:704 msgid "Remove the archive format *name* from the list of supported formats." msgstr "" -#: library/shutil.rst:705 +#: library/shutil.rst:709 msgid "Unpack an archive. *filename* is the full path of the archive." msgstr "" -#: library/shutil.rst:707 +#: library/shutil.rst:711 msgid "" "*extract_dir* is the name of the target directory where the archive is " "unpacked. If not provided, the current working directory is used." msgstr "" -#: library/shutil.rst:710 +#: library/shutil.rst:714 msgid "" "*format* is the archive format: one of \"zip\", \"tar\", \"gztar\", " "\"bztar\", or \"xztar\". Or any other format registered with :func:" @@ -949,7 +957,7 @@ msgid "" "that extension. In case none is found, a :exc:`ValueError` is raised." msgstr "" -#: library/shutil.rst:717 +#: library/shutil.rst:721 msgid "" "The keyword-only *filter* argument is passed to the underlying unpacking " "function. For zip files, *filter* is not accepted. For tar files, it is " @@ -959,105 +967,105 @@ msgid "" "Python 3.14." msgstr "" -#: library/shutil.rst:725 +#: library/shutil.rst:729 msgid "" "Raises an :ref:`auditing event ` ``shutil.unpack_archive`` with " "arguments ``filename``, ``extract_dir``, ``format``." msgstr "" -#: library/shutil.rst:729 +#: library/shutil.rst:733 msgid "" "Never extract archives from untrusted sources without prior inspection. It " "is possible that files are created outside of the path specified in the " -"*extract_dir* argument, e.g. members that have absolute filenames starting " -"with \"/\" or filenames with two dots \"..\"." +"*extract_dir* argument, for example, members that have absolute filenames or " +"filenames with \"..\" components." msgstr "" -#: library/shutil.rst:734 +#: library/shutil.rst:738 msgid "Accepts a :term:`path-like object` for *filename* and *extract_dir*." msgstr "" -#: library/shutil.rst:737 +#: library/shutil.rst:741 msgid "Added the *filter* argument." msgstr "" -#: library/shutil.rst:742 +#: library/shutil.rst:746 msgid "" "Registers an unpack format. *name* is the name of the format and " "*extensions* is a list of extensions corresponding to the format, like ``." "zip`` for Zip files." msgstr "" -#: library/shutil.rst:746 +#: library/shutil.rst:750 msgid "" "*function* is the callable that will be used to unpack archives. The " "callable will receive:" msgstr "" -#: library/shutil.rst:749 +#: library/shutil.rst:753 msgid "the path of the archive, as a positional argument;" msgstr "" -#: library/shutil.rst:750 +#: library/shutil.rst:754 msgid "" "the directory the archive must be extracted to, as a positional argument;" msgstr "" -#: library/shutil.rst:751 +#: library/shutil.rst:755 msgid "" "possibly a *filter* keyword argument, if it was given to :func:" "`unpack_archive`;" msgstr "" -#: library/shutil.rst:753 +#: library/shutil.rst:757 msgid "" "additional keyword arguments, specified by *extra_args* as a sequence of " "``(name, value)`` tuples." msgstr "" -#: library/shutil.rst:756 +#: library/shutil.rst:760 msgid "" "*description* can be provided to describe the format, and will be returned " "by the :func:`get_unpack_formats` function." msgstr "" -#: library/shutil.rst:762 +#: library/shutil.rst:766 msgid "Unregister an unpack format. *name* is the name of the format." msgstr "" -#: library/shutil.rst:767 +#: library/shutil.rst:771 msgid "" "Return a list of all registered formats for unpacking. Each element of the " "returned sequence is a tuple ``(name, extensions, description)``." msgstr "" -#: library/shutil.rst:773 +#: library/shutil.rst:777 msgid "" "*zip*: ZIP file (unpacking compressed files works only if the corresponding " "module is available)." msgstr "" -#: library/shutil.rst:775 +#: library/shutil.rst:779 msgid "*tar*: uncompressed tar file." msgstr "" -#: library/shutil.rst:780 +#: library/shutil.rst:784 msgid "" "You can register new formats or provide your own unpacker for any existing " "formats, by using :func:`register_unpack_format`." msgstr "" -#: library/shutil.rst:787 +#: library/shutil.rst:791 msgid "Archiving example" msgstr "" -#: library/shutil.rst:789 +#: library/shutil.rst:793 msgid "" "In this example, we create a gzip'ed tar-file archive containing all files " "found in the :file:`.ssh` directory of the user::" msgstr "" -#: library/shutil.rst:792 +#: library/shutil.rst:796 msgid "" ">>> from shutil import make_archive\n" ">>> import os\n" @@ -1067,11 +1075,11 @@ msgid "" "'/Users/tarek/myarchive.tar.gz'" msgstr "" -#: library/shutil.rst:799 +#: library/shutil.rst:803 msgid "The resulting archive contains:" msgstr "" -#: library/shutil.rst:801 +#: library/shutil.rst:805 msgid "" "$ tar -tzvf /Users/tarek/myarchive.tar.gz\n" "drwx------ tarek/staff 0 2010-02-01 16:23:40 ./\n" @@ -1084,18 +1092,18 @@ msgid "" "-rw-r--r-- tarek/staff 37192 2010-02-06 18:23:10 ./known_hosts" msgstr "" -#: library/shutil.rst:817 +#: library/shutil.rst:821 msgid "Archiving example with *base_dir*" msgstr "" -#: library/shutil.rst:819 +#: library/shutil.rst:823 msgid "" "In this example, similar to the `one above `_, we " "show how to use :func:`make_archive`, but this time with the usage of " "*base_dir*. We now have the following directory structure:" msgstr "" -#: library/shutil.rst:823 +#: library/shutil.rst:827 msgid "" "$ tree tmp\n" "tmp\n" @@ -1106,13 +1114,13 @@ msgid "" " └── do_not_add.txt" msgstr "" -#: library/shutil.rst:833 +#: library/shutil.rst:837 msgid "" "In the final archive, :file:`please_add.txt` should be included, but :file:" "`do_not_add.txt` should not. Therefore we use the following::" msgstr "" -#: library/shutil.rst:836 +#: library/shutil.rst:840 msgid "" ">>> from shutil import make_archive\n" ">>> import os\n" @@ -1126,40 +1134,40 @@ msgid "" "'/Users/tarek/myarchive.tar'" msgstr "" -#: library/shutil.rst:847 +#: library/shutil.rst:851 msgid "Listing the files in the resulting archive gives us:" msgstr "" -#: library/shutil.rst:849 +#: library/shutil.rst:853 msgid "" "$ python -m tarfile -l /Users/tarek/myarchive.tar\n" "structure/content/\n" "structure/content/please_add.txt" msgstr "" -#: library/shutil.rst:857 +#: library/shutil.rst:861 msgid "Querying the size of the output terminal" msgstr "" -#: library/shutil.rst:861 +#: library/shutil.rst:865 msgid "Get the size of the terminal window." msgstr "" -#: library/shutil.rst:863 +#: library/shutil.rst:867 msgid "" "For each of the two dimensions, the environment variable, ``COLUMNS`` and " "``LINES`` respectively, is checked. If the variable is defined and the value " "is a positive integer, it is used." msgstr "" -#: library/shutil.rst:867 +#: library/shutil.rst:871 msgid "" "When ``COLUMNS`` or ``LINES`` is not defined, which is the common case, the " "terminal connected to :data:`sys.__stdout__` is queried by invoking :func:" "`os.get_terminal_size`." msgstr "" -#: library/shutil.rst:871 +#: library/shutil.rst:875 msgid "" "If the terminal size cannot be successfully queried, either because the " "system doesn't support querying, or because we are not connected to a " @@ -1168,17 +1176,17 @@ msgid "" "emulators." msgstr "" -#: library/shutil.rst:877 +#: library/shutil.rst:881 msgid "The value returned is a named tuple of type :class:`os.terminal_size`." msgstr "" -#: library/shutil.rst:879 +#: library/shutil.rst:883 msgid "" "See also: The Single UNIX Specification, Version 2, `Other Environment " "Variables`_." msgstr "" -#: library/shutil.rst:884 +#: library/shutil.rst:888 msgid "" "The ``fallback`` values are also used if :func:`os.get_terminal_size` " "returns zeroes." diff --git a/library/signal.po b/library/signal.po index 7fc5752e3..e33471356 100644 --- a/library/signal.po +++ b/library/signal.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -67,7 +67,7 @@ msgid "" "A Python signal handler does not get executed inside the low-level (C) " "signal handler. Instead, the low-level signal handler sets a flag which " "tells the :term:`virtual machine` to execute the corresponding Python signal " -"handler at a later point(for example at the next :term:`bytecode` " +"handler at a later point (for example, at the next :term:`bytecode` " "instruction). This has consequences:" msgstr "" @@ -116,10 +116,16 @@ msgid "" msgstr "" #: library/signal.rst:73 +msgid "" +"Synchronization primitives such as :class:`threading.Lock` should not be " +"used within signal handlers. Doing so can lead to unexpected deadlocks." +msgstr "" + +#: library/signal.rst:78 msgid "Module contents" msgstr "" -#: library/signal.rst:75 +#: library/signal.rst:80 msgid "" "signal (SIG*), handler (:const:`SIG_DFL`, :const:`SIG_IGN`) and sigmask (:" "const:`SIG_BLOCK`, :const:`SIG_UNBLOCK`, :const:`SIG_SETMASK`) related " @@ -130,47 +136,47 @@ msgid "" "class:`Signals` objects." msgstr "" -#: library/signal.rst:85 +#: library/signal.rst:90 msgid "The signal module defines three enums:" msgstr "" -#: library/signal.rst:89 +#: library/signal.rst:94 msgid "" ":class:`enum.IntEnum` collection of SIG* constants and the CTRL_* constants." msgstr "" -#: library/signal.rst:95 +#: library/signal.rst:100 msgid "" -":class:`enum.IntEnum` collection the constants :const:`SIG_DFL` and :const:" -"`SIG_IGN`." +":class:`enum.IntEnum` collection of the constants :const:`SIG_DFL` and :" +"const:`SIG_IGN`." msgstr "" -#: library/signal.rst:101 +#: library/signal.rst:106 msgid "" -":class:`enum.IntEnum` collection the constants :const:`SIG_BLOCK`, :const:" +":class:`enum.IntEnum` collection of the constants :const:`SIG_BLOCK`, :const:" "`SIG_UNBLOCK` and :const:`SIG_SETMASK`." msgstr "" -#: library/signal.rst:136 library/signal.rst:148 library/signal.rst:160 -#: library/signal.rst:180 library/signal.rst:206 library/signal.rst:218 -#: library/signal.rst:248 library/signal.rst:260 library/signal.rst:272 -#: library/signal.rst:300 library/signal.rst:418 library/signal.rst:465 -#: library/signal.rst:529 library/signal.rst:591 library/signal.rst:648 -#: library/signal.rst:693 +#: library/signal.rst:141 library/signal.rst:153 library/signal.rst:165 +#: library/signal.rst:185 library/signal.rst:211 library/signal.rst:223 +#: library/signal.rst:240 library/signal.rst:261 library/signal.rst:273 +#: library/signal.rst:297 library/signal.rst:386 library/signal.rst:449 +#: library/signal.rst:506 library/signal.rst:543 library/signal.rst:640 +#: library/signal.rst:680 library/signal.rst:700 msgid "Availability" msgstr "" -#: library/signal.rst:501 +#: library/signal.rst:508 msgid "" "See the man page :manpage:`sigprocmask(2)` and :manpage:`pthread_sigmask(3)` " "for further information." msgstr "" -#: library/signal.rst:111 +#: library/signal.rst:116 msgid "The variables defined in the :mod:`signal` module are:" msgstr "" -#: library/signal.rst:116 +#: library/signal.rst:121 msgid "" "This is one of two standard signal handling options; it will simply perform " "the default function for the signal. For example, on most systems the " @@ -178,136 +184,136 @@ msgid "" "default action for :const:`SIGCHLD` is to simply ignore it." msgstr "" -#: library/signal.rst:124 +#: library/signal.rst:129 msgid "" "This is another standard signal handler, which will simply ignore the given " "signal." msgstr "" -#: library/signal.rst:130 +#: library/signal.rst:135 msgid "Abort signal from :manpage:`abort(3)`." msgstr "" -#: library/signal.rst:134 +#: library/signal.rst:139 msgid "Timer signal from :manpage:`alarm(2)`." msgstr "" -#: library/signal.rst:140 +#: library/signal.rst:145 msgid "Interrupt from keyboard (CTRL + BREAK)." msgstr "" -#: library/signal.rst:146 +#: library/signal.rst:151 msgid "Bus error (bad memory access)." msgstr "" -#: library/signal.rst:152 +#: library/signal.rst:157 msgid "Child process stopped or terminated." msgstr "" -#: library/signal.rst:158 +#: library/signal.rst:163 msgid "Alias to :data:`SIGCHLD`." msgstr "" -#: library/signal.rst:164 +#: library/signal.rst:169 msgid "Continue the process if it is currently stopped" msgstr "" -#: library/signal.rst:170 +#: library/signal.rst:175 msgid "Floating-point exception. For example, division by zero." msgstr "" -#: library/signal.rst:173 +#: library/signal.rst:178 msgid "" ":exc:`ZeroDivisionError` is raised when the second argument of a division or " "modulo operation is zero." msgstr "" -#: library/signal.rst:178 +#: library/signal.rst:183 msgid "" "Hangup detected on controlling terminal or death of controlling process." msgstr "" -#: library/signal.rst:184 +#: library/signal.rst:189 msgid "Illegal instruction." msgstr "" -#: library/signal.rst:188 +#: library/signal.rst:193 msgid "Interrupt from keyboard (CTRL + C)." msgstr "" -#: library/signal.rst:190 +#: library/signal.rst:195 msgid "Default action is to raise :exc:`KeyboardInterrupt`." msgstr "" -#: library/signal.rst:194 +#: library/signal.rst:199 msgid "Kill signal." msgstr "" -#: library/signal.rst:196 +#: library/signal.rst:201 msgid "It cannot be caught, blocked, or ignored." msgstr "" -#: library/signal.rst:202 +#: library/signal.rst:207 msgid "Broken pipe: write to pipe with no readers." msgstr "" -#: library/signal.rst:204 +#: library/signal.rst:209 msgid "Default action is to ignore the signal." msgstr "" -#: library/signal.rst:210 +#: library/signal.rst:215 msgid "Profiling timer expired." msgstr "" -#: library/signal.rst:216 +#: library/signal.rst:221 msgid "Terminal quit signal." msgstr "" -#: library/signal.rst:222 +#: library/signal.rst:227 msgid "Segmentation fault: invalid memory reference." msgstr "" -#: library/signal.rst:226 +#: library/signal.rst:231 msgid "Stop executing (cannot be caught or ignored)." msgstr "" -#: library/signal.rst:230 +#: library/signal.rst:237 msgid "" "Stack fault on coprocessor. The Linux kernel does not raise this signal: it " "can only be raised in user space." msgstr "" -#: library/signal.rst:235 +#: library/signal.rst:242 msgid "" "On architectures where the signal is available. See the man page :manpage:" "`signal(7)` for further information." msgstr "" -#: library/signal.rst:242 +#: library/signal.rst:249 msgid "Termination signal." msgstr "" -#: library/signal.rst:246 +#: library/signal.rst:253 msgid "User-defined signal 1." msgstr "" -#: library/signal.rst:252 +#: library/signal.rst:259 msgid "User-defined signal 2." msgstr "" -#: library/signal.rst:258 +#: library/signal.rst:265 msgid "Virtual timer expired." msgstr "" -#: library/signal.rst:264 +#: library/signal.rst:271 msgid "Window resize signal." msgstr "" -#: library/signal.rst:270 +#: library/signal.rst:277 msgid "CPU time limit exceeded." msgstr "" -#: library/signal.rst:276 +#: library/signal.rst:283 msgid "" "All the signal numbers are defined symbolically. For example, the hangup " "signal is defined as :const:`signal.SIGHUP`; the variable names are " @@ -318,37 +324,37 @@ msgid "" "only those names defined by the system are defined by this module." msgstr "" -#: library/signal.rst:287 +#: library/signal.rst:294 msgid "" "The signal corresponding to the :kbd:`Ctrl+C` keystroke event. This signal " "can only be used with :func:`os.kill`." msgstr "" -#: library/signal.rst:297 +#: library/signal.rst:304 msgid "" "The signal corresponding to the :kbd:`Ctrl+Break` keystroke event. This " "signal can only be used with :func:`os.kill`." msgstr "" -#: library/signal.rst:307 +#: library/signal.rst:314 msgid "" "One more than the number of the highest signal number. Use :func:" "`valid_signals` to get valid signal numbers." msgstr "" -#: library/signal.rst:313 +#: library/signal.rst:320 msgid "" "Decrements interval timer in real time, and delivers :const:`SIGALRM` upon " "expiration." msgstr "" -#: library/signal.rst:319 +#: library/signal.rst:326 msgid "" "Decrements interval timer only when the process is executing, and delivers " "SIGVTALRM upon expiration." msgstr "" -#: library/signal.rst:325 +#: library/signal.rst:332 msgid "" "Decrements interval timer both when the process executes and when the system " "is executing on behalf of the process. Coupled with ITIMER_VIRTUAL, this " @@ -356,29 +362,29 @@ msgid "" "and kernel space. SIGPROF is delivered upon expiration." msgstr "" -#: library/signal.rst:333 +#: library/signal.rst:340 msgid "" "A possible value for the *how* parameter to :func:`pthread_sigmask` " "indicating that signals are to be blocked." msgstr "" -#: library/signal.rst:340 +#: library/signal.rst:347 msgid "" "A possible value for the *how* parameter to :func:`pthread_sigmask` " "indicating that signals are to be unblocked." msgstr "" -#: library/signal.rst:347 +#: library/signal.rst:354 msgid "" "A possible value for the *how* parameter to :func:`pthread_sigmask` " "indicating that the signal mask is to be replaced." msgstr "" -#: library/signal.rst:353 +#: library/signal.rst:360 msgid "The :mod:`signal` module defines one exception:" msgstr "" -#: library/signal.rst:357 +#: library/signal.rst:364 msgid "" "Raised to signal an error from the underlying :func:`setitimer` or :func:" "`getitimer` implementation. Expect this error if an invalid interval timer " @@ -386,17 +392,17 @@ msgid "" "of :exc:`OSError`." msgstr "" -#: library/signal.rst:362 +#: library/signal.rst:369 msgid "" "This error used to be a subtype of :exc:`IOError`, which is now an alias of :" "exc:`OSError`." msgstr "" -#: library/signal.rst:367 +#: library/signal.rst:374 msgid "The :mod:`signal` module defines the following functions:" msgstr "" -#: library/signal.rst:372 +#: library/signal.rst:379 msgid "" "If *time* is non-zero, this function requests that a :const:`SIGALRM` signal " "be sent to the process in *time* seconds. Any previously scheduled alarm is " @@ -407,11 +413,11 @@ msgid "" "scheduled." msgstr "" -#: library/signal.rst:381 +#: library/signal.rst:388 msgid "See the man page :manpage:`alarm(2)` for further information." msgstr "" -#: library/signal.rst:386 +#: library/signal.rst:393 msgid "" "Return the current signal handler for the signal *signalnum*. The returned " "value may be a callable Python object, or one of the special values :const:" @@ -422,41 +428,41 @@ msgid "" "not installed from Python." msgstr "" -#: library/signal.rst:397 +#: library/signal.rst:404 msgid "" "Returns the description of signal *signalnum*, such as \"Interrupt\" for :" "const:`SIGINT`. Returns :const:`None` if *signalnum* has no description. " "Raises :exc:`ValueError` if *signalnum* is invalid." msgstr "" -#: library/signal.rst:406 +#: library/signal.rst:413 msgid "" "Return the set of valid signal numbers on this platform. This can be less " "than ``range(1, NSIG)`` if some signals are reserved by the system for " "internal use." msgstr "" -#: library/signal.rst:415 +#: library/signal.rst:422 msgid "" "Cause the process to sleep until a signal is received; the appropriate " "handler will then be called. Returns nothing." msgstr "" -#: library/signal.rst:420 +#: library/signal.rst:427 msgid "See the man page :manpage:`signal(2)` for further information." msgstr "" -#: library/signal.rst:422 +#: library/signal.rst:429 msgid "" "See also :func:`sigwait`, :func:`sigwaitinfo`, :func:`sigtimedwait` and :" "func:`sigpending`." msgstr "" -#: library/signal.rst:428 +#: library/signal.rst:435 msgid "Sends a signal to the calling process. Returns nothing." msgstr "" -#: library/signal.rst:435 +#: library/signal.rst:442 msgid "" "Send signal *sig* to the process referred to by file descriptor *pidfd*. " "Python does not currently support the *siginfo* parameter; it must be " @@ -464,11 +470,11 @@ msgid "" "values are currently defined." msgstr "" -#: library/signal.rst:440 +#: library/signal.rst:447 msgid "See the :manpage:`pidfd_send_signal(2)` man page for more information." msgstr "" -#: library/signal.rst:448 +#: library/signal.rst:455 msgid "" "Send the signal *signalnum* to the thread *thread_id*, another thread in the " "same process as the caller. The target thread can be executing any code " @@ -479,86 +485,86 @@ msgid "" "running system call to fail with :exc:`InterruptedError`." msgstr "" -#: library/signal.rst:456 +#: library/signal.rst:463 msgid "" "Use :func:`threading.get_ident` or the :attr:`~threading.Thread.ident` " "attribute of :class:`threading.Thread` objects to get a suitable value for " "*thread_id*." msgstr "" -#: library/signal.rst:460 +#: library/signal.rst:467 msgid "" "If *signalnum* is 0, then no signal is sent, but error checking is still " "performed; this can be used to check if the target thread is still running." msgstr "" -#: library/signal.rst:463 +#: library/signal.rst:470 msgid "" "Raises an :ref:`auditing event ` ``signal.pthread_kill`` with " "arguments ``thread_id``, ``signalnum``." msgstr "" -#: library/signal.rst:467 +#: library/signal.rst:474 msgid "See the man page :manpage:`pthread_kill(3)` for further information." msgstr "" -#: library/signal.rst:469 +#: library/signal.rst:476 msgid "See also :func:`os.kill`." msgstr "" -#: library/signal.rst:476 +#: library/signal.rst:483 msgid "" "Fetch and/or change the signal mask of the calling thread. The signal mask " "is the set of signals whose delivery is currently blocked for the caller. " "Return the old signal mask as a set of signals." msgstr "" -#: library/signal.rst:480 +#: library/signal.rst:487 msgid "" "The behavior of the call is dependent on the value of *how*, as follows." msgstr "" -#: library/signal.rst:482 +#: library/signal.rst:489 msgid "" ":data:`SIG_BLOCK`: The set of blocked signals is the union of the current " "set and the *mask* argument." msgstr "" -#: library/signal.rst:484 +#: library/signal.rst:491 msgid "" ":data:`SIG_UNBLOCK`: The signals in *mask* are removed from the current set " "of blocked signals. It is permissible to attempt to unblock a signal which " "is not blocked." msgstr "" -#: library/signal.rst:487 +#: library/signal.rst:494 msgid "" ":data:`SIG_SETMASK`: The set of blocked signals is set to the *mask* " "argument." msgstr "" -#: library/signal.rst:490 +#: library/signal.rst:497 msgid "" "*mask* is a set of signal numbers (e.g. {:const:`signal.SIGINT`, :const:" "`signal.SIGTERM`}). Use :func:`~signal.valid_signals` for a full mask " "including all signals." msgstr "" -#: library/signal.rst:494 +#: library/signal.rst:501 msgid "" "For example, ``signal.pthread_sigmask(signal.SIG_BLOCK, [])`` reads the " "signal mask of the calling thread." msgstr "" -#: library/signal.rst:497 +#: library/signal.rst:504 msgid ":data:`SIGKILL` and :data:`SIGSTOP` cannot be blocked." msgstr "" -#: library/signal.rst:504 +#: library/signal.rst:511 msgid "See also :func:`pause`, :func:`sigpending` and :func:`sigwait`." msgstr "" -#: library/signal.rst:511 +#: library/signal.rst:518 msgid "" "Sets given interval timer (one of :const:`signal.ITIMER_REAL`, :const:" "`signal.ITIMER_VIRTUAL` or :const:`signal.ITIMER_PROF`) specified by *which* " @@ -568,7 +574,7 @@ msgid "" "zero." msgstr "" -#: library/signal.rst:518 +#: library/signal.rst:525 msgid "" "When an interval timer fires, a signal is sent to the process. The signal " "sent is dependent on the timer being used; :const:`signal.ITIMER_REAL` will " @@ -576,21 +582,21 @@ msgid "" "`SIGVTALRM`, and :const:`signal.ITIMER_PROF` will deliver :const:`SIGPROF`." msgstr "" -#: library/signal.rst:524 +#: library/signal.rst:531 msgid "The old values are returned as a tuple: (delay, interval)." msgstr "" -#: library/signal.rst:526 +#: library/signal.rst:533 msgid "" "Attempting to pass an invalid interval timer will cause an :exc:" "`ItimerError`." msgstr "" -#: library/signal.rst:534 +#: library/signal.rst:541 msgid "Returns current value of a given interval timer specified by *which*." msgstr "" -#: library/signal.rst:541 +#: library/signal.rst:548 msgid "" "Set the wakeup file descriptor to *fd*. When a signal your program has " "registered a signal handler for is received, the signal number is written as " @@ -600,7 +606,7 @@ msgid "" "signal to be fully processed." msgstr "" -#: library/signal.rst:548 +#: library/signal.rst:555 msgid "" "The old wakeup fd is returned (or -1 if file descriptor wakeup was not " "enabled). If *fd* is -1, file descriptor wakeup is disabled. If not -1, " @@ -608,7 +614,7 @@ msgid "" "*fd* before calling poll or select again." msgstr "" -#: library/signal.rst:608 +#: library/signal.rst:615 msgid "" "When threads are enabled, this function can only be called from :ref:`the " "main thread of the main interpreter `; attempting to " @@ -616,14 +622,14 @@ msgid "" "raised." msgstr "" -#: library/signal.rst:558 +#: library/signal.rst:565 msgid "" "There are two common ways to use this function. In both approaches, you use " "the fd to wake up when a signal arrives, but then they differ in how they " "determine *which* signal or signals have arrived." msgstr "" -#: library/signal.rst:563 +#: library/signal.rst:570 msgid "" "In the first approach, we read the data out of the fd's buffer, and the byte " "values give you the signal numbers. This is simple, but in rare cases it can " @@ -634,7 +640,7 @@ msgid "" "warning to be printed to stderr when signals are lost." msgstr "" -#: library/signal.rst:572 +#: library/signal.rst:579 msgid "" "In the second approach, we use the wakeup fd *only* for wakeups, and ignore " "the actual byte values. In this case, all we care about is whether the fd's " @@ -644,33 +650,33 @@ msgid "" "spurious warning messages." msgstr "" -#: library/signal.rst:579 +#: library/signal.rst:586 msgid "On Windows, the function now also supports socket handles." msgstr "" -#: library/signal.rst:582 +#: library/signal.rst:589 msgid "Added ``warn_on_full_buffer`` parameter." msgstr "" -#: library/signal.rst:587 +#: library/signal.rst:594 msgid "" "Change system call restart behaviour: if *flag* is :const:`False`, system " "calls will be restarted when interrupted by signal *signalnum*, otherwise " "system calls will be interrupted. Returns nothing." msgstr "" -#: library/signal.rst:593 +#: library/signal.rst:600 msgid "See the man page :manpage:`siginterrupt(3)` for further information." msgstr "" -#: library/signal.rst:595 +#: library/signal.rst:602 msgid "" "Note that installing a signal handler with :func:`signal` will reset the " "restart behaviour to interruptible by implicitly calling :c:func:`!" "siginterrupt` with a true *flag* value for the given signal." msgstr "" -#: library/signal.rst:602 +#: library/signal.rst:609 msgid "" "Set the handler for signal *signalnum* to the function *handler*. *handler* " "can be a callable Python object taking two arguments (see below), or one of " @@ -680,7 +686,7 @@ msgid "" "information.)" msgstr "" -#: library/signal.rst:613 +#: library/signal.rst:620 msgid "" "The *handler* is called with two arguments: the signal number and the " "current stack frame (``None`` or a frame object; for a description of frame " @@ -688,7 +694,7 @@ msgid "" "see the attribute descriptions in the :mod:`inspect` module)." msgstr "" -#: library/signal.rst:618 +#: library/signal.rst:625 msgid "" "On Windows, :func:`signal` can only be called with :const:`SIGABRT`, :const:" "`SIGFPE`, :const:`SIGILL`, :const:`SIGINT`, :const:`SIGSEGV`, :const:" @@ -698,22 +704,22 @@ msgid "" "``SIG*`` module level constant." msgstr "" -#: library/signal.rst:629 +#: library/signal.rst:636 msgid "" "Examine the set of signals that are pending for delivery to the calling " "thread (i.e., the signals which have been raised while blocked). Return the " "set of the pending signals." msgstr "" -#: library/signal.rst:635 +#: library/signal.rst:642 msgid "See the man page :manpage:`sigpending(2)` for further information." msgstr "" -#: library/signal.rst:637 +#: library/signal.rst:644 msgid "See also :func:`pause`, :func:`pthread_sigmask` and :func:`sigwait`." msgstr "" -#: library/signal.rst:644 +#: library/signal.rst:651 msgid "" "Suspend execution of the calling thread until the delivery of one of the " "signals specified in the signal set *sigset*. The function accepts the " @@ -721,17 +727,17 @@ msgid "" "number." msgstr "" -#: library/signal.rst:650 +#: library/signal.rst:657 msgid "See the man page :manpage:`sigwait(3)` for further information." msgstr "" -#: library/signal.rst:652 +#: library/signal.rst:659 msgid "" "See also :func:`pause`, :func:`pthread_sigmask`, :func:`sigpending`, :func:" "`sigwaitinfo` and :func:`sigtimedwait`." msgstr "" -#: library/signal.rst:660 +#: library/signal.rst:667 msgid "" "Suspend execution of the calling thread until the delivery of one of the " "signals specified in the signal set *sigset*. The function accepts the " @@ -742,55 +748,55 @@ msgid "" "`InterruptedError` if it is interrupted by a signal that is not in *sigset*." msgstr "" -#: library/signal.rst:669 +#: library/signal.rst:676 msgid "" "The return value is an object representing the data contained in the " "``siginfo_t`` structure, namely: ``si_signo``, ``si_code``, ``si_errno``, " "``si_pid``, ``si_uid``, ``si_status``, ``si_band``." msgstr "" -#: library/signal.rst:675 +#: library/signal.rst:682 msgid "See the man page :manpage:`sigwaitinfo(2)` for further information." msgstr "" -#: library/signal.rst:677 +#: library/signal.rst:684 msgid "See also :func:`pause`, :func:`sigwait` and :func:`sigtimedwait`." msgstr "" -#: library/signal.rst:681 +#: library/signal.rst:688 msgid "" "The function is now retried if interrupted by a signal not in *sigset* and " "the signal handler does not raise an exception (see :pep:`475` for the " "rationale)." msgstr "" -#: library/signal.rst:689 +#: library/signal.rst:696 msgid "" "Like :func:`sigwaitinfo`, but takes an additional *timeout* argument " "specifying a timeout. If *timeout* is specified as ``0``, a poll is " "performed. Returns :const:`None` if a timeout occurs." msgstr "" -#: library/signal.rst:695 +#: library/signal.rst:702 msgid "See the man page :manpage:`sigtimedwait(2)` for further information." msgstr "" -#: library/signal.rst:697 +#: library/signal.rst:704 msgid "See also :func:`pause`, :func:`sigwait` and :func:`sigwaitinfo`." msgstr "" -#: library/signal.rst:701 +#: library/signal.rst:708 msgid "" "The function is now retried with the recomputed *timeout* if interrupted by " "a signal not in *sigset* and the signal handler does not raise an exception " "(see :pep:`475` for the rationale)." msgstr "" -#: library/signal.rst:710 +#: library/signal.rst:717 msgid "Examples" msgstr "" -#: library/signal.rst:712 +#: library/signal.rst:719 msgid "" "Here is a minimal example program. It uses the :func:`alarm` function to " "limit the time spent waiting to open a file; this is useful if the file is " @@ -800,7 +806,7 @@ msgid "" "signal will be sent, and the handler raises an exception. ::" msgstr "" -#: library/signal.rst:719 +#: library/signal.rst:726 msgid "" "import signal, os\n" "\n" @@ -819,11 +825,11 @@ msgid "" "signal.alarm(0) # Disable the alarm" msgstr "" -#: library/signal.rst:736 +#: library/signal.rst:743 msgid "Note on SIGPIPE" msgstr "" -#: library/signal.rst:738 +#: library/signal.rst:745 msgid "" "Piping output of your program to tools like :manpage:`head(1)` will cause a :" "const:`SIGPIPE` signal to be sent to your process when the receiver of its " @@ -832,7 +838,7 @@ msgid "" "entry point to catch this exception as follows::" msgstr "" -#: library/signal.rst:744 +#: library/signal.rst:751 msgid "" "import os\n" "import sys\n" @@ -857,7 +863,7 @@ msgid "" " main()" msgstr "" -#: library/signal.rst:765 +#: library/signal.rst:772 msgid "" "Do not set :const:`SIGPIPE`'s disposition to :const:`SIG_DFL` in order to " "avoid :exc:`BrokenPipeError`. Doing that would cause your program to exit " @@ -865,11 +871,11 @@ msgid "" "program is still writing to it." msgstr "" -#: library/signal.rst:774 +#: library/signal.rst:781 msgid "Note on Signal Handlers and Exceptions" msgstr "" -#: library/signal.rst:776 +#: library/signal.rst:783 msgid "" "If a signal handler raises an exception, the exception will be propagated to " "the main thread and may be raised after any :term:`bytecode` instruction. " @@ -880,11 +886,11 @@ msgid "" "program in an unexpected state." msgstr "" -#: library/signal.rst:783 +#: library/signal.rst:790 msgid "To illustrate this issue, consider the following code::" msgstr "" -#: library/signal.rst:785 +#: library/signal.rst:792 msgid "" "class SpamContext:\n" " def __init__(self):\n" @@ -902,7 +908,7 @@ msgid "" " self.lock.release()" msgstr "" -#: library/signal.rst:800 +#: library/signal.rst:807 msgid "" "For many programs, especially those that merely want to exit on :exc:" "`KeyboardInterrupt`, this is not a problem, but applications that are " @@ -913,7 +919,7 @@ msgid "" "avoids :exc:`KeyboardInterrupt`::" msgstr "" -#: library/signal.rst:808 +#: library/signal.rst:815 msgid "" "import signal\n" "import socket\n" diff --git a/library/site.po b/library/site.po index edecb97da..681c9a0db 100644 --- a/library/site.po +++ b/library/site.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -177,8 +177,8 @@ msgid "" "customizations. It is typically created by a system administrator in the " "site-packages directory. If this import fails with an :exc:`ImportError` or " "its subclass exception, and the exception's :attr:`~ImportError.name` " -"attribute equals to ``'sitecustomize'``, it is silently ignored. If Python " -"is started without output streams available, as with :file:`pythonw.exe` on " +"attribute equals ``'sitecustomize'``, it is silently ignored. If Python is " +"started without output streams available, as with :file:`pythonw.exe` on " "Windows (which is used by default to start IDLE), attempted output from :mod:" "`sitecustomize` is ignored. Any other exception causes a silent and perhaps " "mysterious failure of the process." @@ -196,7 +196,7 @@ msgid "" "created in the user site-packages directory (see below), which is part of " "``sys.path`` unless disabled by :option:`-s`. If this import fails with an :" "exc:`ImportError` or its subclass exception, and the exception's :attr:" -"`~ImportError.name` attribute equals to ``'usercustomize'``, it is silently " +"`~ImportError.name` attribute equals ``'usercustomize'``, it is silently " "ignored." msgstr "" @@ -216,7 +216,7 @@ msgid "" "On systems that support :mod:`readline`, this module will also import and " "configure the :mod:`rlcompleter` module, if Python is started in :ref:" "`interactive mode ` and without the :option:`-S` option. " -"The default behavior is enable tab-completion and to use :file:`~/." +"The default behavior is to enable tab completion and to use :file:`~/." "python_history` as the history save file. To disable it, delete (or " "override) the :data:`sys.__interactivehook__` attribute in your :mod:" "`sitecustomize` or :mod:`usercustomize` module or your :envvar:" diff --git a/library/smtpd.po b/library/smtpd.po index 0c82b3e2b..0c9b8739b 100644 --- a/library/smtpd.po +++ b/library/smtpd.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/smtplib.po b/library/smtplib.po index 01868f2bc..c2e956cef 100644 --- a/library/smtplib.po +++ b/library/smtplib.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -369,11 +369,11 @@ msgid "" "first." msgstr "" -#: library/smtplib.rst:327 library/smtplib.rst:481 +#: library/smtplib.rst:327 library/smtplib.rst:483 msgid ":exc:`SMTPHeloError`" msgstr "" -#: library/smtplib.rst:328 library/smtplib.rst:482 +#: library/smtplib.rst:328 library/smtplib.rst:484 msgid "The server didn't reply properly to the ``HELO`` greeting." msgstr "" @@ -412,7 +412,7 @@ msgstr "" msgid "The server didn't accept the username/password combination." msgstr "" -#: library/smtplib.rst:418 library/smtplib.rst:491 +#: library/smtplib.rst:418 library/smtplib.rst:493 msgid ":exc:`SMTPNotSupportedError`" msgstr "" @@ -565,22 +565,24 @@ msgid "" "Send mail. The required arguments are an :rfc:`822` from-address string, a " "list of :rfc:`822` to-address strings (a bare string will be treated as a " "list with 1 address), and a message string. The caller may pass a list of " -"ESMTP options (such as ``8bitmime``) to be used in ``MAIL FROM`` commands as " -"*mail_options*. ESMTP options (such as ``DSN`` commands) that should be used " -"with all ``RCPT`` commands can be passed as *rcpt_options*. (If you need to " -"use different ESMTP options to different recipients you have to use the low-" -"level methods such as :meth:`!mail`, :meth:`!rcpt` and :meth:`!data` to send " -"the message.)" +"ESMTP options (such as ``\"8bitmime\"``) to be used in ``MAIL FROM`` " +"commands as *mail_options*. ESMTP options (such as ``DSN`` commands) that " +"should be used with all ``RCPT`` commands can be passed as *rcpt_options*. " +"Each option should be passed as a string containing the full text of the " +"option, including any potential key (for instance, ``\"NOTIFY=SUCCESS," +"FAILURE\"``). (If you need to use different ESMTP options to different " +"recipients you have to use the low-level methods such as :meth:`!mail`, :" +"meth:`!rcpt` and :meth:`!data` to send the message.)" msgstr "" -#: library/smtplib.rst:451 +#: library/smtplib.rst:453 msgid "" "The *from_addr* and *to_addrs* parameters are used to construct the message " "envelope used by the transport agents. ``sendmail`` does not modify the " "message headers in any way." msgstr "" -#: library/smtplib.rst:455 +#: library/smtplib.rst:457 msgid "" "*msg* may be a string containing characters in the ASCII range, or a byte " "string. A string is encoded to bytes using the ascii codec, and lone " @@ -588,7 +590,7 @@ msgid "" "byte string is not modified." msgstr "" -#: library/smtplib.rst:460 +#: library/smtplib.rst:462 msgid "" "If there has been no previous ``EHLO`` or ``HELO`` command this session, " "this method tries ESMTP ``EHLO`` first. If the server does ESMTP, message " @@ -597,7 +599,7 @@ msgid "" "will be tried and ESMTP options suppressed." msgstr "" -#: library/smtplib.rst:466 +#: library/smtplib.rst:468 msgid "" "This method will return normally if the mail is accepted for at least one " "recipient. Otherwise it will raise an exception. That is, if this method " @@ -607,65 +609,65 @@ msgid "" "SMTP error code and the accompanying error message sent by the server." msgstr "" -#: library/smtplib.rst:473 +#: library/smtplib.rst:475 msgid "" "If ``SMTPUTF8`` is included in *mail_options*, and the server supports it, " "*from_addr* and *to_addrs* may contain non-ASCII characters." msgstr "" -#: library/smtplib.rst:476 +#: library/smtplib.rst:478 msgid "This method may raise the following exceptions:" msgstr "" -#: library/smtplib.rst:478 +#: library/smtplib.rst:480 msgid ":exc:`SMTPRecipientsRefused`" msgstr "" -#: library/smtplib.rst:479 +#: library/smtplib.rst:481 msgid "All recipients were refused. Nobody got the mail." msgstr "" -#: library/smtplib.rst:484 +#: library/smtplib.rst:486 msgid ":exc:`SMTPSenderRefused`" msgstr "" -#: library/smtplib.rst:485 +#: library/smtplib.rst:487 msgid "The server didn't accept the *from_addr*." msgstr "" -#: library/smtplib.rst:487 +#: library/smtplib.rst:489 msgid ":exc:`SMTPDataError`" msgstr "" -#: library/smtplib.rst:488 +#: library/smtplib.rst:490 msgid "" "The server replied with an unexpected error code (other than a refusal of a " "recipient)." msgstr "" -#: library/smtplib.rst:492 +#: library/smtplib.rst:494 msgid "" "``SMTPUTF8`` was given in the *mail_options* but is not supported by the " "server." msgstr "" -#: library/smtplib.rst:495 +#: library/smtplib.rst:497 msgid "" "Unless otherwise noted, the connection will be open even after an exception " "is raised." msgstr "" -#: library/smtplib.rst:498 +#: library/smtplib.rst:500 msgid "*msg* may be a byte string." msgstr "" -#: library/smtplib.rst:501 +#: library/smtplib.rst:503 msgid "" "``SMTPUTF8`` support added, and :exc:`SMTPNotSupportedError` may be raised " "if ``SMTPUTF8`` is specified but the server does not support it." msgstr "" -#: library/smtplib.rst:509 +#: library/smtplib.rst:511 msgid "" "This is a convenience method for calling :meth:`sendmail` with the message " "represented by an :class:`email.message.Message` object. The arguments have " @@ -673,7 +675,7 @@ msgid "" "object." msgstr "" -#: library/smtplib.rst:514 +#: library/smtplib.rst:516 msgid "" "If *from_addr* is ``None`` or *to_addrs* is ``None``, ``send_message`` fills " "those arguments with addresses extracted from the headers of *msg* as " @@ -688,7 +690,7 @@ msgid "" "most recent set of :mailheader:`Resent-` headers." msgstr "" -#: library/smtplib.rst:526 +#: library/smtplib.rst:528 msgid "" "``send_message`` serializes *msg* using :class:`~email.generator." "BytesGenerator` with ``\\r\\n`` as the *linesep*, and calls :meth:`sendmail` " @@ -703,17 +705,17 @@ msgid "" "``BODY=8BITMIME`` are added to *mail_options*." msgstr "" -#: library/smtplib.rst:540 +#: library/smtplib.rst:542 msgid "Support for internationalized addresses (``SMTPUTF8``)." msgstr "" -#: library/smtplib.rst:546 +#: library/smtplib.rst:548 msgid "" "Terminate the SMTP session and close the connection. Return the result of " "the SMTP ``QUIT`` command." msgstr "" -#: library/smtplib.rst:550 +#: library/smtplib.rst:552 msgid "" "Low-level methods corresponding to the standard SMTP/ESMTP commands " "``HELP``, ``RSET``, ``NOOP``, ``MAIL``, ``RCPT``, and ``DATA`` are also " @@ -721,35 +723,35 @@ msgid "" "documented here. For details, consult the module code." msgstr "" -#: library/smtplib.rst:555 +#: library/smtplib.rst:557 msgid "Additionally, an SMTP instance has the following attributes:" msgstr "" -#: library/smtplib.rst:560 +#: library/smtplib.rst:562 msgid "The response to the ``HELO`` command, see :meth:`helo`." msgstr "" -#: library/smtplib.rst:565 +#: library/smtplib.rst:567 msgid "The response to the ``EHLO`` command, see :meth:`ehlo`." msgstr "" -#: library/smtplib.rst:570 +#: library/smtplib.rst:572 msgid "" "A boolean value indicating whether the server supports ESMTP, see :meth:" "`ehlo`." msgstr "" -#: library/smtplib.rst:576 +#: library/smtplib.rst:578 msgid "" "A dictionary of the names of SMTP service extensions supported by the " "server, see :meth:`ehlo`." msgstr "" -#: library/smtplib.rst:583 +#: library/smtplib.rst:585 msgid "SMTP Example" msgstr "" -#: library/smtplib.rst:585 +#: library/smtplib.rst:587 msgid "" "This example prompts the user for addresses needed in the message envelope " "('To' and 'From' addresses), and the message to be delivered. Note that the " @@ -759,7 +761,7 @@ msgid "" "headers explicitly::" msgstr "" -#: library/smtplib.rst:591 +#: library/smtplib.rst:593 msgid "" "import smtplib\n" "\n" @@ -789,7 +791,7 @@ msgid "" "server.quit()" msgstr "" -#: library/smtplib.rst:620 +#: library/smtplib.rst:622 msgid "" "In general, you will want to use the :mod:`email` package's features to " "construct an email message, which you can then send via :meth:`~smtplib.SMTP." diff --git a/library/sndhdr.po b/library/sndhdr.po index 5fb06b5f3..8a00d8617 100644 --- a/library/sndhdr.po +++ b/library/sndhdr.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/socket.po b/library/socket.po index 21e12327a..f5ab888be 100644 --- a/library/socket.po +++ b/library/socket.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -38,16 +38,16 @@ msgid "" "operating system socket APIs." msgstr "" -#: library/socket.rst:186 library/socket.rst:221 library/socket.rst:388 -#: library/socket.rst:483 library/socket.rst:509 library/socket.rst:527 -#: library/socket.rst:550 library/socket.rst:574 library/socket.rst:614 -#: library/socket.rst:650 library/socket.rst:674 library/socket.rst:706 -#: library/socket.rst:905 library/socket.rst:1046 library/socket.rst:1074 -#: library/socket.rst:1102 library/socket.rst:1124 library/socket.rst:1233 -#: library/socket.rst:1282 library/socket.rst:1322 library/socket.rst:1366 -#: library/socket.rst:1397 library/socket.rst:1495 library/socket.rst:1529 -#: library/socket.rst:1621 library/socket.rst:1790 library/socket.rst:1916 -#: library/socket.rst:2010 includes/wasm-notavail.rst:3 +#: library/socket.rst:188 library/socket.rst:223 library/socket.rst:390 +#: library/socket.rst:485 library/socket.rst:511 library/socket.rst:529 +#: library/socket.rst:552 library/socket.rst:576 library/socket.rst:616 +#: library/socket.rst:652 library/socket.rst:676 library/socket.rst:708 +#: library/socket.rst:850 library/socket.rst:985 library/socket.rst:1013 +#: library/socket.rst:1041 library/socket.rst:1063 library/socket.rst:1172 +#: library/socket.rst:1221 library/socket.rst:1261 library/socket.rst:1305 +#: library/socket.rst:1336 library/socket.rst:1494 library/socket.rst:1528 +#: library/socket.rst:1608 library/socket.rst:1747 library/socket.rst:1899 +#: library/socket.rst:1998 library/socket.rst:2020 includes/wasm-notavail.rst:3 msgid "Availability" msgstr "" @@ -84,24 +84,24 @@ msgstr "" msgid "A TLS/SSL wrapper for socket objects." msgstr "" -#: library/socket.rst:43 +#: library/socket.rst:45 msgid "Socket families" msgstr "" -#: library/socket.rst:45 +#: library/socket.rst:47 msgid "" "Depending on the system and the build options, various socket families are " "supported by this module." msgstr "" -#: library/socket.rst:48 +#: library/socket.rst:50 msgid "" "The address format required by a particular socket object is automatically " "selected based on the address family specified when the socket object was " "created. Socket addresses are represented as follows:" msgstr "" -#: library/socket.rst:52 +#: library/socket.rst:54 msgid "" "The address of an :const:`AF_UNIX` socket bound to a file system node is " "represented as a string, using the file system encoding and the " @@ -113,16 +113,16 @@ msgid "" "for either type of address when passing it as an argument." msgstr "" -#: library/socket.rst:62 +#: library/socket.rst:64 msgid "" "Previously, :const:`AF_UNIX` socket paths were assumed to use UTF-8 encoding." msgstr "" -#: library/socket.rst:1196 library/socket.rst:1994 +#: library/socket.rst:1135 library/socket.rst:1992 msgid "Writable :term:`bytes-like object` is now accepted." msgstr "" -#: library/socket.rst:71 +#: library/socket.rst:73 msgid "" "A pair ``(host, port)`` is used for the :const:`AF_INET` address family, " "where *host* is a string representing either a hostname in internet domain " @@ -130,7 +130,7 @@ msgid "" "``'100.50.200.5'``, and *port* is an integer." msgstr "" -#: library/socket.rst:76 +#: library/socket.rst:78 msgid "" "For IPv4 addresses, two special forms are accepted instead of a host " "address: ``''`` represents :const:`INADDR_ANY`, which is used to bind to all " @@ -140,7 +140,7 @@ msgid "" "programs." msgstr "" -#: library/socket.rst:83 +#: library/socket.rst:85 msgid "" "For :const:`AF_INET6` address family, a four-tuple ``(host, port, flowinfo, " "scope_id)`` is used, where *flowinfo* and *scope_id* represent the " @@ -151,18 +151,18 @@ msgid "" "addresses." msgstr "" -#: library/socket.rst:90 +#: library/socket.rst:92 msgid "" "For multicast addresses (with *scope_id* meaningful) *address* may not " "contain ``%scope_id`` (or ``zone id``) part. This information is superfluous " "and may be safely omitted (recommended)." msgstr "" -#: library/socket.rst:95 +#: library/socket.rst:97 msgid ":const:`AF_NETLINK` sockets are represented as pairs ``(pid, groups)``." msgstr "" -#: library/socket.rst:97 +#: library/socket.rst:99 msgid "" "Linux-only support for TIPC is available using the :const:`AF_TIPC` address " "family. TIPC is an open, non-IP based networked protocol designed for use " @@ -171,37 +171,37 @@ msgid "" "``(addr_type, v1, v2, v3 [, scope])``, where:" msgstr "" -#: library/socket.rst:103 +#: library/socket.rst:105 msgid "" "*addr_type* is one of :const:`TIPC_ADDR_NAMESEQ`, :const:`TIPC_ADDR_NAME`, " "or :const:`TIPC_ADDR_ID`." msgstr "" -#: library/socket.rst:105 +#: library/socket.rst:107 msgid "" "*scope* is one of :const:`TIPC_ZONE_SCOPE`, :const:`TIPC_CLUSTER_SCOPE`, " "and :const:`TIPC_NODE_SCOPE`." msgstr "" -#: library/socket.rst:107 +#: library/socket.rst:109 msgid "" "If *addr_type* is :const:`TIPC_ADDR_NAME`, then *v1* is the server type, " "*v2* is the port identifier, and *v3* should be 0." msgstr "" -#: library/socket.rst:110 +#: library/socket.rst:112 msgid "" "If *addr_type* is :const:`TIPC_ADDR_NAMESEQ`, then *v1* is the server type, " "*v2* is the lower port number, and *v3* is the upper port number." msgstr "" -#: library/socket.rst:113 +#: library/socket.rst:115 msgid "" "If *addr_type* is :const:`TIPC_ADDR_ID`, then *v1* is the node, *v2* is the " "reference, and *v3* should be set to 0." msgstr "" -#: library/socket.rst:116 +#: library/socket.rst:118 msgid "" "A tuple ``(interface, )`` is used for the :const:`AF_CAN` address family, " "where *interface* is a string representing a network interface name like " @@ -209,22 +209,22 @@ msgid "" "from all network interfaces of this family." msgstr "" -#: library/socket.rst:121 +#: library/socket.rst:123 msgid "" -":const:`CAN_ISOTP` protocol require a tuple ``(interface, rx_addr, " +":const:`CAN_ISOTP` protocol requires a tuple ``(interface, rx_addr, " "tx_addr)`` where both additional parameters are unsigned long integer that " "represent a CAN identifier (standard or extended)." msgstr "" -#: library/socket.rst:124 +#: library/socket.rst:126 msgid "" -":const:`CAN_J1939` protocol require a tuple ``(interface, name, pgn, addr)`` " -"where additional parameters are 64-bit unsigned integer representing the ECU " -"name, a 32-bit unsigned integer representing the Parameter Group Number " -"(PGN), and an 8-bit integer representing the address." +":const:`CAN_J1939` protocol requires a tuple ``(interface, name, pgn, " +"addr)`` where additional parameters are 64-bit unsigned integer representing " +"the ECU name, a 32-bit unsigned integer representing the Parameter Group " +"Number (PGN), and an 8-bit integer representing the address." msgstr "" -#: library/socket.rst:129 +#: library/socket.rst:131 msgid "" "A string or a tuple ``(id, unit)`` is used for the :const:`SYSPROTO_CONTROL` " "protocol of the :const:`PF_SYSTEM` family. The string is the name of a " @@ -233,150 +233,150 @@ msgid "" "used." msgstr "" -#: library/socket.rst:137 +#: library/socket.rst:139 msgid "" ":const:`AF_BLUETOOTH` supports the following protocols and address formats:" msgstr "" -#: library/socket.rst:140 +#: library/socket.rst:142 msgid "" ":const:`BTPROTO_L2CAP` accepts ``(bdaddr, psm)`` where ``bdaddr`` is the " "Bluetooth address as a string and ``psm`` is an integer." msgstr "" -#: library/socket.rst:143 +#: library/socket.rst:145 msgid "" ":const:`BTPROTO_RFCOMM` accepts ``(bdaddr, channel)`` where ``bdaddr`` is " "the Bluetooth address as a string and ``channel`` is an integer." msgstr "" -#: library/socket.rst:146 +#: library/socket.rst:148 msgid ":const:`BTPROTO_HCI` accepts a format that depends on your OS." msgstr "" -#: library/socket.rst:148 +#: library/socket.rst:150 msgid "" "On Linux it accepts a tuple ``(device_id,)`` where ``device_id`` is an " "integer specifying the number of the Bluetooth device." msgstr "" -#: library/socket.rst:150 +#: library/socket.rst:152 msgid "" "On FreeBSD, NetBSD and DragonFly BSD it accepts ``bdaddr`` where ``bdaddr`` " "is the Bluetooth address as a string." msgstr "" -#: library/socket.rst:153 +#: library/socket.rst:155 msgid "NetBSD and DragonFlyBSD support added." msgstr "" -#: library/socket.rst:156 +#: library/socket.rst:158 msgid "FreeBSD support added." msgstr "" -#: library/socket.rst:159 +#: library/socket.rst:161 msgid "" ":const:`BTPROTO_SCO` accepts ``bdaddr`` where ``bdaddr`` is the Bluetooth " "address as a string or a :class:`bytes` object. (ex. ``'12:23:34:45:56:67'`` " "or ``b'12:23:34:45:56:67'``) This protocol is not supported under FreeBSD." msgstr "" -#: library/socket.rst:164 +#: library/socket.rst:166 msgid "" ":const:`AF_ALG` is a Linux-only socket based interface to Kernel " "cryptography. An algorithm socket is configured with a tuple of two to four " "elements ``(type, name [, feat [, mask]])``, where:" msgstr "" -#: library/socket.rst:168 +#: library/socket.rst:170 msgid "" "*type* is the algorithm type as string, e.g. ``aead``, ``hash``, " "``skcipher`` or ``rng``." msgstr "" -#: library/socket.rst:171 +#: library/socket.rst:173 msgid "" "*name* is the algorithm name and operation mode as string, e.g. ``sha256``, " "``hmac(sha256)``, ``cbc(aes)`` or ``drbg_nopr_ctr_aes256``." msgstr "" -#: library/socket.rst:174 +#: library/socket.rst:176 msgid "*feat* and *mask* are unsigned 32bit integers." msgstr "" -#: library/socket.rst:178 +#: library/socket.rst:180 msgid "Some algorithm types require more recent Kernels." msgstr "" -#: library/socket.rst:182 +#: library/socket.rst:184 msgid "" ":const:`AF_VSOCK` allows communication between virtual machines and their " "hosts. The sockets are represented as a ``(CID, port)`` tuple where the " "context ID or CID and port are integers." msgstr "" -#: library/socket.rst:188 +#: library/socket.rst:190 msgid "See :manpage:`vsock(7)`" msgstr "" -#: library/socket.rst:192 +#: library/socket.rst:194 msgid "" ":const:`AF_PACKET` is a low-level interface directly to network devices. The " "addresses are represented by the tuple ``(ifname, proto[, pkttype[, hatype[, " "addr]]])`` where:" msgstr "" -#: library/socket.rst:196 +#: library/socket.rst:198 msgid "*ifname* - String specifying the device name." msgstr "" -#: library/socket.rst:197 +#: library/socket.rst:199 msgid "" "*proto* - The Ethernet protocol number. May be :data:`ETH_P_ALL` to capture " "all protocols, one of the :ref:`ETHERTYPE_* constants ` or any other Ethernet protocol number." msgstr "" -#: library/socket.rst:201 +#: library/socket.rst:203 msgid "*pkttype* - Optional integer specifying the packet type:" msgstr "" -#: library/socket.rst:203 +#: library/socket.rst:205 msgid "``PACKET_HOST`` (the default) - Packet addressed to the local host." msgstr "" -#: library/socket.rst:204 +#: library/socket.rst:206 msgid "``PACKET_BROADCAST`` - Physical-layer broadcast packet." msgstr "" -#: library/socket.rst:205 +#: library/socket.rst:207 msgid "" "``PACKET_MULTICAST`` - Packet sent to a physical-layer multicast address." msgstr "" -#: library/socket.rst:206 +#: library/socket.rst:208 msgid "" "``PACKET_OTHERHOST`` - Packet to some other host that has been caught by a " "device driver in promiscuous mode." msgstr "" -#: library/socket.rst:208 +#: library/socket.rst:210 msgid "" "``PACKET_OUTGOING`` - Packet originating from the local host that is looped " "back to a packet socket." msgstr "" -#: library/socket.rst:210 +#: library/socket.rst:212 msgid "*hatype* - Optional integer specifying the ARP hardware address type." msgstr "" -#: library/socket.rst:211 +#: library/socket.rst:213 msgid "" "*addr* - Optional bytes-like object specifying the hardware physical " "address, whose interpretation depends on the device." msgstr "" -#: library/socket.rst:216 +#: library/socket.rst:218 msgid "" ":const:`AF_QIPCRTR` is a Linux-only socket based interface for communicating " "with services running on co-processors in Qualcomm platforms. The address " @@ -384,7 +384,7 @@ msgid "" "*port* are non-negative integers." msgstr "" -#: library/socket.rst:225 +#: library/socket.rst:227 msgid "" ":const:`IPPROTO_UDPLITE` is a variant of UDP which allows you to specify " "what portion of a packet is covered with the checksum. It adds two socket " @@ -395,14 +395,14 @@ msgid "" "of their data. In both cases ``length`` should be in ``range(8, 2**16, 8)``." msgstr "" -#: library/socket.rst:234 +#: library/socket.rst:236 msgid "" "Such a socket should be constructed with ``socket(AF_INET, SOCK_DGRAM, " "IPPROTO_UDPLITE)`` for IPv4 or ``socket(AF_INET6, SOCK_DGRAM, " "IPPROTO_UDPLITE)`` for IPv6." msgstr "" -#: library/socket.rst:242 +#: library/socket.rst:244 msgid "" ":const:`AF_HYPERV` is a Windows-only socket based interface for " "communicating with Hyper-V hosts and guests. The address family is " @@ -410,49 +410,49 @@ msgid "" "``service_id`` are UUID strings." msgstr "" -#: library/socket.rst:247 +#: library/socket.rst:249 msgid "" "The ``vm_id`` is the virtual machine identifier or a set of known VMID " "values if the target is not a specific virtual machine. Known VMID constants " "defined on ``socket`` are:" msgstr "" -#: library/socket.rst:251 +#: library/socket.rst:253 msgid "``HV_GUID_ZERO``" msgstr "" -#: library/socket.rst:252 +#: library/socket.rst:254 msgid "``HV_GUID_BROADCAST``" msgstr "" -#: library/socket.rst:253 +#: library/socket.rst:255 msgid "" "``HV_GUID_WILDCARD`` - Used to bind on itself and accept connections from " "all partitions." msgstr "" -#: library/socket.rst:255 +#: library/socket.rst:257 msgid "" "``HV_GUID_CHILDREN`` - Used to bind on itself and accept connection from " "child partitions." msgstr "" -#: library/socket.rst:257 +#: library/socket.rst:259 msgid "``HV_GUID_LOOPBACK`` - Used as a target to itself." msgstr "" -#: library/socket.rst:258 +#: library/socket.rst:260 msgid "" "``HV_GUID_PARENT`` - When used as a bind accepts connection from the parent " "partition. When used as an address target it will connect to the parent " "partition." msgstr "" -#: library/socket.rst:261 +#: library/socket.rst:263 msgid "The ``service_id`` is the service identifier of the registered service." msgstr "" -#: library/socket.rst:265 +#: library/socket.rst:267 msgid "" "If you use a hostname in the *host* portion of IPv4/v6 socket address, the " "program may show a nondeterministic behavior, as Python uses the first " @@ -462,41 +462,41 @@ msgid "" "deterministic behavior use a numeric address in *host* portion." msgstr "" -#: library/socket.rst:272 +#: library/socket.rst:274 msgid "" "All errors raise exceptions. The normal exceptions for invalid argument " "types and out-of-memory conditions can be raised. Errors related to socket " "or address semantics raise :exc:`OSError` or one of its subclasses." msgstr "" -#: library/socket.rst:277 +#: library/socket.rst:279 msgid "" "Non-blocking mode is supported through :meth:`~socket.setblocking`. A " "generalization of this based on timeouts is supported through :meth:`~socket." "settimeout`." msgstr "" -#: library/socket.rst:283 +#: library/socket.rst:285 msgid "Module contents" msgstr "" -#: library/socket.rst:285 +#: library/socket.rst:287 msgid "The module :mod:`socket` exports the following elements." msgstr "" -#: library/socket.rst:289 +#: library/socket.rst:291 msgid "Exceptions" msgstr "" -#: library/socket.rst:293 +#: library/socket.rst:295 msgid "A deprecated alias of :exc:`OSError`." msgstr "" -#: library/socket.rst:295 +#: library/socket.rst:297 msgid "Following :pep:`3151`, this class was made an alias of :exc:`OSError`." msgstr "" -#: library/socket.rst:301 +#: library/socket.rst:303 msgid "" "A subclass of :exc:`OSError`, this exception is raised for address-related " "errors, i.e. for functions that use *h_errno* in the POSIX C API, including :" @@ -506,11 +506,11 @@ msgid "" "description of *h_errno*, as returned by the :c:func:`hstrerror` C function." msgstr "" -#: library/socket.rst:322 library/socket.rst:335 +#: library/socket.rst:324 library/socket.rst:337 msgid "This class was made a subclass of :exc:`OSError`." msgstr "" -#: library/socket.rst:314 +#: library/socket.rst:316 msgid "" "A subclass of :exc:`OSError`, this exception is raised for address-related " "errors by :func:`getaddrinfo` and :func:`getnameinfo`. The accompanying " @@ -520,11 +520,11 @@ msgid "" "match one of the :const:`!EAI_\\*` constants defined in this module." msgstr "" -#: library/socket.rst:327 +#: library/socket.rst:329 msgid "A deprecated alias of :exc:`TimeoutError`." msgstr "" -#: library/socket.rst:329 +#: library/socket.rst:331 msgid "" "A subclass of :exc:`OSError`, this exception is raised when a timeout occurs " "on a socket which has had timeouts enabled via a prior call to :meth:" @@ -533,21 +533,21 @@ msgid "" "currently always \"timed out\"." msgstr "" -#: library/socket.rst:338 +#: library/socket.rst:340 msgid "This class was made an alias of :exc:`TimeoutError`." msgstr "" -#: library/socket.rst:343 +#: library/socket.rst:345 msgid "Constants" msgstr "" -#: library/socket.rst:345 +#: library/socket.rst:347 msgid "" "The AF_* and SOCK_* constants are now :class:`AddressFamily` and :class:" "`SocketKind` :class:`.IntEnum` collections." msgstr "" -#: library/socket.rst:354 +#: library/socket.rst:356 msgid "" "These constants represent the address (and protocol) families, used for the " "first argument to :func:`~socket.socket`. If the :const:`AF_UNIX` constant " @@ -555,14 +555,14 @@ msgid "" "available depending on the system." msgstr "" -#: library/socket.rst:361 +#: library/socket.rst:363 msgid "" ":const:`AF_UNSPEC` means that :func:`getaddrinfo` should return socket " "addresses for any address family (either IPv4, IPv6, or any other) that can " "be used." msgstr "" -#: library/socket.rst:371 +#: library/socket.rst:373 msgid "" "These constants represent the socket types, used for the second argument to :" "func:`~socket.socket`. More constants may be available depending on the " @@ -570,20 +570,20 @@ msgid "" "generally useful.)" msgstr "" -#: library/socket.rst:379 +#: library/socket.rst:381 msgid "" "These two constants, if defined, can be combined with the socket types and " "allow you to set some flags atomically (thus avoiding possible race " "conditions and the need for separate calls)." msgstr "" -#: library/socket.rst:385 +#: library/socket.rst:387 msgid "" "`Secure File Descriptor Handling `_ for a more thorough explanation." msgstr "" -#: library/socket.rst:409 +#: library/socket.rst:411 msgid "" "Many constants of these forms, documented in the Unix documentation on " "sockets and/or the IP protocol, are also defined in the socket module. They " @@ -593,41 +593,41 @@ msgid "" "symbols, default values are provided." msgstr "" -#: library/socket.rst:416 +#: library/socket.rst:418 msgid "" "``SO_DOMAIN``, ``SO_PROTOCOL``, ``SO_PEERSEC``, ``SO_PASSSEC``, " "``TCP_USER_TIMEOUT``, ``TCP_CONGESTION`` were added." msgstr "" -#: library/socket.rst:420 +#: library/socket.rst:422 msgid "" "On Windows, ``TCP_FASTOPEN``, ``TCP_KEEPCNT`` appear if run-time Windows " "supports." msgstr "" -#: library/socket.rst:424 +#: library/socket.rst:426 msgid "``TCP_NOTSENT_LOWAT`` was added." msgstr "" -#: library/socket.rst:427 +#: library/socket.rst:429 msgid "" "On Windows, ``TCP_KEEPIDLE``, ``TCP_KEEPINTVL`` appear if run-time Windows " "supports." msgstr "" -#: library/socket.rst:430 +#: library/socket.rst:432 msgid "" "``IP_RECVTOS`` was added. Added ``TCP_KEEPALIVE``. On MacOS this constant " "can be used in the same way that ``TCP_KEEPIDLE`` is used on Linux." msgstr "" -#: library/socket.rst:435 +#: library/socket.rst:437 msgid "" "Added ``TCP_CONNECTION_INFO``. On MacOS this constant can be used in the " "same way that ``TCP_INFO`` is used on Linux and BSD." msgstr "" -#: library/socket.rst:439 +#: library/socket.rst:441 msgid "" "Added ``SO_RTABLE`` and ``SO_USER_COOKIE``. On OpenBSD and FreeBSD " "respectively those constants can be used in the same way that ``SO_MARK`` is " @@ -643,136 +643,136 @@ msgid "" "``IP_DROP_SOURCE_MEMBERSHIP``." msgstr "" -#: library/socket.rst:453 +#: library/socket.rst:455 msgid "" "Added ``SO_BINDTOIFINDEX``. On Linux this constant can be used in the same " "way that ``SO_BINDTODEVICE`` is used, but with the index of a network " "interface instead of its name." msgstr "" -#: library/socket.rst:547 library/socket.rst:571 +#: library/socket.rst:549 library/socket.rst:573 msgid "" "Many constants of these forms, documented in the Linux documentation, are " "also defined in the socket module." msgstr "" -#: library/socket.rst:470 +#: library/socket.rst:472 msgid "NetBSD support was added." msgstr "" -#: library/socket.rst:473 +#: library/socket.rst:475 msgid "Restored missing ``CAN_RAW_ERR_FILTER`` on Linux." msgstr "" -#: library/socket.rst:479 +#: library/socket.rst:481 msgid "" "CAN_BCM, in the CAN protocol family, is the broadcast manager (BCM) " "protocol. Broadcast manager constants, documented in the Linux " "documentation, are also defined in the socket module." msgstr "" -#: library/socket.rst:486 +#: library/socket.rst:488 msgid "" "The :data:`CAN_BCM_CAN_FD_FRAME` flag is only available on Linux >= 4.8." msgstr "" -#: library/socket.rst:492 +#: library/socket.rst:494 msgid "" "Enables CAN FD support in a CAN_RAW socket. This is disabled by default. " "This allows your application to send both CAN and CAN FD frames; however, " "you must accept both CAN and CAN FD frames when reading from the socket." msgstr "" -#: library/socket.rst:507 +#: library/socket.rst:509 msgid "This constant is documented in the Linux documentation." msgstr "" -#: library/socket.rst:504 +#: library/socket.rst:506 msgid "" "Joins the applied CAN filters such that only CAN frames that match all given " "CAN filters are passed to user space." msgstr "" -#: library/socket.rst:515 +#: library/socket.rst:517 msgid "" "CAN_ISOTP, in the CAN protocol family, is the ISO-TP (ISO 15765-2) protocol. " "ISO-TP constants, documented in the Linux documentation." msgstr "" -#: library/socket.rst:524 +#: library/socket.rst:526 msgid "" "CAN_J1939, in the CAN protocol family, is the SAE J1939 protocol. J1939 " "constants, documented in the Linux documentation." msgstr "" -#: library/socket.rst:535 +#: library/socket.rst:537 msgid "" "These two constants, documented in the FreeBSD divert(4) manual page, are " "also defined in the socket module." msgstr "" -#: library/socket.rst:555 +#: library/socket.rst:557 msgid "" ":data:`!ETH_P_ALL` can be used in the :class:`~socket.socket` constructor as " "*proto* for the :const:`AF_PACKET` family in order to capture every packet, " "regardless of protocol." msgstr "" -#: library/socket.rst:559 +#: library/socket.rst:561 msgid "For more information, see the :manpage:`packet(7)` manpage." msgstr "" -#: library/socket.rst:584 +#: library/socket.rst:586 msgid "" "Constants for Windows' WSAIoctl(). The constants are used as arguments to " "the :meth:`~socket.socket.ioctl` method of socket objects." msgstr "" -#: library/socket.rst:1611 +#: library/socket.rst:1610 msgid "``SIO_LOOPBACK_FAST_PATH`` was added." msgstr "" -#: library/socket.rst:593 +#: library/socket.rst:595 msgid "" "TIPC related constants, matching the ones exported by the C socket API. See " "the TIPC documentation for more information." msgstr "" -#: library/socket.rst:600 +#: library/socket.rst:602 msgid "Constants for Linux Kernel cryptography." msgstr "" -#: library/socket.rst:612 +#: library/socket.rst:614 msgid "Constants for Linux host/guest communication." msgstr "" -#: library/socket.rst:626 +#: library/socket.rst:628 msgid "" "This constant contains a boolean value which indicates if IPv6 is supported " "on this platform." msgstr "" -#: library/socket.rst:632 +#: library/socket.rst:634 msgid "" "These are string constants containing Bluetooth addresses with special " "meanings. For example, :const:`BDADDR_ANY` can be used to indicate any " "address when specifying the binding socket with :const:`BTPROTO_RFCOMM`." msgstr "" -#: library/socket.rst:641 +#: library/socket.rst:643 msgid "" "For use with :const:`BTPROTO_HCI`. :const:`!HCI_FILTER` is only available on " "Linux and FreeBSD. :const:`!HCI_TIME_STAMP` and :const:`!HCI_DATA_DIR` are " "only available on Linux." msgstr "" -#: library/socket.rst:647 +#: library/socket.rst:649 msgid "" "Constant for Qualcomm's IPC router protocol, used to communicate with " "service providing remote processors." msgstr "" -#: library/socket.rst:656 +#: library/socket.rst:658 msgid "" "LOCAL_CREDS and LOCAL_CREDS_PERSISTENT can be used with SOCK_DGRAM, " "SOCK_STREAM sockets, equivalent to Linux/DragonFlyBSD SO_PASSCRED, while " @@ -781,147 +781,75 @@ msgid "" "message type." msgstr "" -#: library/socket.rst:669 +#: library/socket.rst:671 msgid "" "Constant to optimize CPU locality, to be used in conjunction with :data:" "`SO_REUSEPORT`." msgstr "" -#: library/socket.rst:689 +#: library/socket.rst:691 msgid "Constants for Windows Hyper-V sockets for host/guest communications." msgstr "" -#: library/socket.rst:702 +#: library/socket.rst:704 msgid "" "`IEEE 802.3 protocol number `_. constants." msgstr "" -#: library/socket.rst:714 +#: library/socket.rst:716 msgid "" "These constants are used by the :meth:`~socket.socket.shutdown` method of " "socket objects." msgstr "" -#: library/socket.rst:719 +#: library/socket.rst:721 msgid "Functions" msgstr "" -#: library/socket.rst:722 +#: library/socket.rst:724 msgid "Creating sockets" msgstr "" -#: library/socket.rst:724 +#: library/socket.rst:726 msgid "" "The following functions all create :ref:`socket objects `." msgstr "" #: library/socket.rst:729 msgid "" -"Create a new socket using the given address family, socket type and protocol " -"number. The address family should be :const:`AF_INET` (the default), :const:" -"`AF_INET6`, :const:`AF_UNIX`, :const:`AF_CAN`, :const:`AF_PACKET`, or :const:" -"`AF_RDS`. The socket type should be :const:`SOCK_STREAM` (the default), :" -"const:`SOCK_DGRAM`, :const:`SOCK_RAW` or perhaps one of the other ``SOCK_`` " -"constants. The protocol number is usually zero and may be omitted or in the " -"case where the address family is :const:`AF_CAN` the protocol should be one " -"of :const:`CAN_RAW`, :const:`CAN_BCM`, :const:`CAN_ISOTP` or :const:" -"`CAN_J1939`." -msgstr "" - -#: library/socket.rst:739 -msgid "" -"If *fileno* is specified, the values for *family*, *type*, and *proto* are " -"auto-detected from the specified file descriptor. Auto-detection can be " -"overruled by calling the function with explicit *family*, *type*, or *proto* " -"arguments. This only affects how Python represents e.g. the return value " -"of :meth:`socket.getpeername` but not the actual OS resource. Unlike :func:" -"`socket.fromfd`, *fileno* will return the same socket and not a duplicate. " -"This may help close a detached socket using :meth:`socket.close`." -msgstr "" - -#: library/socket.rst:894 library/socket.rst:1524 -msgid "The newly created socket is :ref:`non-inheritable `." -msgstr "" - -#: library/socket.rst:750 -msgid "" -"Raises an :ref:`auditing event ` ``socket.__new__`` with arguments " -"``self``, ``family``, ``type``, ``protocol``." -msgstr "" - -#: library/socket.rst:752 -msgid "The AF_CAN family was added. The AF_RDS family was added." -msgstr "" - -#: library/socket.rst:756 -msgid "The CAN_BCM protocol was added." -msgstr "" - -#: library/socket.rst:896 -msgid "The returned socket is now non-inheritable." -msgstr "" - -#: library/socket.rst:762 -msgid "The CAN_ISOTP protocol was added." -msgstr "" - -#: library/socket.rst:765 -msgid "" -"When :const:`SOCK_NONBLOCK` or :const:`SOCK_CLOEXEC` bit flags are applied " -"to *type* they are cleared, and :attr:`socket.type` will not reflect them. " -"They are still passed to the underlying system ``socket()`` call. Therefore," -msgstr "" - -#: library/socket.rst:773 -msgid "" -"sock = socket.socket(\n" -" socket.AF_INET,\n" -" socket.SOCK_STREAM | socket.SOCK_NONBLOCK)" -msgstr "" - -#: library/socket.rst:777 -msgid "" -"will still create a non-blocking socket on OSes that support " -"``SOCK_NONBLOCK``, but ``sock.type`` will be set to ``socket.SOCK_STREAM``." -msgstr "" - -#: library/socket.rst:781 -msgid "The CAN_J1939 protocol was added." -msgstr "" - -#: library/socket.rst:784 -msgid "The IPPROTO_MPTCP protocol was added." +"The :class:`socket ` class constructor creates a new socket " +"directly; see :ref:`socket-objects` for its parameters and full description." msgstr "" -#: library/socket.rst:789 +#: library/socket.rst:734 msgid "" "Build a pair of connected socket objects using the given address family, " "socket type, and protocol number. Address family, socket type, and protocol " -"number are as for the :func:`~socket.socket` function above. The default " -"family is :const:`AF_UNIX` if defined on the platform; otherwise, the " -"default is :const:`AF_INET`." +"number are as for the :func:`~socket.socket` function. The default family " +"is :const:`AF_UNIX` if defined on the platform; otherwise, the default is :" +"const:`AF_INET`." msgstr "" -#: library/socket.rst:794 +#: library/socket.rst:739 msgid "The newly created sockets are :ref:`non-inheritable `." msgstr "" -#: library/socket.rst:796 +#: library/socket.rst:741 msgid "" "The returned socket objects now support the whole socket API, rather than a " "subset." msgstr "" -#: library/socket.rst:800 +#: library/socket.rst:745 msgid "The returned sockets are now non-inheritable." msgstr "" -#: library/socket.rst:803 +#: library/socket.rst:748 msgid "Windows support added." msgstr "" -#: library/socket.rst:809 +#: library/socket.rst:754 msgid "" "Connect to a TCP service listening on the internet *address* (a 2-tuple " "``(host, port)``), and return the socket object. This is a higher-level " @@ -932,21 +860,21 @@ msgid "" "IPv4 and IPv6." msgstr "" -#: library/socket.rst:817 +#: library/socket.rst:762 msgid "" "Passing the optional *timeout* parameter will set the timeout on the socket " "instance before attempting to connect. If no *timeout* is supplied, the " "global default timeout setting returned by :func:`getdefaulttimeout` is used." msgstr "" -#: library/socket.rst:822 +#: library/socket.rst:767 msgid "" "If supplied, *source_address* must be a 2-tuple ``(host, port)`` for the " "socket to bind to as its source address before connecting. If host or port " "are '' or 0 respectively the OS default behavior will be used." msgstr "" -#: library/socket.rst:826 +#: library/socket.rst:771 msgid "" "When a connection cannot be created, an exception is raised. By default, it " "is the exception from the last address in the list. If *all_errors* is " @@ -954,21 +882,21 @@ msgid "" "attempts." msgstr "" -#: library/socket.rst:831 +#: library/socket.rst:776 msgid "*source_address* was added." msgstr "" -#: library/socket.rst:834 +#: library/socket.rst:779 msgid "*all_errors* was added." msgstr "" -#: library/socket.rst:840 +#: library/socket.rst:785 msgid "" "Convenience function which creates a TCP socket bound to *address* (a 2-" "tuple ``(host, port)``) and returns the socket object." msgstr "" -#: library/socket.rst:843 +#: library/socket.rst:788 msgid "" "*family* should be either :data:`AF_INET` or :data:`AF_INET6`. *backlog* is " "the queue size passed to :meth:`socket.listen`; if not specified , a default " @@ -976,7 +904,7 @@ msgid "" "`SO_REUSEPORT` socket option." msgstr "" -#: library/socket.rst:848 +#: library/socket.rst:793 msgid "" "If *dualstack_ipv6* is true, *family* is :data:`AF_INET6` and the platform " "supports it the socket will be able to accept both IPv4 and IPv6 " @@ -989,7 +917,7 @@ msgid "" "parameter can be used in conjunction with :func:`has_dualstack_ipv6`:" msgstr "" -#: library/socket.rst:861 +#: library/socket.rst:806 msgid "" "import socket\n" "\n" @@ -1001,25 +929,25 @@ msgid "" " s = socket.create_server(addr)" msgstr "" -#: library/socket.rst:870 +#: library/socket.rst:815 msgid "" "On POSIX platforms the :data:`SO_REUSEADDR` socket option is set in order to " "immediately reuse previous sockets which were bound on the same *address* " "and remained in TIME_WAIT state." msgstr "" -#: library/socket.rst:878 +#: library/socket.rst:823 msgid "" "Return ``True`` if the platform supports creating a TCP socket which can " "handle both IPv4 and IPv6 connections." msgstr "" -#: library/socket.rst:885 +#: library/socket.rst:830 msgid "" "Duplicate the file descriptor *fd* (an integer as returned by a file " "object's :meth:`~io.IOBase.fileno` method) and build a socket object from " "the result. Address family, socket type and protocol number are as for the :" -"func:`~socket.socket` function above. The file descriptor should refer to a " +"func:`~socket.socket` function. The file descriptor should refer to a " "socket, but this is not checked --- subsequent operations on the object may " "fail if the file descriptor is invalid. This function is rarely needed, but " "can be used to get or set socket options on a socket passed to a program as " @@ -1027,39 +955,41 @@ msgid "" "daemon). The socket is assumed to be in blocking mode." msgstr "" -#: library/socket.rst:902 -msgid "" -"Instantiate a socket from data obtained from the :meth:`socket.share` " -"method. The socket is assumed to be in blocking mode." +#: library/socket.rst:1374 library/socket.rst:1523 +msgid "The newly created socket is :ref:`non-inheritable `." msgstr "" -#: library/socket.rst:912 +#: library/socket.rst:1385 +msgid "The returned socket is now non-inheritable." +msgstr "" + +#: library/socket.rst:847 msgid "" -"This is a Python type object that represents the socket object type. It is " -"the same as ``type(socket(...))``." +"Instantiate a socket from data obtained from the :meth:`socket.share` " +"method. The socket is assumed to be in blocking mode." msgstr "" -#: library/socket.rst:917 +#: library/socket.rst:856 msgid "Other functions" msgstr "" -#: library/socket.rst:919 +#: library/socket.rst:858 msgid "The :mod:`socket` module also offers various network-related services:" msgstr "" -#: library/socket.rst:924 +#: library/socket.rst:863 msgid "" "Close a socket file descriptor. This is like :func:`os.close`, but for " -"sockets. On some platforms (most noticeable Windows) :func:`os.close` does " -"not work for socket file descriptors." +"sockets. On some platforms (most notably Windows) :func:`os.close` does not " +"work for socket file descriptors." msgstr "" -#: library/socket.rst:932 +#: library/socket.rst:871 msgid "" "This function wraps the C function ``getaddrinfo`` of the underlying system." msgstr "" -#: library/socket.rst:934 +#: library/socket.rst:873 msgid "" "Translate the *host*/*port* argument into a sequence of 5-tuples that " "contain all the necessary arguments for creating a socket connected to that " @@ -1069,7 +999,7 @@ msgid "" "and *port*, you can pass ``NULL`` to the underlying C API." msgstr "" -#: library/socket.rst:941 +#: library/socket.rst:880 msgid "" "The *family*, *type* and *proto* arguments can be optionally specified in " "order to provide options and limit the list of addresses returned. Pass " @@ -1077,7 +1007,7 @@ msgid "" "limit the results. See the note below for details." msgstr "" -#: library/socket.rst:946 +#: library/socket.rst:885 msgid "" "The *flags* argument can be one or several of the ``AI_*`` constants, and " "will influence how results are computed and returned. For example, :const:" @@ -1085,15 +1015,15 @@ msgid "" "if *host* is a domain name." msgstr "" -#: library/socket.rst:951 +#: library/socket.rst:890 msgid "The function returns a list of 5-tuples with the following structure:" msgstr "" -#: library/socket.rst:953 +#: library/socket.rst:892 msgid "``(family, type, proto, canonname, sockaddr)``" msgstr "" -#: library/socket.rst:955 +#: library/socket.rst:894 msgid "" "In these tuples, *family*, *type*, *proto* are all integers and are meant to " "be passed to the :func:`~socket.socket` function. *canonname* will be a " @@ -1105,7 +1035,7 @@ msgid "" "`AF_INET6`), and is meant to be passed to the :meth:`socket.connect` method." msgstr "" -#: library/socket.rst:967 +#: library/socket.rst:906 msgid "" "If you intend to use results from :func:`!getaddrinfo` to create a socket " "(rather than, for example, retrieve *canonname*), consider limiting the " @@ -1114,13 +1044,13 @@ msgid "" "application can handle." msgstr "" -#: library/socket.rst:973 +#: library/socket.rst:912 msgid "" "The behavior with default values of *family*, *type*, *proto* and *flags* is " "system-specific." msgstr "" -#: library/socket.rst:976 +#: library/socket.rst:915 msgid "" "Many systems (for example, most Linux configurations) will return a sorted " "list of all matching addresses. These addresses should generally be tried in " @@ -1130,27 +1060,27 @@ msgid "" "attempts." msgstr "" -#: library/socket.rst:983 +#: library/socket.rst:922 msgid "" "Some systems will, however, only return a single address. (For example, this " "was reported on Solaris and AIX configurations.) On these systems, limiting " "the *type* and/or *proto* helps ensure that this address is usable." msgstr "" -#: library/socket.rst:988 +#: library/socket.rst:927 msgid "" "Raises an :ref:`auditing event ` ``socket.getaddrinfo`` with " "arguments ``host``, ``port``, ``family``, ``type``, ``protocol``." msgstr "" -#: library/socket.rst:990 +#: library/socket.rst:929 msgid "" "The following example fetches address information for a hypothetical TCP " "connection to ``example.org`` on port 80 (results may differ on your system " "if IPv6 isn't enabled)::" msgstr "" -#: library/socket.rst:994 +#: library/socket.rst:933 msgid "" ">>> socket.getaddrinfo(\"example.org\", 80, proto=socket.IPPROTO_TCP)\n" "[(socket.AF_INET6, socket.SOCK_STREAM,\n" @@ -1159,17 +1089,17 @@ msgid "" " 6, '', ('93.184.216.34', 80))]" msgstr "" -#: library/socket.rst:1000 +#: library/socket.rst:939 msgid "parameters can now be passed using keyword arguments." msgstr "" -#: library/socket.rst:1003 +#: library/socket.rst:942 msgid "" "for IPv6 multicast addresses, string representing an address will not " "contain ``%scope_id`` part." msgstr "" -#: library/socket.rst:1011 +#: library/socket.rst:950 msgid "" "Return a fully qualified domain name for *name*. If *name* is omitted or " "empty, it is interpreted as the local host. To find the fully qualified " @@ -1180,7 +1110,7 @@ msgid "" "``'0.0.0.0'``, the hostname from :func:`gethostname` is returned." msgstr "" -#: library/socket.rst:1022 +#: library/socket.rst:961 msgid "" "Translate a host name to IPv4 address format. The IPv4 address is returned " "as a string, such as ``'100.50.200.5'``. If the host name is an IPv4 " @@ -1190,13 +1120,13 @@ msgid "" "stack support." msgstr "" -#: library/socket.rst:1044 +#: library/socket.rst:983 msgid "" "Raises an :ref:`auditing event ` ``socket.gethostbyname`` with " "argument ``hostname``." msgstr "" -#: library/socket.rst:1035 +#: library/socket.rst:974 msgid "" "Translate a host name to IPv4 address format, extended interface. Return a 3-" "tuple ``(hostname, aliaslist, ipaddrlist)`` where *hostname* is the host's " @@ -1208,25 +1138,25 @@ msgid "" "stack support." msgstr "" -#: library/socket.rst:1051 +#: library/socket.rst:990 msgid "" "Return a string containing the hostname of the machine where the Python " "interpreter is currently executing." msgstr "" -#: library/socket.rst:1054 +#: library/socket.rst:993 msgid "" "Raises an :ref:`auditing event ` ``socket.gethostname`` with no " "arguments." msgstr "" -#: library/socket.rst:1056 +#: library/socket.rst:995 msgid "" "Note: :func:`gethostname` doesn't always return the fully qualified domain " "name; use :func:`getfqdn` for that." msgstr "" -#: library/socket.rst:1064 +#: library/socket.rst:1003 msgid "" "Return a 3-tuple ``(hostname, aliaslist, ipaddrlist)`` where *hostname* is " "the primary host name responding to the given *ip_address*, *aliaslist* is a " @@ -1237,13 +1167,13 @@ msgid "" "`gethostbyaddr` supports both IPv4 and IPv6." msgstr "" -#: library/socket.rst:1072 +#: library/socket.rst:1011 msgid "" "Raises an :ref:`auditing event ` ``socket.gethostbyaddr`` with " "argument ``ip_address``." msgstr "" -#: library/socket.rst:1079 +#: library/socket.rst:1018 msgid "" "Translate a socket address *sockaddr* into a 2-tuple ``(host, port)``. " "Depending on the settings of *flags*, the result can contain a fully " @@ -1251,24 +1181,24 @@ msgid "" "Similarly, *port* can contain a string port name or a numeric port number." msgstr "" -#: library/socket.rst:1084 +#: library/socket.rst:1023 msgid "" "For IPv6 addresses, ``%scope_id`` is appended to the host part if *sockaddr* " "contains meaningful *scope_id*. Usually this happens for multicast addresses." msgstr "" -#: library/socket.rst:1087 +#: library/socket.rst:1026 msgid "" "For more information about *flags* you can consult :manpage:`getnameinfo(3)`." msgstr "" -#: library/socket.rst:1089 +#: library/socket.rst:1028 msgid "" "Raises an :ref:`auditing event ` ``socket.getnameinfo`` with " "argument ``sockaddr``." msgstr "" -#: library/socket.rst:1096 +#: library/socket.rst:1035 msgid "" "Translate an internet protocol name (for example, ``'icmp'``) to a constant " "suitable for passing as the (optional) third argument to the :func:`~socket." @@ -1277,66 +1207,66 @@ msgid "" "is chosen automatically if the protocol is omitted or zero." msgstr "" -#: library/socket.rst:1107 +#: library/socket.rst:1046 msgid "" "Translate an internet service name and protocol name to a port number for " "that service. The optional protocol name, if given, should be ``'tcp'`` or " "``'udp'``, otherwise any protocol will match." msgstr "" -#: library/socket.rst:1111 +#: library/socket.rst:1050 msgid "" "Raises an :ref:`auditing event ` ``socket.getservbyname`` with " "arguments ``servicename``, ``protocolname``." msgstr "" -#: library/socket.rst:1118 +#: library/socket.rst:1057 msgid "" "Translate an internet port number and protocol name to a service name for " "that service. The optional protocol name, if given, should be ``'tcp'`` or " "``'udp'``, otherwise any protocol will match." msgstr "" -#: library/socket.rst:1122 +#: library/socket.rst:1061 msgid "" "Raises an :ref:`auditing event ` ``socket.getservbyport`` with " "arguments ``port``, ``protocolname``." msgstr "" -#: library/socket.rst:1129 +#: library/socket.rst:1068 msgid "" "Convert 32-bit positive integers from network to host byte order. On " "machines where the host byte order is the same as network byte order, this " "is a no-op; otherwise, it performs a 4-byte swap operation." msgstr "" -#: library/socket.rst:1136 +#: library/socket.rst:1075 msgid "" "Convert 16-bit positive integers from network to host byte order. On " "machines where the host byte order is the same as network byte order, this " "is a no-op; otherwise, it performs a 2-byte swap operation." msgstr "" -#: library/socket.rst:1158 +#: library/socket.rst:1097 msgid "" "Raises :exc:`OverflowError` if *x* does not fit in a 16-bit unsigned integer." msgstr "" -#: library/socket.rst:1147 +#: library/socket.rst:1086 msgid "" "Convert 32-bit positive integers from host to network byte order. On " "machines where the host byte order is the same as network byte order, this " "is a no-op; otherwise, it performs a 4-byte swap operation." msgstr "" -#: library/socket.rst:1154 +#: library/socket.rst:1093 msgid "" "Convert 16-bit positive integers from host to network byte order. On " "machines where the host byte order is the same as network byte order, this " "is a no-op; otherwise, it performs a 2-byte swap operation." msgstr "" -#: library/socket.rst:1165 +#: library/socket.rst:1104 msgid "" "Convert an IPv4 address from dotted-quad string format (for example, " "'123.45.67.89') to 32-bit packed binary format, as a bytes object four " @@ -1345,26 +1275,26 @@ msgid "" "which is the C type for the 32-bit packed binary this function returns." msgstr "" -#: library/socket.rst:1171 +#: library/socket.rst:1110 msgid "" ":func:`inet_aton` also accepts strings with less than three dots; see the " "Unix manual page :manpage:`inet(3)` for details." msgstr "" -#: library/socket.rst:1174 +#: library/socket.rst:1113 msgid "" "If the IPv4 address string passed to this function is invalid, :exc:" "`OSError` will be raised. Note that exactly what is valid depends on the " "underlying C implementation of :c:func:`inet_aton`." msgstr "" -#: library/socket.rst:1178 +#: library/socket.rst:1117 msgid "" ":func:`inet_aton` does not support IPv6, and :func:`inet_pton` should be " "used instead for IPv4/v6 dual stack support." msgstr "" -#: library/socket.rst:1184 +#: library/socket.rst:1123 msgid "" "Convert a 32-bit packed IPv4 address (a :term:`bytes-like object` four bytes " "in length) to its standard dotted-quad string representation (for example, " @@ -1374,7 +1304,7 @@ msgid "" "argument." msgstr "" -#: library/socket.rst:1191 +#: library/socket.rst:1130 msgid "" "If the byte sequence passed to this function is not exactly 4 bytes in " "length, :exc:`OSError` will be raised. :func:`inet_ntoa` does not support " @@ -1382,7 +1312,7 @@ msgid "" "support." msgstr "" -#: library/socket.rst:1202 +#: library/socket.rst:1141 msgid "" "Convert an IP address from its family-specific string format to a packed, " "binary format. :func:`inet_pton` is useful when a library or network " @@ -1390,7 +1320,7 @@ msgid "" "`inet_aton`) or :c:struct:`in6_addr`." msgstr "" -#: library/socket.rst:1207 +#: library/socket.rst:1146 msgid "" "Supported values for *address_family* are currently :const:`AF_INET` and :" "const:`AF_INET6`. If the IP address string *ip_string* is invalid, :exc:" @@ -1399,11 +1329,11 @@ msgid "" "`inet_pton`." msgstr "" -#: library/socket.rst:1235 +#: library/socket.rst:1174 msgid "Windows support added" msgstr "" -#: library/socket.rst:1221 +#: library/socket.rst:1160 msgid "" "Convert a packed IP address (a :term:`bytes-like object` of some number of " "bytes) to its standard, family-specific string representation (for example, " @@ -1412,7 +1342,7 @@ msgid "" "(similar to :func:`inet_ntoa`) or :c:struct:`in6_addr`." msgstr "" -#: library/socket.rst:1228 +#: library/socket.rst:1167 msgid "" "Supported values for *address_family* are currently :const:`AF_INET` and :" "const:`AF_INET6`. If the bytes object *packed_ip* is not the correct length " @@ -1420,7 +1350,7 @@ msgid "" "`OSError` is raised for errors from the call to :func:`inet_ntop`." msgstr "" -#: library/socket.rst:1250 +#: library/socket.rst:1189 msgid "" "Return the total length, without trailing padding, of an ancillary data item " "with associated data of the given *length*. This value can often be used as " @@ -1431,11 +1361,11 @@ msgid "" "the permissible range of values." msgstr "" -#: library/socket.rst:1748 library/socket.rst:1900 +#: library/socket.rst:1749 library/socket.rst:1901 msgid "Most Unix platforms." msgstr "" -#: library/socket.rst:1268 +#: library/socket.rst:1207 msgid "" "Return the buffer size needed for :meth:`~socket.recvmsg` to receive an " "ancillary data item with associated data of the given *length*, along with " @@ -1445,7 +1375,7 @@ msgid "" "values." msgstr "" -#: library/socket.rst:1276 +#: library/socket.rst:1215 msgid "" "Note that some systems might support ancillary data without providing this " "function. Also note that setting the buffer size using the results of this " @@ -1453,137 +1383,207 @@ msgid "" "received, since additional data may be able to fit into the padding area." msgstr "" -#: library/socket.rst:1284 +#: library/socket.rst:1223 msgid "most Unix platforms." msgstr "" -#: library/socket.rst:1291 +#: library/socket.rst:1230 msgid "" "Return the default timeout in seconds (float) for new socket objects. A " "value of ``None`` indicates that new socket objects have no timeout. When " "the socket module is first imported, the default is ``None``." msgstr "" -#: library/socket.rst:1298 +#: library/socket.rst:1237 msgid "" "Set the default timeout in seconds (float) for new socket objects. When the " "socket module is first imported, the default is ``None``. See :meth:" "`~socket.settimeout` for possible values and their respective meanings." msgstr "" -#: library/socket.rst:1306 +#: library/socket.rst:1245 msgid "" "Set the machine's hostname to *name*. This will raise an :exc:`OSError` if " "you don't have enough rights." msgstr "" -#: library/socket.rst:1309 +#: library/socket.rst:1248 msgid "" "Raises an :ref:`auditing event ` ``socket.sethostname`` with " "argument ``name``." msgstr "" -#: library/socket.rst:1318 +#: library/socket.rst:1257 msgid "" "Return a list of network interface information (index int, name string) " "tuples. :exc:`OSError` if the system call fails." msgstr "" -#: library/socket.rst:1353 library/socket.rst:1370 +#: library/socket.rst:1292 library/socket.rst:1309 msgid "Windows support was added." msgstr "" -#: library/socket.rst:1331 +#: library/socket.rst:1270 msgid "" "On Windows network interfaces have different names in different contexts " "(all names are examples):" msgstr "" -#: library/socket.rst:1334 +#: library/socket.rst:1273 msgid "UUID: ``{FB605B73-AAC2-49A6-9A2F-25416AEA0573}``" msgstr "" -#: library/socket.rst:1335 +#: library/socket.rst:1274 msgid "name: ``ethernet_32770``" msgstr "" -#: library/socket.rst:1336 +#: library/socket.rst:1275 msgid "friendly name: ``vEthernet (nat)``" msgstr "" -#: library/socket.rst:1337 +#: library/socket.rst:1276 msgid "description: ``Hyper-V Virtual Ethernet Adapter``" msgstr "" -#: library/socket.rst:1339 +#: library/socket.rst:1278 msgid "" "This function returns names of the second form from the list, " "``ethernet_32770`` in this example case." msgstr "" -#: library/socket.rst:1345 +#: library/socket.rst:1284 msgid "" "Return a network interface index number corresponding to an interface name. :" "exc:`OSError` if no interface with the given name exists." msgstr "" -#: library/socket.rst:1374 +#: library/socket.rst:1313 msgid "\"Interface name\" is a name as documented in :func:`if_nameindex`." msgstr "" -#: library/socket.rst:1362 +#: library/socket.rst:1301 msgid "" "Return a network interface name corresponding to an interface index number. :" "exc:`OSError` if no interface with the given index exists." msgstr "" -#: library/socket.rst:1379 +#: library/socket.rst:1318 msgid "" "Send the list of file descriptors *fds* over an :const:`AF_UNIX` socket " "*sock*. The *fds* parameter is a sequence of file descriptors. Consult :meth:" "`~socket.sendmsg` for the documentation of these parameters." msgstr "" -#: library/socket.rst:1385 +#: library/socket.rst:1324 msgid "" "Unix platforms supporting :meth:`~socket.sendmsg` and :const:`SCM_RIGHTS` " "mechanism." msgstr "" -#: library/socket.rst:1393 +#: library/socket.rst:1332 msgid "" "Receive up to *maxfds* file descriptors from an :const:`AF_UNIX` socket " "*sock*. Return ``(msg, list(fds), flags, addr)``. Consult :meth:`~socket." "recvmsg` for the documentation of these parameters." msgstr "" -#: library/socket.rst:1399 +#: library/socket.rst:1338 msgid "" "Unix platforms supporting :meth:`~socket.recvmsg` and :const:`SCM_RIGHTS` " "mechanism." msgstr "" -#: library/socket.rst:1406 +#: library/socket.rst:1345 msgid "Any truncated integers at the end of the list of file descriptors." msgstr "" -#: library/socket.rst:1412 +#: library/socket.rst:1351 msgid "Socket Objects" msgstr "" -#: library/socket.rst:1414 +#: library/socket.rst:1355 +msgid "" +"Create a new socket using the given address family, socket type and protocol " +"number. The address family should be :const:`AF_INET` (the default), :const:" +"`AF_INET6`, :const:`AF_UNIX`, :const:`AF_CAN`, :const:`AF_PACKET`, or :const:" +"`AF_RDS`. The socket type should be :const:`SOCK_STREAM` (the default), :" +"const:`SOCK_DGRAM`, :const:`SOCK_RAW` or perhaps one of the other ``SOCK_`` " +"constants. The protocol number is usually zero and may be omitted or in the " +"case where the address family is :const:`AF_CAN` the protocol should be one " +"of :const:`CAN_RAW`, :const:`CAN_BCM`, :const:`CAN_ISOTP` or :const:" +"`CAN_J1939`." +msgstr "" + +#: library/socket.rst:1365 +msgid "" +"If *fileno* is specified, the values for *family*, *type*, and *proto* are " +"auto-detected from the specified file descriptor. Auto-detection can be " +"overruled by calling the function with explicit *family*, *type*, or *proto* " +"arguments. This only affects how Python represents e.g. the return value " +"of :meth:`socket.getpeername` but not the actual OS resource. Unlike :func:" +"`socket.fromfd`, *fileno* will return the same socket and not a duplicate. " +"This may help close a detached socket using :meth:`socket.close`." +msgstr "" + +#: library/socket.rst:1376 +msgid "" +"Raises an :ref:`auditing event ` ``socket.__new__`` with arguments " +"``self``, ``family``, ``type``, ``protocol``." +msgstr "" + +#: library/socket.rst:1378 +msgid "The AF_CAN family was added. The AF_RDS family was added." +msgstr "" + +#: library/socket.rst:1382 +msgid "The CAN_BCM protocol was added." +msgstr "" + +#: library/socket.rst:1388 +msgid "The CAN_ISOTP protocol was added." +msgstr "" + +#: library/socket.rst:1391 +msgid "" +"When :const:`SOCK_NONBLOCK` or :const:`SOCK_CLOEXEC` bit flags are applied " +"to *type* they are cleared, and :attr:`socket.type` will not reflect them. " +"They are still passed to the underlying system ``socket()`` call. Therefore," +msgstr "" + +#: library/socket.rst:1399 +msgid "" +"sock = socket.socket(\n" +" socket.AF_INET,\n" +" socket.SOCK_STREAM | socket.SOCK_NONBLOCK)" +msgstr "" + +#: library/socket.rst:1403 +msgid "" +"will still create a non-blocking socket on OSes that support " +"``SOCK_NONBLOCK``, but ``sock.type`` will be set to ``socket.SOCK_STREAM``." +msgstr "" + +#: library/socket.rst:1407 +msgid "The CAN_J1939 protocol was added." +msgstr "" + +#: library/socket.rst:1410 +msgid "The IPPROTO_MPTCP protocol was added." +msgstr "" + +#: library/socket.rst:1413 msgid "" "Socket objects have the following methods. Except for :meth:`~socket." "makefile`, these correspond to Unix system calls applicable to sockets." msgstr "" -#: library/socket.rst:1418 +#: library/socket.rst:1417 msgid "" "Support for the :term:`context manager` protocol was added. Exiting the " "context manager is equivalent to calling :meth:`~socket.close`." msgstr "" -#: library/socket.rst:1425 +#: library/socket.rst:1424 msgid "" "Accept a connection. The socket must be bound to an address and listening " "for connections. The return value is a pair ``(conn, address)`` where *conn* " @@ -1592,31 +1592,32 @@ msgid "" "connection." msgstr "" -#: library/socket.rst:1526 +#: library/socket.rst:1525 msgid "The socket is now non-inheritable." msgstr "" -#: library/socket.rst:1661 library/socket.rst:1752 library/socket.rst:1844 -#: library/socket.rst:1906 +#: library/socket.rst:1661 library/socket.rst:1753 library/socket.rst:1845 +#: library/socket.rst:1907 msgid "" "If the system call is interrupted and the signal handler does not raise an " "exception, the method now retries the system call instead of raising an :exc:" "`InterruptedError` exception (see :pep:`475` for the rationale)." msgstr "" -#: library/socket.rst:1443 +#: library/socket.rst:1442 msgid "" -"Bind the socket to *address*. The socket must not already be bound. (The " -"format of *address* depends on the address family --- see above.)" +"Bind the socket to *address*. The socket must not already be bound. The " +"format of *address* depends on the address family --- see :ref:`socket-" +"addresses`." msgstr "" -#: library/socket.rst:1446 +#: library/socket.rst:1445 msgid "" "Raises an :ref:`auditing event ` ``socket.bind`` with arguments " "``self``, ``address``." msgstr "" -#: library/socket.rst:1453 +#: library/socket.rst:1452 msgid "" "Mark the socket closed. The underlying system resource (e.g. a file " "descriptor) is also closed when all file objects from :meth:`makefile` are " @@ -1625,49 +1626,49 @@ msgid "" "flushed)." msgstr "" -#: library/socket.rst:1459 +#: library/socket.rst:1458 msgid "" "Sockets are automatically closed when they are garbage-collected, but it is " "recommended to :meth:`close` them explicitly, or to use a :keyword:`with` " "statement around them." msgstr "" -#: library/socket.rst:1463 +#: library/socket.rst:1462 msgid "" ":exc:`OSError` is now raised if an error occurs when the underlying :c:func:" -"`close` call is made." +"`!close` call is made." msgstr "" -#: library/socket.rst:1469 +#: library/socket.rst:1468 msgid "" ":meth:`close` releases the resource associated with a connection but does " "not necessarily close the connection immediately. If you want to close the " "connection in a timely fashion, call :meth:`shutdown` before :meth:`close`." msgstr "" -#: library/socket.rst:1477 +#: library/socket.rst:1476 msgid "" -"Connect to a remote socket at *address*. (The format of *address* depends on " -"the address family --- see above.)" +"Connect to a remote socket at *address*. The format of *address* depends on " +"the address family --- see :ref:`socket-addresses`." msgstr "" -#: library/socket.rst:1480 +#: library/socket.rst:1479 msgid "" "If the connection is interrupted by a signal, the method waits until the " -"connection completes, or raise a :exc:`TimeoutError` on timeout, if the " +"connection completes, or raises a :exc:`TimeoutError` on timeout, if the " "signal handler doesn't raise an exception and the socket is blocking or has " "a timeout. For non-blocking sockets, the method raises an :exc:" "`InterruptedError` exception if the connection is interrupted by a signal " "(or the exception raised by the signal handler)." msgstr "" -#: library/socket.rst:1507 +#: library/socket.rst:1506 msgid "" "Raises an :ref:`auditing event ` ``socket.connect`` with arguments " "``self``, ``address``." msgstr "" -#: library/socket.rst:1489 +#: library/socket.rst:1488 msgid "" "The method now waits until the connection completes instead of raising an :" "exc:`InterruptedError` exception if the connection is interrupted by a " @@ -1675,63 +1676,63 @@ msgid "" "blocking or has a timeout (see the :pep:`475` for the rationale)." msgstr "" -#: library/socket.rst:1500 +#: library/socket.rst:1499 msgid "" "Like ``connect(address)``, but return an error indicator instead of raising " -"an exception for errors returned by the C-level :c:func:`connect` call " +"an exception for errors returned by the C-level :c:func:`!connect` call " "(other problems, such as \"host not found,\" can still raise exceptions). " "The error indicator is ``0`` if the operation succeeded, otherwise the value " "of the :c:data:`errno` variable. This is useful to support, for example, " "asynchronous connects." msgstr "" -#: library/socket.rst:1513 +#: library/socket.rst:1512 msgid "" "Put the socket object into closed state without actually closing the " "underlying file descriptor. The file descriptor is returned, and can be " "reused for other purposes." msgstr "" -#: library/socket.rst:1522 +#: library/socket.rst:1521 msgid "Duplicate the socket." msgstr "" -#: library/socket.rst:1534 +#: library/socket.rst:1533 msgid "" "Return the socket's file descriptor (a small integer), or -1 on failure. " "This is useful with :func:`select.select`." msgstr "" -#: library/socket.rst:1537 +#: library/socket.rst:1536 msgid "" "Under Windows the small integer returned by this method cannot be used where " "a file descriptor can be used (such as :func:`os.fdopen`). Unix does not " "have this limitation." msgstr "" -#: library/socket.rst:1543 +#: library/socket.rst:1542 msgid "" "Get the :ref:`inheritable flag ` of the socket's file " "descriptor or socket's handle: ``True`` if the socket can be inherited in " "child processes, ``False`` if it cannot." msgstr "" -#: library/socket.rst:1552 +#: library/socket.rst:1551 msgid "" "Return the remote address to which the socket is connected. This is useful " -"to find out the port number of a remote IPv4/v6 socket, for instance. (The " -"format of the address returned depends on the address family --- see " -"above.) On some systems this function is not supported." +"to find out the port number of a remote IPv4/v6 socket, for instance. The " +"format of the address returned depends on the address family --- see :ref:" +"`socket-addresses`. On some systems this function is not supported." msgstr "" -#: library/socket.rst:1560 +#: library/socket.rst:1559 msgid "" "Return the socket's own address. This is useful to find out the port number " -"of an IPv4/v6 socket, for instance. (The format of the address returned " -"depends on the address family --- see above.)" +"of an IPv4/v6 socket, for instance. The format of the address returned " +"depends on the address family --- see :ref:`socket-addresses`." msgstr "" -#: library/socket.rst:1567 +#: library/socket.rst:1566 msgid "" "Return the value of the given socket option (see the Unix man page :manpage:" "`getsockopt(2)`). The needed symbolic constants (:ref:`SO_\\* etc. `_ for more information." msgstr "" -#: library/socket.rst:1605 +#: library/socket.rst:1602 msgid "" "On other platforms, the generic :func:`fcntl.fcntl` and :func:`fcntl.ioctl` " "functions may be used; they accept a socket object as their first argument." msgstr "" -#: library/socket.rst:1608 +#: library/socket.rst:1605 msgid "" "Currently only the following control codes are supported: ``SIO_RCVALL``, " "``SIO_KEEPALIVE_VALS``, and ``SIO_LOOPBACK_FAST_PATH``." @@ -1845,18 +1838,18 @@ msgid "" "address)`` where *bytes* is a bytes object representing the data received " "and *address* is the address of the socket sending the data. See the Unix " "manual page :manpage:`recv(2)` for the meaning of the optional argument " -"*flags*; it defaults to zero. (The format of *address* depends on the " -"address family --- see above.)" +"*flags*; it defaults to zero. The format of *address* depends on the address " +"family --- see :ref:`socket-addresses`." msgstr "" -#: library/socket.rst:1680 +#: library/socket.rst:1681 msgid "" "For multicast IPv6 address, first item of *address* does not contain " "``%scope_id`` part anymore. In order to get full IPv6 address use :func:" "`getnameinfo`." msgstr "" -#: library/socket.rst:1687 +#: library/socket.rst:1688 msgid "" "Receive normal data (up to *bufsize* bytes) and ancillary data from the " "socket. The *ancbufsize* argument sets the size in bytes of the internal " @@ -1867,7 +1860,7 @@ msgid "" "*flags* argument defaults to 0 and has the same meaning as for :meth:`recv`." msgstr "" -#: library/socket.rst:1697 +#: library/socket.rst:1698 msgid "" "The return value is a 4-tuple: ``(data, ancdata, msg_flags, address)``. The " "*data* item is a :class:`bytes` object holding the non-ancillary data " @@ -1882,7 +1875,7 @@ msgid "" "socket, if available; otherwise, its value is unspecified." msgstr "" -#: library/socket.rst:1711 +#: library/socket.rst:1712 msgid "" "On some systems, :meth:`sendmsg` and :meth:`recvmsg` can be used to pass " "file descriptors between processes over an :const:`AF_UNIX` socket. When " @@ -1895,7 +1888,7 @@ msgid "" "descriptors received via this mechanism." msgstr "" -#: library/socket.rst:1722 +#: library/socket.rst:1723 msgid "" "Some systems do not indicate the truncated length of ancillary data items " "which have been only partially received. If an item appears to extend " @@ -1904,16 +1897,16 @@ msgid "" "provided it has not been truncated before the start of its associated data." msgstr "" -#: library/socket.rst:1729 +#: library/socket.rst:1730 msgid "" -"On systems which support the :const:`SCM_RIGHTS` mechanism, the following " +"On systems which support the :const:`!SCM_RIGHTS` mechanism, the following " "function will receive up to *maxfds* file descriptors, returning the message " "data and a list containing the descriptors (while ignoring unexpected " "conditions such as unrelated control messages being received). See also :" "meth:`sendmsg`. ::" msgstr "" -#: library/socket.rst:1735 +#: library/socket.rst:1736 msgid "" "import socket, array\n" "\n" @@ -1930,7 +1923,7 @@ msgid "" " return msg, list(fds)" msgstr "" -#: library/socket.rst:1760 +#: library/socket.rst:1761 msgid "" "Receive normal data and ancillary data from the socket, behaving as :meth:" "`recvmsg` would, but scatter the non-ancillary data into a series of buffers " @@ -1943,7 +1936,7 @@ msgid "" "arguments have the same meaning as for :meth:`recvmsg`." msgstr "" -#: library/socket.rst:1771 +#: library/socket.rst:1772 msgid "" "The return value is a 4-tuple: ``(nbytes, ancdata, msg_flags, address)``, " "where *nbytes* is the total number of bytes of non-ancillary data written " @@ -1951,11 +1944,11 @@ msgid "" "for :meth:`recvmsg`." msgstr "" -#: library/socket.rst:1776 +#: library/socket.rst:1777 msgid "Example::" msgstr "" -#: library/socket.rst:1778 +#: library/socket.rst:1779 msgid "" ">>> import socket\n" ">>> s1, s2 = socket.socketpair()\n" @@ -1970,17 +1963,18 @@ msgid "" "[bytearray(b'Mary'), bytearray(b'01 had a 9'), bytearray(b'little lamb---')]" msgstr "" -#: library/socket.rst:1799 +#: library/socket.rst:1800 msgid "" "Receive data from the socket, writing it into *buffer* instead of creating a " "new bytestring. The return value is a pair ``(nbytes, address)`` where " "*nbytes* is the number of bytes received and *address* is the address of the " "socket sending the data. See the Unix manual page :manpage:`recv(2)` for " -"the meaning of the optional argument *flags*; it defaults to zero. (The " -"format of *address* depends on the address family --- see above.)" +"the meaning of the optional argument *flags*; it defaults to zero. The " +"format of *address* depends on the address family --- see :ref:`socket-" +"addresses`." msgstr "" -#: library/socket.rst:1809 +#: library/socket.rst:1810 msgid "" "Receive up to *nbytes* bytes from the socket, storing the data into a buffer " "rather than creating a new bytestring. If *nbytes* is not specified (or 0), " @@ -1989,48 +1983,48 @@ msgid "" "of the optional argument *flags*; it defaults to zero." msgstr "" -#: library/socket.rst:1818 +#: library/socket.rst:1819 msgid "" "Send data to the socket. The socket must be connected to a remote socket. " -"The optional *flags* argument has the same meaning as for :meth:`recv` " -"above. Returns the number of bytes sent. Applications are responsible for " -"checking that all data has been sent; if only some of the data was " -"transmitted, the application needs to attempt delivery of the remaining " -"data. For further information on this topic, consult the :ref:`socket-howto`." +"The optional *flags* argument has the same meaning as for :meth:`recv`. " +"Returns the number of bytes sent. Applications are responsible for checking " +"that all data has been sent; if only some of the data was transmitted, the " +"application needs to attempt delivery of the remaining data. For further " +"information on this topic, consult the :ref:`socket-howto`." msgstr "" -#: library/socket.rst:1833 +#: library/socket.rst:1834 msgid "" "Send data to the socket. The socket must be connected to a remote socket. " -"The optional *flags* argument has the same meaning as for :meth:`recv` " -"above. Unlike :meth:`send`, this method continues to send data from *bytes* " -"until either all data has been sent or an error occurs. ``None`` is " -"returned on success. On error, an exception is raised, and there is no way " -"to determine how much data, if any, was successfully sent." +"The optional *flags* argument has the same meaning as for :meth:`recv`. " +"Unlike :meth:`send`, this method continues to send data from *bytes* until " +"either all data has been sent or an error occurs. ``None`` is returned on " +"success. On error, an exception is raised, and there is no way to determine " +"how much data, if any, was successfully sent." msgstr "" -#: library/socket.rst:1840 +#: library/socket.rst:1841 msgid "" "The socket timeout is no longer reset each time data is sent successfully. " "The socket timeout is now the maximum total duration to send all data." msgstr "" -#: library/socket.rst:1853 +#: library/socket.rst:1854 msgid "" "Send data to the socket. The socket should not be connected to a remote " "socket, since the destination socket is specified by *address*. The " -"optional *flags* argument has the same meaning as for :meth:`recv` above. " -"Return the number of bytes sent. (The format of *address* depends on the " -"address family --- see above.)" +"optional *flags* argument has the same meaning as for :meth:`recv`. Return " +"the number of bytes sent. The format of *address* depends on the address " +"family --- see :ref:`socket-addresses`." msgstr "" -#: library/socket.rst:1859 +#: library/socket.rst:1860 msgid "" "Raises an :ref:`auditing event ` ``socket.sendto`` with arguments " "``self``, ``address``." msgstr "" -#: library/socket.rst:1869 +#: library/socket.rst:1870 msgid "" "Send normal and ancillary data to the socket, gathering the non-ancillary " "data from a series of buffers and concatenating it into a single message. " @@ -2050,14 +2044,14 @@ msgid "" "bytes of non-ancillary data sent." msgstr "" -#: library/socket.rst:1889 +#: library/socket.rst:1890 msgid "" "The following function sends the list of file descriptors *fds* over an :" -"const:`AF_UNIX` socket, on systems which support the :const:`SCM_RIGHTS` " +"const:`AF_UNIX` socket, on systems which support the :const:`!SCM_RIGHTS` " "mechanism. See also :meth:`recvmsg`. ::" msgstr "" -#: library/socket.rst:1893 +#: library/socket.rst:1894 msgid "" "import socket, array\n" "\n" @@ -2066,20 +2060,20 @@ msgid "" "array(\"i\", fds))])" msgstr "" -#: library/socket.rst:1902 +#: library/socket.rst:1903 msgid "" "Raises an :ref:`auditing event ` ``socket.sendmsg`` with arguments " "``self``, ``address``." msgstr "" -#: library/socket.rst:1913 +#: library/socket.rst:1914 msgid "" "Specialized version of :meth:`~socket.sendmsg` for :const:`AF_ALG` socket. " "Set mode, IV, AEAD associated data length and flags for :const:`AF_ALG` " "socket." msgstr "" -#: library/socket.rst:1922 +#: library/socket.rst:1923 msgid "" "Send a file until EOF is reached by using high-performance :mod:`os." "sendfile` and return the total number of bytes which were sent. *file* must " @@ -2093,77 +2087,77 @@ msgid "" "be of :const:`SOCK_STREAM` type. Non-blocking sockets are not supported." msgstr "" -#: library/socket.rst:1938 +#: library/socket.rst:1939 msgid "" "Set the :ref:`inheritable flag ` of the socket's file " "descriptor or socket's handle." msgstr "" -#: library/socket.rst:1946 +#: library/socket.rst:1947 msgid "" "Set blocking or non-blocking mode of the socket: if *flag* is false, the " "socket is set to non-blocking, else to blocking mode." msgstr "" -#: library/socket.rst:1949 +#: library/socket.rst:1950 msgid "" "This method is a shorthand for certain :meth:`~socket.settimeout` calls:" msgstr "" -#: library/socket.rst:1951 +#: library/socket.rst:1952 msgid "``sock.setblocking(True)`` is equivalent to ``sock.settimeout(None)``" msgstr "" -#: library/socket.rst:1953 +#: library/socket.rst:1954 msgid "``sock.setblocking(False)`` is equivalent to ``sock.settimeout(0.0)``" msgstr "" -#: library/socket.rst:1955 +#: library/socket.rst:1956 msgid "" "The method no longer applies :const:`SOCK_NONBLOCK` flag on :attr:`socket." "type`." msgstr "" -#: library/socket.rst:1962 +#: library/socket.rst:1963 msgid "" "Set a timeout on blocking socket operations. The *value* argument can be a " -"nonnegative floating-point number expressing seconds, or ``None``. If a non-" -"zero value is given, subsequent socket operations will raise a :exc:" -"`timeout` exception if the timeout period *value* has elapsed before the " -"operation has completed. If zero is given, the socket is put in non-" -"blocking mode. If ``None`` is given, the socket is put in blocking mode." +"nonnegative real number expressing seconds, or ``None``. If a non-zero value " +"is given, subsequent socket operations will raise a :exc:`timeout` exception " +"if the timeout period *value* has elapsed before the operation has " +"completed. If zero is given, the socket is put in non-blocking mode. If " +"``None`` is given, the socket is put in blocking mode." msgstr "" -#: library/socket.rst:1969 +#: library/socket.rst:1970 msgid "" "For further information, please consult the :ref:`notes on socket timeouts " "`." msgstr "" -#: library/socket.rst:1971 +#: library/socket.rst:1972 msgid "" "The method no longer toggles :const:`SOCK_NONBLOCK` flag on :attr:`socket." "type`." msgstr "" -#: library/socket.rst:1984 +#: library/socket.rst:1982 msgid "" "Set the value of the given socket option (see the Unix manual page :manpage:" "`setsockopt(2)`). The needed symbolic constants are defined in this module " "(:ref:`!SO_\\* etc. `). The value can be an integer, " -"``None`` or a :term:`bytes-like object` representing a buffer. In the later " +"``None`` or a :term:`bytes-like object` representing a buffer. In the latter " "case it is up to the caller to ensure that the bytestring contains the " "proper bits (see the optional built-in module :mod:`struct` for a way to " "encode C structures as bytestrings). When *value* is set to ``None``, " -"*optlen* argument is required. It's equivalent to call :c:func:`setsockopt` " -"C function with ``optval=NULL`` and ``optlen=optlen``." +"*optlen* argument is required. It's equivalent to calling :c:func:`!" +"setsockopt` C function with ``optval=NULL`` and ``optlen=optlen``." msgstr "" -#: library/socket.rst:1997 +#: library/socket.rst:1995 msgid "setsockopt(level, optname, None, optlen: int) form added." msgstr "" -#: library/socket.rst:2005 +#: library/socket.rst:2003 msgid "" "Shut down one or both halves of the connection. If *how* is :const:" "`SHUT_RD`, further receives are disallowed. If *how* is :const:`SHUT_WR`, " @@ -2171,7 +2165,7 @@ msgid "" "and receives are disallowed." msgstr "" -#: library/socket.rst:2015 +#: library/socket.rst:2013 msgid "" "Duplicate a socket and prepare it for sharing with a target process. The " "target process must be provided with *process_id*. The resulting bytes " @@ -2182,48 +2176,56 @@ msgid "" "process." msgstr "" -#: library/socket.rst:2027 +#: library/socket.rst:2025 msgid "" -"Note that there are no methods :meth:`read` or :meth:`write`; use :meth:" +"Note that there are no methods :meth:`!read` or :meth:`!write`; use :meth:" "`~socket.recv` and :meth:`~socket.send` without *flags* argument instead." msgstr "" -#: library/socket.rst:2030 +#: library/socket.rst:2028 msgid "" "Socket objects also have these (read-only) attributes that correspond to the " "values given to the :class:`~socket.socket` constructor." msgstr "" -#: library/socket.rst:2036 +#: library/socket.rst:2034 msgid "The socket family." msgstr "" -#: library/socket.rst:2041 +#: library/socket.rst:2039 msgid "The socket type." msgstr "" -#: library/socket.rst:2046 +#: library/socket.rst:2044 msgid "The socket protocol." msgstr "" -#: library/socket.rst:2053 +#: library/socket.rst:2049 +msgid "" +"The base class of the :class:`~socket.socket` type, re-exported from :mod:`!" +"_socket`. An instance check such as ``isinstance(socket(...), SocketType)`` " +"is true, but ``SocketType`` is not the same as ``type(socket(...))``, which " +"is :class:`~socket.socket` itself." +msgstr "" + +#: library/socket.rst:2058 msgid "Notes on socket timeouts" msgstr "" -#: library/socket.rst:2055 +#: library/socket.rst:2060 msgid "" "A socket object can be in one of three modes: blocking, non-blocking, or " "timeout. Sockets are by default always created in blocking mode, but this " "can be changed by calling :func:`setdefaulttimeout`." msgstr "" -#: library/socket.rst:2059 +#: library/socket.rst:2064 msgid "" "In *blocking mode*, operations block until complete or the system returns an " "error (such as connection timed out)." msgstr "" -#: library/socket.rst:2062 +#: library/socket.rst:2067 msgid "" "In *non-blocking mode*, operations fail (with an error that is unfortunately " "system-dependent) if they cannot be completed immediately: functions from " @@ -2231,14 +2233,14 @@ msgid "" "available for reading or writing." msgstr "" -#: library/socket.rst:2067 +#: library/socket.rst:2072 msgid "" "In *timeout mode*, operations fail if they cannot be completed within the " "timeout specified for the socket (they raise a :exc:`timeout` exception) or " "if the system returns an error." msgstr "" -#: library/socket.rst:2072 +#: library/socket.rst:2077 msgid "" "At the operating system level, sockets in *timeout mode* are internally set " "in non-blocking mode. Also, the blocking and timeout modes are shared " @@ -2247,11 +2249,11 @@ msgid "" "you decide to use the :meth:`~socket.fileno` of a socket." msgstr "" -#: library/socket.rst:2079 +#: library/socket.rst:2084 msgid "Timeouts and the ``connect`` method" msgstr "" -#: library/socket.rst:2081 +#: library/socket.rst:2086 msgid "" "The :meth:`~socket.connect` operation is also subject to the timeout " "setting, and in general it is recommended to call :meth:`~socket.settimeout` " @@ -2261,24 +2263,24 @@ msgid "" "setting." msgstr "" -#: library/socket.rst:2089 +#: library/socket.rst:2094 msgid "Timeouts and the ``accept`` method" msgstr "" -#: library/socket.rst:2091 +#: library/socket.rst:2096 msgid "" "If :func:`getdefaulttimeout` is not :const:`None`, sockets returned by the :" "meth:`~socket.accept` method inherit that timeout. Otherwise, the behaviour " "depends on settings of the listening socket:" msgstr "" -#: library/socket.rst:2095 +#: library/socket.rst:2100 msgid "" "if the listening socket is in *blocking mode* or in *timeout mode*, the " "socket returned by :meth:`~socket.accept` is in *blocking mode*;" msgstr "" -#: library/socket.rst:2098 +#: library/socket.rst:2103 msgid "" "if the listening socket is in *non-blocking mode*, whether the socket " "returned by :meth:`~socket.accept` is in blocking or non-blocking mode is " @@ -2286,11 +2288,11 @@ msgid "" "it is recommended you manually override this setting." msgstr "" -#: library/socket.rst:2107 +#: library/socket.rst:2112 msgid "Example" msgstr "" -#: library/socket.rst:2109 +#: library/socket.rst:2114 msgid "" "Here are four minimal example programs using the TCP/IP protocol: a server " "that echoes all data that it receives back (servicing only one client), and " @@ -2303,11 +2305,11 @@ msgid "" "on the new socket returned by :meth:`~socket.accept`." msgstr "" -#: library/socket.rst:2119 +#: library/socket.rst:2124 msgid "The first two examples support IPv4 only. ::" msgstr "" -#: library/socket.rst:2121 +#: library/socket.rst:2126 msgid "" "# Echo server program\n" "import socket\n" @@ -2326,7 +2328,7 @@ msgid "" " conn.sendall(data)" msgstr "" -#: library/socket.rst:2139 +#: library/socket.rst:2144 msgid "" "# Echo client program\n" "import socket\n" @@ -2340,7 +2342,7 @@ msgid "" "print('Received', repr(data))" msgstr "" -#: library/socket.rst:2150 +#: library/socket.rst:2155 msgid "" "The next two examples are identical to the above two, but support both IPv4 " "and IPv6. The server side will listen to the first address family available " @@ -2350,7 +2352,7 @@ msgid "" "resolution, and sends traffic to the first one connected successfully. ::" msgstr "" -#: library/socket.rst:2157 +#: library/socket.rst:2162 msgid "" "# Echo server program\n" "import socket\n" @@ -2387,7 +2389,7 @@ msgid "" " conn.send(data)" msgstr "" -#: library/socket.rst:2193 +#: library/socket.rst:2198 msgid "" "# Echo client program\n" "import socket\n" @@ -2420,14 +2422,14 @@ msgid "" "print('Received', repr(data))" msgstr "" -#: library/socket.rst:2222 +#: library/socket.rst:2227 msgid "" "The next example shows how to write a very simple network sniffer with raw " "sockets on Windows. The example requires administrator privileges to modify " "the interface::" msgstr "" -#: library/socket.rst:2226 +#: library/socket.rst:2231 msgid "" "import socket\n" "\n" @@ -2451,29 +2453,29 @@ msgid "" "s.ioctl(socket.SIO_RCVALL, socket.RCVALL_OFF)" msgstr "" -#: library/socket.rst:2247 +#: library/socket.rst:2252 msgid "" "The next example shows how to use the socket interface to communicate to a " "CAN network using the raw socket protocol. To use CAN with the broadcast " "manager protocol instead, open a socket with::" msgstr "" -#: library/socket.rst:2251 +#: library/socket.rst:2256 msgid "socket.socket(socket.AF_CAN, socket.SOCK_DGRAM, socket.CAN_BCM)" msgstr "" -#: library/socket.rst:2253 +#: library/socket.rst:2258 msgid "" "After binding (:const:`CAN_RAW`) or connecting (:const:`CAN_BCM`) the " "socket, you can use the :meth:`socket.send` and :meth:`socket.recv` " "operations (and their counterparts) on the socket object as usual." msgstr "" -#: library/socket.rst:2257 +#: library/socket.rst:2262 msgid "This last example might require special privileges::" msgstr "" -#: library/socket.rst:2259 +#: library/socket.rst:2264 msgid "" "import socket\n" "import struct\n" @@ -2515,59 +2517,59 @@ msgid "" " print('Error sending CAN frame')" msgstr "" -#: library/socket.rst:2297 +#: library/socket.rst:2302 msgid "" "Running an example several times with too small delay between executions, " "could lead to this error::" msgstr "" -#: library/socket.rst:2300 +#: library/socket.rst:2305 msgid "OSError: [Errno 98] Address already in use" msgstr "" -#: library/socket.rst:2302 +#: library/socket.rst:2307 msgid "" "This is because the previous execution has left the socket in a " "``TIME_WAIT`` state, and can't be immediately reused." msgstr "" -#: library/socket.rst:2305 +#: library/socket.rst:2310 msgid "" "There is a :mod:`socket` flag to set, in order to prevent this, :const:" "`socket.SO_REUSEADDR`::" msgstr "" -#: library/socket.rst:2308 +#: library/socket.rst:2313 msgid "" "s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n" "s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)\n" "s.bind((HOST, PORT))" msgstr "" -#: library/socket.rst:2312 +#: library/socket.rst:2317 msgid "" "the :data:`SO_REUSEADDR` flag tells the kernel to reuse a local socket in " "``TIME_WAIT`` state, without waiting for its natural timeout to expire." msgstr "" -#: library/socket.rst:2318 +#: library/socket.rst:2323 msgid "" "For an introduction to socket programming (in C), see the following papers:" msgstr "" -#: library/socket.rst:2320 +#: library/socket.rst:2325 msgid "" "*An Introductory 4.3BSD Interprocess Communication Tutorial*, by Stuart " "Sechrest" msgstr "" -#: library/socket.rst:2322 +#: library/socket.rst:2327 msgid "" "*An Advanced 4.3BSD Interprocess Communication Tutorial*, by Samuel J. " "Leffler et al," msgstr "" -#: library/socket.rst:2325 +#: library/socket.rst:2330 msgid "" "both in the UNIX Programmer's Manual, Supplementary Documents 1 (sections " "PS1:7 and PS1:8). The platform-specific reference material for the various " @@ -2594,10 +2596,10 @@ msgstr "" msgid "buffering" msgstr "" -#: library/socket.rst:1982 +#: library/socket.rst:1980 msgid "module" msgstr "" -#: library/socket.rst:1982 +#: library/socket.rst:1980 msgid "struct" msgstr "" diff --git a/library/socketserver.po b/library/socketserver.po index 4396d9c28..069563127 100644 --- a/library/socketserver.po +++ b/library/socketserver.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/spwd.po b/library/spwd.po index 9e93c564d..12fa3c2c4 100644 --- a/library/spwd.po +++ b/library/spwd.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/sqlite3.po b/library/sqlite3.po index c050af4c2..123338e02 100644 --- a/library/sqlite3.po +++ b/library/sqlite3.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -371,7 +371,7 @@ msgid "" "` are looked up to be converted to Python types, using the " "converters registered with :func:`register_converter`. Set it to any " "combination (using ``|``, bitwise or) of :const:`PARSE_DECLTYPES` and :const:" -"`PARSE_COLNAMES` to enable this. Column names takes precedence over declared " +"`PARSE_COLNAMES` to enable this. Column names take precedence over declared " "types if both flags are set. By default (``0``), type detection is disabled." msgstr "" @@ -928,7 +928,7 @@ msgstr "" msgid "Added the *deterministic* parameter." msgstr "" -#: library/sqlite3.rst:784 library/sqlite3.rst:1131 library/sqlite3.rst:1596 +#: library/sqlite3.rst:784 library/sqlite3.rst:1131 library/sqlite3.rst:1602 msgid "Example:" msgstr "" @@ -1709,32 +1709,40 @@ msgid "" "`tuple`." msgstr "" -#: library/sqlite3.rst:1729 library/sqlite3.rst:1752 +#: library/sqlite3.rst:1735 library/sqlite3.rst:1761 msgid "See :ref:`sqlite3-howto-row-factory` for more details." msgstr "" -#: library/sqlite3.rst:1441 +#: library/sqlite3.rst:1737 +msgid "Deleting the ``row_factory`` attribute is no longer allowed." +msgstr "" + +#: library/sqlite3.rst:1444 msgid "" "A :term:`callable` that accepts a :class:`bytes` parameter and returns a " "text representation of it. The callable is invoked for SQLite values with " "the ``TEXT`` data type. By default, this attribute is set to :class:`str`." msgstr "" -#: library/sqlite3.rst:1446 +#: library/sqlite3.rst:1449 msgid "See :ref:`sqlite3-howto-encoding` for more details." msgstr "" -#: library/sqlite3.rst:1450 +#: library/sqlite3.rst:1451 +msgid "Deleting the ``text_factory`` attribute is no longer allowed." +msgstr "" + +#: library/sqlite3.rst:1456 msgid "" "Return the total number of database rows that have been modified, inserted, " "or deleted since the database connection was opened." msgstr "" -#: library/sqlite3.rst:1457 +#: library/sqlite3.rst:1463 msgid "Cursor objects" msgstr "" -#: library/sqlite3.rst:1459 +#: library/sqlite3.rst:1465 msgid "" "A ``Cursor`` object represents a `database cursor`_ which is used to execute " "SQL statements, and manage the context of a fetch operation. Cursors are " @@ -1742,45 +1750,45 @@ msgid "" "`connection shortcut methods `." msgstr "" -#: library/sqlite3.rst:1466 +#: library/sqlite3.rst:1472 msgid "" "Cursor objects are :term:`iterators `, meaning that if you :meth:" "`~Cursor.execute` a ``SELECT`` query, you can simply iterate over the cursor " "to fetch the resulting rows:" msgstr "" -#: library/sqlite3.rst:1477 +#: library/sqlite3.rst:1483 msgid "" "for row in cur.execute(\"SELECT t FROM data\"):\n" " print(row)" msgstr "" -#: library/sqlite3.rst:1491 +#: library/sqlite3.rst:1497 msgid "A :class:`Cursor` instance has the following attributes and methods." msgstr "" -#: library/sqlite3.rst:1498 +#: library/sqlite3.rst:1504 msgid "" "Execute a single SQL statement, optionally binding Python values using :ref:" "`placeholders `." msgstr "" -#: library/sqlite3.rst:1502 +#: library/sqlite3.rst:1508 msgid "A single SQL statement." msgstr "" -#: library/sqlite3.rst:1505 +#: library/sqlite3.rst:1511 msgid "" "Python values to bind to placeholders in *sql*. A :class:`!dict` if named " "placeholders are used. A :term:`!sequence` if unnamed placeholders are used. " "See :ref:`sqlite3-placeholders`." msgstr "" -#: library/sqlite3.rst:1512 +#: library/sqlite3.rst:1518 msgid "If *sql* contains more than one SQL statement." msgstr "" -#: library/sqlite3.rst:1515 +#: library/sqlite3.rst:1521 msgid "" "If :attr:`~Connection.autocommit` is :data:`LEGACY_TRANSACTION_CONTROL`, :" "attr:`~Connection.isolation_level` is not ``None``, *sql* is an ``INSERT``, " @@ -1788,7 +1796,7 @@ msgid "" "transaction, a transaction is implicitly opened before executing *sql*." msgstr "" -#: library/sqlite3.rst:1524 +#: library/sqlite3.rst:1530 msgid "" ":exc:`DeprecationWarning` is emitted if :ref:`named placeholders ` are used and *parameters* is a sequence instead of a :class:" @@ -1796,37 +1804,37 @@ msgid "" "instead." msgstr "" -#: library/sqlite3.rst:1530 +#: library/sqlite3.rst:1536 msgid "Use :meth:`executescript` to execute multiple SQL statements." msgstr "" -#: library/sqlite3.rst:1534 +#: library/sqlite3.rst:1540 msgid "" "For every item in *parameters*, repeatedly execute the :ref:`parameterized " "` :abbr:`DML (Data Manipulation Language)` SQL " "statement *sql*." msgstr "" -#: library/sqlite3.rst:1538 +#: library/sqlite3.rst:1544 msgid "Uses the same implicit transaction handling as :meth:`~Cursor.execute`." msgstr "" -#: library/sqlite3.rst:1540 +#: library/sqlite3.rst:1546 msgid "A single SQL DML statement." msgstr "" -#: library/sqlite3.rst:1543 +#: library/sqlite3.rst:1549 msgid "" "An :term:`!iterable` of parameters to bind with the placeholders in *sql*. " "See :ref:`sqlite3-placeholders`." msgstr "" -#: library/sqlite3.rst:1549 +#: library/sqlite3.rst:1555 msgid "" "If *sql* contains more than one SQL statement, or is not a DML statement." msgstr "" -#: library/sqlite3.rst:1555 +#: library/sqlite3.rst:1561 msgid "" "rows = [\n" " (\"row1\",),\n" @@ -1836,13 +1844,13 @@ msgid "" "cur.executemany(\"INSERT INTO data VALUES(?)\", rows)" msgstr "" -#: library/sqlite3.rst:1570 +#: library/sqlite3.rst:1576 msgid "" "Any resulting rows are discarded, including DML statements with `RETURNING " "clauses`_." msgstr "" -#: library/sqlite3.rst:1577 +#: library/sqlite3.rst:1583 msgid "" ":exc:`DeprecationWarning` is emitted if :ref:`named placeholders ` are used and the items in *parameters* are sequences instead " @@ -1850,7 +1858,7 @@ msgid "" "be raised instead." msgstr "" -#: library/sqlite3.rst:1586 +#: library/sqlite3.rst:1592 msgid "" "Execute the SQL statements in *sql_script*. If the :attr:`~Connection." "autocommit` is :data:`LEGACY_TRANSACTION_CONTROL` and there is a pending " @@ -1859,11 +1867,11 @@ msgid "" "added to *sql_script*." msgstr "" -#: library/sqlite3.rst:1594 +#: library/sqlite3.rst:1600 msgid "*sql_script* must be a :class:`string `." msgstr "" -#: library/sqlite3.rst:1598 +#: library/sqlite3.rst:1604 msgid "" "# cur is an sqlite3.Cursor object\n" "cur.executescript(\"\"\"\n" @@ -1875,20 +1883,20 @@ msgid "" "\"\"\")" msgstr "" -#: library/sqlite3.rst:1611 +#: library/sqlite3.rst:1617 msgid "" "If :attr:`~Cursor.row_factory` is ``None``, return the next row query result " "set as a :class:`tuple`. Else, pass it to the row factory and return its " "result. Return ``None`` if no more data is available." msgstr "" -#: library/sqlite3.rst:1619 +#: library/sqlite3.rst:1625 msgid "" "Return the next set of rows of a query result as a :class:`list`. Return an " "empty list if no more rows are available." msgstr "" -#: library/sqlite3.rst:1622 +#: library/sqlite3.rst:1628 msgid "" "The number of rows to fetch per call is specified by the *size* parameter. " "If *size* is not given, :attr:`arraysize` determines the number of rows to " @@ -1896,7 +1904,7 @@ msgid "" "available are returned." msgstr "" -#: library/sqlite3.rst:1628 +#: library/sqlite3.rst:1634 msgid "" "Note there are performance considerations involved with the *size* " "parameter. For optimal performance, it is usually best to use the arraysize " @@ -1904,44 +1912,44 @@ msgid "" "the same value from one :meth:`fetchmany` call to the next." msgstr "" -#: library/sqlite3.rst:1633 +#: library/sqlite3.rst:1639 msgid "Negative *size* values are rejected by raising :exc:`ValueError`." msgstr "" -#: library/sqlite3.rst:1638 +#: library/sqlite3.rst:1644 msgid "" "Return all (remaining) rows of a query result as a :class:`list`. Return an " "empty list if no rows are available. Note that the :attr:`arraysize` " "attribute can affect the performance of this operation." msgstr "" -#: library/sqlite3.rst:1645 +#: library/sqlite3.rst:1651 msgid "Close the cursor now (rather than whenever ``__del__`` is called)." msgstr "" -#: library/sqlite3.rst:1647 +#: library/sqlite3.rst:1653 msgid "" "The cursor will be unusable from this point forward; a :exc:" "`ProgrammingError` exception will be raised if any operation is attempted " "with the cursor." msgstr "" -#: library/sqlite3.rst:1656 +#: library/sqlite3.rst:1662 msgid "Required by the DB-API. Does nothing in :mod:`!sqlite3`." msgstr "" -#: library/sqlite3.rst:1660 +#: library/sqlite3.rst:1666 msgid "" "Read/write attribute that controls the number of rows returned by :meth:" "`fetchmany`. The default value is 1 which means a single row would be " "fetched per call." msgstr "" -#: library/sqlite3.rst:1663 +#: library/sqlite3.rst:1669 msgid "Negative values are rejected by raising :exc:`ValueError`." msgstr "" -#: library/sqlite3.rst:1668 +#: library/sqlite3.rst:1674 msgid "" "Read-only attribute that provides the SQLite database :class:`Connection` " "belonging to the cursor. A :class:`Cursor` object created by calling :meth:" @@ -1949,7 +1957,7 @@ msgid "" "that refers to *con*:" msgstr "" -#: library/sqlite3.rst:1673 +#: library/sqlite3.rst:1679 msgid "" ">>> con = sqlite3.connect(\":memory:\")\n" ">>> cur = con.cursor()\n" @@ -1958,18 +1966,18 @@ msgid "" ">>> con.close()" msgstr "" -#: library/sqlite3.rst:1683 +#: library/sqlite3.rst:1689 msgid "" "Read-only attribute that provides the column names of the last query. To " "remain compatible with the Python DB API, it returns a 7-tuple for each " "column where the last six items of each tuple are ``None``." msgstr "" -#: library/sqlite3.rst:1687 +#: library/sqlite3.rst:1693 msgid "It is set for ``SELECT`` statements without any matching rows as well." msgstr "" -#: library/sqlite3.rst:1691 +#: library/sqlite3.rst:1697 msgid "" "Read-only attribute that provides the row id of the last inserted row. It is " "only updated after successful ``INSERT`` or ``REPLACE`` statements using " @@ -1979,15 +1987,15 @@ msgid "" "``None``." msgstr "" -#: library/sqlite3.rst:1699 +#: library/sqlite3.rst:1705 msgid "Inserts into ``WITHOUT ROWID`` tables are not recorded." msgstr "" -#: library/sqlite3.rst:1701 +#: library/sqlite3.rst:1707 msgid "Added support for the ``REPLACE`` statement." msgstr "" -#: library/sqlite3.rst:1706 +#: library/sqlite3.rst:1712 msgid "" "Read-only attribute that provides the number of modified rows for " "``INSERT``, ``UPDATE``, ``DELETE``, and ``REPLACE`` statements; is ``-1`` " @@ -1997,7 +2005,7 @@ msgid "" "resulting rows must be fetched in order for :attr:`!rowcount` to be updated." msgstr "" -#: library/sqlite3.rst:1717 +#: library/sqlite3.rst:1723 msgid "" "Control how a row fetched from this :class:`!Cursor` is represented. If " "``None``, a row is represented as a :class:`tuple`. Can be set to the " @@ -2006,18 +2014,18 @@ msgid "" "and returns a custom object representing an SQLite row." msgstr "" -#: library/sqlite3.rst:1724 +#: library/sqlite3.rst:1730 msgid "" "Defaults to what :attr:`Connection.row_factory` was set to when the :class:`!" "Cursor` was created. Assigning to this attribute does not affect :attr:" "`Connection.row_factory` of the parent connection." msgstr "" -#: library/sqlite3.rst:1740 +#: library/sqlite3.rst:1749 msgid "Row objects" msgstr "" -#: library/sqlite3.rst:1744 +#: library/sqlite3.rst:1753 msgid "" "A :class:`!Row` instance serves as a highly optimized :attr:`~Connection." "row_factory` for :class:`Connection` objects. It supports iteration, " @@ -2025,28 +2033,28 @@ msgid "" "index." msgstr "" -#: library/sqlite3.rst:1749 +#: library/sqlite3.rst:1758 msgid "" "Two :class:`!Row` objects compare equal if they have identical column names " "and values." msgstr "" -#: library/sqlite3.rst:1756 +#: library/sqlite3.rst:1765 msgid "" "Return a :class:`list` of column names as :class:`strings `. " "Immediately after a query, it is the first member of each tuple in :attr:" "`Cursor.description`." msgstr "" -#: library/sqlite3.rst:1760 +#: library/sqlite3.rst:1769 msgid "Added support of slicing." msgstr "" -#: library/sqlite3.rst:1767 +#: library/sqlite3.rst:1776 msgid "Blob objects" msgstr "" -#: library/sqlite3.rst:1773 +#: library/sqlite3.rst:1782 msgid "" "A :class:`Blob` instance is a :term:`file-like object` that can read and " "write data in an SQLite :abbr:`BLOB (Binary Large OBject)`. Call :func:" @@ -2054,13 +2062,13 @@ msgid "" "and :term:`slices ` for direct access to the blob data." msgstr "" -#: library/sqlite3.rst:1778 +#: library/sqlite3.rst:1787 msgid "" "Use the :class:`Blob` as a :term:`context manager` to ensure that the blob " "handle is closed after use." msgstr "" -#: library/sqlite3.rst:1781 +#: library/sqlite3.rst:1790 msgid "" "con = sqlite3.connect(\":memory:\")\n" "con.execute(\"CREATE TABLE test(blob_col blob)\")\n" @@ -2082,18 +2090,18 @@ msgid "" "con.close()" msgstr "" -#: library/sqlite3.rst:1809 +#: library/sqlite3.rst:1818 msgid "Close the blob." msgstr "" -#: library/sqlite3.rst:1811 +#: library/sqlite3.rst:1820 msgid "" "The blob will be unusable from this point onward. An :class:`~sqlite3." "Error` (or subclass) exception will be raised if any further operation is " "attempted with the blob." msgstr "" -#: library/sqlite3.rst:1817 +#: library/sqlite3.rst:1826 msgid "" "Read *length* bytes of data from the blob at the current offset position. If " "the end of the blob is reached, the data up to :abbr:`EOF (End of File)` " @@ -2101,18 +2109,18 @@ msgid "" "`~Blob.read` will read until the end of the blob." msgstr "" -#: library/sqlite3.rst:1825 +#: library/sqlite3.rst:1834 msgid "" "Write *data* to the blob at the current offset. This function cannot change " "the blob length. Writing beyond the end of the blob will raise :exc:" "`ValueError`." msgstr "" -#: library/sqlite3.rst:1831 +#: library/sqlite3.rst:1840 msgid "Return the current access position of the blob." msgstr "" -#: library/sqlite3.rst:1835 +#: library/sqlite3.rst:1844 msgid "" "Set the current access position of the blob to *offset*. The *origin* " "argument defaults to :const:`os.SEEK_SET` (absolute blob positioning). Other " @@ -2120,26 +2128,26 @@ msgid "" "position) and :const:`os.SEEK_END` (seek relative to the blob’s end)." msgstr "" -#: library/sqlite3.rst:1843 +#: library/sqlite3.rst:1852 msgid "PrepareProtocol objects" msgstr "" -#: library/sqlite3.rst:1847 +#: library/sqlite3.rst:1856 msgid "" "The PrepareProtocol type's single purpose is to act as a :pep:`246` style " "adaption protocol for objects that can :ref:`adapt themselves ` to :ref:`native SQLite types `." msgstr "" -#: library/sqlite3.rst:1855 +#: library/sqlite3.rst:1864 msgid "Exceptions" msgstr "" -#: library/sqlite3.rst:1857 +#: library/sqlite3.rst:1866 msgid "The exception hierarchy is defined by the DB-API 2.0 (:pep:`249`)." msgstr "" -#: library/sqlite3.rst:1861 +#: library/sqlite3.rst:1870 msgid "" "This exception is not currently raised by the :mod:`!sqlite3` module, but " "may be raised by applications using :mod:`!sqlite3`, for example if a user-" @@ -2147,39 +2155,39 @@ msgid "" "of :exc:`Exception`." msgstr "" -#: library/sqlite3.rst:1868 +#: library/sqlite3.rst:1877 msgid "" "The base class of the other exceptions in this module. Use this to catch all " "errors with one single :keyword:`except` statement. ``Error`` is a subclass " "of :exc:`Exception`." msgstr "" -#: library/sqlite3.rst:1872 +#: library/sqlite3.rst:1881 msgid "" "If the exception originated from within the SQLite library, the following " "two attributes are added to the exception:" msgstr "" -#: library/sqlite3.rst:1877 +#: library/sqlite3.rst:1886 msgid "" "The numeric error code from the `SQLite API `_" msgstr "" -#: library/sqlite3.rst:1884 +#: library/sqlite3.rst:1893 msgid "" "The symbolic name of the numeric error code from the `SQLite API `_" msgstr "" -#: library/sqlite3.rst:1891 +#: library/sqlite3.rst:1900 msgid "" "Exception raised for misuse of the low-level SQLite C API. In other words, " "if this exception is raised, it probably indicates a bug in the :mod:`!" "sqlite3` module. ``InterfaceError`` is a subclass of :exc:`Error`." msgstr "" -#: library/sqlite3.rst:1898 +#: library/sqlite3.rst:1907 msgid "" "Exception raised for errors that are related to the database. This serves as " "the base exception for several types of database errors. It is only raised " @@ -2187,14 +2195,14 @@ msgid "" "subclass of :exc:`Error`." msgstr "" -#: library/sqlite3.rst:1905 +#: library/sqlite3.rst:1914 msgid "" "Exception raised for errors caused by problems with the processed data, like " "numeric values out of range, and strings which are too long. ``DataError`` " "is a subclass of :exc:`DatabaseError`." msgstr "" -#: library/sqlite3.rst:1911 +#: library/sqlite3.rst:1920 msgid "" "Exception raised for errors that are related to the database's operation, " "and not necessarily under the control of the programmer. For example, the " @@ -2202,20 +2210,20 @@ msgid "" "``OperationalError`` is a subclass of :exc:`DatabaseError`." msgstr "" -#: library/sqlite3.rst:1919 +#: library/sqlite3.rst:1928 msgid "" "Exception raised when the relational integrity of the database is affected, " "e.g. a foreign key check fails. It is a subclass of :exc:`DatabaseError`." msgstr "" -#: library/sqlite3.rst:1924 +#: library/sqlite3.rst:1933 msgid "" "Exception raised when SQLite encounters an internal error. If this is " "raised, it may indicate that there is a problem with the runtime SQLite " "library. ``InternalError`` is a subclass of :exc:`DatabaseError`." msgstr "" -#: library/sqlite3.rst:1931 +#: library/sqlite3.rst:1940 msgid "" "Exception raised for :mod:`!sqlite3` API programming errors, for example " "supplying the wrong number of bindings to a query, or trying to operate on a " @@ -2223,7 +2231,7 @@ msgid "" "`DatabaseError`." msgstr "" -#: library/sqlite3.rst:1938 +#: library/sqlite3.rst:1947 msgid "" "Exception raised in case a method or database API is not supported by the " "underlying SQLite library. For example, setting *deterministic* to ``True`` " @@ -2232,78 +2240,78 @@ msgid "" "subclass of :exc:`DatabaseError`." msgstr "" -#: library/sqlite3.rst:1948 +#: library/sqlite3.rst:1957 msgid "SQLite and Python types" msgstr "" -#: library/sqlite3.rst:1950 +#: library/sqlite3.rst:1959 msgid "" "SQLite natively supports the following types: ``NULL``, ``INTEGER``, " "``REAL``, ``TEXT``, ``BLOB``." msgstr "" -#: library/sqlite3.rst:1953 +#: library/sqlite3.rst:1962 msgid "" "The following Python types can thus be sent to SQLite without any problem:" msgstr "" -#: library/sqlite3.rst:1973 +#: library/sqlite3.rst:1982 msgid "Python type" msgstr "" -#: library/sqlite3.rst:1973 +#: library/sqlite3.rst:1982 msgid "SQLite type" msgstr "" -#: library/sqlite3.rst:1975 +#: library/sqlite3.rst:1984 msgid "``None``" msgstr "" -#: library/sqlite3.rst:1975 +#: library/sqlite3.rst:1984 msgid "``NULL``" msgstr "" -#: library/sqlite3.rst:1977 +#: library/sqlite3.rst:1986 msgid ":class:`int`" msgstr "" -#: library/sqlite3.rst:1977 +#: library/sqlite3.rst:1986 msgid "``INTEGER``" msgstr "" -#: library/sqlite3.rst:1979 +#: library/sqlite3.rst:1988 msgid ":class:`float`" msgstr "" -#: library/sqlite3.rst:1979 +#: library/sqlite3.rst:1988 msgid "``REAL``" msgstr "" -#: library/sqlite3.rst:1964 +#: library/sqlite3.rst:1973 msgid ":class:`str`" msgstr "" -#: library/sqlite3.rst:1981 +#: library/sqlite3.rst:1990 msgid "``TEXT``" msgstr "" -#: library/sqlite3.rst:1984 +#: library/sqlite3.rst:1993 msgid ":class:`bytes`" msgstr "" -#: library/sqlite3.rst:1984 +#: library/sqlite3.rst:1993 msgid "``BLOB``" msgstr "" -#: library/sqlite3.rst:1970 +#: library/sqlite3.rst:1979 msgid "This is how SQLite types are converted to Python types by default:" msgstr "" -#: library/sqlite3.rst:1981 +#: library/sqlite3.rst:1990 msgid "depends on :attr:`~Connection.text_factory`, :class:`str` by default" msgstr "" -#: library/sqlite3.rst:1987 +#: library/sqlite3.rst:1996 msgid "" "The type system of the :mod:`!sqlite3` module is extensible in two ways: you " "can store additional Python types in an SQLite database via :ref:`object " @@ -2312,47 +2320,47 @@ msgid "" "converters>`." msgstr "" -#: library/sqlite3.rst:1997 +#: library/sqlite3.rst:2006 msgid "Default adapters and converters (deprecated)" msgstr "" -#: library/sqlite3.rst:2001 +#: library/sqlite3.rst:2010 msgid "" "The default adapters and converters are deprecated as of Python 3.12. " "Instead, use the :ref:`sqlite3-adapter-converter-recipes` and tailor them to " "your needs." msgstr "" -#: library/sqlite3.rst:2005 +#: library/sqlite3.rst:2014 msgid "The deprecated default adapters and converters consist of:" msgstr "" -#: library/sqlite3.rst:2007 +#: library/sqlite3.rst:2016 msgid "" "An adapter for :class:`datetime.date` objects to :class:`strings ` in " "`ISO 8601`_ format." msgstr "" -#: library/sqlite3.rst:2009 +#: library/sqlite3.rst:2018 msgid "" "An adapter for :class:`datetime.datetime` objects to strings in ISO 8601 " "format." msgstr "" -#: library/sqlite3.rst:2011 +#: library/sqlite3.rst:2020 msgid "" "A converter for :ref:`declared ` \"date\" types to :" "class:`datetime.date` objects." msgstr "" -#: library/sqlite3.rst:2013 +#: library/sqlite3.rst:2022 msgid "" "A converter for declared \"timestamp\" types to :class:`datetime.datetime` " "objects. Fractional parts will be truncated to 6 digits (microsecond " "precision)." msgstr "" -#: library/sqlite3.rst:2019 +#: library/sqlite3.rst:2028 msgid "" "The default \"timestamp\" converter ignores UTC offsets in the database and " "always returns a naive :class:`datetime.datetime` object. To preserve UTC " @@ -2360,42 +2368,42 @@ msgid "" "offset-aware converter with :func:`register_converter`." msgstr "" -#: library/sqlite3.rst:2032 +#: library/sqlite3.rst:2041 msgid "Command-line interface" msgstr "" -#: library/sqlite3.rst:2034 +#: library/sqlite3.rst:2043 msgid "" "The :mod:`!sqlite3` module can be invoked as a script, using the " "interpreter's :option:`-m` switch, in order to provide a simple SQLite " "shell. The argument signature is as follows::" msgstr "" -#: library/sqlite3.rst:2039 +#: library/sqlite3.rst:2048 msgid "python -m sqlite3 [-h] [-v] [filename] [sql]" msgstr "" -#: library/sqlite3.rst:2041 +#: library/sqlite3.rst:2050 msgid "Type ``.quit`` or CTRL-D to exit the shell." msgstr "" -#: library/sqlite3.rst:2047 +#: library/sqlite3.rst:2056 msgid "Print CLI help." msgstr "" -#: library/sqlite3.rst:2051 +#: library/sqlite3.rst:2060 msgid "Print underlying SQLite library version." msgstr "" -#: library/sqlite3.rst:2059 +#: library/sqlite3.rst:2068 msgid "How-to guides" msgstr "" -#: library/sqlite3.rst:2064 +#: library/sqlite3.rst:2073 msgid "How to use placeholders to bind values in SQL queries" msgstr "" -#: library/sqlite3.rst:2066 +#: library/sqlite3.rst:2075 msgid "" "SQL operations usually need to use values from Python variables. However, " "beware of using Python's string operations to assemble queries, as they are " @@ -2403,7 +2411,7 @@ msgid "" "close the single quote and inject ``OR TRUE`` to select all rows::" msgstr "" -#: library/sqlite3.rst:2071 +#: library/sqlite3.rst:2080 msgid "" ">>> # Never do this -- insecure!\n" ">>> symbol = input()\n" @@ -2414,7 +2422,7 @@ msgid "" ">>> cur.execute(sql)" msgstr "" -#: library/sqlite3.rst:2079 +#: library/sqlite3.rst:2088 msgid "" "Instead, use the DB-API's parameter substitution. To insert a variable into " "a query string, use a placeholder in the string, and substitute the actual " @@ -2422,7 +2430,7 @@ msgid "" "second argument of the cursor's :meth:`~Cursor.execute` method." msgstr "" -#: library/sqlite3.rst:2084 +#: library/sqlite3.rst:2093 msgid "" "An SQL statement may use one of two kinds of placeholders: question marks " "(qmark style) or named placeholders (named style). For the qmark style, " @@ -2433,7 +2441,7 @@ msgid "" "ignored. Here's an example of both styles:" msgstr "" -#: library/sqlite3.rst:2095 +#: library/sqlite3.rst:2104 msgid "" "con = sqlite3.connect(\":memory:\")\n" "cur = con.execute(\"CREATE TABLE lang(name, first_appeared)\")\n" @@ -2454,24 +2462,24 @@ msgid "" "con.close()" msgstr "" -#: library/sqlite3.rst:2122 +#: library/sqlite3.rst:2131 msgid "" ":pep:`249` numeric placeholders are *not* supported. If used, they will be " "interpreted as named placeholders." msgstr "" -#: library/sqlite3.rst:2129 +#: library/sqlite3.rst:2138 msgid "How to adapt custom Python types to SQLite values" msgstr "" -#: library/sqlite3.rst:2131 +#: library/sqlite3.rst:2140 msgid "" "SQLite supports only a limited set of data types natively. To store custom " "Python types in SQLite databases, *adapt* them to one of the :ref:`Python " "types SQLite natively understands `." msgstr "" -#: library/sqlite3.rst:2135 +#: library/sqlite3.rst:2144 msgid "" "There are two ways to adapt Python objects to SQLite types: letting your " "object adapt itself, or using an *adapter callable*. The latter will take " @@ -2481,11 +2489,11 @@ msgid "" "custom adapter functions." msgstr "" -#: library/sqlite3.rst:2147 +#: library/sqlite3.rst:2156 msgid "How to write adaptable objects" msgstr "" -#: library/sqlite3.rst:2149 +#: library/sqlite3.rst:2158 msgid "" "Suppose we have a :class:`!Point` class that represents a pair of " "coordinates, ``x`` and ``y``, in a Cartesian coordinate system. The " @@ -2495,7 +2503,7 @@ msgid "" "object passed to *protocol* will be of type :class:`PrepareProtocol`." msgstr "" -#: library/sqlite3.rst:2157 +#: library/sqlite3.rst:2166 msgid "" "class Point:\n" " def __init__(self, x, y):\n" @@ -2513,18 +2521,18 @@ msgid "" "con.close()" msgstr "" -#: library/sqlite3.rst:2181 +#: library/sqlite3.rst:2190 msgid "How to register adapter callables" msgstr "" -#: library/sqlite3.rst:2183 +#: library/sqlite3.rst:2192 msgid "" "The other possibility is to create a function that converts the Python " "object to an SQLite-compatible type. This function can then be registered " "using :func:`register_adapter`." msgstr "" -#: library/sqlite3.rst:2187 +#: library/sqlite3.rst:2196 msgid "" "class Point:\n" " def __init__(self, x, y):\n" @@ -2543,68 +2551,68 @@ msgid "" "con.close()" msgstr "" -#: library/sqlite3.rst:2214 +#: library/sqlite3.rst:2223 msgid "How to convert SQLite values to custom Python types" msgstr "" -#: library/sqlite3.rst:2216 +#: library/sqlite3.rst:2225 msgid "" "Writing an adapter lets you convert *from* custom Python types *to* SQLite " "values. To be able to convert *from* SQLite values *to* custom Python types, " "we use *converters*." msgstr "" -#: library/sqlite3.rst:2221 +#: library/sqlite3.rst:2230 msgid "" "Let's go back to the :class:`!Point` class. We stored the x and y " "coordinates separated via semicolons as strings in SQLite." msgstr "" -#: library/sqlite3.rst:2224 +#: library/sqlite3.rst:2233 msgid "" "First, we'll define a converter function that accepts the string as a " "parameter and constructs a :class:`!Point` object from it." msgstr "" -#: library/sqlite3.rst:2229 +#: library/sqlite3.rst:2238 msgid "" "Converter functions are **always** passed a :class:`bytes` object, no matter " "the underlying SQLite data type." msgstr "" -#: library/sqlite3.rst:2232 +#: library/sqlite3.rst:2241 msgid "" "def convert_point(s):\n" " x, y = map(float, s.split(b\";\"))\n" " return Point(x, y)" msgstr "" -#: library/sqlite3.rst:2238 +#: library/sqlite3.rst:2247 msgid "" "We now need to tell :mod:`!sqlite3` when it should convert a given SQLite " "value. This is done when connecting to a database, using the *detect_types* " "parameter of :func:`connect`. There are three options:" msgstr "" -#: library/sqlite3.rst:2242 +#: library/sqlite3.rst:2251 msgid "Implicit: set *detect_types* to :const:`PARSE_DECLTYPES`" msgstr "" -#: library/sqlite3.rst:2243 +#: library/sqlite3.rst:2252 msgid "Explicit: set *detect_types* to :const:`PARSE_COLNAMES`" msgstr "" -#: library/sqlite3.rst:2244 +#: library/sqlite3.rst:2253 msgid "" "Both: set *detect_types* to ``sqlite3.PARSE_DECLTYPES | sqlite3." "PARSE_COLNAMES``. Column names take precedence over declared types." msgstr "" -#: library/sqlite3.rst:2248 +#: library/sqlite3.rst:2257 msgid "The following example illustrates the implicit and explicit approaches:" msgstr "" -#: library/sqlite3.rst:2250 +#: library/sqlite3.rst:2259 msgid "" "class Point:\n" " def __init__(self, x, y):\n" @@ -2646,17 +2654,17 @@ msgid "" "con.close()" msgstr "" -#: library/sqlite3.rst:2301 +#: library/sqlite3.rst:2310 msgid "Adapter and converter recipes" msgstr "" -#: library/sqlite3.rst:2303 +#: library/sqlite3.rst:2312 msgid "This section shows recipes for common adapters and converters." msgstr "" -#: library/sqlite3.rst:2305 +#: library/sqlite3.rst:2314 msgid "" -"import datetime\n" +"import datetime as dt\n" "import sqlite3\n" "\n" "def adapt_date_iso(val):\n" @@ -2671,32 +2679,32 @@ msgid "" " \"\"\"Adapt datetime.datetime to Unix timestamp.\"\"\"\n" " return int(val.timestamp())\n" "\n" -"sqlite3.register_adapter(datetime.date, adapt_date_iso)\n" -"sqlite3.register_adapter(datetime.datetime, adapt_datetime_iso)\n" -"sqlite3.register_adapter(datetime.datetime, adapt_datetime_epoch)\n" +"sqlite3.register_adapter(dt.date, adapt_date_iso)\n" +"sqlite3.register_adapter(dt.datetime, adapt_datetime_iso)\n" +"sqlite3.register_adapter(dt.datetime, adapt_datetime_epoch)\n" "\n" "def convert_date(val):\n" " \"\"\"Convert ISO 8601 date to datetime.date object.\"\"\"\n" -" return datetime.date.fromisoformat(val.decode())\n" +" return dt.date.fromisoformat(val.decode())\n" "\n" "def convert_datetime(val):\n" " \"\"\"Convert ISO 8601 datetime to datetime.datetime object.\"\"\"\n" -" return datetime.datetime.fromisoformat(val.decode())\n" +" return dt.datetime.fromisoformat(val.decode())\n" "\n" "def convert_timestamp(val):\n" " \"\"\"Convert Unix epoch timestamp to datetime.datetime object.\"\"\"\n" -" return datetime.datetime.fromtimestamp(int(val))\n" +" return dt.datetime.fromtimestamp(int(val))\n" "\n" "sqlite3.register_converter(\"date\", convert_date)\n" "sqlite3.register_converter(\"datetime\", convert_datetime)\n" "sqlite3.register_converter(\"timestamp\", convert_timestamp)" msgstr "" -#: library/sqlite3.rst:2365 +#: library/sqlite3.rst:2374 msgid "How to use connection shortcut methods" msgstr "" -#: library/sqlite3.rst:2367 +#: library/sqlite3.rst:2376 msgid "" "Using the :meth:`~Connection.execute`, :meth:`~Connection.executemany`, and :" "meth:`~Connection.executescript` methods of the :class:`Connection` class, " @@ -2708,7 +2716,7 @@ msgid "" "object." msgstr "" -#: library/sqlite3.rst:2376 +#: library/sqlite3.rst:2385 msgid "" "# Create and fill the table.\n" "con = sqlite3.connect(\":memory:\")\n" @@ -2732,11 +2740,11 @@ msgid "" "con.close()" msgstr "" -#: library/sqlite3.rst:2408 +#: library/sqlite3.rst:2417 msgid "How to use the connection context manager" msgstr "" -#: library/sqlite3.rst:2410 +#: library/sqlite3.rst:2419 msgid "" "A :class:`Connection` object can be used as a context manager that " "automatically commits or rolls back open transactions when leaving the body " @@ -2748,21 +2756,21 @@ msgid "" "rolling back." msgstr "" -#: library/sqlite3.rst:2421 +#: library/sqlite3.rst:2430 msgid "" "If there is no open transaction upon leaving the body of the ``with`` " "statement, or if :attr:`~Connection.autocommit` is ``True``, the context " "manager does nothing." msgstr "" -#: library/sqlite3.rst:2426 +#: library/sqlite3.rst:2435 msgid "" "The context manager neither implicitly opens a new transaction nor closes " "the connection. If you need a closing context manager, consider using :meth:" "`contextlib.closing`." msgstr "" -#: library/sqlite3.rst:2430 +#: library/sqlite3.rst:2439 msgid "" "con = sqlite3.connect(\":memory:\")\n" "con.execute(\"CREATE TABLE lang(id INTEGER PRIMARY KEY, name VARCHAR " @@ -2786,19 +2794,19 @@ msgid "" "con.close()" msgstr "" -#: library/sqlite3.rst:2460 +#: library/sqlite3.rst:2469 msgid "How to work with SQLite URIs" msgstr "" -#: library/sqlite3.rst:2462 +#: library/sqlite3.rst:2471 msgid "Some useful URI tricks include:" msgstr "" -#: library/sqlite3.rst:2464 +#: library/sqlite3.rst:2473 msgid "Open a database in read-only mode:" msgstr "" -#: library/sqlite3.rst:2466 +#: library/sqlite3.rst:2475 msgid "" ">>> con = sqlite3.connect(\"file:tutorial.db?mode=ro\", uri=True)\n" ">>> con.execute(\"CREATE TABLE readonly(data)\")\n" @@ -2807,24 +2815,24 @@ msgid "" ">>> con.close()" msgstr "" -#: library/sqlite3.rst:2474 +#: library/sqlite3.rst:2483 msgid "" "Do not implicitly create a new database file if it does not already exist; " "will raise :exc:`~sqlite3.OperationalError` if unable to create a new file:" msgstr "" -#: library/sqlite3.rst:2477 +#: library/sqlite3.rst:2486 msgid "" ">>> con = sqlite3.connect(\"file:nosuchdb.db?mode=rw\", uri=True)\n" "Traceback (most recent call last):\n" "OperationalError: unable to open database file" msgstr "" -#: library/sqlite3.rst:2484 +#: library/sqlite3.rst:2493 msgid "Create a shared named in-memory database:" msgstr "" -#: library/sqlite3.rst:2486 +#: library/sqlite3.rst:2495 msgid "" "db = \"file:mem1?mode=memory&cache=shared\"\n" "con1 = sqlite3.connect(db, uri=True)\n" @@ -2839,24 +2847,24 @@ msgid "" "con2.close()" msgstr "" -#: library/sqlite3.rst:2500 +#: library/sqlite3.rst:2509 msgid "" "More information about this feature, including a list of parameters, can be " "found in the `SQLite URI documentation`_." msgstr "" -#: library/sqlite3.rst:2509 +#: library/sqlite3.rst:2518 msgid "How to create and use row factories" msgstr "" -#: library/sqlite3.rst:2511 +#: library/sqlite3.rst:2520 msgid "" "By default, :mod:`!sqlite3` represents each row as a :class:`tuple`. If a :" "class:`!tuple` does not suit your needs, you can use the :class:`sqlite3." "Row` class or a custom :attr:`~Cursor.row_factory`." msgstr "" -#: library/sqlite3.rst:2516 +#: library/sqlite3.rst:2525 msgid "" "While :attr:`!row_factory` exists as an attribute both on the :class:" "`Cursor` and the :class:`Connection`, it is recommended to set :class:" @@ -2864,7 +2872,7 @@ msgid "" "use the same row factory." msgstr "" -#: library/sqlite3.rst:2521 +#: library/sqlite3.rst:2530 msgid "" ":class:`!Row` provides indexed and case-insensitive named access to columns, " "with minimal memory overhead and performance impact over a :class:`!tuple`. " @@ -2872,17 +2880,17 @@ msgid "" "attribute:" msgstr "" -#: library/sqlite3.rst:2526 +#: library/sqlite3.rst:2535 msgid "" ">>> con = sqlite3.connect(\":memory:\")\n" ">>> con.row_factory = sqlite3.Row" msgstr "" -#: library/sqlite3.rst:2531 +#: library/sqlite3.rst:2540 msgid "Queries now return :class:`!Row` objects:" msgstr "" -#: library/sqlite3.rst:2533 +#: library/sqlite3.rst:2542 msgid "" ">>> res = con.execute(\"SELECT 'Earth' AS name, 6378 AS radius\")\n" ">>> row = res.fetchone()\n" @@ -2897,7 +2905,7 @@ msgid "" ">>> con.close()" msgstr "" -#: library/sqlite3.rst:2549 +#: library/sqlite3.rst:2558 msgid "" "The ``FROM`` clause can be omitted in the ``SELECT`` statement, as in the " "above example. In such cases, SQLite returns a single row with columns " @@ -2905,25 +2913,25 @@ msgid "" "alias``." msgstr "" -#: library/sqlite3.rst:2554 +#: library/sqlite3.rst:2563 msgid "" "You can create a custom :attr:`~Cursor.row_factory` that returns each row as " "a :class:`dict`, with column names mapped to values:" msgstr "" -#: library/sqlite3.rst:2557 +#: library/sqlite3.rst:2566 msgid "" "def dict_factory(cursor, row):\n" " fields = [column[0] for column in cursor.description]\n" " return {key: value for key, value in zip(fields, row)}" msgstr "" -#: library/sqlite3.rst:2563 +#: library/sqlite3.rst:2572 msgid "" "Using it, queries now return a :class:`!dict` instead of a :class:`!tuple`:" msgstr "" -#: library/sqlite3.rst:2565 +#: library/sqlite3.rst:2574 msgid "" ">>> con = sqlite3.connect(\":memory:\")\n" ">>> con.row_factory = dict_factory\n" @@ -2933,11 +2941,11 @@ msgid "" ">>> con.close()" msgstr "" -#: library/sqlite3.rst:2574 +#: library/sqlite3.rst:2583 msgid "The following row factory returns a :term:`named tuple`:" msgstr "" -#: library/sqlite3.rst:2576 +#: library/sqlite3.rst:2585 msgid "" "from collections import namedtuple\n" "\n" @@ -2947,11 +2955,11 @@ msgid "" " return cls._make(row)" msgstr "" -#: library/sqlite3.rst:2585 +#: library/sqlite3.rst:2594 msgid ":func:`!namedtuple_factory` can be used as follows:" msgstr "" -#: library/sqlite3.rst:2587 +#: library/sqlite3.rst:2596 msgid "" ">>> con = sqlite3.connect(\":memory:\")\n" ">>> con.row_factory = namedtuple_factory\n" @@ -2966,18 +2974,18 @@ msgid "" ">>> con.close()" msgstr "" -#: library/sqlite3.rst:2601 +#: library/sqlite3.rst:2610 msgid "" "With some adjustments, the above recipe can be adapted to use a :class:" "`~dataclasses.dataclass`, or any other custom class, instead of a :class:" "`~collections.namedtuple`." msgstr "" -#: library/sqlite3.rst:2609 +#: library/sqlite3.rst:2618 msgid "How to handle non-UTF-8 text encodings" msgstr "" -#: library/sqlite3.rst:2611 +#: library/sqlite3.rst:2620 msgid "" "By default, :mod:`!sqlite3` uses :class:`str` to adapt SQLite values with " "the ``TEXT`` data type. This works well for UTF-8 encoded text, but it might " @@ -2985,7 +2993,7 @@ msgid "" "`~Connection.text_factory` to handle such cases." msgstr "" -#: library/sqlite3.rst:2617 +#: library/sqlite3.rst:2626 msgid "" "Because of SQLite's `flexible typing`_, it is not uncommon to encounter " "table columns with the ``TEXT`` data type containing non-UTF-8 encodings, or " @@ -2996,39 +3004,39 @@ msgid "" "text using this :attr:`~Connection.text_factory`:" msgstr "" -#: library/sqlite3.rst:2626 +#: library/sqlite3.rst:2635 msgid "con.text_factory = lambda data: str(data, encoding=\"latin2\")" msgstr "" -#: library/sqlite3.rst:2630 +#: library/sqlite3.rst:2639 msgid "" "For invalid UTF-8 or arbitrary data in stored in ``TEXT`` table columns, you " "can use the following technique, borrowed from the :ref:`unicode-howto`:" msgstr "" -#: library/sqlite3.rst:2633 +#: library/sqlite3.rst:2642 msgid "con.text_factory = lambda data: str(data, errors=\"surrogateescape\")" msgstr "" -#: library/sqlite3.rst:2639 +#: library/sqlite3.rst:2648 msgid "" "The :mod:`!sqlite3` module API does not support strings containing " "surrogates." msgstr "" -#: library/sqlite3.rst:2644 +#: library/sqlite3.rst:2653 msgid ":ref:`unicode-howto`" msgstr "" -#: library/sqlite3.rst:2650 +#: library/sqlite3.rst:2659 msgid "Explanation" msgstr "" -#: library/sqlite3.rst:2656 +#: library/sqlite3.rst:2665 msgid "Transaction control" msgstr "" -#: library/sqlite3.rst:2658 +#: library/sqlite3.rst:2667 msgid "" ":mod:`!sqlite3` offers multiple methods of controlling whether, when and how " "database transactions are opened and closed. :ref:`sqlite3-transaction-" @@ -3036,24 +3044,24 @@ msgid "" "isolation-level` retains the pre-Python 3.12 behaviour." msgstr "" -#: library/sqlite3.rst:2667 +#: library/sqlite3.rst:2676 msgid "Transaction control via the ``autocommit`` attribute" msgstr "" -#: library/sqlite3.rst:2669 +#: library/sqlite3.rst:2678 msgid "" "The recommended way of controlling transaction behaviour is through the :" "attr:`Connection.autocommit` attribute, which should preferably be set using " "the *autocommit* parameter of :func:`connect`." msgstr "" -#: library/sqlite3.rst:2674 +#: library/sqlite3.rst:2683 msgid "" "It is suggested to set *autocommit* to ``False``, which implies :pep:`249`-" "compliant transaction control. This means:" msgstr "" -#: library/sqlite3.rst:2678 +#: library/sqlite3.rst:2687 msgid "" ":mod:`!sqlite3` ensures that a transaction is always open, so :func:" "`connect`, :meth:`Connection.commit`, and :meth:`Connection.rollback` will " @@ -3062,21 +3070,21 @@ msgid "" "when opening transactions." msgstr "" -#: library/sqlite3.rst:2683 +#: library/sqlite3.rst:2692 msgid "Transactions should be committed explicitly using :meth:`!commit`." msgstr "" -#: library/sqlite3.rst:2684 +#: library/sqlite3.rst:2693 msgid "Transactions should be rolled back explicitly using :meth:`!rollback`." msgstr "" -#: library/sqlite3.rst:2685 +#: library/sqlite3.rst:2694 msgid "" "An implicit rollback is performed if the database is :meth:`~Connection." "close`-ed with pending changes." msgstr "" -#: library/sqlite3.rst:2688 +#: library/sqlite3.rst:2697 msgid "" "Set *autocommit* to ``True`` to enable SQLite's `autocommit mode`_. In this " "mode, :meth:`Connection.commit` and :meth:`Connection.rollback` have no " @@ -3085,25 +3093,25 @@ msgid "" "in_transaction` to query the low-level SQLite autocommit mode." msgstr "" -#: library/sqlite3.rst:2696 +#: library/sqlite3.rst:2705 msgid "" "Set *autocommit* to :data:`LEGACY_TRANSACTION_CONTROL` to leave transaction " "control behaviour to the :attr:`Connection.isolation_level` attribute. See :" "ref:`sqlite3-transaction-control-isolation-level` for more information." msgstr "" -#: library/sqlite3.rst:2705 +#: library/sqlite3.rst:2714 msgid "Transaction control via the ``isolation_level`` attribute" msgstr "" -#: library/sqlite3.rst:2709 +#: library/sqlite3.rst:2718 msgid "" "The recommended way of controlling transactions is via the :attr:" "`~Connection.autocommit` attribute. See :ref:`sqlite3-transaction-control-" "autocommit`." msgstr "" -#: library/sqlite3.rst:2713 +#: library/sqlite3.rst:2722 msgid "" "If :attr:`Connection.autocommit` is set to :data:" "`LEGACY_TRANSACTION_CONTROL` (the default), transaction behaviour is " @@ -3111,7 +3119,7 @@ msgid "" "Otherwise, :attr:`!isolation_level` has no effect." msgstr "" -#: library/sqlite3.rst:2719 +#: library/sqlite3.rst:2728 msgid "" "If the connection attribute :attr:`~Connection.isolation_level` is not " "``None``, new transactions are implicitly opened before :meth:`~Cursor." @@ -3125,7 +3133,7 @@ msgid "" "attribute." msgstr "" -#: library/sqlite3.rst:2732 +#: library/sqlite3.rst:2741 msgid "" "If :attr:`~Connection.isolation_level` is set to ``None``, no transactions " "are implicitly opened at all. This leaves the underlying SQLite library in " @@ -3135,33 +3143,33 @@ msgid "" "in_transaction` attribute." msgstr "" -#: library/sqlite3.rst:2740 +#: library/sqlite3.rst:2749 msgid "" "The :meth:`~Cursor.executescript` method implicitly commits any pending " "transaction before execution of the given SQL script, regardless of the " "value of :attr:`~Connection.isolation_level`." msgstr "" -#: library/sqlite3.rst:2744 +#: library/sqlite3.rst:2753 msgid "" ":mod:`!sqlite3` used to implicitly commit an open transaction before DDL " "statements. This is no longer the case." msgstr "" -#: library/sqlite3.rst:2748 +#: library/sqlite3.rst:2757 msgid "" "The recommended way of controlling transactions is now via the :attr:" "`~Connection.autocommit` attribute." msgstr "" -#: library/sqlite3.rst:1493 +#: library/sqlite3.rst:1499 msgid "? (question mark)" msgstr "" -#: library/sqlite3.rst:1494 +#: library/sqlite3.rst:1500 msgid "in SQL statements" msgstr "" -#: library/sqlite3.rst:1494 +#: library/sqlite3.rst:1500 msgid ": (colon)" msgstr "" diff --git a/library/ssl.po b/library/ssl.po index 786a6b0cb..c1c89110b 100644 --- a/library/ssl.po +++ b/library/ssl.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -108,7 +108,7 @@ msgid "" msgstr "" #: library/ssl.rst:73 -msgid "Functions, Constants, and Exceptions" +msgid "Functions, constants, and exceptions" msgstr "" #: library/ssl.rst:77 @@ -437,7 +437,7 @@ msgstr "" #: library/ssl.rst:361 msgid "" -"Return the time in seconds since the Epoch, given the ``cert_time`` string " +"Return the time in seconds since the epoch, given the ``cert_time`` string " "representing the \"notBefore\" or \"notAfter\" date from a certificate in " "``\"%b %d %H:%M:%S %Y %Z\"`` strptime format (C locale)." msgstr "" @@ -449,12 +449,12 @@ msgstr "" #: library/ssl.rst:368 msgid "" ">>> import ssl\n" +">>> import datetime as dt\n" ">>> timestamp = ssl.cert_time_to_seconds(\"Jan 5 09:34:43 2018 GMT\")\n" ">>> timestamp\n" "1515144883\n" -">>> from datetime import datetime\n" -">>> print(datetime.utcfromtimestamp(timestamp))\n" -"2018-01-05 09:34:43" +">>> print(dt.datetime.fromtimestamp(timestamp, dt.UTC))\n" +"2018-01-05 09:34:43+00:00" msgstr "" #: library/ssl.rst:378 @@ -1121,7 +1121,7 @@ msgid "" msgstr "" #: library/ssl.rst:1047 -msgid "SSL Sockets" +msgid "SSL sockets" msgstr "" #: library/ssl.rst:1051 @@ -1229,7 +1229,7 @@ msgstr "" #: library/ssl.rst:1093 msgid "" -":class:`SSLSocket` instances must to created with :meth:`~SSLContext." +":class:`SSLSocket` instances must be created with :meth:`~SSLContext." "wrap_socket`. In earlier versions, it was possible to create instances " "directly. This was never documented or officially supported." msgstr "" @@ -1606,7 +1606,7 @@ msgid "" msgstr "" #: library/ssl.rst:1408 -msgid "SSL Contexts" +msgid "SSL contexts" msgstr "" #: library/ssl.rst:1412 @@ -2318,7 +2318,7 @@ msgid "" "The attributes :attr:`~SSLContext.maximum_version`, :attr:`~SSLContext." "minimum_version` and :attr:`SSLContext.options` all affect the supported SSL " "and TLS versions of the context. The implementation does not prevent invalid " -"combination. For example a context with :attr:`OP_NO_TLSv1_2` in :attr:" +"combinations. For example a context with :attr:`OP_NO_TLSv1_2` in :attr:" "`~SSLContext.options` and :attr:`~SSLContext.maximum_version` set to :attr:" "`TLSVersion.TLSv1_2` will not be able to establish a TLS 1.2 connection." msgstr "" @@ -3042,7 +3042,7 @@ msgid "" msgstr "" #: library/ssl.rst:2524 -msgid "Memory BIO Support" +msgid "Memory BIO support" msgstr "" #: library/ssl.rst:2528 @@ -3405,13 +3405,13 @@ msgstr "" #: library/ssl.rst:2748 msgid "" ">>> client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)\n" -">>> client_context.minimum_version = ssl.TLSVersion.TLSv1_3\n" +">>> client_context.minimum_version = ssl.TLSVersion.TLSv1_2\n" ">>> client_context.maximum_version = ssl.TLSVersion.TLSv1_3" msgstr "" #: library/ssl.rst:2753 msgid "" -"The SSL context created above will only allow TLSv1.3 and later (if " +"The SSL client context created above will only allow TLSv1.2 and TLSv1.3 (if " "supported by your system) connections to a server. :const:" "`PROTOCOL_TLS_CLIENT` implies certificate validation and hostname checks by " "default. You have to load certificates into the context." @@ -3521,7 +3521,7 @@ msgid ":rfc:`RFC 4086: Randomness Requirements for Security <4086>`" msgstr "" #: library/ssl.rst:2821 -msgid "Donald E., Jeffrey I. Schiller" +msgid "Donald E. Eastlake, Jeffrey I. Schiller, Steve Crocker" msgstr "" #: library/ssl.rst:2823 @@ -3531,7 +3531,7 @@ msgid "" msgstr "" #: library/ssl.rst:2824 -msgid "D. Cooper" +msgid "David Cooper et al." msgstr "" #: library/ssl.rst:2826 @@ -3541,7 +3541,7 @@ msgid "" msgstr "" #: library/ssl.rst:2827 -msgid "T. Dierks et. al." +msgid "Tim Dierks and Eric Rescorla." msgstr "" #: library/ssl.rst:2829 @@ -3549,7 +3549,7 @@ msgid ":rfc:`RFC 6066: Transport Layer Security (TLS) Extensions <6066>`" msgstr "" #: library/ssl.rst:2830 -msgid "D. Eastlake" +msgid "Donald E. Eastlake" msgstr "" #: library/ssl.rst:2832 diff --git a/library/stat.po b/library/stat.po index 1475a5a2d..f3b0faecd 100644 --- a/library/stat.po +++ b/library/stat.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/statistics.po b/library/statistics.po index aefd15a35..142a7dcef 100644 --- a/library/statistics.po +++ b/library/statistics.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/stdtypes.po b/library/stdtypes.po index f1559535b..126e4a4be 100644 --- a/library/stdtypes.po +++ b/library/stdtypes.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: 2025-11-28 22:51+0200\n" "Last-Translator: Theofanis Petkos \n" "Language-Team: PyGreece \n" @@ -135,16 +135,16 @@ msgstr "" "Αυτές είναι οι λογικές (Boolean) πράξεις, ταξινομημένες βάσει προτεραιότητας:" #: library/stdtypes.rst:144 library/stdtypes.rst:366 library/stdtypes.rst:963 -#: library/stdtypes.rst:1182 +#: library/stdtypes.rst:1185 msgid "Operation" msgstr "Πράξη" -#: library/stdtypes.rst:276 library/stdtypes.rst:416 library/stdtypes.rst:1182 +#: library/stdtypes.rst:276 library/stdtypes.rst:416 library/stdtypes.rst:1185 msgid "Result" msgstr "Αποτέλεσμα" -#: library/stdtypes.rst:276 library/stdtypes.rst:963 library/stdtypes.rst:2764 -#: library/stdtypes.rst:3984 +#: library/stdtypes.rst:276 library/stdtypes.rst:963 library/stdtypes.rst:3012 +#: library/stdtypes.rst:4236 msgid "Notes" msgstr "Σημειώσεις" @@ -156,7 +156,7 @@ msgstr "``x or y``" msgid "if *x* is true, then *x*, else *y*" msgstr "αν το *x* είναι true, τότε *x*, αλλιώς *y*" -#: library/stdtypes.rst:965 library/stdtypes.rst:1197 library/stdtypes.rst:3990 +#: library/stdtypes.rst:965 library/stdtypes.rst:1200 library/stdtypes.rst:4242 msgid "\\(1)" msgstr "\\(1)" @@ -168,8 +168,8 @@ msgstr "``x and y``" msgid "if *x* is false, then *x*, else *y*" msgstr "αν το *x* είναι false, τότε *x*, αλλιώς *y*" -#: library/stdtypes.rst:289 library/stdtypes.rst:1208 library/stdtypes.rst:2776 -#: library/stdtypes.rst:3996 +#: library/stdtypes.rst:289 library/stdtypes.rst:1211 library/stdtypes.rst:3024 +#: library/stdtypes.rst:4248 msgid "\\(2)" msgstr "\\(2)" @@ -181,14 +181,14 @@ msgstr "``not x``" msgid "if *x* is false, then ``True``, else ``False``" msgstr "if *x* είναι false, τότε ``True``, αλλιώς ``False``" -#: library/stdtypes.rst:2778 library/stdtypes.rst:2782 -#: library/stdtypes.rst:3998 library/stdtypes.rst:4002 -#: library/stdtypes.rst:4004 +#: library/stdtypes.rst:3026 library/stdtypes.rst:3030 +#: library/stdtypes.rst:4250 library/stdtypes.rst:4254 +#: library/stdtypes.rst:4256 msgid "\\(3)" msgstr "\\(3)" -#: library/stdtypes.rst:320 library/stdtypes.rst:1007 library/stdtypes.rst:2810 -#: library/stdtypes.rst:4034 +#: library/stdtypes.rst:320 library/stdtypes.rst:1007 library/stdtypes.rst:3062 +#: library/stdtypes.rst:4286 msgid "Notes:" msgstr "Σημειώσεις:" @@ -240,8 +240,8 @@ msgstr "" msgid "This table summarizes the comparison operations:" msgstr "Αυτός ο πίνακας συνοψίζει τις πράξεις σύγκρισης:" -#: library/stdtypes.rst:2596 library/stdtypes.rst:2764 -#: library/stdtypes.rst:3984 +#: library/stdtypes.rst:2844 library/stdtypes.rst:3012 +#: library/stdtypes.rst:4236 msgid "Meaning" msgstr "Έννοια" @@ -310,13 +310,14 @@ msgid "negated object identity" msgstr "αρνητική ταυτότητα αντικειμένου" #: library/stdtypes.rst:167 +#, fuzzy msgid "" -"Objects of different types, except different numeric types, never compare " -"equal. The ``==`` operator is always defined but for some object types (for " -"example, class objects) is equivalent to :keyword:`is`. The ``<``, ``<=``, " -"``>`` and ``>=`` operators are only defined where they make sense; for " -"example, they raise a :exc:`TypeError` exception when one of the arguments " -"is a complex number." +"Unless stated otherwise, objects of different types never compare equal. The " +"``==`` operator is always defined but for some object types (for example, " +"class objects) is equivalent to :keyword:`is`. The ``<``, ``<=``, ``>`` and " +"``>=`` operators are only defined where they make sense; for example, they " +"raise a :exc:`TypeError` exception when one of the arguments is a complex " +"number." msgstr "" "Αντικείμενα διαφορετικών τύπων, εκτός από διαφορετικούς αριθμητικούς τύπους, " "δεν συγκρίνονται ποτέ ως ίσα. Ο τελεστής ``==`` ορίζεται πάντα αλλά για " @@ -583,7 +584,7 @@ msgstr "" "ένας μιγαδικός αριθμός με πραγματικό μέρος *re*, φανταστικό μέρος *im*. Το " "*im* μετατρέπεται αυτόματα σε μηδέν." -#: library/stdtypes.rst:2772 library/stdtypes.rst:4021 +#: library/stdtypes.rst:3020 library/stdtypes.rst:4273 msgid "\\(6)" msgstr "\\(6)" @@ -619,8 +620,8 @@ msgstr "``pow(x, y)``" msgid "*x* to the power *y*" msgstr "*x* σε δύναμη του *y*" -#: library/stdtypes.rst:313 library/stdtypes.rst:2800 library/stdtypes.rst:4017 -#: library/stdtypes.rst:4024 +#: library/stdtypes.rst:313 library/stdtypes.rst:3048 library/stdtypes.rst:4269 +#: library/stdtypes.rst:4276 msgid "\\(5)" msgstr "\\(5)" @@ -795,8 +796,8 @@ msgstr "``x | y``" msgid "bitwise :dfn:`or` of *x* and *y*" msgstr "bitwise :dfn:`or` των *x* και *y*" -#: library/stdtypes.rst:421 library/stdtypes.rst:2786 library/stdtypes.rst:4006 -#: library/stdtypes.rst:4010 +#: library/stdtypes.rst:421 library/stdtypes.rst:3034 library/stdtypes.rst:4258 +#: library/stdtypes.rst:4262 msgid "\\(4)" msgstr "\\(4)" @@ -2003,21 +2004,37 @@ msgstr "" "Σημειώστε όμως ότι το ``-0`` εξακολουθεί να είναι ``0``." #: library/stdtypes.rst:1052 +#, fuzzy msgid "" "The slice of *s* from *i* to *j* is defined as the sequence of items with " -"index *k* such that ``i <= k < j``. If *i* or *j* is greater than " -"``len(s)``, use ``len(s)``. If *i* is omitted or ``None``, use ``0``. If " -"*j* is omitted or ``None``, use ``len(s)``. If *i* is greater than or equal " -"to *j*, the slice is empty." -msgstr "" -"Το υποσύνολο (slice) του *s* από το *i* έως το *j* ορίζεται ως η ακολουθία " -"στοιχείων με δείκτη *k* τέτοια ώστε ``i <= k < j```. Εάν το *i* ή το *j* " -"είναι μεγαλύτερο από το ``len(s)``, χρησιμοποιήστε το ``len(s)``. Αν το *i* " -"παραλείπεται ή είναι ``None``, χρησιμοποιήστε ``0``. Αν το *j* παραλείπεται " -"ή είναι ``μηδέν``, χρησιμοποιήστε το ``len(s)``. Εάν το *i* είναι " -"μεγαλύτερο από ή ίσο με το *j*, το υποσύνολο (slice) είναι κενό." +"index *k* such that ``i <= k < j``." +msgstr "" +"το υποσύνολο (slice) του *s* από το *i* έως το *j* αντικαθίσταται από τα " +"περιεχόμενα του iterable *t*" + +#: library/stdtypes.rst:1055 +msgid "If *i* is omitted or ``None``, use ``0``." +msgstr "" + +#: library/stdtypes.rst:1056 +msgid "If *j* is omitted or ``None``, use ``len(s)``." +msgstr "" + +#: library/stdtypes.rst:1057 +#, fuzzy +msgid "If *i* or *j* is less than ``-len(s)``, use ``0``." +msgstr "if *x* είναι false, τότε ``True``, αλλιώς ``False``" + +#: library/stdtypes.rst:1058 +#, fuzzy +msgid "If *i* or *j* is greater than ``len(s)``, use ``len(s)``." +msgstr "if *x* είναι false, τότε ``True``, αλλιώς ``False``" #: library/stdtypes.rst:1059 +msgid "If *i* is greater than or equal to *j*, the slice is empty." +msgstr "" + +#: library/stdtypes.rst:1062 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 " @@ -2040,7 +2057,7 @@ msgstr "" "από το πρόσημο του *k*). Σημειώστε ότι το *k* δεν μπορεί να είναι μηδέν. " "Εάν το *k* είναι ``None``, αντιμετωπίζεται όπως το ``1``." -#: library/stdtypes.rst:1070 +#: library/stdtypes.rst:1073 msgid "" "Concatenating immutable sequences always results in a new object. This " "means that building up a sequence by repeated concatenation will have a " @@ -2054,7 +2071,7 @@ msgstr "" "γραμμικό κόστος χρόνου εκτέλεσης (runtime cost), πρέπει να μεταβείτε σε μία " "από τις παρακάτω εναλλακτικές λύσεις::" -#: library/stdtypes.rst:1075 +#: library/stdtypes.rst:1078 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 " @@ -2065,7 +2082,7 @@ msgstr "" "ένα :class:`io.StringIO` instance και ανακτήσετε την τιμή της όταν " "ολοκληρωθεί" -#: library/stdtypes.rst:1079 +#: library/stdtypes.rst:1082 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 :" @@ -2078,17 +2095,17 @@ msgstr "" "αντικείμενο. Τα αντικείμενα :class:`bytearray` είναι μεταβλητά και έχουν " "έναν αποτελεσματικό μηχανισμό συνολικής κατανομής (overallocation)" -#: library/stdtypes.rst:1084 +#: library/stdtypes.rst:1087 msgid "if concatenating :class:`tuple` objects, extend a :class:`list` instead" msgstr "" "αν συνενώνεται αντικείμενα :class:`tuple`, επεκτείνετε μια :class:`list` " "αντ' αυτού" -#: library/stdtypes.rst:1086 +#: library/stdtypes.rst:1089 msgid "for other types, investigate the relevant class documentation" msgstr "για άλλους τύπους, ερευνήστε τη σχετική τεκμηρίωση των κλάσεων" -#: library/stdtypes.rst:1090 +#: library/stdtypes.rst:1093 msgid "" "Some sequence types (such as :class:`range`) only support item sequences " "that follow specific patterns, and hence don't support sequence " @@ -2098,34 +2115,34 @@ msgstr "" "ακολουθίες στοιχείων που ακολουθούν συγκεκριμένα μοτίβα, και ως εκ τούτου " "δεν υποστηρίζουν ακολουθία συνένωση ή επανάληψη." -#: library/stdtypes.rst:1095 +#: library/stdtypes.rst:1098 msgid "An :exc:`IndexError` is raised if *i* is outside the sequence range." msgstr "" "Μια :exc:`IndexError` γίνεται raise εάν το *i* είναι εκτός του εύρους της " "ακολουθίας." -#: library/stdtypes.rst:1098 +#: library/stdtypes.rst:1101 msgid "Sequence Methods" msgstr "Μέθοδοι Ακολουθίας" -#: library/stdtypes.rst:1099 +#: library/stdtypes.rst:1102 msgid "Sequence types also support the following methods:" msgstr "Οι τύποι ακολουθίας υποστηρίζουμε επίσης τις παρακάτω μεθόδους:" -#: library/stdtypes.rst:1109 +#: library/stdtypes.rst:1112 msgid "Return the total number of occurrences of *value* in *sequence*." msgstr "Επιστρέφει τον συνολικό αριθμό εμφανίσεων του *value* στο *sequence*." -#: library/stdtypes.rst:1119 +#: library/stdtypes.rst:1122 msgid "Return the index of the first occurrence of *value* in *sequence*." msgstr "Επιστρέφει τον δείκτη της πρώτης εμφάνισης του *value* στο *sequence*." -#: library/stdtypes.rst:1305 +#: library/stdtypes.rst:1308 msgid "Raises :exc:`ValueError` if *value* is not found in *sequence*." msgstr "" "Κάνει raise μια :exc:`ValueError` εάν το *value* δεν βρεθεί στο *sequence*." -#: library/stdtypes.rst:1123 +#: library/stdtypes.rst:1126 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 " @@ -2137,18 +2154,18 @@ msgstr "" "*stop*. Αυτό είναι κατά προσέγγιση ισοδύναμο με το ``start + sequence[start:" "stop].index(value)``, μόνο που δεν αντιγράφει κανένα δεδομένο." -#: library/stdtypes.rst:1129 +#: library/stdtypes.rst:1132 msgid "" "Not all sequence types support passing the *start* and *stop* arguments." msgstr "" "Δεν υποστηρίζουν όλοι οι τύποι ακολουθίας τη μετάδοση των *start* και *stop* " "ορισμάτων." -#: library/stdtypes.rst:1135 +#: library/stdtypes.rst:1138 msgid "Immutable Sequence Types" msgstr "Τύποι Αμετάβλητων Ακολουθιών (Sequences)" -#: library/stdtypes.rst:1142 +#: library/stdtypes.rst:1145 msgid "" "The only operation that immutable sequence types generally implement that is " "not also implemented by mutable sequence types is support for the :func:" @@ -2158,7 +2175,7 @@ msgstr "" "δεν είναι υλοποιημένοι από μεταβλητούς τύπους ακολουθίας, είναι η υποστήριξη " "της :func:`hash` built-in." -#: library/stdtypes.rst:1146 +#: library/stdtypes.rst:1149 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:" @@ -2168,7 +2185,7 @@ msgstr "" "class:`tuple`, να χρησιμοποιούνται ως κλειδιά :class:`dict` και να " "αποθηκεύονται σε :class:`set` και :class:`frozenset` instances." -#: library/stdtypes.rst:1150 +#: library/stdtypes.rst:1153 msgid "" "Attempting to hash an immutable sequence that contains unhashable values " "will result in :exc:`TypeError`." @@ -2176,11 +2193,11 @@ msgstr "" "Η προσπάθεια κατακερματισμού μιας αμετάβλητης ακολουθίας που περιέχει μη " "κατακερματιστέες (unhashable) τιμές θα οδηγήσει σε :exc:`TypeError`." -#: library/stdtypes.rst:1157 +#: library/stdtypes.rst:1160 msgid "Mutable Sequence Types" msgstr "Τύποι Μεταβλητών Ακολουθιών (Sequences)" -#: library/stdtypes.rst:1164 +#: library/stdtypes.rst:1167 msgid "" "The operations in the following table are defined on mutable sequence types. " "The :class:`collections.abc.MutableSequence` ABC is provided to make it " @@ -2191,7 +2208,7 @@ msgstr "" "κάνει ευκολότερη την σωστή υλοποίηση αυτών των λειτουργιών σε " "προσαρμοσμένους τύπους ακολουθιών." -#: library/stdtypes.rst:1168 +#: library/stdtypes.rst:1171 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 " @@ -2204,65 +2221,65 @@ msgstr "" "επιβάλλονται από το *s* (για παράδειγμα, το :class:`bytearray` δέχεται μόνο " "ακέραιους που πληρούν τον περιορισμό ``0 <= x <= 255``)." -#: library/stdtypes.rst:1184 +#: library/stdtypes.rst:1187 msgid "``s[i] = x``" msgstr "``s[i] = x``" -#: library/stdtypes.rst:1184 +#: library/stdtypes.rst:1187 msgid "item *i* of *s* is replaced by *x*" msgstr "το στοιχείο *i* του *s* αντικαθίσταται από το *x*" -#: library/stdtypes.rst:1187 +#: library/stdtypes.rst:1190 msgid "``del s[i]``" msgstr "``del s[i]``" -#: library/stdtypes.rst:1187 +#: library/stdtypes.rst:1190 msgid "removes item *i* of *s*" msgstr "αφαιρεί το αντικείμενο *i* από το *s*" -#: library/stdtypes.rst:1189 +#: library/stdtypes.rst:1192 msgid "``s[i:j] = t``" msgstr "``s[i:j] = t``" -#: library/stdtypes.rst:1189 +#: library/stdtypes.rst:1192 msgid "" "slice of *s* from *i* to *j* is replaced by the contents of the iterable *t*" msgstr "" "το υποσύνολο (slice) του *s* από το *i* έως το *j* αντικαθίσταται από τα " "περιεχόμενα του iterable *t*" -#: library/stdtypes.rst:1193 +#: library/stdtypes.rst:1196 msgid "``del s[i:j]``" msgstr "``del s[i:j]``" -#: library/stdtypes.rst:1193 +#: library/stdtypes.rst:1196 msgid "" "removes the elements of ``s[i:j]`` from the list (same as ``s[i:j] = []``)" msgstr "" "αφαιρεί τα στοιχεία του ``s[i:j]`` από τη λίστα (παρόμοιο με ``s[i:j] = " "[]``)" -#: library/stdtypes.rst:1197 +#: library/stdtypes.rst:1200 msgid "``s[i:j:k] = t``" msgstr "``s[i:j:k] = t``" -#: library/stdtypes.rst:1197 +#: library/stdtypes.rst:1200 msgid "the elements of ``s[i:j:k]`` are replaced by those of *t*" msgstr "τα στοιχεία του ``s[i:j:k]`` αντικαθίστανται από εκείνα του *t*" -#: library/stdtypes.rst:1200 +#: library/stdtypes.rst:1203 msgid "``del s[i:j:k]``" msgstr "``del s[i:j:k]``" -#: library/stdtypes.rst:1200 +#: library/stdtypes.rst:1203 msgid "removes the elements of ``s[i:j:k]`` from the list" msgstr "αφαιρεί τα στοιχεία του ``s[i:j:k]`` από τη λίστα" -#: library/stdtypes.rst:1203 +#: library/stdtypes.rst:1206 msgid "``s += t``" msgstr "``s += t``" -#: library/stdtypes.rst:1203 +#: library/stdtypes.rst:1206 msgid "" "extends *s* with the contents of *t* (for the most part the same as " "``s[len(s):len(s)] = t``)" @@ -2270,15 +2287,15 @@ msgstr "" "επεκτείνει το *s* με τα περιεχόμενα του *t* (ως επί το πλείστον το ίδιο με " "το ``s[len(s):len(s)] = t``)" -#: library/stdtypes.rst:1208 +#: library/stdtypes.rst:1211 msgid "``s *= n``" msgstr "``s *= n``" -#: library/stdtypes.rst:1208 +#: library/stdtypes.rst:1211 msgid "updates *s* with its contents repeated *n* times" msgstr "ενημερώνει το *s* με το περιεχόμενό του επαναλαμβανόμενο *n* φορές" -#: library/stdtypes.rst:1215 +#: library/stdtypes.rst:1218 msgid "" "If *k* is not equal to ``1``, *t* must have the same length as the slice it " "is replacing." @@ -2286,7 +2303,7 @@ msgstr "" "Αν το *k* δεν είναι ίσο με ``1``, το *t* πρέπει να έχει το ίδιο μήκος με το " "τμήμα που αντικαθιστά." -#: library/stdtypes.rst:1218 +#: library/stdtypes.rst:1221 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 " @@ -2299,24 +2316,25 @@ msgstr "" "αναφέρονται πολλές φορές, όπως εξηγείται για το ``s * n``` στο :ref:" "`typesseq-common`." -#: library/stdtypes.rst:1224 +#: library/stdtypes.rst:1227 msgid "Mutable Sequence Methods" msgstr "Μέθοδοι Μεταβλητών Ακολουθιών (Sequences)" -#: library/stdtypes.rst:1225 +#: library/stdtypes.rst:1228 msgid "Mutable sequence types also support the following methods:" msgstr "" "Οι τύποι μεταβλητών ακολουθιών υποστηρίζουν επίσης τις παρακάτω μεθόδους:" -#: library/stdtypes.rst:1234 +#: library/stdtypes.rst:1237 +#, fuzzy msgid "" -"Append *value* to the end of the sequence This is equivalent to writing " +"Append *value* to the end of the sequence. This is equivalent to writing " "``seq[len(seq):len(seq)] = [value]``." msgstr "" "Προσθέτει το *value* στο τέλος της ακολουθίας Αυτό είναι παρόμοιο με το να " "γράψουμε ``seq[len(seq):len(seq)] = [value]``." -#: library/stdtypes.rst:1246 +#: library/stdtypes.rst:1249 msgid "" "Remove all items from *sequence*. This is equivalent to writing ``del " "sequence[:]``." @@ -2324,7 +2342,7 @@ msgstr "" "Αφαιρεί όλα τα αντικείμενα από το *sequence*. Αυτό είναι ισοδύναμο με το να " "γράψουμε ``del sequence[:]``." -#: library/stdtypes.rst:1258 +#: library/stdtypes.rst:1261 msgid "" "Create a shallow copy of *sequence*. This is equivalent to writing " "``sequence[:]``." @@ -2332,7 +2350,7 @@ msgstr "" "Δημιουργεί ένα shallow αντίγραφο του *sequence*. Αυτό είναι ισοδύναμο με το " "να γράψουμε ``sequence[:]``." -#: library/stdtypes.rst:1261 +#: library/stdtypes.rst:1264 msgid "" "The :meth:`!copy` method is not part of the :class:`~collections.abc." "MutableSequence` :class:`~abc.ABC`, but most concrete mutable sequence types " @@ -2342,7 +2360,7 @@ msgstr "" "MutableSequence` :class:`~abc.ABC`, αλλά οι περισσότερες συγκεκριμένες " "μεταβλητές τύποι ακολουθίας την παρέχουν." -#: library/stdtypes.rst:1272 +#: library/stdtypes.rst:1275 msgid "" "Extend *sequence* with the contents of *iterable*. For the most part, this " "is the same as writing ``seq[len(seq):len(seq)] = iterable``." @@ -2351,7 +2369,7 @@ msgstr "" "μέρος, αυτό είναι το ίδιο με το να γράψουμε ``seq[len(seq):len(seq)] = " "iterable``." -#: library/stdtypes.rst:1283 +#: library/stdtypes.rst:1286 msgid "" "Insert *value* into *sequence* at the given *index*. This is equivalent to " "writing ``sequence[index:index] = [value]``." @@ -2359,7 +2377,7 @@ msgstr "" "Εισάγει το *value* στο *sequence* στη δεδομένη θέση *index*. Αυτό είναι " "ισοδύναμο με το να γράψουμε ``sequence[index:index] = [value]``." -#: library/stdtypes.rst:1293 +#: library/stdtypes.rst:1296 msgid "" "Retrieve the item at *index* and also removes it from *sequence*. By " "default, the last item in *sequence* is removed and returned." @@ -2367,13 +2385,13 @@ msgstr "" "Ανακτά το αντικείμενο στη θέση *index* και το αφαιρεί από το *sequence*. Εξ " "ορισμού, το τελευταίο αντικείμενο στο *sequence* αφαιρείται και επιστρέφεται." -#: library/stdtypes.rst:1303 +#: library/stdtypes.rst:1306 msgid "Remove the first item from *sequence* where ``sequence[i] == value``." msgstr "" "Αφαιρεί το πρώτο στοιχείο από το *sequence* όπου ``sequence[i]`` είναι ίσο " "με *value*." -#: library/stdtypes.rst:1314 +#: library/stdtypes.rst:1317 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 " @@ -2384,11 +2402,11 @@ msgstr "" "Για να υπενθυμίσει στους χρήστες ότι λειτουργεί με παρενέργεια, επιστρέφει " "το ``None``." -#: library/stdtypes.rst:1322 +#: library/stdtypes.rst:1325 msgid "Lists" msgstr "Λίστες" -#: library/stdtypes.rst:1326 +#: library/stdtypes.rst:1329 msgid "" "Lists are mutable sequences, typically used to store collections of " "homogeneous items (where the precise degree of similarity will vary by " @@ -2398,33 +2416,33 @@ msgstr "" "αποθήκευση συλλογών ομοιογενών στοιχείων (όπου ο ακριβής βαθμός ομοιότητας " "ποικίλλει ανάλογα με εφαρμογή)." -#: library/stdtypes.rst:1332 +#: library/stdtypes.rst:1335 msgid "Lists may be constructed in several ways:" msgstr "Οι λίστες μπορούν να κατασκευαστούν με διάφορους τρόπους:" -#: library/stdtypes.rst:1334 +#: library/stdtypes.rst:1337 msgid "Using a pair of square brackets to denote the empty list: ``[]``" msgstr "" "Χρησιμοποιείστε ένα ζεύγος αγκυλών για να δηλώσετε την κενή λίστα: ``[]``" -#: library/stdtypes.rst:1335 +#: library/stdtypes.rst:1338 msgid "" "Using square brackets, separating items with commas: ``[a]``, ``[a, b, c]``" msgstr "" "Χρησιμοποιώντας αγκύλες, διαχωρίζοντας τα στοιχεία με κόμματα: ``[a]``, " "``[a, b, c]``" -#: library/stdtypes.rst:1336 +#: library/stdtypes.rst:1339 msgid "Using a list comprehension: ``[x for x in iterable]``" msgstr "Χρήση ενός list comprehension: ``[x for x in iterable]``" -#: library/stdtypes.rst:1337 +#: library/stdtypes.rst:1340 msgid "Using the type constructor: ``list()`` or ``list(iterable)``" msgstr "" "Χρήση του κατασκευαστή τύπου (type constructor): ``list()`` ή " "``list(iterable)``" -#: library/stdtypes.rst:1339 +#: library/stdtypes.rst:1342 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 " @@ -2443,7 +2461,7 @@ msgstr "" "'b', 'c']`` και η ``list( (1, 2, 3) )`` επιστρέφει ``[1, 2, 3]``. Αν δεν " "δοθεί κανένα όρισμα, ο κατασκευαστής δημιουργεί μία νέα κενή λίστα, ``[]``." -#: library/stdtypes.rst:1348 +#: library/stdtypes.rst:1351 msgid "" "Many other operations also produce lists, including the :func:`sorted` built-" "in." @@ -2451,7 +2469,11 @@ msgstr "" "Πολλές άλλες λειτουργίες παράγουν επίσης λίστες, συμπεριλαμβανομένης της " "built-in :func:`sorted`." -#: library/stdtypes.rst:1351 +#: library/stdtypes.rst:1354 +msgid "Lists are :ref:`generic ` over the types of their items." +msgstr "" + +#: library/stdtypes.rst:1356 msgid "" "Lists implement all of the :ref:`common ` and :ref:`mutable " "` sequence operations. Lists also provide the following " @@ -2461,7 +2483,7 @@ msgstr "" "`mutable ` λειτουργίες ακολουθίας. Οι λίστες παρέχουν " "επίσης την ακόλουθη πρόσθετη μέθοδο:" -#: library/stdtypes.rst:1357 +#: library/stdtypes.rst:1362 msgid "" "This method sorts the list in place, using only ``<`` comparisons between " "items. Exceptions are not suppressed - if any comparison operations fail, " @@ -2473,7 +2495,7 @@ msgstr "" "πράξη σύγκρισης, ολόκληρη η λειτουργία ταξινόμησης θα αποτύχει (και η λίστα " "θα παραμείνει πιθανότατα σε μια μερικώς τροποποιημένη κατάσταση)." -#: library/stdtypes.rst:1362 +#: library/stdtypes.rst:1367 msgid "" ":meth:`sort` accepts two arguments that can only be passed by keyword (:ref:" "`keyword-only arguments `):" @@ -2481,7 +2503,7 @@ msgstr "" "η :meth:`sort` δέχεται δύο ορίσματα που μπορούν να περάσουν μόνο με τη λέξη-" "κλειδί (:ref:`keyword-only arguments `):" -#: library/stdtypes.rst:1365 +#: library/stdtypes.rst:1370 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 " @@ -2497,7 +2519,7 @@ msgstr "" "(default) ``None`` σημαίνει ότι τα στοιχεία της λίστας ταξινομούνται " "απευθείας χωρίς να υπολογίζεται ξεχωριστή τιμή κλειδιού." -#: library/stdtypes.rst:1372 +#: library/stdtypes.rst:1377 msgid "" "The :func:`functools.cmp_to_key` utility is available to convert a 2.x style " "*cmp* function to a *key* function." @@ -2505,7 +2527,7 @@ msgstr "" "Το utility :func:`functools.cmp_to_key` είναι διαθέσιμο για τη μετατροπή μια " "συνάρτηση *cmp* στυλ 2.x σε συνάρτηση *key*." -#: library/stdtypes.rst:1375 +#: library/stdtypes.rst:1380 msgid "" "*reverse* is a boolean value. If set to ``True``, then the list elements " "are sorted as if each comparison were reversed." @@ -2513,7 +2535,7 @@ msgstr "" "η *reverse* είναι μια λογική (boolean) τιμή. Αν τεθεί σε ``True``, τότε τα " "στοιχεία της λίστας ταξινομούνται σαν να ήταν αντίστροφη κάθε σύγκριση." -#: library/stdtypes.rst:1378 +#: library/stdtypes.rst:1383 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 " @@ -2526,7 +2548,7 @@ msgstr "" "(χρησιμοποιήστε την :func:`sorted` για να ζητήσετε μια νέα περίπτωση " "ταξινομημένης λίστας)." -#: library/stdtypes.rst:1383 +#: library/stdtypes.rst:1388 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 " @@ -2539,14 +2561,14 @@ msgstr "" "περάσματα (για παράδειγμα, ταξινόμηση κατά τμήμα, στη συνέχεια με βάση το " "μισθολογικό κλιμάκιο κτλ)." -#: library/stdtypes.rst:1388 +#: library/stdtypes.rst:1393 msgid "" "For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`." msgstr "" "Για παραδείγματα ταξινόμησης και ένα σύντομο tutorial, δείτε :ref:" "`sortinghowto`." -#: library/stdtypes.rst:1392 +#: library/stdtypes.rst:1397 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 " @@ -2559,11 +2581,11 @@ msgstr "" "κάνει raise :exc:`ValueError` αν ανιχνεύσει ότι η λίστα έχει μεταλλαχθεί " "κατά τη διάρκεια μιας ταξινόμησης." -#: library/stdtypes.rst:1401 +#: library/stdtypes.rst:1406 msgid "Tuples" msgstr "Πλειάδες (Tuples)" -#: library/stdtypes.rst:1405 +#: library/stdtypes.rst:1410 msgid "" "Tuples are immutable sequences, typically used to store collections of " "heterogeneous data (such as the 2-tuples produced by the :func:`enumerate` " @@ -2578,31 +2600,31 @@ msgstr "" "ομοιογενών δεδομένων (όπως για παράδειγμα για να επιτρέπεται η αποθήκευση σε " "ένα :class:`set` ή σε ένα :class:`dict` instance)." -#: library/stdtypes.rst:1413 +#: library/stdtypes.rst:1418 msgid "Tuples may be constructed in a number of ways:" msgstr "Οι πλειάδες (tuples) μπορούν να κατασκευαστούν με διάφορους τρόπους:" -#: library/stdtypes.rst:1415 +#: library/stdtypes.rst:1420 msgid "Using a pair of parentheses to denote the empty tuple: ``()``" msgstr "" "Χρήση ενός ζεύγους παρενθέσεων για να δηλωθεί το κενό tuple (πλειάδα): ``()``" -#: library/stdtypes.rst:1416 +#: library/stdtypes.rst:1421 msgid "Using a trailing comma for a singleton tuple: ``a,`` or ``(a,)``" msgstr "" "Χρήση ενός κόμματος στο τέλος για ένα μοναδικό tuple (πλειάδα): ``a,`` ή " "``(a,)``" -#: library/stdtypes.rst:1417 +#: library/stdtypes.rst:1422 msgid "Separating items with commas: ``a, b, c`` or ``(a, b, c)``" msgstr "Διαχωρισμός στοιχείων με κόμμα: ``a, b, c`` ή ``(a, b, c)``" -#: library/stdtypes.rst:1418 +#: library/stdtypes.rst:1423 msgid "Using the :func:`tuple` built-in: ``tuple()`` or ``tuple(iterable)``" msgstr "" "Χρήση του ενσωματωμένου :func:`tuple`: ``tuple()`` ή ``tuple(iterable)``" -#: library/stdtypes.rst:1420 +#: library/stdtypes.rst:1425 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 " @@ -2621,7 +2643,7 @@ msgstr "" "3] )`` επιστρέφει ``(1, 2, 3)``. Αν δεν δοθεί κανένα όρισμα, ο κατασκευαστής " "δημιουργεί μια ένα κενό tuple, ``()``." -#: library/stdtypes.rst:1428 +#: library/stdtypes.rst:1433 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 " @@ -2636,7 +2658,7 @@ msgstr "" "τρία ορίσματα, ενώ η ``f((a, b, c))`` είναι μια συνάρτηση κλήση συνάρτησης " "με ένα 3-tuple ως μοναδικό όρισμα." -#: library/stdtypes.rst:1434 +#: library/stdtypes.rst:1439 msgid "" "Tuples implement all of the :ref:`common ` sequence " "operations." @@ -2644,7 +2666,14 @@ msgstr "" "Τα Tuples υλοποιούν όλες τις πράξεις ακολουθιών :ref:`common `." -#: library/stdtypes.rst:1437 +#: library/stdtypes.rst:1442 +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:1446 msgid "" "For heterogeneous collections of data where access by name is clearer than " "access by index, :func:`collections.namedtuple` may be a more appropriate " @@ -2655,11 +2684,11 @@ msgstr "" "namedtuple` μπορεί να είναι μια πιο κατάλληλη επιλογή από ένα απλό " "αντικείμενο tuple (πλειάδα)." -#: library/stdtypes.rst:1445 +#: library/stdtypes.rst:1454 msgid "Ranges" msgstr "Εύρη (Ranges)" -#: library/stdtypes.rst:1449 +#: library/stdtypes.rst:1458 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." @@ -2668,7 +2697,7 @@ msgstr "" "συνήθως χρησιμοποιείται για την επανάληψη ενός συγκεκριμένου αριθμού " "επαναλήψεων σε βρόχους :keyword:`for`." -#: library/stdtypes.rst:1456 +#: library/stdtypes.rst:1465 msgid "" "The arguments to the range constructor must be integers (either built-in :" "class:`int` or any object that implements the :meth:`~object.__index__` " @@ -2683,7 +2712,7 @@ msgstr "" "*start* παραλείπεται, το προεπιλογή (default) είναι ``0``. Εάν το *step* " "είναι μηδέν, γίνεται raise ένα :exc:`ValueError`." -#: library/stdtypes.rst:1462 +#: library/stdtypes.rst:1471 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``." @@ -2691,7 +2720,7 @@ msgstr "" "Για ένα θετικό *βήμα*, τα περιεχόμενα του range (εύρους) ``r`` καθορίζονται " "από τον τύπο ``r[i] = start + step*i`` όπου ``i >= 0`` και ``r[i] < stop``." -#: library/stdtypes.rst:1466 +#: library/stdtypes.rst:1475 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 " @@ -2701,7 +2730,7 @@ msgstr "" "καθορίζονται από τον τύπο ``r[i] = start + step*i``, αλλά οι περιορισμοί " "είναι ``i >= 0`` και ``r[i] > stop``." -#: library/stdtypes.rst:1470 +#: library/stdtypes.rst:1479 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 " @@ -2712,7 +2741,7 @@ msgstr "" "ερμηνεύονται ως δείκτες από το τέλος της ακολουθίας που καθορίζεται από τους " "θετικούς δείκτες." -#: library/stdtypes.rst:1475 +#: library/stdtypes.rst:1484 msgid "" "Ranges containing absolute values larger than :data:`sys.maxsize` are " "permitted but some features (such as :func:`len`) may raise :exc:" @@ -2722,11 +2751,11 @@ msgstr "" "είναι επιτρεπτά, αλλά ορισμένα χαρακτηριστικά (όπως :func:`len`) μπορεί να " "κάνουν raise :exc:`OverflowError`." -#: library/stdtypes.rst:1479 +#: library/stdtypes.rst:1488 msgid "Range examples::" msgstr "Παραδείγματα Range::" -#: library/stdtypes.rst:1481 +#: library/stdtypes.rst:1490 msgid "" ">>> list(range(10))\n" "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n" @@ -2758,7 +2787,7 @@ msgstr "" ">>> list(range(1, 0))\n" "[]" -#: library/stdtypes.rst:1496 +#: library/stdtypes.rst:1505 msgid "" "Ranges implement all of the :ref:`common ` sequence " "operations except concatenation and repetition (due to the fact that range " @@ -2771,23 +2800,23 @@ msgstr "" "αυστηρό μοτίβο και η επανάληψη και η συνένωση συνήθως παραβιάζουν αυτό το " "πρότυπο)." -#: library/stdtypes.rst:1503 +#: library/stdtypes.rst:1512 msgid "" "The value of the *start* parameter (or ``0`` if the parameter was not " "supplied)" msgstr "Η τιμή της παραμέτρου *start* (ή ``0`` αν η παράμετρος δεν παρέχεται)" -#: library/stdtypes.rst:1508 +#: library/stdtypes.rst:1517 msgid "The value of the *stop* parameter" msgstr "Η τιμή της παραμέτρου *stop*" -#: library/stdtypes.rst:1512 +#: library/stdtypes.rst:1521 msgid "" "The value of the *step* parameter (or ``1`` if the parameter was not " "supplied)" msgstr "Η τιμή της παραμέτρου *step* (ή ``1`` αν η παράμετρος δεν παρέχεται)" -#: library/stdtypes.rst:1515 +#: library/stdtypes.rst:1524 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 " @@ -2802,7 +2831,7 @@ msgstr "" "``step``, υπολογίζοντας τα μεμονωμένα στοιχεία και τις υποπεριοχές όπως " "απαιτείται)." -#: library/stdtypes.rst:1521 +#: library/stdtypes.rst:1530 msgid "" "Range objects implement the :class:`collections.abc.Sequence` ABC, and " "provide features such as containment tests, element index lookup, slicing " @@ -2812,7 +2841,7 @@ msgstr "" "και παρέχουν χαρακτηριστικά όπως δοκιμές περιορισμού, αναζήτηση δείκτη " "στοιχείου, τεμαχισμό και υποστήριξη αρνητικών δεικτών (βλ. :ref:`typesseq`):" -#: library/stdtypes.rst:1541 +#: library/stdtypes.rst:1550 msgid "" "Testing range objects for equality with ``==`` and ``!=`` compares them as " "sequences. That is, two range objects are considered equal if they " @@ -2829,7 +2858,7 @@ msgstr "" "παράδειγμα ``range(0) == range(2, 1, 3)`` ή ``range(0, 3, 2) == range(0, 4, " "2)``.)" -#: library/stdtypes.rst:1548 +#: library/stdtypes.rst:1557 msgid "" "Implement the Sequence ABC. Support slicing and negative indices. Test :" "class:`int` objects for membership in constant time instead of iterating " @@ -2839,7 +2868,7 @@ msgstr "" "αρνητικούς δείκτες. Δοκιμάστε τα :class:`int` αντικείμενα για συμμετοχή σε " "σταθερό χρόνο αντί της επανάληψης σε όλα τα αντικείμενα." -#: library/stdtypes.rst:1554 +#: library/stdtypes.rst:1563 msgid "" "Define '==' and '!=' to compare range objects based on the sequence of " "values they define (instead of comparing based on object identity)." @@ -2848,7 +2877,7 @@ msgstr "" "ακολουθία των τιμών που ορίζουν (αντί να συγκρίνουν με βάση την ταυτότητα " "του αντικειμένου)." -#: library/stdtypes.rst:1559 +#: library/stdtypes.rst:1568 msgid "" "Added the :attr:`~range.start`, :attr:`~range.stop` and :attr:`~range.step` " "attributes." @@ -2856,7 +2885,7 @@ msgstr "" "Προστέθηκαν τα :attr:`~range.start`, :attr:`~range.stop` και :attr:`~range." "step` attributes." -#: library/stdtypes.rst:1564 +#: library/stdtypes.rst:1573 msgid "" "The `linspace recipe `_ shows how to implement a lazy version of range " @@ -2866,11 +2895,11 @@ msgstr "" "spaced-numbers-linspace/>`_ δείχνει πώς να υλοποιήσετε μια lazy έκδοση του " "range κατάλληλη για εφαρμογές κινητής υποδιαστολής." -#: library/stdtypes.rst:1576 +#: library/stdtypes.rst:1585 msgid "Text Sequence Type --- :class:`str`" msgstr "Τύπος Ακολουθίας (Sequence) Κειμένου --- :class:`str`" -#: library/stdtypes.rst:1578 +#: library/stdtypes.rst:1587 msgid "" "Textual data in Python is handled with :class:`str` objects, or :dfn:" "`strings`. Strings are immutable :ref:`sequences ` of Unicode code " @@ -2881,15 +2910,15 @@ msgstr "" "`sequences ` των Unicode points. Τα αλφαριθμητικά γράφονται με " "διάφορους τρόπους:" -#: library/stdtypes.rst:1583 +#: library/stdtypes.rst:1592 msgid "Single quotes: ``'allows embedded \"double\" quotes'``" msgstr "Απλά εισαγωγικά: ``'allows embedded \"double\" quotes'``" -#: library/stdtypes.rst:1584 +#: library/stdtypes.rst:1593 msgid "Double quotes: ``\"allows embedded 'single' quotes\"``" msgstr "Διπλά εισαγωγικά: ``'allows embedded \"double\" quotes'``" -#: library/stdtypes.rst:1585 +#: library/stdtypes.rst:1594 msgid "" "Triple quoted: ``'''Three single quotes'''``, ``\"\"\"Three double " "quotes\"\"\"``" @@ -2897,7 +2926,7 @@ msgstr "" "Τριπλά εισαγωγικά: ``'''Three single quotes'''``, ``\"\"\"Three double " "quotes\"\"\"``" -#: library/stdtypes.rst:1587 +#: library/stdtypes.rst:1596 msgid "" "Triple quoted strings may span multiple lines - all associated whitespace " "will be included in the string literal." @@ -2905,7 +2934,7 @@ msgstr "" "Τα αλφαριθμητικά σε τριπλά εισαγωγικά μπορούν να καλύπτουν πολλές γραμμές - " "όλα τα σχετικά κενά θα συμπεριληφθούν στο αλφαριθμητικό." -#: library/stdtypes.rst:1590 +#: library/stdtypes.rst:1599 msgid "" "String literals that are part of a single expression and have only " "whitespace between them will be implicitly converted to a single string " @@ -2915,7 +2944,7 @@ msgstr "" "έχουν μόνο κενά μεταξύ τους, θα μετατραπούν σιωπηρά σε ένα ενιαίο " "αλφαριθμητικό literal. Δηλαδή, ``(\"spam \" \"eggs\") == \"spam eggs\"``." -#: library/stdtypes.rst:1594 +#: library/stdtypes.rst:1603 msgid "" "See :ref:`strings` for more about the various forms of string literal, " "including supported :ref:`escape sequences `, and the " @@ -2927,7 +2956,7 @@ msgstr "" "(\"raw\") πρόθεμα που απενεργοποιεί την επεξεργασία των περισσότερων " "ακολουθιών διαφυγής." -#: library/stdtypes.rst:1598 +#: library/stdtypes.rst:1607 msgid "" "Strings may also be created from other objects using the :class:`str` " "constructor." @@ -2935,7 +2964,7 @@ msgstr "" "Τα αλφαριθμητικά (strings) μπορούν επίσης να δημιουργηθούν από άλλα " "αντικείμενα χρησιμοποιώντας τον constructor :class:`str`." -#: library/stdtypes.rst:1601 +#: library/stdtypes.rst:1610 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]``." @@ -2944,7 +2973,7 @@ msgstr "" "συμβολοσειράς (string) παράγει συμβολοσειρές μήκους 1. Δηλαδή, για μια μη " "κενή συμβολοσειρά *s*, ``s[0] == s[0:1]``." -#: library/stdtypes.rst:1607 +#: library/stdtypes.rst:1616 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 " @@ -2954,7 +2983,7 @@ msgstr "" "`str.join` ή το :class:`io.StringIO` μπορεί να χρησιμοποιηθεί για την " "αποτελεσματική κατασκευή συμβολοσειρών από πολλαπλά μέρη." -#: library/stdtypes.rst:1611 +#: library/stdtypes.rst:1620 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 " @@ -2965,7 +2994,7 @@ msgstr "" "επίδραση στη σημασία των αλφαριθμητικών και δεν μπορεί να συνδυαστεί με το " "πρόθεμα ``r``." -#: library/stdtypes.rst:1625 +#: library/stdtypes.rst:1634 msgid "" "Return a :ref:`string ` version of *object*. If *object* is not " "provided, returns the empty string. Otherwise, the behavior of ``str()`` " @@ -2975,7 +3004,7 @@ msgstr "" "δεν παρέχεται, επιστρέφει κενό αλφαριθμητικό. Διαφορετικά, η συμπεριφορά " "της ``str()`` εξαρτάται από το αν δίνεται *encoding* ή *errors*, ως εξής." -#: library/stdtypes.rst:1629 +#: library/stdtypes.rst:1638 msgid "" "If neither *encoding* nor *errors* is given, ``str(object)`` returns :meth:" "`type(object).__str__(object) `, which is the \"informal\" " @@ -2991,7 +3020,7 @@ msgstr "" "Εάν το *object* δεν έχει την :meth:`~object.__str__`, τότε η :func:`str` " "επιστρέφει τη μέθοδο :func:`repr(object) `." -#: library/stdtypes.rst:1641 +#: library/stdtypes.rst:1650 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 " @@ -3012,7 +3041,7 @@ msgstr "" "`binaryseq` και :ref:`bufferobjects` για πληροφορίες σχετικά με τα " "αντικείμενα buffer." -#: library/stdtypes.rst:1650 +#: library/stdtypes.rst:1659 msgid "" "Passing a :class:`bytes` object to :func:`str` without the *encoding* or " "*errors* arguments falls under the first case of returning the informal " @@ -3024,7 +3053,7 @@ msgstr "" "αναπαράστασης συμβολοσειράς (string) (δείτε επίσης την επιλογή :option:`-b` " "της γραμμής εντολών για Python). Για παράδειγμα::" -#: library/stdtypes.rst:1655 +#: library/stdtypes.rst:1664 msgid "" ">>> str(b'Zoot!')\n" "\"b'Zoot!'\"" @@ -3032,7 +3061,7 @@ msgstr "" ">>> str(b'Zoot!')\n" "\"b'Zoot!'\"" -#: library/stdtypes.rst:1658 +#: library/stdtypes.rst:1667 msgid "" "For more information on the ``str`` class and its methods, see :ref:" "`textseq` and the :ref:`string-methods` section below. To output formatted " @@ -3045,11 +3074,11 @@ msgstr "" "ενότητες :ref:`f-strings` και :ref:`formatstrings`. Επιπλέον, δείτε την " "ενότητα :ref:`stringservices`." -#: library/stdtypes.rst:1670 +#: library/stdtypes.rst:1679 msgid "String Methods" msgstr "Μέθοδοι Συμβολοσειράς (String)" -#: library/stdtypes.rst:1675 +#: library/stdtypes.rst:1684 msgid "" "Strings implement all of the :ref:`common ` sequence " "operations, along with the additional methods described below." @@ -3058,7 +3087,7 @@ msgstr "" "` ακολουθιών, μαζί με τις πρόσθετες μεθόδους που " "περιγράφονται παρακάτω." -#: library/stdtypes.rst:1678 +#: library/stdtypes.rst:1687 msgid "" "Strings also support two styles of string formatting, one providing a large " "degree of flexibility and customization (see :meth:`str.format`, :ref:" @@ -3075,7 +3104,7 @@ msgstr "" "χρησιμοποιηθεί σωστά, αλλά είναι συχνά ταχύτερο για τις περιπτώσεις που " "μπορεί να χειριστεί (:ref:`old-string-formatting`)." -#: library/stdtypes.rst:1685 +#: library/stdtypes.rst:1694 msgid "" "The :ref:`textservices` section of the standard library covers a number of " "other modules that provide various text related utilities (including regular " @@ -3086,7 +3115,7 @@ msgstr "" "σχετίζονται με το κείμενο (συμπεριλαμβανομένης της υποστήριξης των κανονικών " "εκφράσεων στην ενότητα :mod:`re`)." -#: library/stdtypes.rst:1691 +#: library/stdtypes.rst:1700 msgid "" "Return a copy of the string with its first character capitalized and the " "rest lowercased." @@ -3094,7 +3123,7 @@ msgstr "" "Επιστρέφει ένα αντίγραφο της συμβολοσειράς (string) με τον πρώτο χαρακτήρα " "κεφαλαίο και τα υπόλοιπα με πεζά γράμματα." -#: library/stdtypes.rst:1694 +#: library/stdtypes.rst:1703 msgid "" "The first character is now put into titlecase rather than uppercase. This " "means that characters like digraphs will only have their first letter " @@ -3104,7 +3133,7 @@ msgstr "" "σημαίνει ότι χαρακτήρες όπως οι διγράφοι (digraphs) θα έχουν μόνο το πρώτο " "γράμμα τους με κεφαλαίο, αντί για όλους τους χαρακτήρες." -#: library/stdtypes.rst:1701 +#: library/stdtypes.rst:1710 msgid "" "Return a casefolded copy of the string. Casefolded strings may be used for " "caseless matching." @@ -3112,13 +3141,14 @@ msgstr "" "Επιστρέφει ένα αντίγραφο της συμβολοσειράς (string) σε casefolded μορφή. Οι " "casefolded συμβολοσειρές μπορούν να χρησιμοποιηθούν για caseless matching." -#: library/stdtypes.rst:1704 +#: library/stdtypes.rst:1713 +#, fuzzy msgid "" "Casefolding is similar to lowercasing but more aggressive because it is " "intended to remove all case distinctions in a string. For example, the " "German lowercase letter ``'ß'`` is equivalent to ``\"ss\"``. Since it is " "already lowercase, :meth:`lower` would do nothing to ``'ß'``; :meth:" -"`casefold` converts it to ``\"ss\"``." +"`casefold` converts it to ``\"ss\"``. For example:" msgstr "" "Το casefolding είναι παρόμοιο με το lowercasing αλλά πιο επιθετικό επειδή " "έχει ως στόχο να αφαιρέσει όλες τις διακρίσεις της πεζότητας σε μια " @@ -3126,7 +3156,15 @@ msgstr "" "ισοδυναμεί με ``\"ss\"``. Αφού είναι ήδη πεζό, η :meth:`lower` δεν θα έκανε " "τίποτα στο ``'ß'``· η :meth:`casefold` το μετατρέπει σε ``\"ss\"``." -#: library/stdtypes.rst:1710 +#: library/stdtypes.rst:1720 +msgid "" +">>> 'straße'.lower()\n" +"'straße'\n" +">>> 'straße'.casefold()\n" +"'strasse'" +msgstr "" + +#: library/stdtypes.rst:1727 msgid "" "The casefolding algorithm is `described in section 3.13 'Default Case " "Folding' of the Unicode Standard `__." -#: library/stdtypes.rst:1719 +#: library/stdtypes.rst:1736 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 " @@ -3147,7 +3185,7 @@ msgstr "" "ένα κενό ASCII). Η αρχική συμβολοσειρά επιστρέφεται εάν το *width* είναι " "μικρότερο ή ίσο με το ``len(s)``. Για παράδειγμα::" -#: library/stdtypes.rst:1723 +#: library/stdtypes.rst:1740 msgid "" ">>> 'Python'.center(10)\n" "' Python '\n" @@ -3163,7 +3201,7 @@ msgstr "" ">>> 'Python'.center(4)\n" "'Python'" -#: library/stdtypes.rst:1733 +#: library/stdtypes.rst:1750 msgid "" "Return the number of non-overlapping occurrences of substring *sub* in the " "range [*start*, *end*]. Optional arguments *start* and *end* are " @@ -3173,7 +3211,7 @@ msgstr "" "της υποομάδας *sub* στο εύρος [*start*, *end*]. Τα προαιρετικά ορίσματα " "*start* και *end* ερμηνεύονται όπως στο slice notation." -#: library/stdtypes.rst:1737 +#: library/stdtypes.rst:1754 msgid "" "If *sub* is empty, returns the number of empty strings between characters " "which is the length of the string plus one. For example::" @@ -3182,7 +3220,7 @@ msgstr "" "(strings) μεταξύ των χαρακτήρων που είναι το μήκος της συμβολοσειράς συν " "ένα. Για παράδειγμα::" -#: library/stdtypes.rst:1740 +#: library/stdtypes.rst:1757 msgid "" ">>> 'spam, spam, spam'.count('spam')\n" "3\n" @@ -3206,11 +3244,11 @@ msgstr "" ">>> 'spam, spam, spam'.count('')\n" "17" -#: library/stdtypes.rst:1753 +#: library/stdtypes.rst:1770 msgid "Return the string encoded to :class:`bytes`." msgstr "Επιστρέφει την συμβολοσειρά (string) κωδικοποιημένη σε :class:`bytes`." -#: library/stdtypes.rst:3160 +#: library/stdtypes.rst:3412 msgid "" "*encoding* defaults to ``'utf-8'``; see :ref:`standard-encodings` for " "possible values." @@ -3218,7 +3256,7 @@ msgstr "" "το *encoding* έχει default σε ``'utf-8'``- δείτε :ref:`standard-encodings` " "για πιθανές τιμές." -#: library/stdtypes.rst:1758 +#: library/stdtypes.rst:1775 msgid "" "*errors* controls how encoding errors are handled. If ``'strict'`` (the " "default), a :exc:`UnicodeError` exception is raised. Other possible values " @@ -3233,7 +3271,7 @@ msgstr "" "που έχει καταχωρηθεί μέσω του :func:`codecs.register_error`. Δείτε το :ref:" "`error-handlers` για λεπτομέρειες." -#: library/stdtypes.rst:1765 +#: library/stdtypes.rst:1782 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 :" @@ -3244,7 +3282,7 @@ msgstr "" "`devmode` είναι ενεργοποιημένο ή αν ένα :ref:`debug build ` " "χρησιμοποιείται. Για παράδειγμα::" -#: library/stdtypes.rst:1771 +#: library/stdtypes.rst:1788 msgid "" ">>> encoded_str_to_bytes = 'Python'.encode()\n" ">>> type(encoded_str_to_bytes)\n" @@ -3258,11 +3296,11 @@ msgstr "" ">>> encoded_str_to_bytes\n" "b'Python'" -#: library/stdtypes.rst:3179 +#: library/stdtypes.rst:3431 msgid "Added support for keyword arguments." msgstr "Επιπρόσθετη υποστήριξη για keyword ορίσματα." -#: library/stdtypes.rst:3182 +#: library/stdtypes.rst:3434 msgid "" "The value of the *errors* argument is now checked in :ref:`devmode` and in :" "ref:`debug mode `." @@ -3270,7 +3308,7 @@ msgstr "" "Η τιμή του όρου *errors* ελέγχεται τώρα στο :ref:`devmode` και στο :ref:" "`debug mode `." -#: library/stdtypes.rst:1788 +#: library/stdtypes.rst:1805 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. " @@ -3284,7 +3322,7 @@ msgstr "" "προαιρετικό *start*, το τεστ αρχίζει από αυτή τη θέση. Με το προαιρετικό " "*end*, η σύγκριση σταματά σε αυτή τη θέση. Για παράδειγμα::" -#: library/stdtypes.rst:1794 +#: library/stdtypes.rst:1811 msgid "" ">>> 'Python'.endswith('on')\n" "True\n" @@ -3304,11 +3342,11 @@ msgstr "" ">>> 'Python is amazing'.endswith('is', 0, 9)\n" "True" -#: library/stdtypes.rst:1803 +#: library/stdtypes.rst:1820 msgid "See also :meth:`startswith` and :meth:`removesuffix`." msgstr "Δείτε επίσης τις :meth:`startswith` και :meth:`removesuffix`." -#: library/stdtypes.rst:1808 +#: library/stdtypes.rst:1825 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 " @@ -3337,7 +3375,7 @@ msgstr "" "αμετάβλητος και η τρέχουσα στήλη αυξάνεται κατά ένα, ανεξάρτητα από τον " "τρόπο αναπαράστασης του χαρακτήρα όταν τυπώνεται. Για παράδειγμα::" -#: library/stdtypes.rst:1821 +#: library/stdtypes.rst:1838 msgid "" ">>> '01\\t012\\t0123\\t01234'.expandtabs()\n" "'01 012 0123 01234'\n" @@ -3355,7 +3393,7 @@ msgstr "" "01 012\n" "0123 01234" -#: library/stdtypes.rst:1832 +#: library/stdtypes.rst:1849 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 " @@ -3367,7 +3405,7 @@ msgstr "" "Τα προαιρετικά ορίσματα *start* και *end* ερμηνεύονται όπως στο notation του " "υποσυνόλου. Επιστρέφει ``-1`` αν δεν βρεθεί το *sub*. Για παράδειγμα:" -#: library/stdtypes.rst:1837 +#: library/stdtypes.rst:1854 msgid "" ">>> 'spam, spam, spam'.find('sp')\n" "0\n" @@ -3379,11 +3417,11 @@ msgstr "" ">>> 'spam, spam, spam'.find('sp', 5)\n" "6" -#: library/stdtypes.rst:1842 +#: library/stdtypes.rst:1859 msgid "See also :meth:`rfind` and :meth:`index`." msgstr "Δείτε επίσης τις :meth:`rfind` και :meth:`index`." -#: library/stdtypes.rst:1846 +#: library/stdtypes.rst:1863 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 :" @@ -3393,7 +3431,7 @@ msgstr "" "γνωρίζετε τη θέση του *sub*. Για να ελέγξετε αν το *sub* είναι υποσύνολο ή " "όχι, χρησιμοποιήστε τον τελεστή :keyword:`in`::" -#: library/stdtypes.rst:1850 +#: library/stdtypes.rst:1867 msgid "" ">>> 'Py' in 'Python'\n" "True" @@ -3401,7 +3439,7 @@ msgstr "" ">>> 'Py' in 'Python'\n" "True" -#: library/stdtypes.rst:1856 +#: library/stdtypes.rst:1873 msgid "" "Perform a string formatting operation. The string on which this method is " "called can contain literal text or replacement fields delimited by braces " @@ -3418,7 +3456,7 @@ msgstr "" "αντίγραφο της συμβολοσειράς όπου κάθε πεδίο αντικατάστασης αντικαθίσταται με " "την τιμή της συμβολοσειράς του αντίστοιχου ορίσματος. Για παράδειγμα:" -#: library/stdtypes.rst:1863 +#: library/stdtypes.rst:1880 msgid "" ">>> \"The sum of 1 + 2 is {0}\".format(1+2)\n" "'The sum of 1 + 2 is 3'\n" @@ -3434,7 +3472,7 @@ msgstr "" ">>> \"{1} expects the {0} Inquisition!\".format(\"Spanish\", \"Nobody\")\n" "'Nobody expects the Spanish Inquisition!'" -#: library/stdtypes.rst:1872 +#: library/stdtypes.rst:1889 msgid "" "See :ref:`formatstrings` for a description of the various formatting options " "that can be specified in format strings." @@ -3443,7 +3481,7 @@ msgstr "" "μορφοποίησης που μπορούν να καθοριστούν στην μορφοποίηση συμβολοσειρών " "(format strings)." -#: library/stdtypes.rst:1876 +#: library/stdtypes.rst:1893 msgid "" "When formatting a number (:class:`int`, :class:`float`, :class:`complex`, :" "class:`decimal.Decimal` and subclasses) with the ``n`` type (ex: ``'{:n}'." @@ -3462,7 +3500,7 @@ msgstr "" "διαφορετικό από το locale ``LC_CTYPE``. Αυτή η προσωρινή αλλαγή επηρεάζει " "και άλλα νήματα (threads)." -#: library/stdtypes.rst:1885 +#: library/stdtypes.rst:1902 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." @@ -3471,7 +3509,7 @@ msgstr "" "προσωρινά το locale ``LC_CTYPE`` στο locale ``LC_NUMERIC`` σε κάποιες " "περιπτώσεις." -#: library/stdtypes.rst:1893 +#: library/stdtypes.rst:1910 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 " @@ -3481,20 +3519,39 @@ msgstr "" "το ``mapping`` απευθείας και δεν αντιγράφεται σε μια :class:`dict`. Αυτό " "είναι χρήσιμο αν για παράδειγμα το ``mapping`` είναι μια υποκλάση του dict:" -#: library/stdtypes.rst:1909 +#: library/stdtypes.rst:1926 +#, fuzzy msgid "" "Like :meth:`~str.find`, but raise :exc:`ValueError` when the substring is " -"not found." +"not found. For example:" msgstr "" "Όπως η :meth:`~str.find`, αλλά κάνει raise :exc:`ValueError` όταν η υπό-" "συμβολοσειρά (substring) δεν έχει βρεθεί." -#: library/stdtypes.rst:1915 +#: library/stdtypes.rst:1929 +msgid "" +">>> 'spam, spam, spam'.index('spam')\n" +"0\n" +">>> 'spam, spam, spam'.index('eggs')\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +" 'spam, spam, spam'.index('eggs')\n" +" ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^\n" +"ValueError: substring not found" +msgstr "" + +#: library/stdtypes.rst:1940 +#, fuzzy +msgid "See also :meth:`rindex`." +msgstr "Δείτε επίσης τη :meth:`join`." + +#: library/stdtypes.rst:1945 +#, fuzzy msgid "" "Return ``True`` if all characters in the string are alphanumeric and there " "is at least one character, ``False`` otherwise. A character ``c`` is " "alphanumeric if one of the following returns ``True``: ``c.isalpha()``, ``c." -"isdecimal()``, ``c.isdigit()``, or ``c.isnumeric()``." +"isdecimal()``, ``c.isdigit()``, or ``c.isnumeric()``. For example:" msgstr "" "Επιστρέφει ``True`` αν όλοι οι χαρακτήρες στη συμβολοσειρά (string) είναι " "αλφαριθμητικοί και υπάρχει τουλάχιστον ένας χαρακτήρας, διαφορετικά " @@ -3502,7 +3559,24 @@ msgstr "" "ακόλουθα επιστρέφει ``True``: ``c.isalpha()``, ``c.isdecimal()``, ``c." "isdigit()``, ή ``c.isnumeric()``." -#: library/stdtypes.rst:1923 +#: library/stdtypes.rst:1950 +#, fuzzy +msgid "" +">>> 'abc123'.isalnum()\n" +"True\n" +">>> 'abc123!@#'.isalnum()\n" +"False\n" +">>> ''.isalnum()\n" +"False\n" +">>> ' '.isalnum()\n" +"False" +msgstr "" +">>> b'ABCabc1'.isalnum()\n" +"True\n" +">>> b'ABC abc1'.isalnum()\n" +"False" + +#: library/stdtypes.rst:1964 msgid "" "Return ``True`` if all characters in the string are alphabetic and there is " "at least one character, ``False`` otherwise. Alphabetic characters are " @@ -3522,7 +3596,7 @@ msgstr "" "'Letters, Alphabetic, and Ideographic' του προτύπου Unicode `_. Για παράδειγμα:" -#: library/stdtypes.rst:1932 +#: library/stdtypes.rst:1973 msgid "" ">>> 'Letters and spaces'.isalpha()\n" "False\n" @@ -3540,11 +3614,11 @@ msgstr "" "too\n" "True" -#: library/stdtypes.rst:1941 +#: library/stdtypes.rst:1982 msgid "See :ref:`unicode-properties`." msgstr "Δείτε :ref:`unicode-properties`." -#: library/stdtypes.rst:1946 +#: library/stdtypes.rst:1987 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 " @@ -3554,7 +3628,7 @@ msgstr "" "χαρακτήρες της συμβολοσειράς είναι ASCII, αλλιώς ``False``. Οι χαρακτήρες " "ASCII έχουν σημεία κωδικοποίησης στην περιοχή U+0000-U+007F. Για παράδειγμα:" -#: library/stdtypes.rst:1950 +#: library/stdtypes.rst:1991 msgid "" ">>> 'ASCII characters'.isascii()\n" "True\n" @@ -3566,7 +3640,7 @@ msgstr "" ">>> 'µ'.isascii()\n" "False" -#: library/stdtypes.rst:1962 +#: library/stdtypes.rst:2003 msgid "" "Return ``True`` if all characters in the string are decimal characters and " "there is at least one character, ``False`` otherwise. Decimal characters are " @@ -3581,7 +3655,7 @@ msgstr "" "INDIC DIGIT ZERO. Επίσημα ένας δεκαδικός χαρακτήρας είναι ένας χαρακτήρας " "του Unicode General Category \"Nd\". Για παράδειγμα:" -#: library/stdtypes.rst:1969 +#: library/stdtypes.rst:2010 msgid "" ">>> '0123456789'.isdecimal()\n" "True\n" @@ -3597,13 +3671,15 @@ msgstr "" ">>> 'alphabetic'.isdecimal()\n" "False" -#: library/stdtypes.rst:1981 +#: library/stdtypes.rst:2022 +#, fuzzy msgid "" "Return ``True`` if all characters in the string are digits and there is at " "least one character, ``False`` otherwise. Digits include decimal characters " "and digits that need special handling, such as the compatibility superscript " "digits. This covers digits which cannot be used to form numbers in base 10, " -"like the Kharosthi numbers. Formally, a digit is a character that has the " +"like the `Kharosthi numbers `__. Formally, a digit is a character that has the " "property value Numeric_Type=Digit or Numeric_Type=Decimal." msgstr "" "Επιστρέφει ``True`` αν όλοι οι χαρακτήρες στη συμβολοσειρά είναι ψηφία και " @@ -3614,7 +3690,38 @@ msgstr "" "όπως οι αριθμοί Kharosthi. Τυπικά, ένα ψηφίο είναι ένας χαρακτήρας που έχει " "την τιμή της ιδιότητας Numeric_Type=Digit ή Numeric_Type=Decimal." -#: library/stdtypes.rst:1991 +#: library/stdtypes.rst:2111 library/stdtypes.rst:2155 +#: library/stdtypes.rst:2283 library/stdtypes.rst:2415 +#: library/stdtypes.rst:2499 library/stdtypes.rst:2600 +#: library/stdtypes.rst:2638 library/stdtypes.rst:2851 +msgid "For example:" +msgstr "Για παράδειγμα:" + +#: library/stdtypes.rst:2032 +#, fuzzy +msgid "" +">>> '0123456789'.isdigit()\n" +"True\n" +">>> '٠١٢٣٤٥٦٧٨٩'.isdigit() # Arabic-Indic digits zero to nine\n" +"True\n" +">>> '⅕'.isdigit() # Vulgar fraction one fifth\n" +"False\n" +">>> '²'.isdecimal(), '²'.isdigit(), '²'.isnumeric()\n" +"(False, True, True)" +msgstr "" +">>> '0123456789'.isdecimal()\n" +"True\n" +">>> '٠١٢٣٤٥٦٧٨٩'.isdecimal() # Arabic-Indic digits zero to nine\n" +"True\n" +">>> 'alphabetic'.isdecimal()\n" +"False" + +#: library/stdtypes.rst:2043 +#, fuzzy +msgid "See also :meth:`isdecimal` and :meth:`isnumeric`." +msgstr "Δείτε επίσης τις :meth:`rfind` και :meth:`index`." + +#: library/stdtypes.rst:2048 msgid "" "Return ``True`` if the string is a valid identifier according to the " "language definition, section :ref:`identifiers`." @@ -3622,7 +3729,7 @@ msgstr "" "Επιστρέφει ``True`` αν η συμβολοσειρά είναι έγκυρο αναγνωριστικό σύμφωνα με " "το ορισμό της γλώσσας, ενότητα :ref:`identifiers`." -#: library/stdtypes.rst:1994 +#: library/stdtypes.rst:2051 msgid "" ":func:`keyword.iskeyword` can be used to test whether string ``s`` is a " "reserved identifier, such as :keyword:`def` and :keyword:`class`." @@ -3631,11 +3738,11 @@ msgstr "" "συμβολοσειρά ``s`` είναι ένα δεσμευμένο αναγνωριστικό, όπως τα :keyword:" "`def` και :keyword:`class`." -#: library/stdtypes.rst:1997 +#: library/stdtypes.rst:2054 msgid "Example: ::" msgstr "Παράδειγμα ::" -#: library/stdtypes.rst:2000 +#: library/stdtypes.rst:2057 msgid "" ">>> from keyword import iskeyword\n" "\n" @@ -3651,7 +3758,7 @@ msgstr "" ">>> 'def'.isidentifier(), iskeyword('def')\n" "(True, True)" -#: library/stdtypes.rst:2010 +#: library/stdtypes.rst:2067 msgid "" "Return ``True`` if all cased characters [4]_ in the string are lowercase and " "there is at least one cased character, ``False`` otherwise." @@ -3659,14 +3766,15 @@ msgstr "" "Επιστρέφει ``True`` αν όλοι οι χαρακτήρες [4]_ στο αλφαριθμητικό (string) " "είναι πεζοί και υπάρχει τουλάχιστον ένας cased χαρακτήρας, αλλιώς ``False``." -#: library/stdtypes.rst:2016 +#: library/stdtypes.rst:2073 +#, fuzzy msgid "" "Return ``True`` if all characters in the string are numeric characters, and " "there is at least one character, ``False`` otherwise. Numeric characters " "include digit characters, and all characters that have the Unicode numeric " "value property, e.g. U+2155, VULGAR FRACTION ONE FIFTH. Formally, numeric " "characters are those with the property value Numeric_Type=Digit, " -"Numeric_Type=Decimal or Numeric_Type=Numeric." +"Numeric_Type=Decimal or Numeric_Type=Numeric. For example:" msgstr "" "Επιστρέφει ``True`` αν όλοι οι χαρακτήρες στη συμβολοσειρά είναι αριθμητικοί " "(numeric) χαρακτήρες, και υπάρχει τουλάχιστον ένας χαρακτήρας, διαφορετικά " @@ -3676,7 +3784,31 @@ msgstr "" "τιμή της ιδιότητας Numeric_Type=Digit, Numeric_Type=Decimal ή " "Numeric_Type=Numeric." -#: library/stdtypes.rst:2026 +#: library/stdtypes.rst:2081 +#, fuzzy +msgid "" +">>> '0123456789'.isnumeric()\n" +"True\n" +">>> '٠١٢٣٤٥٦٧٨٩'.isnumeric() # Arabic-Indic digits zero to nine\n" +"True\n" +">>> '⅕'.isnumeric() # Vulgar fraction one fifth\n" +"True\n" +">>> '²'.isdecimal(), '²'.isdigit(), '²'.isnumeric()\n" +"(False, True, True)" +msgstr "" +">>> '0123456789'.isdecimal()\n" +"True\n" +">>> '٠١٢٣٤٥٦٧٨٩'.isdecimal() # Arabic-Indic digits zero to nine\n" +"True\n" +">>> 'alphabetic'.isdecimal()\n" +"False" + +#: library/stdtypes.rst:2092 +#, fuzzy +msgid "See also :meth:`isdecimal` and :meth:`isdigit`." +msgstr "Δείτε επίσης τις :meth:`rfind` και :meth:`index`." + +#: library/stdtypes.rst:2097 msgid "" "Return ``True`` if all characters in the string are printable, ``False`` if " "it contains at least one non-printable character." @@ -3684,7 +3816,7 @@ msgstr "" "Επιστρέφει ``True`` αν όλοι οι χαρακτήρες στη συμβολοσειρά (string) είναι " "εκτυπώσιμοι, ``False`` αν περιέχει τουλάχιστον έναν μη εκτυπώσιμο χαρακτήρα." -#: library/stdtypes.rst:2029 +#: library/stdtypes.rst:2100 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 " @@ -3697,7 +3829,7 @@ msgstr "" "εξαγωνικά από τον χαρακτήρα. Δεν έχει καμία σχέση με τον χειρισμό " "συμβολοσειρών που γράφονται σε :data:`sys.stdout` ή :data:`sys.stderr`." -#: library/stdtypes.rst:2034 +#: library/stdtypes.rst:2105 msgid "" "The printable characters are those which in the Unicode character database " "(see :mod:`unicodedata`) have a general category in group Letter, Mark, " @@ -3711,7 +3843,20 @@ msgstr "" "διάστημα ASCII 0x20. Οι μη εκτυπώσιμοι χαρακτήρες είναι αυτοί που βρίσκονται " "στο χώρο Διαχωρισμού ομάδας ή Άλλο (Z ή CII)." -#: library/stdtypes.rst:2043 +#: library/stdtypes.rst:2113 +msgid "" +">>> ''.isprintable(), ' '.isprintable()\n" +"(True, True)\n" +">>> '\\t'.isprintable(), '\\n'.isprintable()\n" +"(False, False)" +msgstr "" + +#: library/stdtypes.rst:2120 +#, fuzzy +msgid "See also :meth:`isspace`." +msgstr "Δείτε επίσης τη :meth:`istitle`." + +#: library/stdtypes.rst:2125 msgid "" "Return ``True`` if there are only whitespace characters in the string and " "there is at least one character, ``False`` otherwise." @@ -3720,7 +3865,19 @@ msgstr "" "αλφαριθμητικό (string) και υπάρχει τουλάχιστον ένας χαρακτήρας, διαφορετικά " "``False``." -#: library/stdtypes.rst:2046 +#: library/stdtypes.rst:2130 +msgid "" +">>> ''.isspace()\n" +"False\n" +">>> ' '.isspace()\n" +"True\n" +">>> '\\t\\n'.isspace() # TAB and BREAK LINE\n" +"True\n" +">>> '\\u3000'.isspace() # IDEOGRAPHIC SPACE\n" +"True" +msgstr "" + +#: library/stdtypes.rst:2141 msgid "" "A character is *whitespace* if in the Unicode character database (see :mod:" "`unicodedata`), either its general category is ``Zs`` (\"Separator, " @@ -3731,7 +3888,12 @@ msgstr "" "(\"Separator, space\"), είτε η αμφίδρομη κατηγορία του είναι μία από τις " "κατηγορίες ``WS``, ``B``, ή ``S``." -#: library/stdtypes.rst:2054 +#: library/stdtypes.rst:2146 +#, fuzzy +msgid "See also :meth:`isprintable`." +msgstr "Δείτε επίσης τη :meth:`istitle`." + +#: library/stdtypes.rst:2151 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 " @@ -3744,11 +3906,7 @@ msgstr "" "οι πεζοί χαρακτήρες μόνο cased χαρακτήρες. Διαφορετικά, επιστρέφει " "``False``." -#: library/stdtypes.rst:2603 -msgid "For example:" -msgstr "Για παράδειγμα:" - -#: library/stdtypes.rst:2060 +#: library/stdtypes.rst:2157 msgid "" ">>> 'Spam, Spam, Spam'.istitle()\n" "True\n" @@ -3764,11 +3922,11 @@ msgstr "" ">>> 'SPAM, SPAM, SPAM'.istitle()\n" "False" -#: library/stdtypes.rst:2069 +#: library/stdtypes.rst:2166 msgid "See also :meth:`title`." msgstr "Δείτε επίσης :meth:`title`." -#: library/stdtypes.rst:2074 +#: library/stdtypes.rst:2171 msgid "" "Return ``True`` if all cased characters [4]_ in the string are uppercase and " "there is at least one cased character, ``False`` otherwise." @@ -3777,7 +3935,7 @@ msgstr "" "κεφαλαίοι και υπάρχει τουλάχιστον ένας cased χαρακτήρας, διαφορετικά " "``False``." -#: library/stdtypes.rst:2092 +#: library/stdtypes.rst:2189 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 " @@ -3790,7 +3948,7 @@ msgstr "" "αντικειμένων :class:`bytes`. Το διαχωριστικό μεταξύ των στοιχείων είναι η " "συμβολοσειρά που παρέχει αυτή η μέθοδος. Για παράδειγμα:" -#: library/stdtypes.rst:2097 +#: library/stdtypes.rst:2194 msgid "" ">>> ', '.join(['spam', 'spam', 'spam'])\n" "'spam, spam, spam'\n" @@ -3802,11 +3960,11 @@ msgstr "" ">>> '-'.join('Python')\n" "'P-y-t-h-o-n'" -#: library/stdtypes.rst:2104 +#: library/stdtypes.rst:2201 msgid "See also :meth:`split`." msgstr "Δείτε επίσης :meth:`split`." -#: library/stdtypes.rst:2109 +#: library/stdtypes.rst:2206 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 " @@ -3817,15 +3975,44 @@ msgstr "" "*fillchar* (το default είναι ένα κενό ASCII). Η αρχική συμβολοσειρά " "επιστρέφεται εάν το *width* είναι μικρότερο ή ίσο με το ``len(s)``." -#: library/stdtypes.rst:2116 +#: library/stdtypes.rst:2212 +#, fuzzy +msgid "" +">>> 'Python'.ljust(10)\n" +"'Python '\n" +">>> 'Python'.ljust(10, '.')\n" +"'Python....'\n" +">>> 'Monty Python'.ljust(10, '.')\n" +"'Monty Python'" +msgstr "" +">>> 'Python'.center(10)\n" +"' Python '\n" +">>> 'Python'.center(10, '-')\n" +"'--Python--'\n" +">>> 'Python'.center(4)\n" +"'Python'" + +#: library/stdtypes.rst:2754 +#, fuzzy +msgid "See also :meth:`rjust`." +msgstr "Δείτε επίσης :meth:`split`." + +#: library/stdtypes.rst:2226 +#, fuzzy msgid "" "Return a copy of the string with all the cased characters [4]_ converted to " -"lowercase." +"lowercase. For example:" msgstr "" "Επιστρέφει ένα αντίγραφο της συμβολοσειράς (string) με όλους τους cased " "χαρακτήρες [4]_ να έχουν μετατραπεί σε πεζούς." -#: library/stdtypes.rst:2119 +#: library/stdtypes.rst:2229 +msgid "" +">>> 'Lower Method Example'.lower()\n" +"'lower method example'" +msgstr "" + +#: library/stdtypes.rst:2234 msgid "" "The lowercasing algorithm used is `described in section 3.13 'Default Case " "Folding' of the Unicode Standard `__." -#: library/stdtypes.rst:2126 +#: library/stdtypes.rst:2241 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 " @@ -3850,7 +4037,7 @@ msgstr "" "χαρακτήρων. Το όρισμα *chars* δεν είναι ένα πρόθεμα· οπότε, όλοι οι " "συνδυασμοί των τιμών του αφαιρούνται::" -#: library/stdtypes.rst:2131 +#: library/stdtypes.rst:2246 msgid "" ">>> ' spacious '.lstrip()\n" "'spacious '\n" @@ -3862,7 +4049,7 @@ msgstr "" ">>> 'www.example.com'.lstrip('cmowz.')\n" "'example.com'" -#: library/stdtypes.rst:2136 +#: library/stdtypes.rst:2251 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::" @@ -3871,7 +4058,7 @@ msgstr "" "πρόθεμα συμβολοσειράς (string) αντί για όλο το σύνολο των χαρακτήρων. Για " "παράδειγμα::" -#: library/stdtypes.rst:2139 +#: library/stdtypes.rst:2254 msgid "" ">>> 'Arthur: three!'.lstrip('Arthur: ')\n" "'ee!'\n" @@ -3883,7 +4070,7 @@ msgstr "" ">>> 'Arthur: three!'.removeprefix('Arthur: ')\n" "'three!'" -#: library/stdtypes.rst:2148 +#: library/stdtypes.rst:2263 msgid "" "This static method returns a translation table usable for :meth:`str." "translate`." @@ -3891,7 +4078,7 @@ msgstr "" "Αυτή η στατική μέθοδος επιστρέφει έναν πίνακα μεταφράσεων που μπορεί να " "χρησιμοποιηθεί για το :meth:`str.translate`." -#: library/stdtypes.rst:2150 +#: library/stdtypes.rst:2265 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, " @@ -3903,7 +4090,7 @@ msgstr "" "μήκους 1) σε ordinals Unicode, συμβολοσειρές (αυθαίρετου μήκους) ή " "``None``. Τα κλειδιά χαρακτήρων τότε θα μετατραπούν σε κανονικούς αριθμούς." -#: library/stdtypes.rst:2155 +#: library/stdtypes.rst:2270 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 " @@ -3916,7 +4103,7 @@ msgstr "" "τρίτο όρισμα, πρέπει να είναι συμβολοσειρά, του οποίου οι χαρακτήρες θα " "αντιστοιχιστούν στο αποτέλεσμα σε ``None``." -#: library/stdtypes.rst:2163 +#: library/stdtypes.rst:2278 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 " @@ -3929,16 +4116,32 @@ msgstr "" "δεν βρεθεί, επιστρέφει ένα 3-σύνολο που περιέχει την ίδια τη συμβολοσειρά, " "ακολουθούμενη από δύο κενές συμβολοσειρές." -#: library/stdtypes.rst:2171 +#: library/stdtypes.rst:2285 +msgid "" +">>> 'Monty Python'.partition(' ')\n" +"('Monty', ' ', 'Python')\n" +">>> \"Monty Python's Flying Circus\".partition(' ')\n" +"('Monty', ' ', \"Python's Flying Circus\")\n" +">>> 'Monty Python'.partition('-')\n" +"('Monty Python', '', '')" +msgstr "" + +#: library/stdtypes.rst:2294 +#, fuzzy +msgid "See also :meth:`rpartition`." +msgstr "Δείτε επίσης :meth:`title`." + +#: library/stdtypes.rst:2299 +#, fuzzy msgid "" "If the string starts with the *prefix* string, return " -"``string[len(prefix):]``. Otherwise, return a copy of the original string::" +"``string[len(prefix):]``. Otherwise, return a copy of the original string:" msgstr "" "Εάν η συμβολοσειρά (string) ξεκινά με το *prefix*, επιστρέφει " "``string[len(prefix):]``. Διαφορετικά, επιστρέφει ένα αντίγραφο της αρχικής " "συμβολοσειράς::" -#: library/stdtypes.rst:2175 +#: library/stdtypes.rst:2303 msgid "" ">>> 'TestHook'.removeprefix('Test')\n" "'Hook'\n" @@ -3950,17 +4153,23 @@ msgstr "" ">>> 'BaseTestCase'.removeprefix('Test')\n" "'BaseTestCase'" -#: library/stdtypes.rst:2185 +#: library/stdtypes.rst:2312 +#, fuzzy +msgid "See also :meth:`removesuffix` and :meth:`startswith`." +msgstr "Δείτε επίσης τις :meth:`rfind` και :meth:`index`." + +#: library/stdtypes.rst:2317 +#, fuzzy 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::" +"string:" msgstr "" "Αν η συμβολοσειρά τελειώνει με το *suffix* και το *suffix* δεν είναι κενό, " "επιστρέφει ``string[:-len(suffix)]``. Διαφορετικά, επιστρέφει ένα αντίγραφο " "της αρχικής συμβολοσειράς::" -#: library/stdtypes.rst:2189 +#: library/stdtypes.rst:2321 msgid "" ">>> 'MiscTests'.removesuffix('Tests')\n" "'Misc'\n" @@ -3972,42 +4181,99 @@ msgstr "" ">>> 'TmpDirMixin'.removesuffix('Tests')\n" "'TmpDirMixin'" -#: library/stdtypes.rst:2199 +#: library/stdtypes.rst:2330 +#, fuzzy +msgid "See also :meth:`removeprefix` and :meth:`endswith`." +msgstr "Δείτε επίσης τις :meth:`rfind` και :meth:`index`." + +#: library/stdtypes.rst:2335 +#, fuzzy 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 " "replaced. If *count* is not specified or ``-1``, then all occurrences are " -"replaced." +"replaced. For example:" msgstr "" "Επιστρέφει ένα αντίγραφο της συμβολοσειράς (string) με όλες τις εμφανίσεις " "της υπό-συμβολοσειράς *old* αντικατεστημένες από την *new*. Εάν δοθεί η " "παράμετρος *count*, μόνο οι πρώτες *count* εμφανίσεις. Αν δεν έχει οριστεί ή " "είναι -1, τότε αντικαθίστανται όλες οι εμφανίσεις." -#: library/stdtypes.rst:2203 +#: library/stdtypes.rst:2340 +#, fuzzy +msgid "" +">>> 'spam, spam, spam'.replace('spam', 'eggs')\n" +"'eggs, eggs, eggs'\n" +">>> 'spam, spam, spam'.replace('spam', 'eggs', 1)\n" +"'eggs, spam, spam'" +msgstr "" +">>> 'spam, spam, spam'.find('sp')\n" +"0\n" +">>> 'spam, spam, spam'.find('sp', 5)\n" +"6" + +#: library/stdtypes.rst:2347 msgid "*count* is now supported as a keyword argument." msgstr "Το *count* υποστηρίζεται πλέον ως όρισμα λέξης-κλειδιού." -#: library/stdtypes.rst:2209 +#: library/stdtypes.rst:2353 +#, fuzzy 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* " -"and *end* are interpreted as in slice notation. Return ``-1`` on failure." +"and *end* are interpreted as in slice notation. Return ``-1`` on failure. " +"For example:" msgstr "" "Επιστρέφει το υψηλότερο index στη συμβολοσειρά (string) όπου βρίσκεται η υπό-" "συμβολοσειρά *sub*, έτσι ώστε το *sub* περιέχεται στο ``s[start:end]``. Τα " "προαιρετικά ορίσματα *start* και *end* ερμηνεύονται ως slice notation. " "Επιστρέφει ``-1`` σε περίπτωση αποτυχίας." -#: library/stdtypes.rst:2216 +#: library/stdtypes.rst:2358 +#, fuzzy +msgid "" +">>> 'spam, spam, spam'.rfind('sp')\n" +"12\n" +">>> 'spam, spam, spam'.rfind('sp', 0, 10)\n" +"6" +msgstr "" +">>> 'spam, spam, spam'.find('sp')\n" +"0\n" +">>> 'spam, spam, spam'.find('sp', 5)\n" +"6" + +#: library/stdtypes.rst:2365 +#, fuzzy +msgid "See also :meth:`find` and :meth:`rindex`." +msgstr "Δείτε επίσης τις :meth:`rfind` και :meth:`index`." + +#: library/stdtypes.rst:2370 +#, fuzzy msgid "" "Like :meth:`rfind` but raises :exc:`ValueError` when the substring *sub* is " -"not found." +"not found. For example:" msgstr "" "Όπως η :meth:`rfind`, αλλά κάνει raise :exc:`ValueError` όταν η υπό-" "συμβολοσειρά (sub-string) *sub* δεν βρέθηκε." -#: library/stdtypes.rst:2222 +#: library/stdtypes.rst:2374 +msgid "" +">>> 'spam, spam, spam'.rindex('spam')\n" +"12\n" +">>> 'spam, spam, spam'.rindex('eggs')\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +" 'spam, spam, spam'.rindex('eggs')\n" +" ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^\n" +"ValueError: substring not found" +msgstr "" + +#: library/stdtypes.rst:2385 +#, fuzzy +msgid "See also :meth:`index` and :meth:`find`." +msgstr "Δείτε επίσης τις :meth:`rfind` και :meth:`index`." + +#: library/stdtypes.rst:2390 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 " @@ -4018,7 +4284,29 @@ msgstr "" "καθορισμένο *fillchar* (η προεπιλογή είναι ένα διάστημα ASCII). Η αρχική " "συμβολοσειρά επιστρέφεται εάν το *width* είναι μικρότερο ή ίσο με ``len(s)``." -#: library/stdtypes.rst:2229 +#: library/stdtypes.rst:2396 +#, fuzzy +msgid "" +">>> 'Python'.rjust(10)\n" +"' Python'\n" +">>> 'Python'.rjust(10, '.')\n" +"'....Python'\n" +">>> 'Monty Python'.rjust(10, '.')\n" +"'Monty Python'" +msgstr "" +">>> 'Python'.center(10)\n" +"' Python '\n" +">>> 'Python'.center(10, '-')\n" +"'--Python--'\n" +">>> 'Python'.center(4)\n" +"'Python'" + +#: library/stdtypes.rst:2405 +#, fuzzy +msgid "See also :meth:`ljust` and :meth:`zfill`." +msgstr "Δείτε επίσης τις :meth:`rfind` και :meth:`index`." + +#: library/stdtypes.rst:2410 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 " @@ -4031,7 +4319,22 @@ msgstr "" "δεν βρεθεί, επιστρέφει ένα 3-tuple που περιέχει δύο κενές συμβολοσειρές, " "ακολουθούμενες από την ίδια τη συμβολοσειρά." -#: library/stdtypes.rst:2237 +#: library/stdtypes.rst:2417 +msgid "" +">>> 'Monty Python'.rpartition(' ')\n" +"('Monty', ' ', 'Python')\n" +">>> \"Monty Python's Flying Circus\".rpartition(' ')\n" +"(\"Monty Python's Flying\", ' ', 'Circus')\n" +">>> 'Monty Python'.rpartition('-')\n" +"('', '', 'Monty Python')" +msgstr "" + +#: library/stdtypes.rst:2426 +#, fuzzy +msgid "See also :meth:`partition`." +msgstr "Δείτε επίσης :meth:`title`." + +#: library/stdtypes.rst:2431 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 " @@ -4046,13 +4349,14 @@ msgstr "" "Εκτός από το διαχωρισμό από τα δεξιά, η :meth:`rsplit` συμπεριφέρεται όπως " "η :meth:`split` που περιγράφεται λεπτομερώς παρακάτω." -#: library/stdtypes.rst:2246 +#: library/stdtypes.rst:2440 +#, fuzzy 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 " "omitted or ``None``, the *chars* argument defaults to removing whitespace. " "The *chars* argument is not a suffix; rather, all combinations of its values " -"are stripped::" +"are stripped. For example:" msgstr "" "Επιστρέφει ένα αντίγραφο της συμβολοσειράς (string) με τους χαρακτήρες που " "έχουν αφαιρεθεί. Τα όρισμα *chars* είναι μια συμβολοσειρά που καθορίζει το " @@ -4061,7 +4365,7 @@ msgstr "" "διαστημάτων. Το όρισμα *chars* δεν είναι suffix, αλλά όλοι οι συνδυασμοί " "των τιμών του αφαιρούνται::" -#: library/stdtypes.rst:2251 +#: library/stdtypes.rst:2446 msgid "" ">>> ' spacious '.rstrip()\n" "' spacious'\n" @@ -4073,15 +4377,16 @@ msgstr "" ">>> 'mississippi'.rstrip('ipz')\n" "'mississ'" -#: library/stdtypes.rst:2256 +#: library/stdtypes.rst:2453 +#, fuzzy msgid "" -"See :meth:`str.removesuffix` for a method that will remove a single suffix " +"See :meth:`removesuffix` for a method that will remove a single suffix " "string rather than all of a set of characters. For example::" msgstr "" "Δείτε τη :meth:`str.removesuffix` για μια μέθοδο που θα αφαιρέσει ένα απλό " "suffix αντί για όλο το σύνολο των χαρακτήρων. Για παράδειγμα::" -#: library/stdtypes.rst:2259 +#: library/stdtypes.rst:2456 msgid "" ">>> 'Monty Python'.rstrip(' Python')\n" "'M'\n" @@ -4093,7 +4398,12 @@ msgstr "" ">>> 'Monty Python'.removesuffix(' Python')\n" "'Monty'" -#: library/stdtypes.rst:2266 +#: library/stdtypes.rst:2461 +#, fuzzy +msgid "See also :meth:`strip`." +msgstr "Δείτε επίσης τη :meth:`istitle`." + +#: library/stdtypes.rst:2466 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, " @@ -4108,7 +4418,7 @@ msgstr "" "υπάρχει όριο στον αριθμό των διαχωρισμών (γίνονται όλες οι πιθανές " "διασπάσεις)." -#: library/stdtypes.rst:2272 +#: library/stdtypes.rst:2472 msgid "" "If *sep* is given, consecutive delimiters are not grouped together and are " "deemed to delimit empty strings (for example, ``'1,,2'.split(',')`` returns " @@ -4125,15 +4435,7 @@ msgstr "" "διαχωρισμός μιας κενής συμβολοσειράς με ένα καθορισμένο διαχωριστικό " "επιστρέφει το ``['']``." -#: library/stdtypes.rst:2297 library/stdtypes.rst:2363 -#: library/stdtypes.rst:2501 library/stdtypes.rst:3513 -#: library/stdtypes.rst:3619 library/stdtypes.rst:3658 -#: library/stdtypes.rst:3700 library/stdtypes.rst:3745 -#: library/stdtypes.rst:3795 library/stdtypes.rst:3861 -msgid "For example::" -msgstr "Για παράδειγμα::" - -#: library/stdtypes.rst:2281 +#: library/stdtypes.rst:2481 msgid "" ">>> '1,2,3'.split(',')\n" "['1', '2', '3']\n" @@ -4153,7 +4455,7 @@ msgstr "" ">>> '1<>2<>3<4'.split('<>')\n" "['1', '2', '3<4']" -#: library/stdtypes.rst:2290 +#: library/stdtypes.rst:2492 msgid "" "If *sep* is not specified or is ``None``, a different splitting algorithm is " "applied: runs of consecutive whitespace are regarded as a single separator, " @@ -4170,7 +4472,7 @@ msgstr "" "συμβολοσειράς που αποτελείται μόνο από κενά διαστήματα με ένα ``None`` ως " "διαχωριστικό επιστρέφει ``[]``." -#: library/stdtypes.rst:2299 +#: library/stdtypes.rst:2501 msgid "" ">>> '1 2 3'.split()\n" "['1', '2', '3']\n" @@ -4186,7 +4488,7 @@ msgstr "" ">>> ' 1 2 3 '.split()\n" "['1', '2', '3']" -#: library/stdtypes.rst:2306 +#: library/stdtypes.rst:2510 msgid "" "If *sep* is not specified or is ``None`` and *maxsplit* is ``0``, only " "leading runs of consecutive whitespace are considered." @@ -4194,7 +4496,7 @@ msgstr "" "Εάν το *sep* δεν καθοριστεί ή είναι ``None`` και το *maxsplit* είναι ``0``, " "μόνο οι αρχικές εμφανίσεις διαδοχικών κενών θεωρούνται." -#: library/stdtypes.rst:2311 +#: library/stdtypes.rst:2515 msgid "" ">>> \"\".split(None, 0)\n" "[]\n" @@ -4210,11 +4512,12 @@ msgstr "" ">>> \" foo \".split(maxsplit=0)\n" "['foo ']" -#: library/stdtypes.rst:2318 -msgid "See also :meth:`join`." -msgstr "Δείτε επίσης τη :meth:`join`." +#: library/stdtypes.rst:2524 +#, fuzzy +msgid "See also :meth:`join` and :meth:`rsplit`." +msgstr "Δείτε επίσης τις :meth:`rfind` και :meth:`index`." -#: library/stdtypes.rst:2326 +#: library/stdtypes.rst:2532 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 " @@ -4224,7 +4527,7 @@ msgstr "" "διαχωρίζοντας στα όρια των γραμμών. Τα διαχωριστικά των γραμμών δεν " "περιλαμβάνονται στην νέα λίστα, εκτός αν δοθεί το *keepends* και είναι true." -#: library/stdtypes.rst:2330 +#: library/stdtypes.rst:2536 msgid "" "This method splits on the following line boundaries. In particular, the " "boundaries are a superset of :term:`universal newlines`." @@ -4232,107 +4535,114 @@ msgstr "" "Αυτή η μέθοδος διαχωρίζει στα ακόλουθα όρια γραμμών. Πιο συγκεκριμένα, τα " "όρια είναι ένα υπερσύνολο του :term:`universal newlines`." -#: library/stdtypes.rst:2334 +#: library/stdtypes.rst:2540 msgid "Representation" msgstr "Αναπαράσταση" -#: library/stdtypes.rst:2334 +#: library/stdtypes.rst:2540 msgid "Description" msgstr "Περιγραφή" -#: library/stdtypes.rst:2336 +#: library/stdtypes.rst:2542 msgid "``\\n``" msgstr "``\\n``" -#: library/stdtypes.rst:2336 +#: library/stdtypes.rst:2542 msgid "Line Feed" msgstr "Line Feed" -#: library/stdtypes.rst:2338 +#: library/stdtypes.rst:2544 msgid "``\\r``" msgstr "``\\r``" -#: library/stdtypes.rst:2338 +#: library/stdtypes.rst:2544 msgid "Carriage Return" msgstr "Carriage Return" -#: library/stdtypes.rst:2340 +#: library/stdtypes.rst:2546 msgid "``\\r\\n``" msgstr "``\\r\\n``" -#: library/stdtypes.rst:2340 +#: library/stdtypes.rst:2546 msgid "Carriage Return + Line Feed" msgstr "Carriage Return + Line Feed" -#: library/stdtypes.rst:2342 +#: library/stdtypes.rst:2548 msgid "``\\v`` or ``\\x0b``" msgstr "``\\v`` or ``\\x0b``" -#: library/stdtypes.rst:2342 +#: library/stdtypes.rst:2548 msgid "Line Tabulation" msgstr "Line Tabulation" -#: library/stdtypes.rst:2344 +#: library/stdtypes.rst:2550 msgid "``\\f`` or ``\\x0c``" msgstr "``\\f`` or ``\\x0c``" -#: library/stdtypes.rst:2344 +#: library/stdtypes.rst:2550 msgid "Form Feed" msgstr "Form Feed" -#: library/stdtypes.rst:2346 +#: library/stdtypes.rst:2552 msgid "``\\x1c``" msgstr "``\\x1c``" -#: library/stdtypes.rst:2346 +#: library/stdtypes.rst:2552 msgid "File Separator" msgstr "Διαχωριστής Αρχείου" -#: library/stdtypes.rst:2348 +#: library/stdtypes.rst:2554 msgid "``\\x1d``" msgstr "``\\x1d``" -#: library/stdtypes.rst:2348 +#: library/stdtypes.rst:2554 msgid "Group Separator" msgstr "Διαχωριστής Group" -#: library/stdtypes.rst:2350 +#: library/stdtypes.rst:2556 msgid "``\\x1e``" msgstr "``\\x1e``" -#: library/stdtypes.rst:2350 +#: library/stdtypes.rst:2556 msgid "Record Separator" msgstr "Διαχωριστής Εγγραφών" -#: library/stdtypes.rst:2352 +#: library/stdtypes.rst:2558 msgid "``\\x85``" msgstr "``\\x85``" -#: library/stdtypes.rst:2352 +#: library/stdtypes.rst:2558 msgid "Next Line (C1 Control Code)" msgstr "Επόμενη Γραμμή (C1 Control Code)" -#: library/stdtypes.rst:2354 +#: library/stdtypes.rst:2560 msgid "``\\u2028``" msgstr "``\\u2028``" -#: library/stdtypes.rst:2354 +#: library/stdtypes.rst:2560 msgid "Line Separator" msgstr "Διαχωριστής Γραμμής" -#: library/stdtypes.rst:2356 +#: library/stdtypes.rst:2562 msgid "``\\u2029``" msgstr "``\\u2029``" -#: library/stdtypes.rst:2356 +#: library/stdtypes.rst:2562 msgid "Paragraph Separator" msgstr "Διαχωριστής Παραγράφου" -#: library/stdtypes.rst:2361 +#: library/stdtypes.rst:2567 msgid "``\\v`` and ``\\f`` added to list of line boundaries." msgstr "Τα ``\\v`` και ``\\f`` προστίθενται στην λίστα ορίων των γραμμών." -#: library/stdtypes.rst:2365 +#: library/stdtypes.rst:2675 library/stdtypes.rst:3765 +#: library/stdtypes.rst:3871 library/stdtypes.rst:3910 +#: library/stdtypes.rst:3952 library/stdtypes.rst:3997 +#: library/stdtypes.rst:4047 library/stdtypes.rst:4113 +msgid "For example::" +msgstr "Για παράδειγμα::" + +#: library/stdtypes.rst:2571 msgid "" ">>> 'ab c\\n\\nde fg\\rkl\\r\\n'.splitlines()\n" "['ab c', '', 'de fg', 'kl']\n" @@ -4344,7 +4654,7 @@ msgstr "" ">>> 'ab c\\n\\nde fg\\rkl\\r\\n'.splitlines(keepends=True)\n" "['ab c\\n', '\\n', 'de fg\\r', 'kl\\r\\n']" -#: library/stdtypes.rst:2370 +#: library/stdtypes.rst:2576 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 " @@ -4355,7 +4665,7 @@ msgstr "" "αλφαριθμητικό, και μια τερματικό break γραμμής δεν οδηγεί σε μια επιπλέον " "γραμμή::" -#: library/stdtypes.rst:2374 +#: library/stdtypes.rst:2580 msgid "" ">>> \"\".splitlines()\n" "[]\n" @@ -4367,11 +4677,11 @@ msgstr "" ">>> \"One line\\n\".splitlines()\n" "['One line']" -#: library/stdtypes.rst:2379 +#: library/stdtypes.rst:2585 msgid "For comparison, ``split('\\n')`` gives::" msgstr "Συγκριτικά, η ``split('\\n')`` δίνει::" -#: library/stdtypes.rst:2381 +#: library/stdtypes.rst:2587 msgid "" ">>> ''.split('\\n')\n" "['']\n" @@ -4383,7 +4693,7 @@ msgstr "" ">>> 'Two lines\\n'.split('\\n')\n" "['Two lines', '']" -#: library/stdtypes.rst:2389 +#: library/stdtypes.rst:2595 msgid "" "Return ``True`` if string starts with the *prefix*, otherwise return " "``False``. *prefix* can also be a tuple of prefixes to look for. With " @@ -4396,13 +4706,38 @@ msgstr "" "αλφαριθμητικό που αρχίζει από τη συγκεκριμένη θέση. Με το προαιρετικό " "*end*, σταματά η σύγκριση της συμβολοσειράς σε αυτή τη θέση." -#: library/stdtypes.rst:2397 +#: library/stdtypes.rst:2602 +#, fuzzy +msgid "" +">>> 'Python'.startswith('Py')\n" +"True\n" +">>> 'a tuple of prefixes'.startswith(('at', 'a'))\n" +"True\n" +">>> 'Python is amazing'.startswith('is', 7)\n" +"True" +msgstr "" +">>> 'Python'.endswith('on')\n" +"True\n" +">>> 'a tuple of suffixes'.endswith(('at', 'in'))\n" +"False\n" +">>> 'a tuple of suffixes'.endswith(('at', 'es'))\n" +"True\n" +">>> 'Python is amazing'.endswith('is', 0, 9)\n" +"True" + +#: library/stdtypes.rst:2611 +#, fuzzy +msgid "See also :meth:`endswith` and :meth:`removeprefix`." +msgstr "Δείτε επίσης τις :meth:`startswith` και :meth:`removesuffix`." + +#: library/stdtypes.rst:2616 +#, fuzzy 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 " "to be removed. If omitted or ``None``, the *chars* argument defaults to " "removing whitespace. The *chars* argument is not a prefix or suffix; rather, " -"all combinations of its values are stripped::" +"all combinations of its values are stripped." msgstr "" "Επιστρέφει ένα αντίγραφο της συμβολοσειράς (string) με τους πρώτους και τους " "τελευταίους χαρακτήρες να έχουν αφαιρεθεί. Το όρισμα *chars* είναι μια " @@ -4411,7 +4746,11 @@ msgstr "" "default την αφαίρεση των κενών διαστημάτων. Το όρισμα *chars* δεν είναι " "prefix ή suffix· μάλλον, όλοι οι συνδυασμοί των τιμών του αφαιρούνται::" -#: library/stdtypes.rst:2403 +#: library/stdtypes.rst:2622 +msgid "Whitespace characters are defined by :meth:`str.isspace`." +msgstr "" + +#: library/stdtypes.rst:2626 msgid "" ">>> ' spacious '.strip()\n" "'spacious'\n" @@ -4423,12 +4762,13 @@ msgstr "" ">>> 'www.example.com'.strip('cmowz.')\n" "'example'" -#: library/stdtypes.rst:2408 +#: library/stdtypes.rst:2633 +#, fuzzy msgid "" "The outermost leading and trailing *chars* argument values are stripped from " "the string. Characters are removed from the leading end until reaching a " "string character that is not contained in the set of characters in *chars*. " -"A similar action takes place on the trailing end. For example::" +"A similar action takes place on the trailing end." msgstr "" "Οι ακραίες αρχικές και τελικές τιμές του ορίσματος *chars* αφαιρούνται από " "τη συμβολοσειρά (string). Οι χαρακτήρες αφαιρούνται από το μπροστινό άκρο " @@ -4436,7 +4776,7 @@ msgstr "" "στο σύνολο χαρακτήρων του *chars*. Μια παρόμοια ενέργεια λαμβάνει χώρα στο " "τέλος της ουράς. Για παράδειγμα:" -#: library/stdtypes.rst:2414 +#: library/stdtypes.rst:2640 msgid "" ">>> comment_string = '#....... Section 3.2.1 Issue #32 .......'\n" ">>> comment_string.strip('.#! ')\n" @@ -4446,17 +4786,47 @@ msgstr "" ">>> comment_string.strip('.#! ')\n" "'Section 3.2.1 Issue #32'" -#: library/stdtypes.rst:2421 +#: library/stdtypes.rst:2646 +#, fuzzy +msgid "See also :meth:`rstrip`." +msgstr "Δείτε επίσης τη :meth:`istitle`." + +#: library/stdtypes.rst:2651 +#, fuzzy msgid "" "Return a copy of the string with uppercase characters converted to lowercase " -"and vice versa. Note that it is not necessarily true that ``s.swapcase()." -"swapcase() == s``." +"and vice versa. For example:" +msgstr "" +"Επιστρέφει ένα αντίγραφο της συμβολοσειράς (string) με όλους τους cased " +"χαρακτήρες [4]_ να έχουν μετατραπεί σε πεζούς." + +#: library/stdtypes.rst:2654 +#, fuzzy +msgid "" +">>> 'Hello World'.swapcase()\n" +"'hELLO wORLD'" msgstr "" -"Επιστρέφει ένα αντίγραφο της συμβολοσειράς (string) με κεφαλαίους χαρακτήρες " -"που έχουν μετατραπεί σε πεζούς και αντίστροφα. Σημειώστε ότι δεν είναι " -"απαραίτητα αληθές ότι ``s.swapcase().swapcase() == s``." +">>> b'Hello World'.swapcase()\n" +"b'hELLO wORLD'" -#: library/stdtypes.rst:2428 +#: library/stdtypes.rst:2659 +msgid "" +"Note that it is not necessarily true that ``s.swapcase().swapcase() == s``. " +"For example:" +msgstr "" + +#: library/stdtypes.rst:2662 +msgid "" +">>> 'straße'.swapcase().swapcase()\n" +"'strasse'" +msgstr "" + +#: library/stdtypes.rst:2667 +#, fuzzy +msgid "See also :meth:`str.lower` and :meth:`str.upper`." +msgstr "Δείτε επίσης τις :meth:`rfind` και :meth:`index`." + +#: library/stdtypes.rst:2672 msgid "" "Return a titlecased version of the string where words start with an " "uppercase character and the remaining characters are lowercase." @@ -4464,7 +4834,7 @@ msgstr "" "Επιστρέφει μια titlecased έκδοση της συμβολοσειράς, όπου οι λέξεις ξεκινούν " "με ένα κεφαλαίο χαρακτήρα και οι υπόλοιποι χαρακτήρες είναι πεζοί." -#: library/stdtypes.rst:2433 +#: library/stdtypes.rst:2677 msgid "" ">>> 'Hello world'.title()\n" "'Hello World'" @@ -4472,7 +4842,7 @@ msgstr "" ">>> 'Hello world'.title()\n" "'Hello World'" -#: library/stdtypes.rst:3805 +#: library/stdtypes.rst:4057 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 " @@ -4484,7 +4854,7 @@ msgstr "" "contexts, αλλά σημαίνει ότι οι απόστροφοι σε συναιρέσεις και κτητικές λέξεις " "αποτελούν όρια λέξεων, που μπορεί να μην είναι το επιθυμητό αποτέλεσμα::" -#: library/stdtypes.rst:2441 +#: library/stdtypes.rst:2685 msgid "" ">>> \"they're bill's friends from the UK\".title()\n" "\"They'Re Bill'S Friends From The Uk\"" @@ -4492,7 +4862,7 @@ msgstr "" ">>> \"they're bill's friends from the UK\".title()\n" "\"They'Re Bill'S Friends From The Uk\"" -#: library/stdtypes.rst:2444 +#: library/stdtypes.rst:2688 msgid "" "The :func:`string.capwords` function does not have this problem, as it " "splits words on spaces only." @@ -4500,7 +4870,7 @@ msgstr "" "Η συνάρτηση :func:`string.capwords` δεν έχει αυτό το πρόβλημα, καθώς χωρίζει " "τις λέξεις μόνο σε κενά." -#: library/stdtypes.rst:2447 +#: library/stdtypes.rst:2691 msgid "" "Alternatively, a workaround for apostrophes can be constructed using regular " "expressions::" @@ -4508,7 +4878,7 @@ msgstr "" "Εναλλακτικά, μπορεί να κατασκευαστεί μια λύση για τις αποστρόφους " "χρησιμοποιώντας κανονικές εκφράσεις::" -#: library/stdtypes.rst:2450 +#: library/stdtypes.rst:2694 msgid "" ">>> import re\n" ">>> def titlecase(s):\n" @@ -4528,11 +4898,11 @@ msgstr "" ">>> titlecase(\"they're bill's friends.\")\n" "\"They're Bill's Friends.\"" -#: library/stdtypes.rst:2459 +#: library/stdtypes.rst:2703 msgid "See also :meth:`istitle`." msgstr "Δείτε επίσης τη :meth:`istitle`." -#: library/stdtypes.rst:2464 +#: library/stdtypes.rst:2708 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 " @@ -4555,7 +4925,7 @@ msgstr "" "επιστρέφεται· ή να κάνει raise ένα :exc:`LookupError`, για να αντιστοιχίσει " "τον χαρακτήρα στον εαυτό του." -#: library/stdtypes.rst:2473 +#: library/stdtypes.rst:2717 msgid "" "You can use :meth:`str.maketrans` to create a translation map from character-" "to-character mappings in different formats." @@ -4564,7 +4934,7 @@ msgstr "" "ένα χάρτη μετάφρασης αντιστοίχισης από χαρακτήρα-σε-χαρακτήρα σε " "διαφορετικές μορφές." -#: library/stdtypes.rst:2476 +#: library/stdtypes.rst:2720 msgid "" "See also the :mod:`codecs` module for a more flexible approach to custom " "character mappings." @@ -4572,7 +4942,7 @@ msgstr "" "Δείτε επίσης την ενότητα :mod:`codecs` για μια πιο ευέλικτη προσέγγιση σε " "προσαρμοσμένα mappings χαρακτήρων." -#: library/stdtypes.rst:2482 +#: library/stdtypes.rst:2726 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`` " @@ -4586,7 +4956,7 @@ msgstr "" "πεζά γράμματα ή αν η κατηγορία Unicode του προκύπτοντος χαρακτήρα(ων) δεν " "είναι \"Lu\" (Γράμμα, κεφαλαίο), αλλά π.χ. \"Lt\" (Γράμμα, titlecase)." -#: library/stdtypes.rst:2488 +#: library/stdtypes.rst:2732 msgid "" "The uppercasing algorithm used is `described in section 3.13 'Default Case " "Folding' of the Unicode Standard `__." -#: library/stdtypes.rst:2495 +#: library/stdtypes.rst:2739 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 " @@ -4609,7 +4979,7 @@ msgstr "" "συμπλήρωση *μετά* τον χαρακτήρα sign αντί για πριν. Η αρχική συμβολοσειρά " "επιστρέφεται εάν το *width* είναι μικρότερο ή ίσο με ``len(s)``." -#: library/stdtypes.rst:2503 +#: library/stdtypes.rst:2747 msgid "" ">>> \"42\".zfill(5)\n" "'00042'\n" @@ -4621,11 +4991,11 @@ msgstr "" ">>> \"-42\".zfill(5)\n" "'-0042'" -#: library/stdtypes.rst:2524 +#: library/stdtypes.rst:2772 msgid "Formatted String Literals (f-strings)" msgstr "Διαμορφωμένες Κυριολεκτικές Συμβολοσειρές (f-strings)" -#: library/stdtypes.rst:2527 +#: library/stdtypes.rst:2775 msgid "" "The :keyword:`await` and :keyword:`async for` can be used in expressions " "within f-strings." @@ -4633,11 +5003,11 @@ msgstr "" "Τα :keyword:`await` και :keyword:`async for` μπορούν να χρησιμοποιηθούν σε " "εκφράσεις μέσα σε f-strings." -#: library/stdtypes.rst:2530 +#: library/stdtypes.rst:2778 msgid "Added the debugging operator (``=``)" msgstr "Προστέθηκε ο τελεστής αποσφαλμάτωσης (``=``)" -#: library/stdtypes.rst:2532 +#: library/stdtypes.rst:2780 msgid "" "Many restrictions on expressions within f-strings have been removed. " "Notably, nested strings, comments, and backslashes are now permitted." @@ -4646,7 +5016,7 @@ msgstr "" "Ιδιαίτερα, πλέον επιτρέπονται οι εμφωλευμένες συμβολοσειρές, τα σχόλια και " "οι κάθετοι." -#: library/stdtypes.rst:2536 +#: library/stdtypes.rst:2784 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 " @@ -4663,7 +5033,7 @@ msgstr "" "τρόπο όπως η μέθοδος :meth:`str.format`, και μετατρέπονται σε κανονικά " "αντικείμενα τύπου :class:`str`. Για παράδειγμα:" -#: library/stdtypes.rst:2544 +#: library/stdtypes.rst:2792 msgid "" ">>> who = 'nobody'\n" ">>> nationality = 'Spanish'\n" @@ -4675,11 +5045,11 @@ msgstr "" ">>> f'{who.title()} expects the {nationality} Inquisition!'\n" "'Nobody expects the Spanish Inquisition!'" -#: library/stdtypes.rst:2551 +#: library/stdtypes.rst:2799 msgid "It is also possible to use a multi line f-string:" msgstr "Είναι επίσης δυνατό να χρησιμοποιηθεί μια f-string πολλών γραμμών:" -#: library/stdtypes.rst:2553 +#: library/stdtypes.rst:2801 msgid "" ">>> f'''This is a string\n" "... on two lines'''\n" @@ -4689,7 +5059,7 @@ msgstr "" "... on two lines'''\n" "'This is a string\\non two lines'" -#: library/stdtypes.rst:2559 +#: library/stdtypes.rst:2807 msgid "" "A single opening curly bracket, ``'{'``, marks a *replacement field* that " "can contain any Python expression:" @@ -4697,7 +5067,7 @@ msgstr "" "Ένα μόνο άνοιγμα αγκύλης, ``'{'``, δηλώνει ένα *πεδίο αντικατάστασης* που " "μπορεί να περιέχει οποιαδήποτε έκφραση Python:" -#: library/stdtypes.rst:2562 +#: library/stdtypes.rst:2810 msgid "" ">>> nationality = 'Spanish'\n" ">>> f'The {nationality} Inquisition!'\n" @@ -4707,13 +5077,13 @@ msgstr "" ">>> f'The {nationality} Inquisition!'\n" "'The Spanish Inquisition!'" -#: library/stdtypes.rst:2568 +#: library/stdtypes.rst:2816 msgid "To include a literal ``{`` or ``}``, use a double bracket:" msgstr "" "Για να συμπεριλάβετε μια κυριολεξία ``{`` ή ``}``, χρησιμοποιήστε διπλή " "αγκύλη:" -#: library/stdtypes.rst:2570 +#: library/stdtypes.rst:2818 msgid "" ">>> x = 42\n" ">>> f'{{x}} is {x}'\n" @@ -4723,14 +5093,14 @@ msgstr "" ">>> f'{{x}} is {x}'\n" "'{x} is 42'" -#: library/stdtypes.rst:2576 +#: library/stdtypes.rst:2824 msgid "" "Functions can also be used, and :ref:`format specifiers `:" msgstr "" "Μπορούν επίσης να χρησιμοποιηθούν συναρτήσεις καθώς και :ref:`format " "specifiers `:" -#: library/stdtypes.rst:2578 +#: library/stdtypes.rst:2826 msgid "" ">>> from math import sqrt\n" ">>> f'√2 \\N{ALMOST EQUAL TO} {sqrt(2):.5f}'\n" @@ -4740,13 +5110,13 @@ msgstr "" ">>> f'√2 \\N{ALMOST EQUAL TO} {sqrt(2):.5f}'\n" "'√2 ≈ 1.41421'" -#: library/stdtypes.rst:2584 +#: library/stdtypes.rst:2832 msgid "Any non-string expression is converted using :func:`str`, by default:" msgstr "" "Κάθε έκφραση μη-συμβολοσειράς μετατρέπεται χρησιμοποιώντας τη :func:`str`, " "από προεπιλογή:" -#: library/stdtypes.rst:2586 +#: library/stdtypes.rst:2834 msgid "" ">>> from fractions import Fraction\n" ">>> f'{Fraction(1, 3)}'\n" @@ -4756,7 +5126,7 @@ msgstr "" ">>> f'{Fraction(1, 3)}'\n" "'1/3'" -#: library/stdtypes.rst:2592 +#: library/stdtypes.rst:2840 msgid "" "To use an explicit conversion, use the ``!`` (exclamation mark) operator, " "followed by any of the valid formats, which are:" @@ -4765,35 +5135,35 @@ msgstr "" "(θαυμαστικό), ακολουθούμενο από οποιεσδήποτε από τις έγκυρες μορφές, τα " "οποία είναι:" -#: library/stdtypes.rst:2764 library/stdtypes.rst:3984 +#: library/stdtypes.rst:3012 library/stdtypes.rst:4236 msgid "Conversion" msgstr "Μετατροπή" -#: library/stdtypes.rst:2598 +#: library/stdtypes.rst:2846 msgid "``!a``" msgstr "``!a``" -#: library/stdtypes.rst:2598 +#: library/stdtypes.rst:2846 msgid ":func:`ascii`" msgstr ":func:`ascii`" -#: library/stdtypes.rst:2599 +#: library/stdtypes.rst:2847 msgid "``!r``" msgstr "``!r``" -#: library/stdtypes.rst:2599 +#: library/stdtypes.rst:2847 msgid ":func:`repr`" msgstr ":func:`repr`" -#: library/stdtypes.rst:2600 +#: library/stdtypes.rst:2848 msgid "``!s``" msgstr "``!s``" -#: library/stdtypes.rst:2600 +#: library/stdtypes.rst:2848 msgid ":func:`str`" msgstr ":func:`str`" -#: library/stdtypes.rst:2605 +#: library/stdtypes.rst:2853 msgid "" ">>> from fractions import Fraction\n" ">>> f'{Fraction(1, 3)!s}'\n" @@ -4813,7 +5183,7 @@ msgstr "" ">>> print(f'{question!a}')\n" "'\\xbfD\\xf3nde est\\xe1 el Presidente?'" -#: library/stdtypes.rst:2616 +#: library/stdtypes.rst:2864 msgid "" "While debugging it may be helpful to see both the expression and its value, " "by using the equals sign (``=``) after the expression. This preserves spaces " @@ -4827,7 +5197,7 @@ msgstr "" "αποσφαλμάτωσης χρησιμοποιεί τη μετατροπή :func:`repr` (``!r``). Για " "παράδειγμα:" -#: library/stdtypes.rst:2622 +#: library/stdtypes.rst:2870 msgid "" ">>> from fractions import Fraction\n" ">>> calculation = Fraction(1, 3)\n" @@ -4847,7 +5217,7 @@ msgstr "" ">>> f'{calculation = !s}'\n" "'calculation = 1/3'" -#: library/stdtypes.rst:2633 +#: library/stdtypes.rst:2881 msgid "" "Once the output has been evaluated, it can be formatted using a :ref:`format " "specifier ` following a colon (``':'``). After the expression " @@ -4864,7 +5234,7 @@ msgstr "" "καθοριστής μορφοποίησης. Το μορφοποιημένο αποτέλεσμα χρησιμοποιείται στη " "συνέχεια ως η τελική τιμή για το πεδίο αντικατάστασης. Για παράδειγμα:" -#: library/stdtypes.rst:2641 +#: library/stdtypes.rst:2889 msgid "" ">>> from fractions import Fraction\n" ">>> f'{Fraction(1, 7):.6f}'\n" @@ -4878,11 +5248,11 @@ msgstr "" ">>> f'{Fraction(1, 7):_^+10}'\n" "'___+1/7___'" -#: library/stdtypes.rst:2653 +#: library/stdtypes.rst:2901 msgid "``printf``-style String Formatting" msgstr "``printf``-style String Formatting" -#: library/stdtypes.rst:2666 +#: library/stdtypes.rst:2914 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 " @@ -4901,7 +5271,7 @@ msgstr "" "τους δικούς τις συμβιβασμούς και τα οφέλη της απλότητας, ευελιξίας και/ή " "επεκτασιμότητας." -#: library/stdtypes.rst:2674 +#: library/stdtypes.rst:2922 msgid "" "String objects have one unique built-in operation: the ``%`` operator " "(modulo). This is also known as the string *formatting* or *interpolation* " @@ -4918,7 +5288,7 @@ msgstr "" "είναι παρόμοιο με τη χρήση του :c:func:`sprintf` στη γλώσσα C. Για " "παράδειγμα:" -#: library/stdtypes.rst:2681 +#: library/stdtypes.rst:2929 msgid "" ">>> print('%s has %d quote types.' % ('Python', 2))\n" "Python has 2 quote types." @@ -4926,7 +5296,7 @@ msgstr "" ">>> print('%s has %d quote types.' % ('Python', 2))\n" "Python has 2 quote types." -#: library/stdtypes.rst:2686 +#: library/stdtypes.rst:2934 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 " @@ -4939,7 +5309,7 @@ msgstr "" "από το format string ή ένα μεμονωμένο αντικείμενο αντιστοίχισης (για " "παράδειγμα, ένα λεξικό)." -#: library/stdtypes.rst:3916 +#: library/stdtypes.rst:4168 msgid "" "A conversion specifier contains two or more characters and has the following " "components, which must occur in this order:" @@ -4947,11 +5317,11 @@ msgstr "" "Ένας προσδιοριστής μετατροπής περιέχει δύο ή περισσότερους χαρακτήρες και " "έχει τους εξής components, οι οποίοι πρέπει να εμφανίζονται με αυτή τη σειρά:" -#: library/stdtypes.rst:3919 +#: library/stdtypes.rst:4171 msgid "The ``'%'`` character, which marks the start of the specifier." msgstr "Ο χαρακτήρας ```%''``, που σηματοδοτεί την αρχή του προσδιοριστή." -#: library/stdtypes.rst:3921 +#: library/stdtypes.rst:4173 msgid "" "Mapping key (optional), consisting of a parenthesised sequence of characters " "(for example, ``(somename)``)." @@ -4959,7 +5329,7 @@ msgstr "" "Κλειδί mapping (προαιρετικό), που αποτελείται από μια ακολουθία χαρακτήρων " "σε παρένθεση (για παράδειγμα, ``(somename)``)." -#: library/stdtypes.rst:3924 +#: library/stdtypes.rst:4176 msgid "" "Conversion flags (optional), which affect the result of some conversion " "types." @@ -4967,7 +5337,7 @@ msgstr "" "Δείκτες μετατροπής (προαιρετικό), που επηρεάζουν το αποτέλεσμα κάποιων τύπων " "μετατροπής." -#: library/stdtypes.rst:3927 +#: library/stdtypes.rst:4179 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 " @@ -4978,7 +5348,7 @@ msgstr "" "*values*, και το αντικείμενο προς μετατροπή έρχεται μετά από το ελάχιστο " "πλάτος πεδίου και το προαιρετικό precision." -#: library/stdtypes.rst:3931 +#: library/stdtypes.rst:4183 msgid "" "Precision (optional), given as a ``'.'`` (dot) followed by the precision. " "If specified as ``'*'`` (an asterisk), the actual precision is read from the " @@ -4990,15 +5360,15 @@ msgstr "" "διαβάζεται από το επόμενο στοιχείο του tuple στα *values*, και η τιμή προς " "μετατροπή έρχεται μετά το precision." -#: library/stdtypes.rst:3936 +#: library/stdtypes.rst:4188 msgid "Length modifier (optional)." msgstr "Μετατροπέας του length (προαιρετικό)." -#: library/stdtypes.rst:3938 +#: library/stdtypes.rst:4190 msgid "Conversion type." msgstr "Τύπος conversion." -#: library/stdtypes.rst:2720 +#: library/stdtypes.rst:2968 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 " @@ -5011,7 +5381,7 @@ msgstr "" "``'%'``. Το κλειδί αντιστοίχισης επιλέγει την τιμή που θα μορφοποιηθεί από " "την αντιστοίχιση. Για παράδειγμα:" -#: library/stdtypes.rst:3949 +#: library/stdtypes.rst:4201 msgid "" "In this case no ``*`` specifiers may occur in a format (since they require a " "sequential parameter list)." @@ -5019,38 +5389,38 @@ msgstr "" "Σε αυτήν την περίπτωση δεν μπορεί να υπάρχουν προσδιοριστές ``*`` σε μια " "μορφή (καθώς απαιτούν μια διαδοχική λίστα παραμέτρων)." -#: library/stdtypes.rst:3952 +#: library/stdtypes.rst:4204 msgid "The conversion flag characters are:" msgstr "Οι δείκτες μετατροπής είναι:" -#: library/stdtypes.rst:3961 +#: library/stdtypes.rst:4213 msgid "Flag" msgstr "Flag" -#: library/stdtypes.rst:3963 +#: library/stdtypes.rst:4215 msgid "``'#'``" msgstr "``'#'``" -#: library/stdtypes.rst:3963 +#: library/stdtypes.rst:4215 msgid "" "The value conversion will use the \"alternate form\" (where defined below)." msgstr "" "Οι μετατροπή τιμής θα χρησιμοποιήσει την \"εναλλακτική φόρμα\" (όπου " "ορίζεται παρακάτω)." -#: library/stdtypes.rst:3966 +#: library/stdtypes.rst:4218 msgid "``'0'``" msgstr "``'0'``" -#: library/stdtypes.rst:3966 +#: library/stdtypes.rst:4218 msgid "The conversion will be zero padded for numeric values." msgstr "Η μετατροπή θα έχει μηδενική συμπλήρωση για αριθμητικές τιμές." -#: library/stdtypes.rst:3968 +#: library/stdtypes.rst:4220 msgid "``'-'``" msgstr "``'-'``" -#: library/stdtypes.rst:3968 +#: library/stdtypes.rst:4220 msgid "" "The converted value is left adjusted (overrides the ``'0'`` conversion if " "both are given)." @@ -5058,11 +5428,11 @@ msgstr "" "Η τιμή μετατροπής αφήνεται προσαρμοσμένη (παρακάμπτει τη μετατροπή ``'0'`` " "εάν δίνονται και τα δύο)." -#: library/stdtypes.rst:3971 +#: library/stdtypes.rst:4223 msgid "``' '``" msgstr "``' '``" -#: library/stdtypes.rst:3971 +#: library/stdtypes.rst:4223 msgid "" "(a space) A blank should be left before a positive number (or empty string) " "produced by a signed conversion." @@ -5070,11 +5440,11 @@ msgstr "" "(ένα κενό) Πρέπει να προστεθεί ένα κενό πριν από έναν θετικό αριθμό (ή κενή " "συμβολοσειρά) που παράγεται από μια υπογεγραμμένη μετατροπή." -#: library/stdtypes.rst:3974 +#: library/stdtypes.rst:4226 msgid "``'+'``" msgstr "``'+'``" -#: library/stdtypes.rst:3974 +#: library/stdtypes.rst:4226 msgid "" "A sign character (``'+'`` or ``'-'``) will precede the conversion (overrides " "a \"space\" flag)." @@ -5082,7 +5452,7 @@ msgstr "" "Ένα χαρακτήρας προσήμου (``'+'`` ή ``'-'``) θα προηγείται της μετατροπής " "(παρακάμπτει ένα \"κενό\" δείκτη)." -#: library/stdtypes.rst:3978 +#: library/stdtypes.rst:4230 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``." @@ -5091,87 +5461,87 @@ msgstr "" "αγνοείται καθώς δεν είναι απαραίτητος για την Python -- οπότε π.χ. ``%ld`` " "είναι πανομοιότυπο σε ``%d``." -#: library/stdtypes.rst:3981 +#: library/stdtypes.rst:4233 msgid "The conversion types are:" msgstr "Οι τύποι μετατροπής είναι:" -#: library/stdtypes.rst:3986 +#: library/stdtypes.rst:4238 msgid "``'d'``" msgstr "``'d'``" -#: library/stdtypes.rst:2768 library/stdtypes.rst:3988 +#: library/stdtypes.rst:3016 library/stdtypes.rst:4240 msgid "Signed integer decimal." msgstr "Υπογεγραμμένος δεκαδικός ακέραιος." -#: library/stdtypes.rst:3988 +#: library/stdtypes.rst:4240 msgid "``'i'``" msgstr "``'i'``" -#: library/stdtypes.rst:3990 +#: library/stdtypes.rst:4242 msgid "``'o'``" msgstr "``'o'``" -#: library/stdtypes.rst:3990 +#: library/stdtypes.rst:4242 msgid "Signed octal value." msgstr "Υπογεγραμμένη οκταδική τιμή." -#: library/stdtypes.rst:3992 +#: library/stdtypes.rst:4244 msgid "``'u'``" msgstr "``'u'``" -#: library/stdtypes.rst:3992 +#: library/stdtypes.rst:4244 msgid "Obsolete type -- it is identical to ``'d'``." msgstr "Απαρχαιωμένος τύπος -- είναι πανομοιότυπος με το ``'d'``." -#: library/stdtypes.rst:3994 +#: library/stdtypes.rst:4246 msgid "``'x'``" msgstr "``'x'``" -#: library/stdtypes.rst:3994 +#: library/stdtypes.rst:4246 msgid "Signed hexadecimal (lowercase)." msgstr "Υπογεγραμμένο δεκαεξαδικό (πεζά)." -#: library/stdtypes.rst:3996 +#: library/stdtypes.rst:4248 msgid "``'X'``" msgstr "``'X'``" -#: library/stdtypes.rst:3996 +#: library/stdtypes.rst:4248 msgid "Signed hexadecimal (uppercase)." msgstr "Υπογεγραμμένο δεκαεξαδικό (κεφαλαίο)." -#: library/stdtypes.rst:3998 +#: library/stdtypes.rst:4250 msgid "``'e'``" msgstr "``'e'``" -#: library/stdtypes.rst:3998 +#: library/stdtypes.rst:4250 msgid "Floating-point exponential format (lowercase)." msgstr "Εκθετική μορφή κινητής υποδιαστολής (πεζά)" -#: library/stdtypes.rst:4000 +#: library/stdtypes.rst:4252 msgid "``'E'``" msgstr "``'E'``" -#: library/stdtypes.rst:4000 +#: library/stdtypes.rst:4252 msgid "Floating-point exponential format (uppercase)." msgstr "Εκθετική μορφή κινητής υποδιαστολής (κεφαλαία)" -#: library/stdtypes.rst:4002 +#: library/stdtypes.rst:4254 msgid "``'f'``" msgstr "``'f'``" -#: library/stdtypes.rst:2784 library/stdtypes.rst:4004 +#: library/stdtypes.rst:3032 library/stdtypes.rst:4256 msgid "Floating-point decimal format." msgstr "Δεκαδική μορφή κινητής υποδιαστολής." -#: library/stdtypes.rst:4004 +#: library/stdtypes.rst:4256 msgid "``'F'``" msgstr "``'F'``" -#: library/stdtypes.rst:4006 +#: library/stdtypes.rst:4258 msgid "``'g'``" msgstr "``'g'``" -#: library/stdtypes.rst:4006 +#: library/stdtypes.rst:4258 msgid "" "Floating-point format. Uses lowercase exponential format if exponent is less " "than -4 or not less than precision, decimal format otherwise." @@ -5180,11 +5550,11 @@ msgstr "" "είναι μικρότερος από -4 ή όχι μικρότερος από την ακρίβεια, διαφορετικά " "χρησιμοποιεί δεκαδική μορφή." -#: library/stdtypes.rst:4010 +#: library/stdtypes.rst:4262 msgid "``'G'``" msgstr "``'G'``" -#: library/stdtypes.rst:4010 +#: library/stdtypes.rst:4262 msgid "" "Floating-point format. Uses uppercase exponential format if exponent is less " "than -4 or not less than precision, decimal format otherwise." @@ -5193,56 +5563,63 @@ msgstr "" "εκθέτης είναι μικρότερος από -4 ή όχι μικρότερος από την ακρίβεια, " "διαφορετικά χρησιμοποιεί δεκαδική μορφή." -#: library/stdtypes.rst:4014 +#: library/stdtypes.rst:4266 msgid "``'c'``" msgstr "``'c'``" -#: library/stdtypes.rst:2794 +#: library/stdtypes.rst:3042 msgid "Single character (accepts integer or single character string)." msgstr "" "Μεμονωμένος χαρακτήρας (δέχεται ακέραιο ή μονό χαρακτήρα συμβολοσειράς)." -#: library/stdtypes.rst:4027 +#: library/stdtypes.rst:4279 msgid "``'r'``" msgstr "``'r'``" -#: library/stdtypes.rst:2797 +#: library/stdtypes.rst:3045 msgid "String (converts any Python object using :func:`repr`)." msgstr "" "Συμβολοσειρά (μετατρέπει οποιοδήποτε αντικείμενο Python χρησιμοποιώντας :" "func:`repr`)." -#: library/stdtypes.rst:4021 +#: library/stdtypes.rst:4273 msgid "``'s'``" msgstr "``'s'``" -#: library/stdtypes.rst:2800 +#: library/stdtypes.rst:3048 msgid "String (converts any Python object using :func:`str`)." msgstr "" "Συμβολοσειρά (μετατρέπει οποιοδήποτε αντικείμενο Python χρησιμοποιώντας :" "func:`str`)." -#: library/stdtypes.rst:4024 +#: library/stdtypes.rst:4276 msgid "``'a'``" msgstr "``'a'``" -#: library/stdtypes.rst:2803 +#: library/stdtypes.rst:3051 msgid "String (converts any Python object using :func:`ascii`)." msgstr "" "Συμβολοσειρά (μετατρέπει οποιοδήποτε αντικείμενο Python χρησιμοποιώντας :" "func:`ascii`)." -#: library/stdtypes.rst:4030 +#: library/stdtypes.rst:4282 msgid "``'%'``" msgstr "``'%'``" -#: library/stdtypes.rst:4030 +#: library/stdtypes.rst:4282 msgid "No argument is converted, results in a ``'%'`` character in the result." msgstr "" "Κανένα όρισμα δεν μετατρέπεται, έχει ως αποτέλεσμα έναν χαρακτήρα ``'%'`` το " "αποτέλεσμα." -#: library/stdtypes.rst:4037 +#: library/stdtypes.rst:3058 +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:4289 msgid "" "The alternate form causes a leading octal specifier (``'0o'``) to be " "inserted before the first digit." @@ -5250,7 +5627,7 @@ msgstr "" "Η εναλλακτική μορφή προκαλεί την εισαγωγή ενός πρώτου οκταδικού προσδιοριστή " "(``'0o'``) πριν από το πρώτο ψηφίο." -#: library/stdtypes.rst:4041 +#: library/stdtypes.rst:4293 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 " @@ -5260,7 +5637,7 @@ msgstr "" "(ανάλογα με το εάν χρησιμοποιήθηκε η μορφή ``'x'`` ή ``'X'``) πριν το πρώτο " "ψηφίο." -#: library/stdtypes.rst:4045 +#: library/stdtypes.rst:4297 msgid "" "The alternate form causes the result to always contain a decimal point, even " "if no digits follow it." @@ -5268,7 +5645,7 @@ msgstr "" "Η εναλλακτική μορφή κάνει το αποτέλεσμα να περιέχει πάντα μια υποδιαστολή, " "ακόμα κι αν δεν ακολουθούν ψηφία." -#: library/stdtypes.rst:4048 +#: library/stdtypes.rst:4300 msgid "" "The precision determines the number of digits after the decimal point and " "defaults to 6." @@ -5276,7 +5653,7 @@ msgstr "" "Η ακρίβεια καθορίζει τον αριθμό των ψηφίων μετά την υποδιαστολή και ορίζεται " "από προεπιλογή ως 6." -#: library/stdtypes.rst:4052 +#: library/stdtypes.rst:4304 msgid "" "The alternate form causes the result to always contain a decimal point, and " "trailing zeroes are not removed as they would otherwise be." @@ -5284,7 +5661,7 @@ msgstr "" "Η εναλλακτική μορφή κάνει το αποτέλεσμα να περιέχει πάντα μια υποδιαστολή " "και τα μηδενικά στο τέλος δεν αφαιρούνται όπως θα ήταν διαφορετικά." -#: library/stdtypes.rst:4055 +#: library/stdtypes.rst:4307 msgid "" "The precision determines the number of significant digits before and after " "the decimal point and defaults to 6." @@ -5292,15 +5669,15 @@ msgstr "" "Η ακρίβεια καθορίζει τον αριθμό των σημαντικών ψηφίων πριν και μετά την " "υποδιαστολή και ορίζει το 6." -#: library/stdtypes.rst:4059 +#: library/stdtypes.rst:4311 msgid "If precision is ``N``, the output is truncated to ``N`` characters." msgstr "Εάν η ακρίβεια είναι ``N``, η έξοδος περικόπτεται σε ``N`` χαρακτήρες." -#: library/stdtypes.rst:4068 +#: library/stdtypes.rst:4320 msgid "See :pep:`237`." msgstr "Βλέπε :pep:`237`." -#: library/stdtypes.rst:2840 +#: library/stdtypes.rst:3092 msgid "" "Since Python strings have an explicit length, ``%s`` conversions do not " "assume that ``'\\0'`` is the end of the string." @@ -5308,7 +5685,7 @@ msgstr "" "Δεδομένου ότι οι συμβολοσειρές Python έχουν ρητό μήκος, οι ``%s`` μετατροπές " "δεν υποθέτουν ότι το ``'\\0'`` είναι το τέλος της συμβολοσειράς." -#: library/stdtypes.rst:2845 +#: library/stdtypes.rst:3097 msgid "" "``%f`` conversions for numbers whose absolute value is over 1e50 are no " "longer replaced by ``%g`` conversions." @@ -5316,7 +5693,7 @@ msgstr "" "Οι μετατροπείς ``%f`` για αριθμούς των οποίων η απόλυτη τιμή είναι " "μεγαλύτερη από 1e50 δεν αντικαθίστανται πλέον από μετατροπές ``%g``." -#: library/stdtypes.rst:2856 +#: library/stdtypes.rst:3108 msgid "" "Binary Sequence Types --- :class:`bytes`, :class:`bytearray`, :class:" "`memoryview`" @@ -5324,7 +5701,7 @@ msgstr "" "Τύποι δυαδικής ακολουθίας --- :class:`bytes`, :class:`bytearray`, :class:" "`memoryview`" -#: library/stdtypes.rst:2864 +#: library/stdtypes.rst:3116 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 :" @@ -5337,7 +5714,7 @@ msgstr "" "` για την πρόσβαση στη μνήμη άλλων δυαδικών αντικειμένων " "χωρίς να χρειάζεται η δημιουργία αντιγράφου." -#: library/stdtypes.rst:2869 +#: library/stdtypes.rst:3121 msgid "" "The :mod:`array` module supports efficient storage of basic data types like " "32-bit integers and IEEE754 double-precision floating values." @@ -5346,11 +5723,11 @@ msgstr "" "δεδομένων όπως 32-bit ακέραιους και IEEE754 διπλής ακρίβειας κινητής " "υποδιαστολής τιμές." -#: library/stdtypes.rst:2875 +#: library/stdtypes.rst:3127 msgid "Bytes Objects" msgstr "Αντικείμενα Bytes" -#: library/stdtypes.rst:2879 +#: library/stdtypes.rst:3131 msgid "" "Bytes objects are immutable sequences of single bytes. Since many major " "binary protocols are based on the ASCII text encoding, bytes objects offer " @@ -5363,7 +5740,7 @@ msgstr "" "ισχύουν μόνο όταν εργάζονται με δεδομένα συμβατά με ASCII και σχετίζονται " "στενά με αντικείμενα συμβολοσειρών σε μια ποικιλία διαφόρων τρόπων." -#: library/stdtypes.rst:2887 +#: library/stdtypes.rst:3139 msgid "" "Firstly, the syntax for bytes literals is largely the same as that for " "string literals, except that a ``b`` prefix is added:" @@ -5372,25 +5749,25 @@ msgstr "" "για τα literals συμβολοσειρών, με τη διαφορά ότι προστίθεται ένα πρόθεμα " "``b``::" -#: library/stdtypes.rst:2890 +#: library/stdtypes.rst:3142 msgid "Single quotes: ``b'still allows embedded \"double\" quotes'``" msgstr "" "Μονά εισαγωγικά: ``b'ακόμα επιτρέπει ενσωματωμένα \"διπλά\" εισαγωγικά'``" -#: library/stdtypes.rst:2891 +#: library/stdtypes.rst:3143 msgid "Double quotes: ``b\"still allows embedded 'single' quotes\"``" msgstr "" "Διπλά εισαγωγικά: ``b\"εξακολουθεί να επιτρέπει ενσωματωμένα 'μονά' " "εισαγωγικά\"``" -#: library/stdtypes.rst:2892 +#: library/stdtypes.rst:3144 msgid "" "Triple quoted: ``b'''3 single quotes'''``, ``b\"\"\"3 double quotes\"\"\"``" msgstr "" "Τριπλά εισαγωγικά: ``b'''3 μονά εισαγωγικά'''``, ``b\"\"\"3 διπλά " "εισαγωγικά\"\"\"``" -#: library/stdtypes.rst:2894 +#: library/stdtypes.rst:3146 msgid "" "Only ASCII characters are permitted in bytes literals (regardless of the " "declared source code encoding). Any binary values over 127 must be entered " @@ -5401,7 +5778,7 @@ msgstr "" "127, πρέπει να εισαχθούν σε bytes literals χρησιμοποιώντας την κατάλληλη " "ακολουθία διαφυγής χαρακτήρων." -#: library/stdtypes.rst:2898 +#: library/stdtypes.rst:3150 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 " @@ -5413,7 +5790,7 @@ msgstr "" "πληροφορίες σχετικά με τις διάφορες μορφές bytes literal, " "συμπεριλαμβανομένων των υποστηριζόμενων ακολουθιών διαφυγής χαρακτήρων." -#: library/stdtypes.rst:2902 +#: library/stdtypes.rst:3154 msgid "" "While bytes literals and representations are based on ASCII text, bytes " "objects actually behave like immutable sequences of integers, with each " @@ -5436,7 +5813,7 @@ msgstr "" "εφαρμογή αλγορίθμων επεξεργασίας κειμένου σε δυαδικές μορφές δεδομένων που " "δεν είναι συμβατές με ASCII συνήθως οδηγεί σε καταστροφή δεδομένων)." -#: library/stdtypes.rst:2912 +#: library/stdtypes.rst:3164 msgid "" "In addition to the literal forms, bytes objects can be created in a number " "of other ways:" @@ -5444,25 +5821,25 @@ msgstr "" "Εκτός από τις literal μορφές, τα αντικείμενα bytes μπορούν να δημιουργηθούν " "με πολλούς άλλους τρόπους:" -#: library/stdtypes.rst:2915 +#: library/stdtypes.rst:3167 msgid "A zero-filled bytes object of a specified length: ``bytes(10)``" msgstr "Ένα μηδενικό αντικείμενο bytes με καθορισμένο μήκος: ``bytes(10)``" -#: library/stdtypes.rst:2916 +#: library/stdtypes.rst:3168 msgid "From an iterable of integers: ``bytes(range(20))``" msgstr "Από ένα iterable ακεραίων αριθμών: ``bytes(range(20))``" -#: library/stdtypes.rst:2917 +#: library/stdtypes.rst:3169 msgid "Copying existing binary data via the buffer protocol: ``bytes(obj)``" msgstr "" "Αντιγραφή υπαρχόντων δυαδικών δεδομένων μέσω του πρωτοκόλλου buffer: " "``bytes(obj)``" -#: library/stdtypes.rst:2919 +#: library/stdtypes.rst:3171 msgid "Also see the :ref:`bytes ` built-in." msgstr "Δείτε επίσης το ενσωματωμένο :ref:`bytes `." -#: library/stdtypes.rst:2921 +#: library/stdtypes.rst:3173 msgid "" "Since 2 hexadecimal digits correspond precisely to a single byte, " "hexadecimal numbers are a commonly used format for describing binary data. " @@ -5474,7 +5851,7 @@ msgstr "" "περιγραφή δυαδικών δεδομένων. Συνεπώς, ο τύπος bytes έχει μια πρόσθετη " "μέθοδο κλάσης για την ανάγνωση δεδομένων σε αυτήν την μορφή:" -#: library/stdtypes.rst:2927 +#: library/stdtypes.rst:3179 msgid "" "This :class:`bytes` class method returns a bytes object, decoding the given " "string object. The string must contain two hexadecimal digits per byte, " @@ -5485,7 +5862,7 @@ msgstr "" "πρέπει να περιέχει δύο δεκαεξαδικά ψηφία ανά byte, με το κενό διάστημα ASCII " "να αγνοείται." -#: library/stdtypes.rst:2934 +#: library/stdtypes.rst:3186 msgid "" ":meth:`bytes.fromhex` now skips all ASCII whitespace in the string, not just " "spaces." @@ -5493,7 +5870,7 @@ msgstr "" "Το :meth:`bytes.fromhex` παρακάμπτει πλέον όλα τα κενά ASCII στη " "συμβολοσειρά, όχι μόνο τα κενά." -#: library/stdtypes.rst:2938 +#: library/stdtypes.rst:3190 msgid "" "A reverse conversion function exists to transform a bytes object into its " "hexadecimal representation." @@ -5501,7 +5878,7 @@ msgstr "" "Υπάρχει μια συνάρτηση αντίστροφης μετατροπής για τη μετατροπή ενός " "αντικειμένου bytes στην δεκαεξαδική του αναπαράσταση." -#: library/stdtypes.rst:3031 +#: library/stdtypes.rst:3283 msgid "" "Return a string object containing two hexadecimal digits for each byte in " "the instance." @@ -5509,7 +5886,7 @@ msgstr "" "Επιστρέφετε ένα αντικείμενο συμβολοσειράς που περιέχει δύο δεκαεξαδικά ψηφία " "για κάθε byte στο στιγμιότυπο." -#: library/stdtypes.rst:2950 +#: library/stdtypes.rst:3202 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, " @@ -5524,7 +5901,7 @@ msgstr "" "*bytes_per_sep* ελέγχει τα διαστήματα. Οι θετικές τιμές υπολογίζουν τη θέση " "του διαχωριστή από τα δεξιά, οι αρνητικές τιμές από τα αριστερά." -#: library/stdtypes.rst:2967 +#: library/stdtypes.rst:3219 msgid "" ":meth:`bytes.hex` now supports optional *sep* and *bytes_per_sep* parameters " "to insert separators between bytes in the hex output." @@ -5533,7 +5910,7 @@ msgstr "" "*bytes_per_sep* για την εισαγωγή διαχωριστικών μεταξύ των byte στην έξοδο " "δεκαεξαδικού." -#: library/stdtypes.rst:2971 +#: library/stdtypes.rst:3223 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 " @@ -5547,7 +5924,7 @@ msgstr "" "η λειτουργία πρόσβασης ως ευρετήριο όσο και η λειτουργία τμηματοποίησης θα " "παράγουν μια συμβολοσειρά μήκους 1)" -#: library/stdtypes.rst:2976 +#: library/stdtypes.rst:3228 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 " @@ -5558,11 +5935,11 @@ msgstr "" "46])``. Μπορείτε πάντα να μετατρέψετε ένα αντικείμενο bytes σε μια λίστα " "ακέραιων αριθμών που χρησιμοποιούν ``list(b)``." -#: library/stdtypes.rst:2984 +#: library/stdtypes.rst:3236 msgid "Bytearray Objects" msgstr "Αντικείμενα Bytearray" -#: library/stdtypes.rst:2988 +#: library/stdtypes.rst:3240 msgid "" ":class:`bytearray` objects are a mutable counterpart to :class:`bytes` " "objects." @@ -5570,7 +5947,7 @@ msgstr "" "Τα αντικείμενα :class:`bytearray` είναι ένα μεταβλητό, αντίστοιχο, των " "αντικειμένων :class:`bytes`." -#: library/stdtypes.rst:2994 +#: library/stdtypes.rst:3246 msgid "" "There is no dedicated literal syntax for bytearray objects, instead they are " "always created by calling the constructor:" @@ -5578,26 +5955,26 @@ msgstr "" "Δεν υπάρχει αποκλειστική literal σύνταξη για αντικείμενα bytearray, αντίθετα " "δημιουργούνται πάντα καλώντας τον constructor:" -#: library/stdtypes.rst:2997 +#: library/stdtypes.rst:3249 msgid "Creating an empty instance: ``bytearray()``" msgstr "Δημιουργία ενός κενού στιγμιοτύπου: ``bytearray()``" -#: library/stdtypes.rst:2998 +#: library/stdtypes.rst:3250 msgid "Creating a zero-filled instance with a given length: ``bytearray(10)``" msgstr "Δημιουργία μηδενικού στιγμιοτύπου με δεδομένο μήκος: ``bytearray(10)``" -#: library/stdtypes.rst:2999 +#: library/stdtypes.rst:3251 msgid "From an iterable of integers: ``bytearray(range(20))``" msgstr "Από έναν iterable αριθμό ακεραίων: ``bytearray(range(20))``" -#: library/stdtypes.rst:3000 +#: library/stdtypes.rst:3252 msgid "" "Copying existing binary data via the buffer protocol: ``bytearray(b'Hi!')``" msgstr "" "Αντιγραφή υπαρχόντων δυαδικών δεδομένων μέσω του πρωτοκόλλου buffer: " "``bytearray(b'Hi!')``" -#: library/stdtypes.rst:3002 +#: library/stdtypes.rst:3254 msgid "" "As bytearray objects are mutable, they support the :ref:`mutable ` sequence operations in addition to the common bytes and bytearray " @@ -5608,11 +5985,11 @@ msgstr "" "κοινών λειτουργιών bytes και bytearray που περιγράφονται στο :ref:`bytes-" "methods`." -#: library/stdtypes.rst:3006 +#: library/stdtypes.rst:3258 msgid "Also see the :ref:`bytearray ` built-in." msgstr "Δείτε επίσης το ενσωματωμένο :ref:`bytearray `." -#: library/stdtypes.rst:3008 +#: library/stdtypes.rst:3260 msgid "" "Since 2 hexadecimal digits correspond precisely to a single byte, " "hexadecimal numbers are a commonly used format for describing binary data. " @@ -5624,7 +6001,7 @@ msgstr "" "δυαδικών δεδομένων. Συνεπώς, ο τύπος bytearray έχει μια πρόσθετη μέθοδο " "κλάσης για την ανάγνωση δεδομένων σε αυτήν την μορφή:" -#: library/stdtypes.rst:3014 +#: library/stdtypes.rst:3266 msgid "" "This :class:`bytearray` class method returns bytearray object, decoding the " "given string object. The string must contain two hexadecimal digits per " @@ -5635,7 +6012,7 @@ msgstr "" "πρέπει να περιέχει δύο δεκαεξαδικά ψηφία ανά byte, με το κενό διάστημα ASCII " "να αγνοείται." -#: library/stdtypes.rst:3021 +#: library/stdtypes.rst:3273 msgid "" ":meth:`bytearray.fromhex` now skips all ASCII whitespace in the string, not " "just spaces." @@ -5643,7 +6020,7 @@ msgstr "" "Το :meth:`bytearray.fromhex` παρακάμπτει τώρα όλα τα κενά ASCII στη " "συμβολοσειρά, όχι μόνο τα κενά." -#: library/stdtypes.rst:3025 +#: library/stdtypes.rst:3277 msgid "" "A reverse conversion function exists to transform a bytearray object into " "its hexadecimal representation." @@ -5651,7 +6028,7 @@ msgstr "" "Υπάρχει μια συνάρτηση αντίστροφης μετατροπής για να μετατρέψει ένα " "αντικείμενο bytearray στη δεκαεξαδική αναπαράσταση του." -#: library/stdtypes.rst:3039 +#: library/stdtypes.rst:3291 msgid "" "Similar to :meth:`bytes.hex`, :meth:`bytearray.hex` now supports optional " "*sep* and *bytes_per_sep* parameters to insert separators between bytes in " @@ -5661,7 +6038,7 @@ msgstr "" "προαιρετικές παραμέτρους *sep* και *bytes_per_sep* για την εισαγωγή " "διαχωριστικών μεταξύ των byte στην δεκαεξαδική έξοδο." -#: library/stdtypes.rst:3044 +#: library/stdtypes.rst:3296 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 " @@ -5675,7 +6052,7 @@ msgstr "" "κειμένου, όπου τόσο το indexing και το slicing θα παράγουν μια συμβολοσειρά " "μήκους 1)" -#: library/stdtypes.rst:3049 +#: library/stdtypes.rst:3301 msgid "" "The representation of bytearray objects uses the bytes literal format " "(``bytearray(b'...')``) since it is often more useful than e.g. " @@ -5687,11 +6064,11 @@ msgstr "" "``bytearray([46, 46, 46])``. Μπορείτε πάντα να μετατρέψετε ένα αντικείμενο " "bytearray σε λίστα ακεραίων χρησιμοποιώντας το ``list(b)``." -#: library/stdtypes.rst:3058 +#: library/stdtypes.rst:3310 msgid "Bytes and Bytearray Operations" msgstr "Λειτουργίες Bytes και Bytearray" -#: library/stdtypes.rst:3063 +#: library/stdtypes.rst:3315 msgid "" "Both bytes and bytearray objects support the :ref:`common ` " "sequence operations. They interoperate not just with operands of the same " @@ -5706,7 +6083,7 @@ msgstr "" "ελεύθερα σε λειτουργίες χωρίς να προκαλούνται σφάλματα. Ωστόσο, ο τύπος " "επιστροφής του αποτελέσματος μπορεί να εξαρτάται από τη σειρά των τελεστών." -#: library/stdtypes.rst:3071 +#: library/stdtypes.rst:3323 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 " @@ -5716,7 +6093,7 @@ msgstr "" "ως ορίσματά τους, όπως και οι μέθοδοι σε συμβολοσειρές δεν δέχονται bytes ως " "ορίσματα. Για παράδειγμα, πρέπει να γράψετε::" -#: library/stdtypes.rst:3075 +#: library/stdtypes.rst:3327 msgid "" "a = \"abc\"\n" "b = a.replace(\"a\", \"f\")" @@ -5724,11 +6101,11 @@ msgstr "" "a = \"abc\"\n" "b = a.replace(\"a\", \"f\")" -#: library/stdtypes.rst:3078 +#: library/stdtypes.rst:3330 msgid "and::" msgstr "και::" -#: library/stdtypes.rst:3080 +#: library/stdtypes.rst:3332 msgid "" "a = b\"abc\"\n" "b = a.replace(b\"a\", b\"f\")" @@ -5736,7 +6113,7 @@ msgstr "" "a = b\"abc\"\n" "b = a.replace(b\"a\", b\"f\")" -#: library/stdtypes.rst:3083 +#: library/stdtypes.rst:3335 msgid "" "Some bytes and bytearray operations assume the use of ASCII compatible " "binary formats, and hence should be avoided when working with arbitrary " @@ -5747,7 +6124,7 @@ msgstr "" "εργάζεστε με αυθαίρετα δυαδικά δεδομένα. Αυτοί οι περιορισμοί καλύπτονται " "παρακάτω." -#: library/stdtypes.rst:3088 +#: library/stdtypes.rst:3340 msgid "" "Using these ASCII based operations to manipulate binary data that is not " "stored in an ASCII based format may lead to data corruption." @@ -5756,7 +6133,7 @@ msgstr "" "δεδομένων που δεν είναι αποθηκευμένα σε μορφή που βασίζεται σε ASCII μπορεί " "να οδηγήσει σε καταστροφή δεδομένων." -#: library/stdtypes.rst:3091 +#: library/stdtypes.rst:3343 msgid "" "The following methods on bytes and bytearray objects can be used with " "arbitrary binary data." @@ -5764,7 +6141,7 @@ msgstr "" "Οι ακόλουθες μέθοδοι σε byte και αντικείμενα bytearray μπορούν να " "χρησιμοποιηθούν με αυθαίρετα δυαδικά δεδομένα." -#: library/stdtypes.rst:3097 +#: library/stdtypes.rst:3349 msgid "" "Return the number of non-overlapping occurrences of subsequence *sub* in the " "range [*start*, *end*]. Optional arguments *start* and *end* are " @@ -5774,8 +6151,8 @@ msgstr "" "ακολουθίας *sub* στο εύρος [*start*, *end*]. Τα προαιρετικά ορίσματα *start* " "και *end* ερμηνεύονται όπως στη σημειογραφία τμηματοποίησης." -#: library/stdtypes.rst:3206 library/stdtypes.rst:3294 -#: library/stdtypes.rst:3307 +#: library/stdtypes.rst:3458 library/stdtypes.rst:3546 +#: library/stdtypes.rst:3559 msgid "" "The subsequence to search for may be any :term:`bytes-like object` or an " "integer in the range 0 to 255." @@ -5783,7 +6160,7 @@ msgstr "" "Η υποακολουθία για αναζήτηση μπορεί να είναι οποιοδήποτε :term:`bytes-like " "object` ή ένας ακέραιος αριθμός στην περιοχή από 0 έως 255." -#: library/stdtypes.rst:3104 +#: library/stdtypes.rst:3356 msgid "" "If *sub* is empty, returns the number of empty slices between characters " "which is the length of the bytes object plus one." @@ -5791,13 +6168,13 @@ msgstr "" "Εάν το *sub* είναι κενό, επιστρέφει τον αριθμό των κενών τμημάτων μεταξύ των " "χαρακτήρων που είναι το μήκος του αντικειμένου bytes συν ένα." -#: library/stdtypes.rst:3218 library/stdtypes.rst:3297 -#: library/stdtypes.rst:3310 +#: library/stdtypes.rst:3470 library/stdtypes.rst:3549 +#: library/stdtypes.rst:3562 msgid "Also accept an integer in the range 0 to 255 as the subsequence." msgstr "" "Επίσης αποδέχεται έναν ακέραιο αριθμό στο εύρος 0 έως 255 ως υποακολουθία." -#: library/stdtypes.rst:3114 +#: library/stdtypes.rst:3366 msgid "" "If the binary data starts with the *prefix* string, return " "``bytes[len(prefix):]``. Otherwise, return a copy of the original binary " @@ -5807,7 +6184,7 @@ msgstr "" "``bytes[len(prefix):]``. Διαφορετικά επιστρέψτε ένα αντίγραφο των αρχικών " "δυαδικών δεδομένων::" -#: library/stdtypes.rst:3118 +#: library/stdtypes.rst:3370 msgid "" ">>> b'TestHook'.removeprefix(b'Test')\n" "b'Hook'\n" @@ -5819,15 +6196,15 @@ msgstr "" ">>> b'BaseTestCase'.removeprefix(b'Test')\n" "b'BaseTestCase'" -#: library/stdtypes.rst:3123 +#: library/stdtypes.rst:3375 msgid "The *prefix* may be any :term:`bytes-like object`." msgstr "Το *prefix* μπορεί να είναι οποιοδήποτε :term:`bytes-like object`." -#: library/stdtypes.rst:3149 library/stdtypes.rst:3375 -#: library/stdtypes.rst:3419 library/stdtypes.rst:3474 -#: library/stdtypes.rst:3562 library/stdtypes.rst:3729 -#: library/stdtypes.rst:3827 library/stdtypes.rst:3870 -#: library/stdtypes.rst:4072 +#: library/stdtypes.rst:3401 library/stdtypes.rst:3627 +#: library/stdtypes.rst:3671 library/stdtypes.rst:3726 +#: library/stdtypes.rst:3814 library/stdtypes.rst:3981 +#: library/stdtypes.rst:4079 library/stdtypes.rst:4122 +#: library/stdtypes.rst:4324 msgid "" "The bytearray version of this method does *not* operate in place - it always " "produces a new object, even if no changes were made." @@ -5835,7 +6212,7 @@ msgstr "" "Η έκδοση bytearray αυτής της μεθόδου *δεν* λειτουργεί στη θέση της - παράγει " "πάντα ένα νέο αντικείμενο, ακόμα και αν δεν έγιναν αλλαγές." -#: library/stdtypes.rst:3136 +#: library/stdtypes.rst:3388 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 " @@ -5845,7 +6222,7 @@ msgstr "" "*suffix* δεν είναι κενό, επιστρέφει ``bytes[:-len(suffix)]``. Διαφορετικά, " "επιστρέφει ένα αντίγραφο των αρχικών δυαδικών δεδομένων::" -#: library/stdtypes.rst:3140 +#: library/stdtypes.rst:3392 msgid "" ">>> b'MiscTests'.removesuffix(b'Tests')\n" "b'Misc'\n" @@ -5857,15 +6234,15 @@ msgstr "" ">>> b'TmpDirMixin'.removesuffix(b'Tests')\n" "b'TmpDirMixin'" -#: library/stdtypes.rst:3145 +#: library/stdtypes.rst:3397 msgid "The *suffix* may be any :term:`bytes-like object`." msgstr "Το *suffix* μπορεί να είναι οποιοδήποτε :term:`bytes-like object`." -#: library/stdtypes.rst:3158 +#: library/stdtypes.rst:3410 msgid "Return the bytes decoded to a :class:`str`." msgstr "Επιστρέφει τα bytes που έχουν αποκωδικοποιηθεί σε μια :class:`str`." -#: library/stdtypes.rst:3163 +#: library/stdtypes.rst:3415 msgid "" "*errors* controls how decoding errors are handled. If ``'strict'`` (the " "default), a :exc:`UnicodeError` exception is raised. Other possible values " @@ -5878,7 +6255,7 @@ msgstr "" "άλλο όνομα που έχει καταχωρηθεί από την :func:`codecs.register_error`. " "Βλέπε :ref:`error-handlers` για λεπτομέρειες." -#: library/stdtypes.rst:3169 +#: library/stdtypes.rst:3421 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:" @@ -5889,7 +6266,7 @@ msgstr "" "ενεργοποιημένο το :ref:`devmode` ή χρησιμοποιείται ένα :ref:`debug build " "`." -#: library/stdtypes.rst:3175 +#: library/stdtypes.rst:3427 msgid "" "Passing the *encoding* argument to :class:`str` allows decoding any :term:" "`bytes-like object` directly, without needing to make a temporary :class:`!" @@ -5900,7 +6277,7 @@ msgstr "" "χρειάζεται να δημιουργήσετε ένα προσωρινό αντικείμενο :class:`!bytes` ή :" "class:`!bytearray`." -#: library/stdtypes.rst:3190 +#: library/stdtypes.rst:3442 msgid "" "Return ``True`` if the binary data ends with the specified *suffix*, " "otherwise return ``False``. *suffix* can also be a tuple of suffixes to " @@ -5913,13 +6290,13 @@ msgstr "" "προαιρετικό *start*, η δοκιμή ξεκινά από αυτή τη θέση. Με το προαιρετικό " "*end*, σταματήστε να συγκρίνετε σε αυτή τη θέση." -#: library/stdtypes.rst:3195 +#: library/stdtypes.rst:3447 msgid "The suffix(es) to search for may be any :term:`bytes-like object`." msgstr "" "Το(α) επίθεμα(τα) για αναζήτηση μπορεί να είναι οποιοδήποτε :term:`bytes-" "like object`." -#: library/stdtypes.rst:3201 +#: library/stdtypes.rst:3453 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 " @@ -5931,7 +6308,7 @@ msgstr "" "προαιρετικά ορίσματα *start* και *end* ερμηνεύονται ως συμβολισμό " "τμηματοποίησης. Επιστρέφει ``-1`` εάν το *sub* δεν βρεθεί." -#: library/stdtypes.rst:3211 +#: library/stdtypes.rst:3463 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 :" @@ -5941,7 +6318,7 @@ msgstr "" "χρειάζεται να γνωρίζετε τη θέση του *sub*. Για να ελέγξετε εάν το *sub* " "είναι υποσυμβολοσειρά ή όχι, χρησιμοποιήστε τον τελεστή :keyword:`in`::" -#: library/stdtypes.rst:3215 +#: library/stdtypes.rst:3467 msgid "" ">>> b'Py' in b'Python'\n" "True" @@ -5949,7 +6326,7 @@ msgstr "" ">>> b'Py' in b'Python'\n" "True" -#: library/stdtypes.rst:3225 +#: library/stdtypes.rst:3477 msgid "" "Like :meth:`~bytes.find`, but raise :exc:`ValueError` when the subsequence " "is not found." @@ -5957,7 +6334,7 @@ msgstr "" "Όπως η :meth:`~bytes.find`, αλλά κάνει raise μια :exc:`ValueError` όταν δεν " "βρεθεί η δευτερεύουσα ακολουθία." -#: library/stdtypes.rst:3238 +#: library/stdtypes.rst:3490 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 " @@ -5973,7 +6350,7 @@ msgstr "" "`str`. Το διαχωριστικό μεταξύ των στοιχειών είναι τα περιεχόμενα των byte ή " "του αντικειμένου bytearray που παρέχει αυτή τη μέθοδο." -#: library/stdtypes.rst:3249 +#: library/stdtypes.rst:3501 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 " @@ -5986,7 +6363,7 @@ msgstr "" "*to* πρέπει να είναι και τα δύο :term:`bytes-like objects ` και να έχουν το ίδιο μήκος." -#: library/stdtypes.rst:3260 +#: library/stdtypes.rst:3512 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 " @@ -6000,13 +6377,13 @@ msgstr "" "διαχωριστικό, επιστρέφει μια 3-πλειάδα που περιέχει ένα αντίγραφο της " "αρχικής ακολουθίας, ακολουθούμενη από δύο κενά byte ή αντικείμενα bytearray." -#: library/stdtypes.rst:3324 +#: library/stdtypes.rst:3576 msgid "The separator to search for may be any :term:`bytes-like object`." msgstr "" "Το διαχωριστικό για αναζήτηση μπορεί να είναι οποιοδήποτε :term:`bytes-like " "object`." -#: library/stdtypes.rst:3273 +#: library/stdtypes.rst:3525 msgid "" "Return a copy of the sequence with all occurrences of subsequence *old* " "replaced by *new*. If the optional argument *count* is given, only the " @@ -6017,7 +6394,7 @@ msgstr "" "προαιρετικό όρισμα *count*, αντικαθίστανται μόνο οι πρώτες εμφανίσεις " "*count*." -#: library/stdtypes.rst:3277 +#: library/stdtypes.rst:3529 msgid "" "The subsequence to search for and its replacement may be any :term:`bytes-" "like object`." @@ -6025,7 +6402,7 @@ msgstr "" "Η ακολουθία για αναζήτηση και αντικατάσταση της μπορεί να είναι οποιοδήποτε :" "term:`bytes-like object`." -#: library/stdtypes.rst:3289 +#: library/stdtypes.rst:3541 msgid "" "Return the highest index in the sequence where the subsequence *sub* is " "found, such that *sub* is contained within ``s[start:end]``. Optional " @@ -6037,7 +6414,7 @@ msgstr "" "προαιρετικά ορίσματα *start* και *end* ερμηνεύονται με συμβολισμό " "τμηματοποίησης. Επιστρέφει ``-1`` σε περίπτωση αποτυχίας." -#: library/stdtypes.rst:3304 +#: library/stdtypes.rst:3556 msgid "" "Like :meth:`~bytes.rfind` but raises :exc:`ValueError` when the subsequence " "*sub* is not found." @@ -6045,7 +6422,7 @@ msgstr "" "Όπως η :meth:`~bytes.rfind` αλλά κάνει raise μια :exc:`ValueError` όταν δεν " "βρεθεί η υποακολουθία *sub*." -#: library/stdtypes.rst:3317 +#: library/stdtypes.rst:3569 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 " @@ -6060,7 +6437,7 @@ msgstr "" "κενά byte ή αντικείμενα bytearray, ακολουθούμενα από ένα αντίγραφο της " "αρχικής ακολουθίας." -#: library/stdtypes.rst:3330 +#: library/stdtypes.rst:3582 msgid "" "Return ``True`` if the binary data starts with the specified *prefix*, " "otherwise return ``False``. *prefix* can also be a tuple of prefixes to " @@ -6073,13 +6450,13 @@ msgstr "" "η δοκιμή ξεκινά από αυτή τη θέση. Με το προαιρετικό *end*, σταματάει να " "συγκρίνει σε αυτή τη θέση." -#: library/stdtypes.rst:3335 +#: library/stdtypes.rst:3587 msgid "The prefix(es) to search for may be any :term:`bytes-like object`." msgstr "" "Το(α) πρόθεμα(τα) για αναζήτηση μπορεί να είναι οποιοδήποτε :term:`bytes-" "like object`." -#: library/stdtypes.rst:3341 +#: library/stdtypes.rst:3593 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 " @@ -6091,14 +6468,14 @@ msgstr "" "τα υπόλοιπα byte έχουν αντιστοιχιστεί μέσω του δεδομένου πίνακα μετάφρασης, " "ο οποίος πρέπει να είναι ένα αντικείμενο bytes μήκους 256." -#: library/stdtypes.rst:3346 +#: library/stdtypes.rst:3598 msgid "" "You can use the :func:`bytes.maketrans` method to create a translation table." msgstr "" "Μπορείτε να χρησιμοποιήσετε τη μέθοδο :func:`bytes.maketrans` για να " "δημιουργήσετε έναν πίνακα μετάφρασης." -#: library/stdtypes.rst:3349 +#: library/stdtypes.rst:3601 msgid "" "Set the *table* argument to ``None`` for translations that only delete " "characters::" @@ -6106,7 +6483,7 @@ msgstr "" "Ορίζει το όρισμα *table* σε ``None`` για μεταφράσεις που διαγράφουν μόνο " "χαρακτήρες::" -#: library/stdtypes.rst:3352 +#: library/stdtypes.rst:3604 msgid "" ">>> b'read this short text'.translate(None, b'aeiou')\n" "b'rd ths shrt txt'" @@ -6114,11 +6491,11 @@ msgstr "" ">>> b'read this short text'.translate(None, b'aeiou')\n" "b'rd ths shrt txt'" -#: library/stdtypes.rst:3355 +#: library/stdtypes.rst:3607 msgid "*delete* is now supported as a keyword argument." msgstr "Το *delete* υποστηρίζεται πλέον ως όρισμα λέξης-κλειδιού." -#: library/stdtypes.rst:3359 +#: library/stdtypes.rst:3611 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 " @@ -6132,7 +6509,7 @@ msgstr "" "κατάλληλα ορίσματα. Σημειώστε ότι όλες οι μέθοδοι bytearray σε αυτήν την " "ενότητα *δεν* λειτουργούν στη θέση τους και όμως παράγουν νέα αντικείμενα." -#: library/stdtypes.rst:3368 +#: library/stdtypes.rst:3620 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). " @@ -6145,7 +6522,7 @@ msgstr "" "`bytes, η αρχική ακολουθία επιστρέφεται εάν το *width* είναι μικρότερο ή ίσο " "με ``len(s)``." -#: library/stdtypes.rst:3382 +#: library/stdtypes.rst:3634 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). " @@ -6158,7 +6535,7 @@ msgstr "" "αντικείμενα :class:`bytes, η αρχική ακολουθία επιστρέφεται εάν το *width* " "είναι μικρότερο ή ίσο με ``len(s)``." -#: library/stdtypes.rst:3396 +#: library/stdtypes.rst:3648 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 " @@ -6173,7 +6550,7 @@ msgstr "" "διαστήματος. Το όρισμα *bytes* δεν είναι πρόθεμα∙ αντίθετα, όλοι συνδυασμοί " "των τιμών του αφαιρούνται::" -#: library/stdtypes.rst:3402 +#: library/stdtypes.rst:3654 msgid "" ">>> b' spacious '.lstrip()\n" "b'spacious '\n" @@ -6185,7 +6562,7 @@ msgstr "" ">>> b'www.example.com'.lstrip(b'cmowz.')\n" "b'example.com'" -#: library/stdtypes.rst:3407 +#: library/stdtypes.rst:3659 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 " @@ -6196,7 +6573,7 @@ msgstr "" "που θα αφαιρέσει μια μεμονωμένη συμβολοσειρά προθέματος αντί όλο το σύνολο " "χαρακτήρων. Για παράδειγμα::" -#: library/stdtypes.rst:3412 +#: library/stdtypes.rst:3664 msgid "" ">>> b'Arthur: three!'.lstrip(b'Arthur: ')\n" "b'ee!'\n" @@ -6208,7 +6585,7 @@ msgstr "" ">>> b'Arthur: three!'.removeprefix(b'Arthur: ')\n" "b'three!'" -#: library/stdtypes.rst:3426 +#: library/stdtypes.rst:3678 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). " @@ -6221,7 +6598,7 @@ msgstr "" "είναι ένα διάστημα ASCII). Για αντικείμενα :class:`bytes`, η αρχική " "ακολουθία επιστρέφεται εάν το *width* είναι μικρότερο ή ίσο με ``len(s)``." -#: library/stdtypes.rst:3440 +#: library/stdtypes.rst:3692 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 " @@ -6238,7 +6615,7 @@ msgstr "" "διαχωρισμό από τα δεξιά, η :meth:`rsplit` συμπεριφέρεται όπως :meth:`split` " "που περιγράφεται λεπτομερώς παρακάτω." -#: library/stdtypes.rst:3451 +#: library/stdtypes.rst:3703 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 " @@ -6253,7 +6630,7 @@ msgstr "" "κενού διαστήματος ASCII. Το όρισμα *bytes* δεν είναι επίθημα, αλλά " "αφαιρούνται όλοι οι συνδυασμοί των τιμών του::" -#: library/stdtypes.rst:3457 +#: library/stdtypes.rst:3709 msgid "" ">>> b' spacious '.rstrip()\n" "b' spacious'\n" @@ -6265,7 +6642,7 @@ msgstr "" ">>> b'mississippi'.rstrip(b'ipz')\n" "b'mississ'" -#: library/stdtypes.rst:3462 +#: library/stdtypes.rst:3714 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 " @@ -6276,7 +6653,7 @@ msgstr "" "μέθοδο που θα αφαιρέσει μια συμβολοσειρά επιθέματος και όχι όλο το σύνολο " "χαρακτήρων. Για παράδειγμα:" -#: library/stdtypes.rst:3467 +#: library/stdtypes.rst:3719 msgid "" ">>> b'Monty Python'.rstrip(b' Python')\n" "b'M'\n" @@ -6288,7 +6665,7 @@ msgstr "" ">>> b'Monty Python'.removesuffix(b' Python')\n" "b'Monty'" -#: library/stdtypes.rst:3481 +#: library/stdtypes.rst:3733 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 " @@ -6303,7 +6680,7 @@ msgstr "" "ή είναι ``-1``, τότε δεν υπάρχει όριο στον αριθμό των διαχωρισμών (όλες οι " "πιθανές διασπάσεις γίνονται)." -#: library/stdtypes.rst:3487 +#: library/stdtypes.rst:3739 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',')`` " @@ -6321,7 +6698,7 @@ msgstr "" "το ``[bytearray(b'')]`` ανάλογα με τον τύπο του αντικειμένου που χωρίζεται. " "Το όρισμα *sep* μπορεί να είναι οποιοδήποτε :term:`bytes-like object`." -#: library/stdtypes.rst:3497 +#: library/stdtypes.rst:3749 msgid "" ">>> b'1,2,3'.split(b',')\n" "[b'1', b'2', b'3']\n" @@ -6341,7 +6718,7 @@ msgstr "" ">>> b'1<>2<>3<4'.split(b'<>')\n" "[b'1', b'2', b'3<4']" -#: library/stdtypes.rst:3506 +#: library/stdtypes.rst:3758 msgid "" "If *sep* is not specified or is ``None``, a different splitting algorithm is " "applied: runs of consecutive ASCII whitespace are regarded as a single " @@ -6358,7 +6735,7 @@ msgstr "" "ακολουθίας ή μιας ακολουθίας που αποτελείται αποκλειστικά από κενό διάστημα " "ASCII χωρίς καθορισμένο διαχωριστικό επιστρέφει το ``[]``." -#: library/stdtypes.rst:3516 +#: library/stdtypes.rst:3768 msgid "" ">>> b'1 2 3'.split()\n" "[b'1', b'2', b'3']\n" @@ -6374,7 +6751,7 @@ msgstr "" ">>> b' 1 2 3 '.split()\n" "[b'1', b'2', b'3']" -#: library/stdtypes.rst:3527 +#: library/stdtypes.rst:3779 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 " @@ -6389,7 +6766,7 @@ msgstr "" "το ASCII λευκό διάστημα. To όρισμα *bytes* δεν είναι πρόθεμα ή επίθημα, αλλά " "αφαιρούνται όλοι οι συνδυασμοί των τιμών του::" -#: library/stdtypes.rst:3534 +#: library/stdtypes.rst:3786 msgid "" ">>> b' spacious '.strip()\n" "b'spacious'\n" @@ -6401,7 +6778,7 @@ msgstr "" ">>> b'www.example.com'.strip(b'cmowz.')\n" "b'example'" -#: library/stdtypes.rst:3539 +#: library/stdtypes.rst:3791 msgid "" "The binary sequence of byte values to remove may be any :term:`bytes-like " "object`." @@ -6409,7 +6786,7 @@ msgstr "" "Η δυαδική ακολουθία τιμών byte προς αφαίρεση μπορεί να είναι οποιοδήποτε :" "term:`bytes-like object`." -#: library/stdtypes.rst:3548 +#: library/stdtypes.rst:3800 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 " @@ -6422,7 +6799,7 @@ msgstr "" "την ενότητα *δεν* λειτουργούν στη θέση τους και αντ' αυτού παράγουν νέα " "αντικείμενα." -#: library/stdtypes.rst:3556 +#: library/stdtypes.rst:3808 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 " @@ -6432,7 +6809,7 @@ msgstr "" "χαρακτήρας ASCII, και το πρώτο byte γραμμένο με κεφαλαία και το υπόλοιπο με " "πεζά. Οι τιμές των byte που δεν είναι ASCII μεταβιβάζονται αμετάβλητες." -#: library/stdtypes.rst:3569 +#: library/stdtypes.rst:3821 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 " @@ -6461,7 +6838,7 @@ msgstr "" "αντιγράφεται αμετάβλητη και η τρέχουσα στήλη προσαυξάνεται κατά ένα, " "ανεξάρτητα από το πώς αναπαρίσταται η τιμή byte όταν εκτυπώνεται::" -#: library/stdtypes.rst:3583 +#: library/stdtypes.rst:3835 msgid "" ">>> b'01\\t012\\t0123\\t01234'.expandtabs()\n" "b'01 012 0123 01234'\n" @@ -6473,7 +6850,7 @@ msgstr "" ">>> b'01\\t012\\t0123\\t01234'.expandtabs(4)\n" "b'01 012 0123 01234'" -#: library/stdtypes.rst:3597 +#: library/stdtypes.rst:3849 msgid "" "Return ``True`` if all bytes in the sequence are alphabetical ASCII " "characters or ASCII decimal digits and the sequence is not empty, ``False`` " @@ -6488,7 +6865,7 @@ msgstr "" "``b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'``. Τα δεκαδικά " "ψηφία ASCII είναι αυτές οι τιμές byte στην ακολουθία ``b'0123456789'``." -#: library/stdtypes.rst:3605 +#: library/stdtypes.rst:3857 msgid "" ">>> b'ABCabc1'.isalnum()\n" "True\n" @@ -6500,7 +6877,7 @@ msgstr "" ">>> b'ABC abc1'.isalnum()\n" "False" -#: library/stdtypes.rst:3614 +#: library/stdtypes.rst:3866 msgid "" "Return ``True`` if all bytes in the sequence are alphabetic ASCII characters " "and the sequence is not empty, ``False`` otherwise. Alphabetic ASCII " @@ -6512,7 +6889,7 @@ msgstr "" "αλφαβητικοί χαρακτήρες ASCII είναι εκείνες οι τιμές bytes στην ακολουθία " "``b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'``." -#: library/stdtypes.rst:3621 +#: library/stdtypes.rst:3873 msgid "" ">>> b'ABCabc'.isalpha()\n" "True\n" @@ -6524,7 +6901,7 @@ msgstr "" ">>> b'ABCabc1'.isalpha()\n" "False" -#: library/stdtypes.rst:3630 +#: library/stdtypes.rst:3882 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." @@ -6533,7 +6910,7 @@ msgstr "" "είναι ASCII, ``False`` διαφορετικά. Τα bytes ASCII βρίσκονται στο εύρος " "0-0x7F." -#: library/stdtypes.rst:3640 +#: library/stdtypes.rst:3892 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 " @@ -6543,7 +6920,7 @@ msgstr "" "ASCII και η ακολουθία δεν είναι κενή, ``False`` διαφορετικά. Τα δεκαδικά " "ψηφία ASCII είναι αυτές οι τιμές byte στην ακολουθία ``b'0123456789'``." -#: library/stdtypes.rst:3646 +#: library/stdtypes.rst:3898 msgid "" ">>> b'1234'.isdigit()\n" "True\n" @@ -6555,7 +6932,7 @@ msgstr "" ">>> b'1.23'.isdigit()\n" "False" -#: library/stdtypes.rst:3655 +#: library/stdtypes.rst:3907 msgid "" "Return ``True`` if there is at least one lowercase ASCII character in the " "sequence and no uppercase ASCII characters, ``False`` otherwise." @@ -6563,7 +6940,7 @@ msgstr "" "Επιστρέφει ``True`` εάν υπάρχει τουλάχιστον ένας πεζός χαρακτήρας ASCII στην " "ακολουθία και κανένας κεφαλαίος χαρακτήρας ASCII, ``False`` διαφορετικά." -#: library/stdtypes.rst:3660 +#: library/stdtypes.rst:3912 msgid "" ">>> b'hello world'.islower()\n" "True\n" @@ -6575,8 +6952,8 @@ msgstr "" ">>> b'Hello world'.islower()\n" "False" -#: library/stdtypes.rst:3707 library/stdtypes.rst:3773 -#: library/stdtypes.rst:3842 +#: library/stdtypes.rst:3959 library/stdtypes.rst:4025 +#: library/stdtypes.rst:4094 msgid "" "Lowercase ASCII characters are those byte values in the sequence " "``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte " @@ -6586,7 +6963,7 @@ msgstr "" "``b'abcdefghijklmnopqrstuvwxyz'``. Οι κεφαλαίοι χαρακτήρες ASCII είναι αυτές " "οι τιμές byte στην ακολουθία ``b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``." -#: library/stdtypes.rst:3673 +#: library/stdtypes.rst:3925 msgid "" "Return ``True`` if all bytes in the sequence are ASCII whitespace and the " "sequence is not empty, ``False`` otherwise. ASCII whitespace characters are " @@ -6599,7 +6976,7 @@ msgstr "" "\\t\\n\\r\\x0b\\f'`` (κενό, tab, νέα γραμμή, επιστροφή μεταφοράς, κάθετο " "tab, μορφή ροής)." -#: library/stdtypes.rst:3682 +#: library/stdtypes.rst:3934 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 " @@ -6610,7 +6987,7 @@ msgstr "" "``False`` διαφορετικά. Δείτε :meth:`bytes.title` για περισσότερες " "λεπτομέρειες σχετικά με τον ορισμό του \"titlecase\"." -#: library/stdtypes.rst:3688 +#: library/stdtypes.rst:3940 msgid "" ">>> b'Hello World'.istitle()\n" "True\n" @@ -6622,7 +6999,7 @@ msgstr "" ">>> b'Hello world'.istitle()\n" "False" -#: library/stdtypes.rst:3697 +#: library/stdtypes.rst:3949 msgid "" "Return ``True`` if there is at least one uppercase alphabetic ASCII " "character in the sequence and no lowercase ASCII characters, ``False`` " @@ -6632,7 +7009,7 @@ msgstr "" "χαρακτήρας ASCII στην ακολουθία και κανένας πεζός χαρακτήρας ASCII, " "διαφορετικά ``False``." -#: library/stdtypes.rst:3702 +#: library/stdtypes.rst:3954 msgid "" ">>> b'HELLO WORLD'.isupper()\n" "True\n" @@ -6644,7 +7021,7 @@ msgstr "" ">>> b'Hello world'.isupper()\n" "False" -#: library/stdtypes.rst:3715 +#: library/stdtypes.rst:3967 msgid "" "Return a copy of the sequence with all the uppercase ASCII characters " "converted to their corresponding lowercase counterpart." @@ -6652,7 +7029,7 @@ msgstr "" "Επιστρέφει ένα αντίγραφο της ακολουθίας με όλους τους κεφαλαίους χαρακτήρες " "ASCII να έχουν μετατραπεί στα ισοδύναμα πεζά." -#: library/stdtypes.rst:3720 +#: library/stdtypes.rst:3972 msgid "" ">>> b'Hello World'.lower()\n" "b'hello world'" @@ -6660,7 +7037,7 @@ msgstr "" ">>> b'Hello World'.lower()\n" "b'hello world'" -#: library/stdtypes.rst:3740 +#: library/stdtypes.rst:3992 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 " @@ -6673,7 +7050,7 @@ msgstr "" "περιλαμβάνονται στη λίστα που προκύπτει εκτός εάν δοθεί *keepends* και είναι " "αληθής." -#: library/stdtypes.rst:3747 +#: library/stdtypes.rst:3999 msgid "" ">>> b'ab c\\n\\nde fg\\rkl\\r\\n'.splitlines()\n" "[b'ab c', b'', b'de fg', b'kl']\n" @@ -6685,7 +7062,7 @@ msgstr "" ">>> b'ab c\\n\\nde fg\\rkl\\r\\n'.splitlines(keepends=True)\n" "[b'ab c\\n', b'\\n', b'de fg\\r', b'kl\\r\\n']" -#: library/stdtypes.rst:3752 +#: library/stdtypes.rst:4004 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 " @@ -6696,7 +7073,7 @@ msgstr "" "συμβολοσειρά και μια αλλαγή γραμμής τερματικού δεν οδηγεί σε μια επιπλέον " "γραμμή::" -#: library/stdtypes.rst:3756 +#: library/stdtypes.rst:4008 msgid "" ">>> b\"\".split(b'\\n'), b\"Two lines\\n\".split(b'\\n')\n" "([b''], [b'Two lines', b''])\n" @@ -6708,7 +7085,7 @@ msgstr "" ">>> b\"\".splitlines(), b\"One line\\n\".splitlines()\n" "([], [b'One line'])" -#: library/stdtypes.rst:3765 +#: library/stdtypes.rst:4017 msgid "" "Return a copy of the sequence with all the lowercase ASCII characters " "converted to their corresponding uppercase counterpart and vice-versa." @@ -6716,7 +7093,7 @@ msgstr "" "Επιστρέφει ένα αντίγραφο της ακολουθίας με όλους τους πεζούς χαρακτήρες " "ASCII να έχουν μετατραπεί στο αντίστοιχο ισοδύναμο κεφαλαίο και αντίστροφα." -#: library/stdtypes.rst:3770 +#: library/stdtypes.rst:4022 msgid "" ">>> b'Hello World'.swapcase()\n" "b'hELLO wORLD'" @@ -6724,7 +7101,7 @@ msgstr "" ">>> b'Hello World'.swapcase()\n" "b'hELLO wORLD'" -#: library/stdtypes.rst:3777 +#: library/stdtypes.rst:4029 msgid "" "Unlike :func:`str.swapcase`, it is always the case that ``bin.swapcase()." "swapcase() == bin`` for the binary versions. Case conversions are " @@ -6736,7 +7113,7 @@ msgstr "" "συμμετρικές στο ASCII, παρόλο που αυτό δεν ισχύει γενικά για αυθαίρετα " "σημεία Unicode κώδικα." -#: library/stdtypes.rst:3791 +#: library/stdtypes.rst:4043 msgid "" "Return a titlecased version of the binary sequence where words start with an " "uppercase ASCII character and the remaining characters are lowercase. " @@ -6747,7 +7124,7 @@ msgstr "" "χαρακτήρα ASCII και οι υπόλοιποι χαρακτήρες είναι πεζοί. Οι τιμές byte χωρίς " "κεφαλαία γράμματα παραμένουν χωρίς τροποποίηση." -#: library/stdtypes.rst:3797 +#: library/stdtypes.rst:4049 msgid "" ">>> b'Hello world'.title()\n" "b'Hello World'" @@ -6755,7 +7132,7 @@ msgstr "" ">>> b'Hello world'.title()\n" "b'Hello World'" -#: library/stdtypes.rst:3800 +#: library/stdtypes.rst:4052 msgid "" "Lowercase ASCII characters are those byte values in the sequence " "``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte " @@ -6767,7 +7144,7 @@ msgstr "" "εκείνες οι τιμές byte στην ακολουθία ``b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``. Όλες " "οι άλλες τιμές byte είναι χωρίς κεφαλαία." -#: library/stdtypes.rst:3810 +#: library/stdtypes.rst:4062 msgid "" ">>> b\"they're bill's friends from the UK\".title()\n" "b\"They'Re Bill'S Friends From The Uk\"" @@ -6775,14 +7152,14 @@ msgstr "" ">>> b\"they're bill's friends from the UK\".title()\n" "b\"They'Re Bill'S Friends From The Uk\"" -#: library/stdtypes.rst:3813 +#: library/stdtypes.rst:4065 msgid "" "A workaround for apostrophes can be constructed using regular expressions::" msgstr "" "Μια λύση για αποστρόφους μπορεί να δημιουργηθεί χρησιμοποιώντας κανονικές " "εκφράσεις::" -#: library/stdtypes.rst:3815 +#: library/stdtypes.rst:4067 msgid "" ">>> import re\n" ">>> def titlecase(s):\n" @@ -6804,7 +7181,7 @@ msgstr "" ">>> titlecase(b\"they're bill's friends.\")\n" "b\"They're Bill's Friends.\"" -#: library/stdtypes.rst:3834 +#: library/stdtypes.rst:4086 msgid "" "Return a copy of the sequence with all the lowercase ASCII characters " "converted to their corresponding uppercase counterpart." @@ -6812,7 +7189,7 @@ msgstr "" "Επιστρέφει ένα αντίγραφο της ακολουθίας με όλους τους πεζούς χαρακτήρες " "ASCII να έχουν μετατραπεί στο αντίστοιχο ισοδύναμο κεφαλαίο." -#: library/stdtypes.rst:3839 +#: library/stdtypes.rst:4091 msgid "" ">>> b'Hello World'.upper()\n" "b'HELLO WORLD'" @@ -6820,7 +7197,7 @@ msgstr "" ">>> b'Hello World'.upper()\n" "b'HELLO WORLD'" -#: library/stdtypes.rst:3855 +#: library/stdtypes.rst:4107 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 " @@ -6835,7 +7212,7 @@ msgstr "" "αντικείμενα :class:`bytes`, η αρχική ακολουθία επιστρέφεται εάν το *width* " "είναι μικρότερο ή ίσο με ``len(seq)``." -#: library/stdtypes.rst:3863 +#: library/stdtypes.rst:4115 msgid "" ">>> b\"42\".zfill(5)\n" "b'00042'\n" @@ -6847,11 +7224,11 @@ msgstr "" ">>> b\"-42\".zfill(5)\n" "b'-0042'" -#: library/stdtypes.rst:3877 +#: library/stdtypes.rst:4129 msgid "``printf``-style Bytes Formatting" msgstr "Μορφοποίηση Bytes τύπου ``printf``" -#: library/stdtypes.rst:3894 +#: library/stdtypes.rst:4146 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 " @@ -6863,7 +7240,7 @@ msgstr "" "εμφάνισης των πλειάδων και των λεξικών σωστά). Εάν η τιμή που εκτυπώνεται " "μπορεί να είναι πλειάδα ή λεξικό, κάντε το wrap σε μια πλειάδα." -#: library/stdtypes.rst:3899 +#: library/stdtypes.rst:4151 msgid "" "Bytes objects (``bytes``/``bytearray``) have one unique built-in operation: " "the ``%`` operator (modulo). This is also known as the bytes *formatting* or " @@ -6880,7 +7257,7 @@ msgstr "" "στοιχεία *values*. Το αποτέλεσμα είναι παρόμοιο με τη χρήση του :c:func:" "`sprintf` στη γλώσσας C." -#: library/stdtypes.rst:3906 +#: library/stdtypes.rst:4158 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 " @@ -6893,7 +7270,7 @@ msgstr "" "αντικείμενο μορφής bytes ή μεμονωμένο mapping αντικείμενο (για παράδειγμα, " "ένα λεξικό)." -#: library/stdtypes.rst:3940 +#: library/stdtypes.rst:4192 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 " @@ -6906,19 +7283,19 @@ msgstr "" "τον χαρακτήρα ``'%'``. Το κλειδί αντιστοίχισης επιλέγει την τιμή που θα " "μορφοποιηθεί από την αντιστοίχιση. Για παράδειγμα:" -#: library/stdtypes.rst:3992 +#: library/stdtypes.rst:4244 msgid "\\(8)" msgstr "\\(8)" -#: library/stdtypes.rst:4014 +#: library/stdtypes.rst:4266 msgid "Single byte (accepts integer or single byte objects)." msgstr "Μονό byte (δέχεται ακέραια ή μεμονωμένα byte αντικείμενα)." -#: library/stdtypes.rst:4017 +#: library/stdtypes.rst:4269 msgid "``'b'``" msgstr "``'b'``" -#: library/stdtypes.rst:4017 +#: library/stdtypes.rst:4269 msgid "" "Bytes (any object that follows the :ref:`buffer protocol ` or " "has :meth:`~object.__bytes__`)." @@ -6926,7 +7303,7 @@ msgstr "" "Bytes (κάθε αντικείμενο που ακολουθεί το :ref:`buffer protocol " "` ή έχει :meth:`~object.__bytes__`)." -#: library/stdtypes.rst:4021 +#: library/stdtypes.rst:4273 msgid "" "``'s'`` is an alias for ``'b'`` and should only be used for Python2/3 code " "bases." @@ -6934,7 +7311,7 @@ msgstr "" "Το ``'s'`` είναι ένα ψευδώνυμο για το ``'b'`` και θα πρέπει να " "χρησιμοποιείται μόνο για κώδικα βάσει Python2/3." -#: library/stdtypes.rst:4024 +#: library/stdtypes.rst:4276 msgid "" "Bytes (converts any Python object using ``repr(obj).encode('ascii', " "'backslashreplace')``)." @@ -6942,7 +7319,7 @@ msgstr "" "Bytes (μετατρέπει οποιοδήποτε αντικείμενο Python χρησιμοποιώντας ``repr(obj)." "encode('ascii', 'backslashreplace')``)." -#: library/stdtypes.rst:4027 +#: library/stdtypes.rst:4279 msgid "" "``'r'`` is an alias for ``'a'`` and should only be used for Python2/3 code " "bases." @@ -6950,31 +7327,31 @@ msgstr "" "Το ``'r'`` είναι ένα ψευδώνυμο για ``'a'`` και θα πρέπει να χρησιμοποιείται " "μόνο για βάσεις κώδικα Python2/3." -#: library/stdtypes.rst:4027 +#: library/stdtypes.rst:4279 msgid "\\(7)" msgstr "\\(7)" -#: library/stdtypes.rst:4062 +#: library/stdtypes.rst:4314 msgid "``b'%s'`` is deprecated, but will not be removed during the 3.x series." msgstr "" "Το ``b'%s'`` έχει καταργηθεί, αλλά δεν θα αφαιρεθεί κατά τη διάρκεια της " "σειράς 3.x." -#: library/stdtypes.rst:4065 +#: library/stdtypes.rst:4317 msgid "``b'%r'`` is deprecated, but will not be removed during the 3.x series." msgstr "" "Το ``b'%r'`` έχει καταργηθεί, αλλά δεν θα αφαιρεθεί κατά τη διάρκεια της " "σειράς 3.x." -#: library/stdtypes.rst:4077 +#: library/stdtypes.rst:4329 msgid ":pep:`461` - Adding % formatting to bytes and bytearray" msgstr ":pep:`461` - Προσθήκη % για μορφοποίηση σε bytes και bytearray" -#: library/stdtypes.rst:4084 +#: library/stdtypes.rst:4336 msgid "Memory Views" msgstr "Όψεις Μνήμης" -#: library/stdtypes.rst:4086 +#: library/stdtypes.rst:4338 msgid "" ":class:`memoryview` objects allow Python code to access the internal data of " "an object that supports the :ref:`buffer protocol ` without " @@ -6984,7 +7361,7 @@ msgstr "" "πρόσβαση στα εσωτερικά δεδομένα ενός αντικειμένου που υποστηρίζει το " "πρωτόκολλο :ref:`buffer protocol ` χωρίς αντιγραφή." -#: library/stdtypes.rst:4092 +#: library/stdtypes.rst:4344 msgid "" "Create a :class:`memoryview` that references *object*. *object* must " "support the buffer protocol. Built-in objects that support the buffer " @@ -6995,7 +7372,7 @@ msgstr "" "υποστηρίζουν το πρωτόκολλο buffer περιλαμβάνουν :class:`bytes` και :class:" "`bytearray`." -#: library/stdtypes.rst:4096 +#: library/stdtypes.rst:4348 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 " @@ -7008,7 +7385,7 @@ msgstr "" "ένα μεμονωμένο byte, αλλά άλλοι τύποι όπως :class:`array.array` μπορεί να " "έχουν μεγαλύτερα στοιχεία." -#: library/stdtypes.rst:4101 +#: library/stdtypes.rst:4353 msgid "" "``len(view)`` is equal to the length of :class:`~memoryview.tolist`, which " "is the nested list representation of the view. If ``view.ndim = 1``, this is " @@ -7018,7 +7395,7 @@ msgstr "" "οποίο είναι η ένθετη αναπαράσταση κατά την προβολή της λίστας. Εάν ``view." "ndim = 1``, αυτό ισούται με τον αριθμό των στοιχείων για την προβολή." -#: library/stdtypes.rst:4105 +#: library/stdtypes.rst:4357 msgid "" "If ``view.ndim == 0``, ``len(view)`` now raises :exc:`TypeError` instead of " "returning 1." @@ -7026,7 +7403,7 @@ msgstr "" "Εάν ``view.ndim == 0``, το ``len(view)`` τώρα κάνει raise μια :exc:" "`TypeError` αντί να επιστρέψει 1." -#: library/stdtypes.rst:4108 +#: library/stdtypes.rst:4360 msgid "" "The :class:`~memoryview.itemsize` attribute will give you the number of " "bytes in a single element." @@ -7034,7 +7411,7 @@ msgstr "" "Το χαρακτηριστικό :class:`~memoryview.itemsize` θα σας δώσει τον αριθμό των " "byte σε ένα μόνο στοιχείο." -#: library/stdtypes.rst:4111 +#: library/stdtypes.rst:4363 msgid "" "A :class:`memoryview` supports slicing and indexing to expose its data. One-" "dimensional slicing will result in a subview::" @@ -7043,7 +7420,7 @@ msgstr "" "μέσω ευρετηρίου στα δεδομένα του. Μια μονοδιάστατη τμηματοποίηση θα έχει ως " "αποτέλεσμα μια δευτερεύουσα προβολή::" -#: library/stdtypes.rst:4114 +#: library/stdtypes.rst:4366 msgid "" ">>> v = memoryview(b'abcefg')\n" ">>> v[1]\n" @@ -7065,7 +7442,7 @@ msgstr "" ">>> bytes(v[1:4])\n" "b'bce'" -#: library/stdtypes.rst:4124 +#: library/stdtypes.rst:4376 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 " @@ -7085,11 +7462,11 @@ msgstr "" "διαστάσεων. Τα μηδενικών διαστάσεων memoryviews μπορούν να γίνουν indexed " "με την κενή πλειάδα (tuple)." -#: library/stdtypes.rst:4133 +#: library/stdtypes.rst:4385 msgid "Here is an example with a non-byte format::" msgstr "Ακολουθεί ένα παράδειγμα με μη-byte μορφή::" -#: library/stdtypes.rst:4135 +#: library/stdtypes.rst:4387 msgid "" ">>> import array\n" ">>> a = array.array('l', [-11111111, 22222222, -33333333, 44444444])\n" @@ -7111,7 +7488,7 @@ msgstr "" ">>> m[::2].tolist()\n" "[-11111111, -33333333]" -#: library/stdtypes.rst:4145 +#: library/stdtypes.rst:4397 msgid "" "If the underlying object is writable, the memoryview supports one-" "dimensional slice assignment. Resizing is not allowed::" @@ -7119,7 +7496,7 @@ msgstr "" "Εάν το βασικό αντικείμενο είναι εγγράψιμο, το memoryview υποστηρίζει " "μονοδιάστατη εκχώρηση τμηματοποίησης. Δεν επιτρέπεται η αλλαγή μεγέθους::" -#: library/stdtypes.rst:4148 +#: library/stdtypes.rst:4400 msgid "" ">>> data = bytearray(b'abcefg')\n" ">>> v = memoryview(data)\n" @@ -7159,7 +7536,7 @@ msgstr "" ">>> data\n" "bytearray(b'z1spam')" -#: library/stdtypes.rst:4166 +#: library/stdtypes.rst:4418 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) " @@ -7169,7 +7546,7 @@ msgstr "" "με μορφές 'B', 'b' ή 'c' μπορούν επίσης να κατακερματιστούν. Ο " "κατακερματισμός ορίζεται ως ``hash(m) == hash(m.tobytes())``::" -#: library/stdtypes.rst:4170 +#: library/stdtypes.rst:4422 msgid "" ">>> v = memoryview(b'abcefg')\n" ">>> hash(v) == hash(b'abcefg')\n" @@ -7187,7 +7564,7 @@ msgstr "" ">>> hash(v[::-2]) == hash(b'abcefg'[::-2])\n" "True" -#: library/stdtypes.rst:4178 +#: library/stdtypes.rst:4430 msgid "" "One-dimensional memoryviews can now be sliced. One-dimensional memoryviews " "with formats 'B', 'b' or 'c' are now :term:`hashable`." @@ -7196,24 +7573,24 @@ msgstr "" "μονοδιάστατα memoryviews με μορφές 'B', 'b' ή 'c' είναι πλέον :term:" "`hashable`." -#: library/stdtypes.rst:4182 +#: library/stdtypes.rst:4434 msgid "" "memoryview is now registered automatically with :class:`collections.abc." "Sequence`" msgstr "" "το memoryview εγγράφεται πλέον αυτόματα με :class:`collections.abc.Sequence`" -#: library/stdtypes.rst:4186 +#: library/stdtypes.rst:4438 msgid "memoryviews can now be indexed with tuple of integers." msgstr "" "τα memoryviews μπορούν τώρα να γίνουν ευρετηριοποίηση με πλειάδα (tuple) " "ακεραίων." -#: library/stdtypes.rst:4189 +#: library/stdtypes.rst:4441 msgid ":class:`memoryview` has several methods:" msgstr "το :class:`memoryview` έχει διάφορες μεθόδους:" -#: library/stdtypes.rst:4193 +#: library/stdtypes.rst:4445 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' " @@ -7224,7 +7601,7 @@ msgstr "" "αντίστοιχοι κωδικοί μορφής των τελεστών ερμηνεύονται χρησιμοποιώντας τη " "σύνταξη :mod:`struct`." -#: library/stdtypes.rst:4197 +#: library/stdtypes.rst:4449 msgid "" "For the subset of :mod:`struct` format strings currently supported by :meth:" "`tolist`, ``v`` and ``w`` are equal if ``v.tolist() == w.tolist()``::" @@ -7233,7 +7610,7 @@ msgstr "" "υποστηρίζονται αυτή τη στιγμή από το :meth:`tolist`, ``v`` και ``w`` είναι " "ίσες εάν ``v.tolist() == w.tolist()``::" -#: library/stdtypes.rst:4200 +#: library/stdtypes.rst:4452 msgid "" ">>> import array\n" ">>> a = array.array('I', [1, 2, 3, 4, 5])\n" @@ -7267,7 +7644,7 @@ msgstr "" ">>> z.tolist() == c.tolist()\n" "True" -#: library/stdtypes.rst:4216 +#: library/stdtypes.rst:4468 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 " @@ -7278,7 +7655,7 @@ msgstr "" "συμβολοσειρές μορφοποίησης και τα περιεχόμενα της προσωρινής μνήμης είναι " "πανομοιότυπα)::" -#: library/stdtypes.rst:4220 +#: library/stdtypes.rst:4472 msgid "" ">>> from ctypes import BigEndianStructure, c_long\n" ">>> class BEPoint(BigEndianStructure):\n" @@ -7304,7 +7681,7 @@ msgstr "" ">>> a == b\n" "False" -#: library/stdtypes.rst:4232 +#: library/stdtypes.rst:4484 msgid "" "Note that, as with floating-point numbers, ``v is w`` does *not* imply ``v " "== w`` for memoryview objects." @@ -7312,7 +7689,7 @@ msgstr "" "Λάβετε υπόψη ότι, όπως και με τους αριθμούς κινητής υποδιαστολής, ``v is w`` " "*δεν* σημαίνει ``v == w`` για αντικείμενα memoryview." -#: library/stdtypes.rst:4235 +#: library/stdtypes.rst:4487 msgid "" "Previous versions compared the raw memory disregarding the item format and " "the logical array structure." @@ -7320,7 +7697,7 @@ msgstr "" "Οι προηγούμενες εκδόσεις συνέκριναν την ακατέργαστη μνήμη αγνοώντας τη μορφή " "του στοιχείου και τη δομή του λογικού πίνακα." -#: library/stdtypes.rst:4241 +#: library/stdtypes.rst:4493 msgid "" "Return the data in the buffer as a bytestring. This is equivalent to " "calling the :class:`bytes` constructor on the memoryview. ::" @@ -7328,7 +7705,7 @@ msgstr "" "Επιστρέφει τα δεδομένα στο buffer ως ένα bytestring. Αυτό ισοδυναμεί με την " "κλήση του κατασκευαστή :class:`bytes` στο memoryview. ::" -#: library/stdtypes.rst:4244 +#: library/stdtypes.rst:4496 msgid "" ">>> m = memoryview(b\"abc\")\n" ">>> m.tobytes()\n" @@ -7342,7 +7719,7 @@ msgstr "" ">>> bytes(m)\n" "b'abc'" -#: library/stdtypes.rst:4250 +#: library/stdtypes.rst:4502 msgid "" "For non-contiguous arrays the result is equal to the flattened list " "representation with all elements converted to bytes. :meth:`tobytes` " @@ -7354,7 +7731,7 @@ msgstr "" "`tobytes` υποστηρίζει όλες τις συμβολοσειρές μορφής, συμπεριλαμβανομένων " "εκείνων που δεν είναι στη σύνταξη του module :mod:`struct`." -#: library/stdtypes.rst:4255 +#: library/stdtypes.rst:4507 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' " @@ -7369,7 +7746,7 @@ msgstr "" "συνεχόμενες προβολές, τα δεδομένα μετατρέπονται πρώτα σε C. Το *order=None* " "είναι το ίδιο με το *order='C'*." -#: library/stdtypes.rst:4265 +#: library/stdtypes.rst:4517 msgid "" "Return a string object containing two hexadecimal digits for each byte in " "the buffer. ::" @@ -7377,7 +7754,7 @@ msgstr "" "Επιστρέφει ένα αντικείμενο συμβολοσειράς που περιέχει δύο δεκαεξαδικά ψηφία " "για κάθε byte στο buffer. ::" -#: library/stdtypes.rst:4268 +#: library/stdtypes.rst:4520 msgid "" ">>> m = memoryview(b\"abc\")\n" ">>> m.hex()\n" @@ -7387,7 +7764,7 @@ msgstr "" ">>> m.hex()\n" "'616263'" -#: library/stdtypes.rst:4274 +#: library/stdtypes.rst:4526 msgid "" "Similar to :meth:`bytes.hex`, :meth:`memoryview.hex` now supports optional " "*sep* and *bytes_per_sep* parameters to insert separators between bytes in " @@ -7397,11 +7774,11 @@ msgstr "" "προαιρετικές παραμέτρους *sep* και *bytes_per_sep* για να εισάγετε " "διαχωριστικά μεταξύ των byte στην εξαγωγή δεκαεξαδικού." -#: library/stdtypes.rst:4281 +#: library/stdtypes.rst:4533 msgid "Return the data in the buffer as a list of elements. ::" msgstr "Επιστρέψτε τα δεδομένα στο buffer ως λίστα στοιχείων. ::" -#: library/stdtypes.rst:4283 +#: library/stdtypes.rst:4535 msgid "" ">>> memoryview(b'abc').tolist()\n" "[97, 98, 99]\n" @@ -7419,7 +7796,7 @@ msgstr "" ">>> m.tolist()\n" "[1.1, 2.2, 3.3]" -#: library/stdtypes.rst:4291 +#: library/stdtypes.rst:4543 msgid "" ":meth:`tolist` now supports all single character native formats in :mod:" "`struct` module syntax as well as multi-dimensional representations." @@ -7428,7 +7805,7 @@ msgstr "" "χαρακτήρων στη σύνταξη του :mod:`struct`, καθώς και πολυδιάστατες " "αναπαραστάσεις." -#: library/stdtypes.rst:4298 +#: library/stdtypes.rst:4550 msgid "" "Return a readonly version of the memoryview object. The original memoryview " "object is unchanged. ::" @@ -7436,7 +7813,7 @@ msgstr "" "Επιστρέφει μια έκδοση μόνο για ανάγνωση του αντικειμένου memoryview. Το " "αρχικό αντικείμενο memoryview είναι αμετάβλητο. ::" -#: library/stdtypes.rst:4301 +#: library/stdtypes.rst:4553 msgid "" ">>> m = memoryview(bytearray(b'abc'))\n" ">>> mm = m.toreadonly()\n" @@ -7462,7 +7839,7 @@ msgstr "" ">>> mm.tolist()\n" "[43, 98, 99]" -#: library/stdtypes.rst:4317 +#: library/stdtypes.rst:4569 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 :" @@ -7477,7 +7854,7 @@ msgstr "" "είναι βολική για την κατάργηση αυτών των περιορισμών (και απελευθερώνει " "οποιουσδήποτε αιωρούμενους πόρους) το συντομότερο δυνατό." -#: library/stdtypes.rst:4323 +#: library/stdtypes.rst:4575 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 " @@ -7487,7 +7864,7 @@ msgstr "" "προβολή δημιουργεί μια :class:`ValueError` (εκτός από την ίδια την :meth:" "`release` που μπορεί να κληθεί πολλές φορές)::" -#: library/stdtypes.rst:4327 +#: library/stdtypes.rst:4579 msgid "" ">>> m = memoryview(b'abc')\n" ">>> m.release()\n" @@ -7503,7 +7880,7 @@ msgstr "" " File \"\", line 1, in \n" "ValueError: operation forbidden on released memoryview object" -#: library/stdtypes.rst:4334 +#: library/stdtypes.rst:4586 msgid "" "The context management protocol can be used for a similar effect, using the " "``with`` statement::" @@ -7511,7 +7888,7 @@ msgstr "" "Το πρωτόκολλο διαχείρισης περιεχομένου μπορεί να χρησιμοποιηθεί για παρόμοιο " "αποτέλεσμα, χρησιμοποιώντας τη δήλωση ``with``::" -#: library/stdtypes.rst:4337 +#: library/stdtypes.rst:4589 msgid "" ">>> with memoryview(b'abc') as m:\n" "... m[0]\n" @@ -7531,7 +7908,7 @@ msgstr "" " File \"\", line 1, in \n" "ValueError: operation forbidden on released memoryview object" -#: library/stdtypes.rst:4351 +#: library/stdtypes.rst:4603 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 " @@ -7545,7 +7922,7 @@ msgstr "" "memoryview, αλλά το ίδιο το buffer δεν αντιγράφεται. Οι υποστηριζόμενες " "μετατροπές είναι 1D -> C-:term:`contiguous` και C-contiguous -> 1D." -#: library/stdtypes.rst:4357 +#: library/stdtypes.rst:4609 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 " @@ -7558,11 +7935,11 @@ msgstr "" "το αρχικό μήκος. Σημειώστε ότι όλα τα μήκη byte μπορεί να εξαρτώνται από το " "λειτουργικό σύστημα." -#: library/stdtypes.rst:4363 +#: library/stdtypes.rst:4615 msgid "Cast 1D/long to 1D/unsigned bytes::" msgstr "Μορφοποίηση από 1D/long σε 1D/unsigned bytes::" -#: library/stdtypes.rst:4365 +#: library/stdtypes.rst:4617 msgid "" ">>> import array\n" ">>> a = array.array('l', [1,2,3])\n" @@ -7606,11 +7983,11 @@ msgstr "" ">>> y.nbytes\n" "24" -#: library/stdtypes.rst:4386 +#: library/stdtypes.rst:4638 msgid "Cast 1D/unsigned bytes to 1D/char::" msgstr "Μορφοποίηση από 1D/unsigned bytes σε 1D/char::" -#: library/stdtypes.rst:4388 +#: library/stdtypes.rst:4640 msgid "" ">>> b = bytearray(b'zyz')\n" ">>> x = memoryview(b)\n" @@ -7634,11 +8011,11 @@ msgstr "" ">>> b\n" "bytearray(b'ayz')" -#: library/stdtypes.rst:4399 +#: library/stdtypes.rst:4651 msgid "Cast 1D/bytes to 3D/ints to 1D/signed char::" msgstr "Μορφοποίηση από 1D/bytes σε 3D/ints σε 1D/signed char::" -#: library/stdtypes.rst:4401 +#: library/stdtypes.rst:4653 msgid "" ">>> import struct\n" ">>> buf = struct.pack(\"i\"*12, *list(range(12)))\n" @@ -7688,11 +8065,11 @@ msgstr "" ">>> z.nbytes\n" "48" -#: library/stdtypes.rst:4425 +#: library/stdtypes.rst:4677 msgid "Cast 1D/unsigned long to 2D/unsigned long::" msgstr "Μορφοποίηση από 1D/unsigned long σε 2D/unsigned long::" -#: library/stdtypes.rst:4427 +#: library/stdtypes.rst:4679 msgid "" ">>> buf = struct.pack(\"L\"*6, *list(range(6)))\n" ">>> x = memoryview(buf)\n" @@ -7714,21 +8091,21 @@ msgstr "" ">>> y.tolist()\n" "[[0, 1, 2], [3, 4, 5]]" -#: library/stdtypes.rst:4439 +#: library/stdtypes.rst:4691 msgid "The source format is no longer restricted when casting to a byte view." msgstr "" "Η πηγαία μορφή δεν είναι πλέον περιορισμένη κατά τη μορφοποίηση σε μια όψη " "byte." -#: library/stdtypes.rst:4442 +#: library/stdtypes.rst:4694 msgid "There are also several readonly attributes available:" msgstr "Υπάρχουν επίσης αρκετά διαθέσιμα χαρακτηριστικά μόνο για ανάγνωση:" -#: library/stdtypes.rst:4446 +#: library/stdtypes.rst:4698 msgid "The underlying object of the memoryview::" msgstr "Το βασικό αντικείμενο του memoryview::" -#: library/stdtypes.rst:4448 +#: library/stdtypes.rst:4700 msgid "" ">>> b = bytearray(b'xyz')\n" ">>> m = memoryview(b)\n" @@ -7740,7 +8117,7 @@ msgstr "" ">>> m.obj is b\n" "True" -#: library/stdtypes.rst:4457 +#: library/stdtypes.rst:4709 msgid "" "``nbytes == product(shape) * itemsize == len(m.tobytes())``. This is the " "amount of space in bytes that the array would use in a contiguous " @@ -7750,7 +8127,7 @@ msgstr "" "ποσότητα χώρου σε byte που θα χρησιμοποιούσε ο πίνακας σε μια συνεχόμενη " "αναπαράσταση. Δεν ισούται απαραίτητα με ``len(m)``::" -#: library/stdtypes.rst:4461 +#: library/stdtypes.rst:4713 msgid "" ">>> import array\n" ">>> a = array.array('i', [1,2,3,4,5])\n" @@ -7782,11 +8159,11 @@ msgstr "" ">>> len(y.tobytes())\n" "12" -#: library/stdtypes.rst:4476 +#: library/stdtypes.rst:4728 msgid "Multi-dimensional arrays::" msgstr "Πολυδιάστατοι πίνακες::" -#: library/stdtypes.rst:4478 +#: library/stdtypes.rst:4730 msgid "" ">>> import struct\n" ">>> buf = struct.pack(\"d\"*12, *[1.5*x for x in range(12)])\n" @@ -7810,11 +8187,11 @@ msgstr "" ">>> y.nbytes\n" "96" -#: library/stdtypes.rst:4493 +#: library/stdtypes.rst:4745 msgid "A bool indicating whether the memory is read only." msgstr "Ένα bool που υποδεικνύει εάν η μνήμη είναι μόνο για ανάγνωση." -#: library/stdtypes.rst:4497 +#: library/stdtypes.rst:4749 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 " @@ -7826,7 +8203,7 @@ msgstr "" "εξαγωγείς με συμβολοσειρές αυθαίρετης μορφής, αλλά ορισμένες μέθοδοι (π.χ. :" "meth:`tolist`) είναι περιορισμένες σε εγγενείς μορφές ενός στοιχείου." -#: library/stdtypes.rst:4502 +#: library/stdtypes.rst:4754 msgid "" "format ``'B'`` is now handled according to the struct module syntax. This " "means that ``memoryview(b'abc')[0] == b'abc'[0] == 97``." @@ -7834,11 +8211,11 @@ msgstr "" "η μορφή ``'B'`` αντιμετωπίζεται πλέον σύμφωνα με τη σύνταξη ενός struct " "module. Αυτό σημαίνει ότι ``memoryview(b'abc')[0] == b'abc'[0] == 97``." -#: library/stdtypes.rst:4508 +#: library/stdtypes.rst:4760 msgid "The size in bytes of each element of the memoryview::" msgstr "Το μέγεθος σε bytes κάθε στοιχείου στο memoryview::" -#: library/stdtypes.rst:4510 +#: library/stdtypes.rst:4762 msgid "" ">>> import array, struct\n" ">>> m = memoryview(array.array('H', [32000, 32001, 32002]))\n" @@ -7858,7 +8235,7 @@ msgstr "" ">>> struct.calcsize('H') == m.itemsize\n" "True" -#: library/stdtypes.rst:4521 +#: library/stdtypes.rst:4773 msgid "" "An integer indicating how many dimensions of a multi-dimensional array the " "memory represents." @@ -7866,7 +8243,7 @@ msgstr "" "Ένα ακέραιος αριθμός που δείχνει πόσες διαστάσεις ενός πολυδιάστατου πίνακα " "αντιπροσωπεύει η μνήμη." -#: library/stdtypes.rst:4526 +#: library/stdtypes.rst:4778 msgid "" "A tuple of integers the length of :attr:`ndim` giving the shape of the " "memory as an N-dimensional array." @@ -7874,11 +8251,11 @@ msgstr "" "Μια πλειάδα (tuple) ακεραίων με μήκος :attr:`ndim` δίνοντας το σχήμα της " "μνήμης ως πίνακα N-διαστάσεων." -#: library/stdtypes.rst:4537 +#: library/stdtypes.rst:4789 msgid "An empty tuple instead of ``None`` when ndim = 0." msgstr "Μια κενή πλειάδα (tuple) αντί για ``None`` όταν ndim = 0." -#: library/stdtypes.rst:4534 +#: library/stdtypes.rst:4786 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." @@ -7886,29 +8263,29 @@ msgstr "" "Μια πλειάδα ακεραίων με μήκος :attr:`ndim` που δίνει το μέγεθος σε bytes για " "την πρόσβαση σε κάθε στοιχείο για κάθε διάσταση του πίνακα." -#: library/stdtypes.rst:4542 +#: library/stdtypes.rst:4794 msgid "Used internally for PIL-style arrays. The value is informational only." msgstr "" "Χρησιμοποιείται εσωτερικά για συστοιχίες τύπου PIL. Η τιμή είναι μόνο " "ενημερωτική." -#: library/stdtypes.rst:4546 +#: library/stdtypes.rst:4798 msgid "A bool indicating whether the memory is C-:term:`contiguous`." msgstr "Ένα bool που υποδεικνύει εάν η μνήμη είναι C-:term:`contiguous`." -#: library/stdtypes.rst:4552 +#: library/stdtypes.rst:4804 msgid "A bool indicating whether the memory is Fortran :term:`contiguous`." msgstr "Ένα bool που υποδεικνύει εάν η μνήμη είναι Fortran :term:`contiguous`." -#: library/stdtypes.rst:4558 +#: library/stdtypes.rst:4810 msgid "A bool indicating whether the memory is :term:`contiguous`." msgstr "Ένα bool που υποδεικνύει εάν η μνήμη είναι :term:`contiguous`." -#: library/stdtypes.rst:4566 +#: library/stdtypes.rst:4818 msgid "Set Types --- :class:`set`, :class:`frozenset`" msgstr "Τύποι Συνόλου (Set) --- :class:`set`, :class:`frozenset`" -#: library/stdtypes.rst:4570 +#: library/stdtypes.rst:4822 msgid "" "A :dfn:`set` object is an unordered collection of distinct :term:`hashable` " "objects. Common uses include membership testing, removing duplicates from a " @@ -7924,7 +8301,7 @@ msgstr "" "διαφορά. (Για άλλα containers, δείτε τις ενσωματωμένες κλάσεις :class:" "`dict`, :class:`list`, και :class:`tuple` και το module :mod:`collections`)." -#: library/stdtypes.rst:4577 +#: library/stdtypes.rst:4829 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 " @@ -7937,7 +8314,7 @@ msgstr "" "τα σύνολα (sets) δεν υποστηρίζουν λειτουργίες ευρετηριοποίησης, " "τμηματοποίησης ή άλλη συμπεριφορά ακολουθίας." -#: library/stdtypes.rst:4582 +#: library/stdtypes.rst:4834 msgid "" "There are currently two built-in set types, :class:`set` and :class:" "`frozenset`. The :class:`set` type is mutable --- the contents can be " @@ -7958,7 +8335,7 @@ msgstr "" "δεν μπορεί να αλλάξει μετά τη δημιουργία του· μπορεί επομένως να " "χρησιμοποιηθεί ως κλειδί λεξικού ή ως στοιχείο άλλου συνόλου (set)." -#: library/stdtypes.rst:4590 +#: library/stdtypes.rst:4842 msgid "" "Non-empty sets (not frozensets) can be created by placing a comma-separated " "list of elements within braces, for example: ``{'jack', 'sjoerd'}``, in " @@ -7969,11 +8346,11 @@ msgstr "" "παράδειγμα: ``{'jack', 'sjoerd'}``, επιπλέον με τη χρήση του constructor " "του :class:`set`." -#: library/stdtypes.rst:4594 +#: library/stdtypes.rst:4846 msgid "The constructors for both classes work the same:" msgstr "Οι constructors και για τις δύο κλάσεις λειτουργούν το ίδιο:" -#: library/stdtypes.rst:4599 +#: library/stdtypes.rst:4851 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 " @@ -7986,25 +8363,25 @@ msgstr "" "εσωτερικά σύνολα πρέπει να είναι :class:`frozenset` αντικείμενα. Εάν δεν " "έχει καθοριστεί το *iterable*, επιστρέφεται ένα νέο κενό σύνολο." -#: library/stdtypes.rst:4605 +#: library/stdtypes.rst:4857 msgid "Sets can be created by several means:" msgstr "Τα σύνολα μπορούν να δημιουργηθούν με διάφορους τρόπους:" -#: library/stdtypes.rst:4607 +#: library/stdtypes.rst:4859 msgid "" "Use a comma-separated list of elements within braces: ``{'jack', 'sjoerd'}``" msgstr "" "Χρησιμοποιώντας μια λίστα στοιχείων διαχωρισμένη με κόμματα: ``{'jack', " "'sjoerd'}``" -#: library/stdtypes.rst:4608 +#: library/stdtypes.rst:4860 msgid "" "Use a set comprehension: ``{c for c in 'abracadabra' if c not in 'abc'}``" msgstr "" "Χρησιμοποιώντας ένα set comprehension: ``{c for c in 'abracadabra' if c not " "in 'abc'}``" -#: library/stdtypes.rst:4609 +#: library/stdtypes.rst:4861 msgid "" "Use the type constructor: ``set()``, ``set('foobar')``, ``set(['a', 'b', " "'foo'])``" @@ -8012,7 +8389,7 @@ msgstr "" "Χρησιμοποιώντας τον τύπο constructor: ``set()``, ``set('foobar')``, " "``set(['a', 'b', 'foo'])``" -#: library/stdtypes.rst:4611 +#: library/stdtypes.rst:4863 msgid "" "Instances of :class:`set` and :class:`frozenset` provide the following " "operations:" @@ -8020,20 +8397,20 @@ msgstr "" "Τα στιγμιότυπα των :class:`set` και :class:`frozenset` παρέχουν τις " "ακόλουθες λειτουργίες:" -#: library/stdtypes.rst:4616 +#: library/stdtypes.rst:4868 msgid "Return the number of elements in set *s* (cardinality of *s*)." msgstr "" "Επιστρέφει τον αριθμό των στοιχείων στο σύνολο *s* (πληθικότητα του *s*)." -#: library/stdtypes.rst:4620 +#: library/stdtypes.rst:4872 msgid "Test *x* for membership in *s*." msgstr "Ελέγχει αν το *x* είναι μέρος στο *s*." -#: library/stdtypes.rst:4624 +#: library/stdtypes.rst:4876 msgid "Test *x* for non-membership in *s*." msgstr "Ελέγχει αν το *x* δεν είναι μέρος στο *s*." -#: library/stdtypes.rst:4628 +#: library/stdtypes.rst:4881 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." @@ -8041,11 +8418,11 @@ msgstr "" "Επιστρέφει ``True`` εάν το σύνολο δεν έχει κοινά στοιχεία με το *other*. Τα " "σύνολα είναι ασύνδετα εάν και μόνο εάν η τομή τους είναι το κενό σύνολο." -#: library/stdtypes.rst:4634 +#: library/stdtypes.rst:4888 msgid "Test whether every element in the set is in *other*." msgstr "Ελέγχει εάν κάθε στοιχείο στο σύνολο βρίσκεται στο *other*." -#: library/stdtypes.rst:4638 +#: library/stdtypes.rst:4892 msgid "" "Test whether the set is a proper subset of *other*, that is, ``set <= other " "and set != other``." @@ -8053,11 +8430,11 @@ msgstr "" "Ελέγχει εάν το σύνολο είναι σωστό υποσύνολο του *other*, δηλαδή, ``set <= " "other and set != other``." -#: library/stdtypes.rst:4644 +#: library/stdtypes.rst:4899 msgid "Test whether every element in *other* is in the set." msgstr "Ελέγχει αν κάθε στοιχείο του *other* είναι στο σύνολο." -#: library/stdtypes.rst:4648 +#: library/stdtypes.rst:4903 msgid "" "Test whether the set is a proper superset of *other*, that is, ``set >= " "other and set != other``." @@ -8065,36 +8442,38 @@ msgstr "" "Ελέγχει αν το σύνολο είναι σωστό υπερσύνολο του *other*, δηλαδή, ``set >= " "other and set != other``." -#: library/stdtypes.rst:4654 +#: library/stdtypes.rst:4910 msgid "Return a new set with elements from the set and all others." msgstr "Επιστρέφει ένα νέο σύνολο με στοιχεία από το σύνολο και όλα τα άλλα." -#: library/stdtypes.rst:4659 +#: library/stdtypes.rst:4916 msgid "Return a new set with elements common to the set and all others." msgstr "" "Επιστρέφει ένα νέο σύνολο με στοιχεία κοινά στο σύνολο και σε όλα τα άλλα." -#: library/stdtypes.rst:4664 +#: library/stdtypes.rst:4922 msgid "Return a new set with elements in the set that are not in the others." msgstr "" "Επιστρέφει ένα νέο σύνολο με στοιχεία στο σύνολο που δεν υπάρχουν στα άλλα." -#: library/stdtypes.rst:4669 +#: library/stdtypes.rst:4928 msgid "" "Return a new set with elements in either the set or *other* but not both." msgstr "" "Επιστρέφει ένα νέο σύνολο με στοιχεία είτε στο σύνολο είτε στο *other* αλλά " "όχι και στα δύο." -#: library/stdtypes.rst:4673 +#: library/stdtypes.rst:4933 msgid "Return a shallow copy of the set." msgstr "Επιστρέφει ένα ρηχό αντίγραφο του συνόλου." -#: library/stdtypes.rst:4676 +#: library/stdtypes.rst:4936 +#, fuzzy msgid "" -"Note, the non-operator versions of :meth:`union`, :meth:`intersection`, :" -"meth:`difference`, :meth:`symmetric_difference`, :meth:`issubset`, and :meth:" -"`issuperset` methods will accept any iterable as an argument. In contrast, " +"Note, the non-operator versions of :meth:`~frozenset.union`, :meth:" +"`~frozenset.intersection`, :meth:`~frozenset.difference`, :meth:`~frozenset." +"symmetric_difference`, :meth:`~frozenset.issubset`, and :meth:`~frozenset." +"issuperset` methods will accept any iterable as an argument. In contrast, " "their operator based counterparts require their arguments to be sets. This " "precludes error-prone constructions like ``set('abc') & 'cbs'`` in favor of " "the more readable ``set('abc').intersection('cbs')``." @@ -8107,7 +8486,7 @@ msgstr "" "σφάλματα όπως ``set('abc') & 'cbs'`` υπέρ του πιο ευανάγνωστου ``set('abc')." "intersection('cbs')``." -#: library/stdtypes.rst:4683 +#: library/stdtypes.rst:4943 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 " @@ -8125,7 +8504,7 @@ msgstr "" "είναι σωστό υπερσύνολο του δεύτερου συνόλου (είναι υπερσύνολο αλλά δεν είναι " "ίσο)." -#: library/stdtypes.rst:4690 +#: library/stdtypes.rst:4950 msgid "" "Instances of :class:`set` are compared to instances of :class:`frozenset` " "based on their members. For example, ``set('abc') == frozenset('abc')`` " @@ -8136,7 +8515,7 @@ msgstr "" "frozenset('abc')`` επιστρέφει ``True`` και το ίδιο συμβαίνει και με το " "``set('abc') in set([frozenset('abc')])``." -#: library/stdtypes.rst:4694 +#: library/stdtypes.rst:4954 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 " @@ -8148,7 +8527,7 @@ msgstr "" "δεν είναι ίσα και δεν είναι υποσύνολα το ένα του άλλου, επομένως *όλα* τα " "ακόλουθα επιστρέφουν ``False``: ``ab``." -#: library/stdtypes.rst:4699 +#: library/stdtypes.rst:4959 msgid "" "Since sets only define partial ordering (subset relationships), the output " "of the :meth:`list.sort` method is undefined for lists of sets." @@ -8156,13 +8535,13 @@ msgstr "" "Δεδομένου ότι τα σύνολα ορίζουν μόνο μερική σειρά (σχέσεις υποσυνόλων), η " "έξοδος της μεθόδου :meth:`list.sort` δεν έχει οριστεί για λίστες συνόλων." -#: library/stdtypes.rst:4702 +#: library/stdtypes.rst:4962 msgid "Set elements, like dictionary keys, must be :term:`hashable`." msgstr "" "Τα στοιχεία συνόλου, όπως τα κλειδιά λεξικού, πρέπει να είναι :term:" "`hashable`." -#: library/stdtypes.rst:4704 +#: library/stdtypes.rst:4964 msgid "" "Binary operations that mix :class:`set` instances with :class:`frozenset` " "return the type of the first operand. For example: ``frozenset('ab') | " @@ -8173,7 +8552,7 @@ msgstr "" "``frozenset('ab') | set('bc')`` επιστρέφει ένα στιγμιότυπο του :class:" "`frozenset`." -#: library/stdtypes.rst:4708 +#: library/stdtypes.rst:4968 msgid "" "The following table lists operations available for :class:`set` that do not " "apply to immutable instances of :class:`frozenset`:" @@ -8181,32 +8560,32 @@ msgstr "" "Ο παρακάτω πίνακας παραθέτει λειτουργίες που είναι διαθέσιμες για :class:" "`set` που δεν ισχύουν για αμετάβλητα στιγμιότυπα της :class:`frozenset`:" -#: library/stdtypes.rst:4714 +#: library/stdtypes.rst:4974 msgid "Update the set, adding elements from all others." msgstr "Ενημερώνει το σύνολο (set), προσθέτοντας στοιχεία από όλα τα άλλα." -#: library/stdtypes.rst:4719 +#: library/stdtypes.rst:4979 msgid "Update the set, keeping only elements found in it and all others." msgstr "" "Ενημερώνει το σύνολο, διατηρώντας μόνο τα στοιχεία που βρίσκονται σε αυτό " "και όλα τα άλλα." -#: library/stdtypes.rst:4724 +#: library/stdtypes.rst:4984 msgid "Update the set, removing elements found in others." msgstr "Ενημερώνει το σύνολο, αφαιρώντας στοιχεία που βρίσκονται σε άλλα." -#: library/stdtypes.rst:4729 +#: library/stdtypes.rst:4989 msgid "" "Update the set, keeping only elements found in either set, but not in both." msgstr "" "Ενημερώνει το σύνολο, διατηρώντας μόνο τα στοιχεία που βρίσκονται σε κάθε " "σύνολο, αλλά όχι και στα δύο." -#: library/stdtypes.rst:4733 +#: library/stdtypes.rst:4993 msgid "Add element *elem* to the set." msgstr "Προσθέτει το στοιχείο *elem* στο σύνολο." -#: library/stdtypes.rst:4737 +#: library/stdtypes.rst:4997 msgid "" "Remove element *elem* from the set. Raises :exc:`KeyError` if *elem* is not " "contained in the set." @@ -8214,11 +8593,11 @@ msgstr "" "Αφαιρεί το στοιχείο *elem* από το σύνολο. Κάνει raise τη :exc:`KeyError` " "εάν το *elem* δεν περιέχεται στο σύνολο." -#: library/stdtypes.rst:4742 +#: library/stdtypes.rst:5002 msgid "Remove element *elem* from the set if it is present." msgstr "Αφαιρεί το στοιχείο *elem* από το σύνολο εάν υπάρχει." -#: library/stdtypes.rst:4746 +#: library/stdtypes.rst:5006 msgid "" "Remove and return an arbitrary element from the set. Raises :exc:`KeyError` " "if the set is empty." @@ -8226,38 +8605,46 @@ msgstr "" "Αφαιρεί και επιστρέφει ένα αυθαίρετο στοιχείο από το σύνολο. Κάνει raise " "μια :exc:`KeyError` εάν το σύνολο είναι κενό." -#: library/stdtypes.rst:4751 +#: library/stdtypes.rst:5011 msgid "Remove all elements from the set." msgstr "Αφαιρεί όλα τα στοιχεία από το σύνολο (set)." -#: library/stdtypes.rst:4754 +#: library/stdtypes.rst:5014 +#, fuzzy msgid "" -"Note, the non-operator versions of the :meth:`update`, :meth:" -"`intersection_update`, :meth:`difference_update`, and :meth:" -"`symmetric_difference_update` methods will accept any iterable as an " -"argument." +"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 "" "Σημείωση, οι εκδόσεις μη-τελεστή μεθόδων :meth:`update`, :meth:" "`intersection_update`, :meth:`difference_update`, και :meth:" "`symmetric_difference_update` θα δέχονται οποιοδήποτε επαναλαμβανόμενο " "στοιχείο ως όρισμα." -#: library/stdtypes.rst:4759 +#: library/stdtypes.rst:5019 +#, fuzzy msgid "" -"Note, the *elem* argument to the :meth:`~object.__contains__`, :meth:" -"`remove`, and :meth:`discard` methods may be a set. To support searching " -"for an equivalent frozenset, a temporary one is created from *elem*." +"Note, the *elem* argument to the :meth:`~object.__contains__`, :meth:`~set." +"remove`, and :meth:`~set.discard` methods may be a set. To support " +"searching for an equivalent frozenset, a temporary one is created from " +"*elem*." msgstr "" "Σημείωση, το όρισμα *elem* για τις μεθόδους :meth:`~object.__contains__`, :" "meth:`remove`, και :meth:`discard` μπορεί να είναι ένα σύνολο. Για την " "υποστήριξη της αναζήτησης για ένα ισοδύναμο παγωμένο σύνολο (frozenset), ένα " "προσωρινό δημιουργείται από το *elem*." -#: library/stdtypes.rst:4768 +#: library/stdtypes.rst:5024 +msgid "" +"Sets and frozensets are :ref:`generic ` over the type of their " +"elements." +msgstr "" + +#: library/stdtypes.rst:5029 msgid "Mapping Types --- :class:`dict`" msgstr "Τύποι αντιστοίχισης --- :class:`dict`" -#: library/stdtypes.rst:4778 +#: library/stdtypes.rst:5039 msgid "" "A :term:`mapping` object maps :term:`hashable` values to arbitrary objects. " "Mappings are mutable objects. There is currently only one standard mapping " @@ -8272,7 +8659,7 @@ msgstr "" "class:`list`, :class:`set`, και :class:`tuple` κλάσεις, και το module :mod:" "`collections`.)" -#: library/stdtypes.rst:4784 +#: library/stdtypes.rst:5045 msgid "" "A dictionary's keys are *almost* arbitrary values. Values that are not :" "term:`hashable`, that is, values containing lists, dictionaries or other " @@ -8287,7 +8674,7 @@ msgstr "" "συγκρίνονται ίσες (όπως ``1``, ``1.0``, και ``True``) μπορούν να " "χρησιμοποιηθούν εναλλακτικά για το index της ίδιας καταχώρισης λεξικού." -#: library/stdtypes.rst:4795 +#: library/stdtypes.rst:5056 msgid "" "Return a new dictionary initialized from an optional positional argument and " "a possibly empty set of keyword arguments." @@ -8295,11 +8682,11 @@ msgstr "" "Επιστρέφει ένα νέο λεξικό που έχει αρχικοποιηθεί από ένα προαιρετικό όρισμα " "θέσης και ένα πιθανό κενό σύνολο ορισμάτων λέξεων-κλειδιών." -#: library/stdtypes.rst:4798 +#: library/stdtypes.rst:5059 msgid "Dictionaries can be created by several means:" msgstr "Τα λεξικά μπορούν να δημιουργηθούν με διάφορους τρόπους:" -#: library/stdtypes.rst:4800 +#: library/stdtypes.rst:5061 msgid "" "Use a comma-separated list of ``key: value`` pairs within braces: ``{'jack': " "4098, 'sjoerd': 4127}`` or ``{4098: 'jack', 4127: 'sjoerd'}``" @@ -8308,13 +8695,13 @@ msgstr "" "σε αγκύλες: ``{'jack': 4098, 'sjoerd': 4127}`` or ``{4098: 'jack', 4127: " "'sjoerd'}``" -#: library/stdtypes.rst:4802 +#: library/stdtypes.rst:5063 msgid "Use a dict comprehension: ``{}``, ``{x: x ** 2 for x in range(10)}``" msgstr "" "Χρησιμοποιήστε ένα comprehension λεξικού: ``{}``, ``{x: x ** 2 for x in " "range(10)}``" -#: library/stdtypes.rst:4803 +#: library/stdtypes.rst:5064 msgid "" "Use the type constructor: ``dict()``, ``dict([('foo', 100), ('bar', " "200)])``, ``dict(foo=100, bar=200)``" @@ -8322,7 +8709,7 @@ msgstr "" "Χρησιμοποιήστε τον κατασκευαστή τύπου: ``dict()``, ``dict([('foo', 100), " "('bar', 200)])``, ``dict(foo=100, bar=200)``" -#: library/stdtypes.rst:4806 +#: library/stdtypes.rst:5067 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 " @@ -8344,7 +8731,7 @@ msgstr "" "τιμή. Εάν ένα κλειδί εμφανίζεται περισσότερες από μία φορές, η τελευταία " "τιμή για αυτό το κλειδί γίνεται η αντίστοιχη τιμή στο νέο λεξικό." -#: library/stdtypes.rst:4816 +#: library/stdtypes.rst:5077 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 " @@ -8356,16 +8743,7 @@ msgstr "" "Εάν υπάρχει ήδη ένα κλειδί που προστίθεται, η τιμή από το όρισμα λέξης-" "κλειδιού αντικαθιστά την τιμή από το όρισμα θέσης." -#: library/stdtypes.rst:4839 -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 "" -"Η παροχή ορισμάτων λέξεων-κλειδιών όπως στο πρώτο παράδειγμα λειτουργεί μόνο " -"για κλειδιά που είναι έγκυρα αναγνωριστικά Python. Διαφορετικά, μπορούν να " -"χρησιμοποιηθούν οποιαδήποτε έγκυρα κλειδιά." - -#: library/stdtypes.rst:4824 +#: library/stdtypes.rst:5082 msgid "" "Dictionaries compare equal if and only if they have the same ``(key, " "value)`` pairs (regardless of ordering). Order comparisons ('<', '<=', '>=', " @@ -8379,7 +8757,7 @@ msgstr "" "η ισότητα, τα ακόλουθα παραδείγματα επιστρέφουν όλα ένα λεξικό ίσο με " "``{\"one\": 1, \"two\": 2, \"three\": 3}``::" -#: library/stdtypes.rst:4830 +#: library/stdtypes.rst:5088 msgid "" ">>> a = dict(one=1, two=2, three=3)\n" ">>> b = {'one': 1, 'two': 2, 'three': 3}\n" @@ -8399,7 +8777,16 @@ msgstr "" ">>> a == b == c == d == e == f\n" "True" -#: library/stdtypes.rst:4842 +#: library/stdtypes.rst:5097 +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 "" +"Η παροχή ορισμάτων λέξεων-κλειδιών όπως στο πρώτο παράδειγμα λειτουργεί μόνο " +"για κλειδιά που είναι έγκυρα αναγνωριστικά Python. Διαφορετικά, μπορούν να " +"χρησιμοποιηθούν οποιαδήποτε έγκυρα κλειδιά." + +#: library/stdtypes.rst:5100 msgid "" "Dictionaries preserve insertion order. Note that updating a key does not " "affect the order. Keys added after deletion are inserted at the end. ::" @@ -8408,7 +8795,7 @@ msgstr "" "κλειδιού δεν επηρεάζει τη σειρά. Τα κλειδιά που προστέθηκαν μετά τη " "διαγραφή εισάγονται στο τέλος. ::" -#: library/stdtypes.rst:4845 +#: library/stdtypes.rst:5103 msgid "" ">>> d = {\"one\": 1, \"two\": 2, \"three\": 3, \"four\": 4}\n" ">>> d\n" @@ -8440,7 +8827,7 @@ msgstr "" ">>> d\n" "{'one': 42, 'three': 3, 'four': 4, 'two': None}" -#: library/stdtypes.rst:4860 +#: library/stdtypes.rst:5118 msgid "" "Dictionary order is guaranteed to be insertion order. This behavior was an " "implementation detail of CPython from 3.6." @@ -8448,7 +8835,13 @@ msgstr "" "Η σειρά λεξικού είναι εγγυημένη ότι είναι η σειρά εισαγωγής. Αυτή η " "συμπεριφορά ήταν μια λεπτομέρεια υλοποίηση της CPython από την έκδοση 3.6." -#: library/stdtypes.rst:4864 +#: library/stdtypes.rst:5122 +msgid "" +"Dictionaries are :ref:`generic ` over two types, signifying " +"(respectively) the types of the dictionary's keys and values." +msgstr "" + +#: library/stdtypes.rst:5125 msgid "" "These are the operations that dictionaries support (and therefore, custom " "mapping types should support too):" @@ -8456,16 +8849,16 @@ msgstr "" "Αυτές είναι οι λειτουργίες που υποστηρίζουν τα λεξικά (και επομένως, θα " "πρέπει να υποστηρίζουν και προσαρμοσμένους τύπους αντιστοίχισης επίσης):" -#: library/stdtypes.rst:4869 +#: library/stdtypes.rst:5130 msgid "Return a list of all the keys used in the dictionary *d*." msgstr "" "Επιστρέφει μια λίστα με όλα τα κλειδιά που χρησιμοποιούνται στο λεξικό *d*." -#: library/stdtypes.rst:4873 +#: library/stdtypes.rst:5134 msgid "Return the number of items in the dictionary *d*." msgstr "Επιστρέφει τον αριθμό των στοιχείων στο λεξικό *d*." -#: library/stdtypes.rst:4877 +#: library/stdtypes.rst:5138 msgid "" "Return the item of *d* with key *key*. Raises a :exc:`KeyError` if *key* is " "not in the map." @@ -8473,15 +8866,16 @@ msgstr "" "Επιστρέφει το στοιχείο του *d* με το κλειδί *key*. Κάνει raise μια :exc:" "`KeyError` εάν το *key* δεν υπάρχει για να αντιστοιχηθεί." -#: library/stdtypes.rst:4882 +#: library/stdtypes.rst:5143 +#, fuzzy msgid "" -"If a subclass of dict defines a method :meth:`__missing__` and *key* is not " -"present, the ``d[key]`` operation calls that method with the key *key* as " -"argument. The ``d[key]`` operation then returns or raises whatever is " -"returned or raised by the ``__missing__(key)`` call. No other operations or " -"methods invoke :meth:`__missing__`. If :meth:`__missing__` is not defined, :" -"exc:`KeyError` is raised. :meth:`__missing__` must be a method; it cannot be " -"an instance variable::" +"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 " +"*key* as argument. The ``d[key]`` operation then returns or raises whatever " +"is returned or raised by the ``__missing__(key)`` call. No other operations " +"or methods invoke :meth:`~object.__missing__`. If :meth:`~object." +"__missing__` is not defined, :exc:`KeyError` is raised. :meth:`~object." +"__missing__` must be a method; it cannot be an instance variable::" msgstr "" "Εάν μια υποκλάση ενός λεξικού ορίζει μια μέθοδο :meth:`__missing__` και το " "*key* δεν υπάρχει, η λειτουργία ``d[key]`` καλεί αυτήν την μέθοδο με το " @@ -8492,7 +8886,7 @@ msgstr "" "exc:`KeyError`. To :meth:`__missing__` πρέπει να είναι μέθοδος∙ δεν μπορεί " "να είναι ένα στιγμιότυπο μεταβλητής::" -#: library/stdtypes.rst:4890 +#: library/stdtypes.rst:5151 msgid "" ">>> class Counter(dict):\n" "... def __missing__(self, key):\n" @@ -8516,21 +8910,22 @@ msgstr "" ">>> c['red']\n" "1" -#: library/stdtypes.rst:4901 +#: library/stdtypes.rst:5162 +#, fuzzy msgid "" "The example above shows part of the implementation of :class:`collections." -"Counter`. A different ``__missing__`` method is used by :class:`collections." -"defaultdict`." +"Counter`. A different :meth:`!__missing__` method is used by :class:" +"`collections.defaultdict`." msgstr "" "Το παραπάνω παράδειγμα δείχνει μέρος της υλοποίησης του :class:`collections." "Counter`. Μια διαφορετική μέθοδος ``__missing__`` χρησιμοποιείται από την :" "class:`collections.defaultdict`." -#: library/stdtypes.rst:4907 +#: library/stdtypes.rst:5169 msgid "Set ``d[key]`` to *value*." msgstr "Ορίζει το ``d[key]`` στο *value*." -#: library/stdtypes.rst:4911 +#: library/stdtypes.rst:5173 msgid "" "Remove ``d[key]`` from *d*. Raises a :exc:`KeyError` if *key* is not in the " "map." @@ -8538,16 +8933,16 @@ msgstr "" "Αφαιρεί το ``d[key]`` από το *d*. Κάνει raise ένα :exc:`KeyError` εάν το " "*key* δεν υπάρχει για αντιστοίχιση." -#: library/stdtypes.rst:4916 +#: library/stdtypes.rst:5178 msgid "Return ``True`` if *d* has a key *key*, else ``False``." msgstr "" "Επιστρέφει ``True`` εάν το *d* έχει ένα κλειδί *key*, διαφορετικά ``False``." -#: library/stdtypes.rst:4920 +#: library/stdtypes.rst:5182 msgid "Equivalent to ``not key in d``." msgstr "Ισοδυναμεί με ``not key in d``." -#: library/stdtypes.rst:4924 +#: library/stdtypes.rst:5186 msgid "" "Return an iterator over the keys of the dictionary. This is a shortcut for " "``iter(d.keys())``." @@ -8555,21 +8950,21 @@ msgstr "" "Επιστρέφει έναν iterator πάνω από τα κλειδιά του λεξικού. Αυτή είναι μια " "συντόμευση για ``iter(d.keys())``." -#: library/stdtypes.rst:4929 +#: library/stdtypes.rst:5191 msgid "Remove all items from the dictionary." msgstr "Αφαιρεί όλα τα στοιχεία από το λεξικό." -#: library/stdtypes.rst:4933 +#: library/stdtypes.rst:5195 msgid "Return a shallow copy of the dictionary." msgstr "Επιστρέφει ένα ρηχό αντίγραφο του λεξικού." -#: library/stdtypes.rst:4937 +#: library/stdtypes.rst:5199 msgid "" "Create a new dictionary with keys from *iterable* and values set to *value*." msgstr "" "Δημιουργεί ένα νέο λεξικό με κλειδιά από το *iterable* και τιμές ως *value*." -#: library/stdtypes.rst:4939 +#: library/stdtypes.rst:5201 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 " @@ -8584,7 +8979,7 @@ msgstr "" "διαφορετικές τιμές, χρησιμοποιήστε αντ' αυτού ένα :ref:`dict comprehension " "`." -#: library/stdtypes.rst:4947 +#: library/stdtypes.rst:5209 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 " @@ -8594,7 +8989,7 @@ msgstr "" "*default*. Εάν το *default* δεν δίνεται, ορίζεται από προεπιλογή σε " "``None``, έτσι ώστε αυτή η μέθοδος να μην κάνει raise μια :exc:`KeyError`." -#: library/stdtypes.rst:4953 +#: library/stdtypes.rst:5215 msgid "" "Return a new view of the dictionary's items (``(key, value)`` pairs). See " "the :ref:`documentation of view objects `." @@ -8602,7 +8997,7 @@ msgstr "" "Επιστρέφει μια νέα όψη των στοιχείων του λεξικού (``(key, value)`` ζεύγη). " "Δείτε την :ref:`documentation of view objects `." -#: library/stdtypes.rst:4958 +#: library/stdtypes.rst:5220 msgid "" "Return a new view of the dictionary's keys. See the :ref:`documentation of " "view objects `." @@ -8610,7 +9005,7 @@ msgstr "" "Επιστρέφει μια νέα όψη των κλειδιών του λεξικού. Δείτε το :ref:" "`documentation of view objects `." -#: library/stdtypes.rst:4964 +#: library/stdtypes.rst:5226 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 :" @@ -8620,7 +9015,7 @@ msgstr "" "διαφορετικά επιστρέφει *default*. Εάν *default* δεν δίνεται και το *key* " "δεν είναι στο λεξικό, γίνεται raise ένα :exc:`KeyError`." -#: library/stdtypes.rst:4970 +#: library/stdtypes.rst:5232 msgid "" "Remove and return a ``(key, value)`` pair from the dictionary. Pairs are " "returned in :abbr:`LIFO (last-in, first-out)` order." @@ -8628,7 +9023,7 @@ msgstr "" "Αφαιρεί και επιστρέφει ένα ζεύγος ``(key, value)`` από το λεξικό. Τα ζεύγη " "επιστρέφονται με τη σειρά :abbr:`LIFO (last-in, first-out)`." -#: library/stdtypes.rst:4973 +#: library/stdtypes.rst:5235 msgid "" ":meth:`popitem` is useful to destructively iterate over a dictionary, as " "often used in set algorithms. If the dictionary is empty, calling :meth:" @@ -8638,7 +9033,7 @@ msgstr "" "λεξικό, όπως χρησιμοποιείται συχνά σε αλγόριθμους συνόλου. Εάν το λεξικό " "είναι κενό, η κλήση της :meth:`popitem` κάνει raise ένα :exc:`KeyError`." -#: library/stdtypes.rst:4977 +#: library/stdtypes.rst:5239 msgid "" "LIFO order is now guaranteed. In prior versions, :meth:`popitem` would " "return an arbitrary key/value pair." @@ -8646,7 +9041,7 @@ msgstr "" "Η σειρά LIFO είναι πλέον εγγυημένη. Σε προηγούμενες εκδόσεις, η :meth:" "`popitem` επιστρέφει ένα αυθαίρετο ζεύγος κλειδιού/τιμής." -#: library/stdtypes.rst:4983 +#: library/stdtypes.rst:5245 msgid "" "Return a reverse iterator over the keys of the dictionary. This is a " "shortcut for ``reversed(d.keys())``." @@ -8654,7 +9049,7 @@ msgstr "" "Επιστρέφει έναν αντίστροφο iterator πάνω από τα κλειδιά του λεξικού. Αυτή " "είναι μια συντόμευση για ``reversed(d.keys())``." -#: library/stdtypes.rst:4990 +#: library/stdtypes.rst:5252 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``." @@ -8663,7 +9058,7 @@ msgstr "" "εισάγετε το *key* με τιμή *default* και επιστρέφει *default*. Το *default* " "από προεπιλογή είναι ``None``." -#: library/stdtypes.rst:4998 +#: library/stdtypes.rst:5260 msgid "" "Update the dictionary with the key/value pairs from *mapping* or *iterable* " "and *kwargs*, overwriting existing keys. Return ``None``." @@ -8672,7 +9067,7 @@ msgstr "" "*iterable* και *kwargs*, αντικαθιστώντας τα υπάρχοντα κλειδιά. Επιστρέφει " "``None``." -#: library/stdtypes.rst:5001 +#: library/stdtypes.rst:5263 msgid "" ":meth:`update` accepts either another object with a ``keys()`` method (in " "which case :meth:`~object.__getitem__` is called with every key returned " @@ -8687,7 +9082,7 @@ msgstr "" "κλειδιών, το λεξικό ενημερώνεται στη συνέχεια με αυτά τα ζεύγη κλειδιών/" "τιμών: ``d.update(red=1, blue=2)``." -#: library/stdtypes.rst:5009 +#: library/stdtypes.rst:5271 msgid "" "Return a new view of the dictionary's values. See the :ref:`documentation " "of view objects `." @@ -8695,7 +9090,7 @@ msgstr "" "Επιστρέφει μια νέα όψη των τιμών του λεξικού. Δείτε την :ref:`documentation " "of view objects `." -#: library/stdtypes.rst:5012 +#: library/stdtypes.rst:5274 msgid "" "An equality comparison between one ``dict.values()`` view and another will " "always return ``False``. This also applies when comparing ``dict.values()`` " @@ -8705,7 +9100,7 @@ msgstr "" "επιστρέφει πάντα ``False``. Αυτό ισχύει επίσης όταν συγκρίνετε το ``dict." "values()`` με τον εαυτό της::" -#: library/stdtypes.rst:5016 +#: library/stdtypes.rst:5278 msgid "" ">>> d = {'a': 1}\n" ">>> d.values() == d.values()\n" @@ -8715,7 +9110,7 @@ msgstr "" ">>> d.values() == d.values()\n" "False" -#: library/stdtypes.rst:5022 +#: library/stdtypes.rst:5284 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 " @@ -8725,7 +9120,7 @@ msgstr "" "και *other*, τα οποία πρέπει να είναι και τα δύο λεξικά. Οι τιμές του " "*other* έχουν προτεραιότητα όταν τα κλειδιά των *d* και *other* είναι κοινά." -#: library/stdtypes.rst:5030 +#: library/stdtypes.rst:5292 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 " @@ -8736,11 +9131,11 @@ msgstr "" "τιμές του *other* έχουν προτεραιότητα όταν τα κλειδιά των το *d* και *other* " "είναι κοινά." -#: library/stdtypes.rst:5036 +#: library/stdtypes.rst:5298 msgid "Dictionaries and dictionary views are reversible. ::" msgstr "Τα λεξικά και οι όψεις λεξικών είναι αναστρέψιμες. ::" -#: library/stdtypes.rst:5038 +#: library/stdtypes.rst:5300 msgid "" ">>> d = {\"one\": 1, \"two\": 2, \"three\": 3, \"four\": 4}\n" ">>> d\n" @@ -8762,11 +9157,11 @@ msgstr "" ">>> list(reversed(d.items()))\n" "[('four', 4), ('three', 3), ('two', 2), ('one', 1)]" -#: library/stdtypes.rst:5048 +#: library/stdtypes.rst:5310 msgid "Dictionaries are now reversible." msgstr "Τα λεξικά είναι πλέον αναστρέψιμα." -#: library/stdtypes.rst:5053 +#: library/stdtypes.rst:5315 msgid "" ":class:`types.MappingProxyType` can be used to create a read-only view of a :" "class:`dict`." @@ -8774,11 +9169,11 @@ msgstr "" "Η :class:`types.MappingProxyType` μπορεί να χρησιμοποιηθεί για τη δημιουργία " "μιας όψης μόνο για ανάγνωση μιας :class:`dict`." -#: library/stdtypes.rst:5060 +#: library/stdtypes.rst:5322 msgid "Dictionary view objects" msgstr "Αντικείμενα όψης λεξικού" -#: library/stdtypes.rst:5062 +#: library/stdtypes.rst:5324 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 " @@ -8790,7 +9185,7 @@ msgstr "" "Παρέχουν μια δυναμική όψη στις εγγραφές του λεξικού, που σημαίνει ότι όταν " "αλλάζει το λεξικό, η όψη αντικατοπτρίζει αυτές τις αλλαγές." -#: library/stdtypes.rst:5067 +#: library/stdtypes.rst:5329 msgid "" "Dictionary views can be iterated over to yield their respective data, and " "support membership tests:" @@ -8798,11 +9193,11 @@ msgstr "" "Οι όψεις λεξικού μπορούν να γίνουν iterate για την απόδοση των αντίστοιχων " "δεδομένων τους και την υποστήριξη ελέγχων για το αν είναι μέρος του:" -#: library/stdtypes.rst:5072 +#: library/stdtypes.rst:5334 msgid "Return the number of entries in the dictionary." msgstr "Επιστρέφει τον αριθμό των καταχωρήσεων στο λεξικό." -#: library/stdtypes.rst:5076 +#: library/stdtypes.rst:5338 msgid "" "Return an iterator over the keys, values or items (represented as tuples of " "``(key, value)``) in the dictionary." @@ -8810,7 +9205,7 @@ msgstr "" "Επιστρέφει έναν iterator πάνω στα κλειδιά, τις τιμές ή τα στοιχεία (που " "αντιπροσωπεύονται ως πλειάδες (tuples) του ``(key, value)`` στο λεξικό." -#: library/stdtypes.rst:5079 +#: library/stdtypes.rst:5341 msgid "" "Keys and values are iterated over in insertion order. This allows the " "creation of ``(value, key)`` pairs using :func:`zip`: ``pairs = zip(d." @@ -8823,7 +9218,7 @@ msgstr "" "δημιουργήσετε την ίδια λίστα είναι ``pairs = [(v, k) for (k, v) in d." "items()]``." -#: library/stdtypes.rst:5084 +#: library/stdtypes.rst:5346 msgid "" "Iterating views while adding or deleting entries in the dictionary may raise " "a :exc:`RuntimeError` or fail to iterate over all entries." @@ -8832,11 +9227,11 @@ msgstr "" "μπορεί να κάνει raise μια :exc:`RuntimeError` ή να αποτύχει το iterate σε " "όλες τις καταχωρήσεις." -#: library/stdtypes.rst:5087 +#: library/stdtypes.rst:5349 msgid "Dictionary order is guaranteed to be insertion order." msgstr "Η σειρά λεξικού είναι εγγυημένη σειρά εισαγωγής." -#: library/stdtypes.rst:5092 +#: library/stdtypes.rst:5354 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)." @@ -8845,7 +9240,7 @@ msgstr "" "ή τα στοιχεία του υποκείμενου λεξικού (στην τελευταία περίπτωση, το *x* θα " "πρέπει να είναι μια ``(key, value)`` πλειάδα (tuple))." -#: library/stdtypes.rst:5097 +#: library/stdtypes.rst:5359 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." @@ -8854,11 +9249,11 @@ msgstr "" "στοιχεία του λεξικού. Η όψη θα γίνει iterate με την αντίστροφη σειρά από την " "εισαγωγή." -#: library/stdtypes.rst:5100 +#: library/stdtypes.rst:5362 msgid "Dictionary views are now reversible." msgstr "Οι όψεις λεξικού είναι πλέον αναστρέψιμες." -#: library/stdtypes.rst:5105 +#: library/stdtypes.rst:5367 msgid "" "Return a :class:`types.MappingProxyType` that wraps the original dictionary " "to which the view refers." @@ -8866,7 +9261,7 @@ msgstr "" "Επιστρέφει μια :class:`types.MappingProxyType` που αναδιπλώνει το αρχικό " "λεξικό στο οποίο αναφέρεται η όψη." -#: library/stdtypes.rst:5110 +#: library/stdtypes.rst:5372 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 " @@ -8892,11 +9287,11 @@ msgstr "" "μοιάζουν με σύνολο δέχονται οποιοδήποτε iterable ως άλλο τελεστή, σε " "αντίθεση με τα σύνολα που δέχονται μόνο σύνολα ως είσοδο." -#: library/stdtypes.rst:5122 +#: library/stdtypes.rst:5384 msgid "An example of dictionary view usage::" msgstr "Ένα παράδειγμα χρήσης όψης λεξικού::" -#: library/stdtypes.rst:5124 +#: library/stdtypes.rst:5386 msgid "" ">>> dishes = {'eggs': 2, 'sausage': 1, 'bacon': 1, 'spam': 500}\n" ">>> keys = dishes.keys()\n" @@ -8974,11 +9369,11 @@ msgstr "" ">>> values.mapping['spam']\n" "500" -#: library/stdtypes.rst:5166 +#: library/stdtypes.rst:5428 msgid "Context Manager Types" msgstr "Τύποι Διαχείρισης Περιεχομένου" -#: library/stdtypes.rst:5173 +#: library/stdtypes.rst:5435 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 " @@ -8992,7 +9387,7 @@ msgstr "" "εισάγεται πριν από την εκτέλεση του σώματος της δήλωσης και να κάνει έξοδο " "όταν τερματιστεί η δήλωση:" -#: library/stdtypes.rst:5181 +#: library/stdtypes.rst:5443 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 " @@ -9004,7 +9399,7 @@ msgstr "" "επιστρέφεται από αυτήν την μέθοδο είναι δεσμευμένη στο αναγνωριστικό στην " "πρόταση :keyword:`!as` των δηλώσεων :keyword:`with` διαχείρισης περιεχομένου." -#: library/stdtypes.rst:5186 +#: library/stdtypes.rst:5448 msgid "" "An example of a context manager that returns itself is a :term:`file " "object`. File objects return themselves from __enter__() to allow :func:" @@ -9015,7 +9410,7 @@ msgstr "" "__enter__() για να επιτρέψουν στο :func:`open` να χρησιμοποιηθεί ως έκφραση " "περιεχομένου σε μια δήλωση :keyword:`with`." -#: library/stdtypes.rst:5190 +#: library/stdtypes.rst:5452 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 " @@ -9032,7 +9427,7 @@ msgstr "" "πλαίσιο στο σώμα της δήλωσης :keyword:`with`, χωρίς να επηρεάζεται ο κώδικας " "εκτός της δήλωσης :keyword:`!with`." -#: library/stdtypes.rst:5200 +#: library/stdtypes.rst:5462 msgid "" "Exit the runtime context and return a Boolean flag indicating if any " "exception that occurred should be suppressed. If an exception occurred while " @@ -9047,15 +9442,13 @@ msgstr "" "και τις πληροφορίες ανίχνευσης. Διαφορετικά, και τα τρία ορίσματα είναι " "``None``." -#: library/stdtypes.rst:5205 +#: library/stdtypes.rst:5467 +#, fuzzy msgid "" "Returning a true value from this method will cause the :keyword:`with` " "statement to suppress the exception and continue execution with the " "statement immediately following the :keyword:`!with` statement. Otherwise " -"the exception continues propagating after this method has finished " -"executing. Exceptions that occur during execution of this method will " -"replace any exception that occurred in the body of the :keyword:`!with` " -"statement." +"the exception continues propagating after this method has finished executing." msgstr "" "Η επιστροφή μιας πραγματικής τιμής από αυτήν την μέθοδο θα έχει ως " "αποτέλεσμα η δήλωση :keyword:`with` να καταργήσει την εξαίρεση και να " @@ -9065,7 +9458,14 @@ msgstr "" "μεθόδου θα αντικαταστήσουν κάθε εξαίρεση που προέκυψε στο σώμα της δήλωσης :" "keyword:`!with`." -#: library/stdtypes.rst:5212 +#: library/stdtypes.rst:5472 +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:5476 msgid "" "The exception passed in should never be reraised explicitly - instead, this " "method should return a false value to indicate that the method completed " @@ -9080,7 +9480,7 @@ msgstr "" "περιεχομένου να εντοπίζει εύκολα εάν μια μέθοδος :meth:`~object.__exit__` " "έχει πράγματι αποτύχει." -#: library/stdtypes.rst:5218 +#: library/stdtypes.rst:5482 msgid "" "Python defines several context managers to support easy thread " "synchronisation, prompt closure of files or other objects, and simpler " @@ -9095,7 +9495,7 @@ msgstr "" "τους πρωτοκόλλου διαχείρισης περιεχομένου. Δείτε το module :mod:`contextlib` " "για μερικά παραδείγματα." -#: library/stdtypes.rst:5224 +#: library/stdtypes.rst:5488 msgid "" "Python's :term:`generator`\\s and the :class:`contextlib.contextmanager` " "decorator provide a convenient way to implement these protocols. If a " @@ -9112,7 +9512,7 @@ msgstr "" "__enter__` και :meth:`~contextmanager.__exit__`, αντί του iterator που " "παράγεται από μια undecorated συνάρτηση γεννήτριας." -#: library/stdtypes.rst:5231 +#: library/stdtypes.rst:5495 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 " @@ -9127,7 +9527,7 @@ msgstr "" "της ρύθμισης στο πλαίσιο του χρόνου εκτέλεσης, η επιβάρυνση μιας απλής " "αναζήτησης κλάσης λεξικού είναι αμελητέα." -#: library/stdtypes.rst:5239 +#: library/stdtypes.rst:5503 msgid "" "Type Annotation Types --- :ref:`Generic Alias `, :ref:" "`Union `" @@ -9135,7 +9535,7 @@ msgstr "" "Τύποι Annotation τύπου --- :ref:`Generic Alias `, :ref:" "`Union `" -#: library/stdtypes.rst:5244 +#: library/stdtypes.rst:5508 msgid "" "The core built-in types for :term:`type annotations ` are :ref:" "`Generic Alias ` and :ref:`Union `." @@ -9144,11 +9544,11 @@ msgstr "" "είναι :ref:`Generic Alias ` και :ref:`Union `." -#: library/stdtypes.rst:5251 +#: library/stdtypes.rst:5515 msgid "Generic Alias Type" msgstr "Τύπος Generic Alias" -#: library/stdtypes.rst:5257 +#: library/stdtypes.rst:5521 msgid "" "``GenericAlias`` objects are generally created by :ref:`subscripting " "` a class. They are most often used with :ref:`container " @@ -9165,7 +9565,7 @@ msgstr "" "Τα αντικείμενα ``GenericAlias`` προορίζονται κυρίως για χρήση με :term:`type " "annotations `." -#: library/stdtypes.rst:5267 +#: library/stdtypes.rst:5531 msgid "" "It is generally only possible to subscript a class if the class implements " "the special method :meth:`~object.__class_getitem__`." @@ -9173,7 +9573,7 @@ msgstr "" "Γενικά είναι δυνατή η εγγραφή μιας κλάσης μόνο εάν η κλάση εφαρμόζει την " "ειδική μέθοδο :meth:`~object.__class_getitem__`." -#: library/stdtypes.rst:5270 +#: library/stdtypes.rst:5534 msgid "" "A ``GenericAlias`` object acts as a proxy for a :term:`generic type`, " "implementing *parameterized generics*." @@ -9181,7 +9581,7 @@ msgstr "" "Ένα αντικείμενο ``GenericAlias`` λειτουργεί ως διακομιστής μεσολάβησης " "(proxy) για έναν :term:`generic type`, υλοποιώντας *parameterized generics*." -#: library/stdtypes.rst:5273 +#: library/stdtypes.rst:5537 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 " @@ -9196,7 +9596,7 @@ msgstr "" "υποδηλώσει ένα :class:`set` στο οποίο όλα τα στοιχεία είναι τύπου :class:" "`bytes`." -#: library/stdtypes.rst:5279 +#: library/stdtypes.rst:5543 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 " @@ -9211,7 +9611,7 @@ msgstr "" "expressions ` μπορούν να χρησιμοποιηθούν τόσο στον τύπο δεδομένων :class:" "`str` όσο και στον τύπο δεδομένων :class:`bytes`:" -#: library/stdtypes.rst:5285 +#: library/stdtypes.rst:5549 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 " @@ -9224,7 +9624,7 @@ msgstr "" "αναπαραστήσουμε αυτό το είδος αντικειμένου σε σχολιασμούς τύπου με το " "``GenericAlias`` ``re.Match[str]``." -#: library/stdtypes.rst:5291 +#: library/stdtypes.rst:5555 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." @@ -9239,17 +9639,20 @@ msgstr "" "ποικιλία αντικειμένων :ref:`re.Match ` με το ``re." "Match[bytes]``." -#: library/stdtypes.rst:5297 +#: library/stdtypes.rst:5561 +#, fuzzy msgid "" "``GenericAlias`` objects are instances of the class :class:`types." "GenericAlias`, which can also be used to create ``GenericAlias`` objects " -"directly." +"directly. Specializations of user-defined :ref:`generic classes ` may not be instances of :class:`types.GenericAlias`, but they " +"provide similar functionality." msgstr "" "Τα αντικείμενα ``GenericAlias`` είναι στιγμιότυπα της κλάσης :class:`types." "GenericAlias`, τα οποία μπορούν επίσης να χρησιμοποιηθούν για την δημιουργία " "αντικειμένων ``GenericAlias`` απευθείας." -#: library/stdtypes.rst:5303 +#: library/stdtypes.rst:5568 msgid "" "Creates a ``GenericAlias`` representing a type ``T`` parameterized by types " "*X*, *Y*, and more depending on the ``T`` used. For example, a function " @@ -9260,7 +9663,7 @@ msgstr "" "χρησιμοποιείται. Για παράδειγμα, μια συνάρτηση που αναμένει μια :class:" "`list` που περιέχει στοιχεία της :class:`float`::" -#: library/stdtypes.rst:5308 +#: library/stdtypes.rst:5573 msgid "" "def average(values: list[float]) -> float:\n" " return sum(values) / len(values)" @@ -9268,7 +9671,7 @@ msgstr "" "def average(values: list[float]) -> float:\n" " return sum(values) / len(values)" -#: library/stdtypes.rst:5311 +#: library/stdtypes.rst:5576 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 " @@ -9281,7 +9684,7 @@ msgstr "" "παράδειγμα, η συνάρτηση αναμένει ένα ``dict`` με κλειδιά τύπου :class:`str` " "και τιμές τύπου :class:`int`::" -#: library/stdtypes.rst:5316 +#: library/stdtypes.rst:5581 msgid "" "def send_post_request(url: str, body: dict[str, int]) -> None:\n" " ..." @@ -9289,7 +9692,7 @@ msgstr "" "def send_post_request(url: str, body: dict[str, int]) -> None:\n" " ..." -#: library/stdtypes.rst:5319 +#: library/stdtypes.rst:5584 msgid "" "The builtin functions :func:`isinstance` and :func:`issubclass` do not " "accept ``GenericAlias`` types for their second argument::" @@ -9298,7 +9701,7 @@ msgstr "" "`issubclass` δεν δέχονται τους τύπους ``GenericAlias`` για το δεύτερο όρισμά " "τους::" -#: library/stdtypes.rst:5322 +#: library/stdtypes.rst:5587 msgid "" ">>> isinstance([1, 2], list[str])\n" "Traceback (most recent call last):\n" @@ -9310,7 +9713,7 @@ msgstr "" " File \"\", line 1, in \n" "TypeError: isinstance() argument 2 cannot be a parameterized generic" -#: library/stdtypes.rst:5327 +#: library/stdtypes.rst:5592 msgid "" "The Python runtime does not enforce :term:`type annotations `. " "This extends to generic types and their type parameters. When creating a " @@ -9325,7 +9728,7 @@ msgstr "" "τους. Για παράδειγμα, ο ακόλουθος κώδικας αποθαρρύνεται, αλλά θα εκτελεστεί " "χωρίς σφάλματα::" -#: library/stdtypes.rst:5333 +#: library/stdtypes.rst:5598 msgid "" ">>> t = list[str]\n" ">>> t([1, 2, 3])\n" @@ -9335,7 +9738,7 @@ msgstr "" ">>> t([1, 2, 3])\n" "[1, 2, 3]" -#: library/stdtypes.rst:5337 +#: library/stdtypes.rst:5602 msgid "" "Furthermore, parameterized generics erase type parameters during object " "creation::" @@ -9343,7 +9746,7 @@ msgstr "" "Επιπλέον, τα παραμετροποιημένα generics διαγράφουν τις παραμέτρους τύπου " "κατά τη δημιουργία αντικειμένου::" -#: library/stdtypes.rst:5340 +#: library/stdtypes.rst:5605 msgid "" ">>> t = list[str]\n" ">>> type(t)\n" @@ -9361,7 +9764,28 @@ msgstr "" ">>> type(l)\n" "" -#: library/stdtypes.rst:5348 +#: library/stdtypes.rst:5614 +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:5616 +msgid "" +">>> import inspect\n" +">>> inspect.isclass(list[int])\n" +"False" +msgstr "" + +#: library/stdtypes.rst:5620 +#, fuzzy +msgid "" +"This is true for :ref:`user-defined generics ` also." +msgstr "" +"Τα :ref:`Generics`, :ref:`user-defined generics ` " +"και :class:`typing.Generic`" + +#: library/stdtypes.rst:5622 msgid "" "Calling :func:`repr` or :func:`str` on a generic shows the parameterized " "type::" @@ -9369,7 +9793,7 @@ msgstr "" "Η κλήση :func:`repr` ή :func:`str` σε ένα generic δείχνει τον " "παραμετροποιημένο τύπο::" -#: library/stdtypes.rst:5350 +#: library/stdtypes.rst:5624 msgid "" ">>> repr(list[int])\n" "'list[int]'\n" @@ -9383,7 +9807,7 @@ msgstr "" ">>> str(list[int])\n" "'list[int]'" -#: library/stdtypes.rst:5356 +#: library/stdtypes.rst:5630 msgid "" "The :meth:`~object.__getitem__` method of generic containers will raise an " "exception to disallow mistakes like ``dict[str][str]``::" @@ -9391,7 +9815,7 @@ msgstr "" "Η μέθοδος :meth:`~object.__getitem__` των generic containers θα κάνει raise " "μια εξαίρεση για την απαγόρευση λαθών όπως ``dict[str][str]``::" -#: library/stdtypes.rst:5359 +#: library/stdtypes.rst:5633 msgid "" ">>> dict[str][str]\n" "Traceback (most recent call last):\n" @@ -9403,7 +9827,7 @@ msgstr "" " ...\n" "TypeError: dict[str] is not a generic class" -#: library/stdtypes.rst:5364 +#: library/stdtypes.rst:5638 msgid "" "However, such expressions are valid when :ref:`type variables ` " "are used. The index must have as many elements as there are type variable " @@ -9414,7 +9838,7 @@ msgstr "" "στοιχεία όσα και τα στοιχεία μεταβλητής τύπου στο αντικείμενο " "``GenericAlias`` :attr:`~genericalias.__args__`. ::" -#: library/stdtypes.rst:5368 +#: library/stdtypes.rst:5642 msgid "" ">>> from typing import TypeVar\n" ">>> Y = TypeVar('Y')\n" @@ -9426,11 +9850,11 @@ msgstr "" ">>> dict[str, Y][int]\n" "dict[str, int]" -#: library/stdtypes.rst:5375 +#: library/stdtypes.rst:5649 msgid "Standard Generic Classes" msgstr "Τυπικές Γενικές Κλάσεις" -#: library/stdtypes.rst:5377 +#: library/stdtypes.rst:5651 msgid "" "The following standard library classes support parameterized generics. This " "list is non-exhaustive." @@ -9438,245 +9862,245 @@ msgstr "" "Οι ακόλουθες τυπικές κλάσεις βιβλιοθήκης υποστηρίζουν γενικά " "παραμετροποιημένα. Αυτή η λίστα δεν είναι εξαντλητική." -#: library/stdtypes.rst:5380 +#: library/stdtypes.rst:5654 msgid ":class:`tuple`" msgstr ":class:`tuple`" -#: library/stdtypes.rst:5381 +#: library/stdtypes.rst:5655 msgid ":class:`list`" msgstr ":class:`list`" -#: library/stdtypes.rst:5382 +#: library/stdtypes.rst:5656 msgid ":class:`dict`" msgstr ":class:`dict`" -#: library/stdtypes.rst:5383 +#: library/stdtypes.rst:5657 msgid ":class:`set`" msgstr ":class:`set`" -#: library/stdtypes.rst:5384 +#: library/stdtypes.rst:5658 msgid ":class:`frozenset`" msgstr ":class:`frozenset`" -#: library/stdtypes.rst:5385 +#: library/stdtypes.rst:5659 msgid ":class:`type`" msgstr ":class:`type`" -#: library/stdtypes.rst:5386 +#: library/stdtypes.rst:5660 msgid ":class:`asyncio.Future`" msgstr ":class:`asyncio.Future`" -#: library/stdtypes.rst:5387 +#: library/stdtypes.rst:5661 msgid ":class:`asyncio.Task`" msgstr ":class:`asyncio.Task`" -#: library/stdtypes.rst:5388 +#: library/stdtypes.rst:5662 msgid ":class:`collections.deque`" msgstr ":class:`collections.deque`" -#: library/stdtypes.rst:5389 +#: library/stdtypes.rst:5663 msgid ":class:`collections.defaultdict`" msgstr ":class:`collections.defaultdict`" -#: library/stdtypes.rst:5390 +#: library/stdtypes.rst:5664 msgid ":class:`collections.OrderedDict`" msgstr ":class:`collections.OrderedDict`" -#: library/stdtypes.rst:5391 +#: library/stdtypes.rst:5665 msgid ":class:`collections.Counter`" msgstr ":class:`collections.Counter`" -#: library/stdtypes.rst:5392 +#: library/stdtypes.rst:5666 msgid ":class:`collections.ChainMap`" msgstr ":class:`collections.ChainMap`" -#: library/stdtypes.rst:5393 +#: library/stdtypes.rst:5667 msgid ":class:`collections.abc.Awaitable`" msgstr ":class:`collections.abc.Awaitable`" -#: library/stdtypes.rst:5394 +#: library/stdtypes.rst:5668 msgid ":class:`collections.abc.Coroutine`" msgstr ":class:`collections.abc.Coroutine`" -#: library/stdtypes.rst:5395 +#: library/stdtypes.rst:5669 msgid ":class:`collections.abc.AsyncIterable`" msgstr ":class:`collections.abc.AsyncIterable`" -#: library/stdtypes.rst:5396 +#: library/stdtypes.rst:5670 msgid ":class:`collections.abc.AsyncIterator`" msgstr ":class:`collections.abc.AsyncIterator`" -#: library/stdtypes.rst:5397 +#: library/stdtypes.rst:5671 msgid ":class:`collections.abc.AsyncGenerator`" msgstr ":class:`collections.abc.AsyncGenerator`" -#: library/stdtypes.rst:5398 +#: library/stdtypes.rst:5672 msgid ":class:`collections.abc.Iterable`" msgstr ":class:`collections.abc.Iterable`" -#: library/stdtypes.rst:5399 +#: library/stdtypes.rst:5673 msgid ":class:`collections.abc.Iterator`" msgstr ":class:`collections.abc.Iterator`" -#: library/stdtypes.rst:5400 +#: library/stdtypes.rst:5674 msgid ":class:`collections.abc.Generator`" msgstr ":class:`collections.abc.Generator`" -#: library/stdtypes.rst:5401 +#: library/stdtypes.rst:5675 msgid ":class:`collections.abc.Reversible`" msgstr ":class:`collections.abc.Reversible`" -#: library/stdtypes.rst:5402 +#: library/stdtypes.rst:5676 msgid ":class:`collections.abc.Container`" msgstr ":class:`collections.abc.Container`" -#: library/stdtypes.rst:5403 +#: library/stdtypes.rst:5677 msgid ":class:`collections.abc.Collection`" msgstr ":class:`collections.abc.Collection`" -#: library/stdtypes.rst:5404 +#: library/stdtypes.rst:5678 msgid ":class:`collections.abc.Callable`" msgstr ":class:`collections.abc.Callable`" -#: library/stdtypes.rst:5405 +#: library/stdtypes.rst:5679 msgid ":class:`collections.abc.Set`" msgstr ":class:`collections.abc.Set`" -#: library/stdtypes.rst:5406 +#: library/stdtypes.rst:5680 msgid ":class:`collections.abc.MutableSet`" msgstr ":class:`collections.abc.MutableSet`" -#: library/stdtypes.rst:5407 +#: library/stdtypes.rst:5681 msgid ":class:`collections.abc.Mapping`" msgstr ":class:`collections.abc.Mapping`" -#: library/stdtypes.rst:5408 +#: library/stdtypes.rst:5682 msgid ":class:`collections.abc.MutableMapping`" msgstr ":class:`collections.abc.MutableMapping`" -#: library/stdtypes.rst:5409 +#: library/stdtypes.rst:5683 msgid ":class:`collections.abc.Sequence`" msgstr ":class:`collections.abc.Sequence`" -#: library/stdtypes.rst:5410 +#: library/stdtypes.rst:5684 msgid ":class:`collections.abc.MutableSequence`" msgstr ":class:`collections.abc.MutableSequence`" -#: library/stdtypes.rst:5411 +#: library/stdtypes.rst:5685 msgid ":class:`collections.abc.ByteString`" msgstr ":class:`collections.abc.ByteString`" -#: library/stdtypes.rst:5412 +#: library/stdtypes.rst:5686 msgid ":class:`collections.abc.MappingView`" msgstr ":class:`collections.abc.MappingView`" -#: library/stdtypes.rst:5413 +#: library/stdtypes.rst:5687 msgid ":class:`collections.abc.KeysView`" msgstr ":class:`collections.abc.KeysView`" -#: library/stdtypes.rst:5414 +#: library/stdtypes.rst:5688 msgid ":class:`collections.abc.ItemsView`" msgstr ":class:`collections.abc.ItemsView`" -#: library/stdtypes.rst:5415 +#: library/stdtypes.rst:5689 msgid ":class:`collections.abc.ValuesView`" msgstr ":class:`collections.abc.ValuesView`" -#: library/stdtypes.rst:5416 +#: library/stdtypes.rst:5690 msgid ":class:`contextlib.AbstractContextManager`" msgstr ":class:`contextlib.AbstractContextManager`" -#: library/stdtypes.rst:5417 +#: library/stdtypes.rst:5691 msgid ":class:`contextlib.AbstractAsyncContextManager`" msgstr ":class:`contextlib.AbstractAsyncContextManager`" -#: library/stdtypes.rst:5418 +#: library/stdtypes.rst:5692 msgid ":class:`dataclasses.Field`" msgstr ":class:`dataclasses.Field`" -#: library/stdtypes.rst:5419 +#: library/stdtypes.rst:5693 msgid ":class:`functools.cached_property`" msgstr ":class:`functools.cached_property`" -#: library/stdtypes.rst:5420 +#: library/stdtypes.rst:5694 msgid ":class:`functools.partialmethod`" msgstr ":class:`functools.partialmethod`" -#: library/stdtypes.rst:5421 +#: library/stdtypes.rst:5695 msgid ":class:`os.PathLike`" msgstr ":class:`os.PathLike`" -#: library/stdtypes.rst:5422 +#: library/stdtypes.rst:5696 msgid ":class:`queue.LifoQueue`" msgstr ":class:`queue.LifoQueue`" -#: library/stdtypes.rst:5423 +#: library/stdtypes.rst:5697 msgid ":class:`queue.Queue`" msgstr ":class:`queue.Queue`" -#: library/stdtypes.rst:5424 +#: library/stdtypes.rst:5698 msgid ":class:`queue.PriorityQueue`" msgstr ":class:`queue.PriorityQueue`" -#: library/stdtypes.rst:5425 +#: library/stdtypes.rst:5699 msgid ":class:`queue.SimpleQueue`" msgstr ":class:`queue.SimpleQueue`" -#: library/stdtypes.rst:5426 +#: library/stdtypes.rst:5700 msgid ":ref:`re.Pattern `" msgstr ":ref:`re.Pattern `" -#: library/stdtypes.rst:5427 +#: library/stdtypes.rst:5701 msgid ":ref:`re.Match `" msgstr ":ref:`re.Match `" -#: library/stdtypes.rst:5428 +#: library/stdtypes.rst:5702 msgid ":class:`shelve.BsdDbShelf`" msgstr ":class:`shelve.BsdDbShelf`" -#: library/stdtypes.rst:5429 +#: library/stdtypes.rst:5703 msgid ":class:`shelve.DbfilenameShelf`" msgstr ":class:`shelve.DbfilenameShelf`" -#: library/stdtypes.rst:5430 +#: library/stdtypes.rst:5704 msgid ":class:`shelve.Shelf`" msgstr ":class:`shelve.Shelf`" -#: library/stdtypes.rst:5431 +#: library/stdtypes.rst:5705 msgid ":class:`types.MappingProxyType`" msgstr ":class:`types.MappingProxyType`" -#: library/stdtypes.rst:5432 +#: library/stdtypes.rst:5706 msgid ":class:`weakref.WeakKeyDictionary`" msgstr ":class:`weakref.WeakKeyDictionary`" -#: library/stdtypes.rst:5433 +#: library/stdtypes.rst:5707 msgid ":class:`weakref.WeakMethod`" msgstr ":class:`weakref.WeakMethod`" -#: library/stdtypes.rst:5434 +#: library/stdtypes.rst:5708 msgid ":class:`weakref.WeakSet`" msgstr ":class:`weakref.WeakSet`" -#: library/stdtypes.rst:5435 +#: library/stdtypes.rst:5709 msgid ":class:`weakref.WeakValueDictionary`" msgstr ":class:`weakref.WeakValueDictionary`" -#: library/stdtypes.rst:5440 +#: library/stdtypes.rst:5714 msgid "Special Attributes of ``GenericAlias`` objects" msgstr "Ειδικά Χαρακτηριστικά αντικειμένων ``GenericAlias``" -#: library/stdtypes.rst:5442 +#: library/stdtypes.rst:5716 msgid "All parameterized generics implement special read-only attributes." msgstr "" "Όλα τα παραμετροποιημένα generics εφαρμόζουν ειδικά χαρακτηριστικά μόνο για " "ανάγνωση." -#: library/stdtypes.rst:5446 +#: library/stdtypes.rst:5720 msgid "This attribute points at the non-parameterized generic class::" msgstr "Αυτό το χαρακτηριστικό δείχνει στη μη παραμετροποιημένη γενική κλάση::" -#: library/stdtypes.rst:5448 +#: library/stdtypes.rst:5722 msgid "" ">>> list[int].__origin__\n" "" @@ -9684,7 +10108,7 @@ msgstr "" ">>> list[int].__origin__\n" "" -#: library/stdtypes.rst:5454 +#: library/stdtypes.rst:5728 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 " @@ -9694,7 +10118,7 @@ msgstr "" "τύπων που μεταβιβάστηκαν στο αρχικό :meth:`~object.__class_getitem__` της " "generic κλάσης::" -#: library/stdtypes.rst:5458 +#: library/stdtypes.rst:5732 msgid "" ">>> dict[str, list[int]].__args__\n" "(, list[int])" @@ -9702,7 +10126,7 @@ msgstr "" ">>> dict[str, list[int]].__args__\n" "(, list[int])" -#: library/stdtypes.rst:5464 +#: library/stdtypes.rst:5738 msgid "" "This attribute is a lazily computed tuple (possibly empty) of unique type " "variables found in ``__args__``::" @@ -9710,7 +10134,7 @@ msgstr "" "Αυτό το χαρακτηριστικό είναι μία νωχελικά υπολογισμένη πλειάδα (tuple) " "(πιθανώς κενή) μεταβλητών μοναδικού τύπου που βρίσκονται στο ``__args__``::" -#: library/stdtypes.rst:5467 +#: library/stdtypes.rst:5741 msgid "" ">>> from typing import TypeVar\n" "\n" @@ -9724,7 +10148,7 @@ msgstr "" ">>> list[T].__parameters__\n" "(~T,)" -#: library/stdtypes.rst:5475 +#: library/stdtypes.rst:5749 msgid "" "A ``GenericAlias`` object with :class:`typing.ParamSpec` parameters may not " "have correct ``__parameters__`` after substitution because :class:`typing." @@ -9735,7 +10159,7 @@ msgstr "" "επειδή το :class:`typing.ParamSpec` προορίζεται κυρίως για έλεγχο στατικού " "τύπου." -#: library/stdtypes.rst:5482 +#: library/stdtypes.rst:5756 msgid "" "A boolean that is true if the alias has been unpacked using the ``*`` " "operator (see :data:`~typing.TypeVarTuple`)." @@ -9743,19 +10167,19 @@ msgstr "" "Ένα boolean που ισχύει αν το alias έχει αποσυμπιεστεί χρησιμοποιώντας τον " "τελεστή ``*`` (δείτε το :data:`~typing.TypeVarTuple`)." -#: library/stdtypes.rst:5490 +#: library/stdtypes.rst:5764 msgid ":pep:`484` - Type Hints" msgstr ":pep:`484` - Type Hints" -#: library/stdtypes.rst:5491 +#: library/stdtypes.rst:5765 msgid "Introducing Python's framework for type annotations." msgstr "Παρουσιάζοντας το framework της Python για τύπους annotations." -#: library/stdtypes.rst:5493 +#: library/stdtypes.rst:5767 msgid ":pep:`585` - Type Hinting Generics In Standard Collections" msgstr ":pep:`585` - Τύπος Generics Συμβουλών στις Τυπικές Συλλογές" -#: library/stdtypes.rst:5494 +#: library/stdtypes.rst:5768 msgid "" "Introducing the ability to natively parameterize standard-library classes, " "provided they implement the special class method :meth:`~object." @@ -9765,7 +10189,7 @@ msgstr "" "βιβλιοθήκης, υπό την προϋπόθεση ότι εφαρμόζουν τη μέθοδο ειδικής κλάσης :" "meth:`~object.__class_getitem__`." -#: library/stdtypes.rst:5498 +#: library/stdtypes.rst:5772 msgid "" ":ref:`Generics`, :ref:`user-defined generics ` and :" "class:`typing.Generic`" @@ -9773,7 +10197,7 @@ msgstr "" "Τα :ref:`Generics`, :ref:`user-defined generics ` " "και :class:`typing.Generic`" -#: library/stdtypes.rst:5499 +#: library/stdtypes.rst:5773 msgid "" "Documentation on how to implement generic classes that can be parameterized " "at runtime and understood by static type-checkers." @@ -9782,11 +10206,11 @@ msgstr "" "παραμετροποιηθούν κατά το χρόνο εκτέλεσης και να κατανοηθούν από στατικούς " "ελεγκτές τύπων." -#: library/stdtypes.rst:5508 +#: library/stdtypes.rst:5782 msgid "Union Type" msgstr "Τύπος Ένωσης" -#: library/stdtypes.rst:5514 +#: library/stdtypes.rst:5788 msgid "" "A union object holds the value of the ``|`` (bitwise or) operation on " "multiple :ref:`type objects `. These types are intended " @@ -9800,7 +10224,7 @@ msgstr "" "έκφραση τύπου ένωσης επιτρέπει την καθαρότερη σύνταξη υπόδειξης σε σύγκριση " "με το :data:`typing.Union`." -#: library/stdtypes.rst:5521 +#: library/stdtypes.rst:5795 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 " @@ -9812,7 +10236,7 @@ msgstr "" "``typing.Union[X, Y]``. Για παράδειγμα, η ακόλουθη συνάρτηση αναμένει ένα " "όρισμα τύπου :class:`int` or :class:`float`::" -#: library/stdtypes.rst:5526 +#: library/stdtypes.rst:5800 msgid "" "def square(number: int | float) -> int | float:\n" " return number ** 2" @@ -9820,7 +10244,7 @@ msgstr "" "def square(number: int | float) -> int | float:\n" " return number ** 2" -#: library/stdtypes.rst:5531 +#: library/stdtypes.rst:5805 msgid "" "The ``|`` operand cannot be used at runtime to define unions where one or " "more members is a forward reference. For example, ``int | \"Foo\"``, where " @@ -9835,54 +10259,54 @@ msgstr "" "εκτέλεσης. Για ενώσεις που περιλαμβάνουν μπροστινές αναφορές, παρουσιάζει " "ολόκληρη την έκφραση ως συμβολοσειρά, π.χ. ``\"int | Foo\"``." -#: library/stdtypes.rst:5539 +#: library/stdtypes.rst:5813 msgid "" "Union objects can be tested for equality with other union objects. Details:" msgstr "" "Τα αντικείμενα ένωσης μπορούν να ελεγχθούν για ισότητα με άλλα αντικείμενα " "ένωσης. Λεπτομέρειες:" -#: library/stdtypes.rst:5541 +#: library/stdtypes.rst:5815 msgid "Unions of unions are flattened::" msgstr "Οι ενώσεις των ενώσεων ισοπεδώνονται::" -#: library/stdtypes.rst:5543 +#: library/stdtypes.rst:5817 msgid "(int | str) | float == int | str | float" msgstr "(int | str) | float == int | str | float" -#: library/stdtypes.rst:5545 +#: library/stdtypes.rst:5819 msgid "Redundant types are removed::" msgstr "Οι περιττοί τύποι καταργούνται::" -#: library/stdtypes.rst:5547 +#: library/stdtypes.rst:5821 msgid "int | str | int == int | str" msgstr "int | str | int == int | str" -#: library/stdtypes.rst:5549 +#: library/stdtypes.rst:5823 msgid "When comparing unions, the order is ignored::" msgstr "Κατά τη σύγκριση των ενώσεων, η σειρά αγνοείται::" -#: library/stdtypes.rst:5551 +#: library/stdtypes.rst:5825 msgid "int | str == str | int" msgstr "int | str == str | int" -#: library/stdtypes.rst:5553 +#: library/stdtypes.rst:5827 msgid "It is compatible with :data:`typing.Union`::" msgstr "Είναι συμβατό με το :data:`typing.Union`::" -#: library/stdtypes.rst:5555 +#: library/stdtypes.rst:5829 msgid "int | str == typing.Union[int, str]" msgstr "int | str == typing.Union[int, str]" -#: library/stdtypes.rst:5557 +#: library/stdtypes.rst:5831 msgid "Optional types can be spelled as a union with ``None``::" msgstr "Οι προαιρετικοί τύποι μπορούν να γραφτούν ως ένωση με ``None``::" -#: library/stdtypes.rst:5559 +#: library/stdtypes.rst:5833 msgid "str | None == typing.Optional[str]" msgstr "str | None == typing.Optional[str]" -#: library/stdtypes.rst:5564 +#: library/stdtypes.rst:5838 msgid "" "Calls to :func:`isinstance` and :func:`issubclass` are also supported with a " "union object::" @@ -9890,7 +10314,7 @@ msgstr "" "Οι κλήσεις σε :func:`isinstance` και :func:`issubclass` υποστηρίζονται " "επίσης με ένα αντικείμενο ένωσης::" -#: library/stdtypes.rst:5567 +#: library/stdtypes.rst:5841 msgid "" ">>> isinstance(\"\", int | str)\n" "True" @@ -9898,7 +10322,7 @@ msgstr "" ">>> isinstance(\"\", int | str)\n" "True" -#: library/stdtypes.rst:5570 +#: library/stdtypes.rst:5844 msgid "" "However, :ref:`parameterized generics ` in union objects " "cannot be checked::" @@ -9906,7 +10330,7 @@ msgstr "" "Ωστόσο, το :ref:`parameterized generics ` σε αντικείμενα " "ένωσης δεν μπορούν να ελεγχθούν::" -#: library/stdtypes.rst:5573 +#: library/stdtypes.rst:5847 msgid "" ">>> isinstance(1, int | list[int]) # short-circuit evaluation\n" "True\n" @@ -9922,7 +10346,7 @@ msgstr "" " ...\n" "TypeError: isinstance() argument 2 cannot be a parameterized generic" -#: library/stdtypes.rst:5580 +#: library/stdtypes.rst:5854 msgid "" "The user-exposed type for the union object can be accessed from :data:`types." "UnionType` and used for :func:`isinstance` checks. An object cannot be " @@ -9933,7 +10357,7 @@ msgstr "" "ελέγχους :func:`isinstance`. Δεν είναι δυνατή η δημιουργία ενός " "αντικειμένου από τον τύπο::" -#: library/stdtypes.rst:5584 +#: library/stdtypes.rst:5858 msgid "" ">>> import types\n" ">>> isinstance(int | str, types.UnionType)\n" @@ -9951,7 +10375,7 @@ msgstr "" " File \"\", line 1, in \n" "TypeError: cannot create 'types.UnionType' instances" -#: library/stdtypes.rst:5593 +#: library/stdtypes.rst:5867 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 " @@ -9961,7 +10385,7 @@ msgstr "" "υποστηρίξει τη σύνταξη ``X | Y``. Εάν μια μετακλάση υλοποιεί :meth:`!" "__or__`, η Ένωση μπορεί να την παρακάμψει:" -#: library/stdtypes.rst:5597 +#: library/stdtypes.rst:5871 msgid "" ">>> class M(type):\n" "... def __or__(self, other):\n" @@ -9987,16 +10411,16 @@ msgstr "" ">>> int | C\n" "int | C" -#: library/stdtypes.rst:5613 +#: library/stdtypes.rst:5887 msgid ":pep:`604` -- PEP proposing the ``X | Y`` syntax and the Union type." msgstr "" ":pep:`604` -- Το PEP προτείνει τη σύνταξη ``X | Y`` και τον τύπο Ένωση." -#: library/stdtypes.rst:5621 +#: library/stdtypes.rst:5895 msgid "Other Built-in Types" msgstr "Άλλοι Ενσωματωμένοι (built-in) Τύποι" -#: library/stdtypes.rst:5623 +#: library/stdtypes.rst:5897 msgid "" "The interpreter supports several other kinds of objects. Most of these " "support only one or two operations." @@ -10004,11 +10428,11 @@ msgstr "" "Ο διερμηνέας υποστηρίζει πολλά άλλα είδη αντικειμένων. Τα περισσότερα από " "αυτά υποστηρίζουν μόνο μία ή δύο λειτουργίες." -#: library/stdtypes.rst:5630 +#: library/stdtypes.rst:5904 msgid "Modules" msgstr "Modules" -#: library/stdtypes.rst:5632 +#: library/stdtypes.rst:5906 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 " @@ -10026,7 +10450,7 @@ msgstr "" "δεν απαιτεί να υπάρχει ένα αντικείμενο module με το όνομα *foo* αλλά απαιτεί " "έναν (εξωτερικό) *definition* για ένα module που ονομάζεται *foo* κάπου.)" -#: library/stdtypes.rst:5639 +#: library/stdtypes.rst:5913 msgid "" "A special attribute of every module is :attr:`~object.__dict__`. This is the " "dictionary containing the module's symbol table. Modifying this dictionary " @@ -10045,7 +10469,7 @@ msgstr "" "= {}``). Δεν συνίσταται η απευθείας τροποποίηση του :attr:`~object." "__dict__`." -#: library/stdtypes.rst:5647 +#: library/stdtypes.rst:5921 msgid "" "Modules built into the interpreter are written like this: ````. If loaded from a file, they are written as ````. Εάν φορτωθούν από ένα αρχείο, γράφονται ως " "````." -#: library/stdtypes.rst:5655 +#: library/stdtypes.rst:5929 msgid "Classes and Class Instances" msgstr "Κλάσεις και Στιγμιότυπα Κλάσης" -#: library/stdtypes.rst:5657 +#: library/stdtypes.rst:5931 msgid "See :ref:`objects` and :ref:`class` for these." msgstr "Δείτε :ref:`objects` και :ref:`class` για αυτά." -#: library/stdtypes.rst:5663 +#: library/stdtypes.rst:5937 msgid "Functions" msgstr "Συναρτήσεις" -#: library/stdtypes.rst:5665 +#: library/stdtypes.rst:5939 msgid "" "Function objects are created by function definitions. The only operation on " "a function object is to call it: ``func(argument-list)``." @@ -10076,7 +10500,7 @@ msgstr "" "λειτουργία σε ένα αντικείμενο συνάρτησης είναι να το ονομάσουμε: " "``func(argument-list)``." -#: library/stdtypes.rst:5668 +#: library/stdtypes.rst:5942 msgid "" "There are really two flavors of function objects: built-in functions and " "user-defined functions. Both support the same operation (to call the " @@ -10088,15 +10512,15 @@ msgstr "" "υποστηρίζουν την ίδια λειτουργία (για να καλέσετε τη συνάρτηση), αλλά η " "υλοποίηση είναι διαφορετική, εξ ου και οι διαφορετικοί τύποι αντικειμένων." -#: library/stdtypes.rst:5672 +#: library/stdtypes.rst:5946 msgid "See :ref:`function` for more information." msgstr "Δείτε το :ref:`function` για περισσότερες πληροφορίες." -#: library/stdtypes.rst:5678 +#: library/stdtypes.rst:5952 msgid "Methods" msgstr "Μέθοδοι" -#: library/stdtypes.rst:5682 +#: library/stdtypes.rst:5956 msgid "" "Methods are functions that are called using the attribute notation. There " "are two flavors: :ref:`built-in methods ` (such as :meth:" @@ -10109,7 +10533,7 @@ msgstr "" "method `. Οι ενσωματωμένες μέθοδοι περιγράφονται με τους " "τύπους που τις υποστηρίζουν." -#: library/stdtypes.rst:5688 +#: library/stdtypes.rst:5962 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:" @@ -10132,7 +10556,7 @@ msgstr "" "arg-2, ..., arg-n)`` είναι απολύτως ισοδύναμη με την κλήση του ``m." "__func__(m.__self__, arg-1, arg-2, ..., arg-n)``." -#: library/stdtypes.rst:5699 +#: library/stdtypes.rst:5973 msgid "" "Like :ref:`function objects `, bound method objects " "support getting arbitrary attributes. However, since method attributes are " @@ -10152,7 +10576,7 @@ msgstr "" "χαρακτηριστικό μεθόδου πρέπει να το ορίσετε ρητά στο υποκείμενο αντικείμενο " "συνάρτησης:" -#: library/stdtypes.rst:5707 +#: library/stdtypes.rst:5981 msgid "" ">>> class C:\n" "... def method(self):\n" @@ -10180,15 +10604,15 @@ msgstr "" ">>> c.method.whoami\n" "'my name is method'" -#: library/stdtypes.rst:5722 +#: library/stdtypes.rst:5996 msgid "See :ref:`instance-methods` for more information." msgstr "Δείτε το :ref:`instance-methods` για περισσότερες πληροφορίες." -#: library/stdtypes.rst:5730 +#: library/stdtypes.rst:6004 msgid "Code Objects" msgstr "Αντικείμενα Κώδικα" -#: library/stdtypes.rst:5736 +#: library/stdtypes.rst:6010 msgid "" "Code objects are used by the implementation to represent \"pseudo-compiled\" " "executable Python code such as a function body. They differ from function " @@ -10206,7 +10630,7 @@ msgstr "" "χαρακτηριστικού τους :attr:`~function.__code__`. Δείτε επίσης το module :mod:" "`code`." -#: library/stdtypes.rst:5743 +#: library/stdtypes.rst:6017 msgid "" "Accessing :attr:`~function.__code__` raises an :ref:`auditing event " "` ``object.__getattr__`` with arguments ``obj`` and " @@ -10216,7 +10640,7 @@ msgstr "" "event ` ``object.__getattr__`` με ορίσματα ``obj`` και " "``\"__code__\"``." -#: library/stdtypes.rst:5750 +#: library/stdtypes.rst:6024 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." @@ -10225,15 +10649,15 @@ msgstr "" "(αντί για πηγαία συμβολοσειρά) στις ενσωματωμένες συναρτήσεις :func:`exec` " "ή :func:`eval`." -#: library/stdtypes.rst:5753 +#: library/stdtypes.rst:6027 msgid "See :ref:`types` for more information." msgstr "Δείτε :ref:`types` για περισσότερες πληροφορίες." -#: library/stdtypes.rst:5759 +#: library/stdtypes.rst:6033 msgid "Type Objects" msgstr "Τύποι Αντικειμένων" -#: library/stdtypes.rst:5765 +#: library/stdtypes.rst:6039 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 " @@ -10246,15 +10670,15 @@ msgstr "" "(standard) module :mod:`types` ορίζει ονόματα για όλους τους τυπικούς " "ενσωματωμένους τύπους." -#: library/stdtypes.rst:5770 +#: library/stdtypes.rst:6044 msgid "Types are written like this: ````." msgstr "Οι τύποι γράφονται ως εξής: ````." -#: library/stdtypes.rst:5776 +#: library/stdtypes.rst:6050 msgid "The Null Object" msgstr "Το Αντικείμενο Null" -#: library/stdtypes.rst:5778 +#: library/stdtypes.rst:6052 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 " @@ -10265,15 +10689,15 @@ msgstr "" "μηδενικό αντικείμενο, που ονομάζεται ``None`` (ένα ενσωματωμένο όνομα). Το " "``type(None)()`` παράγει το ίδιο singleton." -#: library/stdtypes.rst:5782 +#: library/stdtypes.rst:6056 msgid "It is written as ``None``." msgstr "Γράφεται ως ``None``." -#: library/stdtypes.rst:5789 +#: library/stdtypes.rst:6063 msgid "The Ellipsis Object" msgstr "Το αντικείμενο Ellipsis" -#: library/stdtypes.rst:5791 +#: library/stdtypes.rst:6065 msgid "" "This object is commonly used to indicate that something is omitted. It " "supports no special operations. There is exactly one ellipsis object, " @@ -10285,11 +10709,11 @@ msgstr "" "αντικείμενο ellipsis, που ονομάζεται :const:`Ellipsis` (ένα ενσωματωμένο " "όνομα). Το ``type(Ellipsis)()`` παράγει το singleton :const:`Ellipsis`." -#: library/stdtypes.rst:5796 +#: library/stdtypes.rst:6070 msgid "It is written as ``Ellipsis`` or ``...``." msgstr "Γράφεται ως ``Ellipsis`` ή ``...``." -#: library/stdtypes.rst:5798 +#: library/stdtypes.rst:6072 msgid "" "In typical use, ``...`` as the ``Ellipsis`` object appears in a few " "different places, for instance:" @@ -10297,7 +10721,7 @@ msgstr "" "Στην τυπική χρήση, το ``...`` ως αντικείμενο ``Ellipsis`` εμφανίζεται σε " "μερικά διαφορετικά μέρη, για παράδειγμα:" -#: library/stdtypes.rst:5801 +#: library/stdtypes.rst:6075 msgid "" "In type annotations, such as :ref:`callable arguments ` or :ref:`tuple elements `." @@ -10305,13 +10729,13 @@ msgstr "" "Στους τύπους annotations, όπως :ref:`callable arguments ` ή :ref:`tuple elements `." -#: library/stdtypes.rst:5804 +#: library/stdtypes.rst:6078 msgid "" "As the body of a function instead of a :ref:`pass statement `." msgstr "" "Ως το σώμα μιας συνάρτησης αντί για μια :ref:`pass statement `." -#: library/stdtypes.rst:5806 +#: library/stdtypes.rst:6080 msgid "" "In third-party libraries, such as `Numpy's slicing and striding `_." @@ -10319,7 +10743,7 @@ msgstr "" "Σε βιβλιοθήκες τρίτων, όπως `Numpy's slicing and striding `_." -#: library/stdtypes.rst:5809 +#: library/stdtypes.rst:6083 msgid "" "Python also uses three dots in ways that are not ``Ellipsis`` objects, for " "instance:" @@ -10327,7 +10751,7 @@ msgstr "" "Η Python επίσης χρησιμοποιεί τρεις τελείες με τρόπους που δεν είναι " "αντικείμενα ``Ellipsis``, για παράδειγμα:" -#: library/stdtypes.rst:5811 +#: library/stdtypes.rst:6085 msgid "" "Doctest's :const:`ELLIPSIS `, as a pattern for missing " "content." @@ -10335,7 +10759,7 @@ msgstr "" "Το :const:`ELLIPSIS ` του Doctest, ως πρότυπο για ελλείπον " "περιεχόμενο." -#: library/stdtypes.rst:5813 +#: library/stdtypes.rst:6087 msgid "" "The default Python prompt of the :term:`interactive` shell when partial " "input is incomplete." @@ -10343,7 +10767,7 @@ msgstr "" "Η προεπιλεγμένη εντολή της Python του :term:`interactive` shell όταν η " "μερική είσοδος είναι ελλιπής." -#: library/stdtypes.rst:5815 +#: library/stdtypes.rst:6089 msgid "" "Lastly, the Python documentation often uses three dots in conventional " "English usage to mean omitted content, even in code examples that also use " @@ -10353,11 +10777,11 @@ msgstr "" "συμβατική αγγλική χρήση για να σημαίνει παραλειπόμενο περιεχόμενο, ακόμη και " "σε παραδείγματα κώδικα που τα χρησιμοποιούν επίσης ως ``Ellipsis``." -#: library/stdtypes.rst:5823 +#: library/stdtypes.rst:6097 msgid "The NotImplemented Object" msgstr "Το NotImplemented Αντικείμενο" -#: library/stdtypes.rst:5825 +#: library/stdtypes.rst:6099 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 " @@ -10370,15 +10794,15 @@ msgstr "" "αντικείμενο :data:`NotImplemented`. Το :code:`type(NotImplemented)()` " "παράγει το στιγμιότυπο singleton." -#: library/stdtypes.rst:5830 +#: library/stdtypes.rst:6104 msgid "It is written as :code:`NotImplemented`." msgstr "Είναι γραμμένο ως :code:`NotImplemented`." -#: library/stdtypes.rst:5836 +#: library/stdtypes.rst:6110 msgid "Internal Objects" msgstr "Εσωτερικά Αντικείμενα" -#: library/stdtypes.rst:5838 +#: library/stdtypes.rst:6112 msgid "" "See :ref:`types` for this information. It describes :ref:`stack frame " "objects `, :ref:`traceback objects `, and " @@ -10388,11 +10812,11 @@ msgstr "" "objects `, :ref:`traceback objects `, και " "αντικείμενα τμηματοποίησης." -#: library/stdtypes.rst:5846 +#: library/stdtypes.rst:6120 msgid "Special Attributes" msgstr "Ειδικά Χαρακτηριστικά" -#: library/stdtypes.rst:5848 +#: library/stdtypes.rst:6122 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:" @@ -10402,14 +10826,14 @@ msgstr "" "διάφορους τύπους αντικειμένων, όπου είναι σχετικά. Ορισμένα από αυτά δεν " "αναφέρονται από την ενσωματωμένη συνάρτηση :func:`dir`." -#: library/stdtypes.rst:5855 +#: library/stdtypes.rst:6129 msgid "" "The name of the class, function, method, descriptor, or generator instance." msgstr "" "Το όνομα της κλάσης, της συνάρτησης, της μεθόδου, του descriptor ή του " "στιγμιοτύπου generator." -#: library/stdtypes.rst:5861 +#: library/stdtypes.rst:6135 msgid "" "The :term:`qualified name` of the class, function, method, descriptor, or " "generator instance." @@ -10417,18 +10841,18 @@ msgstr "" "Το :term:`qualified name` της κλάσης, της συνάρτησης, της μεθόδου, του " "descriptor, ή του στιγμιοτύπου generator." -#: library/stdtypes.rst:5869 +#: library/stdtypes.rst:6143 msgid "The name of the module in which a class or function was defined." msgstr "Το όνομα του module στο οποίο ορίστηκε μια κλάση ή μια συνάρτηση." -#: library/stdtypes.rst:5874 +#: library/stdtypes.rst:6148 msgid "" "The documentation string of a class or function, or ``None`` if undefined." msgstr "" "Η συμβολοσειρά τεκμηρίωσης μιας κλάσης ή συνάρτησης ή ``None`` εάν δεν έχει " "οριστεί." -#: library/stdtypes.rst:5879 +#: library/stdtypes.rst:6153 msgid "" "The :ref:`type parameters ` of generic classes, functions, and :" "ref:`type aliases `. For classes and functions that are not " @@ -10438,11 +10862,11 @@ msgstr "" "συναρτήσεων και :ref:`type aliases `. Για κλάσεις και " "συναρτήσεις που δεν είναι γενικές, αυτή θα είναι μια κενή πλειάδα." -#: library/stdtypes.rst:5889 +#: library/stdtypes.rst:6163 msgid "Integer string conversion length limitation" msgstr "Περιορισμός μήκους μετατροπής συμβολοσειράς ακέραιου αριθμού" -#: library/stdtypes.rst:5891 +#: library/stdtypes.rst:6165 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 " @@ -10455,7 +10879,7 @@ msgstr "" "του δύο. Οι δεξαεξαδικές, οκταδικές, και δυαδικές μετατροπές είναι " "απεριόριστες. Το όριο μπορεί να διαμορφωθεί." -#: library/stdtypes.rst:5896 +#: library/stdtypes.rst:6170 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 " @@ -10473,14 +10897,14 @@ msgstr "" "``int('1' * 500_000)`` μπορεί να διαρκέσει περισσότερο από ένα δευτερόλεπτο " "σε μια γρήγορη CPU." -#: library/stdtypes.rst:5903 +#: library/stdtypes.rst:6177 msgid "" "Limiting conversion size offers a practical way to avoid :cve:`2020-10735`." msgstr "" "Ο περιορισμός του μεγέθους μετατροπής προσφέρει έναν πρακτικό τρόπο αποφυγής " "του :cve:`2020-10735`." -#: library/stdtypes.rst:5905 +#: library/stdtypes.rst:6179 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. " @@ -10490,13 +10914,13 @@ msgstr "" "εισόδου ή εξόδου όταν εμπλέκεται ένας μη γραμμικός αλγόριθμος μετατροπής. " "Τα underscores και το πρόσημο δεν υπολογίζονται στο όριο." -#: library/stdtypes.rst:5909 +#: library/stdtypes.rst:6183 msgid "" "When an operation would exceed the limit, a :exc:`ValueError` is raised:" msgstr "" "Όταν μια λειτουργία υπερβαίνει το όριο, γίνεται raise μια :exc:`ValueError`:" -#: library/stdtypes.rst:5911 +#: library/stdtypes.rst:6185 msgid "" ">>> import sys\n" ">>> sys.set_int_max_str_digits(4300) # Illustrative, this is the default.\n" @@ -10540,7 +10964,7 @@ msgstr "" "7144\n" ">>> assert int(hex(i_squared), base=16) == i*i # Hexadecimal is unlimited." -#: library/stdtypes.rst:5931 +#: library/stdtypes.rst:6205 msgid "" "The default limit is 4300 digits as provided in :data:`sys.int_info." "default_max_str_digits `. The lowest limit that can be " @@ -10552,11 +10976,11 @@ msgstr "" "να διαμορφωθεί είναι 640 ψηφία όπως προβλέπεται στο :data:`sys.int_info." "str_digits_check_threshold `." -#: library/stdtypes.rst:5936 +#: library/stdtypes.rst:6210 msgid "Verification:" msgstr "Επαλήθευση:" -#: library/stdtypes.rst:5938 +#: library/stdtypes.rst:6212 msgid "" ">>> import sys\n" ">>> assert sys.int_info.default_max_str_digits == 4300, sys.int_info\n" @@ -10574,11 +10998,11 @@ msgstr "" "... '571186405732').to_bytes(53, 'big')\n" "..." -#: library/stdtypes.rst:5951 +#: library/stdtypes.rst:6225 msgid "Affected APIs" msgstr "Επηρεασμένα APIs" -#: library/stdtypes.rst:5953 +#: library/stdtypes.rst:6227 msgid "" "The limitation only applies to potentially slow conversions between :class:" "`int` and :class:`str` or :class:`bytes`:" @@ -10586,23 +11010,23 @@ msgstr "" "Ο περιορισμός ισχύει μόνο για δυνητικά αργές μετατροπές μεταξύ :class:`int` " "και :class:`str` ή :class:`bytes`:" -#: library/stdtypes.rst:5956 +#: library/stdtypes.rst:6230 msgid "``int(string)`` with default base 10." msgstr "``int(string)`` με default βάση το 10." -#: library/stdtypes.rst:5957 +#: library/stdtypes.rst:6231 msgid "``int(string, base)`` for all bases that are not a power of 2." msgstr "``int(string, base)`` για όλες τις βάσεις που δεν είναι δύναμη του 2." -#: library/stdtypes.rst:5958 +#: library/stdtypes.rst:6232 msgid "``str(integer)``." msgstr "``str(integer)``." -#: library/stdtypes.rst:5959 +#: library/stdtypes.rst:6233 msgid "``repr(integer)``." msgstr "``repr(integer)``." -#: library/stdtypes.rst:5960 +#: library/stdtypes.rst:6234 msgid "" "any other string conversion to base 10, for example ``f\"{integer}\"``, " "``\"{}\".format(integer)``, or ``b\"%d\" % integer``." @@ -10610,40 +11034,40 @@ msgstr "" "οποιαδήποτε άλλη μετατροπή συμβολοσειράς στη βάση 10, για παράδειγμα " "``f\"{integer}\"``, ``\"{}\".format(integer)``, ή ``b\"%d\" % integer``." -#: library/stdtypes.rst:5963 +#: library/stdtypes.rst:6237 msgid "The limitations do not apply to functions with a linear algorithm:" msgstr "Οι περιορισμοί δεν ισχύουν για συναρτήσεις με γραμμικό αλγόριθμο:" -#: library/stdtypes.rst:5965 +#: library/stdtypes.rst:6239 msgid "``int(string, base)`` with base 2, 4, 8, 16, or 32." msgstr "``int(string, base)`` με βάση 2, 4, 8, 16, ή 32." -#: library/stdtypes.rst:5966 +#: library/stdtypes.rst:6240 msgid ":func:`int.from_bytes` and :func:`int.to_bytes`." msgstr ":func:`int.from_bytes` και :func:`int.to_bytes`." -#: library/stdtypes.rst:5967 +#: library/stdtypes.rst:6241 msgid ":func:`hex`, :func:`oct`, :func:`bin`." msgstr ":func:`hex`, :func:`oct`, :func:`bin`." -#: library/stdtypes.rst:5968 +#: library/stdtypes.rst:6242 msgid ":ref:`formatspec` for hex, octal, and binary numbers." msgstr "" ":ref:`formatspec` για δεκαεξαδικούς, οκταδικούς και δυαδικούς αριθμούς." -#: library/stdtypes.rst:5969 +#: library/stdtypes.rst:6243 msgid ":class:`str` to :class:`float`." msgstr ":class:`str` σε :class:`float`." -#: library/stdtypes.rst:5970 +#: library/stdtypes.rst:6244 msgid ":class:`str` to :class:`decimal.Decimal`." msgstr ":class:`str` σε :class:`decimal.Decimal`." -#: library/stdtypes.rst:5973 +#: library/stdtypes.rst:6247 msgid "Configuring the limit" msgstr "Διαμόρφωση ορίου" -#: library/stdtypes.rst:5975 +#: library/stdtypes.rst:6249 msgid "" "Before Python starts up you can use an environment variable or an " "interpreter command line flag to configure the limit:" @@ -10652,7 +11076,7 @@ msgstr "" "περιβάλλοντος ή ένα δείκτη γραμμής εντολών διερμηνέα για να διαμορφώσετε το " "όριο:" -#: library/stdtypes.rst:5978 +#: library/stdtypes.rst:6252 msgid "" ":envvar:`PYTHONINTMAXSTRDIGITS`, e.g. ``PYTHONINTMAXSTRDIGITS=640 python3`` " "to set the limit to 640 or ``PYTHONINTMAXSTRDIGITS=0 python3`` to disable " @@ -10662,7 +11086,7 @@ msgstr "" "για να ορίσετε το όριο σε 640 ή ``PYTHONINTMAXSTRDIGITS=0 python3`` για να " "απενεργοποιήσετε τον περιορισμό." -#: library/stdtypes.rst:5981 +#: library/stdtypes.rst:6255 msgid "" ":option:`-X int_max_str_digits <-X>`, e.g. ``python3 -X " "int_max_str_digits=640``" @@ -10670,7 +11094,7 @@ msgstr "" ":option:`-X int_max_str_digits <-X>`, π.χ. ``python3 -X " "int_max_str_digits=640``" -#: library/stdtypes.rst:5983 +#: library/stdtypes.rst:6257 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 " @@ -10685,7 +11109,7 @@ msgstr "" "επομένως χρησιμοποιήθηκε μια τιμή :data:`sys.int_info." "default_max_str_digits` κατά την προετοιμασία." -#: library/stdtypes.rst:5989 +#: library/stdtypes.rst:6263 msgid "" "From code, you can inspect the current limit and set a new one using these :" "mod:`sys` APIs:" @@ -10693,7 +11117,7 @@ msgstr "" "Από τον κώδικα, μπορείτε να επιθεωρήσετε το τρέχον όριο και να ορίσετε ένα " "νέο χρησιμοποιώντας αυτά τα :mod:`sys` APIs:" -#: library/stdtypes.rst:5992 +#: library/stdtypes.rst:6266 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 " @@ -10703,7 +11127,7 @@ msgstr "" "είναι ένας getter και setter για το όριο σε όλο τον διερμηνέα. Οι " "δευτερεύοντες διερμηνείς έχουν το δικό τους όριο." -#: library/stdtypes.rst:5996 +#: library/stdtypes.rst:6270 msgid "" "Information about the default and minimum can be found in :data:`sys." "int_info`:" @@ -10711,7 +11135,7 @@ msgstr "" "Πληροφορίες σχετικά με την προεπιλογή και το ελάχιστο μπορούν να βρεθούν " "στο :data:`sys.int_info`:" -#: library/stdtypes.rst:5998 +#: library/stdtypes.rst:6272 msgid "" ":data:`sys.int_info.default_max_str_digits ` is the compiled-" "in default limit." @@ -10719,7 +11143,7 @@ msgstr "" "Το :data:`sys.int_info.default_max_str_digits ` είναι το " "μεταγλωττισμένο προεπιλεγμένο όριο." -#: library/stdtypes.rst:6000 +#: library/stdtypes.rst:6274 msgid "" ":data:`sys.int_info.str_digits_check_threshold ` is the lowest " "accepted value for the limit (other than 0 which disables it)." @@ -10727,7 +11151,7 @@ msgstr "" "Το :data:`sys.int_info.str_digits_check_threshold ` είναι η " "χαμηλότερη αποδεκτή τιμή για το όριο (εκτός από το 0 που το απενεργοποιεί)." -#: library/stdtypes.rst:6007 +#: library/stdtypes.rst:6281 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 " @@ -10748,7 +11172,7 @@ msgstr "" "τον κώδικα. Μια λύση για τον πηγαίο που περιέχει τόσο μεγάλες σταθερές είναι " "να τις μετατρέψετε σε δεκαεξαδική μορφή ``0x`` καθώς δεν έχει όριο." -#: library/stdtypes.rst:6016 +#: library/stdtypes.rst:6290 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 " @@ -10762,11 +11186,11 @@ msgstr "" "καλέσει την Python για να μεταγλωττίσει εκ των προτέρων το ``.py`` πηγαίο σε " "αρχεία ``.pyc``." -#: library/stdtypes.rst:6022 +#: library/stdtypes.rst:6296 msgid "Recommended configuration" msgstr "Προτεινόμενη διαμόρφωση" -#: library/stdtypes.rst:6024 +#: library/stdtypes.rst:6298 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 " @@ -10779,11 +11203,11 @@ msgstr "" "τον συμβατό με τον κώδικα της έκδοσης Python, καθώς αυτά τα API προστέθηκαν " "στην ενημερωμένη έκδοση κώδικα ασφαλείας σε εκδόσεις πριν από την 3.12." -#: library/stdtypes.rst:6029 +#: library/stdtypes.rst:6303 msgid "Example::" msgstr "Παράδειγμα::" -#: library/stdtypes.rst:6031 +#: library/stdtypes.rst:6305 msgid "" ">>> import sys\n" ">>> if hasattr(sys, \"set_int_max_str_digits\"):\n" @@ -10805,15 +11229,15 @@ msgstr "" "... elif current_limit < lower_bound:\n" "... sys.set_int_max_str_digits(lower_bound)" -#: library/stdtypes.rst:6041 +#: library/stdtypes.rst:6315 msgid "If you need to disable it entirely, set it to ``0``." msgstr "Εάν πρέπει να το απενεργοποιήσετε εντελώς, ορίστε το σε ``0``." -#: library/stdtypes.rst:6045 +#: library/stdtypes.rst:6319 msgid "Footnotes" msgstr "Υποσημειώσεις" -#: library/stdtypes.rst:6046 +#: library/stdtypes.rst:6320 msgid "" "Additional information on these special methods may be found in the Python " "Reference Manual (:ref:`customization`)." @@ -10821,7 +11245,7 @@ msgstr "" "Πρόσθετε πληροφορίες σχετικά με αυτές τις ειδικές μεθόδους μπορείτε να " "βρείτε στο Εγχειρίδιο Αναφοράς Python (:ref:`customization`)." -#: library/stdtypes.rst:6049 +#: library/stdtypes.rst:6323 msgid "" "As a consequence, the list ``[1, 2]`` is considered equal to ``[1.0, 2.0]``, " "and similarly for tuples." @@ -10829,12 +11253,12 @@ msgstr "" "Σαν συνέπεια, η λίστα ``[1, 2]`` θεωρείται ίση με ``[1.0, 2.0]``, και ομοίως " "για πλειάδες (tuples)." -#: library/stdtypes.rst:6052 +#: library/stdtypes.rst:6326 msgid "They must have since the parser can't tell the type of the operands." msgstr "" "Πρέπει να έχουν, αφού ο parser δεν μπορεί να ξεχωρίσει τον τύπο των τελεστών." -#: library/stdtypes.rst:6054 +#: library/stdtypes.rst:6328 msgid "" "Cased characters are those with general category property being one of " "\"Lu\" (Letter, uppercase), \"Ll\" (Letter, lowercase), or \"Lt\" (Letter, " @@ -10844,7 +11268,7 @@ msgstr "" "είναι ένας από τους \"Lu\" (Γράμμα, κεφαλαίο), \"Ll\" (Γράμμα, πεζά), ή " "\"Lt\" (Γράμμα, κεφαλαία)." -#: library/stdtypes.rst:6057 +#: library/stdtypes.rst:6331 msgid "" "To format only a tuple you should therefore provide a singleton tuple whose " "only element is the tuple to be formatted." @@ -10857,12 +11281,12 @@ msgstr "" msgid "built-in" msgstr "ενσωματωμένοι (built-in) τύποι" -#: library/stdtypes.rst:316 library/stdtypes.rst:950 library/stdtypes.rst:1159 -#: library/stdtypes.rst:4770 library/stdtypes.rst:5761 +#: library/stdtypes.rst:316 library/stdtypes.rst:950 library/stdtypes.rst:1162 +#: library/stdtypes.rst:5031 library/stdtypes.rst:6035 msgid "types" msgstr "τύποι" -#: library/stdtypes.rst:1174 library/stdtypes.rst:4770 +#: library/stdtypes.rst:1177 library/stdtypes.rst:5031 msgid "statement" msgstr "statement" @@ -10975,11 +11399,11 @@ msgstr "is" msgid "is not" msgstr "is not" -#: library/stdtypes.rst:208 library/stdtypes.rst:1137 library/stdtypes.rst:1324 -#: library/stdtypes.rst:1447 library/stdtypes.rst:1604 -#: library/stdtypes.rst:2877 library/stdtypes.rst:4568 -#: library/stdtypes.rst:5253 library/stdtypes.rst:5680 -#: library/stdtypes.rst:5725 +#: library/stdtypes.rst:208 library/stdtypes.rst:1140 library/stdtypes.rst:1327 +#: library/stdtypes.rst:1456 library/stdtypes.rst:1613 +#: library/stdtypes.rst:3129 library/stdtypes.rst:4820 +#: library/stdtypes.rst:5517 library/stdtypes.rst:5954 +#: library/stdtypes.rst:5999 msgid "object" msgstr "αντικείμενο" @@ -11067,8 +11491,8 @@ msgstr "δυαδικό" msgid "arithmetic" msgstr "αριθμητικό" -#: library/stdtypes.rst:950 library/stdtypes.rst:4770 library/stdtypes.rst:5746 -#: library/stdtypes.rst:5761 +#: library/stdtypes.rst:950 library/stdtypes.rst:5031 library/stdtypes.rst:6020 +#: library/stdtypes.rst:6035 msgid "built-in function" msgstr "ενσωματωμένες (built-in) συναρτήσεις" @@ -11084,7 +11508,7 @@ msgstr "float" msgid "complex" msgstr "complex" -#: library/stdtypes.rst:2734 library/stdtypes.rst:3954 +#: library/stdtypes.rst:2982 library/stdtypes.rst:4206 msgid "+ (plus)" msgstr "+ (συν)" @@ -11096,11 +11520,11 @@ msgstr "τελεστής unary" msgid "binary operator" msgstr "δυαδικός τελεστής" -#: library/stdtypes.rst:2734 library/stdtypes.rst:3954 +#: library/stdtypes.rst:2982 library/stdtypes.rst:4206 msgid "- (minus)" msgstr "- (πλην)" -#: library/stdtypes.rst:2691 library/stdtypes.rst:3911 +#: library/stdtypes.rst:2939 library/stdtypes.rst:4163 msgid "* (asterisk)" msgstr "* (αστερίσκος)" @@ -11112,7 +11536,7 @@ msgstr "/ (κάθετος)" msgid "//" msgstr "//" -#: library/stdtypes.rst:2655 library/stdtypes.rst:3879 +#: library/stdtypes.rst:2903 library/stdtypes.rst:4131 msgid "% (percent)" msgstr "% (τοις εκατό)" @@ -11120,7 +11544,7 @@ msgstr "% (τοις εκατό)" msgid "**" msgstr "**" -#: library/stdtypes.rst:393 library/stdtypes.rst:1174 library/stdtypes.rst:4770 +#: library/stdtypes.rst:393 library/stdtypes.rst:1177 library/stdtypes.rst:5031 msgid "operations on" msgstr "λειτουργίες on" @@ -11128,7 +11552,7 @@ msgstr "λειτουργίες on" msgid "conjugate() (complex number method)" msgstr "conjugate() (μέθοδος μιγαδικών αριθμών)" -#: library/stdtypes.rst:1672 library/stdtypes.rst:5761 +#: library/stdtypes.rst:1681 library/stdtypes.rst:6035 msgid "module" msgstr "module" @@ -11196,7 +11620,7 @@ msgstr "τιμές" msgid "iterator protocol" msgstr "πρωτόκολλο iterator" -#: library/stdtypes.rst:5168 +#: library/stdtypes.rst:5430 msgid "protocol" msgstr "πρωτόκολλο" @@ -11204,7 +11628,7 @@ msgstr "πρωτόκολλο" msgid "iterator" msgstr "iterator" -#: library/stdtypes.rst:934 library/stdtypes.rst:1137 library/stdtypes.rst:1174 +#: library/stdtypes.rst:934 library/stdtypes.rst:1140 library/stdtypes.rst:1177 msgid "sequence" msgstr "sequence" @@ -11220,7 +11644,7 @@ msgstr "container" msgid "iteration over" msgstr "iteration over" -#: library/stdtypes.rst:4770 +#: library/stdtypes.rst:5031 msgid "len" msgstr "len" @@ -11244,11 +11668,11 @@ msgstr "λειτουργία" msgid "repetition" msgstr "επανάληψη" -#: library/stdtypes.rst:1174 +#: library/stdtypes.rst:1177 msgid "subscript" msgstr "subscript" -#: library/stdtypes.rst:1174 +#: library/stdtypes.rst:1177 msgid "slice" msgstr "slice" @@ -11268,321 +11692,345 @@ msgstr "μεταβλητή ακολουθίας" msgid "loop over" msgstr "loop over" -#: library/stdtypes.rst:1137 +#: library/stdtypes.rst:1140 msgid "immutable" msgstr "αμετάβλητο" -#: library/stdtypes.rst:1403 +#: library/stdtypes.rst:1408 msgid "tuple" msgstr "πλειάδα (tuple)" -#: library/stdtypes.rst:1137 +#: library/stdtypes.rst:1140 msgid "hash" msgstr "hash" -#: library/stdtypes.rst:1159 +#: library/stdtypes.rst:1162 msgid "mutable" msgstr "ευμετάβλητο" -#: library/stdtypes.rst:1174 library/stdtypes.rst:1324 +#: library/stdtypes.rst:1177 library/stdtypes.rst:1327 msgid "list" msgstr "λίστα" -#: library/stdtypes.rst:2858 library/stdtypes.rst:3060 -#: library/stdtypes.rst:3879 +#: library/stdtypes.rst:3110 library/stdtypes.rst:3312 +#: library/stdtypes.rst:4131 msgid "bytearray" msgstr "bytearray" -#: library/stdtypes.rst:4770 library/stdtypes.rst:5761 +#: library/stdtypes.rst:5031 library/stdtypes.rst:6035 msgid "type" msgstr "τύπος" -#: library/stdtypes.rst:1174 +#: library/stdtypes.rst:1177 msgid "assignment" msgstr "εκχώρηση" -#: library/stdtypes.rst:4770 +#: library/stdtypes.rst:5031 msgid "del" msgstr "del" -#: library/stdtypes.rst:1447 +#: library/stdtypes.rst:1456 msgid "range" msgstr "range" -#: library/stdtypes.rst:1617 library/stdtypes.rst:2509 -#: library/stdtypes.rst:2655 +#: library/stdtypes.rst:1626 library/stdtypes.rst:2757 +#: library/stdtypes.rst:2903 msgid "string" msgstr "string" -#: library/stdtypes.rst:1568 +#: library/stdtypes.rst:1577 msgid "text sequence type" msgstr "τύπος ακολουθίας κειμένου" -#: library/stdtypes.rst:1617 library/stdtypes.rst:1637 +#: library/stdtypes.rst:1626 library/stdtypes.rst:1646 msgid "str (built-in class)" msgstr "str (ενσωματωμένη (built-in) κλάση)" -#: library/stdtypes.rst:1568 +#: library/stdtypes.rst:1577 msgid "(see also string)" msgstr "(βλ. επίσης string)" -#: library/stdtypes.rst:1604 +#: library/stdtypes.rst:1613 msgid "io.StringIO" msgstr "io.StringIO" -#: library/stdtypes.rst:2850 +#: library/stdtypes.rst:3102 msgid "buffer protocol" msgstr "πρωτόκολλο buffer" -#: library/stdtypes.rst:2858 library/stdtypes.rst:3060 -#: library/stdtypes.rst:3879 +#: library/stdtypes.rst:3110 library/stdtypes.rst:3312 +#: library/stdtypes.rst:4131 msgid "bytes" msgstr "bytes" -#: library/stdtypes.rst:3060 +#: library/stdtypes.rst:3312 msgid "methods" msgstr "μέθοδοι" -#: library/stdtypes.rst:1672 +#: library/stdtypes.rst:1681 msgid "re" msgstr "re" -#: library/stdtypes.rst:3733 +#: library/stdtypes.rst:3985 msgid "universal newlines" msgstr "καθολικές νέες γραμμές" -#: library/stdtypes.rst:2321 +#: library/stdtypes.rst:2527 msgid "str.splitlines method" msgstr "μέθοδος str.splitlines" -#: library/stdtypes.rst:2509 +#: library/stdtypes.rst:2757 msgid "! formatted string literal" msgstr "! μορφοποιημένη συμβολοσειρά κυριολεκτικής μορφής" -#: library/stdtypes.rst:2509 +#: library/stdtypes.rst:2757 msgid "formatted string literals" msgstr "μορφοποιημένες συμβολοσειρές κυριολεξίας" -#: library/stdtypes.rst:2509 +#: library/stdtypes.rst:2757 msgid "! f-string" msgstr "! f-string" -#: library/stdtypes.rst:2509 +#: library/stdtypes.rst:2757 msgid "f-strings" msgstr "string" -#: library/stdtypes.rst:2509 +#: library/stdtypes.rst:2757 msgid "fstring" msgstr "fstring" -#: library/stdtypes.rst:2509 +#: library/stdtypes.rst:2757 msgid "interpolated string literal" msgstr "συμβολοσειρά κυριολεξίας με παρεμβολή" -#: library/stdtypes.rst:2509 +#: library/stdtypes.rst:2757 msgid "formatted literal" msgstr "μορφοποιημένη κυριολεξία" -#: library/stdtypes.rst:2509 +#: library/stdtypes.rst:2757 msgid "interpolated literal" msgstr "κυριολεκτικό με παρεμβολή" -#: library/stdtypes.rst:2509 +#: library/stdtypes.rst:2757 msgid "{} (curly brackets)" msgstr "{} (αγκύλες)" -#: library/stdtypes.rst:2509 +#: library/stdtypes.rst:2757 msgid "in formatted string literal" msgstr "μέσα σε μορφοποιημένη συμβολοσειρά" -#: library/stdtypes.rst:2509 +#: library/stdtypes.rst:2757 msgid "! (exclamation mark)" msgstr "! (Θαυμαστικό)" -#: library/stdtypes.rst:2509 +#: library/stdtypes.rst:2757 msgid ": (colon)" msgstr ": (άνω κάτω τελεία)" -#: library/stdtypes.rst:2509 +#: library/stdtypes.rst:2757 msgid "= (equals)" msgstr "= (ίσο)" -#: library/stdtypes.rst:2509 +#: library/stdtypes.rst:2757 msgid "for help in debugging using string literals" msgstr "για βοήθεια στην αποσφαλμάτωση μέσω κυριολεκτικών συμβολοσειρών" -#: library/stdtypes.rst:2655 +#: library/stdtypes.rst:2903 msgid "formatting, string (%)" msgstr "μορφοποίηση, string (%)" -#: library/stdtypes.rst:2655 +#: library/stdtypes.rst:2903 msgid "interpolation, string (%)" msgstr "παρεμβολή, string (%)" -#: library/stdtypes.rst:2655 +#: library/stdtypes.rst:2903 msgid "formatting, printf" msgstr "μορφοποίηση, printf" -#: library/stdtypes.rst:2655 +#: library/stdtypes.rst:2903 msgid "interpolation, printf" msgstr "παρεμβολή, printf" -#: library/stdtypes.rst:3879 +#: library/stdtypes.rst:4131 msgid "printf-style formatting" msgstr "μορφοποίηση σε στυλ printf" -#: library/stdtypes.rst:3879 +#: library/stdtypes.rst:4131 msgid "sprintf-style formatting" msgstr "μορφοποίηση σε στυλ sprintf" -#: library/stdtypes.rst:3911 +#: library/stdtypes.rst:4163 msgid "() (parentheses)" msgstr "() (παρενθέσεις)" -#: library/stdtypes.rst:2734 library/stdtypes.rst:3954 +#: library/stdtypes.rst:2982 library/stdtypes.rst:4206 msgid "in printf-style formatting" msgstr "σε μορφοποίηση σε στυλ printf" -#: library/stdtypes.rst:3911 +#: library/stdtypes.rst:4163 msgid ". (dot)" msgstr ". (τελεία)" -#: library/stdtypes.rst:3954 +#: library/stdtypes.rst:4206 msgid "# (hash)" msgstr "# (δίεση)" -#: library/stdtypes.rst:3954 +#: library/stdtypes.rst:4206 msgid "space" msgstr "διάστημα" -#: library/stdtypes.rst:2850 +#: library/stdtypes.rst:3102 msgid "binary sequence types" msgstr "τύπος δυαδικών ακολουθιών" -#: library/stdtypes.rst:2858 +#: library/stdtypes.rst:3110 msgid "memoryview" msgstr "memoryview" -#: library/stdtypes.rst:2858 +#: library/stdtypes.rst:3110 msgid "array" msgstr "πίνακας" -#: library/stdtypes.rst:3733 +#: library/stdtypes.rst:3985 msgid "bytes.splitlines method" msgstr "bytes.splitlines μέθοδος" -#: library/stdtypes.rst:3733 +#: library/stdtypes.rst:3985 msgid "bytearray.splitlines method" msgstr "bytearray.splitlines μέθοδος" -#: library/stdtypes.rst:3879 +#: library/stdtypes.rst:4131 msgid "formatting" msgstr "μορφοποίηση" -#: library/stdtypes.rst:3879 +#: library/stdtypes.rst:4131 msgid "bytes (%)" msgstr "bytes (%)" -#: library/stdtypes.rst:3879 +#: library/stdtypes.rst:4131 msgid "bytearray (%)" msgstr "bytearray (%)" -#: library/stdtypes.rst:3879 +#: library/stdtypes.rst:4131 msgid "interpolation" msgstr "μεταβολή" -#: library/stdtypes.rst:4568 +#: library/stdtypes.rst:4820 msgid "set" msgstr "set" -#: library/stdtypes.rst:4770 +#: library/stdtypes.rst:5031 msgid "mapping" msgstr "αντιστοίχιση" -#: library/stdtypes.rst:4770 +#: library/stdtypes.rst:5031 msgid "dictionary" msgstr "λεξικό" -#: library/stdtypes.rst:4880 +#: library/stdtypes.rst:5141 msgid "__missing__()" msgstr "__missing__()" -#: library/stdtypes.rst:5168 +#: library/stdtypes.rst:5430 msgid "context manager" msgstr "διαχειριστής περιεχομένου" -#: library/stdtypes.rst:5168 +#: library/stdtypes.rst:5430 msgid "context management protocol" msgstr "πρωτόκολλο διαχειριστή περιεχομένου" -#: library/stdtypes.rst:5168 +#: library/stdtypes.rst:5430 msgid "context management" msgstr "διαχείριση περιεχομένου" -#: library/stdtypes.rst:5241 +#: library/stdtypes.rst:5505 msgid "annotation" msgstr "annotation" -#: library/stdtypes.rst:5241 +#: library/stdtypes.rst:5505 msgid "type annotation; type hint" msgstr "type annotation; type hint" -#: library/stdtypes.rst:5253 +#: library/stdtypes.rst:5517 msgid "GenericAlias" msgstr "GenericAlias" -#: library/stdtypes.rst:5253 +#: library/stdtypes.rst:5517 msgid "Generic" msgstr "Generic" -#: library/stdtypes.rst:5253 +#: library/stdtypes.rst:5517 msgid "Alias" msgstr "Alias" -#: library/stdtypes.rst:5510 +#: library/stdtypes.rst:5784 msgid "Union" msgstr "Ένωση" -#: library/stdtypes.rst:5510 +#: library/stdtypes.rst:5784 msgid "union" msgstr "ένωση" -#: library/stdtypes.rst:5680 +#: library/stdtypes.rst:5954 msgid "method" msgstr "μέθοδος" -#: library/stdtypes.rst:5725 +#: library/stdtypes.rst:5999 msgid "code" msgstr "κώδικας" -#: library/stdtypes.rst:5725 +#: library/stdtypes.rst:5999 msgid "code object" msgstr "αντικείμενο κώδικα" -#: library/stdtypes.rst:5732 +#: library/stdtypes.rst:6006 msgid "compile" msgstr "compile" -#: library/stdtypes.rst:5732 +#: library/stdtypes.rst:6006 msgid "__code__ (function object attribute)" msgstr "__code__ (χαρακτηριστικό αντικείμενου συνάρτησης)" -#: library/stdtypes.rst:5746 +#: library/stdtypes.rst:6020 msgid "exec" msgstr "exec" -#: library/stdtypes.rst:5746 +#: library/stdtypes.rst:6020 msgid "eval" msgstr "eval" -#: library/stdtypes.rst:5785 +#: library/stdtypes.rst:6059 msgid "..." msgstr "..." -#: library/stdtypes.rst:5785 +#: library/stdtypes.rst:6059 msgid "ellipsis literal" msgstr "ellipsis literal" +#~ msgid "" +#~ "The slice of *s* from *i* to *j* is defined as the sequence of items with " +#~ "index *k* such that ``i <= k < j``. If *i* or *j* is greater than " +#~ "``len(s)``, use ``len(s)``. If *i* is omitted or ``None``, use ``0``. " +#~ "If *j* is omitted or ``None``, use ``len(s)``. If *i* is greater than or " +#~ "equal to *j*, the slice is empty." +#~ msgstr "" +#~ "Το υποσύνολο (slice) του *s* από το *i* έως το *j* ορίζεται ως η " +#~ "ακολουθία στοιχείων με δείκτη *k* τέτοια ώστε ``i <= k < j```. Εάν το " +#~ "*i* ή το *j* είναι μεγαλύτερο από το ``len(s)``, χρησιμοποιήστε το " +#~ "``len(s)``. Αν το *i* παραλείπεται ή είναι ``None``, χρησιμοποιήστε " +#~ "``0``. Αν το *j* παραλείπεται ή είναι ``μηδέν``, χρησιμοποιήστε το " +#~ "``len(s)``. Εάν το *i* είναι μεγαλύτερο από ή ίσο με το *j*, το " +#~ "υποσύνολο (slice) είναι κενό." + +#~ msgid "" +#~ "Return a copy of the string with uppercase characters converted to " +#~ "lowercase and vice versa. Note that it is not necessarily true that ``s." +#~ "swapcase().swapcase() == s``." +#~ msgstr "" +#~ "Επιστρέφει ένα αντίγραφο της συμβολοσειράς (string) με κεφαλαίους " +#~ "χαρακτήρες που έχουν μετατραπεί σε πεζούς και αντίστροφα. Σημειώστε ότι " +#~ "δεν είναι απαραίτητα αληθές ότι ``s.swapcase().swapcase() == s``." + #~ msgid "``s.index(x[, i[, j]])``" #~ msgstr "``s.index(x[, i[, j]])``" diff --git a/library/string.po b/library/string.po index c5d21eb62..d0f53aab1 100644 --- a/library/string.po +++ b/library/string.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -100,7 +100,7 @@ msgid "" msgstr "" #: library/string.rst:86 -msgid "Custom String Formatting" +msgid "Custom string formatting" msgstr "" #: library/string.rst:88 @@ -234,7 +234,7 @@ msgid "" msgstr "" #: library/string.rst:194 -msgid "Format String Syntax" +msgid "Format string syntax" msgstr "" #: library/string.rst:196 @@ -376,7 +376,7 @@ msgid "See the :ref:`formatexamples` section for some examples." msgstr "" #: library/string.rst:303 -msgid "Format Specification Mini-Language" +msgid "Format specification mini-language" msgstr "" #: library/string.rst:305 @@ -425,7 +425,7 @@ msgstr "" msgid "Option" msgstr "" -#: library/string.rst:383 library/string.rst:481 library/string.rst:527 +#: library/string.rst:383 library/string.rst:483 library/string.rst:534 msgid "Meaning" msgstr "" @@ -591,18 +591,20 @@ msgstr "" #: library/string.rst:460 msgid "" -"For a locale aware separator, use the ``'n'`` presentation type instead." +"For a locale-aware separator, use the ``'n'`` :ref:`float presentation type " +"` or :ref:`integer presentation type ` " +"instead." msgstr "" -#: library/string.rst:462 +#: library/string.rst:464 msgid "Added the ``','`` option (see also :pep:`378`)." msgstr "" -#: library/string.rst:465 +#: library/string.rst:467 msgid "Added the ``'_'`` option (see also :pep:`515`)." msgstr "" -#: library/string.rst:468 +#: library/string.rst:470 msgid "" "The *precision* is a decimal integer indicating how many digits should be " "displayed after the decimal point for presentation types ``'f'`` and " @@ -613,108 +615,111 @@ msgid "" "types." msgstr "" -#: library/string.rst:476 +#: library/string.rst:478 msgid "Finally, the *type* determines how the data should be presented." msgstr "" -#: library/string.rst:478 +#: library/string.rst:480 msgid "The available string presentation types are:" msgstr "" -#: library/string.rst:492 library/string.rst:527 +#: library/string.rst:494 library/string.rst:534 msgid "Type" msgstr "" -#: library/string.rst:483 +#: library/string.rst:485 msgid "``'s'``" msgstr "" -#: library/string.rst:483 +#: library/string.rst:485 msgid "String format. This is the default type for strings and may be omitted." msgstr "" -#: library/string.rst:515 library/string.rst:601 +#: library/string.rst:522 library/string.rst:616 msgid "None" msgstr "" -#: library/string.rst:486 +#: library/string.rst:488 msgid "The same as ``'s'``." msgstr "" -#: library/string.rst:489 +#: library/string.rst:491 msgid "The available integer presentation types are:" msgstr "" -#: library/string.rst:494 +#: library/string.rst:496 msgid "``'b'``" msgstr "" -#: library/string.rst:494 +#: library/string.rst:496 msgid "Binary format. Outputs the number in base 2." msgstr "" -#: library/string.rst:496 +#: library/string.rst:498 msgid "``'c'``" msgstr "" -#: library/string.rst:496 +#: library/string.rst:498 msgid "" "Character. Converts the integer to the corresponding unicode character " "before printing." msgstr "" -#: library/string.rst:499 +#: library/string.rst:501 msgid "``'d'``" msgstr "" -#: library/string.rst:499 +#: library/string.rst:501 msgid "Decimal Integer. Outputs the number in base 10." msgstr "" -#: library/string.rst:501 +#: library/string.rst:503 msgid "``'o'``" msgstr "" -#: library/string.rst:501 +#: library/string.rst:503 msgid "Octal format. Outputs the number in base 8." msgstr "" -#: library/string.rst:503 +#: library/string.rst:505 msgid "``'x'``" msgstr "" -#: library/string.rst:503 +#: library/string.rst:505 msgid "" "Hex format. Outputs the number in base 16, using lower-case letters for the " "digits above 9." msgstr "" -#: library/string.rst:506 +#: library/string.rst:508 msgid "``'X'``" msgstr "" -#: library/string.rst:506 +#: library/string.rst:508 msgid "" "Hex format. Outputs the number in base 16, using upper-case letters for the " "digits above 9. In case ``'#'`` is specified, the prefix ``'0x'`` will be " "upper-cased to ``'0X'`` as well." msgstr "" -#: library/string.rst:593 +#: library/string.rst:603 msgid "``'n'``" msgstr "" -#: library/string.rst:511 +#: library/string.rst:515 msgid "" "Number. This is the same as ``'d'``, except that it uses the current locale " -"setting to insert the appropriate digit group separators." +"setting to insert the appropriate digit group separators. Note that the " +"default locale is not the system locale. Depending on your use case, you may " +"wish to set :const:`~locale.LC_NUMERIC` with :func:`locale.setlocale` before " +"using ``'n'``." msgstr "" -#: library/string.rst:515 +#: library/string.rst:522 msgid "The same as ``'d'``." msgstr "" -#: library/string.rst:518 +#: library/string.rst:525 msgid "" "In addition to the above presentation types, integers can be formatted with " "the floating-point presentation types listed below (except ``'n'`` and " @@ -722,17 +727,17 @@ msgid "" "floating-point number before formatting." msgstr "" -#: library/string.rst:523 +#: library/string.rst:530 msgid "" "The available presentation types for :class:`float` and :class:`~decimal." "Decimal` values are:" msgstr "" -#: library/string.rst:529 +#: library/string.rst:536 msgid "``'e'``" msgstr "" -#: library/string.rst:529 +#: library/string.rst:536 msgid "" "Scientific notation. For a given precision ``p``, formats the number in " "scientific notation with the letter 'e' separating the coefficient from the " @@ -744,21 +749,27 @@ msgid "" "is used." msgstr "" -#: library/string.rst:540 +#: library/string.rst:547 +msgid "" +"For :class:`float`, the exponent always contains at least two digits, and is " +"zero if the value is zero." +msgstr "" + +#: library/string.rst:550 msgid "``'E'``" msgstr "" -#: library/string.rst:540 +#: library/string.rst:550 msgid "" "Scientific notation. Same as ``'e'`` except it uses an upper case 'E' as the " "separator character." msgstr "" -#: library/string.rst:543 +#: library/string.rst:553 msgid "``'f'``" msgstr "" -#: library/string.rst:543 +#: library/string.rst:553 msgid "" "Fixed-point notation. For a given precision ``p``, formats the number as a " "decimal number with exactly ``p`` digits following the decimal point. With " @@ -768,21 +779,21 @@ msgid "" "point is omitted unless the ``#`` option is used." msgstr "" -#: library/string.rst:552 +#: library/string.rst:562 msgid "``'F'``" msgstr "" -#: library/string.rst:552 +#: library/string.rst:562 msgid "" "Fixed-point notation. Same as ``'f'``, but converts ``nan`` to ``NAN`` and " "``inf`` to ``INF``." msgstr "" -#: library/string.rst:555 +#: library/string.rst:565 msgid "``'g'``" msgstr "" -#: library/string.rst:555 +#: library/string.rst:565 msgid "" "General format. For a given precision ``p >= 1``, this rounds the number to " "``p`` significant digits and then formats the result in either fixed-point " @@ -790,7 +801,7 @@ msgid "" "``0`` is treated as equivalent to a precision of ``1``." msgstr "" -#: library/string.rst:562 +#: library/string.rst:572 msgid "" "The precise rules are as follows: suppose that the result formatted with " "presentation type ``'e'`` and precision ``p-1`` would have exponent " @@ -803,7 +814,7 @@ msgid "" "unless the ``'#'`` option is used." msgstr "" -#: library/string.rst:575 +#: library/string.rst:585 msgid "" "With no precision given, uses a precision of ``6`` significant digits for :" "class:`float`. For :class:`~decimal.Decimal`, the coefficient of the result " @@ -813,41 +824,43 @@ msgid "" "notation is used otherwise." msgstr "" -#: library/string.rst:584 +#: library/string.rst:594 msgid "" "Positive and negative infinity, positive and negative zero, and nans, are " "formatted as ``inf``, ``-inf``, ``0``, ``-0`` and ``nan`` respectively, " "regardless of the precision." msgstr "" -#: library/string.rst:589 +#: library/string.rst:599 msgid "``'G'``" msgstr "" -#: library/string.rst:589 +#: library/string.rst:599 msgid "" "General format. Same as ``'g'`` except switches to ``'E'`` if the number " "gets too large. The representations of infinity and NaN are uppercased, too." msgstr "" -#: library/string.rst:593 +#: library/string.rst:605 msgid "" "Number. This is the same as ``'g'``, except that it uses the current locale " "setting to insert the appropriate digit group separators for the integral " -"part of a number." +"part of a number. Note that the default locale is not the system locale. " +"Depending on your use case, you may wish to set :const:`~locale.LC_NUMERIC` " +"with :func:`locale.setlocale` before using ``'n'``." msgstr "" -#: library/string.rst:598 +#: library/string.rst:613 msgid "``'%'``" msgstr "" -#: library/string.rst:598 +#: library/string.rst:613 msgid "" "Percentage. Multiplies the number by 100 and displays in fixed (``'f'``) " "format, followed by a percent sign." msgstr "" -#: library/string.rst:601 +#: library/string.rst:616 msgid "" "For :class:`float` this is like the ``'g'`` type, except that when fixed-" "point notation is used to format the result, it always includes at least one " @@ -856,20 +869,20 @@ msgid "" "as large as needed to represent the given value faithfully." msgstr "" -#: library/string.rst:609 +#: library/string.rst:624 msgid "" "For :class:`~decimal.Decimal`, this is the same as either ``'g'`` or ``'G'`` " "depending on the value of ``context.capitals`` for the current decimal " "context." msgstr "" -#: library/string.rst:613 +#: library/string.rst:628 msgid "" "The overall effect is to match the output of :func:`str` as altered by the " "other format modifiers." msgstr "" -#: library/string.rst:617 +#: library/string.rst:632 msgid "" "The result should be correctly rounded to a given precision ``p`` of digits " "after the decimal point. The rounding mode for :class:`float` matches that " @@ -877,7 +890,7 @@ msgid "" "mode of the current :ref:`context ` will be used." msgstr "" -#: library/string.rst:622 +#: library/string.rst:637 msgid "" "The available presentation types for :class:`complex` are the same as those " "for :class:`float` (``'%'`` is not allowed). Both the real and imaginary " @@ -889,34 +902,34 @@ msgid "" "surrounded by parentheses), possibly altered by other format modifiers." msgstr "" -#: library/string.rst:635 +#: library/string.rst:650 msgid "Format examples" msgstr "" -#: library/string.rst:637 +#: library/string.rst:652 msgid "" "This section contains examples of the :meth:`str.format` syntax and " "comparison with the old ``%``-formatting." msgstr "" -#: library/string.rst:640 +#: library/string.rst:655 msgid "" "In most of the cases the syntax is similar to the old ``%``-formatting, with " "the addition of the ``{}`` and with ``:`` used instead of ``%``. For " "example, ``'%03.2f'`` can be translated to ``'{:03.2f}'``." msgstr "" -#: library/string.rst:644 +#: library/string.rst:659 msgid "" "The new format syntax also supports new and different options, shown in the " "following examples." msgstr "" -#: library/string.rst:647 +#: library/string.rst:662 msgid "Accessing arguments by position::" msgstr "" -#: library/string.rst:649 +#: library/string.rst:664 msgid "" ">>> '{0}, {1}, {2}'.format('a', 'b', 'c')\n" "'a, b, c'\n" @@ -931,11 +944,11 @@ msgid "" "'abracadabra'" msgstr "" -#: library/string.rst:660 +#: library/string.rst:675 msgid "Accessing arguments by name::" msgstr "" -#: library/string.rst:662 +#: library/string.rst:677 msgid "" ">>> 'Coordinates: {latitude}, {longitude}'.format(latitude='37.24N', " "longitude='-115.81W')\n" @@ -945,11 +958,11 @@ msgid "" "'Coordinates: 37.24N, -115.81W'" msgstr "" -#: library/string.rst:668 +#: library/string.rst:683 msgid "Accessing arguments' attributes::" msgstr "" -#: library/string.rst:670 +#: library/string.rst:685 msgid "" ">>> c = 3-5j\n" ">>> ('The complex number {0} is formed from the real part {0.real} '\n" @@ -966,33 +979,33 @@ msgid "" "'Point(4, 2)'" msgstr "" -#: library/string.rst:683 +#: library/string.rst:698 msgid "Accessing arguments' items::" msgstr "" -#: library/string.rst:685 +#: library/string.rst:700 msgid "" ">>> coord = (3, 5)\n" ">>> 'X: {0[0]}; Y: {0[1]}'.format(coord)\n" "'X: 3; Y: 5'" msgstr "" -#: library/string.rst:689 +#: library/string.rst:704 msgid "Replacing ``%s`` and ``%r``::" msgstr "" -#: library/string.rst:691 +#: library/string.rst:706 msgid "" ">>> \"repr() shows quotes: {!r}; str() doesn't: {!s}\".format('test1', " "'test2')\n" "\"repr() shows quotes: 'test1'; str() doesn't: test2\"" msgstr "" -#: library/string.rst:694 +#: library/string.rst:709 msgid "Aligning the text and specifying a width::" msgstr "" -#: library/string.rst:696 +#: library/string.rst:711 msgid "" ">>> '{:<30}'.format('left aligned')\n" "'left aligned '\n" @@ -1004,11 +1017,11 @@ msgid "" "'***********centered***********'" msgstr "" -#: library/string.rst:705 +#: library/string.rst:720 msgid "Replacing ``%+f``, ``%-f``, and ``% f`` and specifying a sign::" msgstr "" -#: library/string.rst:707 +#: library/string.rst:722 msgid "" ">>> '{:+f}; {:+f}'.format(3.14, -3.14) # show it always\n" "'+3.140000; -3.140000'\n" @@ -1019,12 +1032,12 @@ msgid "" "'3.140000; -3.140000'" msgstr "" -#: library/string.rst:714 +#: library/string.rst:729 msgid "" "Replacing ``%x`` and ``%o`` and converting the value to different bases::" msgstr "" -#: library/string.rst:716 +#: library/string.rst:731 msgid "" ">>> # format also supports binary numbers\n" ">>> \"int: {0:d}; hex: {0:x}; oct: {0:o}; bin: {0:b}\".format(42)\n" @@ -1034,11 +1047,11 @@ msgid "" "'int: 42; hex: 0x2a; oct: 0o52; bin: 0b101010'" msgstr "" -#: library/string.rst:723 +#: library/string.rst:738 msgid "Using the comma or the underscore as a digit group separator::" msgstr "" -#: library/string.rst:725 +#: library/string.rst:740 msgid "" ">>> '{:,}'.format(1234567890)\n" "'1,234,567,890'\n" @@ -1050,11 +1063,11 @@ msgid "" "'4996_02d2'" msgstr "" -#: library/string.rst:734 +#: library/string.rst:749 msgid "Expressing a percentage::" msgstr "" -#: library/string.rst:736 +#: library/string.rst:751 msgid "" ">>> points = 19\n" ">>> total = 22\n" @@ -1062,23 +1075,23 @@ msgid "" "'Correct answers: 86.36%'" msgstr "" -#: library/string.rst:741 +#: library/string.rst:756 msgid "Using type-specific formatting::" msgstr "" -#: library/string.rst:743 +#: library/string.rst:758 msgid "" -">>> import datetime\n" -">>> d = datetime.datetime(2010, 7, 4, 12, 15, 58)\n" +">>> import datetime as dt\n" +">>> d = dt.datetime(2010, 7, 4, 12, 15, 58)\n" ">>> '{:%Y-%m-%d %H:%M:%S}'.format(d)\n" "'2010-07-04 12:15:58'" msgstr "" -#: library/string.rst:748 +#: library/string.rst:763 msgid "Nesting arguments and more complex examples::" msgstr "" -#: library/string.rst:750 +#: library/string.rst:765 msgid "" ">>> for align, text in zip('<^>', ['left', 'center', 'right']):\n" "... '{0:{fill}{align}16}'.format(text, fill=align, align=align)\n" @@ -1109,11 +1122,11 @@ msgid "" " 11 B 13 1011" msgstr "" -#: library/string.rst:782 +#: library/string.rst:797 msgid "Template strings" msgstr "" -#: library/string.rst:784 +#: library/string.rst:799 msgid "" "Template strings provide simpler string substitutions as described in :pep:" "`292`. A primary use case for template strings is for internationalization " @@ -1123,17 +1136,17 @@ msgid "" "the `flufl.i18n `_ package." msgstr "" -#: library/string.rst:794 +#: library/string.rst:809 msgid "" "Template strings support ``$``-based substitutions, using the following " "rules:" msgstr "" -#: library/string.rst:796 +#: library/string.rst:811 msgid "``$$`` is an escape; it is replaced with a single ``$``." msgstr "" -#: library/string.rst:798 +#: library/string.rst:813 msgid "" "``$identifier`` names a substitution placeholder matching a mapping key of " "``\"identifier\"``. By default, ``\"identifier\"`` is restricted to any " @@ -1143,30 +1156,30 @@ msgid "" "specification." msgstr "" -#: library/string.rst:805 +#: library/string.rst:820 msgid "" "``${identifier}`` is equivalent to ``$identifier``. It is required when " "valid identifier characters follow the placeholder but are not part of the " "placeholder, such as ``\"${noun}ification\"``." msgstr "" -#: library/string.rst:809 +#: library/string.rst:824 msgid "" "Any other appearance of ``$`` in the string will result in a :exc:" "`ValueError` being raised." msgstr "" -#: library/string.rst:812 +#: library/string.rst:827 msgid "" "The :mod:`string` module provides a :class:`Template` class that implements " "these rules. The methods of :class:`Template` are:" msgstr "" -#: library/string.rst:818 +#: library/string.rst:833 msgid "The constructor takes a single argument which is the template string." msgstr "" -#: library/string.rst:823 +#: library/string.rst:838 msgid "" "Performs the template substitution, returning a new string. *mapping* is " "any dictionary-like object with keys that match the placeholders in the " @@ -1175,7 +1188,7 @@ msgid "" "there are duplicates, the placeholders from *kwds* take precedence." msgstr "" -#: library/string.rst:832 +#: library/string.rst:847 msgid "" "Like :meth:`substitute`, except that if placeholders are missing from " "*mapping* and *kwds*, instead of raising a :exc:`KeyError` exception, the " @@ -1184,7 +1197,7 @@ msgid "" "simply return ``$`` instead of raising :exc:`ValueError`." msgstr "" -#: library/string.rst:838 +#: library/string.rst:853 msgid "" "While other exceptions may still occur, this method is called \"safe\" " "because it always tries to return a usable string instead of raising an " @@ -1194,33 +1207,33 @@ msgid "" "Python identifiers." msgstr "" -#: library/string.rst:848 +#: library/string.rst:863 msgid "" "Returns ``False`` if the template has invalid placeholders that will cause :" "meth:`substitute` to raise :exc:`ValueError`." msgstr "" -#: library/string.rst:856 +#: library/string.rst:871 msgid "" "Returns a list of the valid identifiers in the template, in the order they " "first appear, ignoring any invalid identifiers." msgstr "" -#: library/string.rst:861 +#: library/string.rst:876 msgid ":class:`Template` instances also provide one public data attribute:" msgstr "" -#: library/string.rst:865 +#: library/string.rst:880 msgid "" "This is the object passed to the constructor's *template* argument. In " "general, you shouldn't change it, but read-only access is not enforced." msgstr "" -#: library/string.rst:868 +#: library/string.rst:883 msgid "Here is an example of how to use a Template::" msgstr "" -#: library/string.rst:870 +#: library/string.rst:885 msgid "" ">>> from string import Template\n" ">>> s = Template('$who likes $what')\n" @@ -1239,7 +1252,7 @@ msgid "" "'tim likes $what'" msgstr "" -#: library/string.rst:886 +#: library/string.rst:901 msgid "" "Advanced usage: you can derive subclasses of :class:`Template` to customize " "the placeholder syntax, delimiter character, or the entire regular " @@ -1247,7 +1260,7 @@ msgid "" "these class attributes:" msgstr "" -#: library/string.rst:891 +#: library/string.rst:906 msgid "" "*delimiter* -- This is the literal string describing a placeholder " "introducing delimiter. The default value is ``$``. Note that this should " @@ -1257,7 +1270,7 @@ msgid "" "the subclass's class namespace)." msgstr "" -#: library/string.rst:898 +#: library/string.rst:913 msgid "" "*idpattern* -- This is the regular expression describing the pattern for non-" "braced placeholders. The default value is the regular expression ``(?a:[_a-" @@ -1265,19 +1278,19 @@ msgid "" "pattern will also apply to braced placeholders." msgstr "" -#: library/string.rst:905 +#: library/string.rst:920 msgid "" "Since default *flags* is ``re.IGNORECASE``, pattern ``[a-z]`` can match with " "some non-ASCII characters. That's why we use the local ``a`` flag here." msgstr "" -#: library/string.rst:909 +#: library/string.rst:924 msgid "" "*braceidpattern* can be used to define separate patterns used inside and " "outside the braces." msgstr "" -#: library/string.rst:913 +#: library/string.rst:928 msgid "" "*braceidpattern* -- This is like *idpattern* but describes the pattern for " "braced placeholders. Defaults to ``None`` which means to fall back to " @@ -1286,7 +1299,7 @@ msgid "" "unbraced placeholders." msgstr "" -#: library/string.rst:921 +#: library/string.rst:936 msgid "" "*flags* -- The regular expression flags that will be applied when compiling " "the regular expression used for recognizing substitutions. The default " @@ -1295,50 +1308,50 @@ msgid "" "regular expressions." msgstr "" -#: library/string.rst:929 +#: library/string.rst:944 msgid "" "Alternatively, you can provide the entire regular expression pattern by " "overriding the class attribute *pattern*. If you do this, the value must be " -"a regular expression object with four named capturing groups. The capturing " -"groups correspond to the rules given above, along with the invalid " -"placeholder rule:" +"a regular expression pattern string, or a compiled regular expression " +"object, with four named capturing groups. The capturing groups correspond " +"to the rules given above, along with the invalid placeholder rule:" msgstr "" -#: library/string.rst:935 +#: library/string.rst:951 msgid "" "*escaped* -- This group matches the escape sequence, e.g. ``$$``, in the " "default pattern." msgstr "" -#: library/string.rst:938 +#: library/string.rst:954 msgid "" "*named* -- This group matches the unbraced placeholder name; it should not " "include the delimiter in capturing group." msgstr "" -#: library/string.rst:941 +#: library/string.rst:957 msgid "" "*braced* -- This group matches the brace enclosed placeholder name; it " "should not include either the delimiter or braces in the capturing group." msgstr "" -#: library/string.rst:944 +#: library/string.rst:960 msgid "" "*invalid* -- This group matches any other delimiter pattern (usually a " "single delimiter), and it should appear last in the regular expression." msgstr "" -#: library/string.rst:947 +#: library/string.rst:963 msgid "" "The methods on this class will raise :exc:`ValueError` if the pattern " "matches the template without one of these named groups matching." msgstr "" -#: library/string.rst:952 +#: library/string.rst:968 msgid "Helper functions" msgstr "" -#: library/string.rst:956 +#: library/string.rst:972 msgid "" "Split the argument into words using :meth:`str.split`, capitalize each word " "using :meth:`str.capitalize`, and join the capitalized words using :meth:" @@ -1412,10 +1425,10 @@ msgstr "" msgid "_ (underscore)" msgstr "" -#: library/string.rst:792 +#: library/string.rst:807 msgid "$ (dollar)" msgstr "" -#: library/string.rst:792 +#: library/string.rst:807 msgid "in template strings" msgstr "" diff --git a/library/stringprep.po b/library/stringprep.po index 47615ce9e..aef65b6dc 100644 --- a/library/stringprep.po +++ b/library/stringprep.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/struct.po b/library/struct.po index e5f0b258e..88c8e27b2 100644 --- a/library/struct.po +++ b/library/struct.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: 2025-05-05 20:53+0200\n" "Last-Translator: Marios Giannopoulos \n" "Language-Team: PyGreece \n" @@ -112,17 +112,19 @@ msgstr "" "μορφοποίησης." #: library/struct.rst:68 +#, fuzzy msgid "" "Pack the values *v1*, *v2*, ... according to the format string *format* and " "write the packed bytes into the writable buffer *buffer* starting at " -"position *offset*. Note that *offset* is a required argument." +"position *offset*. Note that *offset* is a required argument. A negative " +"*offset* counts from the end of *buffer*." msgstr "" "Πακετάρει τις τιμές *v1*, *v2*, ... σύμφωνα με τη συμβολοσειρά μορφοποίησης " "*format* και γράφει τα πακεταρισμένα bytes στον εγγράψιμο buffer *buffer* " "ξεκινώντας από τη θέση *offset*. Σημειώστε ότι το *offset* είναι υποχρεωτικό " "όρισμα." -#: library/struct.rst:75 +#: library/struct.rst:76 msgid "" "Unpack from the buffer *buffer* (presumably packed by ``pack(format, ...)``) " "according to the format string *format*. The result is a tuple even if it " @@ -136,12 +138,14 @@ msgstr "" "απαιτούμενο μέγεθος σύμφωνα με τη μορφή, όπως καθορίζεται από τη συνάρτηση :" "func:`calcsize`." -#: library/struct.rst:83 +#: library/struct.rst:84 +#, fuzzy msgid "" "Unpack from *buffer* starting at position *offset*, according to the format " "string *format*. The result is a tuple even if it contains exactly one " "item. The buffer's size in bytes, starting at position *offset*, must be at " -"least the size required by the format, as reflected by :func:`calcsize`." +"least the size required by the format, as reflected by :func:`calcsize`. A " +"negative *offset* counts from the end of *buffer*." msgstr "" "Αποσυμπιέζει από τον *buffer* ξεκινώντας από τη θέση *offset*, σύμφωνα με τη " "συμβολοσειρά μορφοποίησης *format*. Το αποτέλεσμα είναι μια πλειάδα, ακόμα " @@ -149,7 +153,7 @@ msgstr "" "από τη θέση *offset*, πρέπει να είναι τουλάχιστον το μέγεθος που απαιτείται " "από τη μορφή, όπως καθορίζεται από τη συνάρτηση :func:`calcsize`." -#: library/struct.rst:91 +#: library/struct.rst:93 msgid "" "Iteratively unpack from the buffer *buffer* according to the format string " "*format*. This function returns an iterator which will read equally sized " @@ -164,13 +168,13 @@ msgstr "" "του μεγέθους που απαιτείται από τη μορφή, όπως καθορίζεται από τη συνάρτηση :" "func:`calcsize`." -#: library/struct.rst:97 +#: library/struct.rst:99 msgid "Each iteration yields a tuple as specified by the format string." msgstr "" "Κάθε επανάληψη επιστρέφει μια πλειάδα σύμφωνα με τη συμβολοσειρά " "μορφοποίησης." -#: library/struct.rst:104 +#: library/struct.rst:106 msgid "" "Return the size of the struct (and hence of the bytes object produced by " "``pack(format, ...)``) corresponding to the format string *format*." @@ -179,11 +183,11 @@ msgstr "" "που παράγεται από το ``pack(format, ...)``) που αντιστοιχεί στη συμβολοσειρά " "μορφοποίησης *format*." -#: library/struct.rst:111 +#: library/struct.rst:113 msgid "Format Strings" msgstr "Συμβολοσειρές μορφοποίησης" -#: library/struct.rst:113 +#: library/struct.rst:115 msgid "" "Format strings describe the data layout when packing and unpacking data. " "They are built up from :ref:`format characters`, which " @@ -203,11 +207,11 @@ msgstr "" "περισσότερους χαρακτήρες μορφοποίησης που περιγράφουν τις πραγματικές τιμές " "δεδομένων και το συμπλήρωμα." -#: library/struct.rst:125 +#: library/struct.rst:127 msgid "Byte Order, Size, and Alignment" msgstr "Διάταξη Byte, Μέγεθος και Στοίχιση" -#: library/struct.rst:127 +#: library/struct.rst:129 msgid "" "By default, C types are represented in the machine's native format and byte " "order, and properly aligned by skipping pad bytes if necessary (according to " @@ -224,7 +228,7 @@ msgstr "" "αντίστοιχης δομής της C. Το αν θα χρησιμοποιηθεί φυσική διάταξη byte και " "γέμισμα ή τυποποιημένες μορφές εξαρτάται από την εφαρμογή." -#: library/struct.rst:143 +#: library/struct.rst:145 msgid "" "Alternatively, the first character of the format string can be used to " "indicate the byte order, size and alignment of the packed data, according to " @@ -234,71 +238,71 @@ msgstr "" "χρησιμοποιηθεί για να υποδείξει τη σειρά byte, το μέγεθος και την " "ευθυγράμμιση των συσκευασμένων δεδομένων, σύμφωνα με το παρακάτω πίνακα:" -#: library/struct.rst:148 +#: library/struct.rst:150 msgid "Character" msgstr "Χαρακτήρας" -#: library/struct.rst:148 +#: library/struct.rst:150 msgid "Byte order" msgstr "Σειρά bytes" -#: library/struct.rst:148 +#: library/struct.rst:150 msgid "Size" msgstr "Μέγεθος" -#: library/struct.rst:148 +#: library/struct.rst:150 msgid "Alignment" msgstr "Στοίχιση" -#: library/struct.rst:150 +#: library/struct.rst:152 msgid "``@``" msgstr "``@``" -#: library/struct.rst:152 +#: library/struct.rst:154 msgid "native" msgstr "native" -#: library/struct.rst:152 +#: library/struct.rst:154 msgid "``=``" msgstr "``=``" -#: library/struct.rst:154 library/struct.rst:158 +#: library/struct.rst:156 library/struct.rst:160 msgid "standard" msgstr "τυπικό" -#: library/struct.rst:154 library/struct.rst:158 +#: library/struct.rst:156 library/struct.rst:160 msgid "none" msgstr "κανένα" -#: library/struct.rst:154 +#: library/struct.rst:156 msgid "``<``" msgstr "``<``" -#: library/struct.rst:154 +#: library/struct.rst:156 msgid "little-endian" msgstr "little-endian" -#: library/struct.rst:156 +#: library/struct.rst:158 msgid "``>``" msgstr "``>``" -#: library/struct.rst:156 +#: library/struct.rst:158 msgid "big-endian" msgstr "big-endian" -#: library/struct.rst:158 +#: library/struct.rst:160 msgid "``!``" msgstr "``!``" -#: library/struct.rst:158 +#: library/struct.rst:160 msgid "network (= big-endian)" msgstr "δίκτυο (= big-endian)" -#: library/struct.rst:161 +#: library/struct.rst:163 msgid "If the first character is not one of these, ``'@'`` is assumed." msgstr "Αν ο πρώτος χαρακτήρας δεν είναι ένας από αυτούς, υποτίθεται ``'@'``." -#: library/struct.rst:165 +#: library/struct.rst:167 msgid "" "The number 1023 (``0x3ff`` in hexadecimal) has the following byte " "representations:" @@ -306,19 +310,19 @@ msgstr "" "Ο αριθμός 1023 (``0x3ff`` σε δεκαεξαδική μορφή) έχει τις ακόλουθες " "αναπαραστάσεις σε byte:" -#: library/struct.rst:167 +#: library/struct.rst:169 msgid "``03 ff`` in big-endian (``>``)" msgstr "``03 ff`` σε big-endian (``>``)" -#: library/struct.rst:168 +#: library/struct.rst:170 msgid "``ff 03`` in little-endian (``<``)" msgstr "``ff 03`` σε little-endian (``<``)" -#: library/struct.rst:170 +#: library/struct.rst:172 msgid "Python example:" msgstr "Παράδειγμα Python:" -#: library/struct.rst:178 +#: library/struct.rst:180 msgid "" "Native byte order is big-endian or little-endian, depending on the host " "system. For example, Intel x86, AMD64 (x86-64), and Apple M1 are little-" @@ -331,7 +335,7 @@ msgstr "" "endian. Χρησιμοποιήστε τη μεταβλητή :data:`sys.byteorder` για να ελέγξετε το " "endianness του συστήματος σας." -#: library/struct.rst:183 +#: library/struct.rst:185 msgid "" "Native size and alignment are determined using the C compiler's ``sizeof`` " "expression. This is always combined with native byte order." @@ -340,7 +344,7 @@ msgstr "" "``sizeof`` του μεταγλωττιστή C. Αυτό συνδυάζεται πάντα με την native σειρά " "byte." -#: library/struct.rst:186 +#: library/struct.rst:188 msgid "" "Standard size depends only on the format character; see the table in the :" "ref:`format-characters` section." @@ -348,7 +352,7 @@ msgstr "" "Το τυπικό μέγεθος εξαρτάται μόνο από τον χαρακτήρα μορφοποίησης· δείτε τον " "πίνακα στην ενότητα :ref:`format-characters`." -#: library/struct.rst:189 +#: library/struct.rst:191 msgid "" "Note the difference between ``'@'`` and ``'='``: both use native byte order, " "but the size and alignment of the latter is standardized." @@ -357,7 +361,7 @@ msgstr "" "χρησιμοποιούν τη native σειρά byte, αλλά το μέγεθος και η στοίχιση του " "τελευταίου είναι τυποποιημένα." -#: library/struct.rst:192 +#: library/struct.rst:194 msgid "" "The form ``'!'`` represents the network byte order which is always big-" "endian as defined in `IETF RFC 1700 `_." @@ -365,7 +369,7 @@ msgstr "" "Η μορφή ``'!'`` αντιπροσωπεύει τη σειρά byte του δικτύου, η οποία είναι " "πάντα big-endian όπως ορίζεται στο `IETF RFC 1700 `_." -#: library/struct.rst:195 +#: library/struct.rst:197 msgid "" "There is no way to indicate non-native byte order (force byte-swapping); use " "the appropriate choice of ``'<'`` or ``'>'``." @@ -373,11 +377,11 @@ msgstr "" "Δεν υπάρχει τρόπος να δηλωθεί non-native σειρά byte (να επιβληθεί εναλλαγή " "byte). Χρησιμοποιήστε την κατάλληλη επιλογή ``'<'`` ή ``'>'``." -#: library/struct.rst:277 +#: library/struct.rst:279 msgid "Notes:" msgstr "Σημειώσεις:" -#: library/struct.rst:200 +#: library/struct.rst:202 msgid "" "Padding is only automatically added between successive structure members. No " "padding is added at the beginning or the end of the encoded struct." @@ -386,7 +390,7 @@ msgstr "" "της δομής. Δεν προστίθεται συμπλήρωμα στην αρχή ή στο τέλος της " "κωδικοποιημένης δομής." -#: library/struct.rst:203 +#: library/struct.rst:205 msgid "" "No padding is added when using non-native size and alignment, e.g. with '<', " "'>', '=', and '!'." @@ -394,7 +398,7 @@ msgstr "" "Δεν προστίθεται συμπλήρωμα όταν χρησιμοποιείται non-native μέγεθος και " "στοίχιση, π.χ. με '<','>', '=', και '!'." -#: library/struct.rst:206 +#: library/struct.rst:208 msgid "" "To align the end of a structure to the alignment requirement of a particular " "type, end the format with the code for that type with a repeat count of " @@ -404,11 +408,11 @@ msgstr "" "συγκεκριμένου τύπου, τελειώστε τη μορφή με τον κωδικό για αυτό τον τύπο με " "πλήθος επαναλήψεων μηδέν. Δείτε :ref:`struct-examples`." -#: library/struct.rst:214 +#: library/struct.rst:216 msgid "Format Characters" msgstr "Χαρακτήρες μορφής" -#: library/struct.rst:216 +#: library/struct.rst:218 msgid "" "Format characters have the following meaning; the conversion between C and " "Python values should be obvious given their types. The 'Standard size' " @@ -425,278 +429,283 @@ msgstr "" "native μέγεθος, το μέγεθος της συμπιεσμένης τιμής εξαρτάται από την " "πλατφόρμα." -#: library/struct.rst:224 +#: library/struct.rst:226 msgid "Format" msgstr "Μορφή" -#: library/struct.rst:224 +#: library/struct.rst:226 msgid "C Type" msgstr "Τύπος C" -#: library/struct.rst:224 +#: library/struct.rst:226 msgid "Python type" msgstr "Τύπος Python" -#: library/struct.rst:224 +#: library/struct.rst:226 msgid "Standard size" msgstr "Τυπικό μέγεθος" -#: library/struct.rst:224 +#: library/struct.rst:226 msgid "Notes" msgstr "Σημειώσεις" -#: library/struct.rst:226 +#: library/struct.rst:228 msgid "``x``" msgstr "``x``" -#: library/struct.rst:226 +#: library/struct.rst:228 msgid "pad byte" msgstr "συμπληρωματικό byte" -#: library/struct.rst:226 +#: library/struct.rst:228 msgid "no value" msgstr "καμία τιμή" -#: library/struct.rst:226 +#: library/struct.rst:228 msgid "\\(7)" msgstr "\\(7)" -#: library/struct.rst:228 +#: library/struct.rst:230 msgid "``c``" msgstr "``c``" -#: library/struct.rst:228 +#: library/struct.rst:230 msgid ":c:expr:`char`" msgstr ":c:expr:`char`" -#: library/struct.rst:228 +#: library/struct.rst:230 msgid "bytes of length 1" msgstr "bytes μήκους 1" -#: library/struct.rst:230 library/struct.rst:234 +#: library/struct.rst:232 library/struct.rst:236 msgid "1" msgstr "1" -#: library/struct.rst:230 +#: library/struct.rst:232 msgid "``b``" msgstr "``b``" -#: library/struct.rst:230 +#: library/struct.rst:232 msgid ":c:expr:`signed char`" msgstr ":c:expr:`signed char`" -#: library/struct.rst:232 library/struct.rst:238 library/struct.rst:242 -#: library/struct.rst:246 library/struct.rst:250 library/struct.rst:255 -#: library/struct.rst:267 -msgid "integer" +#: library/struct.rst:234 library/struct.rst:240 library/struct.rst:244 +#: library/struct.rst:248 library/struct.rst:252 library/struct.rst:257 +#: library/struct.rst:269 +#, fuzzy +msgid "int" msgstr "integer" -#: library/struct.rst:230 -msgid "\\(1), \\(2)" -msgstr "\\(1), \\(2)" +#: library/struct.rst:234 library/struct.rst:240 library/struct.rst:244 +#: library/struct.rst:248 library/struct.rst:252 +msgid "\\(2)" +msgstr "\\(2)" -#: library/struct.rst:232 +#: library/struct.rst:234 msgid "``B``" msgstr "``B``" -#: library/struct.rst:232 +#: library/struct.rst:234 msgid ":c:expr:`unsigned char`" msgstr ":c:expr:`unsigned char`" -#: library/struct.rst:236 library/struct.rst:240 library/struct.rst:244 -#: library/struct.rst:248 library/struct.rst:250 -msgid "\\(2)" -msgstr "\\(2)" - -#: library/struct.rst:234 +#: library/struct.rst:236 msgid "``?``" msgstr "``?``" -#: library/struct.rst:234 +#: library/struct.rst:236 msgid ":c:expr:`_Bool`" msgstr ":c:expr:`_Bool`" -#: library/struct.rst:234 +#: library/struct.rst:236 msgid "bool" msgstr "bool" -#: library/struct.rst:234 +#: library/struct.rst:236 msgid "\\(1)" msgstr "\\(1)" -#: library/struct.rst:236 +#: library/struct.rst:238 msgid "``h``" msgstr "``h``" -#: library/struct.rst:236 +#: library/struct.rst:238 msgid ":c:expr:`short`" msgstr ":c:expr:`short`" -#: library/struct.rst:238 library/struct.rst:257 +#: library/struct.rst:240 library/struct.rst:259 msgid "2" msgstr "2" -#: library/struct.rst:238 +#: library/struct.rst:240 msgid "``H``" msgstr "``H``" -#: library/struct.rst:238 +#: library/struct.rst:240 msgid ":c:expr:`unsigned short`" msgstr ":c:expr:`unsigned short`" -#: library/struct.rst:240 +#: library/struct.rst:242 msgid "``i``" msgstr "``i``" -#: library/struct.rst:240 +#: library/struct.rst:242 msgid ":c:expr:`int`" msgstr ":c:expr:`int`" -#: library/struct.rst:242 library/struct.rst:246 library/struct.rst:259 +#: library/struct.rst:244 library/struct.rst:248 library/struct.rst:261 msgid "4" msgstr "4" -#: library/struct.rst:242 +#: library/struct.rst:244 msgid "``I``" msgstr "``I``" -#: library/struct.rst:242 +#: library/struct.rst:244 msgid ":c:expr:`unsigned int`" msgstr ":c:expr:`unsigned int`" -#: library/struct.rst:244 +#: library/struct.rst:246 msgid "``l``" msgstr "``l``" -#: library/struct.rst:244 +#: library/struct.rst:246 msgid ":c:expr:`long`" msgstr ":c:expr:`long`" -#: library/struct.rst:246 +#: library/struct.rst:248 msgid "``L``" msgstr "``L``" -#: library/struct.rst:246 +#: library/struct.rst:248 msgid ":c:expr:`unsigned long`" msgstr ":c:expr:`unsigned long`" -#: library/struct.rst:248 +#: library/struct.rst:250 msgid "``q``" msgstr "``q``" -#: library/struct.rst:248 +#: library/struct.rst:250 msgid ":c:expr:`long long`" msgstr ":c:expr:`long long`" -#: library/struct.rst:250 library/struct.rst:261 +#: library/struct.rst:252 library/struct.rst:263 msgid "8" msgstr "8" -#: library/struct.rst:250 +#: library/struct.rst:252 msgid "``Q``" msgstr "``Q``" -#: library/struct.rst:250 +#: library/struct.rst:252 msgid ":c:expr:`unsigned long long`" msgstr ":c:expr:`unsigned long long`" -#: library/struct.rst:253 +#: library/struct.rst:255 msgid "``n``" msgstr "``n``" -#: library/struct.rst:253 +#: library/struct.rst:255 msgid ":c:type:`ssize_t`" msgstr ":c:type:`ssize_t`" -#: library/struct.rst:255 -msgid "\\(3)" -msgstr "\\(3)" +#: library/struct.rst:257 +#, fuzzy +msgid "\\(2), \\(3)" +msgstr "\\(1), \\(2)" -#: library/struct.rst:255 +#: library/struct.rst:257 msgid "``N``" msgstr "``N``" -#: library/struct.rst:255 +#: library/struct.rst:257 msgid ":c:type:`size_t`" msgstr ":c:type:`size_t`" -#: library/struct.rst:257 +#: library/struct.rst:259 msgid "``e``" msgstr "``e``" -#: library/struct.rst:257 -msgid "\\(6)" -msgstr "\\(6)" +#: library/struct.rst:259 +#, fuzzy +msgid ":c:expr:`_Float16`" +msgstr ":c:expr:`float`" -#: library/struct.rst:259 library/struct.rst:261 +#: library/struct.rst:261 library/struct.rst:263 msgid "float" msgstr "float" -#: library/struct.rst:259 library/struct.rst:261 -msgid "\\(4)" -msgstr "\\(4)" - #: library/struct.rst:259 +#, fuzzy +msgid "\\(4), \\(6)" +msgstr "\\(1), \\(2)" + +#: library/struct.rst:261 msgid "``f``" msgstr "``f``" -#: library/struct.rst:259 +#: library/struct.rst:261 msgid ":c:expr:`float`" msgstr ":c:expr:`float`" -#: library/struct.rst:261 +#: library/struct.rst:263 +msgid "\\(4)" +msgstr "\\(4)" + +#: library/struct.rst:263 msgid "``d``" msgstr "``d``" -#: library/struct.rst:261 +#: library/struct.rst:263 msgid ":c:expr:`double`" msgstr ":c:expr:`double`" -#: library/struct.rst:263 +#: library/struct.rst:265 msgid "``s``" msgstr "``s``" -#: library/struct.rst:265 +#: library/struct.rst:267 msgid ":c:expr:`char[]`" msgstr ":c:expr:`char[]`" -#: library/struct.rst:265 +#: library/struct.rst:267 msgid "bytes" msgstr "bytes" -#: library/struct.rst:263 +#: library/struct.rst:265 msgid "\\(9)" msgstr "\\(9)" -#: library/struct.rst:265 +#: library/struct.rst:267 msgid "``p``" msgstr "``p``" -#: library/struct.rst:265 +#: library/struct.rst:267 msgid "\\(8)" msgstr "\\(8)" -#: library/struct.rst:267 +#: library/struct.rst:269 msgid "``P``" msgstr "``P``" -#: library/struct.rst:267 +#: library/struct.rst:269 msgid ":c:expr:`void \\*`" msgstr ":c:expr:`void \\*`" -#: library/struct.rst:267 -msgid "\\(5)" -msgstr "\\(5)" +#: library/struct.rst:269 +#, fuzzy +msgid "\\(2), \\(5)" +msgstr "\\(1), \\(2)" -#: library/struct.rst:270 +#: library/struct.rst:272 msgid "Added support for the ``'n'`` and ``'N'`` formats." msgstr "Προστέθηκε υποστήριξη για τις μορφές ``'n'`` και ``'N'``." -#: library/struct.rst:273 +#: library/struct.rst:275 msgid "Added support for the ``'e'`` format." msgstr "Προστέθηκε υποστήριξη για τη μορφή ``'e'``." -#: library/struct.rst:282 +#: library/struct.rst:284 msgid "" "The ``'?'`` conversion code corresponds to the :c:expr:`_Bool` type defined " "by C standards since C99. In standard mode, it is represented by one byte." @@ -705,7 +714,7 @@ msgstr "" "ορίζεται από τα πρότυπα C από την έκδοση C99. Σε τυπική λειτουργία, " "αναπαρίσταται από ένα byte." -#: library/struct.rst:287 +#: library/struct.rst:289 msgid "" "When attempting to pack a non-integer using any of the integer conversion " "codes, if the non-integer has a :meth:`~object.__index__` method then that " @@ -716,13 +725,13 @@ msgstr "" "διαθέτει τη μέθοδο :meth:`~object.__index__`, τότε καλείται αυτή η μέθοδος " "για τη μετατροπή του ορίσματος σε ακέραιο πριν από τη συσκευασία." -#: library/struct.rst:291 +#: library/struct.rst:293 msgid "Added use of the :meth:`~object.__index__` method for non-integers." msgstr "" "Προστέθηκε η χρήση της μεθόδου :meth:`~object.__index__` για μη ακέραιους " "αριθμούς." -#: library/struct.rst:295 +#: library/struct.rst:297 msgid "" "The ``'n'`` and ``'N'`` conversion codes are only available for the native " "size (selected as the default or with the ``'@'`` byte order character). For " @@ -734,7 +743,7 @@ msgstr "" "``'@'``). Για το τυπικό μέγεθος, μπορείτε να χρησιμοποιήσετε οποιαδήποτε από " "τις άλλες μορφές ακέραιων που ταιριάζουν στην εφαρμογή σας." -#: library/struct.rst:301 +#: library/struct.rst:303 msgid "" "For the ``'f'``, ``'d'`` and ``'e'`` conversion codes, the packed " "representation uses the IEEE 754 binary32, binary64 or binary16 format (for " @@ -746,7 +755,7 @@ msgstr "" "(αντίστοιχα για ``'f'``, ``'d'`` ή ``'e'``), ανεξάρτητα από τη μορφή κινητής " "υποδιαστολής που χρησιμοποιεί η πλατφόρμα." -#: library/struct.rst:307 +#: library/struct.rst:309 msgid "" "The ``'P'`` format character is only available for the native byte ordering " "(selected as the default or with the ``'@'`` byte order character). The byte " @@ -760,16 +769,19 @@ msgstr "" "με βάση το σύστημα. Το module struct δεν ερμηνεύει αυτό ως native σειρά, " "επομένως η μορφή ``'P'`` δεν είναι διαθέσιμη." -#: library/struct.rst:314 +#: library/struct.rst:316 +#, fuzzy msgid "" "The IEEE 754 binary16 \"half precision\" type was introduced in the 2008 " "revision of the `IEEE 754 standard `_. It has a sign " "bit, a 5-bit exponent and 11-bit precision (with 10 bits explicitly stored), " "and can represent numbers between approximately ``6.1e-05`` and ``6.5e+04`` " -"at full precision. This type is not widely supported by C compilers: on a " -"typical machine, an unsigned short can be used for storage, but not for math " -"operations. See the Wikipedia page on the `half-precision floating-point " -"format `_ for more information." +"at full precision. This type is not widely supported by C compilers: it's " +"available as :c:expr:`_Float16` type, if the compiler supports the Annex H " +"of the C23 standard. On a typical machine, an unsigned short can be used " +"for storage, but not for math operations. See the Wikipedia page on the " +"`half-precision floating-point format `_ for more " +"information." msgstr "" "Ο τύπος IEEE 754 binary16 \"half precision\" εισήχθη στην αναθεώρηση του " "2008 του προτύπου `IEEE 754 standard `_. Διαθέτει ένα " @@ -781,22 +793,24 @@ msgstr "" "Δείτε τη σελίδα της Wikipedia για τη `half-precision floating-point format " "`_ για περισσότερες πληροφορίες." -#: library/struct.rst:324 +#: library/struct.rst:328 msgid "When packing, ``'x'`` inserts one NUL byte." msgstr "Κατά τη συσκευασία, το ``'x'`` εισάγει ένα NUL byte." -#: library/struct.rst:327 +#: library/struct.rst:331 +#, fuzzy msgid "" "The ``'p'`` format character encodes a \"Pascal string\", meaning a short " "variable-length string stored in a *fixed number of bytes*, given by the " "count. The first byte stored is the length of the string, or 255, whichever " -"is smaller. The bytes of the string follow. If the string passed in to :" -"func:`pack` is too long (longer than the count minus 1), only the leading " -"``count-1`` bytes of the string are stored. If the string is shorter than " -"``count-1``, it is padded with null bytes so that exactly count bytes in all " -"are used. Note that for :func:`unpack`, the ``'p'`` format character " -"consumes ``count`` bytes, but that the string returned can never contain " -"more than 255 bytes." +"is smaller. The bytes of the string follow. If the byte string passed in " +"to :func:`pack` is too long (longer than the count minus 1), only the " +"leading ``count-1`` bytes of the string are stored. If the byte string is " +"shorter than ``count-1``, it is padded with null bytes so that exactly count " +"bytes in all are used. Note that for :func:`unpack`, the ``'p'`` format " +"character consumes ``count`` bytes, but that the :class:`!bytes` object " +"returned can never contain more than 255 bytes. When packing, arguments of " +"types :class:`bytes` and :class:`bytearray` are accepted." msgstr "" "Ο χαρακτήρας μορφοποίησης ``'p'`` κωδικοποιεί ένα \"Pascal string\", δηλαδή " "μια μικρή συμβολοσειρά μεταβλητού μήκους αποθηκευμένη σε *σταθερό αριθμό " @@ -811,19 +825,22 @@ msgstr "" "συμβολοσειρά που επιστρέφεται δεν μπορεί ποτέ να περιέχει περισσότερα από " "255 byte." -#: library/struct.rst:339 +#: library/struct.rst:345 +#, fuzzy msgid "" "For the ``'s'`` format character, the count is interpreted as the length of " -"the bytes, not a repeat count like for the other format characters; for " -"example, ``'10s'`` means a single 10-byte string mapping to or from a single " -"Python byte string, while ``'10c'`` means 10 separate one byte character " -"elements (e.g., ``cccccccccc``) mapping to or from ten different Python byte " -"objects. (See :ref:`struct-examples` for a concrete demonstration of the " -"difference.) If a count is not given, it defaults to 1. For packing, the " -"string is truncated or padded with null bytes as appropriate to make it fit. " -"For unpacking, the resulting bytes object always has exactly the specified " -"number of bytes. As a special case, ``'0s'`` means a single, empty string " -"(while ``'0c'`` means 0 characters)." +"the byte string, not a repeat count like for the other format characters; " +"for example, ``'10s'`` means a single 10-byte string mapping to or from a " +"single Python byte string, while ``'10c'`` means 10 separate one byte " +"character elements (e.g., ``cccccccccc``) mapping to or from ten different " +"Python byte objects. (See :ref:`struct-examples` for a concrete " +"demonstration of the difference.) If a count is not given, it defaults to " +"1. For packing, the byte string is truncated or padded with null bytes as " +"appropriate to make it fit. For unpacking, the resulting :class:`!bytes` " +"object always has exactly the specified number of bytes. As a special case, " +"``'0s'`` means a single, empty byte string (while ``'0c'`` means 0 " +"characters). When packing, arguments of types :class:`bytes` and :class:" +"`bytearray` are accepted." msgstr "" "Για το χαρακτήρα μορφοποίησης ``'s'``, αριθμός (count) ερμηνεύεται ως το " "μήκος των byte, και όχι ως ένας αριθμός επαναλήψεων, όπως συμβαίνει με " @@ -840,7 +857,7 @@ msgstr "" "περίπτωση, το ``'0s'`` σημαίνει μια μοναδική, κενή συμβολοσειρά (ενώ το " "``'0c'`` σημαίνει 0 χαρακτήρες)." -#: library/struct.rst:352 +#: library/struct.rst:360 msgid "" "A format character may be preceded by an integral repeat count. For " "example, the format string ``'4h'`` means exactly the same as ``'hhhh'``." @@ -849,7 +866,7 @@ msgstr "" "επαναλήψεων. Για παράδειγμα, η συμβολοσειρά μορφοποίησης ``'4h'`` σημαίνει " "ακριβώς το ίδιο με ``'hhhh'``." -#: library/struct.rst:355 +#: library/struct.rst:363 msgid "" "Whitespace characters between formats are ignored; a count and its format " "must not contain whitespace though." @@ -857,7 +874,7 @@ msgstr "" "Οι χαρακτήρες κενού μεταξύ των μορφοποιήσεων αγνοούνται· ωστόσο, ένας " "αριθμός και η μορφή του δεν πρέπει να περιέχουν κενά." -#: library/struct.rst:358 +#: library/struct.rst:366 msgid "" "When packing a value ``x`` using one of the integer formats (``'b'``, " "``'B'``, ``'h'``, ``'H'``, ``'i'``, ``'I'``, ``'l'``, ``'L'``, ``'q'``, " @@ -869,7 +886,7 @@ msgstr "" "``'L'``, ``'q'``, ``'Q'``), εάν το ``x`` είναι εκτός του έγκυρου εύρους για " "αυτήν τη μορφή, γίνεται raise μια εξαίρεση :exc:`struct.error`." -#: library/struct.rst:363 +#: library/struct.rst:371 msgid "" "Previously, some of the integer formats wrapped out-of-range values and " "raised :exc:`DeprecationWarning` instead of :exc:`struct.error`." @@ -877,7 +894,7 @@ msgstr "" "Προηγουμένως, ορισμένες από τις μορφές ακεραίων περιτύλιγαν τιμές εκτός " "εύρους και εμφάνιζαν :exc:`DeprecationWarning` αντί για :exc:`struct.error`." -#: library/struct.rst:369 +#: library/struct.rst:377 msgid "" "For the ``'?'`` format character, the return value is either :const:`True` " "or :const:`False`. When packing, the truth value of the argument object is " @@ -890,11 +907,11 @@ msgstr "" "αναπαράσταση του bool θα συσκευαστούν, και οποιαδήποτε μη μηδενική τιμή θα " "είναι ``True`` κατά την αποσυσκευασία." -#: library/struct.rst:379 +#: library/struct.rst:387 msgid "Examples" msgstr "Παραδείγματα" -#: library/struct.rst:382 +#: library/struct.rst:390 msgid "" "Native byte order examples (designated by the ``'@'`` format prefix or lack " "of any prefix character) may not match what the reader's machine produces as " @@ -905,7 +922,7 @@ msgstr "" "αντιστοιχούν σε αυτά που παράγει η μηχανή του αναγνώστη, καθώς αυτό " "εξαρτάται από την πλατφόρμα και τον μεταγλωττιστή." -#: library/struct.rst:387 +#: library/struct.rst:395 msgid "" "Pack and unpack integers of three different sizes, using big endian " "ordering::" @@ -913,7 +930,7 @@ msgstr "" "Συσκευασία και αποσυσκευασία ακεραίων τριών διαφορετικών μεγεθών, " "χρησιμοποιώντας διάταξη big endian::" -#: library/struct.rst:390 +#: library/struct.rst:398 msgid "" ">>> from struct import *\n" ">>> pack(\">bhl\", 1, 2, 3)\n" @@ -931,13 +948,13 @@ msgstr "" ">>> calcsize('>bhl')\n" "7" -#: library/struct.rst:398 +#: library/struct.rst:406 msgid "Attempt to pack an integer which is too large for the defined field::" msgstr "" "Προσπάθεια συσκευασίας ενός ακεραίου που είναι πολύ μεγάλος για το " "καθορισμένο πεδίο::" -#: library/struct.rst:400 +#: library/struct.rst:408 msgid "" ">>> pack(\">h\", 99999)\n" "Traceback (most recent call last):\n" @@ -949,14 +966,14 @@ msgstr "" " File \"\", line 1, in \n" "struct.error: 'h' format requires -32768 <= number <= 32767" -#: library/struct.rst:405 +#: library/struct.rst:413 msgid "" "Demonstrate the difference between ``'s'`` and ``'c'`` format characters::" msgstr "" "Επιδεικνύει την διαφορά μεταξύ των χαρακτήρων μορφοποίησης ``'s'`` και " "``'c'``::" -#: library/struct.rst:408 +#: library/struct.rst:416 msgid "" ">>> pack(\"@ccc\", b'1', b'2', b'3')\n" "b'123'\n" @@ -968,7 +985,7 @@ msgstr "" ">>> pack(\"@3s\", b'123')\n" "b'123'" -#: library/struct.rst:413 +#: library/struct.rst:421 msgid "" "Unpacked fields can be named by assigning them to variables or by wrapping " "the result in a named tuple::" @@ -976,7 +993,7 @@ msgstr "" "Τα αποσυσκευασμένα πεδία μπορούν να ονομαστούν είτε αναθέτοντάς τα σε " "μεταβλητές είτε περιτυλίγοντάς τα σε μια ονομασμένη πλειάδα::" -#: library/struct.rst:416 +#: library/struct.rst:424 msgid "" ">>> record = b'raymond \\x32\\x12\\x08\\x01\\x08'\n" ">>> name, serialnum, school, gradelevel = unpack('<10sHHb', record)\n" @@ -994,7 +1011,7 @@ msgstr "" ">>> Student._make(unpack('<10sHHb', record))\n" "Student(name=b'raymond ', serialnum=4658, school=264, gradelevel=8)" -#: library/struct.rst:424 +#: library/struct.rst:432 msgid "" "The ordering of format characters may have an impact on size in native mode " "since padding is implicit. In standard mode, the user is responsible for " @@ -1012,7 +1029,7 @@ msgstr "" "παράδειγμα, η έξοδος παράχθηκε σε έναν υπολογιστή με little endian " "αρχιτεκτονική::" -#: library/struct.rst:432 +#: library/struct.rst:440 msgid "" ">>> pack('@ci', b'#', 0x12131415)\n" "b'#\\x00\\x00\\x00\\x15\\x14\\x13\\x12'\n" @@ -1032,7 +1049,7 @@ msgstr "" ">>> calcsize('@ic')\n" "5" -#: library/struct.rst:441 +#: library/struct.rst:449 msgid "" "The following format ``'llh0l'`` results in two pad bytes being added at the " "end, assuming the platform's longs are aligned on 4-byte boundaries::" @@ -1041,7 +1058,7 @@ msgstr "" "συμπλήρωσης στο τέλος, υποθέτοντας ότι οι μακροί ακέραιοι (longs) της " "πλατφόρμας ευθυγραμμίζονται σε όρια 4-byte::" -#: library/struct.rst:444 +#: library/struct.rst:452 msgid "" ">>> pack('@llh0l', 1, 2, 3)\n" "b'\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x02\\x00\\x03\\x00\\x00'" @@ -1049,35 +1066,35 @@ msgstr "" ">>> pack('@llh0l', 1, 2, 3)\n" "b'\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x02\\x00\\x03\\x00\\x00'" -#: library/struct.rst:450 +#: library/struct.rst:458 msgid "Module :mod:`array`" msgstr "Module :mod:`array`" -#: library/struct.rst:451 +#: library/struct.rst:459 msgid "Packed binary storage of homogeneous data." msgstr "Πακεταρισμένη δυαδική αποθήκευση ομοιογενών δεδομένων." -#: library/struct.rst:453 +#: library/struct.rst:461 msgid "Module :mod:`json`" msgstr "Module :mod:`json`" -#: library/struct.rst:454 +#: library/struct.rst:462 msgid "JSON encoder and decoder." msgstr "Κωδικοποιητής και αποκωδικοποιητής JSON." -#: library/struct.rst:456 +#: library/struct.rst:464 msgid "Module :mod:`pickle`" msgstr "Module :mod:`pickle`" -#: library/struct.rst:457 +#: library/struct.rst:465 msgid "Python object serialization." msgstr "Σειριοποίηση αντικειμένων Python." -#: library/struct.rst:463 +#: library/struct.rst:471 msgid "Applications" msgstr "Εφαρμογές" -#: library/struct.rst:465 +#: library/struct.rst:473 msgid "" "Two main applications for the :mod:`struct` module exist, data interchange " "between Python and C code within an application or another application " @@ -1094,11 +1111,11 @@ msgstr "" "formats`). Γενικά, οι συμβολοσειρές μορφής που " "χρησιμοποιούνται σε αυτούς τους δύο τομείς είναι διαφορετικές." -#: library/struct.rst:476 +#: library/struct.rst:484 msgid "Native Formats" msgstr "Native Μορφές" -#: library/struct.rst:478 +#: library/struct.rst:486 msgid "" "When constructing format strings which mimic native layouts, the compiler " "and machine architecture determine byte ordering and padding. In such cases, " @@ -1117,14 +1134,14 @@ msgstr "" "επανάληψη μηδέν στο τέλος μιας συμβολοσειράς μορφοποίησης για να " "ευθυγραμμιστεί σωστά με τα όρια byte των διαδοχικών τμημάτων δεδομένων." -#: library/struct.rst:486 +#: library/struct.rst:494 msgid "" "Consider these two simple examples (on a 64-bit, little-endian machine)::" msgstr "" "Εξετάστε αυτά τα δύο απλά παραδείγματα (σε έναν 64-bit, little-endian " "υπολογιστή)::" -#: library/struct.rst:489 +#: library/struct.rst:497 msgid "" ">>> calcsize('@lhl')\n" "24\n" @@ -1136,7 +1153,7 @@ msgstr "" ">>> calcsize('@llh')\n" "18" -#: library/struct.rst:494 +#: library/struct.rst:502 msgid "" "Data is not padded to an 8-byte boundary at the end of the second format " "string without the use of extra padding. A zero-repeat format code solves " @@ -1146,7 +1163,7 @@ msgstr "" "συμβολοσειράς μορφοποίησης χωρίς τη χρήση επιπλέον συμπλήρωσης. Ένας κωδικός " "μορφοποίησης με επανάληψη μηδέν λύνει αυτό το πρόβλημα::" -#: library/struct.rst:498 +#: library/struct.rst:506 msgid "" ">>> calcsize('@llh0l')\n" "24" @@ -1154,7 +1171,7 @@ msgstr "" ">>> calcsize('@llh0l')\n" "24" -#: library/struct.rst:501 +#: library/struct.rst:509 msgid "" "The ``'x'`` format code can be used to specify the repeat, but for native " "formats it is better to use a zero-repeat format like ``'0l'``." @@ -1163,7 +1180,7 @@ msgstr "" "επανάληψη, αλλά για native μορφές είναι προτιμότερο να χρησιμοποιείται ένας " "κωδικός μορφοποίησης με επανάληψη μηδέν, όπως ``'0l'``." -#: library/struct.rst:504 +#: library/struct.rst:512 msgid "" "By default, native byte ordering and alignment is used, but it is better to " "be explicit and use the ``'@'`` prefix character." @@ -1172,11 +1189,11 @@ msgstr "" "καλύτερο να είμαστε σαφείς και να χρησιμοποιούμε τον χαρακτήρα πρόθεμα " "``'@'``." -#: library/struct.rst:511 +#: library/struct.rst:519 msgid "Standard Formats" msgstr "Τυπικές μορφές" -#: library/struct.rst:513 +#: library/struct.rst:521 msgid "" "When exchanging data beyond your process such as networking or storage, be " "precise. Specify the exact byte order, size, and alignment. Do not assume " @@ -1202,7 +1219,7 @@ msgstr "" "πρέπει να προσθέτει ρητά byte ``'x'`` όπου απαιτείται. Επανεξετάζοντας τα " "παραδείγματα από την προηγούμενη ενότητα, έχουμε::" -#: library/struct.rst:525 +#: library/struct.rst:533 msgid "" ">>> calcsize('>> pack('@llh0l', 1, 2, 3) == pack('>> calcsize('>> pack('@llh0l', 1, 2, 3) == pack(' (greater)" msgstr "> (μεγαλύτερο)" -#: library/struct.rst:136 +#: library/struct.rst:138 msgid "! (exclamation)" msgstr "! (θαυμαστικό)" -#: library/struct.rst:367 +#: library/struct.rst:375 msgid "? (question mark)" msgstr "? (ερωτηματικό)" + +#~ msgid "\\(3)" +#~ msgstr "\\(3)" + +#~ msgid "\\(6)" +#~ msgstr "\\(6)" + +#~ msgid "\\(5)" +#~ msgstr "\\(5)" diff --git a/library/subprocess.po b/library/subprocess.po index 53e0fb753..96bd8cd78 100644 --- a/library/subprocess.po +++ b/library/subprocess.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -49,7 +49,7 @@ msgid ":pep:`324` -- PEP proposing the subprocess module" msgstr "" #: library/subprocess.rst:605 library/subprocess.rst:624 -#: library/subprocess.rst:639 library/subprocess.rst:1582 +#: library/subprocess.rst:645 library/subprocess.rst:1600 #: includes/wasm-mobile-notavail.rst:3 msgid "Availability" msgstr "" @@ -174,8 +174,8 @@ msgid "" "*universal_newlines*. Added the *capture_output* parameter." msgstr "" -#: library/subprocess.rst:506 library/subprocess.rst:1254 -#: library/subprocess.rst:1317 +#: library/subprocess.rst:506 library/subprocess.rst:1272 +#: library/subprocess.rst:1335 msgid "" "Changed Windows shell search order for ``shell=True``. The current directory " "and ``%PATH%`` are replaced with ``%COMSPEC%`` and ``%SystemRoot%" @@ -199,7 +199,7 @@ msgid "" "that it ran successfully." msgstr "" -#: library/subprocess.rst:945 +#: library/subprocess.rst:958 msgid "" "A negative value ``-N`` indicates that the child was terminated by signal " "``N`` (POSIX only)." @@ -376,7 +376,7 @@ msgid "" "binary streams. No encoding or line ending conversion is performed." msgstr "" -#: library/subprocess.rst:1569 library/subprocess.rst:1587 +#: library/subprocess.rst:1587 library/subprocess.rst:1605 msgid "Added the *encoding* and *errors* parameters." msgstr "" @@ -795,13 +795,20 @@ msgid "" "passed verbatim. (POSIX only)" msgstr "" -#: library/subprocess.rst:636 +#: library/subprocess.rst:635 +msgid "" +"Specifying *user* will not drop existing supplementary group memberships! " +"The caller must also pass ``extra_groups=()`` to reduce the group membership " +"of the child process for security purposes." +msgstr "" + +#: library/subprocess.rst:642 msgid "" "If *umask* is not negative, the umask() system call will be made in the " "child process prior to the execution of the subprocess." msgstr "" -#: library/subprocess.rst:642 +#: library/subprocess.rst:648 msgid "" "If *env* is not ``None``, it must be a mapping that defines the environment " "variables for the new process; these are used instead of the default " @@ -810,14 +817,14 @@ msgid "" "data:`os.environ` or :data:`os.environb`." msgstr "" -#: library/subprocess.rst:650 +#: library/subprocess.rst:656 msgid "" "If specified, *env* must provide any variables required for the program to " "execute. On Windows, in order to run a `side-by-side assembly`_ the " "specified *env* **must** include a valid ``%SystemRoot%``." msgstr "" -#: library/subprocess.rst:656 +#: library/subprocess.rst:662 msgid "" "If *encoding* or *errors* are specified, or *text* is true, the file objects " "*stdin*, *stdout* and *stderr* are opened in text mode with the specified " @@ -827,73 +834,73 @@ msgid "" "in binary mode." msgstr "" -#: library/subprocess.rst:662 +#: library/subprocess.rst:668 msgid "*encoding* and *errors* were added." msgstr "" -#: library/subprocess.rst:1312 +#: library/subprocess.rst:1330 msgid "*text* was added as a more readable alias for *universal_newlines*." msgstr "" -#: library/subprocess.rst:668 +#: library/subprocess.rst:674 msgid "" "If given, *startupinfo* will be a :class:`STARTUPINFO` object, which is " "passed to the underlying ``CreateProcess`` function." msgstr "" -#: library/subprocess.rst:671 +#: library/subprocess.rst:677 msgid "If given, *creationflags*, can be one or more of the following flags:" msgstr "" -#: library/subprocess.rst:673 +#: library/subprocess.rst:679 msgid ":data:`CREATE_NEW_CONSOLE`" msgstr "" -#: library/subprocess.rst:674 +#: library/subprocess.rst:680 msgid ":data:`CREATE_NEW_PROCESS_GROUP`" msgstr "" -#: library/subprocess.rst:675 +#: library/subprocess.rst:681 msgid ":data:`ABOVE_NORMAL_PRIORITY_CLASS`" msgstr "" -#: library/subprocess.rst:676 +#: library/subprocess.rst:682 msgid ":data:`BELOW_NORMAL_PRIORITY_CLASS`" msgstr "" -#: library/subprocess.rst:677 +#: library/subprocess.rst:683 msgid ":data:`HIGH_PRIORITY_CLASS`" msgstr "" -#: library/subprocess.rst:678 +#: library/subprocess.rst:684 msgid ":data:`IDLE_PRIORITY_CLASS`" msgstr "" -#: library/subprocess.rst:679 +#: library/subprocess.rst:685 msgid ":data:`NORMAL_PRIORITY_CLASS`" msgstr "" -#: library/subprocess.rst:680 +#: library/subprocess.rst:686 msgid ":data:`REALTIME_PRIORITY_CLASS`" msgstr "" -#: library/subprocess.rst:681 +#: library/subprocess.rst:687 msgid ":data:`CREATE_NO_WINDOW`" msgstr "" -#: library/subprocess.rst:682 +#: library/subprocess.rst:688 msgid ":data:`DETACHED_PROCESS`" msgstr "" -#: library/subprocess.rst:683 +#: library/subprocess.rst:689 msgid ":data:`CREATE_DEFAULT_ERROR_MODE`" msgstr "" -#: library/subprocess.rst:684 +#: library/subprocess.rst:690 msgid ":data:`CREATE_BREAKAWAY_FROM_JOB`" msgstr "" -#: library/subprocess.rst:686 +#: library/subprocess.rst:692 msgid "" "*pipesize* can be used to change the size of the pipe when :data:`PIPE` is " "used for *stdin*, *stdout* or *stderr*. The size of the pipe is only changed " @@ -901,24 +908,24 @@ msgid "" "platforms will ignore this parameter." msgstr "" -#: library/subprocess.rst:691 +#: library/subprocess.rst:697 msgid "Added the *pipesize* parameter." msgstr "" -#: library/subprocess.rst:694 +#: library/subprocess.rst:700 msgid "" "Popen objects are supported as context managers via the :keyword:`with` " "statement: on exit, standard file descriptors are closed, and the process is " "waited for. ::" msgstr "" -#: library/subprocess.rst:698 +#: library/subprocess.rst:704 msgid "" "with Popen([\"ifconfig\"], stdout=PIPE) as proc:\n" " log.write(proc.stdout.read())" msgstr "" -#: library/subprocess.rst:703 +#: library/subprocess.rst:709 msgid "" "Popen and the other functions in this module that use it raise an :ref:" "`auditing event ` ``subprocess.Popen`` with arguments " @@ -926,17 +933,17 @@ msgid "" "be a single string or a list of strings, depending on platform." msgstr "" -#: library/subprocess.rst:708 +#: library/subprocess.rst:714 msgid "Added context manager support." msgstr "" -#: library/subprocess.rst:711 +#: library/subprocess.rst:717 msgid "" "Popen destructor now emits a :exc:`ResourceWarning` warning if the child " "process is still running." msgstr "" -#: library/subprocess.rst:715 +#: library/subprocess.rst:721 msgid "" "Popen can use :func:`os.posix_spawn` in some cases for better performance. " "On Windows Subsystem for Linux and QEMU User Emulation, Popen constructor " @@ -945,17 +952,17 @@ msgid "" "returncode`." msgstr "" -#: library/subprocess.rst:724 +#: library/subprocess.rst:730 msgid "Exceptions" msgstr "" -#: library/subprocess.rst:726 +#: library/subprocess.rst:732 msgid "" "Exceptions raised in the child process, before the new program has started " "to execute, will be re-raised in the parent." msgstr "" -#: library/subprocess.rst:729 +#: library/subprocess.rst:735 msgid "" "The most common exception raised is :exc:`OSError`. This occurs, for " "example, when trying to execute a non-existent file. Applications should " @@ -966,39 +973,39 @@ msgid "" "subprocess." msgstr "" -#: library/subprocess.rst:736 +#: library/subprocess.rst:742 msgid "" "A :exc:`ValueError` will be raised if :class:`Popen` is called with invalid " "arguments." msgstr "" -#: library/subprocess.rst:739 +#: library/subprocess.rst:745 msgid "" ":func:`check_call` and :func:`check_output` will raise :exc:" "`CalledProcessError` if the called process returns a non-zero return code." msgstr "" -#: library/subprocess.rst:743 +#: library/subprocess.rst:749 msgid "" "All of the functions and methods that accept a *timeout* parameter, such as :" "func:`run` and :meth:`Popen.communicate` will raise :exc:`TimeoutExpired` if " "the timeout expires before the process exits." msgstr "" -#: library/subprocess.rst:747 +#: library/subprocess.rst:753 msgid "" "Exceptions defined in this module all inherit from :exc:`SubprocessError`." msgstr "" -#: library/subprocess.rst:749 +#: library/subprocess.rst:755 msgid "The :exc:`SubprocessError` base class was added." msgstr "" -#: library/subprocess.rst:755 +#: library/subprocess.rst:761 msgid "Security Considerations" msgstr "" -#: library/subprocess.rst:757 +#: library/subprocess.rst:763 msgid "" "Unlike some other popen functions, this library will not implicitly choose " "to call a system shell. This means that all characters, including shell " @@ -1011,7 +1018,7 @@ msgid "" "escaping." msgstr "" -#: library/subprocess.rst:767 +#: library/subprocess.rst:773 msgid "" "On Windows, batch files (:file:`*.bat` or :file:`*.cmd`) may be launched by " "the operating system in a system shell regardless of the arguments passed to " @@ -1022,34 +1029,34 @@ msgid "" "`114539` for additional discussion." msgstr "" -#: library/subprocess.rst:777 +#: library/subprocess.rst:783 msgid "Popen Objects" msgstr "" -#: library/subprocess.rst:779 +#: library/subprocess.rst:785 msgid "Instances of the :class:`Popen` class have the following methods:" msgstr "" -#: library/subprocess.rst:784 +#: library/subprocess.rst:790 msgid "" "Check if child process has terminated. Set and return :attr:`~Popen." "returncode` attribute. Otherwise, returns ``None``." msgstr "" -#: library/subprocess.rst:790 +#: library/subprocess.rst:796 msgid "" "Wait for child process to terminate. Set and return :attr:`~Popen." "returncode` attribute." msgstr "" -#: library/subprocess.rst:793 +#: library/subprocess.rst:799 msgid "" "If the process does not terminate after *timeout* seconds, raise a :exc:" "`TimeoutExpired` exception. It is safe to catch this exception and retry " "the wait." msgstr "" -#: library/subprocess.rst:799 +#: library/subprocess.rst:805 msgid "" "This will deadlock when using ``stdout=PIPE`` or ``stderr=PIPE`` and the " "child process generates enough output to a pipe such that it blocks waiting " @@ -1057,7 +1064,7 @@ msgid "" "when using pipes to avoid that." msgstr "" -#: library/subprocess.rst:806 +#: library/subprocess.rst:812 msgid "" "When the ``timeout`` parameter is not ``None``, then (on POSIX) the function " "is implemented using a busy loop (non-blocking call and short sleeps). Use " @@ -1065,12 +1072,12 @@ msgid "" "create_subprocess_exec`." msgstr "" -#: library/subprocess.rst:852 library/subprocess.rst:1249 -#: library/subprocess.rst:1303 +#: library/subprocess.rst:865 library/subprocess.rst:1267 +#: library/subprocess.rst:1321 msgid "*timeout* was added." msgstr "" -#: library/subprocess.rst:816 +#: library/subprocess.rst:822 msgid "" "Interact with process: Send data to stdin. Read data from stdout and " "stderr, until end-of-file is reached. Wait for process to terminate and set " @@ -1080,13 +1087,13 @@ msgid "" "must be a string. Otherwise, it must be bytes." msgstr "" -#: library/subprocess.rst:823 +#: library/subprocess.rst:829 msgid "" ":meth:`communicate` returns a tuple ``(stdout_data, stderr_data)``. The data " "will be strings if streams were opened in text mode; otherwise, bytes." msgstr "" -#: library/subprocess.rst:827 +#: library/subprocess.rst:833 msgid "" "Note that if you want to send data to the process's stdin, you need to " "create the Popen object with ``stdin=PIPE``. Similarly, to get anything " @@ -1094,21 +1101,23 @@ msgid "" "and/or ``stderr=PIPE`` too." msgstr "" -#: library/subprocess.rst:832 +#: library/subprocess.rst:838 msgid "" "If the process does not terminate after *timeout* seconds, a :exc:" "`TimeoutExpired` exception will be raised. Catching this exception and " -"retrying communication will not lose any output." +"retrying communication will not lose any output. Supplying *input* to a " +"subsequent post-timeout :meth:`communicate` call is in undefined behavior " +"and may become an error in the future." msgstr "" -#: library/subprocess.rst:836 +#: library/subprocess.rst:844 msgid "" "The child process is not killed if the timeout expires, so in order to " "cleanup properly a well-behaved application should kill the child process " "and finish communication::" msgstr "" -#: library/subprocess.rst:840 +#: library/subprocess.rst:848 msgid "" "proc = subprocess.Popen(...)\n" "try:\n" @@ -1118,53 +1127,61 @@ msgid "" " outs, errs = proc.communicate()" msgstr "" -#: library/subprocess.rst:849 +#: library/subprocess.rst:855 +msgid "" +"After a call to :meth:`~Popen.communicate` raises :exc:`TimeoutExpired`, do " +"not call :meth:`~Popen.wait`. Use an additional :meth:`~Popen.communicate` " +"call to finish handling pipes and populate the :attr:`~Popen.returncode` " +"attribute." +msgstr "" + +#: library/subprocess.rst:862 msgid "" "The data read is buffered in memory, so do not use this method if the data " "size is large or unlimited." msgstr "" -#: library/subprocess.rst:858 +#: library/subprocess.rst:871 msgid "Sends the signal *signal* to the child." msgstr "" -#: library/subprocess.rst:860 +#: library/subprocess.rst:873 msgid "Do nothing if the process completed." msgstr "" -#: library/subprocess.rst:864 +#: library/subprocess.rst:877 msgid "" "On Windows, SIGTERM is an alias for :meth:`terminate`. CTRL_C_EVENT and " "CTRL_BREAK_EVENT can be sent to processes started with a *creationflags* " "parameter which includes ``CREATE_NEW_PROCESS_GROUP``." msgstr "" -#: library/subprocess.rst:871 +#: library/subprocess.rst:884 msgid "" "Stop the child. On POSIX OSs the method sends :py:const:`~signal.SIGTERM` to " "the child. On Windows the Win32 API function :c:func:`!TerminateProcess` is " "called to stop the child." msgstr "" -#: library/subprocess.rst:878 +#: library/subprocess.rst:891 msgid "" "Kills the child. On POSIX OSs the function sends SIGKILL to the child. On " "Windows :meth:`kill` is an alias for :meth:`terminate`." msgstr "" -#: library/subprocess.rst:882 +#: library/subprocess.rst:895 msgid "" "The following attributes are also set by the class for you to access. " "Reassigning them to new values is unsupported:" msgstr "" -#: library/subprocess.rst:887 +#: library/subprocess.rst:900 msgid "" "The *args* argument as it was passed to :class:`Popen` -- a sequence of " "program arguments or else a single string." msgstr "" -#: library/subprocess.rst:894 +#: library/subprocess.rst:907 msgid "" "If the *stdin* argument was :data:`PIPE`, this attribute is a writeable " "stream object as returned by :func:`open`. If the *encoding* or *errors* " @@ -1173,7 +1190,7 @@ msgid "" "*stdin* argument was not :data:`PIPE`, this attribute is ``None``." msgstr "" -#: library/subprocess.rst:903 +#: library/subprocess.rst:916 msgid "" "If the *stdout* argument was :data:`PIPE`, this attribute is a readable " "stream object as returned by :func:`open`. Reading from the stream provides " @@ -1183,7 +1200,7 @@ msgid "" "argument was not :data:`PIPE`, this attribute is ``None``." msgstr "" -#: library/subprocess.rst:913 +#: library/subprocess.rst:926 msgid "" "If the *stderr* argument was :data:`PIPE`, this attribute is a readable " "stream object as returned by :func:`open`. Reading from the stream provides " @@ -1193,7 +1210,7 @@ msgid "" "argument was not :data:`PIPE`, this attribute is ``None``." msgstr "" -#: library/subprocess.rst:922 +#: library/subprocess.rst:935 msgid "" "Use :meth:`~Popen.communicate` rather than :attr:`.stdin.write `, :attr:`.stdout.read ` or :attr:`.stderr.read `__ structure is used for :class:`Popen` " @@ -1242,45 +1267,45 @@ msgid "" "only arguments." msgstr "" -#: library/subprocess.rst:963 +#: library/subprocess.rst:981 msgid "Keyword-only argument support was added." msgstr "" -#: library/subprocess.rst:968 +#: library/subprocess.rst:986 msgid "" "A bit field that determines whether certain :class:`STARTUPINFO` attributes " "are used when the process creates a window. ::" msgstr "" -#: library/subprocess.rst:971 +#: library/subprocess.rst:989 msgid "" "si = subprocess.STARTUPINFO()\n" "si.dwFlags = subprocess.STARTF_USESTDHANDLES | subprocess." "STARTF_USESHOWWINDOW" msgstr "" -#: library/subprocess.rst:976 +#: library/subprocess.rst:994 msgid "" "If :attr:`dwFlags` specifies :data:`STARTF_USESTDHANDLES`, this attribute is " "the standard input handle for the process. If :data:`STARTF_USESTDHANDLES` " "is not specified, the default for standard input is the keyboard buffer." msgstr "" -#: library/subprocess.rst:983 +#: library/subprocess.rst:1001 msgid "" "If :attr:`dwFlags` specifies :data:`STARTF_USESTDHANDLES`, this attribute is " "the standard output handle for the process. Otherwise, this attribute is " "ignored and the default for standard output is the console window's buffer." msgstr "" -#: library/subprocess.rst:990 +#: library/subprocess.rst:1008 msgid "" "If :attr:`dwFlags` specifies :data:`STARTF_USESTDHANDLES`, this attribute is " "the standard error handle for the process. Otherwise, this attribute is " "ignored and the default for standard error is the console window's buffer." msgstr "" -#: library/subprocess.rst:996 +#: library/subprocess.rst:1014 msgid "" "If :attr:`dwFlags` specifies :data:`STARTF_USESHOWWINDOW`, this attribute " "can be any of the values that can be specified in the ``nCmdShow`` parameter " @@ -1289,34 +1314,34 @@ msgid "" "Otherwise, this attribute is ignored." msgstr "" -#: library/subprocess.rst:1003 +#: library/subprocess.rst:1021 msgid "" ":data:`SW_HIDE` is provided for this attribute. It is used when :class:" "`Popen` is called with ``shell=True``." msgstr "" -#: library/subprocess.rst:1008 +#: library/subprocess.rst:1026 msgid "" "A dictionary of additional attributes for process creation as given in " "``STARTUPINFOEX``, see `UpdateProcThreadAttribute `__." msgstr "" -#: library/subprocess.rst:1012 +#: library/subprocess.rst:1030 msgid "Supported attributes:" msgstr "" -#: library/subprocess.rst:1014 +#: library/subprocess.rst:1032 msgid "**handle_list**" msgstr "" -#: library/subprocess.rst:1015 +#: library/subprocess.rst:1033 msgid "" "Sequence of handles that will be inherited. *close_fds* must be true if non-" "empty." msgstr "" -#: library/subprocess.rst:1018 +#: library/subprocess.rst:1036 msgid "" "The handles must be temporarily made inheritable by :func:`os." "set_handle_inheritable` when passed to the :class:`Popen` constructor, else :" @@ -1324,7 +1349,7 @@ msgid "" "``ERROR_INVALID_PARAMETER`` (87)." msgstr "" -#: library/subprocess.rst:1025 +#: library/subprocess.rst:1043 msgid "" "In a multithreaded process, use caution to avoid leaking handles that are " "marked inheritable when combining this feature with concurrent calls to " @@ -1333,110 +1358,110 @@ msgid "" "temporarily creates inheritable handles." msgstr "" -#: library/subprocess.rst:1035 +#: library/subprocess.rst:1053 msgid "Windows Constants" msgstr "" -#: library/subprocess.rst:1037 +#: library/subprocess.rst:1055 msgid "The :mod:`subprocess` module exposes the following constants." msgstr "" -#: library/subprocess.rst:1041 +#: library/subprocess.rst:1059 msgid "" "The standard input device. Initially, this is the console input buffer, " "``CONIN$``." msgstr "" -#: library/subprocess.rst:1046 +#: library/subprocess.rst:1064 msgid "" "The standard output device. Initially, this is the active console screen " "buffer, ``CONOUT$``." msgstr "" -#: library/subprocess.rst:1051 +#: library/subprocess.rst:1069 msgid "" "The standard error device. Initially, this is the active console screen " "buffer, ``CONOUT$``." msgstr "" -#: library/subprocess.rst:1056 +#: library/subprocess.rst:1074 msgid "Hides the window. Another window will be activated." msgstr "" -#: library/subprocess.rst:1060 +#: library/subprocess.rst:1078 msgid "" "Specifies that the :attr:`STARTUPINFO.hStdInput`, :attr:`STARTUPINFO." "hStdOutput`, and :attr:`STARTUPINFO.hStdError` attributes contain additional " "information." msgstr "" -#: library/subprocess.rst:1066 +#: library/subprocess.rst:1084 msgid "" "Specifies that the :attr:`STARTUPINFO.wShowWindow` attribute contains " "additional information." msgstr "" -#: library/subprocess.rst:1071 +#: library/subprocess.rst:1089 msgid "" "A :attr:`STARTUPINFO.dwFlags` parameter to specify that the *Working in " "Background* mouse cursor will be displayed while a process is launching. " "This is the default behavior for GUI processes." msgstr "" -#: library/subprocess.rst:1080 +#: library/subprocess.rst:1098 msgid "" "A :attr:`STARTUPINFO.dwFlags` parameter to specify that the mouse cursor " "will not be changed when launching a process." msgstr "" -#: library/subprocess.rst:1087 +#: library/subprocess.rst:1105 msgid "" "The new process has a new console, instead of inheriting its parent's " "console (the default)." msgstr "" -#: library/subprocess.rst:1092 +#: library/subprocess.rst:1110 msgid "" "A :class:`Popen` ``creationflags`` parameter to specify that a new process " "group will be created. This flag is necessary for using :func:`os.kill` on " "the subprocess." msgstr "" -#: library/subprocess.rst:1096 +#: library/subprocess.rst:1114 msgid "This flag is ignored if :data:`CREATE_NEW_CONSOLE` is specified." msgstr "" -#: library/subprocess.rst:1100 +#: library/subprocess.rst:1118 msgid "" "A :class:`Popen` ``creationflags`` parameter to specify that a new process " "will have an above average priority." msgstr "" -#: library/subprocess.rst:1107 +#: library/subprocess.rst:1125 msgid "" "A :class:`Popen` ``creationflags`` parameter to specify that a new process " "will have a below average priority." msgstr "" -#: library/subprocess.rst:1114 +#: library/subprocess.rst:1132 msgid "" "A :class:`Popen` ``creationflags`` parameter to specify that a new process " "will have a high priority." msgstr "" -#: library/subprocess.rst:1121 +#: library/subprocess.rst:1139 msgid "" "A :class:`Popen` ``creationflags`` parameter to specify that a new process " "will have an idle (lowest) priority." msgstr "" -#: library/subprocess.rst:1128 +#: library/subprocess.rst:1146 msgid "" "A :class:`Popen` ``creationflags`` parameter to specify that a new process " "will have a normal priority. (default)" msgstr "" -#: library/subprocess.rst:1135 +#: library/subprocess.rst:1153 msgid "" "A :class:`Popen` ``creationflags`` parameter to specify that a new process " "will have realtime priority. You should almost never use " @@ -1446,20 +1471,20 @@ msgid "" "perform brief tasks that should have limited interruptions." msgstr "" -#: library/subprocess.rst:1146 +#: library/subprocess.rst:1164 msgid "" "A :class:`Popen` ``creationflags`` parameter to specify that a new process " "will not create a window." msgstr "" -#: library/subprocess.rst:1153 +#: library/subprocess.rst:1171 msgid "" "A :class:`Popen` ``creationflags`` parameter to specify that a new process " "will not inherit its parent's console. This value cannot be used with " "CREATE_NEW_CONSOLE." msgstr "" -#: library/subprocess.rst:1161 +#: library/subprocess.rst:1179 msgid "" "A :class:`Popen` ``creationflags`` parameter to specify that a new process " "does not inherit the error mode of the calling process. Instead, the new " @@ -1467,43 +1492,43 @@ msgid "" "multithreaded shell applications that run with hard errors disabled." msgstr "" -#: library/subprocess.rst:1171 +#: library/subprocess.rst:1189 msgid "" "A :class:`Popen` ``creationflags`` parameter to specify that a new process " "is not associated with the job." msgstr "" -#: library/subprocess.rst:1179 +#: library/subprocess.rst:1197 msgid "Older high-level API" msgstr "" -#: library/subprocess.rst:1181 +#: library/subprocess.rst:1199 msgid "" "Prior to Python 3.5, these three functions comprised the high level API to " "subprocess. You can now use :func:`run` in many cases, but lots of existing " "code calls these functions." msgstr "" -#: library/subprocess.rst:1188 +#: library/subprocess.rst:1206 msgid "" "Run the command described by *args*. Wait for command to complete, then " "return the :attr:`~Popen.returncode` attribute." msgstr "" -#: library/subprocess.rst:1231 +#: library/subprocess.rst:1249 msgid "" "Code needing to capture stdout or stderr should use :func:`run` instead::" msgstr "" -#: library/subprocess.rst:1193 +#: library/subprocess.rst:1211 msgid "run(...).returncode" msgstr "" -#: library/subprocess.rst:1235 +#: library/subprocess.rst:1253 msgid "To suppress stdout or stderr, supply a value of :data:`DEVNULL`." msgstr "" -#: library/subprocess.rst:1237 +#: library/subprocess.rst:1255 msgid "" "The arguments shown above are merely some common ones. The full function " "signature is the same as that of the :class:`Popen` constructor - this " @@ -1511,14 +1536,14 @@ msgid "" "to that interface." msgstr "" -#: library/subprocess.rst:1244 +#: library/subprocess.rst:1262 msgid "" "Do not use ``stdout=PIPE`` or ``stderr=PIPE`` with this function. The child " "process will block if it generates enough output to a pipe to fill up the OS " "pipe buffer as the pipes are not being read from." msgstr "" -#: library/subprocess.rst:1224 +#: library/subprocess.rst:1242 msgid "" "Run command with arguments. Wait for command to complete. If the return " "code was zero then return, otherwise raise :exc:`CalledProcessError`. The :" @@ -1527,15 +1552,15 @@ msgid "" "to start the process it will propagate the exception that was raised." msgstr "" -#: library/subprocess.rst:1233 +#: library/subprocess.rst:1251 msgid "run(..., check=True)" msgstr "" -#: library/subprocess.rst:1266 +#: library/subprocess.rst:1284 msgid "Run command with arguments and return its output." msgstr "" -#: library/subprocess.rst:1268 +#: library/subprocess.rst:1286 msgid "" "If the return code was non-zero it raises a :exc:`CalledProcessError`. The :" "exc:`CalledProcessError` object will have the return code in the :attr:" @@ -1543,15 +1568,15 @@ msgid "" "`~CalledProcessError.output` attribute." msgstr "" -#: library/subprocess.rst:1273 +#: library/subprocess.rst:1291 msgid "This is equivalent to::" msgstr "" -#: library/subprocess.rst:1275 +#: library/subprocess.rst:1293 msgid "run(..., check=True, stdout=PIPE).stdout" msgstr "" -#: library/subprocess.rst:1277 +#: library/subprocess.rst:1295 msgid "" "The arguments shown above are merely some common ones. The full function " "signature is largely the same as that of :func:`run` - most arguments are " @@ -1561,27 +1586,27 @@ msgid "" "using the parent's standard input file handle." msgstr "" -#: library/subprocess.rst:1284 +#: library/subprocess.rst:1302 msgid "" "By default, this function will return the data as encoded bytes. The actual " "encoding of the output data may depend on the command being invoked, so the " "decoding to text will often need to be handled at the application level." msgstr "" -#: library/subprocess.rst:1288 +#: library/subprocess.rst:1306 msgid "" "This behaviour may be overridden by setting *text*, *encoding*, *errors*, or " "*universal_newlines* to ``True`` as described in :ref:`frequently-used-" "arguments` and :func:`run`." msgstr "" -#: library/subprocess.rst:1292 +#: library/subprocess.rst:1310 msgid "" "To also capture standard error in the result, use ``stderr=subprocess." "STDOUT``::" msgstr "" -#: library/subprocess.rst:1295 +#: library/subprocess.rst:1313 msgid "" ">>> subprocess.check_output(\n" "... \"ls non_existent_file; exit 0\",\n" @@ -1590,32 +1615,32 @@ msgid "" "'ls: non_existent_file: No such file or directory\\n'" msgstr "" -#: library/subprocess.rst:1306 +#: library/subprocess.rst:1324 msgid "Support for the *input* keyword argument was added." msgstr "" -#: library/subprocess.rst:1309 +#: library/subprocess.rst:1327 msgid "*encoding* and *errors* were added. See :func:`run` for details." msgstr "" -#: library/subprocess.rst:1327 +#: library/subprocess.rst:1345 msgid "Replacing Older Functions with the :mod:`subprocess` Module" msgstr "" -#: library/subprocess.rst:1329 +#: library/subprocess.rst:1347 msgid "" "In this section, \"a becomes b\" means that b can be used as a replacement " "for a." msgstr "" -#: library/subprocess.rst:1333 +#: library/subprocess.rst:1351 msgid "" "All \"a\" functions in this section fail (more or less) silently if the " "executed program cannot be found; the \"b\" replacements raise :exc:" "`OSError` instead." msgstr "" -#: library/subprocess.rst:1337 +#: library/subprocess.rst:1355 msgid "" "In addition, the replacements using :func:`check_output` will fail with a :" "exc:`CalledProcessError` if the requested operation produces a non-zero " @@ -1623,37 +1648,37 @@ msgid "" "output` attribute of the raised exception." msgstr "" -#: library/subprocess.rst:1342 +#: library/subprocess.rst:1360 msgid "" "In the following examples, we assume that the relevant functions have " "already been imported from the :mod:`subprocess` module." msgstr "" -#: library/subprocess.rst:1347 +#: library/subprocess.rst:1365 msgid "Replacing :program:`/bin/sh` shell command substitution" msgstr "" -#: library/subprocess.rst:1349 +#: library/subprocess.rst:1367 msgid "output=$(mycmd myarg)" msgstr "" -#: library/subprocess.rst:1364 library/subprocess.rst:1381 +#: library/subprocess.rst:1382 library/subprocess.rst:1399 msgid "becomes::" msgstr "" -#: library/subprocess.rst:1355 +#: library/subprocess.rst:1373 msgid "output = check_output([\"mycmd\", \"myarg\"])" msgstr "" -#: library/subprocess.rst:1358 +#: library/subprocess.rst:1376 msgid "Replacing shell pipeline" msgstr "" -#: library/subprocess.rst:1377 +#: library/subprocess.rst:1395 msgid "output=$(dmesg | grep hda)" msgstr "" -#: library/subprocess.rst:1366 +#: library/subprocess.rst:1384 msgid "" "p1 = Popen([\"dmesg\"], stdout=PIPE)\n" "p2 = Popen([\"grep\", \"hda\"], stdin=p1.stdout, stdout=PIPE)\n" @@ -1661,59 +1686,59 @@ msgid "" "output = p2.communicate()[0]" msgstr "" -#: library/subprocess.rst:1371 +#: library/subprocess.rst:1389 msgid "" "The ``p1.stdout.close()`` call after starting the p2 is important in order " "for p1 to receive a SIGPIPE if p2 exits before p1." msgstr "" -#: library/subprocess.rst:1374 +#: library/subprocess.rst:1392 msgid "" "Alternatively, for trusted input, the shell's own pipeline support may still " "be used directly:" msgstr "" -#: library/subprocess.rst:1383 +#: library/subprocess.rst:1401 msgid "output = check_output(\"dmesg | grep hda\", shell=True)" msgstr "" -#: library/subprocess.rst:1387 +#: library/subprocess.rst:1405 msgid "Replacing :func:`os.system`" msgstr "" -#: library/subprocess.rst:1391 +#: library/subprocess.rst:1409 msgid "" "sts = os.system(\"mycmd\" + \" myarg\")\n" "# becomes\n" "retcode = call(\"mycmd\" + \" myarg\", shell=True)" msgstr "" -#: library/subprocess.rst:1395 +#: library/subprocess.rst:1413 msgid "Notes:" msgstr "" -#: library/subprocess.rst:1397 +#: library/subprocess.rst:1415 msgid "Calling the program through the shell is usually not required." msgstr "" -#: library/subprocess.rst:1398 +#: library/subprocess.rst:1416 msgid "" "The :func:`call` return value is encoded differently to that of :func:`os." "system`." msgstr "" -#: library/subprocess.rst:1401 +#: library/subprocess.rst:1419 msgid "" "The :func:`os.system` function ignores SIGINT and SIGQUIT signals while the " "command is running, but the caller must do this separately when using the :" "mod:`subprocess` module." msgstr "" -#: library/subprocess.rst:1405 +#: library/subprocess.rst:1423 msgid "A more realistic example would look like this::" msgstr "" -#: library/subprocess.rst:1407 +#: library/subprocess.rst:1425 msgid "" "try:\n" " retcode = call(\"mycmd\" + \" myarg\", shell=True)\n" @@ -1726,59 +1751,59 @@ msgid "" " print(\"Execution failed:\", e, file=sys.stderr)" msgstr "" -#: library/subprocess.rst:1418 +#: library/subprocess.rst:1436 msgid "Replacing the :func:`os.spawn ` family" msgstr "" -#: library/subprocess.rst:1420 +#: library/subprocess.rst:1438 msgid "P_NOWAIT example::" msgstr "" -#: library/subprocess.rst:1422 +#: library/subprocess.rst:1440 msgid "" "pid = os.spawnlp(os.P_NOWAIT, \"/bin/mycmd\", \"mycmd\", \"myarg\")\n" "==>\n" "pid = Popen([\"/bin/mycmd\", \"myarg\"]).pid" msgstr "" -#: library/subprocess.rst:1426 +#: library/subprocess.rst:1444 msgid "P_WAIT example::" msgstr "" -#: library/subprocess.rst:1428 +#: library/subprocess.rst:1446 msgid "" "retcode = os.spawnlp(os.P_WAIT, \"/bin/mycmd\", \"mycmd\", \"myarg\")\n" "==>\n" "retcode = call([\"/bin/mycmd\", \"myarg\"])" msgstr "" -#: library/subprocess.rst:1432 +#: library/subprocess.rst:1450 msgid "Vector example::" msgstr "" -#: library/subprocess.rst:1434 +#: library/subprocess.rst:1452 msgid "" "os.spawnvp(os.P_NOWAIT, path, args)\n" "==>\n" "Popen([path] + args[1:])" msgstr "" -#: library/subprocess.rst:1438 +#: library/subprocess.rst:1456 msgid "Environment example::" msgstr "" -#: library/subprocess.rst:1440 +#: library/subprocess.rst:1458 msgid "" "os.spawnlpe(os.P_NOWAIT, \"/bin/mycmd\", \"mycmd\", \"myarg\", env)\n" "==>\n" "Popen([\"/bin/mycmd\", \"myarg\"], env={\"PATH\": \"/usr/bin\"})" msgstr "" -#: library/subprocess.rst:1447 +#: library/subprocess.rst:1465 msgid "Replacing :func:`os.popen`, :func:`os.popen2`, :func:`os.popen3`" msgstr "" -#: library/subprocess.rst:1451 +#: library/subprocess.rst:1469 msgid "" "(child_stdin, child_stdout) = os.popen2(cmd, mode, bufsize)\n" "==>\n" @@ -1787,7 +1812,7 @@ msgid "" "(child_stdin, child_stdout) = (p.stdin, p.stdout)" msgstr "" -#: library/subprocess.rst:1459 +#: library/subprocess.rst:1477 msgid "" "(child_stdin,\n" " child_stdout,\n" @@ -1800,7 +1825,7 @@ msgid "" " child_stderr) = (p.stdin, p.stdout, p.stderr)" msgstr "" -#: library/subprocess.rst:1471 +#: library/subprocess.rst:1489 msgid "" "(child_stdin, child_stdout_and_stderr) = os.popen4(cmd, mode, bufsize)\n" "==>\n" @@ -1809,11 +1834,11 @@ msgid "" "(child_stdin, child_stdout_and_stderr) = (p.stdin, p.stdout)" msgstr "" -#: library/subprocess.rst:1477 +#: library/subprocess.rst:1495 msgid "Return code handling translates as follows::" msgstr "" -#: library/subprocess.rst:1479 +#: library/subprocess.rst:1497 msgid "" "pipe = os.popen(cmd, 'w')\n" "...\n" @@ -1828,17 +1853,17 @@ msgid "" " print(\"There were some errors\")" msgstr "" -#: library/subprocess.rst:1493 +#: library/subprocess.rst:1511 msgid "Replacing functions from the :mod:`!popen2` module" msgstr "" -#: library/subprocess.rst:1497 +#: library/subprocess.rst:1515 msgid "" "If the cmd argument to popen2 functions is a string, the command is executed " "through /bin/sh. If it is a list, the command is directly executed." msgstr "" -#: library/subprocess.rst:1502 +#: library/subprocess.rst:1520 msgid "" "(child_stdout, child_stdin) = popen2.popen2(\"somestring\", bufsize, mode)\n" "==>\n" @@ -1847,7 +1872,7 @@ msgid "" "(child_stdout, child_stdin) = (p.stdout, p.stdin)" msgstr "" -#: library/subprocess.rst:1510 +#: library/subprocess.rst:1528 msgid "" "(child_stdout, child_stdin) = popen2.popen2([\"mycmd\", \"myarg\"], bufsize, " "mode)\n" @@ -1857,36 +1882,36 @@ msgid "" "(child_stdout, child_stdin) = (p.stdout, p.stdin)" msgstr "" -#: library/subprocess.rst:1516 +#: library/subprocess.rst:1534 msgid "" ":class:`popen2.Popen3` and :class:`popen2.Popen4` basically work as :class:" "`subprocess.Popen`, except that:" msgstr "" -#: library/subprocess.rst:1519 +#: library/subprocess.rst:1537 msgid ":class:`Popen` raises an exception if the execution fails." msgstr "" -#: library/subprocess.rst:1521 +#: library/subprocess.rst:1539 msgid "The *capturestderr* argument is replaced with the *stderr* argument." msgstr "" -#: library/subprocess.rst:1523 +#: library/subprocess.rst:1541 msgid "``stdin=PIPE`` and ``stdout=PIPE`` must be specified." msgstr "" -#: library/subprocess.rst:1525 +#: library/subprocess.rst:1543 msgid "" "popen2 closes all file descriptors by default, but you have to specify " "``close_fds=True`` with :class:`Popen` to guarantee this behavior on all " "platforms or past Python versions." msgstr "" -#: library/subprocess.rst:1531 +#: library/subprocess.rst:1549 msgid "Legacy Shell Invocation Functions" msgstr "" -#: library/subprocess.rst:1533 +#: library/subprocess.rst:1551 msgid "" "This module also provides the following legacy functions from the 2.x " "``commands`` module. These operations implicitly invoke the system shell and " @@ -1894,24 +1919,24 @@ msgid "" "handling consistency are valid for these functions." msgstr "" -#: library/subprocess.rst:1540 +#: library/subprocess.rst:1558 msgid "Return ``(exitcode, output)`` of executing *cmd* in a shell." msgstr "" -#: library/subprocess.rst:1542 +#: library/subprocess.rst:1560 msgid "" "Execute the string *cmd* in a shell with :func:`check_output` and return a 2-" "tuple ``(exitcode, output)``. *encoding* and *errors* are used to decode " "output; see the notes on :ref:`frequently-used-arguments` for more details." msgstr "" -#: library/subprocess.rst:1547 +#: library/subprocess.rst:1565 msgid "" "A trailing newline is stripped from the output. The exit code for the " "command can be interpreted as the return code of subprocess. Example::" msgstr "" -#: library/subprocess.rst:1551 +#: library/subprocess.rst:1569 msgid "" ">>> subprocess.getstatusoutput('ls /bin/ls')\n" "(0, '/bin/ls')\n" @@ -1923,53 +1948,53 @@ msgid "" "(-15, '')" msgstr "" -#: library/subprocess.rst:1562 +#: library/subprocess.rst:1580 msgid "Windows support was added." msgstr "" -#: library/subprocess.rst:1565 +#: library/subprocess.rst:1583 msgid "" "The function now returns (exitcode, output) instead of (status, output) as " "it did in Python 3.3.3 and earlier. exitcode has the same value as :attr:" "`~Popen.returncode`." msgstr "" -#: library/subprocess.rst:1574 +#: library/subprocess.rst:1592 msgid "Return output (stdout and stderr) of executing *cmd* in a shell." msgstr "" -#: library/subprocess.rst:1576 +#: library/subprocess.rst:1594 msgid "" "Like :func:`getstatusoutput`, except the exit code is ignored and the return " "value is a string containing the command's output. Example::" msgstr "" -#: library/subprocess.rst:1579 +#: library/subprocess.rst:1597 msgid "" ">>> subprocess.getoutput('ls /bin/ls')\n" "'/bin/ls'" msgstr "" -#: library/subprocess.rst:1584 +#: library/subprocess.rst:1602 msgid "Windows support added" msgstr "" -#: library/subprocess.rst:1592 +#: library/subprocess.rst:1610 msgid "Notes" msgstr "" -#: library/subprocess.rst:1597 +#: library/subprocess.rst:1615 msgid "Timeout Behavior" msgstr "" -#: library/subprocess.rst:1599 +#: library/subprocess.rst:1617 msgid "" "When using the ``timeout`` parameter in functions like :func:`run`, :meth:" "`Popen.wait`, or :meth:`Popen.communicate`, users should be aware of the " "following behaviors:" msgstr "" -#: library/subprocess.rst:1603 +#: library/subprocess.rst:1621 msgid "" "**Process Creation Delay**: The initial process creation itself cannot be " "interrupted on many platform APIs. This means that even when specifying a " @@ -1977,7 +2002,7 @@ msgid "" "after however long process creation takes." msgstr "" -#: library/subprocess.rst:1608 +#: library/subprocess.rst:1626 msgid "" "**Extremely Small Timeout Values**: Setting very small timeout values (such " "as a few milliseconds) may result in almost immediate :exc:`TimeoutExpired` " @@ -1985,42 +2010,42 @@ msgid "" "time." msgstr "" -#: library/subprocess.rst:1615 +#: library/subprocess.rst:1633 msgid "Converting an argument sequence to a string on Windows" msgstr "" -#: library/subprocess.rst:1617 +#: library/subprocess.rst:1635 msgid "" "On Windows, an *args* sequence is converted to a string that can be parsed " "using the following rules (which correspond to the rules used by the MS C " "runtime):" msgstr "" -#: library/subprocess.rst:1621 +#: library/subprocess.rst:1639 msgid "" "Arguments are delimited by white space, which is either a space or a tab." msgstr "" -#: library/subprocess.rst:1624 +#: library/subprocess.rst:1642 msgid "" "A string surrounded by double quotation marks is interpreted as a single " "argument, regardless of white space contained within. A quoted string can " "be embedded in an argument." msgstr "" -#: library/subprocess.rst:1629 +#: library/subprocess.rst:1647 msgid "" "A double quotation mark preceded by a backslash is interpreted as a literal " "double quotation mark." msgstr "" -#: library/subprocess.rst:1632 +#: library/subprocess.rst:1650 msgid "" "Backslashes are interpreted literally, unless they immediately precede a " "double quotation mark." msgstr "" -#: library/subprocess.rst:1635 +#: library/subprocess.rst:1653 msgid "" "If backslashes immediately precede a double quotation mark, every pair of " "backslashes is interpreted as a literal backslash. If the number of " @@ -2028,37 +2053,37 @@ msgid "" "mark as described in rule 3." msgstr "" -#: library/subprocess.rst:1644 +#: library/subprocess.rst:1662 msgid ":mod:`shlex`" msgstr "" -#: library/subprocess.rst:1645 +#: library/subprocess.rst:1663 msgid "Module which provides function to parse and escape command lines." msgstr "" -#: library/subprocess.rst:1652 +#: library/subprocess.rst:1670 msgid "Disabling use of ``vfork()`` or ``posix_spawn()``" msgstr "" -#: library/subprocess.rst:1654 +#: library/subprocess.rst:1672 msgid "" "On Linux, :mod:`subprocess` defaults to using the ``vfork()`` system call " "internally when it is safe to do so rather than ``fork()``. This greatly " "improves performance." msgstr "" -#: library/subprocess.rst:1658 +#: library/subprocess.rst:1676 msgid "" "If you ever encounter a presumed highly unusual situation where you need to " "prevent ``vfork()`` from being used by Python, you can set the :const:" "`subprocess._USE_VFORK` attribute to a false value." msgstr "" -#: library/subprocess.rst:1664 +#: library/subprocess.rst:1682 msgid "subprocess._USE_VFORK = False # See CPython issue gh-NNNNNN." msgstr "" -#: library/subprocess.rst:1666 +#: library/subprocess.rst:1684 msgid "" "Setting this has no impact on use of ``posix_spawn()`` which could use " "``vfork()`` internally within its libc implementation. There is a similar :" @@ -2066,11 +2091,11 @@ msgid "" "that." msgstr "" -#: library/subprocess.rst:1673 +#: library/subprocess.rst:1691 msgid "subprocess._USE_POSIX_SPAWN = False # See CPython issue gh-NNNNNN." msgstr "" -#: library/subprocess.rst:1675 +#: library/subprocess.rst:1693 msgid "" "It is safe to set these to false on any Python version. They will have no " "effect on older versions when unsupported. Do not assume the attributes are " @@ -2078,18 +2103,18 @@ msgid "" "the corresponding function will be used, only that it may be." msgstr "" -#: library/subprocess.rst:1680 +#: library/subprocess.rst:1698 msgid "" "Please file issues any time you have to use these private knobs with a way " "to reproduce the issue you were seeing. Link to that issue from a comment in " "your code." msgstr "" -#: library/subprocess.rst:1684 +#: library/subprocess.rst:1702 msgid "``_USE_POSIX_SPAWN``" msgstr "" -#: library/subprocess.rst:1685 +#: library/subprocess.rst:1703 msgid "``_USE_VFORK``" msgstr "" diff --git a/library/sunau.po b/library/sunau.po index 6d6156b63..97b753cc7 100644 --- a/library/sunau.po +++ b/library/sunau.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/superseded.po b/library/superseded.po index acee8bef4..83768ae81 100644 --- a/library/superseded.po +++ b/library/superseded.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/symtable.po b/library/symtable.po index 6fedc2e61..1a124fb80 100644 --- a/library/symtable.po +++ b/library/symtable.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/sys.monitoring.po b/library/sys.monitoring.po index 69bee6ba3..a2612dd3a 100644 --- a/library/sys.monitoring.po +++ b/library/sys.monitoring.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -23,9 +23,10 @@ msgstr "" #: library/sys.monitoring.rst:13 msgid "" -":mod:`sys.monitoring` is a namespace within the :mod:`sys` module, not an " -"independent module, so there is no need to ``import sys.monitoring``, simply " -"``import sys`` and then use ``sys.monitoring``." +":mod:`!sys.monitoring` is a namespace within the :mod:`sys` module, not an " +"independent module, and ``import sys.monitoring`` would fail with a :exc:" +"`ModuleNotFoundError`. Instead, simply ``import sys`` and then use ``sys." +"monitoring``." msgstr "" #: library/sys.monitoring.rst:19 diff --git a/library/sys.po b/library/sys.po index 931128643..d9c5f423d 100644 --- a/library/sys.po +++ b/library/sys.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -603,7 +603,7 @@ msgid "" "be in the range 0--127, and produce undefined results otherwise. Some " "systems have a convention for assigning specific meanings to specific exit " "codes, but these are generally underdeveloped; Unix programs generally use 2 " -"for command line syntax errors and 1 for all other kind of errors. If " +"for command line syntax errors and 1 for all other kinds of errors. If " "another type of object is passed, ``None`` is equivalent to passing zero, " "and any other object is printed to :data:`stderr` and results in an exit " "code of 1. In particular, ``sys.exit(\"some error message\")`` is a quick " diff --git a/library/sys_path_init.po b/library/sys_path_init.po index bc933fbdb..8eeccf983 100644 --- a/library/sys_path_init.po +++ b/library/sys_path_init.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/sysconfig.po b/library/sysconfig.po index 71cd1055f..7d57f9079 100644 --- a/library/sysconfig.po +++ b/library/sysconfig.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/syslog.po b/library/syslog.po index 3f4848bf2..9d0f0e3b6 100644 --- a/library/syslog.po +++ b/library/syslog.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,29 +21,29 @@ msgstr "" msgid ":mod:`!syslog` --- Unix syslog library routines" msgstr "" -#: library/syslog.rst:10 +#: library/syslog.rst:9 msgid "" "This module provides an interface to the Unix ``syslog`` library routines. " "Refer to the Unix manual pages for a detailed description of the ``syslog`` " "facility." msgstr "" -#: library/syslog.rst:14 +#: library/syslog.rst:13 msgid "Availability" msgstr "" -#: library/syslog.rst:16 +#: library/syslog.rst:15 msgid "" "This module wraps the system ``syslog`` family of routines. A pure Python " "library that can speak to a syslog server is available in the :mod:`logging." "handlers` module as :class:`~logging.handlers.SysLogHandler`." msgstr "" -#: library/syslog.rst:20 +#: library/syslog.rst:19 msgid "The module defines the following functions:" msgstr "" -#: library/syslog.rst:26 +#: library/syslog.rst:25 msgid "" "Send the string *message* to the system logger. A trailing newline is added " "if necessary. Each message is tagged with a priority composed of a " @@ -53,26 +53,26 @@ msgid "" "value given in the :func:`openlog` call is used." msgstr "" -#: library/syslog.rst:33 +#: library/syslog.rst:32 msgid "" "If :func:`openlog` has not been called prior to the call to :func:`syslog`, :" "func:`openlog` will be called with no arguments." msgstr "" -#: library/syslog.rst:36 +#: library/syslog.rst:35 msgid "" "Raises an :ref:`auditing event ` ``syslog.syslog`` with arguments " "``priority``, ``message``." msgstr "" -#: library/syslog.rst:38 +#: library/syslog.rst:37 msgid "" "In previous versions, :func:`openlog` would not be called automatically if " "it wasn't called prior to the call to :func:`syslog`, deferring to the " "syslog implementation to call ``openlog()``." msgstr "" -#: library/syslog.rst:43 +#: library/syslog.rst:42 msgid "" "This function is restricted in subinterpreters. (Only code that runs in " "multiple interpreters is affected and the restriction is not relevant for " @@ -81,14 +81,14 @@ msgid "" "`RuntimeError`." msgstr "" -#: library/syslog.rst:53 +#: library/syslog.rst:52 msgid "" "Logging options of subsequent :func:`syslog` calls can be set by calling :" "func:`openlog`. :func:`syslog` will call :func:`openlog` with no arguments " "if the log is not currently open." msgstr "" -#: library/syslog.rst:57 +#: library/syslog.rst:56 msgid "" "The optional *ident* keyword argument is a string which is prepended to " "every message, and defaults to ``sys.argv[0]`` with leading path components " @@ -98,19 +98,19 @@ msgid "" "for messages which do not have a facility explicitly encoded." msgstr "" -#: library/syslog.rst:64 +#: library/syslog.rst:63 msgid "" "Raises an :ref:`auditing event ` ``syslog.openlog`` with arguments " "``ident``, ``logoption``, ``facility``." msgstr "" -#: library/syslog.rst:66 +#: library/syslog.rst:65 msgid "" "In previous versions, keyword arguments were not allowed, and *ident* was " "required." msgstr "" -#: library/syslog.rst:89 +#: library/syslog.rst:88 msgid "" "This function is restricted in subinterpreters. (Only code that runs in " "multiple interpreters is affected and the restriction is not relevant for " @@ -118,12 +118,12 @@ msgid "" "exc:`RuntimeError` if called in a subinterpreter." msgstr "" -#: library/syslog.rst:80 +#: library/syslog.rst:79 msgid "" "Reset the syslog module values and call the system library ``closelog()``." msgstr "" -#: library/syslog.rst:82 +#: library/syslog.rst:81 msgid "" "This causes the module to behave as it does when initially imported. For " "example, :func:`openlog` will be called on the first :func:`syslog` call " @@ -131,13 +131,13 @@ msgid "" "`openlog` parameters are reset to defaults." msgstr "" -#: library/syslog.rst:87 +#: library/syslog.rst:86 msgid "" "Raises an :ref:`auditing event ` ``syslog.closelog`` with no " "arguments." msgstr "" -#: library/syslog.rst:99 +#: library/syslog.rst:98 msgid "" "Set the priority mask to *maskpri* and return the previous mask value. " "Calls to :func:`syslog` with a priority level not set in *maskpri* are " @@ -147,52 +147,52 @@ msgid "" "and including *pri*." msgstr "" -#: library/syslog.rst:106 +#: library/syslog.rst:105 msgid "" "Raises an :ref:`auditing event ` ``syslog.setlogmask`` with " "argument ``maskpri``." msgstr "" -#: library/syslog.rst:108 +#: library/syslog.rst:107 msgid "The module defines the following constants:" msgstr "" -#: library/syslog.rst:120 +#: library/syslog.rst:119 msgid "Priority levels (high to low)." msgstr "" -#: library/syslog.rst:149 +#: library/syslog.rst:148 msgid "" "Facilities, depending on availability in ```` for :const:" "`LOG_AUTHPRIV`, :const:`LOG_FTP`, :const:`LOG_NETINFO`, :const:" "`LOG_REMOTEAUTH`, :const:`LOG_INSTALL` and :const:`LOG_RAS`." msgstr "" -#: library/syslog.rst:153 +#: library/syslog.rst:152 msgid "" "Added :const:`LOG_FTP`, :const:`LOG_NETINFO`, :const:`LOG_REMOTEAUTH`, :" "const:`LOG_INSTALL`, :const:`LOG_RAS`, and :const:`LOG_LAUNCHD`." msgstr "" -#: library/syslog.rst:164 +#: library/syslog.rst:163 msgid "" "Log options, depending on availability in ```` for :const:" "`LOG_ODELAY`, :const:`LOG_NOWAIT` and :const:`LOG_PERROR`." msgstr "" -#: library/syslog.rst:169 +#: library/syslog.rst:168 msgid "Examples" msgstr "" -#: library/syslog.rst:172 +#: library/syslog.rst:171 msgid "Simple example" msgstr "" -#: library/syslog.rst:174 +#: library/syslog.rst:173 msgid "A simple set of examples::" msgstr "" -#: library/syslog.rst:176 +#: library/syslog.rst:175 msgid "" "import syslog\n" "\n" @@ -201,14 +201,14 @@ msgid "" " syslog.syslog(syslog.LOG_ERR, 'Processing started')" msgstr "" -#: library/syslog.rst:182 +#: library/syslog.rst:181 msgid "" "An example of setting some log options, these would include the process ID " "in logged messages, and write the messages to the destination facility used " "for mail logging::" msgstr "" -#: library/syslog.rst:186 +#: library/syslog.rst:185 msgid "" "syslog.openlog(logoption=syslog.LOG_PID, facility=syslog.LOG_MAIL)\n" "syslog.syslog('E-mail processing initiated...')" diff --git a/library/tabnanny.po b/library/tabnanny.po index f7675c547..448d0b494 100644 --- a/library/tabnanny.po +++ b/library/tabnanny.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/tarfile.po b/library/tarfile.po index 5932fc739..a53a8a3bb 100644 --- a/library/tarfile.po +++ b/library/tarfile.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/telnetlib.po b/library/telnetlib.po index 289483f2d..420c8f719 100644 --- a/library/telnetlib.po +++ b/library/telnetlib.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/tempfile.po b/library/tempfile.po index e9d06687d..03e4993ff 100644 --- a/library/tempfile.po +++ b/library/tempfile.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -103,7 +103,7 @@ msgid "" "for NamedTemporaryFile." msgstr "" -#: library/tempfile.rst:137 library/tempfile.rst:264 +#: library/tempfile.rst:137 library/tempfile.rst:265 msgid "" "Raises an :ref:`auditing event ` ``tempfile.mkstemp`` with " "argument ``fullpath``." @@ -295,7 +295,7 @@ msgid "" "based on other logic." msgstr "" -#: library/tempfile.rst:290 +#: library/tempfile.rst:291 msgid "" "Raises an :ref:`auditing event ` ``tempfile.mkdtemp`` with " "argument ``fullpath``." @@ -316,17 +316,22 @@ msgid "" "implements the :const:`os.O_EXCL` flag for :func:`os.open`. The file is " "readable and writable only by the creating user ID. If the platform uses " "permission bits to indicate whether a file is executable, the file is " -"executable by no one. The file descriptor is not inherited by child " -"processes." +"executable by no one." msgstr "" -#: library/tempfile.rst:231 +#: library/tempfile.rst:230 +msgid "" +"The file descriptor is :ref:`not inherited by child processes " +"`." +msgstr "" + +#: library/tempfile.rst:232 msgid "" "Unlike :func:`TemporaryFile`, the user of :func:`mkstemp` is responsible for " "deleting the temporary file when done with it." msgstr "" -#: library/tempfile.rst:234 +#: library/tempfile.rst:235 msgid "" "If *suffix* is not ``None``, the file name will end with that suffix, " "otherwise there will be no suffix. :func:`mkstemp` does not put a dot " @@ -334,14 +339,14 @@ msgid "" "beginning of *suffix*." msgstr "" -#: library/tempfile.rst:239 +#: library/tempfile.rst:240 msgid "" "If *prefix* is not ``None``, the file name will begin with that prefix; " "otherwise, a default prefix is used. The default is the return value of :" "func:`gettempprefix` or :func:`gettempprefixb`, as appropriate." msgstr "" -#: library/tempfile.rst:243 +#: library/tempfile.rst:244 msgid "" "If *dir* is not ``None``, the file will be created in that directory; " "otherwise, a default directory is used. The default directory is chosen " @@ -352,7 +357,7 @@ msgid "" "commands via ``os.popen()``." msgstr "" -#: library/tempfile.rst:251 +#: library/tempfile.rst:252 msgid "" "If any of *suffix*, *prefix*, and *dir* are not ``None``, they must be the " "same type. If they are bytes, the returned name will be bytes instead of " @@ -360,20 +365,20 @@ msgid "" "behavior, pass ``suffix=b''``." msgstr "" -#: library/tempfile.rst:257 +#: library/tempfile.rst:258 msgid "" "If *text* is specified and true, the file is opened in text mode. Otherwise, " "(the default) the file is opened in binary mode." msgstr "" -#: library/tempfile.rst:260 +#: library/tempfile.rst:261 msgid "" ":func:`mkstemp` returns a tuple containing an OS-level handle to an open " "file (as would be returned by :func:`os.open`) and the absolute pathname of " "that file, in that order." msgstr "" -#: library/tempfile.rst:292 +#: library/tempfile.rst:293 msgid "" "*suffix*, *prefix*, and *dir* may now be supplied in bytes in order to " "obtain a bytes return value. Prior to this, only str was allowed. *suffix* " @@ -381,110 +386,110 @@ msgid "" "default value to be used." msgstr "" -#: library/tempfile.rst:298 +#: library/tempfile.rst:299 msgid "The *dir* parameter now accepts a :term:`path-like object`." msgstr "" -#: library/tempfile.rst:278 +#: library/tempfile.rst:279 msgid "" "Creates a temporary directory in the most secure manner possible. There are " "no race conditions in the directory's creation. The directory is readable, " "writable, and searchable only by the creating user ID." msgstr "" -#: library/tempfile.rst:282 +#: library/tempfile.rst:283 msgid "" "The user of :func:`mkdtemp` is responsible for deleting the temporary " "directory and its contents when done with it." msgstr "" -#: library/tempfile.rst:285 +#: library/tempfile.rst:286 msgid "" "The *prefix*, *suffix*, and *dir* arguments are the same as for :func:" "`mkstemp`." msgstr "" -#: library/tempfile.rst:288 +#: library/tempfile.rst:289 msgid ":func:`mkdtemp` returns the absolute pathname of the new directory." msgstr "" -#: library/tempfile.rst:301 +#: library/tempfile.rst:302 msgid "" ":func:`mkdtemp` now always returns an absolute path, even if *dir* is " "relative." msgstr "" -#: library/tempfile.rst:307 +#: library/tempfile.rst:308 msgid "" "Return the name of the directory used for temporary files. This defines the " "default value for the *dir* argument to all functions in this module." msgstr "" -#: library/tempfile.rst:311 +#: library/tempfile.rst:312 msgid "" "Python searches a standard list of directories to find one which the calling " "user can create files in. The list is:" msgstr "" -#: library/tempfile.rst:314 +#: library/tempfile.rst:315 msgid "The directory named by the :envvar:`TMPDIR` environment variable." msgstr "" -#: library/tempfile.rst:316 +#: library/tempfile.rst:317 msgid "The directory named by the :envvar:`TEMP` environment variable." msgstr "" -#: library/tempfile.rst:318 +#: library/tempfile.rst:319 msgid "The directory named by the :envvar:`TMP` environment variable." msgstr "" -#: library/tempfile.rst:320 +#: library/tempfile.rst:321 msgid "A platform-specific location:" msgstr "" -#: library/tempfile.rst:322 +#: library/tempfile.rst:323 msgid "" "On Windows, the directories :file:`C:\\\\TEMP`, :file:`C:\\\\TMP`, :file:`\\" "\\TEMP`, and :file:`\\\\TMP`, in that order." msgstr "" -#: library/tempfile.rst:325 +#: library/tempfile.rst:326 msgid "" "On all other platforms, the directories :file:`/tmp`, :file:`/var/tmp`, and :" "file:`/usr/tmp`, in that order." msgstr "" -#: library/tempfile.rst:328 +#: library/tempfile.rst:329 msgid "As a last resort, the current working directory." msgstr "" -#: library/tempfile.rst:330 +#: library/tempfile.rst:331 msgid "" "The result of this search is cached, see the description of :data:`tempdir` " "below." msgstr "" -#: library/tempfile.rst:335 +#: library/tempfile.rst:336 msgid "" "Always returns a str. Previously it would return any :data:`tempdir` value " "regardless of type so long as it was not ``None``." msgstr "" -#: library/tempfile.rst:340 +#: library/tempfile.rst:341 msgid "Same as :func:`gettempdir` but the return value is in bytes." msgstr "" -#: library/tempfile.rst:346 +#: library/tempfile.rst:347 msgid "" "Return the filename prefix used to create temporary files. This does not " "contain the directory component." msgstr "" -#: library/tempfile.rst:351 +#: library/tempfile.rst:352 msgid "Same as :func:`gettempprefix` but the return value is in bytes." msgstr "" -#: library/tempfile.rst:355 +#: library/tempfile.rst:356 msgid "" "The module uses a global variable to store the name of the directory used " "for temporary files returned by :func:`gettempdir`. It can be set directly " @@ -494,21 +499,21 @@ msgid "" "unsuspecting code by changing global API behavior." msgstr "" -#: library/tempfile.rst:364 +#: library/tempfile.rst:365 msgid "" "When set to a value other than ``None``, this variable defines the default " "value for the *dir* argument to the functions defined in this module, " "including its type, bytes or str. It cannot be a :term:`path-like object`." msgstr "" -#: library/tempfile.rst:369 +#: library/tempfile.rst:370 msgid "" "If ``tempdir`` is ``None`` (the default) at any call to any of the above " "functions except :func:`gettempprefix` it is initialized following the " "algorithm described in :func:`gettempdir`." msgstr "" -#: library/tempfile.rst:375 +#: library/tempfile.rst:376 msgid "" "Beware that if you set ``tempdir`` to a bytes value, there is a nasty side " "effect: The global default return type of :func:`mkstemp` and :func:" @@ -518,15 +523,15 @@ msgid "" "compatibility with the historical implementation." msgstr "" -#: library/tempfile.rst:386 +#: library/tempfile.rst:387 msgid "Examples" msgstr "" -#: library/tempfile.rst:388 +#: library/tempfile.rst:389 msgid "Here are some examples of typical usage of the :mod:`tempfile` module::" msgstr "" -#: library/tempfile.rst:390 +#: library/tempfile.rst:391 msgid "" ">>> import tempfile\n" "\n" @@ -569,11 +574,11 @@ msgid "" "# directory and contents have been removed" msgstr "" -#: library/tempfile.rst:433 +#: library/tempfile.rst:434 msgid "Deprecated functions and variables" msgstr "" -#: library/tempfile.rst:435 +#: library/tempfile.rst:436 msgid "" "A historical way to create temporary files was to first generate a file name " "with the :func:`mktemp` function and then create a file using this name. " @@ -584,11 +589,11 @@ msgid "" "used by :func:`mkstemp` and the other functions described above." msgstr "" -#: library/tempfile.rst:446 +#: library/tempfile.rst:447 msgid "Use :func:`mkstemp` instead." msgstr "" -#: library/tempfile.rst:449 +#: library/tempfile.rst:450 msgid "" "Return an absolute pathname of a file that did not exist at the time the " "call is made. The *prefix*, *suffix*, and *dir* arguments are similar to " @@ -596,7 +601,7 @@ msgid "" "``prefix=None`` are not supported." msgstr "" -#: library/tempfile.rst:456 +#: library/tempfile.rst:457 msgid "" "Use of this function may introduce a security hole in your program. By the " "time you get around to doing anything with the file name it returns, someone " @@ -605,7 +610,7 @@ msgid "" "parameter::" msgstr "" -#: library/tempfile.rst:462 +#: library/tempfile.rst:463 msgid "" ">>> f = NamedTemporaryFile(delete=False)\n" ">>> f.name\n" diff --git a/library/termios.po b/library/termios.po index c046fba87..d5ef3e7db 100644 --- a/library/termios.po +++ b/library/termios.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,7 +21,7 @@ msgstr "" msgid ":mod:`!termios` --- POSIX style tty control" msgstr "" -#: library/termios.rst:14 +#: library/termios.rst:13 msgid "" "This module provides an interface to the POSIX calls for tty I/O control. " "For a complete description of these calls, see :manpage:`termios(3)` Unix " @@ -29,18 +29,18 @@ msgid "" "POSIX *termios* style tty I/O control configured during installation." msgstr "" -#: library/termios.rst:19 +#: library/termios.rst:18 msgid "Availability" msgstr "" -#: library/termios.rst:21 +#: library/termios.rst:20 msgid "" "All functions in this module take a file descriptor *fd* as their first " "argument. This can be an integer file descriptor, such as returned by ``sys." "stdin.fileno()``, or a :term:`file object`, such as ``sys.stdin`` itself." msgstr "" -#: library/termios.rst:25 +#: library/termios.rst:24 msgid "" "This module also defines all the constants needed to work with the functions " "provided here; these have the same name as their counterparts in C. Please " @@ -48,11 +48,11 @@ msgid "" "terminal control interfaces." msgstr "" -#: library/termios.rst:30 +#: library/termios.rst:29 msgid "The module defines the following functions:" msgstr "" -#: library/termios.rst:35 +#: library/termios.rst:34 msgid "" "Return a list containing the tty attributes for file descriptor *fd*, as " "follows: ``[iflag, oflag, cflag, lflag, ispeed, ospeed, cc]`` where *cc* is " @@ -63,60 +63,60 @@ msgid "" "constants defined in the :mod:`termios` module." msgstr "" -#: library/termios.rst:46 +#: library/termios.rst:45 msgid "" "Set the tty attributes for file descriptor *fd* from the *attributes*, which " "is a list like the one returned by :func:`tcgetattr`. The *when* argument " "determines when the attributes are changed:" msgstr "" -#: library/termios.rst:52 +#: library/termios.rst:51 msgid "Change attributes immediately." msgstr "" -#: library/termios.rst:56 +#: library/termios.rst:55 msgid "Change attributes after transmitting all queued output." msgstr "" -#: library/termios.rst:60 +#: library/termios.rst:59 msgid "" "Change attributes after transmitting all queued output and discarding all " "queued input." msgstr "" -#: library/termios.rst:66 +#: library/termios.rst:65 msgid "" "Send a break on file descriptor *fd*. A zero *duration* sends a break for " "0.25--0.5 seconds; a nonzero *duration* has a system dependent meaning." msgstr "" -#: library/termios.rst:72 +#: library/termios.rst:71 msgid "" "Wait until all output written to file descriptor *fd* has been transmitted." msgstr "" -#: library/termios.rst:77 +#: library/termios.rst:76 msgid "" "Discard queued data on file descriptor *fd*. The *queue* selector specifies " "which queue: :const:`TCIFLUSH` for the input queue, :const:`TCOFLUSH` for " "the output queue, or :const:`TCIOFLUSH` for both queues." msgstr "" -#: library/termios.rst:84 +#: library/termios.rst:83 msgid "" "Suspend or resume input or output on file descriptor *fd*. The *action* " "argument can be :const:`TCOOFF` to suspend output, :const:`TCOON` to restart " "output, :const:`TCIOFF` to suspend input, or :const:`TCION` to restart input." msgstr "" -#: library/termios.rst:91 +#: library/termios.rst:90 msgid "" "Return a tuple ``(ws_row, ws_col)`` containing the tty window size for file " "descriptor *fd*. Requires :const:`termios.TIOCGWINSZ` or :const:`termios." "TIOCGSIZE`." msgstr "" -#: library/termios.rst:100 +#: library/termios.rst:99 msgid "" "Set the tty window size for file descriptor *fd* from *winsize*, which is a " "two-item tuple ``(ws_row, ws_col)`` like the one returned by :func:" @@ -125,19 +125,19 @@ msgid "" "const:`termios.TIOCSSIZE`) to be defined." msgstr "" -#: library/termios.rst:111 +#: library/termios.rst:110 msgid "Module :mod:`tty`" msgstr "" -#: library/termios.rst:112 +#: library/termios.rst:111 msgid "Convenience functions for common terminal control operations." msgstr "" -#: library/termios.rst:118 +#: library/termios.rst:117 msgid "Example" msgstr "" -#: library/termios.rst:120 +#: library/termios.rst:119 msgid "" "Here's a function that prompts for a password with echoing turned off. Note " "the technique using a separate :func:`tcgetattr` call and a :keyword:" @@ -145,7 +145,7 @@ msgid "" "are restored exactly no matter what happens::" msgstr "" -#: library/termios.rst:125 +#: library/termios.rst:124 msgid "" "def getpass(prompt=\"Password: \"):\n" " import termios, sys\n" @@ -161,14 +161,14 @@ msgid "" " return passwd" msgstr "" -#: library/termios.rst:8 +#: library/termios.rst:7 msgid "POSIX" msgstr "" -#: library/termios.rst:8 +#: library/termios.rst:7 msgid "I/O control" msgstr "" -#: library/termios.rst:8 +#: library/termios.rst:7 msgid "tty" msgstr "" diff --git a/library/test.po b/library/test.po index 18708ab6c..baf06445f 100644 --- a/library/test.po +++ b/library/test.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -603,14 +603,20 @@ msgid "" msgstr "" #: library/test.rst:473 +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:479 msgid "Return ``True`` if Python was not built with ``-O0`` or ``-Og``." msgstr "" -#: library/test.rst:478 +#: library/test.rst:484 msgid "Return :const:`_testcapi.WITH_PYMALLOC`." msgstr "" -#: library/test.rst:483 +#: library/test.rst:489 msgid "" "Raise :exc:`ResourceDenied` if *resource* is not available. *msg* is the " "argument to :exc:`ResourceDenied` if it is raised. Always returns ``True`` " @@ -618,88 +624,88 @@ msgid "" "tests are executed by :mod:`test.regrtest`." msgstr "" -#: library/test.rst:491 +#: library/test.rst:497 msgid "Return a repr of *dict* with keys sorted." msgstr "" -#: library/test.rst:496 +#: library/test.rst:502 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:500 +#: library/test.rst:506 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:506 +#: library/test.rst:512 msgid "Get size of a page in bytes." msgstr "" -#: library/test.rst:513 +#: library/test.rst:519 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:519 +#: library/test.rst:525 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:524 +#: library/test.rst:530 msgid "" "check_impl_detail() # Only on CPython (default).\n" "check_impl_detail(jython=True) # Only on Jython.\n" "check_impl_detail(cpython=False) # Everywhere except CPython." msgstr "" -#: library/test.rst:531 +#: library/test.rst:537 msgid "" "Set the values for :data:`max_memuse` and :data:`real_max_memuse` for big " "memory tests." msgstr "" -#: library/test.rst:537 +#: library/test.rst:543 msgid "" "Store the value from *stdout*. It is meant to hold the stdout at the time " "the regrtest began." msgstr "" -#: library/test.rst:543 +#: library/test.rst:549 msgid "" "Return the original stdout set by :func:`record_original_stdout` or ``sys." "stdout`` if it's not set." msgstr "" -#: library/test.rst:549 +#: library/test.rst:555 msgid "" "Return a list of command line arguments reproducing the current settings in " "``sys.flags`` and ``sys.warnoptions``." msgstr "" -#: library/test.rst:555 +#: library/test.rst:561 msgid "" "Return a list of command line arguments reproducing the current optimization " "settings in ``sys.flags``." msgstr "" -#: library/test.rst:563 +#: library/test.rst:569 msgid "" "A context managers that temporarily replaces the named stream with :class:" "`io.StringIO` object." msgstr "" -#: library/test.rst:566 +#: library/test.rst:572 msgid "Example use with output streams::" msgstr "" -#: library/test.rst:568 +#: library/test.rst:574 msgid "" "with captured_stdout() as stdout, captured_stderr() as stderr:\n" " print(\"hello\")\n" @@ -708,11 +714,11 @@ msgid "" "assert stderr.getvalue() == \"error\\n\"" msgstr "" -#: library/test.rst:574 +#: library/test.rst:580 msgid "Example use with input stream::" msgstr "" -#: library/test.rst:576 +#: library/test.rst:582 msgid "" "with captured_stdin() as stdin:\n" " stdin.write('hello\\n')\n" @@ -722,11 +728,11 @@ msgid "" "self.assertEqual(captured, \"hello\")" msgstr "" -#: library/test.rst:586 +#: library/test.rst:592 msgid "A context manager that temporary disables :mod:`faulthandler`." msgstr "" -#: library/test.rst:591 +#: library/test.rst:597 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 " @@ -734,123 +740,123 @@ msgid "" "remain alive for longer than expected." msgstr "" -#: library/test.rst:599 +#: library/test.rst:605 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:605 +#: library/test.rst:611 msgid "Context manager to swap out an attribute with a new object." msgstr "" -#: library/test.rst:625 library/test.rst:1332 +#: library/test.rst:631 library/test.rst:1338 msgid "Usage::" msgstr "" -#: library/test.rst:609 +#: library/test.rst:615 msgid "" "with swap_attr(obj, \"attr\", 5):\n" " ..." msgstr "" -#: library/test.rst:612 +#: library/test.rst:618 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:635 +#: library/test.rst:641 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:623 +#: library/test.rst:629 msgid "Context manager to swap out an item with a new object." msgstr "" -#: library/test.rst:627 +#: library/test.rst:633 msgid "" "with swap_item(obj, \"item\", 5):\n" " ..." msgstr "" -#: library/test.rst:630 +#: library/test.rst:636 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:641 +#: library/test.rst:647 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:650 +#: library/test.rst:656 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:659 +#: library/test.rst:665 msgid "" "Wait until process *pid* completes and check that the process exit code is " "*exitcode*." msgstr "" -#: library/test.rst:662 +#: library/test.rst:668 msgid "" "Raise an :exc:`AssertionError` if the process exit code is not equal to " "*exitcode*." msgstr "" -#: library/test.rst:665 +#: library/test.rst:671 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:674 +#: library/test.rst:680 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:680 +#: library/test.rst:686 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:686 +#: library/test.rst:692 msgid "" "For testcase *test*, assert that the ``sys.getsizeof`` for *o* plus the GC " "header size equals *size*." msgstr "" -#: library/test.rst:692 +#: library/test.rst:698 msgid "" "A decorator to conditionally mark tests with :func:`unittest." "expectedFailure`. Any use of this decorator should have an associated " "comment identifying the relevant tracker issue." msgstr "" -#: library/test.rst:699 +#: library/test.rst:705 msgid "" "A decorator that skips the decorated test on TLS certification validation " "failures." msgstr "" -#: library/test.rst:704 +#: library/test.rst:710 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 " @@ -858,85 +864,85 @@ msgid "" "sequentially, and the first valid locale will be used." msgstr "" -#: library/test.rst:712 +#: library/test.rst:718 msgid "" "A decorator for running a function in a specific timezone, correctly " "resetting it after it has finished." msgstr "" -#: library/test.rst:718 +#: library/test.rst:724 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:724 +#: library/test.rst:730 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:730 +#: library/test.rst:736 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:736 +#: library/test.rst:742 msgid "" "Decorator for skipping tests on the free-threaded build. If the :term:`GIL` " "is disabled, the test is skipped." msgstr "" -#: library/test.rst:742 +#: library/test.rst:748 msgid "Decorator for skipping tests on non-IEEE 754 platforms." msgstr "" -#: library/test.rst:747 +#: library/test.rst:753 msgid "Decorator for skipping tests if :mod:`zlib` doesn't exist." msgstr "" -#: library/test.rst:752 +#: library/test.rst:758 msgid "Decorator for skipping tests if :mod:`gzip` doesn't exist." msgstr "" -#: library/test.rst:757 +#: library/test.rst:763 msgid "Decorator for skipping tests if :mod:`bz2` doesn't exist." msgstr "" -#: library/test.rst:762 +#: library/test.rst:768 msgid "Decorator for skipping tests if :mod:`lzma` doesn't exist." msgstr "" -#: library/test.rst:767 +#: library/test.rst:773 msgid "Decorator for skipping tests if *resource* is not available." msgstr "" -#: library/test.rst:772 +#: library/test.rst:778 msgid "Decorator for only running the test if :data:`HAVE_DOCSTRINGS`." msgstr "" -#: library/test.rst:777 +#: library/test.rst:783 msgid "" "Decorator for only running the test if :ref:`Limited C API ` " "is available." msgstr "" -#: library/test.rst:783 +#: library/test.rst:789 msgid "Decorator for tests only applicable to CPython." msgstr "" -#: library/test.rst:788 +#: library/test.rst:794 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:794 +#: library/test.rst:800 msgid "Decorator to temporarily turn off tracing for the duration of the test." msgstr "" -#: library/test.rst:799 +#: library/test.rst:805 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 " @@ -944,11 +950,11 @@ msgid "" "trace function." msgstr "" -#: library/test.rst:807 +#: library/test.rst:813 msgid "Decorator for bigmem tests." msgstr "" -#: library/test.rst:809 +#: library/test.rst:815 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 " @@ -956,7 +962,7 @@ msgid "" "each, could be decorated with ``@bigmemtest(size=_4G, memuse=2)``." msgstr "" -#: library/test.rst:814 +#: library/test.rst:820 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 " @@ -964,11 +970,11 @@ msgid "" "means the test doesn't support dummy runs when ``-M`` is not specified." msgstr "" -#: library/test.rst:822 +#: library/test.rst:828 msgid "Decorator for tests that fill the address space." msgstr "" -#: library/test.rst:827 +#: library/test.rst:833 msgid "" "Test for syntax errors in *statement* by attempting to compile *statement*. " "*testcase* is the :mod:`unittest` instance for the test. *errtext* is the " @@ -978,44 +984,44 @@ msgid "" "of the exception." msgstr "" -#: library/test.rst:837 +#: library/test.rst:843 msgid "Open *url*. If open fails, raises :exc:`TestFailed`." msgstr "" -#: library/test.rst:842 +#: library/test.rst:848 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:849 +#: library/test.rst:855 msgid "" "Get an attribute, raising :exc:`unittest.SkipTest` if :exc:`AttributeError` " "is raised." msgstr "" -#: library/test.rst:855 +#: library/test.rst:861 msgid "" "Context manager catching unraisable exception using :func:`sys." "unraisablehook`." msgstr "" -#: library/test.rst:858 +#: library/test.rst:864 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:862 +#: library/test.rst:868 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:868 +#: library/test.rst:874 msgid "" "with support.catch_unraisable_exception() as cm:\n" " # code creating an \"unraisable exception\"\n" @@ -1028,7 +1034,7 @@ msgid "" "# (to break a reference cycle)" msgstr "" -#: library/test.rst:883 +#: library/test.rst:889 msgid "" "Generic implementation of the :mod:`unittest` ``load_tests`` protocol for " "use in test packages. *pkg_dir* is the root directory of the package; " @@ -1037,7 +1043,7 @@ msgid "" "the following::" msgstr "" -#: library/test.rst:889 +#: library/test.rst:895 msgid "" "import os\n" "from test.support import load_package_tests\n" @@ -1046,55 +1052,55 @@ msgid "" " return load_package_tests(os.path.dirname(__file__), *args)" msgstr "" -#: library/test.rst:898 +#: library/test.rst:904 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:902 +#: library/test.rst:908 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:910 +#: library/test.rst:916 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:918 +#: library/test.rst:924 msgid "" "Run *code* in subinterpreter. Raise :exc:`unittest.SkipTest` if :mod:" "`tracemalloc` is enabled." msgstr "" -#: library/test.rst:924 +#: library/test.rst:930 msgid "Assert instances of *cls* are deallocated after iterating." msgstr "" -#: library/test.rst:929 +#: library/test.rst:935 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:937 +#: library/test.rst:943 msgid "" "Assert that the ``__all__`` variable of *module* contains all public names." msgstr "" -#: library/test.rst:939 +#: library/test.rst:945 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:943 +#: library/test.rst:949 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 " @@ -1102,7 +1108,7 @@ msgid "" "other modules, possibly a C backend (like ``csv`` and its ``_csv``)." msgstr "" -#: library/test.rst:948 +#: library/test.rst:954 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:" @@ -1110,17 +1116,17 @@ msgid "" "automatically detected ones." msgstr "" -#: library/test.rst:952 +#: library/test.rst:958 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:1582 +#: library/test.rst:1588 msgid "Example use::" msgstr "" -#: library/test.rst:957 +#: library/test.rst:963 msgid "" "import bar\n" "import foo\n" @@ -1140,18 +1146,18 @@ msgid "" " extra=extra, not_exported=not_exported)" msgstr "" -#: library/test.rst:978 +#: library/test.rst:984 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:987 +#: library/test.rst:993 msgid "Assert that type *tp* cannot be instantiated using *args* and *kwds*." msgstr "" -#: library/test.rst:994 +#: library/test.rst:1000 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 " @@ -1159,73 +1165,73 @@ msgid "" "digits when converting between an integer and string." msgstr "" -#: library/test.rst:1002 +#: library/test.rst:1008 msgid "The :mod:`test.support` module defines the following classes:" msgstr "" -#: library/test.rst:1007 +#: library/test.rst:1013 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:1010 +#: library/test.rst:1016 msgid "" "On Windows, it disables Windows Error Reporting dialogs using `SetErrorMode " "`_." msgstr "" -#: library/test.rst:1013 +#: library/test.rst:1019 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:1017 +#: library/test.rst:1023 msgid "" "On both platforms, the old value is restored by :meth:`~object.__exit__`." msgstr "" -#: library/test.rst:1022 +#: library/test.rst:1028 msgid "" "Class to save and restore signal handlers registered by the Python signal " "handler." msgstr "" -#: library/test.rst:1027 +#: library/test.rst:1033 msgid "" "Save the signal handlers to a dictionary mapping signal numbers to the " "current signal handler." msgstr "" -#: library/test.rst:1032 +#: library/test.rst:1038 msgid "" "Set the signal numbers from the :meth:`save` dictionary to the saved handler." msgstr "" -#: library/test.rst:1040 +#: library/test.rst:1046 msgid "Try to match a single dict with the supplied arguments." msgstr "" -#: library/test.rst:1045 +#: library/test.rst:1051 msgid "Try to match a single stored value (*dv*) with a supplied value (*v*)." msgstr "" -#: library/test.rst:1049 +#: library/test.rst:1055 msgid ":mod:`test.support.socket_helper` --- Utilities for socket tests" msgstr "" -#: library/test.rst:1055 +#: library/test.rst:1061 msgid "" "The :mod:`test.support.socket_helper` module provides support for socket " "tests." msgstr "" -#: library/test.rst:1062 +#: library/test.rst:1068 msgid "Set to ``True`` if IPv6 is enabled on this host, ``False`` otherwise." msgstr "" -#: library/test.rst:1067 +#: library/test.rst:1073 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 " @@ -1236,7 +1242,7 @@ msgid "" "port is returned." msgstr "" -#: library/test.rst:1076 +#: library/test.rst:1082 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 " @@ -1249,7 +1255,7 @@ msgid "" "simultaneously, which is a problem for buildbots." msgstr "" -#: library/test.rst:1090 +#: library/test.rst:1096 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 " @@ -1262,7 +1268,7 @@ msgid "" "testing multicasting via multiple UDP sockets." msgstr "" -#: library/test.rst:1101 +#: library/test.rst:1107 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 " @@ -1270,58 +1276,58 @@ msgid "" "test." msgstr "" -#: library/test.rst:1109 +#: library/test.rst:1115 msgid "" "Bind a Unix socket, raising :exc:`unittest.SkipTest` if :exc:" "`PermissionError` is raised." msgstr "" -#: library/test.rst:1115 +#: library/test.rst:1121 msgid "" "A decorator for running tests that require a functional ``bind()`` for Unix " "sockets." msgstr "" -#: library/test.rst:1121 +#: library/test.rst:1127 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:1127 +#: library/test.rst:1133 msgid "" ":mod:`test.support.script_helper` --- Utilities for the Python execution " "tests" msgstr "" -#: library/test.rst:1133 +#: library/test.rst:1139 msgid "" "The :mod:`test.support.script_helper` module provides support for Python's " "script execution tests." msgstr "" -#: library/test.rst:1138 +#: library/test.rst:1144 msgid "" "Return ``True`` if ``sys.executable interpreter`` requires environment " "variables in order to be able to run at all." msgstr "" -#: library/test.rst:1141 +#: library/test.rst:1147 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:1145 +#: library/test.rst:1151 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:1149 +#: library/test.rst:1155 msgid "" "Setting :envvar:`PYTHONHOME` is one way to get most of the testsuite to run " "in that situation. :envvar:`PYTHONPATH` or :envvar:`PYTHONUSERSITE` are " @@ -1329,84 +1335,84 @@ msgid "" "interpreter can start." msgstr "" -#: library/test.rst:1157 +#: library/test.rst:1163 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:1177 library/test.rst:1189 +#: library/test.rst:1183 library/test.rst:1195 msgid "The function no longer strips whitespaces from *stderr*." msgstr "" -#: library/test.rst:1167 +#: library/test.rst:1173 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:1171 +#: library/test.rst:1177 msgid "" "If the *__cleanenv* keyword-only parameter is set, *env_vars* is used as a " "fresh environment." msgstr "" -#: library/test.rst:1174 +#: library/test.rst:1180 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:1183 +#: library/test.rst:1189 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:1187 +#: library/test.rst:1193 msgid "See :func:`assert_python_ok` for more options." msgstr "" -#: library/test.rst:1195 +#: library/test.rst:1201 msgid "Run a Python subprocess with the given arguments." msgstr "" -#: library/test.rst:1197 +#: library/test.rst:1203 msgid "" "*kw* is extra keyword args to pass to :func:`subprocess.Popen`. Returns a :" "class:`subprocess.Popen` object." msgstr "" -#: library/test.rst:1203 +#: library/test.rst:1209 msgid "" "Run the given :class:`subprocess.Popen` process until completion and return " "stdout." msgstr "" -#: library/test.rst:1209 +#: library/test.rst:1215 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:1216 +#: library/test.rst:1222 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:1223 +#: library/test.rst:1229 msgid "" "Create a directory named *pkg_dir* containing an ``__init__`` file with " "*init_source* as its contents." msgstr "" -#: library/test.rst:1230 +#: library/test.rst:1236 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* " @@ -1415,60 +1421,60 @@ msgid "" "path and the archive name for the zip file." msgstr "" -#: library/test.rst:1238 +#: library/test.rst:1244 msgid "" ":mod:`test.support.bytecode_helper` --- Support tools for testing correct " "bytecode generation" msgstr "" -#: library/test.rst:1243 +#: library/test.rst:1249 msgid "" "The :mod:`test.support.bytecode_helper` module provides support for testing " "and inspecting bytecode generation." msgstr "" -#: library/test.rst:1248 +#: library/test.rst:1254 msgid "The module defines the following class:" msgstr "" -#: library/test.rst:1252 +#: library/test.rst:1258 msgid "This class has custom assertion methods for inspecting bytecode." msgstr "" -#: library/test.rst:1256 +#: library/test.rst:1262 msgid "Return the disassembly of *co* as string." msgstr "" -#: library/test.rst:1261 +#: library/test.rst:1267 msgid "" "Return instr if *opname* is found, otherwise throws :exc:`AssertionError`." msgstr "" -#: library/test.rst:1266 +#: library/test.rst:1272 msgid "Throws :exc:`AssertionError` if *opname* is found." msgstr "" -#: library/test.rst:1270 +#: library/test.rst:1276 msgid ":mod:`test.support.threading_helper` --- Utilities for threading tests" msgstr "" -#: library/test.rst:1275 +#: library/test.rst:1281 msgid "" "The :mod:`test.support.threading_helper` module provides support for " "threading tests." msgstr "" -#: library/test.rst:1282 +#: library/test.rst:1288 msgid "" "Join a *thread* within *timeout*. Raise an :exc:`AssertionError` if thread " "is still alive after *timeout* seconds." msgstr "" -#: library/test.rst:1288 +#: library/test.rst:1294 msgid "Decorator to ensure the threads are cleaned up even if the test fails." msgstr "" -#: library/test.rst:1293 +#: library/test.rst:1299 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 " @@ -1476,57 +1482,57 @@ msgid "" "will attempt to join the started threads upon exit." msgstr "" -#: library/test.rst:1301 +#: library/test.rst:1307 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:1307 +#: library/test.rst:1313 msgid "Return current thread count and copy of dangling threads." msgstr "" -#: library/test.rst:1312 +#: library/test.rst:1318 msgid "" "Context manager to wait until all threads created in the ``with`` statement " "exit." msgstr "" -#: library/test.rst:1318 +#: library/test.rst:1324 msgid "" "Context manager catching :class:`threading.Thread` exception using :func:" "`threading.excepthook`." msgstr "" -#: library/test.rst:1321 +#: library/test.rst:1327 msgid "Attributes set when an exception is caught:" msgstr "" -#: library/test.rst:1323 +#: library/test.rst:1329 msgid "``exc_type``" msgstr "" -#: library/test.rst:1324 +#: library/test.rst:1330 msgid "``exc_value``" msgstr "" -#: library/test.rst:1325 +#: library/test.rst:1331 msgid "``exc_traceback``" msgstr "" -#: library/test.rst:1326 +#: library/test.rst:1332 msgid "``thread``" msgstr "" -#: library/test.rst:1328 +#: library/test.rst:1334 msgid "See :func:`threading.excepthook` documentation." msgstr "" -#: library/test.rst:1330 +#: library/test.rst:1336 msgid "These attributes are deleted at the context manager exit." msgstr "" -#: library/test.rst:1334 +#: library/test.rst:1340 msgid "" "with threading_helper.catch_threading_exception() as cm:\n" " # code spawning a thread which raises an exception\n" @@ -1541,29 +1547,29 @@ msgid "" "# (to avoid reference cycles)" msgstr "" -#: library/test.rst:1350 +#: library/test.rst:1356 msgid ":mod:`test.support.os_helper` --- Utilities for os tests" msgstr "" -#: library/test.rst:1355 +#: library/test.rst:1361 msgid "The :mod:`test.support.os_helper` module provides support for os tests." msgstr "" -#: library/test.rst:1362 +#: library/test.rst:1368 msgid "A non-ASCII character encodable by :func:`os.fsencode`." msgstr "" -#: library/test.rst:1367 +#: library/test.rst:1373 msgid "Set to :func:`os.getcwd`." msgstr "" -#: library/test.rst:1372 +#: library/test.rst:1378 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:1378 +#: library/test.rst:1384 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 " @@ -1571,25 +1577,25 @@ msgid "" "a non-ASCII filename to be easily skipped on platforms where they can't work." msgstr "" -#: library/test.rst:1386 +#: library/test.rst:1392 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:1393 +#: library/test.rst:1399 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:1400 +#: library/test.rst:1406 msgid "Set to a non-ASCII name for a temporary file." msgstr "" -#: library/test.rst:1405 +#: library/test.rst:1411 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 " @@ -1598,75 +1604,75 @@ msgid "" "instance will be rolled back." msgstr "" -#: library/test.rst:1411 +#: library/test.rst:1417 msgid "Added dictionary interface." msgstr "" -#: library/test.rst:1417 +#: library/test.rst:1423 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:1425 +#: library/test.rst:1431 msgid "" "Temporarily set the environment variable ``envvar`` to the value of " "``value``." msgstr "" -#: library/test.rst:1431 +#: library/test.rst:1437 msgid "Temporarily unset the environment variable ``envvar``." msgstr "" -#: library/test.rst:1436 +#: library/test.rst:1442 msgid "Return ``True`` if the OS supports symbolic links, ``False`` otherwise." msgstr "" -#: library/test.rst:1442 +#: library/test.rst:1448 msgid "Return ``True`` if the OS supports xattr, ``False`` otherwise." msgstr "" -#: library/test.rst:1448 +#: library/test.rst:1454 msgid "" "A context manager that temporarily changes the current working directory to " "*path* and yields the directory." msgstr "" -#: library/test.rst:1451 +#: library/test.rst:1457 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:1458 +#: library/test.rst:1464 msgid "" "Create an empty file with *filename*. If it already exists, truncate it." msgstr "" -#: library/test.rst:1463 +#: library/test.rst:1469 msgid "Count the number of open file descriptors." msgstr "" -#: library/test.rst:1468 +#: library/test.rst:1474 msgid "Return ``True`` if the file system for *directory* is case-insensitive." msgstr "" -#: library/test.rst:1473 +#: library/test.rst:1479 msgid "" "Create an invalid file descriptor by opening and closing a temporary file, " "and returning its descriptor." msgstr "" -#: library/test.rst:1479 +#: library/test.rst:1485 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:1487 +#: library/test.rst:1493 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 " @@ -1674,21 +1680,21 @@ msgid "" "the files." msgstr "" -#: library/test.rst:1495 +#: library/test.rst:1501 msgid "A decorator for running tests that require support for symbolic links." msgstr "" -#: library/test.rst:1500 +#: library/test.rst:1506 msgid "A decorator for running tests that require support for xattr." msgstr "" -#: library/test.rst:1505 +#: library/test.rst:1511 msgid "" "A context manager that temporarily creates a new directory and changes the " "current working directory (CWD)." msgstr "" -#: library/test.rst:1508 +#: library/test.rst:1514 msgid "" "The context manager creates a temporary directory in the current directory " "with name *name* before temporarily changing the current working directory. " @@ -1696,20 +1702,20 @@ msgid "" "`tempfile.mkdtemp`." msgstr "" -#: library/test.rst:1513 +#: library/test.rst:1519 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:1520 +#: library/test.rst:1526 msgid "" "A context manager that creates a temporary directory at *path* and yields " "the directory." msgstr "" -#: library/test.rst:1523 +#: library/test.rst:1529 msgid "" "If *path* is ``None``, the temporary directory is created using :func:" "`tempfile.mkdtemp`. If *quiet* is ``False``, the context manager raises an " @@ -1717,34 +1723,34 @@ msgid "" "created, only a warning is issued." msgstr "" -#: library/test.rst:1531 +#: library/test.rst:1537 msgid "A context manager that temporarily sets the process umask." msgstr "" -#: library/test.rst:1536 +#: library/test.rst:1542 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:1542 +#: library/test.rst:1548 msgid ":mod:`test.support.import_helper` --- Utilities for import tests" msgstr "" -#: library/test.rst:1547 +#: library/test.rst:1553 msgid "" "The :mod:`test.support.import_helper` module provides support for import " "tests." msgstr "" -#: library/test.rst:1554 +#: library/test.rst:1560 msgid "" "Remove the module named *module_name* from ``sys.modules`` and delete any " "byte-compiled files of the module." msgstr "" -#: library/test.rst:1560 +#: library/test.rst:1566 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 " @@ -1752,39 +1758,39 @@ msgid "" "operation." msgstr "" -#: library/test.rst:1565 +#: library/test.rst:1571 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:1568 +#: library/test.rst:1574 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:1572 +#: library/test.rst:1578 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:1576 +#: library/test.rst:1582 msgid "" "Module and package deprecation messages are suppressed during this import if " "*deprecated* is ``True``." msgstr "" -#: library/test.rst:1579 +#: library/test.rst:1585 msgid "" "This function will raise :exc:`ImportError` if the named module cannot be " "imported." msgstr "" -#: library/test.rst:1584 +#: library/test.rst:1590 msgid "" "# Get copies of the warnings module for testing without affecting the\n" "# version being used by the rest of the test suite. One copy uses the\n" @@ -1794,14 +1800,14 @@ msgid "" "c_warnings = import_fresh_module('warnings', fresh=['_warnings'])" msgstr "" -#: library/test.rst:1596 +#: library/test.rst:1602 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:1600 +#: library/test.rst:1606 msgid "" "Module and package deprecation messages are suppressed during this import if " "*deprecated* is ``True``. If a module is required on a platform but " @@ -1809,21 +1815,21 @@ msgid "" "which will be compared against :data:`sys.platform`." msgstr "" -#: library/test.rst:1610 +#: library/test.rst:1616 msgid "Return a copy of :data:`sys.modules`." msgstr "" -#: library/test.rst:1615 +#: library/test.rst:1621 msgid "" "Remove modules except for *oldmodules* and ``encodings`` in order to " "preserve internal cache." msgstr "" -#: library/test.rst:1621 +#: library/test.rst:1627 msgid "Delete *name* from ``sys.modules``." msgstr "" -#: library/test.rst:1626 +#: library/test.rst:1632 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 " @@ -1831,48 +1837,48 @@ msgid "" "3147/488 pyc file must exist." msgstr "" -#: library/test.rst:1634 +#: library/test.rst:1640 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:1638 +#: library/test.rst:1644 msgid "" "with CleanImport('foo'):\n" " importlib.import_module('foo') # New reference." msgstr "" -#: library/test.rst:1644 +#: library/test.rst:1650 msgid "A context manager to temporarily add directories to :data:`sys.path`." msgstr "" -#: library/test.rst:1646 +#: library/test.rst:1652 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:1650 +#: library/test.rst:1656 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:1656 +#: library/test.rst:1662 msgid ":mod:`test.support.warnings_helper` --- Utilities for warnings tests" msgstr "" -#: library/test.rst:1661 +#: library/test.rst:1667 msgid "" "The :mod:`test.support.warnings_helper` module provides support for warnings " "tests." msgstr "" -#: library/test.rst:1668 +#: library/test.rst:1674 msgid "" "Suppress warnings that are instances of *category*, which must be :exc:" "`Warning` or a subclass. Roughly equivalent to :func:`warnings." @@ -1880,21 +1886,21 @@ msgid "" "category=category) `. For example::" msgstr "" -#: library/test.rst:1674 +#: library/test.rst:1680 msgid "" "@warning_helper.ignore_warnings(category=DeprecationWarning)\n" "def test_suppress_warning():\n" " # do something" msgstr "" -#: library/test.rst:1683 +#: library/test.rst:1689 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:1690 +#: library/test.rst:1696 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 " @@ -1906,7 +1912,7 @@ msgid "" "``None``, compares to the offset of the exception." msgstr "" -#: library/test.rst:1704 +#: library/test.rst:1710 msgid "" "A convenience wrapper for :func:`warnings.catch_warnings` that makes it " "easier to test that a warning was correctly raised. It is approximately " @@ -1915,7 +1921,7 @@ msgid "" "automatically validate the results that are recorded." msgstr "" -#: library/test.rst:1710 +#: library/test.rst:1716 msgid "" "``check_warnings`` accepts 2-tuples of the form ``(\"message regexp\", " "WarningCategory)`` as positional arguments. If one or more *filters* are " @@ -1927,19 +1933,19 @@ msgid "" "*quiet* to ``True``." msgstr "" -#: library/test.rst:1719 +#: library/test.rst:1725 msgid "If no arguments are specified, it defaults to::" msgstr "" -#: library/test.rst:1721 +#: library/test.rst:1727 msgid "check_warnings((\"\", Warning), quiet=True)" msgstr "" -#: library/test.rst:1723 +#: library/test.rst:1729 msgid "In this case all warnings are caught and no errors are raised." msgstr "" -#: library/test.rst:1725 +#: library/test.rst:1731 msgid "" "On entry to the context manager, a :class:`WarningRecorder` instance is " "returned. The underlying warnings list from :func:`~warnings.catch_warnings` " @@ -1951,17 +1957,17 @@ msgid "" "return ``None``." msgstr "" -#: library/test.rst:1734 +#: library/test.rst:1740 msgid "" "The recorder object also has a :meth:`reset` method, which clears the " "warnings list." msgstr "" -#: library/test.rst:1737 +#: library/test.rst:1743 msgid "The context manager is designed to be used like this::" msgstr "" -#: library/test.rst:1739 +#: library/test.rst:1745 msgid "" "with check_warnings((\"assertion is always true\", SyntaxWarning),\n" " (\"\", UserWarning)):\n" @@ -1969,19 +1975,19 @@ msgid "" " warnings.warn(UserWarning(\"Hide me!\"))" msgstr "" -#: library/test.rst:1744 +#: library/test.rst:1750 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:1747 +#: library/test.rst:1753 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:1750 +#: library/test.rst:1756 msgid "" "with check_warnings(quiet=True) as w:\n" " warnings.warn(\"foo\")\n" @@ -1994,17 +2000,17 @@ msgid "" " assert len(w.warnings) == 0" msgstr "" -#: library/test.rst:1761 +#: library/test.rst:1767 msgid "" "Here all warnings will be caught, and the test code tests the captured " "warnings directly." msgstr "" -#: library/test.rst:1764 +#: library/test.rst:1770 msgid "New optional arguments *filters* and *quiet*." msgstr "" -#: library/test.rst:1770 +#: library/test.rst:1776 msgid "" "Class used to record warnings for unit tests. See documentation of :func:" "`check_warnings` above for more details." diff --git a/library/text.po b/library/text.po index 53472d388..b121456b3 100644 --- a/library/text.po +++ b/library/text.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/textwrap.po b/library/textwrap.po index 83ef8a6fa..7ceae3c34 100644 --- a/library/textwrap.po +++ b/library/textwrap.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/threading.po b/library/threading.po index 676704cd2..5fdfdd2a2 100644 --- a/library/threading.po +++ b/library/threading.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -693,8 +693,8 @@ msgstr "" #: library/threading.rst:515 msgid "" -"*group* should be ``None``; reserved for future extension when a :class:`!" -"ThreadGroup` class is implemented." +"*group* must be ``None`` as it is reserved for future extension when a :" +"class:`!ThreadGroup` class is implemented." msgstr "" #: library/threading.rst:518 diff --git a/library/time.po b/library/time.po index 0e450c759..5d037eefe 100644 --- a/library/time.po +++ b/library/time.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/timeit.po b/library/timeit.po index d242505cc..977467947 100644 --- a/library/timeit.po +++ b/library/timeit.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/tk.po b/library/tk.po index 88b50f5ae..b763f0c4f 100644 --- a/library/tk.po +++ b/library/tk.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/library/tkinter.colorchooser.po b/library/tkinter.colorchooser.po index 4eff509d5..3b42acbac 100644 --- a/library/tkinter.colorchooser.po +++ b/library/tkinter.colorchooser.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,11 +21,11 @@ msgstr "" msgid ":mod:`!tkinter.colorchooser` --- Color choosing dialog" msgstr "" -#: library/tkinter.colorchooser.rst:8 +#: library/tkinter.colorchooser.rst:7 msgid "**Source code:** :source:`Lib/tkinter/colorchooser.py`" msgstr "" -#: library/tkinter.colorchooser.rst:12 +#: library/tkinter.colorchooser.rst:11 msgid "" "The :mod:`tkinter.colorchooser` module provides the :class:`Chooser` class " "as an interface to the native color picker dialog. ``Chooser`` implements a " @@ -33,17 +33,33 @@ msgid "" "class:`~tkinter.commondialog.Dialog` class." msgstr "" -#: library/tkinter.colorchooser.rst:21 +#: library/tkinter.colorchooser.rst:18 msgid "" -"Create a color choosing dialog. A call to this method will show the window, " -"wait for the user to make a selection, and return the selected color (or " -"``None``) to the caller." +"The class implementing the modal color-choosing dialog. Most applications " +"use the :func:`askcolor` convenience function rather than instantiating this " +"class directly." msgstr "" -#: library/tkinter.colorchooser.rst:28 +#: library/tkinter.colorchooser.rst:24 +msgid "" +"Show a modal color-choosing dialog and return the chosen color. *color* is " +"the color selected when the dialog opens. The return value is a tuple ``((r, " +"g, b), hexstr)``, where ``r``, ``g`` and ``b`` are the red, green and blue " +"components as integers in the range 0–255 and *hexstr* is the equivalent Tk " +"color string, such as ``'#ff8000'``. If the user cancels the dialog, " +"``(None, None)`` is returned." +msgstr "" + +#: library/tkinter.colorchooser.rst:31 +msgid "" +"The RGB values in the returned color are now integers in the range 0–255 " +"instead of floats." +msgstr "" + +#: library/tkinter.colorchooser.rst:38 msgid "Module :mod:`tkinter.commondialog`" msgstr "" -#: library/tkinter.colorchooser.rst:29 +#: library/tkinter.colorchooser.rst:39 msgid "Tkinter standard dialog module" msgstr "" diff --git a/library/tkinter.dnd.po b/library/tkinter.dnd.po index ce22014c6..5fc9a3de3 100644 --- a/library/tkinter.dnd.po +++ b/library/tkinter.dnd.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,65 +21,66 @@ msgstr "" msgid ":mod:`!tkinter.dnd` --- Drag and drop support" msgstr "" -#: library/tkinter.dnd.rst:8 +#: library/tkinter.dnd.rst:7 msgid "**Source code:** :source:`Lib/tkinter/dnd.py`" msgstr "" -#: library/tkinter.dnd.rst:12 +#: library/tkinter.dnd.rst:11 msgid "" "This is experimental and due to be deprecated when it is replaced with the " "Tk DND." msgstr "" -#: library/tkinter.dnd.rst:15 +#: library/tkinter.dnd.rst:14 msgid "" "The :mod:`tkinter.dnd` module provides drag-and-drop support for objects " "within a single application, within the same window or between windows. To " "enable an object to be dragged, you must create an event binding for it that " "starts the drag-and-drop process. Typically, you bind a ButtonPress event to " "a callback function that you write (see :ref:`Bindings-and-Events`). The " -"function should call :func:`dnd_start`, where 'source' is the object to be " -"dragged, and 'event' is the event that invoked the call (the argument to " +"function should call :func:`dnd_start`, where *source* is the object to be " +"dragged, and *event* is the event that invoked the call (the argument to " "your callback function)." msgstr "" -#: library/tkinter.dnd.rst:23 +#: library/tkinter.dnd.rst:22 msgid "Selection of a target object occurs as follows:" msgstr "" -#: library/tkinter.dnd.rst:25 -msgid "Top-down search of area under mouse for target widget" +#: library/tkinter.dnd.rst:24 +msgid "Top-down search of the area under the mouse for a target widget:" msgstr "" -#: library/tkinter.dnd.rst:27 -msgid "Target widget should have a callable *dnd_accept* attribute" +#: library/tkinter.dnd.rst:26 +msgid "the target widget should have a callable *dnd_accept* attribute;" msgstr "" -#: library/tkinter.dnd.rst:28 +#: library/tkinter.dnd.rst:27 msgid "" -"If *dnd_accept* is not present or returns ``None``, search moves to parent " -"widget" +"if *dnd_accept* is not present or returns ``None``, the search moves to the " +"parent widget;" msgstr "" #: library/tkinter.dnd.rst:29 -msgid "If no target widget is found, then the target object is ``None``" +msgid "if no target widget is found, the target object is ``None``." msgstr "" #: library/tkinter.dnd.rst:31 -msgid "Call to *.dnd_leave(source, event)*" +msgid "Call to ``.dnd_leave(source, event)``." msgstr "" #: library/tkinter.dnd.rst:32 -msgid "Call to *.dnd_enter(source, event)*" +msgid "Call to ``.dnd_enter(source, event)``." msgstr "" #: library/tkinter.dnd.rst:33 -msgid "Call to *.dnd_commit(source, event)* to notify of drop" +msgid "Call to ``.dnd_commit(source, event)`` to notify of the drop." msgstr "" #: library/tkinter.dnd.rst:34 msgid "" -"Call to *.dnd_end(target, event)* to signal end of drag-and-drop" +"Call to ``.dnd_end(target, event)`` to signal the end of drag-and-" +"drop." msgstr "" #: library/tkinter.dnd.rst:39 @@ -97,17 +98,20 @@ msgid "Execute end of drag-and-drop functions." msgstr "" #: library/tkinter.dnd.rst:52 -msgid "Inspect area below mouse for target objects while drag is performed." +msgid "Inspect area below mouse for target objects while a drag is performed." msgstr "" -#: library/tkinter.dnd.rst:56 +#: library/tkinter.dnd.rst:57 msgid "Signal end of drag when the release pattern is triggered." msgstr "" -#: library/tkinter.dnd.rst:60 -msgid "Factory function for drag-and-drop process." +#: library/tkinter.dnd.rst:61 +msgid "" +"Factory function for the drag-and-drop process. Return the :class:" +"`DndHandler` instance managing the drag, or ``None`` if a drag could not be " +"started." msgstr "" -#: library/tkinter.dnd.rst:64 +#: library/tkinter.dnd.rst:67 msgid ":ref:`Bindings-and-Events`" msgstr "" diff --git a/library/tkinter.font.po b/library/tkinter.font.po index 740dbb777..44e579532 100644 --- a/library/tkinter.font.po +++ b/library/tkinter.font.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,21 +21,21 @@ msgstr "" msgid ":mod:`!tkinter.font` --- Tkinter font wrapper" msgstr "" -#: library/tkinter.font.rst:8 +#: library/tkinter.font.rst:7 msgid "**Source code:** :source:`Lib/tkinter/font.py`" msgstr "" -#: library/tkinter.font.rst:12 +#: library/tkinter.font.rst:11 msgid "" "The :mod:`tkinter.font` module provides the :class:`Font` class for creating " "and using named fonts." msgstr "" -#: library/tkinter.font.rst:15 +#: library/tkinter.font.rst:14 msgid "The different font weights and slants are:" msgstr "" -#: library/tkinter.font.rst:24 +#: library/tkinter.font.rst:23 msgid "" "The :class:`Font` class represents a named font. *Font* instances are given " "unique names and can be specified by their family, size, and style " @@ -44,7 +44,13 @@ msgid "" "each occurrence." msgstr "" -#: library/tkinter.font.rst:30 +#: library/tkinter.font.rst:29 +msgid "" +"Two fonts now compare equal (``==``) only when both are :class:`Font` " +"instances with the same name belonging to the same Tcl interpreter." +msgstr "" + +#: library/tkinter.font.rst:33 msgid "arguments:" msgstr "" @@ -60,12 +66,12 @@ msgstr "" msgid "*exists* - self points to existing named font if true" msgstr "" -#: library/tkinter.font.rst:36 +#: library/tkinter.font.rst:39 msgid "additional keyword options (ignored if *font* is specified):" msgstr "" #: library/tkinter.font.rst:0 -msgid "*family* - font family i.e. Courier, Times" +msgid "*family* - font family, for example, Courier, Times" msgstr "" #: library/tkinter.font.rst:0 @@ -100,69 +106,90 @@ msgstr "" msgid "*overstrike* - font strikeout (0 - none, 1 - strikeout)" msgstr "" -#: library/tkinter.font.rst:50 -msgid "Return the attributes of the font." +#: library/tkinter.font.rst:53 +msgid "" +"Return the actual attributes of the font, which may differ from the " +"requested ones because of platform limitations. With no *option*, return a " +"dictionary of all the attributes; if *option* is given, return the value of " +"that single attribute. The attributes are resolved on the display of the " +"*displayof* widget, or the main application window if it is not specified." msgstr "" -#: library/tkinter.font.rst:54 +#: library/tkinter.font.rst:62 msgid "Retrieve an attribute of the font." msgstr "" -#: library/tkinter.font.rst:58 -msgid "Modify attributes of the font." +#: library/tkinter.font.rst:69 +msgid "" +"Modify one or more attributes of the font. With no arguments, return a " +"dictionary of the current attributes." msgstr "" -#: library/tkinter.font.rst:62 -msgid "Return new instance of the current font." +#: library/tkinter.font.rst:72 +msgid ":meth:`config` is an alias of :meth:`!configure`." +msgstr "" + +#: library/tkinter.font.rst:76 +msgid "" +"Return a distinct copy of the current font: a new named font with the same " +"attributes but a different name, which can be reconfigured independently of " +"the original. If the current font wraps a font description, the copy is " +"instead a named font with its resolved attributes." msgstr "" -#: library/tkinter.font.rst:66 +#: library/tkinter.font.rst:84 msgid "" "Return amount of space the text would occupy on the specified display when " -"formatted in the current font. If no display is specified then the main " -"application window is assumed." +"formatted in the current font, as an integer number of pixels. If no display " +"is specified then the main application window is assumed." msgstr "" -#: library/tkinter.font.rst:72 -msgid "Return font-specific data. Options include:" +#: library/tkinter.font.rst:90 +msgid "" +"Return font-specific data. With no options, return a dictionary mapping each " +"metric name to its integer value; if one option name is given, return that " +"metric's value as an integer. Options include:" msgstr "" -#: library/tkinter.font.rst:75 +#: library/tkinter.font.rst:96 msgid "*ascent* - distance between baseline and highest point that a" msgstr "" -#: library/tkinter.font.rst:79 +#: library/tkinter.font.rst:100 msgid "character of the font can occupy" msgstr "" -#: library/tkinter.font.rst:78 +#: library/tkinter.font.rst:99 msgid "*descent* - distance between baseline and lowest point that a" msgstr "" -#: library/tkinter.font.rst:81 +#: library/tkinter.font.rst:102 msgid "*linespace* - minimum vertical separation necessary between any two" msgstr "" -#: library/tkinter.font.rst:82 +#: library/tkinter.font.rst:103 msgid "characters of the font that ensures no vertical overlap between lines." msgstr "" -#: library/tkinter.font.rst:84 +#: library/tkinter.font.rst:105 msgid "*fixed* - 1 if font is fixed-width else 0" msgstr "" -#: library/tkinter.font.rst:88 -msgid "Return the different font families." +#: library/tkinter.font.rst:109 +msgid "Return a tuple of the names of the available font families." msgstr "" -#: library/tkinter.font.rst:92 -msgid "Return the names of defined fonts." +#: library/tkinter.font.rst:113 +msgid "Return a tuple of the names of all the defined fonts." msgstr "" -#: library/tkinter.font.rst:96 -msgid "Return a :class:`Font` representation of a tk named font." +#: library/tkinter.font.rst:117 +msgid "" +"Return a :class:`Font` representation of the existing named font *name*. " +"*root* is the widget whose Tcl interpreter owns the font; if omitted, the " +"default root window is used." msgstr "" -#: library/tkinter.font.rst:98 +#: library/tkinter.font.rst:121 msgid "The *root* parameter was added." msgstr "" diff --git a/library/tkinter.messagebox.po b/library/tkinter.messagebox.po index 1b789930e..8c4621daf 100644 --- a/library/tkinter.messagebox.po +++ b/library/tkinter.messagebox.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,18 +21,19 @@ msgstr "" msgid ":mod:`!tkinter.messagebox` --- Tkinter message prompts" msgstr "" -#: library/tkinter.messagebox.rst:8 +#: library/tkinter.messagebox.rst:7 msgid "**Source code:** :source:`Lib/tkinter/messagebox.py`" msgstr "" -#: library/tkinter.messagebox.rst:12 +#: library/tkinter.messagebox.rst:11 msgid "" -"The :mod:`tkinter.messagebox` module provides a template base class as well " +"The :mod:`!tkinter.messagebox` module provides a template base class as well " "as a variety of convenience methods for commonly used configurations. The " -"message boxes are modal and will return a subset of (``True``, ``False``, " -"``None``, :data:`OK`, :data:`CANCEL`, :data:`YES`, :data:`NO`) based on the " -"user's selection. Common message box styles and layouts include but are not " -"limited to:" +"message boxes are modal: each blocks until the user responds, then returns a " +"value that depends on the function. The ``show*`` functions and :meth:" +"`Message.show` return the symbolic name of the button the user pressed, as a " +"string (such as :data:`OK` or :data:`YES`). Common message box styles and " +"layouts include but are not limited to:" msgstr "" #: library/tkinter.messagebox.rst:23 @@ -132,113 +133,117 @@ msgid "" msgstr "" #: library/tkinter.messagebox.rst:72 +msgid "Tk 8.6 added the *command* option." +msgstr "" + +#: library/tkinter.messagebox.rst:76 msgid "" "Display a message window and wait for the user to select one of the buttons. " "Then return the symbolic name of the selected button. Keyword arguments can " "override options specified in the constructor." msgstr "" -#: library/tkinter.messagebox.rst:76 +#: library/tkinter.messagebox.rst:80 msgid "**Information message box**" msgstr "" -#: library/tkinter.messagebox.rst:80 +#: library/tkinter.messagebox.rst:84 msgid "" "Creates and displays an information message box with the specified title and " "message." msgstr "" -#: library/tkinter.messagebox.rst:83 +#: library/tkinter.messagebox.rst:87 msgid "**Warning message boxes**" msgstr "" -#: library/tkinter.messagebox.rst:87 +#: library/tkinter.messagebox.rst:91 msgid "" "Creates and displays a warning message box with the specified title and " "message." msgstr "" -#: library/tkinter.messagebox.rst:92 +#: library/tkinter.messagebox.rst:96 msgid "" "Creates and displays an error message box with the specified title and " "message." msgstr "" -#: library/tkinter.messagebox.rst:95 +#: library/tkinter.messagebox.rst:99 msgid "**Question message boxes**" msgstr "" -#: library/tkinter.messagebox.rst:99 +#: library/tkinter.messagebox.rst:103 msgid "" "Ask a question. By default shows buttons :data:`YES` and :data:`NO`. Returns " "the symbolic name of the selected button." msgstr "" -#: library/tkinter.messagebox.rst:104 +#: library/tkinter.messagebox.rst:108 msgid "" "Ask if operation should proceed. Shows buttons :data:`OK` and :data:" "`CANCEL`. Returns ``True`` if the answer is ok and ``False`` otherwise." msgstr "" -#: library/tkinter.messagebox.rst:109 +#: library/tkinter.messagebox.rst:113 msgid "" "Ask if operation should be retried. Shows buttons :data:`RETRY` and :data:" -"`CANCEL`. Return ``True`` if the answer is yes and ``False`` otherwise." +"`CANCEL`. Return ``True`` if the answer is retry and ``False`` otherwise." msgstr "" -#: library/tkinter.messagebox.rst:114 +#: library/tkinter.messagebox.rst:118 msgid "" "Ask a question. Shows buttons :data:`YES` and :data:`NO`. Returns ``True`` " "if the answer is yes and ``False`` otherwise." msgstr "" -#: library/tkinter.messagebox.rst:119 +#: library/tkinter.messagebox.rst:123 msgid "" "Ask a question. Shows buttons :data:`YES`, :data:`NO` and :data:`CANCEL`. " "Return ``True`` if the answer is yes, ``None`` if cancelled, and ``False`` " "otherwise." msgstr "" -#: library/tkinter.messagebox.rst:126 +#: library/tkinter.messagebox.rst:130 msgid "Symbolic names of buttons:" msgstr "" -#: library/tkinter.messagebox.rst:145 +#: library/tkinter.messagebox.rst:149 msgid "Predefined sets of buttons:" msgstr "" -#: library/tkinter.messagebox.rst:150 +#: library/tkinter.messagebox.rst:154 msgid "" "Displays three buttons whose symbolic names are :data:`ABORT`, :data:`RETRY` " "and :data:`IGNORE`." msgstr "" -#: library/tkinter.messagebox.rst:157 +#: library/tkinter.messagebox.rst:161 msgid "Displays one button whose symbolic name is :data:`OK`." msgstr "" -#: library/tkinter.messagebox.rst:162 +#: library/tkinter.messagebox.rst:166 msgid "" "Displays two buttons whose symbolic names are :data:`OK` and :data:`CANCEL`." msgstr "" -#: library/tkinter.messagebox.rst:168 +#: library/tkinter.messagebox.rst:172 msgid "" "Displays two buttons whose symbolic names are :data:`RETRY` and :data:" "`CANCEL`." msgstr "" -#: library/tkinter.messagebox.rst:174 +#: library/tkinter.messagebox.rst:178 msgid "" "Displays two buttons whose symbolic names are :data:`YES` and :data:`NO`." msgstr "" -#: library/tkinter.messagebox.rst:180 +#: library/tkinter.messagebox.rst:184 msgid "" "Displays three buttons whose symbolic names are :data:`YES`, :data:`NO` and :" "data:`CANCEL`." msgstr "" -#: library/tkinter.messagebox.rst:185 +#: library/tkinter.messagebox.rst:189 msgid "Icon images:" msgstr "" diff --git a/library/tkinter.po b/library/tkinter.po index 9e83942a2..036e513b3 100644 --- a/library/tkinter.po +++ b/library/tkinter.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -45,12 +45,16 @@ msgstr "" #: library/tkinter.rst:22 msgid "" "Tkinter supports a range of Tcl/Tk versions, built either with or without " -"thread support. The official Python binary release bundles Tcl/Tk 8.6 " -"threaded. See the source code for the :mod:`_tkinter` module for more " -"information about supported versions." +"thread support. Tcl/Tk 8.5.12 is the minimum supported version; the official " +"Python binary release bundles Tcl/Tk 8.6. See the source code for the :mod:" +"`_tkinter` module for more information about supported versions." msgstr "" -#: library/tkinter.rst:27 +#: library/tkinter.rst:29 +msgid "Support for Tcl/Tk versions older than 8.5.12 was removed." +msgstr "" + +#: library/tkinter.rst:32 msgid "" "Tkinter is not a thin wrapper, but adds a fair amount of its own logic to " "make the experience more pythonic. This documentation will concentrate on " @@ -58,105 +62,105 @@ msgid "" "for details that are unchanged." msgstr "" -#: library/tkinter.rst:34 +#: library/tkinter.rst:39 msgid "" "Tcl/Tk 8.5 (2007) introduced a modern set of themed user interface " -"components along with a new API to use them. Both old and new APIs are still " -"available. Most documentation you will find online still uses the old API " -"and can be woefully outdated." +"components along with a new API to use them (see :mod:`tkinter.ttk`). Both " +"old and new APIs are still available. Most documentation you will find " +"online still uses the old API and can be woefully outdated." msgstr "" -#: library/tkinter.rst:41 +#: library/tkinter.rst:47 msgid "`TkDocs `_" msgstr "" -#: library/tkinter.rst:42 +#: library/tkinter.rst:48 msgid "" "Extensive tutorial on creating user interfaces with Tkinter. Explains key " "concepts, and illustrates recommended approaches using the modern API." msgstr "" -#: library/tkinter.rst:45 +#: library/tkinter.rst:51 msgid "" "`Tkinter 8.5 reference: a GUI for Python `_" msgstr "" -#: library/tkinter.rst:46 +#: library/tkinter.rst:52 msgid "" "Reference documentation for Tkinter 8.5 detailing available classes, " "methods, and options." msgstr "" -#: library/tkinter.rst:48 +#: library/tkinter.rst:54 msgid "Tcl/Tk Resources:" msgstr "" -#: library/tkinter.rst:50 -msgid "`Tk commands `_" +#: library/tkinter.rst:56 +msgid "`Tk commands `_" msgstr "" -#: library/tkinter.rst:51 +#: library/tkinter.rst:57 msgid "" "Comprehensive reference to each of the underlying Tcl/Tk commands used by " "Tkinter." msgstr "" -#: library/tkinter.rst:53 +#: library/tkinter.rst:59 msgid "`Tcl/Tk Home Page `_" msgstr "" -#: library/tkinter.rst:54 +#: library/tkinter.rst:60 msgid "Additional documentation, and links to Tcl/Tk core development." msgstr "" -#: library/tkinter.rst:56 +#: library/tkinter.rst:62 msgid "Books:" msgstr "" -#: library/tkinter.rst:58 +#: library/tkinter.rst:64 msgid "" "`Modern Tkinter for Busy Python Developers `_" msgstr "" -#: library/tkinter.rst:59 +#: library/tkinter.rst:65 msgid "By Mark Roseman. (ISBN 978-1999149567)" msgstr "" -#: library/tkinter.rst:61 +#: library/tkinter.rst:67 msgid "" "`Python GUI programming with Tkinter `_" msgstr "" -#: library/tkinter.rst:62 +#: library/tkinter.rst:68 msgid "By Alan D. Moore. (ISBN 978-1788835886)" msgstr "" -#: library/tkinter.rst:64 +#: library/tkinter.rst:70 msgid "`Programming Python `_" msgstr "" -#: library/tkinter.rst:65 +#: library/tkinter.rst:71 msgid "By Mark Lutz; has excellent coverage of Tkinter. (ISBN 978-0596158101)" msgstr "" -#: library/tkinter.rst:67 +#: library/tkinter.rst:73 msgid "" "`Tcl and the Tk Toolkit (2nd edition) `_" msgstr "" -#: library/tkinter.rst:68 +#: library/tkinter.rst:74 msgid "" "By John Ousterhout, inventor of Tcl/Tk, and Ken Jones; does not cover " "Tkinter. (ISBN 978-0321336330)" msgstr "" -#: library/tkinter.rst:72 +#: library/tkinter.rst:78 msgid "Architecture" msgstr "" -#: library/tkinter.rst:74 +#: library/tkinter.rst:80 msgid "" "Tcl/Tk is not a single library but rather consists of a few distinct " "modules, each with separate functionality and its own official " @@ -164,11 +168,11 @@ msgid "" "with it." msgstr "" -#: library/tkinter.rst:79 +#: library/tkinter.rst:85 msgid "Tcl" msgstr "" -#: library/tkinter.rst:80 +#: library/tkinter.rst:86 msgid "" "Tcl is a dynamic interpreted programming language, just like Python. Though " "it can be used on its own as a general-purpose programming language, it is " @@ -182,11 +186,11 @@ msgid "" "difference (see `Threading model`_ for details)." msgstr "" -#: library/tkinter.rst:906 +#: library/tkinter.rst:898 msgid "Tk" msgstr "" -#: library/tkinter.rst:93 +#: library/tkinter.rst:99 msgid "" "Tk is a `Tcl package `_ implemented in C " "that adds custom commands to create and manipulate GUI widgets. Each :class:" @@ -195,11 +199,11 @@ msgid "" "appearance. Tk uses Tcl's event queue to generate and process GUI events." msgstr "" -#: library/tkinter.rst:99 +#: library/tkinter.rst:105 msgid "Ttk" msgstr "" -#: library/tkinter.rst:100 +#: library/tkinter.rst:106 msgid "" "Themed Tk (Ttk) is a newer family of Tk widgets that provide a much better " "appearance on different platforms than many of the classic Tk widgets. Ttk " @@ -207,252 +211,126 @@ msgid "" "are provided in a separate module, :mod:`tkinter.ttk`." msgstr "" -#: library/tkinter.rst:105 +#: library/tkinter.rst:111 msgid "" -"Internally, Tk and Ttk use facilities of the underlying operating system, i." -"e., Xlib on Unix/X11, Cocoa on macOS, GDI on Windows." +"Internally, Tk and Ttk use facilities of the underlying operating system, " +"that is, Xlib on Unix/X11, Cocoa on macOS, GDI on Windows." msgstr "" -#: library/tkinter.rst:108 +#: library/tkinter.rst:114 msgid "" -"When your Python application uses a class in Tkinter, e.g., to create a " -"widget, the :mod:`tkinter` module first assembles a Tcl/Tk command string. " -"It passes that Tcl command string to an internal :mod:`_tkinter` binary " -"module, which then calls the Tcl interpreter to evaluate it. The Tcl " +"When your Python application uses a class in Tkinter, for example, to create " +"a widget, the :mod:`!tkinter` module first assembles a Tcl/Tk command " +"string. It passes that Tcl command string to an internal :mod:`_tkinter` " +"binary module, which then calls the Tcl interpreter to evaluate it. The Tcl " "interpreter will then call into the Tk and/or Ttk packages, which will in " "turn make calls to Xlib, Cocoa, or GDI." msgstr "" -#: library/tkinter.rst:116 -msgid "Tkinter Modules" +#: library/tkinter.rst:122 +msgid "Tkinter modules" msgstr "" -#: library/tkinter.rst:118 +#: library/tkinter.rst:124 msgid "" "Support for Tkinter is spread across several modules. Most applications will " "need the main :mod:`tkinter` module, as well as the :mod:`tkinter.ttk` " "module, which provides the modern themed widget set and API::" msgstr "" -#: library/tkinter.rst:123 +#: library/tkinter.rst:129 msgid "" "from tkinter import *\n" "from tkinter import ttk" msgstr "" -#: library/tkinter.rst:129 -msgid "" -"Construct a toplevel Tk widget, which is usually the main window of an " -"application, and initialize a Tcl interpreter for this widget. Each " -"instance has its own associated Tcl interpreter." -msgstr "" - #: library/tkinter.rst:133 -msgid "" -"The :class:`Tk` class is typically instantiated using all default values. " -"However, the following keyword arguments are currently recognized:" -msgstr "" - -#: library/tkinter.rst:136 -msgid "*screenName*" -msgstr "" - -#: library/tkinter.rst:137 -msgid "" -"When given (as a string), sets the :envvar:`DISPLAY` environment variable. " -"(X11 only)" -msgstr "" - -#: library/tkinter.rst:139 -msgid "*baseName*" -msgstr "" - -#: library/tkinter.rst:140 -msgid "" -"Name of the profile file. By default, *baseName* is derived from the " -"program name (``sys.argv[0]``)." -msgstr "" - -#: library/tkinter.rst:142 -msgid "*className*" -msgstr "" - -#: library/tkinter.rst:143 -msgid "" -"Name of the widget class. Used as a profile file and also as the name with " -"which Tcl is invoked (*argv0* in *interp*)." -msgstr "" - -#: library/tkinter.rst:145 -msgid "*useTk*" -msgstr "" - -#: library/tkinter.rst:146 -msgid "" -"If ``True``, initialize the Tk subsystem. The :func:`tkinter.Tcl() ` " -"function sets this to ``False``." -msgstr "" - -#: library/tkinter.rst:148 -msgid "*sync*" -msgstr "" - -#: library/tkinter.rst:149 -msgid "" -"If ``True``, execute all X server commands synchronously, so that errors are " -"reported immediately. Can be used for debugging. (X11 only)" -msgstr "" - -#: library/tkinter.rst:151 -msgid "*use*" -msgstr "" - -#: library/tkinter.rst:152 -msgid "" -"Specifies the *id* of the window in which to embed the application, instead " -"of it being created as an independent toplevel window. *id* must be " -"specified in the same way as the value for the -use option for toplevel " -"widgets (that is, it has a form like that returned by :meth:`winfo_id`)." -msgstr "" - -#: library/tkinter.rst:158 -msgid "" -"Note that on some platforms this will only work correctly if *id* refers to " -"a Tk frame or toplevel that has its -container option enabled." -msgstr "" - -#: library/tkinter.rst:161 -msgid "" -":class:`Tk` reads and interprets profile files, named :file:`.{className}." -"tcl` and :file:`.{baseName}.tcl`, into the Tcl interpreter and calls :func:" -"`exec` on the contents of :file:`.{className}.py` and :file:`.{baseName}." -"py`. The path for the profile files is the :envvar:`HOME` environment " -"variable or, if that isn't defined, then :data:`os.curdir`." -msgstr "" - -#: library/tkinter.rst:170 -msgid "" -"The Tk application object created by instantiating :class:`Tk`. This " -"provides access to the Tcl interpreter. Each widget that is attached the " -"same instance of :class:`Tk` has the same value for its :attr:`tk` attribute." -msgstr "" - -#: library/tkinter.rst:177 -msgid "" -"The widget object that contains this widget. For :class:`Tk`, the *master* " -"is :const:`None` because it is the main window. The terms *master* and " -"*parent* are similar and sometimes used interchangeably as argument names; " -"however, calling :meth:`winfo_parent` returns a string of the widget name " -"whereas :attr:`master` returns the object. *parent*/*child* reflects the " -"tree-like relationship while *master*/*slave* reflects the container " -"structure." -msgstr "" - -#: library/tkinter.rst:187 -msgid "" -"The immediate descendants of this widget as a :class:`dict` with the child " -"widget names as the keys and the child instance objects as the values." -msgstr "" - -#: library/tkinter.rst:194 -msgid "" -"The :func:`Tcl` function is a factory function which creates an object much " -"like that created by the :class:`Tk` class, except that it does not " -"initialize the Tk subsystem. This is most often useful when driving the Tcl " -"interpreter in an environment where one doesn't want to create extraneous " -"toplevel windows, or where one cannot (such as Unix/Linux systems without an " -"X server). An object created by the :func:`Tcl` object can have a Toplevel " -"window created (and the Tk subsystem initialized) by calling its :meth:" -"`loadtk` method." -msgstr "" - -#: library/tkinter.rst:203 msgid "The modules that provide Tk support include:" msgstr "" -#: library/tkinter.rst:205 +#: library/tkinter.rst:135 msgid ":mod:`tkinter`" msgstr "" -#: library/tkinter.rst:206 +#: library/tkinter.rst:136 msgid "Main Tkinter module." msgstr "" -#: library/tkinter.rst:208 +#: library/tkinter.rst:138 msgid ":mod:`tkinter.colorchooser`" msgstr "" -#: library/tkinter.rst:209 +#: library/tkinter.rst:139 msgid "Dialog to let the user choose a color." msgstr "" -#: library/tkinter.rst:211 +#: library/tkinter.rst:141 msgid ":mod:`tkinter.commondialog`" msgstr "" -#: library/tkinter.rst:212 +#: library/tkinter.rst:142 msgid "Base class for the dialogs defined in the other modules listed here." msgstr "" -#: library/tkinter.rst:214 +#: library/tkinter.rst:144 msgid ":mod:`tkinter.filedialog`" msgstr "" -#: library/tkinter.rst:215 +#: library/tkinter.rst:145 msgid "Common dialogs to allow the user to specify a file to open or save." msgstr "" -#: library/tkinter.rst:217 +#: library/tkinter.rst:147 msgid ":mod:`tkinter.font`" msgstr "" -#: library/tkinter.rst:218 +#: library/tkinter.rst:148 msgid "Utilities to help work with fonts." msgstr "" -#: library/tkinter.rst:220 +#: library/tkinter.rst:150 msgid ":mod:`tkinter.messagebox`" msgstr "" -#: library/tkinter.rst:221 +#: library/tkinter.rst:151 msgid "Access to standard Tk dialog boxes." msgstr "" -#: library/tkinter.rst:223 +#: library/tkinter.rst:153 msgid ":mod:`tkinter.scrolledtext`" msgstr "" -#: library/tkinter.rst:224 +#: library/tkinter.rst:154 msgid "Text widget with a vertical scroll bar built in." msgstr "" -#: library/tkinter.rst:226 +#: library/tkinter.rst:156 msgid ":mod:`tkinter.simpledialog`" msgstr "" -#: library/tkinter.rst:227 +#: library/tkinter.rst:157 msgid "Basic dialogs and convenience functions." msgstr "" -#: library/tkinter.rst:229 +#: library/tkinter.rst:159 msgid ":mod:`tkinter.ttk`" msgstr "" -#: library/tkinter.rst:230 +#: library/tkinter.rst:160 msgid "" "Themed widget set introduced in Tk 8.5, providing modern alternatives for " "many of the classic widgets in the main :mod:`tkinter` module." msgstr "" -#: library/tkinter.rst:233 +#: library/tkinter.rst:163 msgid "Additional modules:" msgstr "" -#: library/tkinter.rst:238 +#: library/tkinter.rst:168 msgid ":mod:`_tkinter`" msgstr "" -#: library/tkinter.rst:239 +#: library/tkinter.rst:169 msgid "" "A binary module that contains the low-level interface to Tcl/Tk. It is " "automatically imported by the main :mod:`tkinter` module, and should never " @@ -461,50 +339,50 @@ msgid "" "interpreter." msgstr "" -#: library/tkinter.rst:245 +#: library/tkinter.rst:175 msgid ":mod:`idlelib`" msgstr "" -#: library/tkinter.rst:246 +#: library/tkinter.rst:176 msgid "" "Python's Integrated Development and Learning Environment (IDLE). Based on :" "mod:`tkinter`." msgstr "" -#: library/tkinter.rst:249 -msgid ":mod:`tkinter.constants`" +#: library/tkinter.rst:179 +msgid ":mod:`!tkinter.constants`" msgstr "" -#: library/tkinter.rst:250 +#: library/tkinter.rst:180 msgid "" "Symbolic constants that can be used in place of strings when passing various " "parameters to Tkinter calls. Automatically imported by the main :mod:" "`tkinter` module." msgstr "" -#: library/tkinter.rst:254 +#: library/tkinter.rst:184 msgid ":mod:`tkinter.dnd`" msgstr "" -#: library/tkinter.rst:255 +#: library/tkinter.rst:185 msgid "" "(experimental) Drag-and-drop support for :mod:`tkinter`. This will become " "deprecated when it is replaced with the Tk DND." msgstr "" -#: library/tkinter.rst:258 +#: library/tkinter.rst:188 msgid ":mod:`turtle`" msgstr "" -#: library/tkinter.rst:259 +#: library/tkinter.rst:189 msgid "Turtle graphics in a Tk window." msgstr "" -#: library/tkinter.rst:263 -msgid "Tkinter Life Preserver" +#: library/tkinter.rst:195 +msgid "Tkinter life preserver" msgstr "" -#: library/tkinter.rst:265 +#: library/tkinter.rst:197 msgid "" "This section is not designed to be an exhaustive tutorial on either Tk or " "Tkinter. For that, refer to one of the external resources noted earlier. " @@ -513,7 +391,7 @@ msgid "" "how the Tkinter wrapper is structured." msgstr "" -#: library/tkinter.rst:271 +#: library/tkinter.rst:203 msgid "" "The remainder of this section will help you to identify the classes, " "methods, and options you'll need in your Tkinter application, and where to " @@ -521,18 +399,18 @@ msgid "" "reference manual." msgstr "" -#: library/tkinter.rst:278 -msgid "A Hello World Program" +#: library/tkinter.rst:210 +msgid "A Hello World program" msgstr "" -#: library/tkinter.rst:280 +#: library/tkinter.rst:212 msgid "" "We'll start by walking through a \"Hello World\" application in Tkinter. " "This isn't the smallest one we could write, but has enough to illustrate " "some key concepts you'll need to know." msgstr "" -#: library/tkinter.rst:286 +#: library/tkinter.rst:218 msgid "" "from tkinter import *\n" "from tkinter import ttk\n" @@ -544,7 +422,7 @@ msgid "" "root.mainloop()" msgstr "" -#: library/tkinter.rst:296 +#: library/tkinter.rst:228 msgid "" "After the imports, the next line creates an instance of the :class:`Tk` " "class, which initializes Tk and creates its associated Tcl interpreter. It " @@ -552,56 +430,56 @@ msgid "" "the main window of the application." msgstr "" -#: library/tkinter.rst:301 +#: library/tkinter.rst:233 msgid "" "The following line creates a frame widget, which in this case will contain a " "label and a button we'll create next. The frame is fit inside the root " "window." msgstr "" -#: library/tkinter.rst:305 +#: library/tkinter.rst:237 msgid "" "The next line creates a label widget holding a static text string. The :meth:" -"`grid` method is used to specify the relative layout (position) of the label " -"within its containing frame widget, similar to how tables in HTML work." +"`~Grid.grid` method is used to specify the relative layout (position) of the " +"label within its containing frame widget, similar to how tables in HTML work." msgstr "" -#: library/tkinter.rst:309 +#: library/tkinter.rst:242 msgid "" "A button widget is then created, and placed to the right of the label. When " -"pressed, it will call the :meth:`destroy` method of the root window." +"pressed, it will call the :meth:`~Misc.destroy` method of the root window." msgstr "" -#: library/tkinter.rst:312 +#: library/tkinter.rst:245 msgid "" "Finally, the :meth:`mainloop` method puts everything on the display, and " "responds to user input until the program terminates." msgstr "" -#: library/tkinter.rst:318 -msgid "Important Tk Concepts" +#: library/tkinter.rst:251 +msgid "Important Tk concepts" msgstr "" -#: library/tkinter.rst:320 +#: library/tkinter.rst:253 msgid "Even this simple program illustrates the following key Tk concepts:" msgstr "" -#: library/tkinter.rst:322 +#: library/tkinter.rst:255 msgid "widgets" msgstr "" -#: library/tkinter.rst:323 +#: library/tkinter.rst:256 msgid "" "A Tkinter user interface is made up of individual *widgets*. Each widget is " "represented as a Python object, instantiated from classes like :class:`ttk." "Frame`, :class:`ttk.Label`, and :class:`ttk.Button`." msgstr "" -#: library/tkinter.rst:327 +#: library/tkinter.rst:260 msgid "widget hierarchy" msgstr "" -#: library/tkinter.rst:328 +#: library/tkinter.rst:261 msgid "" "Widgets are arranged in a *hierarchy*. The label and button were contained " "within a frame, which in turn was contained within the root window. When " @@ -609,44 +487,44 @@ msgid "" "argument to the widget constructor." msgstr "" -#: library/tkinter.rst:333 +#: library/tkinter.rst:266 msgid "configuration options" msgstr "" -#: library/tkinter.rst:334 +#: library/tkinter.rst:267 msgid "" "Widgets have *configuration options*, which modify their appearance and " "behavior, such as the text to display in a label or button. Different " "classes of widgets will have different sets of options." msgstr "" -#: library/tkinter.rst:338 +#: library/tkinter.rst:271 msgid "geometry management" msgstr "" -#: library/tkinter.rst:339 +#: library/tkinter.rst:272 msgid "" "Widgets aren't automatically added to the user interface when they are " "created. A *geometry manager* like ``grid`` controls where in the user " "interface they are placed." msgstr "" -#: library/tkinter.rst:343 +#: library/tkinter.rst:276 msgid "event loop" msgstr "" -#: library/tkinter.rst:344 +#: library/tkinter.rst:277 msgid "" "Tkinter reacts to user input, changes from your program, and even refreshes " "the display only when actively running an *event loop*. If your program " "isn't running the event loop, your user interface won't update." msgstr "" -#: library/tkinter.rst:350 -msgid "Understanding How Tkinter Wraps Tcl/Tk" +#: library/tkinter.rst:283 +msgid "Understanding how Tkinter wraps Tcl/Tk" msgstr "" -#: library/tkinter.rst:352 +#: library/tkinter.rst:285 msgid "" "When your application uses Tkinter's classes and methods, internally Tkinter " "is assembling strings representing Tcl/Tk commands, and executing those " @@ -654,7 +532,7 @@ msgid "" "instance." msgstr "" -#: library/tkinter.rst:357 +#: library/tkinter.rst:290 msgid "" "Whether it's trying to navigate reference documentation, trying to find the " "right method or option, adapting some existing code, or debugging your " @@ -662,13 +540,13 @@ msgid "" "what those underlying Tcl/Tk commands look like." msgstr "" -#: library/tkinter.rst:362 +#: library/tkinter.rst:295 msgid "" "To illustrate, here is the Tcl/Tk equivalent of the main part of the Tkinter " "script above." msgstr "" -#: library/tkinter.rst:367 +#: library/tkinter.rst:300 msgid "" "ttk::frame .frm -padding 10\n" "grid .frm\n" @@ -677,7 +555,7 @@ msgid "" "row 0" msgstr "" -#: library/tkinter.rst:373 +#: library/tkinter.rst:306 msgid "" "Tcl's syntax is similar to many shell languages, where the first word is the " "command to be executed, with arguments to that command following it, " @@ -685,25 +563,25 @@ msgid "" "following:" msgstr "" -#: library/tkinter.rst:377 +#: library/tkinter.rst:310 msgid "" "The commands used to create widgets (like ``ttk::frame``) correspond to " "widget classes in Tkinter." msgstr "" -#: library/tkinter.rst:380 +#: library/tkinter.rst:313 msgid "" "Tcl widget options (like ``-text``) correspond to keyword arguments in " "Tkinter." msgstr "" -#: library/tkinter.rst:383 +#: library/tkinter.rst:316 msgid "" "Widgets are referred to by a *pathname* in Tcl (like ``.frm.btn``), whereas " "Tkinter doesn't use names but object references." msgstr "" -#: library/tkinter.rst:386 +#: library/tkinter.rst:319 msgid "" "A widget's place in the widget hierarchy is encoded in its (hierarchical) " "pathname, which uses a ``.`` (dot) as a path separator. The pathname for the " @@ -711,7 +589,7 @@ msgid "" "pathname but by specifying the parent widget when creating each child widget." msgstr "" -#: library/tkinter.rst:392 +#: library/tkinter.rst:325 msgid "" "Operations which are implemented as separate *commands* in Tcl (like " "``grid`` or ``destroy``) are represented as *methods* on Tkinter widget " @@ -720,18 +598,18 @@ msgid "" "Tkinter." msgstr "" -#: library/tkinter.rst:400 +#: library/tkinter.rst:333 msgid "How do I...? What option does...?" msgstr "" -#: library/tkinter.rst:402 +#: library/tkinter.rst:335 msgid "" "If you're not sure how to do something in Tkinter, and you can't immediately " "find it in the tutorial or reference documentation you're using, there are a " "few strategies that can be helpful." msgstr "" -#: library/tkinter.rst:406 +#: library/tkinter.rst:339 msgid "" "First, remember that the details of how individual widgets work may vary " "across different versions of both Tkinter and Tcl/Tk. If you're searching " @@ -739,7 +617,7 @@ msgid "" "installed on your system." msgstr "" -#: library/tkinter.rst:411 +#: library/tkinter.rst:344 msgid "" "When searching for how to use an API, it helps to know the exact name of the " "class, option, or method that you're using. Introspection, either in an " @@ -747,21 +625,21 @@ msgid "" "you need." msgstr "" -#: library/tkinter.rst:416 +#: library/tkinter.rst:349 msgid "" "To find out what configuration options are available on any widget, call " -"its :meth:`configure` method, which returns a dictionary containing a " +"its :meth:`~Misc.configure` method, which returns a dictionary containing a " "variety of information about each object, including its default and current " -"values. Use :meth:`keys` to get just the names of each option." +"values. Use :meth:`~Misc.keys` to get just the names of each option." msgstr "" -#: library/tkinter.rst:423 +#: library/tkinter.rst:356 msgid "" "btn = ttk.Button(frm, ...)\n" "print(btn.configure().keys())" msgstr "" -#: library/tkinter.rst:426 +#: library/tkinter.rst:359 msgid "" "As most widgets have many configuration options in common, it can be useful " "to find out which are specific to a particular widget class. Comparing the " @@ -769,11 +647,11 @@ msgid "" "that." msgstr "" -#: library/tkinter.rst:433 +#: library/tkinter.rst:366 msgid "print(set(btn.configure().keys()) - set(frm.configure().keys()))" msgstr "" -#: library/tkinter.rst:435 +#: library/tkinter.rst:368 msgid "" "Similarly, you can find the available methods for a widget object using the " "standard :func:`dir` function. If you try it, you'll see there are over 200 " @@ -781,40 +659,40 @@ msgid "" "is helpful." msgstr "" -#: library/tkinter.rst:442 +#: library/tkinter.rst:375 msgid "" "print(dir(btn))\n" "print(set(dir(btn)) - set(dir(frm)))" msgstr "" -#: library/tkinter.rst:447 -msgid "Navigating the Tcl/Tk Reference Manual" +#: library/tkinter.rst:380 +msgid "Navigating the Tcl/Tk reference manual" msgstr "" -#: library/tkinter.rst:449 +#: library/tkinter.rst:382 msgid "" -"As noted, the official `Tk commands `_ reference manual (man pages) is often the most accurate " +"As noted, the official `Tk commands `_ reference manual (man pages) is often the most accurate " "description of what specific operations on widgets do. Even when you know " "the name of the option or method that you need, you may still have a few " "places to look." msgstr "" -#: library/tkinter.rst:454 +#: library/tkinter.rst:389 msgid "" "While all operations in Tkinter are implemented as method calls on widget " "objects, you've seen that many Tcl/Tk operations appear as commands that " "take a widget pathname as its first parameter, followed by optional " -"parameters, e.g." +"parameters, for example" msgstr "" -#: library/tkinter.rst:461 +#: library/tkinter.rst:396 msgid "" "destroy .\n" "grid .frm.btn -column 0 -row 0" msgstr "" -#: library/tkinter.rst:464 +#: library/tkinter.rst:399 msgid "" "Others, however, look more like methods called on a widget object (in fact, " "when you create a widget in Tcl/Tk, it creates a Tcl command with the name " @@ -822,39 +700,40 @@ msgid "" "name of a method to call)." msgstr "" -#: library/tkinter.rst:471 +#: library/tkinter.rst:406 msgid "" ".frm.btn invoke\n" ".frm.lbl configure -text \"Goodbye\"" msgstr "" -#: library/tkinter.rst:475 +#: library/tkinter.rst:410 msgid "" "In the official Tcl/Tk reference documentation, you'll find most operations " -"that look like method calls on the man page for a specific widget (e.g., " -"you'll find the :meth:`invoke` method on the `ttk::button `_ man page), while functions that take a " -"widget as a parameter often have their own man page (e.g., `grid `_)." +"that look like method calls on the man page for a specific widget (for " +"example, you'll find the :meth:`~tkinter.ttk.Button.invoke` method on the " +"`ttk::button `_ " +"man page), while functions that take a widget as a parameter often have " +"their own man page (for example, `grid `_)." msgstr "" -#: library/tkinter.rst:483 +#: library/tkinter.rst:418 msgid "" -"You'll find many common options and methods in the `options `_ or `ttk::widget `_ man pages, while others are found in the man " -"page for a specific widget class." +"You'll find many common options and methods in the `options `_ or `ttk::widget `_ man pages, while others are " +"found in the man page for a specific widget class." msgstr "" -#: library/tkinter.rst:488 +#: library/tkinter.rst:423 msgid "" -"You'll also find that many Tkinter methods have compound names, e.g., :func:" -"`winfo_x`, :func:`winfo_height`, :func:`winfo_viewable`. You'd find " -"documentation for all of these in the `winfo `_ man page." +"You'll also find that many Tkinter methods have compound names, for " +"example, :meth:`~Misc.winfo_x`, :meth:`~Misc.winfo_height`, :meth:`~Misc." +"winfo_viewable`. You'd find documentation for all of these in the `winfo " +"`_ man page." msgstr "" -#: library/tkinter.rst:494 +#: library/tkinter.rst:430 msgid "" "Somewhat confusingly, there are also methods on all Tkinter widgets that " "don't actually operate on the widget, but operate at a global scope, " @@ -863,17 +742,17 @@ msgid "" "class:`Widget` class that all Tkinter widgets inherit from)." msgstr "" -#: library/tkinter.rst:503 +#: library/tkinter.rst:439 msgid "Threading model" msgstr "" -#: library/tkinter.rst:505 +#: library/tkinter.rst:441 msgid "" "Python and Tcl/Tk have very different threading models, which :mod:`tkinter` " "tries to bridge. If you use threads, you may need to be aware of this." msgstr "" -#: library/tkinter.rst:508 +#: library/tkinter.rst:444 msgid "" "A Python interpreter may have many threads associated with it. In Tcl, " "multiple threads can be created, but each thread has a separate Tcl " @@ -882,7 +761,7 @@ msgid "" "by the one thread that created it." msgstr "" -#: library/tkinter.rst:513 +#: library/tkinter.rst:449 msgid "" "Each :class:`Tk` object created by :mod:`tkinter` contains a Tcl " "interpreter. It also keeps track of which thread created that interpreter. " @@ -892,39 +771,41 @@ msgid "" "executed, the result is returned to the calling Python thread." msgstr "" -#: library/tkinter.rst:520 +#: library/tkinter.rst:456 msgid "" "Tcl/Tk applications are normally event-driven, meaning that after " -"initialization, the interpreter runs an event loop (i.e. :func:`Tk." -"mainloop`) and responds to events. Because it is single-threaded, event " -"handlers must respond quickly, otherwise they will block other events from " -"being processed. To avoid this, any long-running computations should not run " -"in an event handler, but are either broken into smaller pieces using timers, " -"or run in another thread. This is different from many GUI toolkits where the " -"GUI runs in a completely separate thread from all application code including " -"event handlers." +"initialization, the interpreter runs an event loop (that is, :meth:`Tk." +"mainloop `) and responds to events. Because it is single-" +"threaded, event handlers must respond quickly, otherwise they will block " +"other events from being processed. To avoid this, any long-running " +"computations should not run in an event handler, but are either broken into " +"smaller pieces using timers, or run in another thread. This is different " +"from many GUI toolkits where the GUI runs in a completely separate thread " +"from all application code including event handlers." msgstr "" -#: library/tkinter.rst:529 +#: library/tkinter.rst:467 msgid "" "If the Tcl interpreter is not running the event loop and processing events, " "any :mod:`tkinter` calls made from threads other than the one running the " "Tcl interpreter will fail." msgstr "" -#: library/tkinter.rst:533 +#: library/tkinter.rst:471 msgid "A number of special cases exist:" msgstr "" -#: library/tkinter.rst:535 +#: library/tkinter.rst:473 msgid "" -"Tcl/Tk libraries can be built so they are not thread-aware. In this case, :" -"mod:`tkinter` calls the library from the originating Python thread, even if " -"this is different than the thread that created the Tcl interpreter. A global " -"lock ensures only one call occurs at a time." +"Tcl/Tk libraries built without thread support are now rare: the bundled Tcl/" +"Tk 8.6 is built with thread support, so this case only arises with some " +"older non-threaded builds. When the library is not thread-aware, :mod:`!" +"tkinter` calls the library from the originating Python thread, even if this " +"is different than the thread that created the Tcl interpreter. A global lock " +"ensures only one call occurs at a time." msgstr "" -#: library/tkinter.rst:540 +#: library/tkinter.rst:480 msgid "" "While :mod:`tkinter` allows you to create more than one instance of a :class:" "`Tk` object (with its own interpreter), all interpreters that are part of " @@ -934,7 +815,7 @@ msgid "" "running a thread-aware Tcl/Tk build." msgstr "" -#: library/tkinter.rst:546 +#: library/tkinter.rst:486 msgid "" "Blocking event handlers are not the only way to prevent the Tcl interpreter " "from reentering the event loop. It is even possible to run multiple nested " @@ -942,61 +823,71 @@ msgid "" "tricky when it comes to events or threads, be aware of these possibilities." msgstr "" -#: library/tkinter.rst:551 +#: library/tkinter.rst:491 msgid "" "There are a few select :mod:`tkinter` functions that presently work only " "when called from the thread that created the Tcl interpreter." msgstr "" -#: library/tkinter.rst:556 -msgid "Handy Reference" +#: library/tkinter.rst:496 +msgid "Handy reference" msgstr "" -#: library/tkinter.rst:562 -msgid "Setting Options" +#: library/tkinter.rst:502 +msgid "Setting options" msgstr "" -#: library/tkinter.rst:564 +#: library/tkinter.rst:504 msgid "" "Options control things like the color and border width of a widget. Options " "can be set in three ways:" msgstr "" -#: library/tkinter.rst:567 +#: library/tkinter.rst:507 msgid "At object creation time, using keyword arguments" msgstr "" -#: library/tkinter.rst:570 +#: library/tkinter.rst:510 msgid "fred = Button(self, fg=\"red\", bg=\"blue\")" msgstr "" -#: library/tkinter.rst:572 +#: library/tkinter.rst:512 msgid "After object creation, treating the option name like a dictionary index" msgstr "" -#: library/tkinter.rst:575 +#: library/tkinter.rst:515 msgid "" "fred[\"fg\"] = \"red\"\n" "fred[\"bg\"] = \"blue\"" msgstr "" -#: library/tkinter.rst:578 +#: library/tkinter.rst:518 msgid "" "Use the config() method to update multiple attrs subsequent to object " "creation" msgstr "" -#: library/tkinter.rst:581 +#: library/tkinter.rst:521 msgid "fred.config(fg=\"red\", bg=\"blue\")" msgstr "" -#: library/tkinter.rst:583 +#: library/tkinter.rst:525 +msgid "" +"The ``fg`` and ``bg`` options used here, and other options that control a " +"widget's appearance, belong to the classic :mod:`!tkinter` widgets. The " +"themed :mod:`tkinter.ttk` widgets recommended in the introduction do not " +"accept them; style a themed widget through the :class:`ttk.Style ` class instead. The three ways of setting an option shown above " +"apply to both widget sets." +msgstr "" + +#: library/tkinter.rst:534 msgid "" "For a complete explanation of a given option and its behavior, see the Tk " "man pages for the widget in question." msgstr "" -#: library/tkinter.rst:586 +#: library/tkinter.rst:537 msgid "" "Note that the man pages list \"STANDARD OPTIONS\" and \"WIDGET SPECIFIC " "OPTIONS\" for each widget. The former is a list of options that are common " @@ -1005,7 +896,7 @@ msgid "" "`options(3)` man page." msgstr "" -#: library/tkinter.rst:592 +#: library/tkinter.rst:543 msgid "" "No distinction between standard and widget-specific options is made in this " "document. Some options don't apply to some kinds of widgets. Whether a " @@ -1013,414 +904,418 @@ msgid "" "widget; buttons have a ``command`` option, labels do not." msgstr "" -#: library/tkinter.rst:597 +#: library/tkinter.rst:548 msgid "" "The options supported by a given widget are listed in that widget's man " -"page, or can be queried at runtime by calling the :meth:`config` method " -"without arguments, or by calling the :meth:`keys` method on that widget. " -"The return value of these calls is a dictionary whose key is the name of the " -"option as a string (for example, ``'relief'``) and whose values are 5-tuples." +"page, or can be queried at runtime by calling the :meth:`~Misc.config` " +"method without arguments, or by calling the :meth:`~Misc.keys` method on " +"that widget. The return value of these calls is a dictionary whose key is " +"the name of the option as a string (for example, ``'relief'``) and whose " +"values are 5-tuples." msgstr "" -#: library/tkinter.rst:603 +#: library/tkinter.rst:554 msgid "" -"Some options, like ``bg`` are synonyms for common options with long names " -"(``bg`` is shorthand for \"background\"). Passing the ``config()`` method " -"the name of a shorthand option will return a 2-tuple, not 5-tuple. The 2-" -"tuple passed back will contain the name of the synonym and the \"real\" " -"option (such as ``('bg', 'background')``)." +"Some options, like ``bg``, are synonyms for common options with long names " +"(``bg`` is shorthand for \"background\")." msgstr "" -#: library/tkinter.rst:610 +#: library/tkinter.rst:558 msgid "Index" msgstr "" -#: library/tkinter.rst:610 +#: library/tkinter.rst:558 msgid "Meaning" msgstr "" -#: library/tkinter.rst:610 +#: library/tkinter.rst:558 msgid "Example" msgstr "" -#: library/tkinter.rst:612 +#: library/tkinter.rst:560 msgid "0" msgstr "" -#: library/tkinter.rst:612 +#: library/tkinter.rst:560 msgid "option name" msgstr "" -#: library/tkinter.rst:614 +#: library/tkinter.rst:562 msgid "``'relief'``" msgstr "" -#: library/tkinter.rst:614 +#: library/tkinter.rst:562 msgid "1" msgstr "" -#: library/tkinter.rst:614 +#: library/tkinter.rst:562 msgid "option name for database lookup" msgstr "" -#: library/tkinter.rst:616 +#: library/tkinter.rst:564 msgid "2" msgstr "" -#: library/tkinter.rst:616 +#: library/tkinter.rst:564 msgid "option class for database lookup" msgstr "" -#: library/tkinter.rst:616 +#: library/tkinter.rst:564 msgid "``'Relief'``" msgstr "" -#: library/tkinter.rst:619 +#: library/tkinter.rst:567 msgid "3" msgstr "" -#: library/tkinter.rst:619 +#: library/tkinter.rst:567 msgid "default value" msgstr "" -#: library/tkinter.rst:619 +#: library/tkinter.rst:567 msgid "``'raised'``" msgstr "" -#: library/tkinter.rst:621 +#: library/tkinter.rst:569 msgid "4" msgstr "" -#: library/tkinter.rst:621 +#: library/tkinter.rst:569 msgid "current value" msgstr "" -#: library/tkinter.rst:621 +#: library/tkinter.rst:569 msgid "``'groove'``" msgstr "" -#: library/tkinter.rst:624 +#: library/tkinter.rst:572 msgid "Example::" msgstr "" -#: library/tkinter.rst:626 +#: library/tkinter.rst:574 msgid "" ">>> print(fred.config())\n" "{'relief': ('relief', 'relief', 'Relief', 'raised', 'groove')}" msgstr "" -#: library/tkinter.rst:629 +#: library/tkinter.rst:577 msgid "" "Of course, the dictionary printed will include all the options available and " "their values. This is meant only as an example." msgstr "" -#: library/tkinter.rst:634 -msgid "The Packer" +#: library/tkinter.rst:587 +msgid "Geometry management" msgstr "" -#: library/tkinter.rst:638 +#: library/tkinter.rst:593 msgid "" -"The packer is one of Tk's geometry-management mechanisms. Geometry " -"managers are used to specify the relative positioning of widgets within " -"their container - their mutual *master*. In contrast to the more cumbersome " -"*placer* (which is used less commonly, and we do not cover here), the packer " -"takes qualitative relationship specification - *above*, *to the left of*, " -"*filling*, etc - and works everything out to determine the exact placement " -"coordinates for you." +"Creating a widget does not display it. A widget appears only after it has " +"been handed to a *geometry manager*, which works out its size and position " +"inside its container and keeps the layout up to date as the container is " +"resized or its content changes. Forgetting to call a geometry manager is a " +"common early mistake: the widget is created, but nothing shows up." msgstr "" -#: library/tkinter.rst:645 +#: library/tkinter.rst:600 msgid "" -"The size of any *master* widget is determined by the size of the \"slave " -"widgets\" inside. The packer is used to control where slave widgets appear " -"inside the master into which they are packed. You can pack widgets into " -"frames, and frames into other frames, in order to achieve the kind of layout " -"you desire. Additionally, the arrangement is dynamically adjusted to " -"accommodate incremental changes to the configuration, once it is packed." +"Tk provides three geometry managers. Each is inherited by every widget, so " +"any widget can be managed by any of them (but see the warning below about " +"the incompatibility of grid and pack). The choice depends on the kind of " +"layout you want." msgstr "" -#: library/tkinter.rst:652 -msgid "" -"Note that widgets do not appear until they have had their geometry specified " -"with a geometry manager. It's a common early mistake to leave out the " -"geometry specification, and then be surprised when the widget is created but " -"nothing appears. A widget will appear only after it has had, for example, " -"the packer's :meth:`pack` method applied to it." +#: library/tkinter.rst:605 +msgid ":meth:`grid `" msgstr "" -#: library/tkinter.rst:658 +#: library/tkinter.rst:606 msgid "" -"The pack() method can be called with keyword-option/value pairs that control " -"where the widget is to appear within its container, and how it is to behave " -"when the main application window is resized. Here are some examples::" +"Arranges widgets in a two-dimensional table of rows and columns. It is the " +"most flexible manager and the one to reach for by default: layouts that " +"would otherwise need several nested frames can often be expressed as a " +"single grid, and rows and columns can be told how to absorb extra space." msgstr "" -#: library/tkinter.rst:662 +#: library/tkinter.rst:614 msgid "" -"fred.pack() # defaults to side = \"top\"\n" -"fred.pack(side=\"left\")\n" -"fred.pack(expand=1)" +"ttk.Label(frm, text=\"Name:\").grid(column=0, row=0, sticky=\"w\")\n" +"ttk.Entry(frm).grid(column=1, row=0)\n" +"ttk.Button(frm, text=\"OK\").grid(column=1, row=1, sticky=\"e\")" msgstr "" -#: library/tkinter.rst:668 -msgid "Packer Options" +#: library/tkinter.rst:618 +msgid ":meth:`pack `" msgstr "" -#: library/tkinter.rst:670 +#: library/tkinter.rst:619 msgid "" -"For more extensive information on the packer and the options that it can " -"take, see the man pages and page 183 of John Ousterhout's book." -msgstr "" - -#: library/tkinter.rst:792 -msgid "anchor" +"Stacks widgets against one side of their container -- ``\"top\"`` (the " +"default), ``\"bottom\"``, ``\"left\"`` or ``\"right\"`` -- and can make them " +"fill or expand into the space that is left. It is convenient for simple " +"arrangements, such as a single row or column of widgets or a content area " +"framed by a toolbar and a status bar." msgstr "" -#: library/tkinter.rst:674 +#: library/tkinter.rst:628 msgid "" -"Anchor type. Denotes where the packer is to place each slave in its parcel." -msgstr "" - -#: library/tkinter.rst:676 -msgid "expand" -msgstr "" - -#: library/tkinter.rst:677 -msgid "Boolean, ``0`` or ``1``." -msgstr "" - -#: library/tkinter.rst:679 -msgid "fill" +"toolbar.pack(side=\"top\", fill=\"x\")\n" +"status.pack(side=\"bottom\", fill=\"x\")\n" +"body.pack(side=\"left\", expand=True, fill=\"both\")" msgstr "" -#: library/tkinter.rst:680 -msgid "Legal values: ``'x'``, ``'y'``, ``'both'``, ``'none'``." +#: library/tkinter.rst:632 +msgid ":meth:`place `" msgstr "" -#: library/tkinter.rst:682 -msgid "ipadx and ipady" +#: library/tkinter.rst:633 +msgid "" +"Positions each widget at an explicit spot, given either as absolute screen " +"distances or as a fraction of the container's size. It offers the most " +"control but the least automatic behavior, and is used the least; it suits " +"special cases such as overlapping widgets or precise custom layouts." msgstr "" -#: library/tkinter.rst:683 +#: library/tkinter.rst:640 msgid "" -"A distance - designating internal padding on each side of the slave widget." +"background.place(x=0, y=0, relwidth=1.0, relheight=1.0)\n" +"badge.place(relx=1.0, rely=0.0, anchor=\"ne\")" msgstr "" -#: library/tkinter.rst:685 -msgid "padx and pady" +#: library/tkinter.rst:643 +msgid "" +"Layouts are built up by nesting: grid or pack widgets, including frames, " +"inside a frame or toplevel. Toplevels are managed by the OS window manager. " +"Classic and themed :mod:`tkinter.ttk` widgets can be managed interchangeably." msgstr "" -#: library/tkinter.rst:686 +#: library/tkinter.rst:650 msgid "" -"A distance - designating external padding on each side of the slave widget." +"Do not apply :meth:`!pack` and :meth:`!grid` to two widgets that share the " +"same container. The two managers negotiate sizes in incompatible ways, and " +"the application can hang as they repeatedly resize the container against " +"each other. To combine them, keep each manager's widgets in a separate frame." msgstr "" -#: library/tkinter.rst:688 -msgid "side" +#: library/tkinter.rst:655 +msgid "" +"The full set of options accepted by each manager, with their values and " +"defaults, is documented under :meth:`Grid.grid_configure`, :meth:`Pack." +"pack_configure` and :meth:`Place.place_configure`; see also the :manpage:" +"`grid(3tk)`, :manpage:`pack(3tk)` and :manpage:`place(3tk)` man pages." msgstr "" -#: library/tkinter.rst:689 -msgid "Legal values are: ``'left'``, ``'right'``, ``'top'``, ``'bottom'``." +#: library/tkinter.rst:665 +msgid "Coupling widget variables" msgstr "" -#: library/tkinter.rst:693 -msgid "Coupling Widget Variables" +#: library/tkinter.rst:667 +msgid "" +"Some widgets can tie their current value directly to a program variable, so " +"that the two stay in sync. Options such as ``variable``, ``textvariable``, " +"``value``, ``onvalue`` and ``offvalue`` set up this connection: when the " +"user changes the widget the variable is updated, and when the variable is " +"set the widget redraws to match." msgstr "" -#: library/tkinter.rst:695 +#: library/tkinter.rst:674 msgid "" -"The current-value setting of some widgets (like text entry widgets) can be " -"connected directly to application variables by using special options. These " -"options are ``variable``, ``textvariable``, ``onvalue``, ``offvalue``, and " -"``value``. This connection works both ways: if the variable changes for any " -"reason, the widget it's connected to will be updated to reflect the new " -"value." +"A widget can be linked only to a :class:`Variable` object, not to an " +"ordinary Python variable. This is not a limitation of :mod:`!tkinter` but a " +"consequence of how the two languages differ: the link relies on Tcl being " +"notified every time the value changes, and Python offers no way to react " +"when a plain variable is reassigned. A :class:`Variable` sidesteps this by " +"keeping its value inside the Tcl interpreter and exposing it through " +"explicit :meth:`~Variable.get` and :meth:`~Variable.set` methods." msgstr "" -#: library/tkinter.rst:701 +#: library/tkinter.rst:683 msgid "" -"Unfortunately, in the current implementation of :mod:`tkinter` it is not " -"possible to hand over an arbitrary Python variable to a widget through a " -"``variable`` or ``textvariable`` option. The only kinds of variables for " -"which this works are variables that are subclassed from a class called " -"Variable, defined in :mod:`tkinter`." +"Ready-made subclasses cover the common types: :class:`StringVar`, :class:" +"`IntVar`, :class:`DoubleVar` and :class:`BooleanVar`. Pass one as a widget's " +"``textvariable`` (or ``variable``) option, then read and update it with :" +"meth:`~Variable.get` and :meth:`~Variable.set`; the widget tracks it with no " +"further work on your part." msgstr "" -#: library/tkinter.rst:707 +#: library/tkinter.rst:689 msgid "" -"There are many useful subclasses of Variable already defined: :class:" -"`StringVar`, :class:`IntVar`, :class:`DoubleVar`, and :class:`BooleanVar`. " -"To read the current value of such a variable, call the :meth:`get` method on " -"it, and to change its value you call the :meth:`!set` method. If you follow " -"this protocol, the widget will always track the value of the variable, with " -"no further intervention on your part." +"Keep a reference to the variable for as long as the widget uses it -- for " +"example by storing it as an attribute. A :class:`Variable` that is garbage " +"collected removes its underlying Tcl variable, breaking the connection to " +"the widget (see :class:`Variable`)." msgstr "" -#: library/tkinter.rst:893 +#: library/tkinter.rst:744 library/tkinter.rst:885 msgid "For example::" msgstr "" -#: library/tkinter.rst:716 +#: library/tkinter.rst:696 msgid "" "import tkinter as tk\n" +"from tkinter import ttk\n" +"\n" +"root = tk.Tk()\n" "\n" -"class App(tk.Frame):\n" -" def __init__(self, master):\n" -" super().__init__(master)\n" -" self.pack()\n" +"# Create the application variable and give it an initial value.\n" +"contents = tk.StringVar(value=\"this is a variable\")\n" "\n" -" self.entrythingy = tk.Entry()\n" -" self.entrythingy.pack()\n" +"# Tell the entry widget to track the variable.\n" +"entry = ttk.Entry(root, textvariable=contents)\n" +"entry.pack()\n" "\n" -" # Create the application variable.\n" -" self.contents = tk.StringVar()\n" -" # Set it to some value.\n" -" self.contents.set(\"this is a variable\")\n" -" # Tell the entry widget to watch this variable.\n" -" self.entrythingy[\"textvariable\"] = self.contents\n" +"# Print the current value whenever the user presses Return.\n" +"def print_contents(event):\n" +" print(\"The current entry content is:\", contents.get())\n" "\n" -" # Define a callback for when the user hits return.\n" -" # It prints the current value of the variable.\n" -" self.entrythingy.bind('',\n" -" self.print_contents)\n" +"entry.bind(\"\", print_contents)\n" "\n" -" def print_contents(self, event):\n" -" print(\"Hi. The current entry content is:\",\n" -" self.contents.get())\n" +"# Setting the variable from the program updates the entry through the\n" +"# same link.\n" +"def clear():\n" +" contents.set(\"\")\n" "\n" -"root = tk.Tk()\n" -"myapp = App(root)\n" -"myapp.mainloop()" +"ttk.Button(root, text=\"Clear\", command=clear).pack()\n" +"\n" +"root.mainloop()" msgstr "" -#: library/tkinter.rst:747 -msgid "The Window Manager" +#: library/tkinter.rst:726 +msgid "The window manager" msgstr "" -#: library/tkinter.rst:751 +#: library/tkinter.rst:730 msgid "" -"In Tk, there is a utility command, ``wm``, for interacting with the window " -"manager. Options to the ``wm`` command allow you to control things like " -"titles, placement, icon bitmaps, and the like. In :mod:`tkinter`, these " -"commands have been implemented as methods on the :class:`Wm` class. " -"Toplevel widgets are subclassed from the :class:`Wm` class, and so can call " -"the :class:`Wm` methods directly." +"The *window manager* is the part of the desktop responsible for the title " +"bar, border and controls drawn around each top-level window, and for such " +"things as its title, position, size and icon. Tk gives access to these " +"through the :class:`Wm` mixin, which is inherited by the :class:`Tk` root " +"window and by every :class:`Toplevel`. You therefore call the window-manager " +"methods directly on a top-level window. Each has a short name and an " +"equivalent ``wm_``-prefixed name, for example :meth:`~Wm.title` and :meth:" +"`~Wm.wm_title`." msgstr "" -#: library/tkinter.rst:758 +#: library/tkinter.rst:739 msgid "" -"To get at the toplevel window that contains a given widget, you can often " -"just refer to the widget's master. Of course if the widget has been packed " -"inside of a frame, the master won't represent a toplevel window. To get at " -"the toplevel window that contains an arbitrary widget, you can call the :" -"meth:`_root` method. This method begins with an underscore to denote the " -"fact that this function is part of the implementation, and not an interface " -"to Tk functionality." -msgstr "" - -#: library/tkinter.rst:765 -msgid "Here are some examples of typical usage::" +"These methods act on the top-level window whether its content is built from " +"the classic widgets or the themed :mod:`tkinter.ttk` widgets. To reach the " +"top-level window containing an arbitrary widget, call its :meth:`~Misc." +"winfo_toplevel` method." msgstr "" -#: library/tkinter.rst:767 +#: library/tkinter.rst:746 msgid "" "import tkinter as tk\n" +"from tkinter import ttk\n" "\n" -"class App(tk.Frame):\n" -" def __init__(self, master=None):\n" -" super().__init__(master)\n" -" self.pack()\n" -"\n" -"# create the application\n" -"myapp = App()\n" +"root = tk.Tk()\n" +"root.title(\"My Application\")\n" +"root.geometry(\"640x480\")\n" +"root.minsize(320, 240)\n" "\n" -"#\n" -"# here are method calls to the window manager class\n" -"#\n" -"myapp.master.title(\"My Do-Nothing Application\")\n" -"myapp.master.maxsize(1000, 400)\n" +"ttk.Label(root, text=\"Hello\").pack(padx=20, pady=20)\n" "\n" -"# start the program\n" -"myapp.mainloop()" +"root.mainloop()" msgstr "" -#: library/tkinter.rst:790 -msgid "Tk Option Data Types" +#: library/tkinter.rst:758 +msgid "See :class:`Wm` for the full set of window-manager methods." msgstr "" -#: library/tkinter.rst:793 +#: library/tkinter.rst:764 +msgid "Tk option data types" +msgstr "" + +#: library/tkinter.rst:768 +msgid "" +"Many widget options documented in the reference accept values of a small " +"number of common types, described here." +msgstr "" + +#: library/tkinter.rst:771 +msgid "anchor" +msgstr "" + +#: library/tkinter.rst:772 msgid "" "Legal values are points of the compass: ``\"n\"``, ``\"ne\"``, ``\"e\"``, " "``\"se\"``, ``\"s\"``, ``\"sw\"``, ``\"w\"``, ``\"nw\"``, and also " "``\"center\"``." msgstr "" -#: library/tkinter.rst:796 +#: library/tkinter.rst:775 msgid "bitmap" msgstr "" -#: library/tkinter.rst:797 +#: library/tkinter.rst:776 msgid "" -"There are eight built-in, named bitmaps: ``'error'``, ``'gray25'``, " -"``'gray50'``, ``'hourglass'``, ``'info'``, ``'questhead'``, ``'question'``, " -"``'warning'``. To specify an X bitmap filename, give the full path to the " -"file, preceded with an ``@``, as in ``\"@/usr/contrib/bitmap/gumby.bit\"``." +"There are ten built-in, named bitmaps: ``'error'``, ``'gray12'``, " +"``'gray25'``, ``'gray50'``, ``'gray75'``, ``'hourglass'``, ``'info'``, " +"``'questhead'``, ``'question'``, ``'warning'``. To specify an X bitmap " +"filename, give the full path to the file, preceded with an ``@``, as in " +"``\"@/usr/contrib/bitmap/gumby.bit\"``." msgstr "" -#: library/tkinter.rst:802 +#: library/tkinter.rst:782 msgid "boolean" msgstr "" -#: library/tkinter.rst:803 +#: library/tkinter.rst:783 msgid "You can pass integers 0 or 1 or the strings ``\"yes\"`` or ``\"no\"``." msgstr "" -#: library/tkinter.rst:805 +#: library/tkinter.rst:785 msgid "callback" msgstr "" -#: library/tkinter.rst:806 +#: library/tkinter.rst:786 msgid "This is any Python function that takes no arguments. For example::" msgstr "" -#: library/tkinter.rst:808 +#: library/tkinter.rst:788 msgid "" "def print_it():\n" " print(\"hi there\")\n" "fred[\"command\"] = print_it" msgstr "" -#: library/tkinter.rst:812 +#: library/tkinter.rst:792 msgid "color" msgstr "" -#: library/tkinter.rst:813 +#: library/tkinter.rst:793 msgid "" "Colors can be given as the names of X colors in the rgb.txt file, or as " "strings representing RGB values in 4 bit: ``\"#RGB\"``, 8 bit: " "``\"#RRGGBB\"``, 12 bit: ``\"#RRRGGGBBB\"``, or 16 bit: " "``\"#RRRRGGGGBBBB\"`` ranges, where R,G,B here represent any legal hex " -"digit. See page 160 of Ousterhout's book for details." +"digit. See the :manpage:`colors(3tk)` man page for the list of named colors." msgstr "" -#: library/tkinter.rst:818 +#: library/tkinter.rst:799 msgid "cursor" msgstr "" -#: library/tkinter.rst:819 +#: library/tkinter.rst:800 msgid "" -"The standard X cursor names from :file:`cursorfont.h` can be used, without " -"the ``XC_`` prefix. For example to get a hand cursor (:const:`XC_hand2`), " -"use the string ``\"hand2\"``. You can also specify a bitmap and mask file " -"of your own. See page 179 of Ousterhout's book." +"The name of the mouse cursor to display while the pointer is over the " +"widget. Tk provides a portable set of cursor names available on all " +"platforms (for example ``\"arrow\"``, ``\"watch\"``, ``\"cross\"``, or " +"``\"hand2\"``); the standard X cursor names from :file:`cursorfont.h` may " +"also be used, without the ``XC_`` prefix (so ``XC_hand2`` becomes " +"``\"hand2\"``). The full list of names, including the platform-specific " +"ones, is given in the :manpage:`cursors(3tk)` manual page. You can also " +"specify a bitmap and mask file of your own. On Windows a cursor file (:file:" +"`.cur` or :file:`.ani`) may be used directly, giving its path preceded with " +"an ``@``, as in ``\"@C:/cursors/bart.ani\"``." msgstr "" -#: library/tkinter.rst:824 +#: library/tkinter.rst:811 msgid "distance" msgstr "" -#: library/tkinter.rst:825 +#: library/tkinter.rst:812 msgid "" "Screen distances can be specified in either pixels or absolute distances. " "Pixels are given as numbers and absolute distances as strings, with the " @@ -1429,124 +1324,128 @@ msgid "" "is expressed as ``\"3.5i\"``." msgstr "" -#: library/tkinter.rst:831 +#: library/tkinter.rst:818 msgid "font" msgstr "" -#: library/tkinter.rst:832 +#: library/tkinter.rst:819 msgid "" -"Tk uses a list font name format, such as ``{courier 10 bold}``. Font sizes " -"with positive numbers are measured in points; sizes with negative numbers " -"are measured in pixels." +"Tk uses a font description such as ``{courier 10 bold}``; in :mod:`!tkinter` " +"this is most naturally passed as a tuple of ``(family, size, *styles)`` (or " +"as the equivalent string ``\"Courier 10 bold\"``). Font sizes with positive " +"numbers are measured in points; sizes with negative numbers are measured in " +"pixels." msgstr "" -#: library/tkinter.rst:836 +#: library/tkinter.rst:825 msgid "geometry" msgstr "" -#: library/tkinter.rst:837 +#: library/tkinter.rst:826 msgid "" "This is a string of the form ``widthxheight``, where width and height are " "measured in pixels for most widgets (in characters for widgets displaying " "text). For example: ``fred[\"geometry\"] = \"200x100\"``." msgstr "" -#: library/tkinter.rst:841 +#: library/tkinter.rst:830 msgid "justify" msgstr "" -#: library/tkinter.rst:842 +#: library/tkinter.rst:831 msgid "" "Legal values are the strings: ``\"left\"``, ``\"center\"``, and " "``\"right\"``." msgstr "" -#: library/tkinter.rst:844 +#: library/tkinter.rst:833 msgid "region" msgstr "" -#: library/tkinter.rst:845 +#: library/tkinter.rst:834 msgid "" "This is a string with four space-delimited elements, each of which is a " "legal distance (see above). For example: ``\"2 3 4 5\"`` and ``\"3i 2i 4.5i " "2i\"`` and ``\"3c 2c 4c 10.43c\"`` are all legal regions." msgstr "" -#: library/tkinter.rst:849 +#: library/tkinter.rst:838 msgid "relief" msgstr "" -#: library/tkinter.rst:850 +#: library/tkinter.rst:839 msgid "" "Determines what the border style of a widget will be. Legal values are: " -"``\"raised\"``, ``\"sunken\"``, ``\"flat\"``, ``\"groove\"``, and " -"``\"ridge\"``." +"``\"raised\"``, ``\"sunken\"``, ``\"flat\"``, ``\"groove\"``, ``\"ridge\"``, " +"and ``\"solid\"``." msgstr "" -#: library/tkinter.rst:853 +#: library/tkinter.rst:843 msgid "scrollcommand" msgstr "" -#: library/tkinter.rst:854 +#: library/tkinter.rst:844 msgid "" "This is almost always the :meth:`!set` method of some scrollbar widget, but " "can be any widget method that takes a single argument." msgstr "" -#: library/tkinter.rst:857 +#: library/tkinter.rst:847 msgid "wrap" msgstr "" -#: library/tkinter.rst:858 +#: library/tkinter.rst:848 msgid "Must be one of: ``\"none\"``, ``\"char\"``, or ``\"word\"``." msgstr "" -#: library/tkinter.rst:863 -msgid "Bindings and Events" +#: library/tkinter.rst:853 +msgid "Bindings and events" msgstr "" -#: library/tkinter.rst:869 +#: library/tkinter.rst:859 msgid "" "The bind method from the widget command allows you to watch for certain " "events and to have a callback function trigger when that event type occurs. " "The form of the bind method is::" msgstr "" -#: library/tkinter.rst:873 +#: library/tkinter.rst:863 msgid "def bind(self, sequence, func, add=''):" msgstr "" -#: library/tkinter.rst:875 +#: library/tkinter.rst:865 msgid "where:" msgstr "" -#: library/tkinter.rst:877 +#: library/tkinter.rst:867 msgid "sequence" msgstr "" -#: library/tkinter.rst:878 +#: library/tkinter.rst:868 msgid "" -"is a string that denotes the target kind of event. (See the :manpage:" -"`bind(3tk)` man page, and page 201 of John Ousterhout's book, :title-" -"reference:`Tcl and the Tk Toolkit (2nd edition)`, for details)." +"is a string that denotes the target kind of event. Physical events use the " +"```` form (for example ``\"\"`` or " +"``\"\"``); application-defined virtual events use double " +"angle brackets, as in ``\"<>\"``. (See the :manpage:`bind(3tk)` man " +"page for details.)" msgstr "" -#: library/tkinter.rst:882 +#: library/tkinter.rst:874 msgid "func" msgstr "" -#: library/tkinter.rst:883 +#: library/tkinter.rst:875 msgid "" "is a Python function, taking one argument, to be invoked when the event " "occurs. An Event instance will be passed as the argument. (Functions " "deployed this way are commonly known as *callbacks*.)" msgstr "" -#: library/tkinter.rst:887 +#: library/tkinter.rst:879 msgid "add" msgstr "" -#: library/tkinter.rst:888 +#: library/tkinter.rst:880 msgid "" "is optional, either ``''`` or ``'+'``. Passing an empty string denotes that " "this binding is to replace any other bindings that this event is associated " @@ -1554,7 +1453,7 @@ msgid "" "of functions bound to this event type." msgstr "" -#: library/tkinter.rst:895 +#: library/tkinter.rst:887 msgid "" "def turn_red(self, event):\n" " event.widget[\"activeforeground\"] = \"red\"\n" @@ -1562,7 +1461,7 @@ msgid "" "self.button.bind(\"\", self.turn_red)" msgstr "" -#: library/tkinter.rst:900 +#: library/tkinter.rst:892 msgid "" "Notice how the widget field of the event is being accessed in the " "``turn_red()`` callback. This field contains the widget that caught the X " @@ -1571,209 +1470,296 @@ msgid "" "pages." msgstr "" -#: library/tkinter.rst:906 +#: library/tkinter.rst:898 msgid "Tkinter Event Field" msgstr "" -#: library/tkinter.rst:908 +#: library/tkinter.rst:900 msgid "%f" msgstr "" -#: library/tkinter.rst:908 +#: library/tkinter.rst:900 msgid "focus" msgstr "" -#: library/tkinter.rst:908 +#: library/tkinter.rst:900 msgid "%A" msgstr "" -#: library/tkinter.rst:908 +#: library/tkinter.rst:900 msgid "char" msgstr "" -#: library/tkinter.rst:910 +#: library/tkinter.rst:902 msgid "%h" msgstr "" -#: library/tkinter.rst:910 +#: library/tkinter.rst:902 msgid "height" msgstr "" -#: library/tkinter.rst:910 +#: library/tkinter.rst:902 msgid "%E" msgstr "" -#: library/tkinter.rst:910 +#: library/tkinter.rst:902 msgid "send_event" msgstr "" -#: library/tkinter.rst:912 +#: library/tkinter.rst:904 msgid "%k" msgstr "" -#: library/tkinter.rst:912 +#: library/tkinter.rst:904 msgid "keycode" msgstr "" -#: library/tkinter.rst:912 +#: library/tkinter.rst:904 msgid "%K" msgstr "" -#: library/tkinter.rst:912 +#: library/tkinter.rst:904 msgid "keysym" msgstr "" -#: library/tkinter.rst:914 +#: library/tkinter.rst:906 msgid "%s" msgstr "" -#: library/tkinter.rst:914 +#: library/tkinter.rst:906 msgid "state" msgstr "" -#: library/tkinter.rst:914 +#: library/tkinter.rst:906 msgid "%N" msgstr "" -#: library/tkinter.rst:914 +#: library/tkinter.rst:906 msgid "keysym_num" msgstr "" -#: library/tkinter.rst:916 +#: library/tkinter.rst:908 msgid "%t" msgstr "" -#: library/tkinter.rst:916 +#: library/tkinter.rst:908 msgid "time" msgstr "" -#: library/tkinter.rst:916 +#: library/tkinter.rst:908 msgid "%T" msgstr "" -#: library/tkinter.rst:916 +#: library/tkinter.rst:908 msgid "type" msgstr "" -#: library/tkinter.rst:918 +#: library/tkinter.rst:910 msgid "%w" msgstr "" -#: library/tkinter.rst:918 +#: library/tkinter.rst:910 msgid "width" msgstr "" -#: library/tkinter.rst:918 +#: library/tkinter.rst:910 msgid "%W" msgstr "" -#: library/tkinter.rst:918 +#: library/tkinter.rst:910 msgid "widget" msgstr "" -#: library/tkinter.rst:920 +#: library/tkinter.rst:912 msgid "%x" msgstr "" -#: library/tkinter.rst:920 +#: library/tkinter.rst:912 msgid "x" msgstr "" -#: library/tkinter.rst:920 +#: library/tkinter.rst:912 msgid "%X" msgstr "" -#: library/tkinter.rst:920 +#: library/tkinter.rst:912 msgid "x_root" msgstr "" -#: library/tkinter.rst:922 +#: library/tkinter.rst:914 msgid "%y" msgstr "" -#: library/tkinter.rst:922 +#: library/tkinter.rst:914 msgid "y" msgstr "" -#: library/tkinter.rst:922 +#: library/tkinter.rst:914 msgid "%Y" msgstr "" -#: library/tkinter.rst:922 +#: library/tkinter.rst:914 msgid "y_root" msgstr "" -#: library/tkinter.rst:927 -msgid "The index Parameter" +#: library/tkinter.rst:916 +msgid "%#" +msgstr "" + +#: library/tkinter.rst:916 +msgid "serial" +msgstr "" + +#: library/tkinter.rst:916 +msgid "%b" +msgstr "" + +#: library/tkinter.rst:916 +msgid "num" +msgstr "" + +#: library/tkinter.rst:918 +msgid "%d" +msgstr "" + +#: library/tkinter.rst:918 +msgid "detail" +msgstr "" + +#: library/tkinter.rst:918 +msgid "%D" +msgstr "" + +#: library/tkinter.rst:918 +msgid "delta" +msgstr "" + +#: library/tkinter.rst:921 +msgid "" +"The ``add`` parameter above only affects the bindings you make yourself. " +"Every widget also inherits *class bindings* that implement its standard " +"behavior -- for example a :class:`Text` widget binds :kbd:`Control-t` to " +"transpose two characters. These are described in the bindings section of the " +"widget's Tk man page (such as :manpage:`text(3tk)` or :manpage:`entry(3tk)`)." msgstr "" #: library/tkinter.rst:929 msgid "" +"Class bindings are processed separately from your own, so binding an event " +"yourself does not replace the default; both run. To suppress an unwanted " +"default binding, bind the event on the widget and return the string " +"``\"break\"`` from your callback." +msgstr "" + +#: library/tkinter.rst:937 +msgid "The index parameter" +msgstr "" + +#: library/tkinter.rst:939 +msgid "" "A number of widgets require \"index\" parameters to be passed. These are " "used to point at a specific place in a Text widget, or to particular " "characters in an Entry widget, or to particular menu items in a Menu widget." msgstr "" -#: library/tkinter.rst:933 +#: library/tkinter.rst:943 msgid "Entry widget indexes (index, view index, etc.)" msgstr "" -#: library/tkinter.rst:934 +#: library/tkinter.rst:944 +msgid "" +"Entry widgets have methods and options that refer to character positions in " +"the text being displayed. Anytime an index is needed, you may pass in:" +msgstr "" + +#: library/tkinter.rst:948 +msgid "" +"an integer which refers to the numeric position of a character, counted from " +"the beginning of the text, starting with 0;" +msgstr "" + +#: library/tkinter.rst:951 +msgid "" +"the string ``\"anchor\"``, which refers to the anchor point of the " +"selection, set with the widget's selection methods;" +msgstr "" + +#: library/tkinter.rst:955 msgid "" -"Entry widgets have options that refer to character positions in the text " -"being displayed. You can use these :mod:`tkinter` functions to access these " -"special points in text widgets:" +"the string ``\"end\"``, which refers to the position just after the last " +"character;" msgstr "" -#: library/tkinter.rst:938 +#: library/tkinter.rst:958 +msgid "" +"the string ``\"insert\"``, which refers to the character just after the " +"insertion cursor;" +msgstr "" + +#: library/tkinter.rst:961 +msgid "" +"the strings ``\"sel.first\"`` and ``\"sel.last\"``, which refer to the first " +"character in the selection and the position just after the last (it is an " +"error to use these if there is no selection);" +msgstr "" + +#: library/tkinter.rst:966 +msgid "" +"a string consisting of ``@`` followed by an integer, as in ``\"@6\"``, where " +"the integer is interpreted as an x pixel coordinate in the entry's " +"coordinate system, selecting the character spanning that point." +msgstr "" + +#: library/tkinter.rst:971 msgid "Text widget indexes" msgstr "" -#: library/tkinter.rst:939 +#: library/tkinter.rst:972 msgid "" "The index notation for Text widgets is very rich and is best described in " "the Tk man pages." msgstr "" -#: library/tkinter.rst:942 +#: library/tkinter.rst:975 msgid "Menu indexes (menu.invoke(), menu.entryconfig(), etc.)" msgstr "" -#: library/tkinter.rst:943 +#: library/tkinter.rst:976 msgid "" "Some options and methods for menus manipulate specific menu entries. Anytime " "a menu index is needed for an option or a parameter, you may pass in:" msgstr "" -#: library/tkinter.rst:946 +#: library/tkinter.rst:979 msgid "" "an integer which refers to the numeric position of the entry in the widget, " "counted from the top, starting with 0;" msgstr "" -#: library/tkinter.rst:949 +#: library/tkinter.rst:982 msgid "" "the string ``\"active\"``, which refers to the menu position that is " "currently under the cursor;" msgstr "" -#: library/tkinter.rst:952 +#: library/tkinter.rst:985 msgid "the string ``\"last\"`` which refers to the last menu item;" msgstr "" -#: library/tkinter.rst:954 +#: library/tkinter.rst:987 msgid "" -"An integer preceded by ``@``, as in ``@6``, where the integer is interpreted " -"as a y pixel coordinate in the menu's coordinate system;" +"a string consisting of ``@`` followed by an integer, as in ``\"@6\"``, where " +"the integer is interpreted as a y pixel coordinate in the menu's coordinate " +"system;" msgstr "" -#: library/tkinter.rst:957 +#: library/tkinter.rst:991 msgid "" "the string ``\"none\"``, which indicates no menu entry at all, most often " "used with menu.activate() to deactivate all entries, and finally," msgstr "" -#: library/tkinter.rst:960 +#: library/tkinter.rst:994 msgid "" "a text string that is pattern matched against the label of the menu entry, " "as scanned from the top of the menu to the bottom. Note that this index " @@ -1782,33 +1768,33 @@ msgid "" "above literals, instead." msgstr "" -#: library/tkinter.rst:968 +#: library/tkinter.rst:1002 msgid "Images" msgstr "" -#: library/tkinter.rst:970 +#: library/tkinter.rst:1004 msgid "" "Images of different formats can be created through the corresponding " "subclass of :class:`tkinter.Image`:" msgstr "" -#: library/tkinter.rst:973 +#: library/tkinter.rst:1007 msgid ":class:`BitmapImage` for images in XBM format." msgstr "" -#: library/tkinter.rst:975 +#: library/tkinter.rst:1009 msgid "" ":class:`PhotoImage` for images in PGM, PPM, GIF and PNG formats. The latter " "is supported starting with Tk 8.6." msgstr "" -#: library/tkinter.rst:978 +#: library/tkinter.rst:1012 msgid "" "Either type of image is created through either the ``file`` or the ``data`` " "option (other options are available as well)." msgstr "" -#: library/tkinter.rst:981 +#: library/tkinter.rst:1015 msgid "" "Added the :class:`!PhotoImage` method :meth:`!copy_replace` to copy a region " "from one image to other image, possibly with pixel zooming and/or " @@ -1817,90 +1803,6013 @@ msgid "" "*subsample* parameters to :class:`!PhotoImage` method :meth:`!copy`." msgstr "" -#: library/tkinter.rst:990 +#: library/tkinter.rst:1024 msgid "" "The image object can then be used wherever an ``image`` option is supported " -"by some widget (e.g. labels, buttons, menus). In these cases, Tk will not " -"keep a reference to the image. When the last Python reference to the image " -"object is deleted, the image data is deleted as well, and Tk will display an " -"empty box wherever the image was used." +"by some widget (for example, labels, buttons, menus). In these cases, Tk " +"will not keep a reference to the image. When the last Python reference to " +"the image object is deleted, the image data is deleted as well, and Tk will " +"display an empty box wherever the image was used." msgstr "" -#: library/tkinter.rst:998 +#: library/tkinter.rst:1032 msgid "" "The `Pillow `_ package adds support for formats " "such as BMP, JPEG, TIFF, and WebP, among others." msgstr "" -#: library/tkinter.rst:1004 -msgid "File Handlers" +#: library/tkinter.rst:1037 +msgid "Reference" msgstr "" -#: library/tkinter.rst:1006 +#: library/tkinter.rst:1041 msgid "" -"Tk allows you to register and unregister a callback function which will be " -"called from the Tk mainloop when I/O is possible on a file descriptor. Only " -"one handler may be registered per file descriptor. Example code::" +"This section documents the classes, methods, functions and constants of the :" +"mod:`!tkinter` module. Most of them wrap Tcl/Tk commands; consult the " +"official Tcl/Tk manual pages for the full list of widget options and further " +"details." msgstr "" -#: library/tkinter.rst:1010 +#: library/tkinter.rst:1048 msgid "" -"import tkinter\n" -"widget = tkinter.Tk()\n" -"mask = tkinter.READABLE | tkinter.WRITABLE\n" -"widget.tk.createfilehandler(file, mask, callback)\n" -"...\n" -"widget.tk.deletefilehandler(file)" +"The exception raised when a call into the Tcl interpreter fails, for example " +"when a widget is given an unknown option or an invalid value." msgstr "" -#: library/tkinter.rst:1017 -msgid "This feature is not available on Windows." +#: library/tkinter.rst:1052 +msgid "Base and mixin classes" msgstr "" -#: library/tkinter.rst:1019 +#: library/tkinter.rst:1056 msgid "" -"Since you don't know how many bytes are available for reading, you may not " -"want to use the :class:`~io.BufferedIOBase` or :class:`~io.TextIOBase` :meth:" -"`~io.BufferedIOBase.read` or :meth:`~io.IOBase.readline` methods, since " -"these will insist on reading a predefined number of bytes. For sockets, the :" -"meth:`~socket.socket.recv` or :meth:`~socket.socket.recvfrom` methods will " -"work fine; for other files, use raw reads or ``os.read(file.fileno(), " -"maxbytecount)``." +"The :class:`!Misc` class is a mix-in inherited by :class:`Tk` and, through :" +"class:`BaseWidget`, by every widget. It provides the large set of methods " +"common to all Tk objects: querying window information, managing event " +"bindings and the event loop, controlling the keyboard focus and pointer " +"grabs, accessing the selection, clipboard and option database, and assorted " +"utility and introspection services. Because they are inherited, these " +"methods are available on every widget and on the :class:`Tk` application " +"object, and are documented here once rather than repeated for each widget." msgstr "" -#: library/tkinter.rst:1030 +#: library/tkinter.rst:1068 msgid "" -"Registers the file handler callback function *func*. The *file* argument may " -"either be an object with a :meth:`~io.IOBase.fileno` method (such as a file " -"or socket object), or an integer file descriptor. The *mask* argument is an " -"ORed combination of any of the three constants below. The callback is called " -"as follows::" +"Return the current value of the configuration option named *key* for this " +"widget, as a string. The expression ``widget[key]`` is equivalent and may be " +"used instead." msgstr "" -#: library/tkinter.rst:1036 -msgid "callback(file, mask)" +#: library/tkinter.rst:1077 +msgid "" +"Query or modify the configuration options of the widget. With no arguments, " +"return a dictionary mapping every available option name to a tuple " +"describing it (its name, X resource name, X resource class, default value " +"and current value). If a single option name is given as a string, return the " +"tuple for just that option. If one or more keyword arguments are given, or a " +"dictionary is passed as *cnf*, set each named option to the corresponding " +"value; the expression ``widget[key] = value`` sets a single option in the " +"same way." msgstr "" -#: library/tkinter.rst:1041 -msgid "Unregisters a file handler." +#: library/tkinter.rst:1087 +msgid ":meth:`config` is an alias of :meth:`!configure`." msgstr "" -#: library/tkinter.rst:1048 -msgid "Constants used in the *mask* arguments." +#: library/tkinter.rst:1091 +msgid "Return a list of the names of all configuration options of this widget." msgstr "" -#: library/tkinter.rst:636 -msgid "packing (widgets)" +#: library/tkinter.rst:1095 +msgid "" +"Interpret the string *s* as a Tcl boolean and return the corresponding :" +"class:`bool`. Tcl accepts values such as ``'1'``, ``'0'``, ``'yes'``, " +"``'no'``, ``'true'`` and ``'false'``. Raise :exc:`ValueError` if *s* is not " +"a valid boolean." msgstr "" -#: library/tkinter.rst:749 -msgid "window manager (widgets)" +#: library/tkinter.rst:1103 +msgid "" +"Interpret the string *s* as a Tcl floating-point number and return it as a :" +"class:`float`. Raise :exc:`ValueError` if *s* is not a valid number." msgstr "" -#: library/tkinter.rst:865 -msgid "bind (widgets)" +#: library/tkinter.rst:1112 +msgid "" +"Interpret the string *s* as a Tcl integer and return it as an :class:`int`. " +"Raise :exc:`ValueError` if *s* is not a valid integer." msgstr "" -#: library/tkinter.rst:865 +#: library/tkinter.rst:1118 +msgid "Return the value of the Tcl global variable named *name*." +msgstr "" + +#: library/tkinter.rst:1122 +msgid "Set the Tcl global variable named *name* to *value*." +msgstr "" + +#: library/tkinter.rst:1124 +msgid "" +"The :meth:`!getvar` and :meth:`!setvar` methods give direct access to Tcl " +"variables. In most code you will instead use a :class:`Variable` subclass " +"such as :class:`StringVar` or :class:`IntVar`, which wraps a Tcl variable " +"and converts its value to and from a Python type." +msgstr "" + +#: library/tkinter.rst:1132 +msgid "" +"Register the Python callable *func* as a Tcl command and return the name of " +"the new command as a string. Whenever Tcl invokes that command, *func* is " +"called; if *subst* is given, it is applied to the command's arguments first. " +"This is the mechanism used internally to turn Python callbacks into the " +"command names passed to Tk options such as *command*. Unless *needcleanup* " +"is false, the command is deleted automatically when the widget is destroyed." +msgstr "" + +#: library/tkinter.rst:1141 +msgid "The arguments passed to *func* are no longer converted to strings." +msgstr "" + +#: library/tkinter.rst:1146 +msgid "" +"Delete the Tcl command named *name*, such as one previously returned by :" +"meth:`register`." +msgstr "" + +#: library/tkinter.rst:1151 +msgid "Return the widget instance corresponding to the Tk pathname *name*." +msgstr "" + +#: library/tkinter.rst:1155 +msgid "" +"Send the Tcl command *cmd*, with the given *args*, to the Tcl interpreter " +"registered under the name *interp*, and return its result. This is not " +"available on all platforms." +msgstr "" + +#: library/tkinter.rst:1161 +msgid "" +"Destroy this widget and all of its descendant widgets, and delete the Tcl " +"commands associated with them." +msgstr "" + +#: library/tkinter.rst:1169 +msgid "" +"Raise this widget in the stacking order so that it is drawn on top of its " +"siblings. If *aboveThis* is given, the widget is moved to be just above it " +"in the stacking order instead." +msgstr "" + +#: library/tkinter.rst:1174 +msgid ":meth:`lift` is an alias of :meth:`!tkraise`." +msgstr "" + +#: library/tkinter.rst:1178 +msgid "" +"Lower this widget in the stacking order so that it is drawn beneath its " +"siblings. If *belowThis* is given, the widget is moved to be just below it " +"in the stacking order instead." +msgstr "" + +#: library/tkinter.rst:1183 +msgid "" +":meth:`tkraise`/:meth:`lift` and :meth:`lower` are overridden by the :class:" +"`Canvas` widget, where they restack canvas items instead." +msgstr "" + +#: library/tkinter.rst:1189 +msgid "" +"Return the names of all images that currently exist in the Tcl interpreter." +msgstr "" + +#: library/tkinter.rst:1192 +msgid "" +"This is overridden by the :class:`Text` widget, where :meth:`!image_names` " +"returns the names of its embedded images instead." +msgstr "" + +#: library/tkinter.rst:1198 +msgid "Return the available image types, such as ``'photo'`` and ``'bitmap'``." +msgstr "" + +#: library/tkinter.rst:1205 +msgid "" +"Set the anchor that controls where the grid is placed inside this container " +"when the container is larger than the grid and no row or column has a non-" +"zero weight. *anchor* is one of the usual anchor strings, such as ``'nw'`` " +"(the default) or ``'center'``. Called with no argument, this method has no " +"effect." +msgstr "" + +#: library/tkinter.rst:1212 +msgid ":meth:`anchor` is an alias of :meth:`!grid_anchor`." +msgstr "" + +#: library/tkinter.rst:1221 +msgid "" +"Return the bounding box, in pixels, of a region of the grid laid out in this " +"container, as a 4-tuple ``(xoffset, yoffset, width, height)``. With no " +"arguments the bounding box of the whole grid is returned. If *column* and " +"*row* are given, the box spans from the cell at row and column 0 to that " +"cell; if *col2* and *row2* are also given, it spans from the cell (*column*, " +"*row*) to the cell (*col2*, *row2*)." +msgstr "" + +#: library/tkinter.rst:1228 +msgid "" +":meth:`bbox` is an alias of :meth:`!grid_bbox`, except on :class:`Canvas`, :" +"class:`Listbox`, :class:`Spinbox`, :class:`Text`, :class:`ttk.Entry ` and :class:`ttk.Treeview `, which provide " +"their own :meth:`!bbox` method." +msgstr "" + +#: library/tkinter.rst:1239 +msgid "" +"Query or set the properties of the column (or columns) *index* of the grid " +"managed by this container. *index* may be a column number; when setting " +"options it may also be a list of column numbers, the string ``'all'`` to " +"affect every column, or a child widget whose occupied columns are affected. " +"The supported options are:" +msgstr "" + +#: library/tkinter.rst:1246 +msgid "*minsize*" +msgstr "" + +#: library/tkinter.rst:1247 +msgid "The column's minimum size, in pixels." +msgstr "" + +#: library/tkinter.rst:1249 +msgid "*weight*" +msgstr "" + +#: library/tkinter.rst:1250 +msgid "" +"An integer setting how much of any extra space is apportioned to the column. " +"A weight of ``0`` keeps the column at its requested size, and a column of " +"weight two grows twice as fast as a column of weight one." +msgstr "" + +#: library/tkinter.rst:1255 +msgid "*uniform*" +msgstr "" + +#: library/tkinter.rst:1256 +msgid "" +"The name of a uniform group. Columns sharing a non-empty group name are kept " +"in sizes that are strictly proportional to their weights." +msgstr "" + +#: library/tkinter.rst:1260 +msgid "*pad*" +msgstr "" + +#: library/tkinter.rst:1261 +msgid "" +"Extra space, in pixels, added to the largest widget in the column when " +"computing the column's size." +msgstr "" + +#: library/tkinter.rst:1264 +msgid "" +"With a single option name, return that option's value; with no options, " +"return a dictionary of all of them." +msgstr "" + +#: library/tkinter.rst:1267 +msgid ":meth:`columnconfigure` is an alias of :meth:`!grid_columnconfigure`." +msgstr "" + +#: library/tkinter.rst:1274 +msgid "" +"Query or set the properties of the row (or rows) *index* of the grid managed " +"by this container. *index* is interpreted as for :meth:" +"`grid_columnconfigure`, and the supported options (*minsize*, *weight*, " +"*uniform* and *pad*) are the same, applied to a row instead of a column." +msgstr "" + +#: library/tkinter.rst:1280 +msgid ":meth:`rowconfigure` is an alias of :meth:`!grid_rowconfigure`." +msgstr "" + +#: library/tkinter.rst:1284 +msgid "" +"Return the ``(column, row)`` of the grid cell that contains the pixel at " +"position (*x*, *y*), given in pixels relative to this container. For " +"locations above or to the left of the grid, ``-1`` is returned for the " +"corresponding coordinate." +msgstr "" + +#: library/tkinter.rst:1292 +msgid "" +"Enable or disable geometry propagation for this container when it manages " +"its children with the grid geometry manager. When *flag* is true, the " +"container resizes itself to fit the requested sizes of its children; when it " +"is false, its size is left under your control. Called with no argument, " +"return the current setting as a boolean." +msgstr "" + +#: library/tkinter.rst:1304 +msgid "" +"Return the size of the grid managed by this container as a ``(columns, " +"rows)`` tuple." +msgstr "" + +#: library/tkinter.rst:1307 +msgid "" +":meth:`size` is an alias of :meth:`!grid_size`, except on the :class:" +"`Listbox` widget, which provides its own :meth:`!size` method." +msgstr "" + +#: library/tkinter.rst:1313 +msgid "" +"Return a list of the child widgets managed in this container's grid, most " +"recently managed first. If *row* or *column* is given, only the children in " +"that row or column are returned." +msgstr "" + +#: library/tkinter.rst:1325 +msgid "" +"Enable or disable geometry propagation for this container when it manages " +"its children with the pack geometry manager. When *flag* is true, the " +"container resizes itself to fit the requested sizes of its children; when it " +"is false, its size is left under your control. Called with no argument, " +"return the current setting as a boolean." +msgstr "" + +#: library/tkinter.rst:1332 +msgid ":meth:`propagate` is an alias of :meth:`!pack_propagate`." +msgstr "" + +#: library/tkinter.rst:1339 +msgid "" +"Return a list of the child widgets managed by this container with the pack " +"geometry manager, in packing order." +msgstr "" + +#: library/tkinter.rst:1342 +msgid ":meth:`slaves` is an alias of :meth:`!pack_slaves`." +msgstr "" + +#: library/tkinter.rst:1346 +msgid "" +"Return a list of the child widgets managed by this container with the place " +"geometry manager." +msgstr "" + +#: library/tkinter.rst:1349 +msgid "" +"The methods with the ``bind`` and ``unbind`` prefixes associate event " +"patterns with callbacks and remove those associations." +msgstr "" + +#: library/tkinter.rst:1354 +msgid "" +"Bind the event pattern *sequence* on this widget to the callable *func*." +msgstr "" + +#: library/tkinter.rst:1356 +msgid "" +"*sequence* is an event pattern, such as ``''`` (a mouse click) or " +"``''``, optionally a concatenation of several such patterns that " +"must occur shortly after one another. When the event occurs, *func* is " +"called with an :class:`Event` instance describing it as its only argument; " +"if *func* returns the string ``'break'``, no further bindings for the event " +"are invoked." +msgstr "" + +#: library/tkinter.rst:1363 +msgid "" +"If *add* is true, *func* is added to any functions already bound to " +"*sequence*; otherwise it replaces them. The binding applies only to this " +"widget." +msgstr "" + +#: library/tkinter.rst:1367 +msgid "" +":meth:`!bind` returns a string identifier (a *funcid*) that can later be " +"passed to :meth:`unbind` to remove the binding without leaking the " +"associated Tcl command." +msgstr "" + +#: library/tkinter.rst:1371 +msgid "" +"If *func* is omitted, return the binding currently associated with " +"*sequence*; if *sequence* is also omitted, return a list of all the " +"sequences for which bindings exist on this widget." +msgstr "" + +#: library/tkinter.rst:1377 +msgid "" +"Like :meth:`bind`, but bind *func* to the binding tag *className* rather " +"than to a single widget, so that the binding applies to every widget having " +"that tag. *className* is usually the name of a widget class, such as " +"``'Button'``, in which case the binding affects all widgets of that class. " +"The set of binding tags for a widget can be inspected and changed with :meth:" +"`bindtags`." +msgstr "" + +#: library/tkinter.rst:1392 +msgid "The remaining arguments and the return value are as for :meth:`bind`." +msgstr "" + +#: library/tkinter.rst:1389 +msgid "" +"Like :meth:`bind`, but bind *func* to the special binding tag ``'all'``, so " +"that the binding applies to every widget in the application." +msgstr "" + +#: library/tkinter.rst:1396 +msgid "Remove bindings for the event pattern *sequence* on this widget." +msgstr "" + +#: library/tkinter.rst:1398 +msgid "" +"If *funcid* is given, only the function identified by it (a value returned " +"from a previous call to :meth:`bind`) is removed, and its associated Tcl " +"command is deleted. Otherwise all bindings for *sequence* are destroyed, " +"leaving it unbound." +msgstr "" + +#: library/tkinter.rst:1403 +msgid "" +"If *funcid* is given, only that callback is unbound; other callbacks bound " +"to *sequence* are kept." +msgstr "" + +#: library/tkinter.rst:1410 +msgid "" +"Remove all bindings for the event pattern *sequence* from the binding tag " +"*className*. See :meth:`bind_class`." +msgstr "" + +#: library/tkinter.rst:1416 +msgid "" +"Remove all bindings for the event pattern *sequence* from the special " +"binding tag ``'all'``. See :meth:`bind_all`." +msgstr "" + +#: library/tkinter.rst:1422 +msgid "" +"If *tagList* is omitted, return a tuple of the binding tags associated with " +"this widget. When an event occurs in a widget, it is applied to each of the " +"widget's binding tags in order, and for each tag the most specific matching " +"binding is executed. By default a widget has four binding tags: its own " +"pathname, its widget class, the pathname of its nearest toplevel ancestor, " +"and ``'all'``, in that order." +msgstr "" + +#: library/tkinter.rst:1431 +msgid "" +"If *tagList* is given, it must be a sequence of strings; the widget's " +"binding tags are set to its elements, which determines the order in which " +"bindings are evaluated." +msgstr "" + +#: library/tkinter.rst:1435 +msgid "" +"The methods with the ``event_`` prefix define virtual events and generate " +"events programmatically." +msgstr "" + +#: library/tkinter.rst:1440 +msgid "" +"Associate the virtual event *virtual*, whose name has the form " +"``'<>'``, with each of the physical event patterns given by " +"*sequences*, so that the virtual event triggers whenever any of them occurs. " +"If *virtual* is already defined, the new sequences are added to its existing " +"ones." +msgstr "" + +#: library/tkinter.rst:1449 +msgid "" +"Remove each of *sequences* from those associated with the virtual event " +"*virtual*. Sequences that are not currently associated with *virtual* are " +"ignored. If no *sequences* are given, all physical event sequences are " +"removed, so that *virtual* no longer triggers." +msgstr "" + +#: library/tkinter.rst:1457 +msgid "" +"Generate the event *sequence* on this widget and arrange for it to be " +"processed just as if it had come from the window system. *sequence* must be " +"a single event pattern, such as ``''`` or ``'<>'``, not a " +"concatenation of several. Keyword arguments specify additional fields of the " +"event, for example *x* and *y* for the pointer position, or *when* to " +"control when the event is processed; refer to the Tk ``event`` manual page " +"for the full list." +msgstr "" + +#: library/tkinter.rst:1467 +msgid "" +"If *virtual* is omitted, return a tuple of all the virtual events that are " +"currently defined. If *virtual* is given, return a tuple of the physical " +"event sequences currently associated with it, or an empty tuple if it is not " +"defined." +msgstr "" + +#: library/tkinter.rst:1472 +msgid "" +"The methods with the ``after`` prefix schedule callbacks to run after a " +"delay or when the application is idle." +msgstr "" + +#: library/tkinter.rst:1477 +msgid "" +"Schedule the callable *func* to be called after *ms* milliseconds, with " +"*args* passed to it as positional arguments. Return an identifier that can " +"be passed to :meth:`after_cancel` to cancel the call." +msgstr "" + +#: library/tkinter.rst:1482 +msgid "" +"If *func* is omitted, sleep for *ms* milliseconds instead, processing no " +"events during that time, and return ``None``." +msgstr "" + +#: library/tkinter.rst:1485 +msgid "*func* can now be any callable object, not only a function." +msgstr "" + +#: library/tkinter.rst:1491 +msgid "" +"Cancel a callback previously scheduled with :meth:`after` or :meth:" +"`after_idle`. *id* must be an identifier returned by one of those methods; " +"passing a value that is not such an identifier raises :exc:`ValueError`. If " +"the callback has already run or been cancelled, this has no effect." +msgstr "" + +#: library/tkinter.rst:1497 +msgid "" +"Passing ``None`` (or any false value) as *id* now raises :exc:`ValueError`." +msgstr "" + +#: library/tkinter.rst:1504 +msgid "" +"Schedule the callable *func* to be called, with *args* passed to it, when " +"the Tk main loop next becomes idle, that is, when it has no other events to " +"process. Return an identifier that can be passed to :meth:`after_cancel` to " +"cancel the call." +msgstr "" + +#: library/tkinter.rst:1513 +msgid "" +"If *id* is omitted, return a tuple of the identifiers of all callbacks " +"currently scheduled with :meth:`after` and :meth:`after_idle` for this " +"interpreter." +msgstr "" + +#: library/tkinter.rst:1517 +msgid "" +"If *id* is given, it must identify a callback that has not yet run or been " +"cancelled, and the return value is a tuple ``(script, type)``, where " +"*script* refers to the function to be called and *type* is either ``'idle'`` " +"or ``'timer'``. A :exc:`TclError` is raised if *id* does not exist." +msgstr "" + +#: library/tkinter.rst:1528 +msgid "" +"Enter the Tk event loop, which processes events until all windows are " +"destroyed. This is normally called once, on the root window, to run the " +"application." +msgstr "" + +#: library/tkinter.rst:1534 +msgid "Quit the Tcl interpreter, causing :meth:`mainloop` to return." +msgstr "" + +#: library/tkinter.rst:1538 +msgid "" +"Enter the event loop until all pending events, including idle callbacks, " +"have been processed. This brings the display up to date and handles any " +"events that are already queued, then returns." +msgstr "" + +#: library/tkinter.rst:1545 +msgid "" +"Enter the event loop until all pending idle callbacks have been called. This " +"updates the display of windows, for example after geometry changes, but does " +"not process events caused by the user." +msgstr "" + +#: library/tkinter.rst:1554 +msgid "" +"Wait until the Tcl variable *name* is modified, continuing to process events " +"in the meantime so that the application stays responsive. *name* is usually " +"a :class:`Variable` instance, such as an :class:`IntVar` or :class:" +"`StringVar`." +msgstr "" + +#: library/tkinter.rst:1559 +msgid ":meth:`waitvar` is an alias of :meth:`!wait_variable`." +msgstr "" + +#: library/tkinter.rst:1563 +msgid "" +"Wait until *window* is destroyed, continuing to process events in the " +"meantime. If *window* is omitted, this widget is used. This is typically " +"used to wait for the user to finish interacting with a dialog box." +msgstr "" + +#: library/tkinter.rst:1571 +msgid "" +"Wait until the visibility state of *window* changes, for example when it " +"first appears on the screen, continuing to process events in the meantime. " +"If *window* is omitted, this widget is used. This is typically used to wait " +"for a newly created window to become visible before acting on it." +msgstr "" + +#: library/tkinter.rst:1578 +msgid "The methods with the ``focus_`` prefix manage the keyboard focus." +msgstr "" + +#: library/tkinter.rst:1585 +msgid "" +"Direct the keyboard input focus for this widget's display to this widget. If " +"the application does not currently have the input focus on this widget's " +"display, the widget is remembered as the focus window for its top level, and " +"the focus will be redirected to it the next time the window manager gives " +"the focus to the top level. :meth:`focus` is an alias of :meth:`!focus_set`, " +"except on the :class:`Canvas` and :class:`ttk.Treeview ` widgets, which provide their own :meth:`!focus` method." +msgstr "" + +#: library/tkinter.rst:1597 +msgid "" +"Direct the keyboard input focus to this widget even if the application does " +"not currently have the input focus for the widget's display. This method " +"should be used sparingly, if at all; normally an application should wait for " +"the window manager to give it the focus rather than claiming it." +msgstr "" + +#: library/tkinter.rst:1605 +msgid "" +"Return the widget that currently has the keyboard focus in the application, " +"or ``None`` if no widget in the application has the focus. Use :meth:" +"`focus_displayof` to work correctly with several displays." +msgstr "" + +#: library/tkinter.rst:1611 +msgid "" +"Return the widget that currently has the keyboard focus on the display where " +"this widget is located, or ``None`` if no widget in the application has the " +"focus on that display." +msgstr "" + +#: library/tkinter.rst:1617 +msgid "" +"Return the most recent widget to have had the keyboard focus among all the " +"widgets in the same top level as this widget; this is the widget that will " +"receive the focus the next time the window manager gives the focus to the " +"top level. If no widget in that top level has ever had the focus, or if the " +"most recent focus widget has been deleted, the top level itself is returned." +msgstr "" + +#: library/tkinter.rst:1626 +msgid "" +"Reconfigure Tk to use an implicit focus model in which the focus is set to a " +"widget whenever the mouse pointer enters it. This cannot easily be disabled " +"once enabled." +msgstr "" + +#: library/tkinter.rst:1632 +msgid "" +"Return the next widget after this one in the keyboard traversal order, or " +"``None`` if there is none. The traversal order goes first to the next child, " +"then recursively to the children of that child, and then to the next sibling " +"higher in the stacking order. A widget is skipped if its ``takefocus`` " +"option is set to ``0``. This method is used in the default bindings for the :" +"kbd:`Tab` key." +msgstr "" + +#: library/tkinter.rst:1642 +msgid "" +"Return the previous widget before this one in the keyboard traversal order, " +"or ``None`` if there is none. See :meth:`tk_focusNext` for how the order is " +"defined. This method is used in the default bindings for the :kbd:`Shift-" +"Tab` key." +msgstr "" + +#: library/tkinter.rst:1647 +msgid "" +"The methods with the ``grab_`` prefix set and query the input grab, which " +"directs all input events to a single widget." +msgstr "" + +#: library/tkinter.rst:1652 +msgid "" +"Set a local grab on this widget. A grab confines pointer events to this " +"widget and its descendants: while the pointer is outside the widget's " +"subtree, button presses and releases and pointer motion are reported to the " +"grab widget, and windows outside the subtree become insensitive until the " +"grab is released. A local grab affects only the grabbing application. Any " +"grab previously set by this application on the widget's display is " +"automatically released. Setting a grab is the usual way to make a dialog " +"modal: while the grab is in effect the user cannot interact with the other " +"windows of the application." +msgstr "" + +#: library/tkinter.rst:1666 +msgid "" +"Set a global grab on this widget. A global grab is like the local grab set " +"by :meth:`grab_set`, but it locks out all other applications on the screen, " +"so that only this widget's subtree is sensitive to pointer events, and it " +"also grabs the keyboard. Use with caution: it is easy to render a display " +"unusable with a global grab, since other applications stop receiving events " +"until it is released." +msgstr "" + +#: library/tkinter.rst:1677 +msgid "Release the grab on this widget if there is one; otherwise do nothing." +msgstr "" + +#: library/tkinter.rst:1681 +msgid "" +"Return the widget that currently holds the grab in this application for this " +"widget's display, or ``None`` if there is no such widget." +msgstr "" + +#: library/tkinter.rst:1686 +msgid "" +"Return ``None`` if no grab is currently set on this widget, ``\"local\"`` if " +"a local grab is set, or ``\"global\"`` if a global grab is set." +msgstr "" + +#: library/tkinter.rst:1689 +msgid "" +"The methods with the ``selection_`` prefix retrieve and manage the X " +"selection." +msgstr "" + +#: library/tkinter.rst:1694 +msgid "" +"Clear the X selection, so that no window owns it anymore. The selection to " +"clear is given by the keyword argument *selection*, an atom name such as " +"``'PRIMARY'`` or ``'CLIPBOARD'``; it defaults to ``PRIMARY``. The " +"*displayof* keyword argument names a widget that determines the display on " +"which to operate, and defaults to this widget." +msgstr "" + +#: library/tkinter.rst:1701 +msgid "" +"This is overridden by the :class:`Entry`, :class:`Listbox` and :class:" +"`Spinbox` widgets, where :meth:`!selection_clear` clears the widget's own " +"selection instead." +msgstr "" + +#: library/tkinter.rst:1707 +msgid "" +"Return the contents of the current X selection. The keyword argument " +"*selection* names the selection and defaults to ``PRIMARY``. The keyword " +"argument *type* specifies the form in which the data is to be returned (the " +"desired conversion target), an atom name such as ``'STRING'`` or " +"``'FILE_NAME'``; it defaults to ``STRING``, except on X11, where " +"``UTF8_STRING`` is tried first and ``STRING`` is used as a fallback. The " +"*displayof* keyword argument names a widget that determines the display from " +"which to retrieve the selection, and defaults to this widget." +msgstr "" + +#: library/tkinter.rst:1721 +msgid "" +"Register *command* as a handler to supply the X selection owned by this " +"widget when another application requests it. When the selection is " +"retrieved, *command* is called with two arguments, the starting character " +"offset and the maximum number of characters to return, and must return at " +"most that many characters of the selection starting at that offset; for very " +"long selections it is called repeatedly with increasing offsets. The keyword " +"argument *selection* names the selection (default ``PRIMARY``) and the " +"keyword argument *type* gives the form of the selection that the handler " +"supplies (such as ``'STRING'`` or ``'FILE_NAME'``, default ``STRING``)." +msgstr "" + +#: library/tkinter.rst:1735 +msgid "" +"Make this widget the owner of the X selection on its display. The previous " +"owner, if any, is notified that it has lost the selection. The keyword " +"argument *selection* names the selection and defaults to ``PRIMARY``." +msgstr "" + +#: library/tkinter.rst:1742 +msgid "" +"Return the widget in this application that owns the X selection on the " +"display containing this widget, or ``None`` if no widget in this application " +"owns the selection. The keyword argument *selection* names the selection and " +"defaults to ``PRIMARY``. The *displayof* keyword argument names a widget " +"that determines the display to query, and defaults to this widget." +msgstr "" + +#: library/tkinter.rst:1750 +msgid "The methods with the ``clipboard_`` prefix manage the clipboard." +msgstr "" + +#: library/tkinter.rst:1754 +msgid "" +"Append *string* to the Tk clipboard and claim ownership of the clipboard on " +"this widget's display. Before appending, the clipboard should be emptied " +"with :meth:`clipboard_clear`; all appends should be completed before " +"returning to the event loop so that the clipboard is updated atomically. The " +"keyword argument *type* specifies the form of the data, an atom name such as " +"``'STRING'`` or ``'FILE_NAME'`` (default ``STRING``), and the keyword " +"argument *format* specifies the representation used to transmit it (default " +"``STRING``). The *displayof* keyword argument names a widget that determines " +"the target display, and defaults to this widget. The contents can be " +"retrieved with :meth:`clipboard_get` or :meth:`selection_get`." +msgstr "" + +#: library/tkinter.rst:1770 +msgid "" +"Claim ownership of the clipboard on this widget's display and remove any " +"previous contents. The *displayof* keyword argument names a widget that " +"determines the target display, and defaults to this widget." +msgstr "" + +#: library/tkinter.rst:1777 +msgid "" +"Retrieve data from the clipboard on this widget's display. The keyword " +"argument *type* specifies the form in which the data is to be returned, an " +"atom name such as ``'STRING'`` or ``'FILE_NAME'``; it defaults to " +"``STRING``, except on X11, where ``UTF8_STRING`` is tried first and " +"``STRING`` is used as a fallback. The *displayof* keyword argument names a " +"widget that determines the display, and defaults to the root window of the " +"application. This is equivalent to ``selection_get(selection='CLIPBOARD')``." +msgstr "" + +#: library/tkinter.rst:1786 +msgid "" +"The methods with the ``option_`` prefix query and modify the Tk option " +"database." +msgstr "" + +#: library/tkinter.rst:1791 +msgid "" +"Add an option to the Tk option database that associates *value* with " +"*pattern*. *pattern* consists of names and/or classes separated by asterisks " +"or dots, in the usual X format. *priority* is an integer between 0 and 100, " +"or one of the symbolic names ``'widgetDefault'`` (20), ``'startupFile'`` " +"(40), ``'userDefault'`` (60), or ``'interactive'`` (80); it defaults to " +"``interactive``." +msgstr "" + +#: library/tkinter.rst:1801 +msgid "" +"Clear the Tk option database. Default options from the :envvar:`!" +"RESOURCE_MANAGER` property or the :file:`.Xdefaults` file are reloaded " +"automatically the next time an option is added to or removed from the " +"database." +msgstr "" + +#: library/tkinter.rst:1808 +msgid "" +"Return the value of the option matching this widget under *name* and " +"*className* from the Tk option database, or an empty string if there is no " +"matching entry. When several entries match, the one with the highest " +"priority is returned, and among entries of equal priority the most recently " +"added one." +msgstr "" + +#: library/tkinter.rst:1817 +msgid "" +"Read the file named *fileName*, which should have the standard format for an " +"X resource database such as :file:`.Xdefaults`, and add all the options it " +"specifies to the Tk option database. *priority* is interpreted as for :meth:" +"`option_add` and defaults to ``interactive``." +msgstr "" + +#: library/tkinter.rst:1825 +msgid "" +"Ring the bell on the display for this widget, using the display's current " +"bell-related settings, and reset the screen saver for the screen. If " +"*displayof* is given as a widget, the bell is rung on that widget's display " +"instead." +msgstr "" + +#: library/tkinter.rst:1833 +msgid "" +"Set a new color scheme for all Tk widget elements. Existing widgets are " +"updated and the option database is changed so that future widgets use the " +"new colors. A single color argument is taken as the normal background color, " +"from which a complete palette is computed. Alternatively, the arguments may " +"be given as keyword *name*/*value* pairs naming individual options in the " +"option database. The recognized option names are ``activeBackground``, " +"``activeForeground``, ``background``, ``disabledForeground``, " +"``foreground``, ``highlightBackground``, ``highlightColor``, " +"``insertBackground``, ``selectColor``, ``selectBackground``, " +"``selectForeground``, and ``troughColor``; reasonable defaults are computed " +"for any that are not specified." +msgstr "" + +#: library/tkinter.rst:1849 +msgid "" +"Restore the application's colors to the light brown (bisque) color scheme " +"used in Tk 3.6 and earlier versions. Provided for backward compatibility." +msgstr "" + +#: library/tkinter.rst:1855 +msgid "" +"Query or set whether Tk's look and feel should strictly adhere to Motif. A " +"true *boolean* value enables strict Motif compliance (for example, no color " +"change when the mouse passes over a slider). Return the resulting setting." +msgstr "" + +#: library/tkinter.rst:1860 +msgid "" +"The methods with the ``busy_`` prefix manage the busy state of a window, " +"which shows a busy cursor and ignores user input." +msgstr "" + +#: library/tkinter.rst:1874 +msgid "" +"Make this widget appear busy. A transparent window is placed in front of the " +"widget, so that it and all of its descendants in the widget hierarchy are " +"blocked from pointer events and display a busy cursor. Normally :meth:" +"`update` should be called immediately afterwards to ensure that the hold " +"operation is in effect before the application starts its processing." +msgstr "" + +#: library/tkinter.rst:1882 +msgid "" +"The only supported configuration option is *cursor*, the cursor to be " +"displayed while the widget is busy; it may have any of the values accepted " +"by :meth:`!configure`." +msgstr "" + +#: library/tkinter.rst:1886 +msgid "" +":meth:`busy_hold`, :meth:`busy` and :meth:`tk_busy` are aliases of :meth:`!" +"tk_busy_hold`." +msgstr "" + +#: library/tkinter.rst:1903 +msgid "" +"Query or modify the configuration options of the busy window. The widget " +"must have been previously made busy by :meth:`tk_busy_hold`. With no " +"arguments, return a dictionary describing all of the available options; if " +"*cnf* is the name of an option, return a tuple describing that one option. " +"Otherwise set the given options to the given values. Options may have any of " +"the values accepted by :meth:`tk_busy_hold`." +msgstr "" + +#: library/tkinter.rst:1911 +msgid "" +"The option database is referenced through the widget name or class. For " +"example, if a :class:`Frame` widget named ``frame`` is to be made busy, the " +"busy cursor can be specified for it by either of the calls::" +msgstr "" + +#: library/tkinter.rst:1915 +msgid "" +"w.option_add('*frame.busyCursor', 'gumby')\n" +"w.option_add('*Frame.BusyCursor', 'gumby')" +msgstr "" + +#: library/tkinter.rst:1918 +msgid "" +":meth:`busy_configure`, :meth:`busy_config` and :meth:`tk_busy_config` are " +"aliases of :meth:`!tk_busy_configure`." +msgstr "" + +#: library/tkinter.rst:1929 +msgid "" +"Return the current value of the busy configuration *option*. The widget must " +"have been previously made busy by :meth:`tk_busy_hold`, and *option* may " +"have any of the values accepted by that method." +msgstr "" + +#: library/tkinter.rst:1933 +msgid ":meth:`busy_cget` is an alias of :meth:`!tk_busy_cget`." +msgstr "" + +#: library/tkinter.rst:1943 +msgid "" +"Make this widget no longer busy, releasing the resources (including the " +"transparent window) allocated when it was made busy. User events will again " +"be received by the widget. These resources are also released when the widget " +"is destroyed." +msgstr "" + +#: library/tkinter.rst:1948 +msgid ":meth:`busy_forget` is an alias of :meth:`!tk_busy_forget`." +msgstr "" + +#: library/tkinter.rst:1958 +msgid "Return ``True`` if the widget is currently busy, ``False`` otherwise." +msgstr "" + +#: library/tkinter.rst:1960 +msgid ":meth:`busy_status` is an alias of :meth:`!tk_busy_status`." +msgstr "" + +#: library/tkinter.rst:1970 +msgid "" +"Return a list of widgets that are currently busy. If *pattern* is given, " +"only busy widgets whose path names match the pattern are returned." +msgstr "" + +#: library/tkinter.rst:1974 +msgid ":meth:`busy_current` is an alias of :meth:`!tk_busy_current`." +msgstr "" + +#: library/tkinter.rst:1978 +msgid "" +"The methods with the ``winfo_`` prefix retrieve information about windows " +"managed by Tk." +msgstr "" + +#: library/tkinter.rst:1983 +msgid "" +"Return the integer identifier for the atom whose name is *name*, creating a " +"new atom if none exists. If *displayof* is given, the atom is looked up on " +"the display of that window; otherwise it is looked up on the display of the " +"application's main window." +msgstr "" + +#: library/tkinter.rst:1991 +msgid "" +"Return the textual name for the atom whose integer identifier is *id*. This " +"is the inverse of :meth:`winfo_atom`. If *displayof* is given, the " +"identifier is looked up on the display of that window; otherwise it is " +"looked up on the display of the application's main window." +msgstr "" + +#: library/tkinter.rst:1999 +msgid "Return the number of cells in the colormap for the widget." +msgstr "" + +#: library/tkinter.rst:2003 +msgid "" +"Return a list containing the widgets that are children of the widget, in " +"stacking order from lowest to highest. Toplevel windows are returned as " +"children of their logical parents." +msgstr "" + +#: library/tkinter.rst:2009 +msgid "Return the class name of the widget." +msgstr "" + +#: library/tkinter.rst:2013 +msgid "" +"Return ``True`` if the colormap for the widget is known to be full, " +"``False`` otherwise." +msgstr "" + +#: library/tkinter.rst:2018 +msgid "" +"Return the widget containing the point given by *rootX* and *rootY*, or " +"``None`` if no window in this application contains the point. The " +"coordinates are in screen units in the coordinate system of the root window. " +"If *displayof* is given, the coordinates refer to the screen containing that " +"window; otherwise they refer to the screen of the application's main window." +msgstr "" + +#: library/tkinter.rst:2028 +msgid "Return the depth of the widget, that is, the number of bits per pixel." +msgstr "" + +#: library/tkinter.rst:2032 +msgid "Return true if the widget exists, false otherwise." +msgstr "" + +#: library/tkinter.rst:2036 +msgid "" +"Return a floating-point value giving the number of pixels in the widget " +"corresponding to the screen distance *number* (for example, ``\"2.0c\"`` or " +"``\"1i\"``). The result may be fractional; for a rounded integer value use :" +"meth:`winfo_pixels`." +msgstr "" + +#: library/tkinter.rst:2044 +msgid "" +"Return the geometry of the widget, in the form ``widthxheight+x+y``. All " +"dimensions are in pixels. An offset can be negative; see :meth:`~Wm." +"geometry`." +msgstr "" + +#: library/tkinter.rst:2050 +msgid "" +"Return the height of the widget in pixels. When a window is first created " +"its height is 1 pixel; it is eventually changed by a geometry manager. See " +"also :meth:`winfo_reqheight`." +msgstr "" + +#: library/tkinter.rst:2057 +msgid "" +"Return a low-level platform-specific identifier for the widget. On Unix this " +"is the X window identifier, and on Windows it is the window handle." +msgstr "" + +#: library/tkinter.rst:2063 +msgid "" +"Return a tuple of the names of all Tcl interpreters currently registered for " +"a particular display. If *displayof* is given, the return value refers to " +"the display of that window; otherwise it refers to the display of the " +"application's main window." +msgstr "" + +#: library/tkinter.rst:2071 +msgid "Return true if the widget is currently mapped, false otherwise." +msgstr "" + +#: library/tkinter.rst:2075 +msgid "" +"Return the name of the geometry manager currently responsible for the " +"widget, or an empty string if it is not managed by any geometry manager." +msgstr "" + +#: library/tkinter.rst:2080 +msgid "" +"Return the widget's name within its parent, as opposed to its full path name." +msgstr "" + +#: library/tkinter.rst:2085 +msgid "" +"Return the path name of the widget's parent, or an empty string if the " +"widget is the main window of the application." +msgstr "" + +#: library/tkinter.rst:2090 +msgid "" +"Return the path name of the window whose identifier is *id*. If *displayof* " +"is given, the identifier is looked up on the display of that window; " +"otherwise it is looked up on the display of the application's main window." +msgstr "" + +#: library/tkinter.rst:2097 +msgid "" +"Return the number of pixels in the widget corresponding to the screen " +"distance *number* (for example, ``\"2.0c\"`` or ``\"1i\"``). The result is " +"rounded to the nearest integer; for a fractional result use :meth:" +"`winfo_fpixels`." +msgstr "" + +#: library/tkinter.rst:2104 +msgid "" +"Return the pointer's *x* coordinate, in pixels, relative to the screen's " +"root window (or virtual root, if one is in use). Return ``-1`` if the " +"pointer is not on the same screen as the widget." +msgstr "" + +#: library/tkinter.rst:2110 +msgid "" +"Return the pointer's coordinates as an ``(x, y)`` tuple, in pixels, relative " +"to the screen's root window (or virtual root, if one is in use). Both " +"coordinates are ``-1`` if the pointer is not on the same screen as the " +"widget." +msgstr "" + +#: library/tkinter.rst:2117 +msgid "" +"Return the pointer's *y* coordinate, in pixels, relative to the screen's " +"root window (or virtual root, if one is in use). Return ``-1`` if the " +"pointer is not on the same screen as the widget." +msgstr "" + +#: library/tkinter.rst:2123 +msgid "" +"Return the widget's requested height in pixels. This is the value used by " +"the widget's geometry manager to compute its geometry." +msgstr "" + +#: library/tkinter.rst:2129 +msgid "" +"Return the widget's requested width in pixels. This is the value used by the " +"widget's geometry manager to compute its geometry." +msgstr "" + +#: library/tkinter.rst:2135 +msgid "" +"Return an ``(r, g, b)`` tuple of the red, green, and blue intensities, in " +"the range 0 to 65535, that correspond to *color* in the widget. *color* may " +"be specified in any of the forms acceptable for a color option." +msgstr "" + +#: library/tkinter.rst:2142 +msgid "" +"Return the *x* coordinate, in the root window of the screen, of the upper-" +"left corner of the widget's border (or of the widget itself if it has no " +"border)." +msgstr "" + +#: library/tkinter.rst:2148 +msgid "" +"Return the *y* coordinate, in the root window of the screen, of the upper-" +"left corner of the widget's border (or of the widget itself if it has no " +"border)." +msgstr "" + +#: library/tkinter.rst:2154 +msgid "" +"Return the name of the screen associated with the widget, in the form " +"``displayName.screenIndex``." +msgstr "" + +#: library/tkinter.rst:2159 +msgid "" +"Return the number of cells in the default colormap for the widget's screen." +msgstr "" + +#: library/tkinter.rst:2164 +msgid "" +"Return the depth of the root window of the widget's screen, that is, the " +"number of bits per pixel." +msgstr "" + +#: library/tkinter.rst:2169 +msgid "Return the height of the widget's screen in pixels." +msgstr "" + +#: library/tkinter.rst:2173 +msgid "Return the height of the widget's screen in millimeters." +msgstr "" + +#: library/tkinter.rst:2177 +msgid "Return the width of the widget's screen in millimeters." +msgstr "" + +#: library/tkinter.rst:2181 +msgid "" +"Return the default visual class for the widget's screen, one of " +"``\"directcolor\"``, ``\"grayscale\"``, ``\"pseudocolor\"``, " +"``\"staticcolor\"``, ``\"staticgray\"``, or ``\"truecolor\"``." +msgstr "" + +#: library/tkinter.rst:2187 +msgid "Return the width of the widget's screen in pixels." +msgstr "" + +#: library/tkinter.rst:2191 +msgid "" +"Return a string containing information about the server for the widget's " +"display. The exact format of this string may vary from platform to platform." +msgstr "" + +#: library/tkinter.rst:2197 +msgid "" +"Return the top-of-hierarchy window containing the widget. In standard Tk " +"this is always a :class:`Toplevel` widget." +msgstr "" + +#: library/tkinter.rst:2202 +msgid "" +"Return true if the widget and all of its ancestors up through the nearest " +"toplevel window are mapped, false otherwise." +msgstr "" + +#: library/tkinter.rst:2207 +msgid "" +"Return the visual class for the widget, one of ``\"directcolor\"``, " +"``\"grayscale\"``, ``\"pseudocolor\"``, ``\"staticcolor\"``, " +"``\"staticgray\"``, or ``\"truecolor\"``." +msgstr "" + +#: library/tkinter.rst:2213 +msgid "Return the X identifier for the visual for the widget." +msgstr "" + +#: library/tkinter.rst:2217 +msgid "" +"Return a list describing the visuals available for the widget's screen. Each " +"item consists of a visual class (see :meth:`winfo_visual`) followed by an " +"integer depth. If *includeids* is true, the X identifier for the visual is " +"also included." +msgstr "" + +#: library/tkinter.rst:2225 +msgid "" +"Return the height of the virtual root window associated with the widget if " +"there is one; otherwise return the height of the widget's screen." +msgstr "" + +#: library/tkinter.rst:2230 +msgid "" +"Return the width of the virtual root window associated with the widget if " +"there is one; otherwise return the width of the widget's screen." +msgstr "" + +#: library/tkinter.rst:2235 +msgid "" +"Return the *x* offset of the virtual root window associated with the widget, " +"relative to the root window of its screen. This is normally zero or " +"negative, and is ``0`` if there is no virtual root window." +msgstr "" + +#: library/tkinter.rst:2242 +msgid "" +"Return the *y* offset of the virtual root window associated with the widget, " +"relative to the root window of its screen. This is normally zero or " +"negative, and is ``0`` if there is no virtual root window." +msgstr "" + +#: library/tkinter.rst:2249 +msgid "" +"Return the width of the widget in pixels. When a window is first created its " +"width is 1 pixel; it is eventually changed by a geometry manager. See also :" +"meth:`winfo_reqwidth`." +msgstr "" + +#: library/tkinter.rst:2256 +msgid "" +"Return the *x* coordinate, in the widget's parent, of the upper-left corner " +"of the widget's border (or of the widget itself if it has no border)." +msgstr "" + +#: library/tkinter.rst:2262 +msgid "" +"Return the *y* coordinate, in the widget's parent, of the upper-left corner " +"of the widget's border (or of the widget itself if it has no border)." +msgstr "" + +#: library/tkinter.rst:2268 +msgid "" +"Return the Tcl/Tk patch level as a named tuple with the same five fields as :" +"data:`sys.version_info`: *major*, *minor*, *micro*, *releaselevel* and " +"*serial*. *releaselevel* is ``'alpha'``, ``'beta'`` or ``'final'``. " +"Converting it to a string gives the version in the usual Tcl/Tk notation, " +"for example ``'9.0.3'`` for a final release or ``'9.1b2'`` for a pre-release." +msgstr "" + +#: library/tkinter.rst:2282 +msgid "" +"The :class:`!Wm` mixin provides access to the window manager, allowing an " +"application to control such things as the title, geometry and icon of a top-" +"level window, the way it is resized, and how it responds to window manager " +"protocols. It is mixed into :class:`Tk` and :class:`Toplevel`, so its " +"methods are available on every top-level window. Each method has two " +"equivalent spellings: a short name and a ``wm_``-prefixed name (for " +"example, :meth:`title` and :meth:`wm_title`). See also :ref:`tkinter-window-" +"manager`." +msgstr "" + +#: library/tkinter.rst:2297 +msgid "" +"Constrain the aspect ratio (the ratio of width to height) of the window. If " +"all four arguments are given, the window manager keeps the ratio between " +"``minNumer/minDenom`` and ``maxNumer/maxDenom``; passing empty strings " +"removes any existing restriction. With no arguments, return a tuple of the " +"four current values, or ``None`` if no aspect restriction is in effect. :" +"meth:`wm_aspect` is an alias of :meth:`!aspect`." +msgstr "" + +#: library/tkinter.rst:2310 +msgid "" +"Query or set platform-specific attributes of the window. With no arguments, " +"return the platform-specific flags and their values; pass " +"*return_python_dict* as true to get them as a dictionary. A single option " +"name such as ``'alpha'`` returns the value of that option, and options are " +"set using keyword arguments (``alpha=0.5``)." +msgstr "" + +#: library/tkinter.rst:2316 +msgid "The available attributes differ by platform. All platforms support:" +msgstr "" + +#: library/tkinter.rst:2319 +msgid "*alpha*" +msgstr "" + +#: library/tkinter.rst:2320 +msgid "" +"The window's opacity, from ``0.0`` (fully transparent) to ``1.0`` (opaque). " +"Where transparency is unsupported the value stays at ``1.0``." +msgstr "" + +#: library/tkinter.rst:2324 +msgid "*appearance*" +msgstr "" + +#: library/tkinter.rst:2325 +msgid "" +"Whether the window is rendered in dark mode on Windows and macOS: " +"``'auto'``, ``'light'`` or ``'dark'`` (this has no effect on X11)." +msgstr "" + +#: library/tkinter.rst:2328 +msgid "*fullscreen*" +msgstr "" + +#: library/tkinter.rst:2329 +msgid "Whether the window takes up the entire screen and has no borders." +msgstr "" + +#: library/tkinter.rst:2331 +msgid "*topmost*" +msgstr "" + +#: library/tkinter.rst:2332 +msgid "Whether the window is displayed above all other windows." +msgstr "" + +#: library/tkinter.rst:2334 +msgid "Windows additionally supports:" +msgstr "" + +#: library/tkinter.rst:2336 +msgid "*disabled*" +msgstr "" + +#: library/tkinter.rst:2337 +msgid "Whether the window is in a disabled state." +msgstr "" + +#: library/tkinter.rst:2339 +msgid "*toolwindow*" +msgstr "" + +#: library/tkinter.rst:2340 +msgid "Whether the window uses the tool window style." +msgstr "" + +#: library/tkinter.rst:2342 +msgid "*transparentcolor*" +msgstr "" + +#: library/tkinter.rst:2343 +msgid "The color that is made fully transparent, or an empty string for none." +msgstr "" + +#: library/tkinter.rst:2345 +msgid "macOS additionally supports:" +msgstr "" + +#: library/tkinter.rst:2347 +msgid "*class*" +msgstr "" + +#: library/tkinter.rst:2348 +msgid "" +"Whether the underlying Aqua window is an ``nswindow`` or an ``nspanel``; " +"this can only be set before the window is created." +msgstr "" + +#: library/tkinter.rst:2351 +msgid "*modified*" +msgstr "" + +#: library/tkinter.rst:2352 +msgid "" +"The modification state shown by the window's close button and proxy icon." +msgstr "" + +#: library/tkinter.rst:2355 +msgid "*notify*" +msgstr "" + +#: library/tkinter.rst:2356 +msgid "Whether the application's dock icon bounces to request attention." +msgstr "" + +#: library/tkinter.rst:2358 +msgid "*stylemask*" +msgstr "" + +#: library/tkinter.rst:2359 +msgid "" +"The style mask of the underlying Aqua window, given as a list of bit names " +"such as ``titled`` or ``resizable``." +msgstr "" + +#: library/tkinter.rst:2362 +msgid "*tabbingid*" +msgstr "" + +#: library/tkinter.rst:2363 +msgid "The identifier of the tab group that the window belongs to." +msgstr "" + +#: library/tkinter.rst:2365 +msgid "*tabbingmode*" +msgstr "" + +#: library/tkinter.rst:2366 +msgid "" +"Whether the window may be opened as a tab: ``'auto'``, ``'preferred'`` or " +"``'disallowed'``." +msgstr "" + +#: library/tkinter.rst:2369 +msgid "*titlepath*" +msgstr "" + +#: library/tkinter.rst:2370 +msgid "The path of the file represented by the window's proxy icon." +msgstr "" + +#: library/tkinter.rst:2372 +msgid "*transparent*" +msgstr "" + +#: library/tkinter.rst:2373 +msgid "" +"Whether the content area is transparent and the window shadow is turned off." +msgstr "" + +#: library/tkinter.rst:2376 +msgid "X11 additionally supports:" +msgstr "" + +#: library/tkinter.rst:2378 +msgid "*type*" +msgstr "" + +#: library/tkinter.rst:2379 +msgid "" +"The window type, or a list of types in order of preference, that the window " +"manager should use to interpret the window, such as ``'dialog'`` or " +"``'splash'``." +msgstr "" + +#: library/tkinter.rst:2383 +msgid "*zoomed*" +msgstr "" + +#: library/tkinter.rst:2384 +msgid "Whether the window is maximized." +msgstr "" + +#: library/tkinter.rst:2388 +msgid "" +"Tk 8.6 added the *type* attribute, and Tk 9.0 added the *appearance*, " +"*class*, *stylemask*, *tabbingid* and *tabbingmode* attributes." +msgstr "" + +#: library/tkinter.rst:2391 +msgid "" +"On X11 changes are applied asynchronously, so a queried value may not yet " +"reflect the most recent request. :meth:`wm_attributes` is an alias of :meth:" +"`!attributes`." +msgstr "" + +#: library/tkinter.rst:2395 +msgid "" +"A single attribute may now be queried by name without the leading ``-``, and " +"attributes may be set using keyword arguments. The *return_python_dict* " +"parameter was added." +msgstr "" + +#: library/tkinter.rst:2400 +msgid "" +"Setting an attribute by passing the option name (with a leading ``-``) and " +"its value as two positional arguments, as in ``w.attributes('-alpha', " +"0.5)``, is deprecated; use keyword arguments instead." +msgstr "" + +#: library/tkinter.rst:2412 +msgid "" +"Store *name*, which should be the name of the host on which the application " +"is running, in the window's ``WM_CLIENT_MACHINE`` property for use by the " +"window or session manager. An empty string deletes the property. With no " +"argument, return the last name set, or an empty string. :meth:`wm_client` is " +"an alias of :meth:`!client`." +msgstr "" + +#: library/tkinter.rst:2424 +msgid "" +"Manipulate the ``WM_COLORMAP_WINDOWS`` property, which tells the window " +"manager about windows that have private colormaps. If *wlist* is given, " +"overwrite the property with those windows (their order is a priority order " +"for installing colormaps). With no arguments, return the list of windows " +"currently named in the property. :meth:`wm_colormapwindows` is an alias of :" +"meth:`!colormapwindows`." +msgstr "" + +#: library/tkinter.rst:2437 +msgid "" +"Store *value* in the window's ``WM_COMMAND`` property for use by the window " +"or session manager; it should be a list giving the words of the command used " +"to invoke the application. An empty string deletes the property. With no " +"argument, return the last value set, or an empty string. :meth:`wm_command` " +"is an alias of :meth:`!command`." +msgstr "" + +#: library/tkinter.rst:2449 +msgid "" +"Display the window in normal (non-iconified) form by mapping it. If the " +"window has never been mapped, this ensures it appears de-iconified when it " +"is first mapped. On Windows the window is also raised and given the focus. :" +"meth:`wm_deiconify` is an alias of :meth:`!deiconify`." +msgstr "" + +#: library/tkinter.rst:2460 +msgid "" +"Set or query the focus model for the window. *model* is either ``'active'`` " +"(the window claims the input focus for itself or its descendants, even when " +"the focus is in another application) or ``'passive'`` (the window relies on " +"the window manager to give it the focus). With no argument, return the " +"current model. The default is ``'passive'``, which is what the :meth:`!" +"focus` command assumes. :meth:`wm_focusmodel` is an alias of :meth:`!" +"focusmodel`." +msgstr "" + +#: library/tkinter.rst:2475 +msgid "" +"Unmap *window* from the screen so that it is no longer managed by the window " +"manager. A :class:`Toplevel` is then treated like a :class:`Frame`, although " +"its ``-menu`` configuration is remembered and the menu reappears if the " +"widget is managed again. :meth:`wm_forget` is an alias of :meth:`!forget`." +msgstr "" + +#: library/tkinter.rst:2482 +msgid "Not to be confused with :meth:`Pack.forget`." +msgstr "" + +#: library/tkinter.rst:2491 +msgid "" +"Return the platform-specific window identifier for the outermost decorative " +"frame containing the window, if the window manager has reparented it into " +"such a frame; otherwise return the identifier of the window itself. :meth:" +"`wm_frame` is an alias of :meth:`!frame`." +msgstr "" + +#: library/tkinter.rst:2502 +msgid "" +"Set or query the geometry of the window. *newGeometry* has the form " +"``=widthxheight+x+y``, where any of ``=``, ``widthxheight`` and the ``+x+y`` " +"position may be omitted. *width* and *height* are in pixels (or grid units " +"for a gridded window); a position preceded by ``+`` is measured from the " +"left or top edge of the screen and one preceded by ``-`` from the right or " +"bottom edge. An offset can be negative, as in ``'200x100+-9+-8'``, when the " +"window edge is positioned beyond the corresponding screen edge. An empty " +"string cancels any user-specified geometry, letting the window revert to its " +"natural size. With no argument, return the current geometry as a string of " +"the form ``'200x200+10+10'``. :meth:`wm_geometry` is an alias of :meth:`!" +"geometry`." +msgstr "" + +#: library/tkinter.rst:2521 +msgid "" +"Manage the window as a gridded window and define the relationship between " +"grid units and pixels. *baseWidth* and *baseHeight* are the numbers of grid " +"units for the window's internally requested size, and *widthInc* and " +"*heightInc* are the pixel sizes of a horizontal and vertical grid unit. " +"Empty strings turn off gridded management. With no arguments, return a tuple " +"of the four current values, or ``None`` if the window is not gridded. :meth:" +"`wm_grid` is an alias of :meth:`!grid`." +msgstr "" + +#: library/tkinter.rst:2531 +msgid "Not to be confused with the grid geometry manager :meth:`Grid.grid`." +msgstr "" + +#: library/tkinter.rst:2538 +msgid "" +"Set or query the leader of a group of related windows. *pathName* gives the " +"path name of the group leader; the window manager may, for example, unmap " +"all windows in the group when the leader is iconified. An empty string " +"removes the window from any group. With no argument, return the path name of " +"the current group leader, or an empty string. :meth:`wm_group` is an alias " +"of :meth:`!group`." +msgstr "" + +#: library/tkinter.rst:2552 +msgid "" +"Set or query the bitmap used by the window manager for the window's icon. " +"*bitmap* names a bitmap in one of the standard forms accepted by Tk; an " +"empty string cancels the current icon bitmap. With no argument, return the " +"name of the current icon bitmap, or an empty string. On Windows the " +"*default* argument names an icon (for example an ``.ico`` file) applied to " +"all top-level windows that have no icon of their own. :meth:`wm_iconbitmap` " +"is an alias of :meth:`!iconbitmap`." +msgstr "" + +#: library/tkinter.rst:2566 +msgid "" +"Iconify the window. If the window has not yet been mapped for the first " +"time, arrange for it to appear in the iconified state when it is eventually " +"mapped. :meth:`wm_iconify` is an alias of :meth:`!iconify`." +msgstr "" + +#: library/tkinter.rst:2576 +msgid "" +"Set or query the bitmap used as a mask for the icon (see :meth:" +"`iconbitmap`). Where the mask is zero no icon is displayed; where it is one, " +"the corresponding bits of the icon bitmap are shown. An empty string cancels " +"the current mask. With no argument, return the name of the current icon " +"mask, or an empty string. :meth:`wm_iconmask` is an alias of :meth:`!" +"iconmask`." +msgstr "" + +#: library/tkinter.rst:2590 +msgid "" +"Set or query the name displayed by the window manager inside the window's " +"icon. With no argument, return the current icon name, or an empty string if " +"none has been set (in which case the window manager normally displays the " +"window's title). :meth:`wm_iconname` is an alias of :meth:`!iconname`." +msgstr "" + +#: library/tkinter.rst:2602 +msgid "" +"Set the titlebar icon for the window from one or more :class:`PhotoImage` " +"objects given in *images*. Several images of different sizes (for example " +"16x16 and 32x32) may be supplied so that the window manager can choose an " +"appropriate one. The image data is taken as a snapshot at the time of the " +"call; later changes to the images are not reflected. If *default* is true, " +"the icon is also applied to all top-level windows created in the future. On " +"macOS only the first image is used. :meth:`wm_iconphoto` is an alias of :" +"meth:`!iconphoto`." +msgstr "" + +#: library/tkinter.rst:2620 +msgid "" +"Set or query a hint to the window manager about where the window's icon " +"should be positioned. Empty strings cancel an existing hint. With no " +"arguments, return a tuple of the two current values, or ``None`` if no hint " +"is in effect. :meth:`wm_iconposition` is an alias of :meth:`!iconposition`." +msgstr "" + +#: library/tkinter.rst:2632 +msgid "" +"Set or query the window used as the icon for the window. When the window is " +"iconified, *pathName* is mapped to serve as its icon and unmapped again when " +"it is de-iconified. An empty string cancels the association. With no " +"argument, return the path name of the current icon window, or an empty " +"string. Not all window managers support icon windows, and the concept is " +"meaningless on non-X11 platforms. :meth:`wm_iconwindow` is an alias of :meth:" +"`!iconwindow`." +msgstr "" + +#: library/tkinter.rst:2647 +msgid "" +"Make *widget* a stand-alone top-level window, decorated by the window " +"manager with a title bar and so on. Only :class:`Frame`, :class:`LabelFrame` " +"and :class:`Toplevel` widgets may be used (the :mod:`tkinter.ttk` versions " +"are **not** accepted); passing any other widget type raises an error. :meth:" +"`wm_manage` is an alias of :meth:`!manage`." +msgstr "" + +#: library/tkinter.rst:2661 +msgid "" +"Set or query the maximum permissible dimensions of the window, in pixels (or " +"grid units for a gridded window). The window manager restricts the window to " +"be no larger than *width* and *height*. With no arguments, return a tuple of " +"the current maximum width and height. The maximum size defaults to the size " +"of the screen. :meth:`wm_maxsize` is an alias of :meth:`!maxsize`." +msgstr "" + +#: library/tkinter.rst:2675 +msgid "" +"Set or query the minimum permissible dimensions of the window, in pixels (or " +"grid units for a gridded window). The window manager restricts the window to " +"be no smaller than *width* and *height*. With no arguments, return a tuple " +"of the current minimum width and height. The minimum size defaults to one " +"pixel in each dimension. :meth:`wm_minsize` is an alias of :meth:`!minsize`." +msgstr "" + +#: library/tkinter.rst:2689 +msgid "" +"Set or query the override-redirect flag for the window. When this flag is " +"set, the window is ignored by the window manager: it is not reparented into " +"a decorative frame and the user cannot manipulate it through the usual " +"window manager controls. With no argument, return a boolean indicating " +"whether the flag is set, or ``None`` if it has not been set. The flag is " +"reliably honored only when the window is first mapped or remapped from the " +"withdrawn state. :meth:`wm_overrideredirect` is an alias of :meth:`!" +"overrideredirect`." +msgstr "" + +#: library/tkinter.rst:2704 +msgid "" +"Set or query the source of the window's current position. *who* is either " +"``'program'`` or ``'user'`` and indicates whether the position was requested " +"by the program or by the user; an empty string cancels the current source. " +"With no argument, return the current source, or an empty string if none has " +"been set. Tk automatically sets the source to ``'user'`` when :meth:" +"`geometry` is called, unless it has been set explicitly to ``'program'``. :" +"meth:`wm_positionfrom` is an alias of :meth:`!positionfrom`." +msgstr "" + +#: library/tkinter.rst:2719 +msgid "" +"Register *func* as the handler for the window manager protocol *name*, an " +"atom such as ``'WM_DELETE_WINDOW'``, ``'WM_SAVE_YOURSELF'`` or " +"``'WM_TAKE_FOCUS'``; *func* is then called whenever the window manager sends " +"a message of that protocol. Tk installs a default ``WM_DELETE_WINDOW`` " +"handler that destroys the window, which this method can replace. If *func* " +"is an empty string, the handler is removed. With only *name*, return the " +"name of its registered handler command, or an empty string if none is set " +"(the default ``WM_DELETE_WINDOW`` handler is not reported); with no " +"arguments, return a tuple of the protocols that currently have handlers. :" +"meth:`wm_protocol` is an alias of :meth:`!protocol`." +msgstr "" + +#: library/tkinter.rst:2737 +msgid "" +"Control whether the user may interactively resize the window. *width* and " +"*height* are boolean values that determine whether the window's width and " +"height may be changed. With no arguments, return a tuple of two ``0``/``1`` " +"values indicating whether each dimension is currently resizable. By default " +"a window is resizable in both dimensions. :meth:`wm_resizable` is an alias " +"of :meth:`!resizable`." +msgstr "" + +#: library/tkinter.rst:2750 +msgid "" +"Set or query the source of the window's current size. *who* is either " +"``'program'`` or ``'user'`` and indicates whether the size was requested by " +"the program or by the user; an empty string cancels the current source. With " +"no argument, return the current source, or an empty string if none has been " +"set. :meth:`wm_sizefrom` is an alias of :meth:`!sizefrom`." +msgstr "" + +#: library/tkinter.rst:2763 +msgid "" +"Set or query the state of the window. With no argument, return the current " +"state: one of ``'normal'``, ``'iconic'``, ``'withdrawn'``, ``'icon'`` or, on " +"Windows and macOS only, ``'zoomed'``. ``'iconic'`` refers to a window that " +"has been iconified, while ``'icon'`` refers to a window serving as the icon " +"for another window (see :meth:`iconwindow`); the ``'icon'`` state cannot be " +"set. :meth:`wm_state` is an alias of :meth:`!state`." +msgstr "" + +#: library/tkinter.rst:2772 +msgid "" +"Not to be confused with :meth:`ttk.Widget.state `." +msgstr "" + +#: library/tkinter.rst:2780 +msgid "" +"Set or query the title for the window, which the window manager should " +"display in the window's title bar. With no argument, return the current " +"title. The title defaults to the window's name. :meth:`wm_title` is an alias " +"of :meth:`!title`." +msgstr "" + +#: library/tkinter.rst:2791 +msgid "" +"Mark the window as a transient window (such as a pull-down menu or dialog) " +"working on behalf of *master*, the path name of another top-level window. An " +"empty string clears the transient status. With no argument, return the path " +"name of the current master, or an empty string. A transient window mirrors " +"state changes in its master and may be decorated differently by the window " +"manager; it is an error to make a window a transient of itself. :meth:" +"`wm_transient` is an alias of :meth:`!transient`." +msgstr "" + +#: library/tkinter.rst:2807 +msgid "" +"Withdraw the window from the screen, unmapping it and causing the window " +"manager to forget about it. If the window has never been mapped, it is " +"instead mapped in the withdrawn state. It is sometimes necessary to withdraw " +"a window and then re-map it (for example with :meth:`deiconify`) to make " +"some window managers notice changes to window attributes. :meth:" +"`wm_withdraw` is an alias of :meth:`!withdraw`." +msgstr "" + +#: library/tkinter.rst:2819 +msgid "" +"Geometry manager that arranges widgets by packing them against the sides of " +"their container. The :class:`!Pack` mix-in is inherited by all widgets " +"(through :class:`Widget`) and provides the methods for managing a widget " +"with the *pack* geometry manager. See also :ref:`tkinter-geometry-" +"management`." +msgstr "" + +#: library/tkinter.rst:2828 +msgid "" +":class:`Pack`, :class:`Place` and :class:`Grid` all define the short method " +"names :meth:`!forget`, :meth:`!info`, :meth:`!slaves`, :meth:`!content` and :" +"meth:`!propagate`. On a widget the bare names resolve to the *pack* " +"manager's versions, since :class:`Pack` and :class:`Misc` precede :class:" +"`Place` and :class:`Grid` in the method resolution order, whatever manager " +"actually manages the widget; and :meth:`!configure`/:meth:`!config` " +"configure the widget's options, not its geometry. Use the explicit " +"``pack_*``, ``grid_*`` and ``place_*`` methods (and ``pack``, ``grid``, " +"``place`` for geometry configuration) to act on a specific geometry manager." +msgstr "" + +#: library/tkinter.rst:2850 +msgid "" +"Pack the widget inside its container, positioning it relative to the " +"siblings already packed there. The supported options are:" +msgstr "" + +#: library/tkinter.rst:2854 +msgid "*side*" +msgstr "" + +#: library/tkinter.rst:2855 +msgid "" +"Which side of the container to pack the widget against: ``'top'`` (the " +"default), ``'bottom'``, ``'left'`` or ``'right'``." +msgstr "" + +#: library/tkinter.rst:3482 +msgid "*fill*" +msgstr "" + +#: library/tkinter.rst:2859 +msgid "" +"Whether to stretch the widget to fill its parcel: ``'none'`` (the default), " +"``'x'``, ``'y'`` or ``'both'``." +msgstr "" + +#: library/tkinter.rst:2862 +msgid "*expand*" +msgstr "" + +#: library/tkinter.rst:2863 +msgid "" +"Whether the widget should expand to consume any extra space in its container " +"(a boolean, default false)." +msgstr "" + +#: library/tkinter.rst:2972 library/tkinter.rst:3611 library/tkinter.rst:3639 +msgid "*anchor*" +msgstr "" + +#: library/tkinter.rst:2867 +msgid "" +"Where to position the widget in its parcel when the parcel is larger than " +"the widget: an anchor such as ``'n'`` or ``'sw'`` (default ``'center'``)." +msgstr "" + +#: library/tkinter.rst:3066 +msgid "*ipadx*, *ipady*" +msgstr "" + +#: library/tkinter.rst:3067 +msgid "" +"Internal padding added on the left and right (*ipadx*) or top and bottom " +"(*ipady*) of the widget, as a screen distance (default ``0``)." +msgstr "" + +#: library/tkinter.rst:3070 +msgid "*padx*, *pady*" +msgstr "" + +#: library/tkinter.rst:3071 +msgid "" +"External padding left on the left and right (*padx*) or top and bottom " +"(*pady*) of the widget, as a screen distance or a pair of two distances for " +"the two sides (default ``0``)." +msgstr "" + +#: library/tkinter.rst:2880 +msgid "*after*" +msgstr "" + +#: library/tkinter.rst:2881 +msgid "" +"Pack the widget after the given widget in the packing order, using the same " +"container." +msgstr "" + +#: library/tkinter.rst:2884 +msgid "*before*" +msgstr "" + +#: library/tkinter.rst:2885 +msgid "" +"Pack the widget before the given widget in the packing order, using the same " +"container." +msgstr "" + +#: library/tkinter.rst:2992 library/tkinter.rst:3075 +msgid "*in_*" +msgstr "" + +#: library/tkinter.rst:2889 +msgid "" +"The container in which to pack the widget; it defaults to the parent widget." +msgstr "" + +#: library/tkinter.rst:2892 +msgid "" +":meth:`pack`, :meth:`configure` and :meth:`config` are aliases of :meth:`!" +"pack_configure`." +msgstr "" + +#: library/tkinter.rst:2900 +msgid "" +"Unmap the widget and remove it from the packing order, forgetting its " +"packing options. It can be packed again later with :meth:`pack_configure`. :" +"meth:`forget` is an alias of :meth:`!pack_forget`, except on :class:" +"`PanedWindow`, :class:`ttk.Notebook ` and :class:`ttk." +"PanedWindow `, which provide their own :meth:`!" +"forget` method." +msgstr "" + +#: library/tkinter.rst:2909 +msgid "Not to be confused with :meth:`Wm.forget`." +msgstr "" + +#: library/tkinter.rst:2916 +msgid "" +"Return a dictionary of the widget's current packing options. :meth:`info` is " +"an alias of :meth:`!pack_info`." +msgstr "" + +#: library/tkinter.rst:2926 +msgid "" +"Same as :meth:`Misc.pack_propagate`, treating this widget as a container: " +"enable or disable geometry propagation. :meth:`propagate` is an alias of :" +"meth:`!pack_propagate`." +msgstr "" + +#: library/tkinter.rst:2935 +msgid "" +"Same as :meth:`Misc.pack_slaves`: return the list of widgets packed in this " +"widget. :meth:`slaves` is an alias of :meth:`!pack_slaves`." +msgstr "" + +#: library/tkinter.rst:2942 +msgid "" +"Geometry manager that places widgets at explicit positions and sizes within " +"their container. The :class:`!Place` mix-in is inherited by all widgets " +"(through :class:`Widget`). See also :ref:`tkinter-geometry-management`." +msgstr "" + +#: library/tkinter.rst:2957 +msgid "" +"Place the widget inside its container at an absolute or relative position. " +"The supported options are:" +msgstr "" + +#: library/tkinter.rst:2961 +msgid "*x*, *y*" +msgstr "" + +#: library/tkinter.rst:2962 +msgid "" +"The absolute horizontal and vertical position of the widget's anchor point, " +"as a screen distance (default ``0``)." +msgstr "" + +#: library/tkinter.rst:2965 +msgid "*relx*, *rely*" +msgstr "" + +#: library/tkinter.rst:2966 +msgid "" +"The horizontal and vertical position of the widget's anchor point as a " +"fraction of the container's width and height, where ``0.0`` is the left or " +"top edge and ``1.0`` is the right or bottom edge. If both the absolute and " +"the relative option are given, their values are summed." +msgstr "" + +#: library/tkinter.rst:2973 +msgid "" +"Which point of the widget is placed at the given position: an anchor such as " +"``'n'`` or ``'se'`` (default ``'nw'``)." +msgstr "" + +#: library/tkinter.rst:3642 +msgid "*width*, *height*" +msgstr "" + +#: library/tkinter.rst:2977 +msgid "" +"The absolute width and height of the widget, as a screen distance. By " +"default the widget's requested size is used." +msgstr "" + +#: library/tkinter.rst:2980 +msgid "*relwidth*, *relheight*" +msgstr "" + +#: library/tkinter.rst:2981 +msgid "" +"The width and height of the widget as a fraction of the container's width " +"and height. If both the absolute and the relative option are given, their " +"values are summed." +msgstr "" + +#: library/tkinter.rst:2986 +msgid "*bordermode*" +msgstr "" + +#: library/tkinter.rst:2987 +msgid "" +"How the container's border affects placement: ``'inside'`` (the default) " +"measures the area inside the border, ``'outside'`` measures the area " +"including the border, and ``'ignore'`` uses the official X area." +msgstr "" + +#: library/tkinter.rst:2993 +msgid "" +"The container relative to which the widget is placed; it must be the " +"widget's parent or a descendant of the parent, and defaults to the parent." +msgstr "" + +#: library/tkinter.rst:2997 +msgid "" +":meth:`place`, :meth:`configure` and :meth:`config` are aliases of :meth:`!" +"place_configure`." +msgstr "" + +#: library/tkinter.rst:3005 +msgid "" +"Unmap the widget and remove it from the placement, forgetting its place " +"options." +msgstr "" + +#: library/tkinter.rst:3013 +msgid "Return a dictionary of the widget's current place options." +msgstr "" + +#: library/tkinter.rst:3020 +msgid "" +"Same as :meth:`Misc.place_slaves`: return the list of widgets placed in this " +"widget." +msgstr "" + +#: library/tkinter.rst:3026 +msgid "" +"Geometry manager that arranges widgets in a two-dimensional grid of rows and " +"columns within their container. The :class:`!Grid` mix-in is inherited by " +"all widgets (through :class:`Widget`). See also :ref:`tkinter-geometry-" +"management`." +msgstr "" + +#: library/tkinter.rst:3041 +msgid "Position the widget in a cell of its container's grid." +msgstr "" + +#: library/tkinter.rst:3043 +msgid "Not to be confused with :meth:`Wm.grid`." +msgstr "" + +#: library/tkinter.rst:3045 +msgid "The supported options are:" +msgstr "" + +#: library/tkinter.rst:3047 +msgid "*row*, *column*" +msgstr "" + +#: library/tkinter.rst:3048 +msgid "" +"The row and column of the cell to place the widget in, counting from ``0``. " +"*column* defaults to the column after the previous widget placed in the " +"same :meth:`!grid_configure` call (or ``0``), and *row* defaults to the next " +"empty row." +msgstr "" + +#: library/tkinter.rst:3054 +msgid "*rowspan*, *columnspan*" +msgstr "" + +#: library/tkinter.rst:3055 +msgid "The number of rows and columns the widget should span (default ``1``)." +msgstr "" + +#: library/tkinter.rst:3057 +msgid "*sticky*" +msgstr "" + +#: library/tkinter.rst:3058 +msgid "" +"How to position or stretch the widget when its cell is larger than the " +"widget: a string containing zero or more of the characters ``'n'``, ``'s'``, " +"``'e'`` and ``'w'``, naming the cell sides the widget sticks to. Specifying " +"both ``'n'`` and ``'s'`` (or ``'e'`` and ``'w'``) stretches the widget to " +"fill the height (or width) of the cell. The default is ``''``, which centers " +"the widget at its requested size." +msgstr "" + +#: library/tkinter.rst:3076 +msgid "" +"The container in whose grid to place the widget; it defaults to the parent " +"widget." +msgstr "" + +#: library/tkinter.rst:3079 +msgid "" +":meth:`grid`, :meth:`configure` and :meth:`config` are aliases of :meth:`!" +"grid_configure`." +msgstr "" + +#: library/tkinter.rst:3087 +msgid "" +"Unmap the widget and remove it from the grid, forgetting its grid options." +msgstr "" + +#: library/tkinter.rst:3092 +msgid "" +"Unmap the widget and remove it from the grid, but remember its grid options " +"so that it is restored to the same cell if it is gridded again." +msgstr "" + +#: library/tkinter.rst:3100 +msgid "Return a dictionary of the widget's current grid options." +msgstr "" + +#: library/tkinter.rst:3107 +msgid "" +"Same as :meth:`Misc.grid_bbox`. :meth:`bbox` is an alias of :meth:`!" +"grid_bbox`, except on :class:`Canvas`, :class:`Listbox`, :class:`Spinbox`, :" +"class:`Text`, :class:`ttk.Entry ` and :class:`ttk." +"Treeview `, which provide their own :meth:`!bbox` " +"method." +msgstr "" + +#: library/tkinter.rst:3119 +msgid "" +"Same as :meth:`Misc.grid_columnconfigure`: query or set the options (such as " +"*weight*, *minsize*, *pad* and *uniform*) of a grid column. :meth:" +"`columnconfigure` is an alias of :meth:`!grid_columnconfigure`." +msgstr "" + +#: library/tkinter.rst:3128 +msgid "" +"Same as :meth:`Misc.grid_rowconfigure`: query or set the options of a grid " +"row. :meth:`rowconfigure` is an alias of :meth:`!grid_rowconfigure`." +msgstr "" + +#: library/tkinter.rst:3137 +msgid "" +"Same as :meth:`Misc.grid_location`: return the ``(column, row)`` of the cell " +"that covers the pixel at *x*, *y*. :meth:`location` is an alias of :meth:`!" +"grid_location`." +msgstr "" + +#: library/tkinter.rst:3146 +msgid "" +"Same as :meth:`Misc.grid_size`: return a ``(columns, rows)`` tuple giving " +"the size of the grid. :meth:`size` is an alias of :meth:`!grid_size`, except " +"on the :class:`Listbox` widget, which provides its own :meth:`!size` method." +msgstr "" + +#: library/tkinter.rst:3159 +msgid "Same as :meth:`Misc.grid_propagate`." +msgstr "" + +#: library/tkinter.rst:3166 +msgid "" +"Same as :meth:`Misc.grid_slaves`: return the widgets managed in the grid, " +"optionally restricted to a *row* and/or *column*." +msgstr "" + +#: library/tkinter.rst:3172 +msgid "" +"Mix-in providing the horizontal-scrolling interface shared by widgets such " +"as :class:`Entry`, :class:`Canvas`, :class:`Listbox`, :class:`Text` and :" +"class:`Spinbox`. A widget's :meth:`xview` method is registered as the " +"*command* of a horizontal :class:`Scrollbar`." +msgstr "" + +#: library/tkinter.rst:3180 +msgid "" +"Query or change the horizontal position of the view. With no arguments, " +"return a tuple ``(first, last)`` of two fractions between 0 and 1 giving the " +"portion of the document that is currently visible. Otherwise the arguments " +"are passed to the Tk ``xview`` widget command and are usually generated by a " +"scrollbar; :meth:`xview_moveto` and :meth:`xview_scroll` provide a more " +"convenient interface." +msgstr "" + +#: library/tkinter.rst:3190 +msgid "" +"Adjust the view so that *fraction* of the total width of the document is off-" +"screen to the left. *fraction* is a number between 0 and 1." +msgstr "" + +#: library/tkinter.rst:3196 +msgid "" +"Shift the view left or right by *number* units. *what* is either ``'units'`` " +"or ``'pages'``; a negative *number* scrolls left and a positive one scrolls " +"right." +msgstr "" + +#: library/tkinter.rst:3203 +msgid "" +"Mix-in providing the vertical-scrolling interface shared by widgets such as :" +"class:`Canvas`, :class:`Listbox` and :class:`Text`. A widget's :meth:`yview` " +"method is registered as the *command* of a vertical :class:`Scrollbar`." +msgstr "" + +#: library/tkinter.rst:3210 +msgid "" +"Query or change the vertical position of the view. With no arguments, return " +"a tuple ``(first, last)`` of two fractions between 0 and 1 giving the " +"portion of the document that is currently visible. Otherwise the arguments " +"are passed to the Tk ``yview`` widget command, usually generated by a " +"scrollbar; :meth:`yview_moveto` and :meth:`yview_scroll` provide a more " +"convenient interface." +msgstr "" + +#: library/tkinter.rst:3220 +msgid "" +"Adjust the view so that *fraction* of the total height of the document is " +"off-screen above the top. *fraction* is a number between 0 and 1." +msgstr "" + +#: library/tkinter.rst:3226 +msgid "" +"Shift the view up or down by *number* units. *what* is either ``'units'`` or " +"``'pages'``; a negative *number* scrolls up and a positive one scrolls down." +msgstr "" + +#: library/tkinter.rst:3233 +msgid "" +"Internal base class for all widgets. It inherits from :class:`Misc` and adds " +"the machinery that creates the underlying Tk widget; application code " +"normally uses :class:`Widget` or a concrete widget class rather than " +"instantiating :class:`!BaseWidget` directly." +msgstr "" + +#: library/tkinter.rst:3241 +msgid "" +"Destroy this widget and all of its children, removing the corresponding Tk " +"widgets and deleting the associated Tcl commands." +msgstr "" + +#: library/tkinter.rst:3247 +msgid "" +"Internal base class for the standard widgets. It combines :class:" +"`BaseWidget` with the geometry-manager mix-ins :class:`Pack`, :class:`Place` " +"and :class:`Grid`, so that every widget can be managed by any of the three " +"geometry managers. The concrete widget classes (:class:`Button`, :class:" +"`Label`, and so on) derive from :class:`!Widget`." +msgstr "" + +#: library/tkinter.rst:3256 +msgid "Toplevel widgets" +msgstr "" + +#: library/tkinter.rst:3260 +msgid "" +"Construct a toplevel Tk widget, which is usually the main window of an " +"application, and initialize a Tcl interpreter for this widget. Each " +"instance has its own associated Tcl interpreter. Inherits from :class:`Misc` " +"and :class:`Wm`." +msgstr "" + +#: library/tkinter.rst:3265 +msgid "" +"To create a Tcl interpreter without initializing the Tk subsystem, use the :" +"func:`Tcl` factory function instead." +msgstr "" + +#: library/tkinter.rst:3268 +msgid "" +"The :class:`Tk` class is typically instantiated using all default values. " +"However, the following keyword arguments are currently recognized:" +msgstr "" + +#: library/tkinter.rst:3271 +msgid "*screenName*" +msgstr "" + +#: library/tkinter.rst:3272 +msgid "" +"When given (as a string), sets the :envvar:`DISPLAY` environment variable. " +"(X11 only)" +msgstr "" + +#: library/tkinter.rst:3274 +msgid "*baseName*" +msgstr "" + +#: library/tkinter.rst:3275 +msgid "" +"Name of the profile file. By default, *baseName* is derived from the " +"program name (``sys.argv[0]``)." +msgstr "" + +#: library/tkinter.rst:3277 +msgid "*className*" +msgstr "" + +#: library/tkinter.rst:3278 +msgid "" +"Name of the widget class. Used as a profile file and also as the name with " +"which Tcl is invoked (*argv0* in *interp*)." +msgstr "" + +#: library/tkinter.rst:3280 +msgid "*useTk*" +msgstr "" + +#: library/tkinter.rst:3281 +msgid "" +"If ``True``, initialize the Tk subsystem. The :func:`tkinter.Tcl() ` " +"function sets this to ``False``." +msgstr "" + +#: library/tkinter.rst:3283 +msgid "*sync*" +msgstr "" + +#: library/tkinter.rst:3284 +msgid "" +"If ``True``, execute all X server commands synchronously, so that errors are " +"reported immediately. Can be used for debugging. (X11 only)" +msgstr "" + +#: library/tkinter.rst:3286 +msgid "*use*" +msgstr "" + +#: library/tkinter.rst:3287 +msgid "" +"Specifies the *id* of the window in which to embed the application, instead " +"of it being created as an independent toplevel window. *id* must be " +"specified in the same way as the value for the -use option for toplevel " +"widgets (that is, it has a form like that returned by :meth:`~Misc." +"winfo_id`)." +msgstr "" + +#: library/tkinter.rst:3293 +msgid "" +"Note that on some platforms this will only work correctly if *id* refers to " +"a Tk frame or toplevel that has its -container option enabled." +msgstr "" + +#: library/tkinter.rst:3296 +msgid "" +":class:`Tk` reads and interprets profile files, named :file:`.{className}." +"tcl` and :file:`.{baseName}.tcl`, into the Tcl interpreter and calls :func:" +"`exec` on the contents of :file:`.{className}.py` and :file:`.{baseName}." +"py`. The path for the profile files is the :envvar:`HOME` environment " +"variable or, if that isn't defined, then :data:`os.curdir`." +msgstr "" + +#: library/tkinter.rst:3305 +msgid "" +"On Windows, creating a Tcl interpreter (by instantiating :class:`Tk` or " +"calling :func:`Tcl`) sets the :envvar:`HOME` environment variable for the " +"process, if it is not already set, to ``%HOMEDRIVE%%HOMEPATH%`` (or :envvar:" +"`USERPROFILE`, or ``c:\\``). This is done by Tcl and can affect other code " +"that reads :envvar:`HOME`." +msgstr "" + +#: library/tkinter.rst:3313 +msgid "" +"The Tk application object created by instantiating :class:`Tk`. This " +"provides access to the Tcl interpreter. Each widget that is attached the " +"same instance of :class:`Tk` has the same value for its :attr:`tk` attribute." +msgstr "" + +#: library/tkinter.rst:3320 +msgid "" +"The widget object that contains this widget. For :class:`Tk`, the :attr:`!" +"master` is :const:`None` because it is the main window. The terms *master* " +"and *parent* are similar and sometimes used interchangeably as argument " +"names; however, calling :meth:`~Misc.winfo_parent` returns a string of the " +"widget name whereas :attr:`!master` returns the object. *parent*/*child* " +"reflects the tree-like relationship while *master* (or *container*)/" +"*content* reflects the container structure." +msgstr "" + +#: library/tkinter.rst:3332 +msgid "" +"The immediate descendants of this widget as a :class:`dict` with the child " +"widget names as the keys and the child instance objects as the values." +msgstr "" + +#: library/tkinter.rst:3338 +msgid "" +"Destroy this and all descendant widgets and, for the main window, end the " +"connection to the underlying Tcl interpreter." +msgstr "" + +#: library/tkinter.rst:3343 +msgid "" +"Finish loading and initializing the Tk subsystem. This is needed only when " +"the interpreter was created without Tk (for example through :func:`Tcl`); it " +"is called automatically when *useTk* is true." +msgstr "" + +#: library/tkinter.rst:3350 +msgid "" +"Read and source the user's profile files :file:`.{className}.tcl` and :file:" +"`.{baseName}.tcl` into the Tcl interpreter, and execute the corresponding :" +"file:`.{className}.py` and :file:`.{baseName}.py` files. This is called " +"during initialization; see the description of the constructor above." +msgstr "" + +#: library/tkinter.rst:3358 +msgid "" +"Report a callback exception. This is called when an exception propagates out " +"of a Tkinter callback; *exc*, *val* and *tb* are the exception type, value " +"and traceback as returned by :func:`sys.exc_info`. The default " +"implementation prints a traceback to :data:`sys.stderr`. It can be " +"overridden to customize error handling, for example to display the traceback " +"in a dialog." +msgstr "" + +#: library/tkinter.rst:3369 +msgid "" +"A :class:`!Toplevel` widget is a top-level window, similar to a :class:" +"`Frame` except that its X parent is the root window of a screen rather than " +"its logical parent. Its primary purpose is to serve as a container for " +"dialog boxes and other collections of widgets; its only visible features are " +"its background and an optional 3-D border. Notable options include *menu*, " +"which installs a :class:`Menu` as the window's menubar. Inherits from :class:" +"`BaseWidget` and :class:`Wm`, so a toplevel is managed by the window " +"manager. Refer to the Tk ``toplevel`` manual page for the full list of " +"options." +msgstr "" + +#: library/tkinter.rst:3383 +msgid "Widget classes" +msgstr "" + +#: library/tkinter.rst:3387 +msgid "" +"A :class:`!Button` widget displays a textual string, bitmap or image and " +"invokes a command when the user presses it (by clicking mouse button 1 over " +"the button or, when the button has focus, by pressing the space key). " +"Inherits from :class:`Widget`. In addition to the standard widget options, a " +"button accepts the options documented in the Tk ``button`` manual page, such " +"as *command* (the callback invoked when the button is pressed), " +"*textvariable*, *state* and *default*." +msgstr "" + +#: library/tkinter.rst:3397 +msgid "" +"Invoke the command associated with the button, if there is one, and return " +"its result, or an empty string if no command is associated with the button. " +"This is ignored if the button's state is ``disabled``." +msgstr "" + +#: library/tkinter.rst:3404 +msgid "" +"Flash the button by redisplaying it several times, alternating between the " +"active and normal colors. At the end of the flash the button is left in the " +"same normal or active state as when the method was called. This is ignored " +"if the button's state is ``disabled``." +msgstr "" + +#: library/tkinter.rst:3413 +msgid "" +"A :class:`!Canvas` widget implements structured graphics. It displays any " +"number of *items*, such as arcs, lines, ovals, polygons, rectangles, text, " +"bitmaps, images and embedded windows, which may be drawn, moved, re-colored " +"and bound to events. Inherits from :class:`Widget`, :class:`XView` and :" +"class:`YView`, so the view can be scrolled horizontally and vertically with :" +"meth:`~XView.xview` and :meth:`~YView.yview`. Refer to the Tk ``canvas`` " +"manual page for the full list of widget and item options." +msgstr "" + +#: library/tkinter.rst:3423 +msgid "" +"Each item has a unique integer *id*, assigned when it is created, and zero " +"or more string *tags*. A tag is an arbitrary string that does not have the " +"form of an integer; the same tag may be shared by many items, which makes " +"tags convenient for grouping items. The special tag ``'all'`` matches every " +"item in the canvas, and ``'current'`` matches the topmost item under the " +"mouse pointer. Most methods take a *tagOrId* argument that may be an integer " +"id naming a single item, or a tag naming zero or more items; as described in " +"the Tk ``canvas`` manual page, a tag may also be a logical expression of " +"tags combined with the operators ``&&``, ``||``, ``^``, ``!`` and " +"parentheses. When a method that operates on a single item is given a " +"*tagOrId* matching several items, it normally uses the lowest matching item " +"in the display list." +msgstr "" + +#: library/tkinter.rst:3438 +msgid "" +"The items are kept in a *display list* that determines drawing order: items " +"later in the list are drawn on top of earlier ones. A newly created item is " +"placed at the top of the list; the order can be changed with :meth:" +"`tag_raise` and :meth:`tag_lower`." +msgstr "" + +#: library/tkinter.rst:3453 +msgid "" +"Create a new item of the corresponding type and return its integer id. Each " +"method is called as ``create_TYPE(coord..., **options)``: the leading " +"positional arguments give the coordinates that define the item (as separate " +"numbers, as a single sequence of numbers, or as coordinate pairs), and the " +"keyword arguments set item-specific options. Coordinates and screen " +"distances may be given as numbers (interpreted as pixels) or as strings with " +"a unit suffix (``'m'``, ``'c'``, ``'i'`` or ``'p'`` for millimetres, " +"centimetres, inches or printer's points), but are always stored and returned " +"in pixels." +msgstr "" + +#: library/tkinter.rst:3463 +msgid "" +"The item types are: ``arc`` (an arc-shaped region that is a section of an " +"oval, defined by two diagonally opposite corners ``x1, y1, x2, y2`` of the " +"enclosing rectangle); ``bitmap`` (a two-color bitmap positioned at a point " +"``x, y``); ``image`` (a Tk image positioned at a point ``x, y``); ``line`` " +"(a line or curve through the points ``x1, y1, ..., xn, yn``); ``oval`` (a " +"circle or ellipse inscribed in the rectangle ``x1, y1, x2, y2``); " +"``polygon`` (a closed polygon through the points ``x1, y1, ..., xn, yn``); " +"``rectangle`` (a rectangle with corners ``x1, y1, x2, y2``); ``text`` (a " +"string of text positioned at a point ``x, y``); and ``window`` (a child " +"widget embedded in the canvas at a point ``x, y``, specified with the " +"*window* option)." +msgstr "" + +#: library/tkinter.rst:3475 +msgid "" +"Most item types accept a common set of *standard item options*, plus a few " +"options specific to each type. Option names are passed as keyword arguments, " +"without the leading hyphen." +msgstr "" + +#: library/tkinter.rst:3480 +msgid "The standard item options are:" +msgstr "" + +#: library/tkinter.rst:3483 +msgid "" +"The color used to fill the item's interior, or to draw a *line* item or the " +"characters of a *text* item. An empty string (the default for all types " +"except *line* and *text*) leaves the item unfilled." +msgstr "" + +#: library/tkinter.rst:3488 +msgid "*outline*" +msgstr "" + +#: library/tkinter.rst:3489 +msgid "" +"The color used to draw the item's outline. An empty string draws no outline." +msgstr "" + +#: library/tkinter.rst:3596 +msgid "*width*" +msgstr "" + +#: library/tkinter.rst:3493 +msgid "" +"The width of the outline, defaulting to ``1.0``. Has no effect if *outline* " +"is empty." +msgstr "" + +#: library/tkinter.rst:3496 +msgid "*dash*" +msgstr "" + +#: library/tkinter.rst:3497 +msgid "" +"A dash pattern for the outline, given either as a sequence of segment " +"lengths in pixels or as a string of the characters ``'.'``, ``','``, " +"``'-'``, ``'_'`` and space. An empty pattern (the default) draws a solid " +"outline." +msgstr "" + +#: library/tkinter.rst:3502 +msgid "*dashoffset*" +msgstr "" + +#: library/tkinter.rst:3503 +msgid "" +"The starting offset in pixels into the *dash* pattern. Ignored if there is " +"no *dash* pattern." +msgstr "" + +#: library/tkinter.rst:3506 +msgid "*stipple*" +msgstr "" + +#: library/tkinter.rst:3507 +msgid "" +"A bitmap used as a stipple pattern when filling the item. Only well " +"supported on X11." +msgstr "" + +#: library/tkinter.rst:3510 +msgid "*outlinestipple*" +msgstr "" + +#: library/tkinter.rst:3511 +msgid "" +"A bitmap used as a stipple pattern when drawing the outline. Has no effect " +"if *outline* is empty." +msgstr "" + +#: library/tkinter.rst:3514 +msgid "*offset*, *outlineoffset*" +msgstr "" + +#: library/tkinter.rst:3515 +msgid "" +"The offset of the fill and outline stipple patterns, given as ``'x,y'`` or " +"as a side such as ``'n'``, ``'se'`` or ``'center'``. Stipple offsets are " +"only supported on X11." +msgstr "" + +#: library/tkinter.rst:4469 +msgid "*state*" +msgstr "" + +#: library/tkinter.rst:3520 +msgid "" +"Overrides the canvas state for this item; one of ``'normal'``, " +"``'disabled'`` or ``'hidden'``." +msgstr "" + +#: library/tkinter.rst:3523 +msgid "*tags*" +msgstr "" + +#: library/tkinter.rst:3524 +msgid "" +"A single tag or a sequence of tags to associate with the item, replacing any " +"existing tags." +msgstr "" + +#: library/tkinter.rst:3527 +msgid "" +"Many of these options have *active...* and *disabled...* variants (such as " +"*activefill*, *disabledfill*, *activewidth*, *disableddash*, " +"*activeoutline*, *disabledstipple*) that override the base option when the " +"item is the active item (under the mouse pointer) or is in the disabled " +"state." +msgstr "" + +#: library/tkinter.rst:3533 +msgid "The following item types support additional options." +msgstr "" + +#: library/tkinter.rst:3535 +msgid "For ``arc`` items:" +msgstr "" + +#: library/tkinter.rst:3537 +msgid "*start*" +msgstr "" + +#: library/tkinter.rst:3538 +msgid "" +"The start of the arc's angular range, in degrees measured counter-clockwise " +"from the 3-o'clock position." +msgstr "" + +#: library/tkinter.rst:3541 +msgid "*extent*" +msgstr "" + +#: library/tkinter.rst:3542 +msgid "" +"The size of the angular range, in degrees counter-clockwise from *start*." +msgstr "" + +#: library/tkinter.rst:3545 +msgid "*style*" +msgstr "" + +#: library/tkinter.rst:3546 +msgid "" +"How the arc is drawn: ``'pieslice'`` (the default), ``'chord'`` or ``'arc'``." +msgstr "" + +#: library/tkinter.rst:3549 +msgid "For ``line`` items:" +msgstr "" + +#: library/tkinter.rst:3551 +msgid "*arrow*" +msgstr "" + +#: library/tkinter.rst:3552 +msgid "" +"Where to draw arrowheads: ``'none'`` (the default), ``'first'``, ``'last'`` " +"or ``'both'``." +msgstr "" + +#: library/tkinter.rst:3555 +msgid "*arrowshape*" +msgstr "" + +#: library/tkinter.rst:3556 +msgid "A sequence of three distances describing the shape of the arrowheads." +msgstr "" + +#: library/tkinter.rst:3559 +msgid "*capstyle*" +msgstr "" + +#: library/tkinter.rst:3560 +msgid "" +"How line ends are drawn: ``'butt'`` (the default), ``'projecting'`` or " +"``'round'``." +msgstr "" + +#: library/tkinter.rst:3563 +msgid "*joinstyle*" +msgstr "" + +#: library/tkinter.rst:3564 +msgid "" +"How line vertices are drawn: ``'round'`` (the default), ``'bevel'`` or " +"``'miter'``." +msgstr "" + +#: library/tkinter.rst:3567 +msgid "*smooth*" +msgstr "" + +#: library/tkinter.rst:3568 +msgid "" +"The smoothing method: a false value (the default) for no smoothing, or " +"``'true'``/``'bezier'`` or ``'raw'`` to draw the line as a curve." +msgstr "" + +#: library/tkinter.rst:3571 +msgid "*splinesteps*" +msgstr "" + +#: library/tkinter.rst:3572 +msgid "" +"The number of line segments approximating each spline when *smooth* is " +"enabled." +msgstr "" + +#: library/tkinter.rst:3575 +msgid "For ``polygon`` items:" +msgstr "" + +#: library/tkinter.rst:3577 +msgid "*joinstyle*, *smooth*, *splinesteps*" +msgstr "" + +#: library/tkinter.rst:3578 +msgid "As for ``line`` items, applied to the polygon's outline." +msgstr "" + +#: library/tkinter.rst:3580 +msgid "For ``text`` items:" +msgstr "" + +#: library/tkinter.rst:3582 +msgid "*text*" +msgstr "" + +#: library/tkinter.rst:3583 +msgid "The string to display; newline characters start new lines." +msgstr "" + +#: library/tkinter.rst:4483 library/tkinter.rst:5364 +msgid "*font*" +msgstr "" + +#: library/tkinter.rst:3586 +msgid "The font used for the text." +msgstr "" + +#: library/tkinter.rst:5404 +msgid "*justify*" +msgstr "" + +#: library/tkinter.rst:3589 +msgid "" +"How lines are justified: ``'left'`` (the default), ``'right'`` or " +"``'center'``." +msgstr "" + +#: library/tkinter.rst:3593 +msgid "" +"How the text is positioned relative to its point, defaulting to ``'center'``." +msgstr "" + +#: library/tkinter.rst:3597 +msgid "The maximum line length; if non-zero, lines are wrapped at spaces." +msgstr "" + +#: library/tkinter.rst:3599 +msgid "*angle*" +msgstr "" + +#: library/tkinter.rst:3600 +msgid "" +"How many degrees to rotate the text counter-clockwise about its positioning " +"point, from ``0.0`` to ``360.0`` (default ``0.0``)." +msgstr "" + +#: library/tkinter.rst:4465 library/tkinter.rst:5389 +msgid "*underline*" +msgstr "" + +#: library/tkinter.rst:3604 +msgid "The index of a character to underline, or ``-1`` for none." +msgstr "" + +#: library/tkinter.rst:3606 +msgid "For ``bitmap`` items:" +msgstr "" + +#: library/tkinter.rst:4480 +msgid "*bitmap*" +msgstr "" + +#: library/tkinter.rst:3609 +msgid "The bitmap to display." +msgstr "" + +#: library/tkinter.rst:3612 +msgid "How the bitmap is positioned relative to its point." +msgstr "" + +#: library/tkinter.rst:4486 +msgid "*background*, *foreground*" +msgstr "" + +#: library/tkinter.rst:3615 +msgid "" +"The colors used for the bitmap's ``0`` and ``1`` pixels; an empty " +"*background* makes the ``0`` pixels transparent. Both have *active...* and " +"*disabled...* variants, and *bitmap* has *activebitmap* and *disabledbitmap* " +"variants." +msgstr "" + +#: library/tkinter.rst:3620 +msgid "For ``image`` items:" +msgstr "" + +#: library/tkinter.rst:4472 +msgid "*image*" +msgstr "" + +#: library/tkinter.rst:3623 +msgid "The Tk image to display, previously created with the image protocols." +msgstr "" + +#: library/tkinter.rst:3627 +msgid "How the image is positioned relative to its point." +msgstr "" + +#: library/tkinter.rst:3629 +msgid "" +"Both options have *active...* and *disabled...* variants (*activeimage*, " +"*disabledimage*) used in the active and disabled states." +msgstr "" + +#: library/tkinter.rst:3633 +msgid "For ``window`` items:" +msgstr "" + +#: library/tkinter.rst:3635 +msgid "*window*" +msgstr "" + +#: library/tkinter.rst:3636 +msgid "" +"The widget to embed; it must be a child of the canvas or of one of its " +"ancestors, and may not be a top-level window." +msgstr "" + +#: library/tkinter.rst:3640 +msgid "How the window is positioned relative to its point." +msgstr "" + +#: library/tkinter.rst:3643 +msgid "" +"The size to assign to the window; if zero (the default), the window is given " +"its requested size." +msgstr "" + +#: library/tkinter.rst:3646 +msgid "" +"``oval`` and ``rectangle`` items have no type-specific options; they use " +"only the standard item options." +msgstr "" + +#: library/tkinter.rst:3651 +msgid "" +"Tk 8.6 added the *angle* option and Tk 9.0 added the *underline* option for " +"``text`` items." +msgstr "" + +#: library/tkinter.rst:3658 +msgid "" +"Query or modify the coordinates of an item. With only *tagOrId*, return a " +"list of the floating-point coordinates of the item given by *tagOrId* (the " +"first matching item if it matches several). Given new coordinates, replace " +"the coordinates of that item with them; like the ``create_*`` methods, the " +"coordinates may be given as separate numbers, as a single sequence, or as " +"coordinate pairs. The returned coordinates are always in pixels, regardless " +"of the units used to specify them; for rectangles, ovals and arcs they are " +"ordered left, top, right, bottom." +msgstr "" + +#: library/tkinter.rst:3669 +msgid "" +"The arguments are now flattened: the coordinates may be given as separate " +"arguments, as a single sequence, or grouped in pairs, like the ``create_*`` " +"methods." +msgstr "" + +#: library/tkinter.rst:3677 +msgid "" +"Move each of the items given by *tagOrId* in the canvas coordinate space by " +"adding *xAmount* to every x-coordinate and *yAmount* to every y-coordinate " +"of the item." +msgstr "" + +#: library/tkinter.rst:3683 +msgid "" +"Move the items given by *tagOrId* so that the first coordinate pair (the " +"upper-left corner of the bounding box) of the lowest matching item is at " +"position (*x*, *y*). *x* or *y* may be an empty string, in which case the " +"corresponding coordinate is unchanged. All matching items keep their " +"positions relative to each other." +msgstr "" + +#: library/tkinter.rst:3695 +msgid "" +"Rescale the coordinates of all items given by *tagOrId* in canvas coordinate " +"space. Each x-coordinate is adjusted so that its distance from *xOrigin* " +"changes by a factor of *xScale*, and each y-coordinate so that its distance " +"from *yOrigin* changes by a factor of *yScale* (a factor of ``1.0`` leaves " +"the coordinate unchanged)." +msgstr "" + +#: library/tkinter.rst:3704 +msgid "Delete each of the items given by the *tagOrIds* arguments." +msgstr "" + +#: library/tkinter.rst:3709 +msgid "" +"Delete from each of the items given by *tagOrId* the characters (for text " +"items) or coordinates (for line and polygon items) in the range from *first* " +"to *last* inclusive; *last* defaults to *first*. Items that do not support " +"indexing ignore this operation." +msgstr "" + +#: library/tkinter.rst:3716 +msgid "" +"Insert *string* into each of the items given by *tagOrId* just before the " +"character or coordinate whose index is *beforeThis*. For line and polygon " +"items *string* must be a valid sequence of coordinates." +msgstr "" + +#: library/tkinter.rst:3723 +msgid "" +"Return the current value of the configuration option *option* for the item " +"given by *tagOrId* (the lowest matching item if it matches several). This is " +"like :meth:`~Misc.cget` but applies to an individual item." +msgstr "" + +#: library/tkinter.rst:3732 +msgid "" +"Query or modify the configuration options of the items given by *tagOrId*. " +"This mirrors :meth:`~Misc.configure`, except that it applies to individual " +"items rather than to the canvas as a whole. With no options, it returns a " +"dictionary describing the current options of the first matching item; " +"otherwise it sets the given options on every matching item. The legal " +"options are those accepted by the corresponding ``create_*`` method. :meth:" +"`itemconfig` is an alias of :meth:`!itemconfigure`." +msgstr "" + +#: library/tkinter.rst:3745 +msgid "" +"Return the type of the item given by *tagOrId* (the first matching item if " +"it matches several), such as ``'rectangle'`` or ``'text'``, or ``None`` if " +"*tagOrId* does not match any item." +msgstr "" + +#: library/tkinter.rst:3751 +msgid "" +"Return a tuple of the tags associated with the item given by *tagOrId* (the " +"first matching item in display-list order if it matches several). Return an " +"empty tuple if no item matches or the item has no tags." +msgstr "" + +#: library/tkinter.rst:3758 +msgid "" +"Remove the tag *tagToDelete* (which defaults to *tagOrId*) from each of the " +"items given by *tagOrId*. Items that do not have that tag are unaffected." +msgstr "" + +#: library/tkinter.rst:3764 +msgid "" +"Add the tag *newtag* to each item selected by the search specification " +"*searchSpec* (and any further *args*). *searchSpec* is one of ``'above'``, " +"``'all'``, ``'below'``, ``'closest'``, ``'enclosed'``, ``'overlapping'`` or " +"``'withtag'``; the ``addtag_*`` methods below are convenient wrappers that " +"supply each of these forms." +msgstr "" + +#: library/tkinter.rst:3773 +msgid "" +"Add the tag *newtag* to the item just above (after) *tagOrId* in the display " +"list." +msgstr "" + +#: library/tkinter.rst:3778 +msgid "Add the tag *newtag* to all items in the canvas." +msgstr "" + +#: library/tkinter.rst:3782 +msgid "" +"Add the tag *newtag* to the item just below (before) *tagOrId* in the " +"display list." +msgstr "" + +#: library/tkinter.rst:3787 +msgid "" +"Add the tag *newtag* to the item closest to the point (*x*, *y*). If *halo* " +"is given, any item within that distance of the point is treated as " +"overlapping it. If *start* is given (a tag or id), select the topmost " +"closest item that lies below *start* in the display list, which can be used " +"to step through all the closest items." +msgstr "" + +#: library/tkinter.rst:3796 +msgid "" +"Add the tag *newtag* to every item completely enclosed within the rectangle " +"(*x1*, *y1*, *x2*, *y2*), where *x1* <= *x2* and *y1* <= *y2*." +msgstr "" + +#: library/tkinter.rst:3801 +msgid "" +"Add the tag *newtag* to every item that overlaps or is enclosed within the " +"rectangle (*x1*, *y1*, *x2*, *y2*), where *x1* <= *x2* and *y1* <= *y2*." +msgstr "" + +#: library/tkinter.rst:3807 +msgid "Add the tag *newtag* to every item given by *tagOrId*." +msgstr "" + +#: library/tkinter.rst:3811 +msgid "" +"Return a tuple of the ids of all items selected by the search specification " +"*searchSpec* (and any further *args*), in stacking order with the lowest " +"item first. The search specification has any of the forms accepted by :meth:" +"`addtag`. The ``find_*`` methods below are more convenient wrappers around " +"it." +msgstr "" + +#: library/tkinter.rst:3819 +msgid "" +"Return a tuple containing the id of the item just above *tagOrId* in the " +"display list." +msgstr "" + +#: library/tkinter.rst:3824 +msgid "" +"Return a tuple of the ids of all items in the canvas, in stacking order." +msgstr "" + +#: library/tkinter.rst:3828 +msgid "" +"Return a tuple containing the id of the item just below *tagOrId* in the " +"display list." +msgstr "" + +#: library/tkinter.rst:3833 +msgid "" +"Return a tuple containing the id of the item closest to the point (*x*, " +"*y*). *halo* and *start* are interpreted as for :meth:`addtag_closest`." +msgstr "" + +#: library/tkinter.rst:3839 +msgid "" +"Return a tuple of the ids of all items completely enclosed within the " +"rectangle (*x1*, *y1*, *x2*, *y2*)." +msgstr "" + +#: library/tkinter.rst:3844 +msgid "" +"Return a tuple of the ids of all items that overlap or are enclosed within " +"the rectangle (*x1*, *y1*, *x2*, *y2*)." +msgstr "" + +#: library/tkinter.rst:3849 +msgid "Return a tuple of the ids of all items given by *tagOrId*." +msgstr "" + +#: library/tkinter.rst:3859 +msgid "" +"Move all items given by *tagOrId* to a new position in the display list just " +"above the item given by *aboveThis*, or to the top of the display list if " +"*aboveThis* is omitted. When several items are moved their relative order is " +"preserved. This has no effect on embedded window items, whose stacking order " +"is controlled by :meth:`Misc.tkraise` and :meth:`Misc.lower` instead. :meth:" +"`lift` and :meth:`tkraise` are aliases of :meth:`!tag_raise`." +msgstr "" + +#: library/tkinter.rst:3872 +msgid "" +"Move all items given by *tagOrId* to a new position in the display list just " +"below the item given by *belowThis*, or to the bottom of the display list if " +"*belowThis* is omitted. When several items are moved their relative order is " +"preserved. This has no effect on embedded window items. :meth:`lower` is an " +"alias of :meth:`!tag_lower`." +msgstr "" + +#: library/tkinter.rst:3881 +msgid "" +"On a :class:`Canvas`, :meth:`tkraise`/:meth:`lift` and :meth:`lower` restack " +"canvas items, shadowing the inherited :meth:`Misc.tkraise`/:meth:`Misc.lift` " +"and :meth:`Misc.lower` methods that restack the widget itself, which are " +"therefore not available." +msgstr "" + +#: library/tkinter.rst:3889 +msgid "" +"Bind the callback *func* to the event *sequence* for all items given by " +"*tagOrId*, so that *func* is invoked whenever that event occurs for one of " +"the items. This is like :meth:`Widget.bind ` but operates on " +"canvas items rather than on whole widgets; only mouse, keyboard and virtual " +"events may be bound. Mouse events are directed to the current item and " +"keyboard events to the focus item (see :meth:`focus`). If *add* is true the " +"new binding is added to any existing bindings for the same sequence, rather " +"than replacing them. Return the identifier of the bound function, which can " +"be passed to :meth:`tag_unbind`." +msgstr "" + +#: library/tkinter.rst:3904 +msgid "" +"Remove for all items given by *tagOrId* the binding for the event " +"*sequence*. If *funcid* is given, only that callback (as returned by :meth:" +"`tag_bind`) is unbound and deregistered." +msgstr "" + +#: library/tkinter.rst:5510 +msgid "If *funcid* is given, only that callback is unbound." +msgstr "" + +#: library/tkinter.rst:3915 +msgid "" +"Return a 4-tuple ``(x1, y1, x2, y2)`` giving an approximate bounding box, in " +"pixels, that encloses all the items given by *tagOrId* and any further " +"*tagOrIds*. The result may overestimate the true bounding box by a few " +"pixels. Return ``None`` if no item matches or the matching items have " +"nothing to display." +msgstr "" + +#: library/tkinter.rst:4315 library/tkinter.rst:5280 +msgid "" +"This shadows the inherited :meth:`!Misc.bbox`; use :meth:`~Misc.grid_bbox` " +"for the grid bounding box." +msgstr "" + +#: library/tkinter.rst:3927 +msgid "" +"Given a window x-coordinate *screenx*, return the canvas x-coordinate " +"displayed at that location. If *gridspacing* is given, the result is rounded " +"to the nearest multiple of *gridspacing* units." +msgstr "" + +#: library/tkinter.rst:3934 +msgid "" +"Given a window y-coordinate *screeny*, return the canvas y-coordinate " +"displayed at that location. If *gridspacing* is given, the result is rounded " +"to the nearest multiple of *gridspacing* units." +msgstr "" + +#: library/tkinter.rst:3942 +msgid "" +"With *tagOrId*, set the keyboard focus for the canvas to the first item " +"given by *tagOrId* that supports the insertion cursor; the focus is left " +"unchanged if no such item exists. If *tagOrId* is an empty string, reset the " +"focus so that no item has it. With no argument, return the id of the item " +"that currently has the focus, or an empty string if none does. An item only " +"displays the insertion cursor when both it is the focus item and its canvas " +"has the input focus." +msgstr "" + +#: library/tkinter.rst:3951 +msgid "" +"This shadows the inherited :meth:`!Misc.focus`; use :meth:`~Misc.focus_set` " +"to focus the widget itself." +msgstr "" + +#: library/tkinter.rst:3956 +msgid "" +"Set the insertion cursor of the items given by *tagOrId* to just before the " +"character given by *index*. Items that do not support an insertion cursor " +"are unaffected. The cursor is only displayed when the item has the focus, " +"but its position may be set at any time." +msgstr "" + +#: library/tkinter.rst:3964 +msgid "" +"Return as an integer the numerical index within *tagOrId* corresponding to " +"*index*, which is a textual description of a position (for text items an " +"index into the characters, for line and polygon items an index into the " +"coordinates). If *tagOrId* matches several items, the first one that " +"supports indexing is used." +msgstr "" + +#: library/tkinter.rst:3973 +msgid "" +"Adjust the end of the selection in *tagOrId* nearest to *index* so that it " +"is at *index*, and make the other end the anchor point for future :meth:" +"`select_to` calls. If the selection is not currently in *tagOrId*, this " +"behaves like :meth:`select_to`." +msgstr "" + +#: library/tkinter.rst:3981 +msgid "Clear the selection if it is in this canvas; otherwise do nothing." +msgstr "" + +#: library/tkinter.rst:3985 +msgid "" +"Set the selection anchor point to just before the character given by *index* " +"in the item given by *tagOrId*. This does not change the selection itself; " +"it sets the fixed end for future :meth:`select_to` calls." +msgstr "" + +#: library/tkinter.rst:3992 +msgid "" +"Return the id of the item that holds the selection, or ``None`` if the " +"selection is not in this canvas. Unlike :meth:`find` and the ``find_*`` " +"methods, this returns the id as a string rather than an integer." +msgstr "" + +#: library/tkinter.rst:3999 +msgid "" +"Set the selection to the characters of *tagOrId* between the selection " +"anchor point and *index*, inclusive of *index*. The anchor point is the one " +"set by the most recent :meth:`select_adjust` or :meth:`select_from` call." +msgstr "" + +#: library/tkinter.rst:4411 library/tkinter.rst:5634 +msgid "" +"Record *x*, *y* and the current view, for use with later :meth:`scan_dragto` " +"calls. This is typically bound to a mouse button press in the widget." +msgstr "" + +#: library/tkinter.rst:4012 +msgid "" +"Scroll the canvas by *gain* times the difference between *x*, *y* and the " +"coordinates passed to the last :meth:`scan_mark` call. This is typically " +"bound to mouse motion events in the widget, producing the effect of dragging " +"the canvas at high speed through its window." +msgstr "" + +#: library/tkinter.rst:4019 +msgid "" +"Generate a PostScript (Encapsulated PostScript, version 3.0) representation " +"of part or all of the canvas. If the *file* or *channel* option is given, " +"the PostScript is written there and an empty string is returned; otherwise " +"it is returned as a string. By default only the area currently visible in " +"the window is generated, so it is usually necessary either to call :meth:" +"`~Misc.update` first or to use the *width* and *height* options. Supported " +"options include *colormap*, *colormode*, *file*, *fontmap*, *height*, " +"*pageanchor*, *pageheight*, *pagewidth*, *pagex*, *pagey*, *rotate*, " +"*width*, *x* and *y*." +msgstr "" + +#: library/tkinter.rst:4034 +msgid "" +"A :class:`!Checkbutton` widget displays a textual string, bitmap or image " +"together with a square indicator, and toggles a boolean selection when " +"pressed. It has all the behavior of a simple button and, in addition, can be " +"selected: when selected the indicator is drawn with a check mark and the " +"associated variable is set to the ``onvalue``, and when deselected the " +"indicator is drawn empty and the variable is set to the ``offvalue``. " +"Inherits from :class:`Widget`. In addition to the standard widget options, a " +"checkbutton accepts the options documented in the Tk ``checkbutton`` manual " +"page, such as *variable*, *onvalue*, *offvalue* and *command*." +msgstr "" + +#: library/tkinter.rst:4048 +msgid "" +"Do just what would happen if the user pressed the checkbutton with the " +"mouse: toggle the selection state of the button and invoke the associated " +"command, if there is one. Return the result of the command, or an empty " +"string if no command is associated with the checkbutton. This is ignored if " +"the checkbutton's state is ``disabled``." +msgstr "" + +#: library/tkinter.rst:4057 +msgid "" +"Select the checkbutton and set the associated variable to its ``onvalue``." +msgstr "" + +#: library/tkinter.rst:4062 +msgid "" +"Deselect the checkbutton and set the associated variable to its ``offvalue``." +msgstr "" + +#: library/tkinter.rst:4067 +msgid "" +"Toggle the selection state of the button, redisplaying it and modifying its " +"associated variable to reflect the new state." +msgstr "" + +#: library/tkinter.rst:4072 +msgid "" +"Flash the checkbutton by redisplaying it several times, alternating between " +"the active and normal colors. At the end of the flash the checkbutton is " +"left in the same normal or active state as when the method was called. This " +"is ignored if the checkbutton's state is ``disabled``." +msgstr "" + +#: library/tkinter.rst:4081 +msgid "" +"An :class:`!Entry` widget displays a single line of text and lets the user " +"edit it. Inherits from :class:`Widget` and :class:`XView`; since entries can " +"hold strings too long to fit in the window, they support horizontal " +"scrolling through :meth:`~XView.xview`." +msgstr "" + +#: library/tkinter.rst:4087 +msgid "" +"In addition to the standard widget options, an entry accepts the options " +"documented in the Tk ``entry`` manual page. Notable ones are *textvariable* " +"(the name of a variable kept in sync with the entry's contents), *show* (if " +"set, each character is displayed as the given character rather than its true " +"value, useful for password entry), *validate* and *validatecommand* (which " +"together let a callback accept or reject edits), and *state* (one of " +"``'normal'``, ``'disabled'`` or ``'readonly'``)." +msgstr "" + +#: library/tkinter.rst:4096 +msgid "" +"Many of the methods below take an *index* argument that selects a character " +"in the entry's string. As described in the Tk ``entry`` manual page, *index* " +"may be a number (counting from 0), ``'insert'`` (the character just after " +"the insertion cursor), ``'end'`` (just after the last character), " +"``'anchor'`` (the selection anchor point), ``'sel.first'`` and ``'sel." +"last'`` (the ends of the selection), or ``@x`` (the character covering pixel " +"x-coordinate *x* in the window). Out-of-range indices are rounded to the " +"nearest legal value." +msgstr "" + +#: library/tkinter.rst:4108 +msgid "" +"Delete the characters from index *first* up to but not including index " +"*last*. If *last* is omitted, only the single character at *first* is " +"deleted." +msgstr "" + +#: library/tkinter.rst:4114 +msgid "Return the entry's current string." +msgstr "" + +#: library/tkinter.rst:4118 +msgid "Insert *string* just before the character given by *index*." +msgstr "" + +#: library/tkinter.rst:5036 +msgid "" +"Arrange for the insertion cursor to be displayed just before the character " +"given by *index*." +msgstr "" + +#: library/tkinter.rst:4127 +msgid "Return the numerical index corresponding to *index*." +msgstr "" + +#: library/tkinter.rst:4134 +msgid "" +"Locate the end of the selection nearest to the character given by *index*, " +"and adjust that end to be at *index* (including but not going beyond it); " +"the other end becomes the anchor point for future :meth:`selection_to` " +"calls. If there is no selection in the entry, a new one is created between " +"*index* and the most recent anchor point, inclusive. :meth:`select_adjust` " +"is an alias of :meth:`!selection_adjust`." +msgstr "" + +#: library/tkinter.rst:4147 +msgid "" +"Clear the selection if it is currently in this widget. If the selection is " +"not in this widget the method has no effect. :meth:`select_clear` is an " +"alias of :meth:`!selection_clear`." +msgstr "" + +#: library/tkinter.rst:4153 +msgid "" +"This shadows the inherited :meth:`Misc.selection_clear`, which clears the X " +"selection; that method is not available on an :class:`Entry`." +msgstr "" + +#: library/tkinter.rst:4162 +msgid "" +"Set the selection anchor point to just before the character given by " +"*index*, without changing the selection. :meth:`select_from` is an alias of :" +"meth:`!selection_from`." +msgstr "" + +#: library/tkinter.rst:4171 +msgid "" +"Return ``True`` if there are characters selected in the entry, ``False`` " +"otherwise. :meth:`select_present` is an alias of :meth:`!selection_present`." +msgstr "" + +#: library/tkinter.rst:4180 +msgid "" +"Set the selection to include the characters starting with the one indexed by " +"*start* and ending with the one just before *end*. If *end* refers to the " +"same character as *start* or an earlier one, the selection is cleared. :meth:" +"`select_range` is an alias of :meth:`!selection_range`." +msgstr "" + +#: library/tkinter.rst:4191 +msgid "" +"Set the selection between the anchor point and *index*: if *index* is before " +"the anchor point, the selection runs from *index* up to but not including " +"the anchor; if *index* is after it, from the anchor up to but not including " +"*index*; if they coincide, nothing happens. The anchor point is the one set " +"by the most recent :meth:`selection_from` or :meth:`selection_adjust` call. " +"If there is no selection in the entry, a new one is created using the most " +"recent anchor point. :meth:`select_to` is an alias of :meth:`!selection_to`." +msgstr "" + +#: library/tkinter.rst:4203 +msgid "" +"Record *x* and the current view in the entry window, for use with later :" +"meth:`scan_dragto` calls. Typically associated with a mouse button press in " +"the widget." +msgstr "" + +#: library/tkinter.rst:4209 +msgid "" +"Compute the difference between *x* and the *x* given to the last :meth:" +"`scan_mark` call, and adjust the view left or right by 10 times that " +"difference. Typically associated with mouse motion events, to produce the " +"effect of dragging the entry at high speed through the window." +msgstr "" + +#: library/tkinter.rst:4218 +msgid "" +"A :class:`!Frame` widget is a simple container. Its primary purpose is to " +"act as a spacer or container for complex window layouts; its only features " +"are its background and an optional 3-D border to make the frame appear " +"raised or sunken. Inherits from :class:`Widget`. Refer to the Tk ``frame`` " +"manual page for the full list of options." +msgstr "" + +#: library/tkinter.rst:4228 +msgid "" +"A :class:`!Label` widget displays a non-interactive textual string, bitmap " +"or image. The displayed text is set with the *text* option or linked to a " +"variable through *textvariable*, and an image can be shown using the *image* " +"option. Text must all be in a single font but may occupy multiple lines, and " +"one character may be underlined with the *underline* option. Inherits from :" +"class:`Widget`. Refer to the Tk ``label`` manual page for the full list of " +"options." +msgstr "" + +#: library/tkinter.rst:4240 +msgid "" +"A :class:`!LabelFrame` widget is a container that has the features of a :" +"class:`Frame` plus the ability to display a label. The label text is set " +"with the *text* option and positioned with *labelanchor*, or an arbitrary " +"widget may be used as the label by giving it as the *labelwidget* option. " +"Inherits from :class:`Widget`. Refer to the Tk ``labelframe`` manual page " +"for the full list of options." +msgstr "" + +#: library/tkinter.rst:4251 +msgid "" +"A :class:`!Listbox` widget displays a list of single-line text items, one " +"per line, of which the user can select one or more. The way the selection " +"behaves is governed by the *selectmode* option, which is one of ``browse`` " +"(the default; at most one item, which may be dragged with the mouse), " +"``single`` (at most one item), ``multiple`` (any number of items, toggled " +"individually), or ``extended`` (any number of items, including discontiguous " +"ranges, selected by clicking and dragging). Inherits from :class:`Widget`, :" +"class:`XView` and :class:`YView`, so the view can be scrolled horizontally " +"and vertically with :meth:`~XView.xview` and :meth:`~YView.yview`. Refer to " +"the Tk ``listbox`` manual page for the full list of options." +msgstr "" + +#: library/tkinter.rst:4263 +msgid "" +"Many of the methods take an *index* argument identifying a particular item. " +"As described in the Tk ``listbox`` manual page, *index* may be a numeric " +"index (counting from 0 at the top), ``'active'`` (the item with the location " +"cursor, set with :meth:`activate`), ``'anchor'`` (the selection anchor, set " +"with :meth:`selection_anchor`), ``'end'`` (the last item, or for :meth:" +"`index` and :meth:`insert` the position just after it), or ``@x,y`` (the " +"item covering pixel coordinates *x*, *y* in the listbox window). Arguments " +"named *first* and *last* are indices of the same forms." +msgstr "" + +#: library/tkinter.rst:4274 +msgid "" +"Insert the given *elements* as new items just before the item given by " +"*index*. If *index* is ``'end'``, the new items are appended to the end of " +"the list." +msgstr "" + +#: library/tkinter.rst:4281 +msgid "" +"Delete the items in the range from *first* to *last* inclusive. If *last* is " +"omitted, it defaults to *first*, so that a single item is deleted." +msgstr "" + +#: library/tkinter.rst:4287 +msgid "" +"If *last* is omitted, return the contents of the item given by *first*, or " +"an empty string if *first* refers to a non-existent item. If *last* is " +"given, return a tuple of all the items in the range from *first* to *last* " +"inclusive." +msgstr "" + +#: library/tkinter.rst:4294 +msgid "Return the total number of items in the listbox." +msgstr "" + +#: library/tkinter.rst:4296 +msgid "" +"This shadows the inherited :meth:`!Misc.size`; use :meth:`~Misc.grid_size` " +"for the grid size." +msgstr "" + +#: library/tkinter.rst:4301 +msgid "" +"Return the integer index value corresponding to *index*, or ``None`` if " +"*index* is out of range. If *index* is ``'end'``, the result is a count of " +"the number of items in the listbox (not the index of the last item)." +msgstr "" + +#: library/tkinter.rst:4308 +msgid "" +"Return a tuple ``(x, y, width, height)`` describing the bounding box, in " +"pixels relative to the widget, of the text of the item given by *index*. " +"Return ``None`` if no part of that item is visible on the screen, or if " +"*index* refers to a non-existent item; if the item is only partly visible, " +"the result still gives the full area of the item, including the parts that " +"are not visible." +msgstr "" + +#: library/tkinter.rst:4320 +msgid "" +"Given a y-coordinate within the listbox window, return the index of the " +"visible item nearest to that y-coordinate." +msgstr "" + +#: library/tkinter.rst:4325 +msgid "" +"Adjust the view so that the item given by *index* is visible. If the item is " +"already visible the method has no effect; if it is near an edge of the " +"window the listbox scrolls just enough to bring it into view at that edge, " +"otherwise the listbox scrolls to center the item." +msgstr "" + +#: library/tkinter.rst:4332 +msgid "" +"Set the active item to the one given by *index*. If *index* is outside the " +"range of items, the closest item is activated instead. The active item is " +"drawn as specified by the *activestyle* option when the widget has the input " +"focus, and its index may be retrieved with the ``'active'`` index." +msgstr "" + +#: library/tkinter.rst:4341 +msgid "" +"Return a tuple containing the numerical indices of all of the items that are " +"currently selected, or an empty tuple if no items are selected." +msgstr "" + +#: library/tkinter.rst:4349 +msgid "" +"Set the selection anchor to the item given by *index*. If *index* refers to " +"a non-existent item, the closest item is used. The selection anchor is the " +"end of the selection that is fixed while dragging out a selection with the " +"mouse, and may afterwards be referred to with the ``'anchor'`` index. :meth:" +"`select_anchor` is an alias of :meth:`!selection_anchor`." +msgstr "" + +#: library/tkinter.rst:4361 +msgid "" +"Deselect any of the items in the range from *first* to *last* inclusive that " +"are selected. The selection state of items outside this range is not " +"changed. :meth:`select_clear` is an alias of :meth:`!selection_clear`." +msgstr "" + +#: library/tkinter.rst:4368 +msgid "" +"This shadows the inherited :meth:`Misc.selection_clear`, which clears the X " +"selection; that method is not available on a :class:`Listbox`." +msgstr "" + +#: library/tkinter.rst:4377 +msgid "" +"Return ``True`` if the item given by *index* is currently selected, " +"``False`` otherwise. :meth:`select_includes` is an alias of :meth:`!" +"selection_includes`." +msgstr "" + +#: library/tkinter.rst:4386 +msgid "" +"Select all of the items in the range from *first* to *last* inclusive, " +"without affecting the selection state of items outside that range. :meth:" +"`select_set` is an alias of :meth:`!selection_set`." +msgstr "" + +#: library/tkinter.rst:4392 +msgid "" +"Return the current value of the configuration option *option* for the item " +"given by *index*." +msgstr "" + +#: library/tkinter.rst:4400 +msgid "" +"Query or modify the configuration options of the item given by *index*. This " +"mirrors :meth:`~Misc.configure`, except that it applies to an individual " +"item rather than to the listbox as a whole. With no options, it returns a " +"dictionary describing the current options of the item; otherwise it sets the " +"given options. The supported item options are *background*, *foreground*, " +"*selectbackground* and *selectforeground*. :meth:`itemconfig` is an alias " +"of :meth:`!itemconfigure`." +msgstr "" + +#: library/tkinter.rst:4417 +msgid "" +"Scroll the listbox by 10 times the difference between *x*, *y* and the " +"coordinates passed to the last :meth:`scan_mark` call. This is typically " +"bound to mouse motion events in the widget, producing the effect of dragging " +"the list at high speed through the window." +msgstr "" + +#: library/tkinter.rst:4425 +msgid "" +"A :class:`!Menu` widget displays a column of entries, each of which may be a " +"command, a checkbutton, a radiobutton, a cascade (which posts an associated " +"submenu) or a separator. Menus are used as the menubar of a toplevel window, " +"as pulldown menus posted from a cascade entry or menubutton, and as popup " +"menus. Inherits from :class:`Widget`." +msgstr "" + +#: library/tkinter.rst:4432 +msgid "" +"Many of the entry methods take an *index* argument that selects which entry " +"to operate on. As described in the Tk ``menu`` manual page, *index* may be a " +"numeric index (counting from 0 at the top), ``'active'`` (the currently " +"active entry), ``'end'`` or ``'last'`` (the bottommost entry), ``'none'`` " +"(no entry at all, written ``{}`` in Tcl), ``@y`` (the entry covering pixel y-" +"coordinate *y* in the menu window), or a pattern matched against the labels " +"of the entries from the top down." +msgstr "" + +#: library/tkinter.rst:4443 +msgid "" +"Add a new entry to the bottom of the menu. *itemType* is one of " +"``'command'``, ``'cascade'``, ``'checkbutton'``, ``'radiobutton'`` or " +"``'separator'`` and determines the type of the new entry; the remaining " +"options configure it. The :meth:`!add_command`, :meth:`!add_cascade`, :meth:" +"`!add_checkbutton`, :meth:`!add_radiobutton` and :meth:`!add_separator` " +"convenience methods call this method with the corresponding *itemType*." +msgstr "" + +#: library/tkinter.rst:4451 +msgid "" +"The entry is configured by the following options, although not every option " +"applies to every entry type (a separator accepts none of them):" +msgstr "" + +#: library/tkinter.rst:4454 +msgid "*label*" +msgstr "" + +#: library/tkinter.rst:4455 +msgid "The text to display in the entry." +msgstr "" + +#: library/tkinter.rst:4457 +msgid "*command*" +msgstr "" + +#: library/tkinter.rst:4458 +msgid "" +"The function to call when the entry is invoked (command, checkbutton and " +"radiobutton entries)." +msgstr "" + +#: library/tkinter.rst:4461 +msgid "*accelerator*" +msgstr "" + +#: library/tkinter.rst:4462 +msgid "" +"A string displayed at the right of the entry to advertise an accelerator " +"keystroke; it does not itself create the binding." +msgstr "" + +#: library/tkinter.rst:4466 +msgid "" +"The index of a character in the label to underline for keyboard traversal." +msgstr "" + +#: library/tkinter.rst:4470 +msgid "One of ``'normal'``, ``'active'`` or ``'disabled'``." +msgstr "" + +#: library/tkinter.rst:4473 +msgid "An image to display instead of, or together with, the text label." +msgstr "" + +#: library/tkinter.rst:4475 +msgid "*compound*" +msgstr "" + +#: library/tkinter.rst:4476 +msgid "" +"Where to show the image relative to the text: ``'none'`` (the default), " +"``'text'``, ``'image'``, ``'top'``, ``'bottom'``, ``'left'`` or ``'right'``." +msgstr "" + +#: library/tkinter.rst:4481 +msgid "A bitmap to display instead of the text label." +msgstr "" + +#: library/tkinter.rst:5365 +msgid "The font to use for the text." +msgstr "" + +#: library/tkinter.rst:4487 +msgid "" +"The entry's background and foreground colors in its normal state (ignored on " +"macOS)." +msgstr "" + +#: library/tkinter.rst:4490 +msgid "*activebackground*, *activeforeground*" +msgstr "" + +#: library/tkinter.rst:4491 +msgid "" +"The background and foreground colors used when the entry is active (ignored " +"on macOS)." +msgstr "" + +#: library/tkinter.rst:4494 +msgid "*columnbreak*" +msgstr "" + +#: library/tkinter.rst:4495 +msgid "" +"If true, the entry starts a new column instead of being placed below the " +"previous entry." +msgstr "" + +#: library/tkinter.rst:4498 +msgid "*hidemargin*" +msgstr "" + +#: library/tkinter.rst:4499 +msgid "" +"If true, the standard margin around the entry is omitted, which is useful " +"when a menu is used as a palette." +msgstr "" + +#: library/tkinter.rst:4502 +msgid "*menu*" +msgstr "" + +#: library/tkinter.rst:4503 +msgid "The submenu posted by a cascade entry; it must be a child of this menu." +msgstr "" + +#: library/tkinter.rst:4506 +msgid "*variable*" +msgstr "" + +#: library/tkinter.rst:4507 +msgid "The variable associated with a checkbutton or radiobutton entry." +msgstr "" + +#: library/tkinter.rst:4509 +msgid "*onvalue*, *offvalue*" +msgstr "" + +#: library/tkinter.rst:4510 +msgid "" +"The values stored in *variable* when a checkbutton entry is selected or " +"cleared." +msgstr "" + +#: library/tkinter.rst:4513 +msgid "*value*" +msgstr "" + +#: library/tkinter.rst:4514 +msgid "The value stored in *variable* when a radiobutton entry is selected." +msgstr "" + +#: library/tkinter.rst:4516 +msgid "*indicatoron*" +msgstr "" + +#: library/tkinter.rst:4517 +msgid "Whether to display the indicator of a checkbutton or radiobutton entry." +msgstr "" + +#: library/tkinter.rst:4520 +msgid "*selectcolor*" +msgstr "" + +#: library/tkinter.rst:4521 +msgid "" +"The color of the indicator of a checkbutton or radiobutton entry when it is " +"selected." +msgstr "" + +#: library/tkinter.rst:4524 +msgid "*selectimage*" +msgstr "" + +#: library/tkinter.rst:4525 +msgid "" +"The image displayed when a checkbutton or radiobutton entry is selected and " +"*image* is also given." +msgstr "" + +#: library/tkinter.rst:4530 +msgid "" +"Add a new cascade entry to the bottom of the menu. A cascade entry has an " +"associated submenu, given by its *menu* option, which must be a child of " +"this menu; posting the entry posts the submenu next to it." +msgstr "" + +#: library/tkinter.rst:4537 +msgid "" +"Add a new checkbutton entry to the bottom of the menu. When invoked, a " +"checkbutton entry toggles between its *onvalue* and *offvalue*, storing the " +"result in its associated *variable*, and displays an indicator showing " +"whether it is selected." +msgstr "" + +#: library/tkinter.rst:4544 +msgid "" +"Add a new command entry to the bottom of the menu. A command entry behaves " +"much like a button: when it is invoked, the callback given by its *command* " +"option is called." +msgstr "" + +#: library/tkinter.rst:4550 +msgid "" +"Add a new radiobutton entry to the bottom of the menu. Radiobutton entries " +"sharing the same *variable* form a group of which only one may be selected " +"at a time; selecting an entry stores its *value* in the variable." +msgstr "" + +#: library/tkinter.rst:4557 +msgid "" +"Add a separator to the bottom of the menu. A separator is displayed as a " +"horizontal dividing line and cannot be activated or invoked." +msgstr "" + +#: library/tkinter.rst:4563 +msgid "" +"Same as :meth:`add`, except that the new entry is inserted just before the " +"entry given by *index* instead of being appended to the end of the menu. " +"*itemType* is one of ``'command'``, ``'cascade'``, ``'checkbutton'``, " +"``'radiobutton'`` or ``'separator'``. The :meth:`!insert_command`, :meth:`!" +"insert_cascade`, :meth:`!insert_checkbutton`, :meth:`!insert_radiobutton` " +"and :meth:`!insert_separator` convenience methods call this method with the " +"corresponding *itemType*." +msgstr "" + +#: library/tkinter.rst:4575 +msgid "" +"Insert a new cascade entry before the entry given by *index* (see :meth:" +"`add_cascade`)." +msgstr "" + +#: library/tkinter.rst:4580 +msgid "" +"Insert a new checkbutton entry before the entry given by *index* (see :meth:" +"`add_checkbutton`)." +msgstr "" + +#: library/tkinter.rst:4585 +msgid "" +"Insert a new command entry before the entry given by *index* (see :meth:" +"`add_command`)." +msgstr "" + +#: library/tkinter.rst:4590 +msgid "" +"Insert a new radiobutton entry before the entry given by *index* (see :meth:" +"`add_radiobutton`)." +msgstr "" + +#: library/tkinter.rst:4595 +msgid "" +"Insert a separator before the entry given by *index* (see :meth:" +"`add_separator`)." +msgstr "" + +#: library/tkinter.rst:4600 +msgid "" +"Delete all of the menu entries between *index1* and *index2* inclusive. If " +"*index2* is omitted, it defaults to *index1*, so that a single entry is " +"deleted. Attempts to delete a tear-off entry are ignored; remove it by " +"changing the *tearoff* option instead." +msgstr "" + +#: library/tkinter.rst:4608 +msgid "" +"Return the current value of the configuration option *option* for the entry " +"given by *index*." +msgstr "" + +#: library/tkinter.rst:4616 +msgid "" +"Query or modify the configuration options of the entry given by *index*. " +"This mirrors :meth:`~Misc.configure`, except that it applies to an " +"individual entry rather than to the menu as a whole. With no options, it " +"returns a dictionary describing the current options of the entry; otherwise " +"it sets the given options. The supported options are those accepted by :meth:" +"`add` for the entry's type. :meth:`entryconfig` is an alias of :meth:`!" +"entryconfigure`." +msgstr "" + +#: library/tkinter.rst:4627 +msgid "" +"Return the numerical index corresponding to *index*, or ``None`` if *index* " +"selects no entry." +msgstr "" + +#: library/tkinter.rst:4632 +msgid "" +"Return the type of the entry given by *index*: one of ``'command'``, " +"``'cascade'``, ``'checkbutton'``, ``'radiobutton'``, ``'separator'`` or " +"``'tearoff'`` (for the tear-off entry)." +msgstr "" + +#: library/tkinter.rst:4638 +msgid "" +"Make the entry given by *index* the active entry, redisplaying it with its " +"active colors, and deactivate any previously active entry. If *index* " +"selects no entry, or the selected entry is disabled, the menu ends up with " +"no active entry." +msgstr "" + +#: library/tkinter.rst:4645 +msgid "" +"Invoke the action of the entry given by *index*, as if it had been clicked. " +"Nothing happens if the entry is disabled. If the entry has a *command* " +"associated with it, the result of that command is returned; otherwise the " +"result is an empty string." +msgstr "" + +#: library/tkinter.rst:4653 +msgid "" +"Display the menu on the screen at the root-window coordinates *x* and *y*, " +"adjusting them if necessary so that the whole menu is visible. If the " +"*postcommand* option has been specified, it is evaluated before the menu is " +"posted." +msgstr "" + +#: library/tkinter.rst:4660 +msgid "" +"Post the menu as a popup at the root-window coordinates *x* and *y*. If " +"*entry* is given, the menu is positioned so that this entry is displayed " +"under the pointer." +msgstr "" + +#: library/tkinter.rst:4666 +msgid "" +"Unmap the menu so that it is no longer displayed, also unposting any posted " +"lower-level cascaded submenu. This has no effect on Windows and macOS, which " +"manage the unposting of menus themselves." +msgstr "" + +#: library/tkinter.rst:4673 +msgid "" +"Return the x-coordinate, within the menu window, of the leftmost pixel of " +"the entry given by *index*." +msgstr "" + +#: library/tkinter.rst:4680 +msgid "" +"Return the y-coordinate, within the menu window, of the topmost pixel of the " +"entry given by *index*." +msgstr "" + +#: library/tkinter.rst:4686 +msgid "" +"A :class:`!Menubutton` widget displays a textual string, bitmap or image and " +"posts an associated :class:`Menu`, given by its *menu* option, when the user " +"presses it. Like a :class:`Label` it can show *text*, a *textvariable*, or " +"an *image*, and the *direction* option controls where the menu appears " +"relative to the button. Inherits from :class:`Widget`. Refer to the Tk " +"``menubutton`` manual page for the full list of options." +msgstr "" + +#: library/tkinter.rst:4698 +msgid "" +"A :class:`!Message` widget displays a non-interactive textual string, given " +"by the *text* option or linked to a variable through *textvariable*. Unlike " +"a :class:`Label`, it breaks the string into multiple lines in order to " +"produce a given aspect ratio, choosing line breaks at word boundaries, and " +"it can justify the text left, centered or right. Inherits from :class:" +"`Widget`. Refer to the Tk ``message`` manual page for the full list of " +"options." +msgstr "" + +#: library/tkinter.rst:4709 +msgid "" +"A helper subclass of :class:`Menubutton` that displays a pop-up menu of " +"mutually exclusive choices. *variable* is a :class:`Variable` kept in sync " +"with the selection, *value* is the initial choice, and *values* are the " +"remaining menu entries. The keyword argument *command* may be given a " +"callback that is invoked with the selected value." +msgstr "" + +#: library/tkinter.rst:4718 +msgid "Destroy the widget, also cleaning up the associated pop-up menu." +msgstr "" + +#: library/tkinter.rst:4724 +msgid "" +"A :class:`!PanedWindow` is a geometry-manager widget that arranges any " +"number of child *panes* in a row (when *orient* is ``'horizontal'``) or a " +"column (when *orient* is ``'vertical'``). Each pane holds one widget, and " +"each pair of adjacent panes is separated by a movable *sash* that the user " +"can drag with the mouse to resize the widgets on either side of it. Inherits " +"from :class:`Widget`." +msgstr "" + +#: library/tkinter.rst:4732 +msgid "" +"The *orient* option selects the layout direction, *sashwidth* sets the width " +"of each sash and *sashrelief* its relief. When *showhandle* is true a small " +"handle is drawn on each sash that the user can grab to drag it. Refer to the " +"Tk ``panedwindow`` manual page for the full list of options." +msgstr "" + +#: library/tkinter.rst:4740 +msgid "" +"Add *child* to the panedwindow as a new pane, placed after any existing " +"panes. The keyword arguments specify per-pane management options for " +"*child*; they may be any of the options accepted by :meth:`paneconfigure`." +msgstr "" + +#: library/tkinter.rst:4750 +msgid "" +"Remove the pane containing *child* from the panedwindow. All geometry " +"management options for *child* are forgotten. :meth:`forget` is an alias of :" +"meth:`!remove`. This shadows the inherited geometry-manager :meth:`!forget`; " +"use :meth:`~Pack.pack_forget`, :meth:`~Grid.grid_forget` or :meth:`~Place." +"place_forget` to remove the widget itself from its manager." +msgstr "" + +#: library/tkinter.rst:4759 +msgid "" +"Return a tuple of the widgets managed by the panedwindow, one per pane, in " +"order." +msgstr "" + +#: library/tkinter.rst:4764 +msgid "" +"Return the current value of the management option *option* for the pane " +"containing *child*. *option* may be any value allowed by :meth:" +"`paneconfigure`." +msgstr "" + +#: library/tkinter.rst:4773 +msgid "" +"Query or modify the management options of the pane containing the widget " +"*tagOrId*. With no options, it returns a dictionary describing all of the " +"available options for the pane; given a single option name as a string, it " +"returns a description of that one option; otherwise it sets the given " +"options. The supported options include *after* and *before* (insert the pane " +"after or before another managed window), *height* and *width* (the outer " +"dimensions of the window, including any border), *minsize* (the minimum size " +"in the paned dimension), *padx* and *pady* (extra space to leave on each " +"side of the window), *sticky* (position or stretch the window within an " +"oversized pane, using a string of the characters ``n``, ``s``, ``e`` and " +"``w``), *hide* (hide the pane while keeping it in the list of panes) and " +"*stretch* (how extra space is allocated to the pane: one of ``'always'``, " +"``'first'``, ``'last'``, ``'middle'`` or ``'never'``). :meth:`paneconfig` is " +"an alias of :meth:`!paneconfigure`." +msgstr "" + +#: library/tkinter.rst:4791 +msgid "" +"Identify the panedwindow component underneath the point given by *x* and " +"*y*, in window coordinates. If the point is over a sash or a sash handle, " +"the result is a two-element tuple containing the index of the sash or handle " +"and a word indicating whether it is over a sash or a handle, such as ``(0, " +"'sash')`` or ``(2, 'handle')``. If the point is over any other part of the " +"panedwindow, the result is an empty string." +msgstr "" + +#: library/tkinter.rst:4802 +msgid "" +"Query or change the position of the sashes in the panedwindow. This is a " +"thin wrapper around the Tk ``sash`` subcommand; the convenience methods :" +"meth:`sash_coord`, :meth:`sash_mark` and :meth:`sash_place` should normally " +"be used instead." +msgstr "" + +#: library/tkinter.rst:4809 +msgid "" +"Return the current x and y coordinate pair for the sash given by *index*, " +"which must be an integer between 0 and one less than the number of panes in " +"the panedwindow. The coordinates returned are those of the top left corner " +"of the region containing the sash." +msgstr "" + +#: library/tkinter.rst:4817 +msgid "" +"Record the current mouse position for the sash given by *index*, for use " +"together with later sash-drag operations to move the sash." +msgstr "" + +#: library/tkinter.rst:4822 +msgid "Place the sash given by *index* at the coordinates *x* and *y*." +msgstr "" + +#: library/tkinter.rst:4826 +msgid "" +"Query or change the position of the sash proxy, the \"ghost\" sash shown " +"while a sash is being dragged with non-opaque resizing. This is a thin " +"wrapper around the Tk ``proxy`` subcommand; the convenience methods :meth:" +"`proxy_coord`, :meth:`proxy_forget` and :meth:`proxy_place` should normally " +"be used instead." +msgstr "" + +#: library/tkinter.rst:4834 +msgid "" +"Return a tuple containing the x and y coordinates of the most recent proxy " +"location." +msgstr "" + +#: library/tkinter.rst:4839 +msgid "Remove the proxy from the display." +msgstr "" + +#: library/tkinter.rst:4843 +msgid "Place the proxy at the coordinates *x* and *y*." +msgstr "" + +#: library/tkinter.rst:4848 +msgid "" +"A :class:`!Radiobutton` widget displays a textual string, bitmap or image " +"together with a diamond or circular indicator, and selects one choice out of " +"several. It has all the behavior of a simple button and, in addition, can be " +"selected: typically several radiobuttons share a single *variable*, and " +"selecting one sets that variable to the radiobutton's *value*; each " +"radiobutton also monitors the variable and automatically selects or " +"deselects itself when the variable changes. Inherits from :class:`Widget`. " +"In addition to the standard widget options, a radiobutton accepts the " +"options documented in the Tk ``radiobutton`` manual page, such as " +"*variable*, *value* and *command*." +msgstr "" + +#: library/tkinter.rst:4863 +msgid "" +"Do just what would happen if the user pressed the radiobutton with the " +"mouse: select the button and invoke the associated command, if there is one. " +"Return the result of the command, or an empty string if no command is " +"associated with the radiobutton. This is ignored if the radiobutton's state " +"is ``disabled``." +msgstr "" + +#: library/tkinter.rst:4872 +msgid "" +"Select the radiobutton and set the associated variable to the value " +"corresponding to this widget." +msgstr "" + +#: library/tkinter.rst:4877 +msgid "" +"Deselect the radiobutton and set the associated variable to an empty string. " +"If this radiobutton was not currently selected, this has no effect." +msgstr "" + +#: library/tkinter.rst:4883 +msgid "" +"Flash the radiobutton by redisplaying it several times, alternating between " +"the active and normal colors. At the end of the flash the radiobutton is " +"left in the same normal or active state as when the method was called. This " +"is ignored if the radiobutton's state is ``disabled``." +msgstr "" + +#: library/tkinter.rst:4892 +msgid "" +"A :class:`!Scale` widget lets the user select a numerical value by moving a " +"slider along a trough. It can be oriented vertically or horizontally and can " +"optionally display a label and the current value. Inherits from :class:" +"`Widget`." +msgstr "" + +#: library/tkinter.rst:4898 +msgid "" +"In addition to the standard widget options, a scale accepts the options " +"documented in the Tk ``scale`` manual page, such as *from_*, *to*, " +"*resolution*, *orient*, *tickinterval*, *variable* and *command*. As " +"elsewhere in :mod:`!tkinter`, the leading ``-`` of the Tk option name is " +"dropped; *from* is spelled ``from_`` because :keyword:`from` is a Python " +"keyword." +msgstr "" + +#: library/tkinter.rst:4905 +msgid "" +"With a non-integer *resolution*, see :ref:`numeric values and the locale " +"`." +msgstr "" + +#: library/tkinter.rst:4910 +msgid "" +"Return the current value of the scale. The result is an integer if the " +"scale's *resolution* yields whole numbers, and a float otherwise." +msgstr "" + +#: library/tkinter.rst:4916 +msgid "" +"Set the scale to *value*, moving the slider accordingly. This has no effect " +"if the scale is disabled." +msgstr "" + +#: library/tkinter.rst:4921 +msgid "" +"Return a tuple ``(x, y)`` giving the pixel coordinates, relative to the " +"widget, of the point on the centerline of the trough that corresponds to " +"*value*. If *value* is omitted, the scale's current value is used." +msgstr "" + +#: library/tkinter.rst:4928 +msgid "" +"Return a string describing the part of the scale at the pixel coordinates " +"*x*, *y*: ``'slider'``, ``'trough1'`` (the part of the trough above or to " +"the left of the slider), ``'trough2'`` (below or to the right of the " +"slider), or an empty string if the point is not over any of these elements." +msgstr "" + +#: library/tkinter.rst:4937 +msgid "" +"A :class:`!Scrollbar` widget displays a slider and two arrows that let the " +"user scroll an associated widget, such as a :class:`Listbox`, :class:" +"`Text`, :class:`Canvas` or :class:`Entry`. It is connected to the scrolled " +"widget by setting that widget's *xscrollcommand* or *yscrollcommand* option " +"to the scrollbar's :meth:`set` method, and the scrollbar's *command* option " +"to the scrolled widget's :meth:`~XView.xview` or :meth:`~YView.yview` " +"method. Inherits from :class:`Widget`." +msgstr "" + +#: library/tkinter.rst:4948 +msgid "" +"Return the current scrollbar settings as a tuple ``(first, last)`` of two " +"fractions between 0 and 1, describing the portion of the document that is " +"currently visible, as last passed to :meth:`set`." +msgstr "" + +#: library/tkinter.rst:4954 +msgid "" +"Set the scrollbar. *first* and *last* are fractions between 0 and 1 giving " +"the positions of the start and end of the visible portion of the associated " +"document. This method is normally registered as the scrolled widget's " +"*xscrollcommand* or *yscrollcommand* and called by that widget." +msgstr "" + +#: library/tkinter.rst:4962 +msgid "" +"Mark the element *index* (one of ``'arrow1'``, ``'slider'`` or ``'arrow2'``) " +"as active, displaying it according to the *activebackground* and " +"*activerelief* options. If *index* is omitted, return the name of the " +"currently active element, or ``None`` if no element is active." +msgstr "" + +#: library/tkinter.rst:4968 +msgid "The *index* argument is now optional." +msgstr "" + +#: library/tkinter.rst:4973 +msgid "" +"Return a float indicating the fractional change in the scrollbar setting " +"that corresponds to moving the slider by *deltax* pixels horizontally (for " +"horizontal scrollbars) or *deltay* pixels vertically (for vertical " +"scrollbars)." +msgstr "" + +#: library/tkinter.rst:4980 +msgid "" +"Return a float between 0 and 1 indicating where the point at pixel " +"coordinates *x*, *y* lies in the trough: 0 corresponds to the top or left of " +"the trough and 1 to the bottom or right." +msgstr "" + +#: library/tkinter.rst:4986 +msgid "" +"Return the name of the element under the pixel coordinates *x*, *y* (such as " +"``'arrow1'``), or an empty string if the point does not lie in any element " +"of the scrollbar." +msgstr "" + +#: library/tkinter.rst:4993 +msgid "" +"A :class:`!Spinbox` widget is an :class:`Entry`-like widget with a pair of " +"up/down arrow buttons that let the user step through a range of values in " +"addition to editing the value directly. The set of values may be a numeric " +"range given by the *from_*, *to* and *increment* options, or an explicit " +"list of strings given by the *values* option (which takes precedence over " +"the range). Each time an arrow is invoked the *command* callback, if any, is " +"called; the *wrap* option controls whether stepping past either end of the " +"range wraps around to the other end; the *format* option specifies how " +"numeric values are formatted; and the *validate* option enables validation " +"of the entered text. Inherits from :class:`Widget` and :class:`XView`." +msgstr "" + +#: library/tkinter.rst:5006 +msgid "" +"With a non-integer *increment*, see :ref:`numeric values and the locale " +"`." +msgstr "" + +#: library/tkinter.rst:5009 +msgid "" +"Many of the methods take an *index* argument identifying a character in the " +"spinbox's string. As described in the Tk ``spinbox`` manual page, *index* " +"may be a numeric index (counting from 0), ``'anchor'`` (the selection anchor " +"point), ``'end'`` (just after the last character), ``'insert'`` (the " +"character just after the insertion cursor), ``'sel.first'`` or ``'sel." +"last'`` (the ends of the selection), or ``@x`` (the character covering pixel " +"x-coordinate *x* in the window)." +msgstr "" + +#: library/tkinter.rst:5020 +msgid "Return the spinbox's string." +msgstr "" + +#: library/tkinter.rst:5024 +msgid "" +"Insert the characters of the string *s* just before the character given by " +"*index*." +msgstr "" + +#: library/tkinter.rst:5029 +msgid "" +"Delete one or more characters of the spinbox. *first* is the index of the " +"first character to delete, and *last* is the index of the character just " +"after the last one to delete. If *last* is omitted, a single character at " +"*first* is deleted." +msgstr "" + +#: library/tkinter.rst:5041 +msgid "Return the numerical index corresponding to *index*, as a string." +msgstr "" + +#: library/tkinter.rst:5045 +msgid "" +"Return a tuple of four integers ``(x, y, width, height)`` describing the " +"bounding box of the character given by *index*. *x* and *y* are the pixel " +"coordinates of the upper-left corner of the character relative to the " +"widget, and *width* and *height* are its size in pixels. The bounding box " +"may refer to a region outside the visible area of the window." +msgstr "" + +#: library/tkinter.rst:5058 +msgid "" +"Return the name of the window element at the pixel coordinates *x*, *y*: one " +"of ``'buttondown'``, ``'buttonup'``, ``'entry'`` or ``'none'``." +msgstr "" + +#: library/tkinter.rst:5063 +msgid "" +"Invoke the spin button given by *element*, either ``'buttonup'`` or " +"``'buttondown'``, triggering the action associated with it." +msgstr "" + +#: library/tkinter.rst:5068 +msgid "" +"A thin wrapper around the Tk ``scan`` widget subcommand, used to implement " +"fast dragging of the view: ``scan('mark', x)`` records *x* and the current " +"view, and ``scan('dragto', x)`` adjusts the view relative to that mark. The :" +"meth:`scan_mark` and :meth:`scan_dragto` methods wrap the two forms." +msgstr "" + +#: library/tkinter.rst:5076 +msgid "" +"Record *x* and the current view in the spinbox window, for use with a later :" +"meth:`scan_dragto` call. This is typically associated with a mouse button " +"press in the widget." +msgstr "" + +#: library/tkinter.rst:5082 +msgid "" +"Adjust the view by 10 times the difference between *x* and the *x* passed to " +"the last :meth:`scan_mark` call. This is typically associated with mouse " +"motion events, producing the effect of dragging the spinbox at high speed " +"through the window." +msgstr "" + +#: library/tkinter.rst:5089 +msgid "" +"A thin wrapper around the Tk ``selection`` widget subcommand, used to adjust " +"the selection within the spinbox. It has several forms depending on the " +"first argument, such as ``selection('adjust', index)``, " +"``selection('clear')``, ``selection('element', ?elem?)``, " +"``selection('from', index)``, ``selection('present')``, ``selection('range', " +"start, end)`` and ``selection('to', index)``. The :meth:`selection_adjust`, :" +"meth:`selection_clear`, :meth:`selection_element`, :meth:`selection_from`, :" +"meth:`selection_present`, :meth:`selection_range` and :meth:`selection_to` " +"methods wrap these forms." +msgstr "" + +#: library/tkinter.rst:5103 +msgid "" +"Locate the end of the selection nearest to the character given by *index* " +"and adjust that end of the selection to be at *index* (including but not " +"going beyond *index*). The other end becomes the anchor point for future :" +"meth:`selection_to` calls. If the selection is not currently in the spinbox, " +"a new selection is created to include the characters between *index* and the " +"most recent anchor point, inclusive." +msgstr "" + +#: library/tkinter.rst:5114 +msgid "" +"Clear the selection if it is currently in this widget. If the selection is " +"not in this widget, the method has no effect." +msgstr "" + +#: library/tkinter.rst:5119 +msgid "" +"This shadows the inherited :meth:`Misc.selection_clear`, which clears the X " +"selection; that method is not available on a :class:`Spinbox`." +msgstr "" + +#: library/tkinter.rst:5125 +msgid "" +"Set or get the currently selected element. If *element* (one of " +"``'buttonup'``, ``'buttondown'`` or ``'none'``) is given, that spin button " +"is selected and displayed depressed; otherwise the name of the currently " +"selected element is returned." +msgstr "" + +#: library/tkinter.rst:5132 +msgid "" +"Set the selection anchor point to just before the character given by " +"*index*, without changing the selection itself." +msgstr "" + +#: library/tkinter.rst:5140 +msgid "" +"Return ``True`` if there are characters selected in the spinbox, ``False`` " +"otherwise." +msgstr "" + +#: library/tkinter.rst:5148 +msgid "" +"Set the selection to include the characters starting with the one indexed by " +"*start* and ending with the one just before *end*. If *end* refers to the " +"same character as *start* or an earlier one, the selection is cleared." +msgstr "" + +#: library/tkinter.rst:5158 +msgid "" +"Set the selection between *index* and the anchor point. If *index* is before " +"the anchor point, the selection runs from *index* up to but not including " +"the anchor point; if it is after, the selection runs from the anchor point " +"up to but not including *index*; if it is the same, nothing happens. The " +"anchor point is the one set by the most recent :meth:`selection_from` or :" +"meth:`selection_adjust` call. If the selection is not in this widget, a new " +"selection is created using the most recent anchor point." +msgstr "" + +#: library/tkinter.rst:5174 +msgid "" +"A :class:`!Text` widget displays and edits multi-line text. Portions of the " +"text may be styled with **tags**, particular positions may be annotated with " +"floating **marks**, and arbitrary images and other widgets may be embedded " +"in the text. The widget also provides an unlimited undo/redo mechanism and " +"supports peer widgets that share the same underlying data. Inherits from :" +"class:`Widget`, :class:`XView` and :class:`YView`, so the view can be " +"scrolled horizontally and vertically with :meth:`~XView.xview` and :meth:" +"`~YView.yview`. Refer to the Tk ``text`` manual page for the full list of " +"options." +msgstr "" + +#: library/tkinter.rst:5185 +msgid "" +"Most of the methods take one or more *index* arguments that identify a " +"position within the text. As described in the Tk ``text`` manual page, an " +"index is a string consisting of a base, optionally followed by one or more " +"modifiers. The base may be ``'line.char'`` (line *line*, character *char*, " +"where lines are counted from 1 and characters within a line from 0; ``'line." +"end'`` refers to the newline ending the line), ``'end'`` (the position just " +"after the last newline), the name of a mark, ``'tag.first'`` or ``'tag." +"last'`` (the first character tagged with *tag*, or the position just after " +"the last such character), the name of an embedded image or window, or ``@x," +"y`` (the character covering pixel coordinates *x*, *y* in the widget). A " +"modifier such as ``'+5 chars'``, ``'-3 lines'``, ``'linestart'``, " +"``'lineend'``, ``'wordstart'`` or ``'wordend'`` adjusts the index relative " +"to its base; several modifiers may be combined and are applied from left to " +"right, for example ``'insert wordstart - 1 c'``." +msgstr "" + +#: library/tkinter.rst:5203 +msgid "" +"Insert the string *chars* just before the character at *index* (if *index* " +"is ``'end'``, just before the final newline). By default the new text " +"inherits any tags present on both sides of the insertion point. If *args* is " +"given, it consists of alternating *tagList*, *chars* values: the preceding " +"*chars* receives exactly the tags listed (a tag list may be a single tag " +"name or a sequence of names), overriding the surrounding tags." +msgstr "" + +#: library/tkinter.rst:5214 +msgid "" +"Delete the range of characters from *index1* up to but not including " +"*index2*. If *index2* is omitted, the single character at *index1* is " +"deleted. The widget always keeps a newline as its last character, so a " +"deletion that would remove it is adjusted accordingly." +msgstr "" + +#: library/tkinter.rst:5222 +msgid "" +"Replace the range of characters from *index1* up to but not including " +"*index2* with *chars*. This is equivalent to a :meth:`delete` followed by " +"an :meth:`insert` at *index1*; *args* is interpreted as for :meth:`insert`." +msgstr "" + +#: library/tkinter.rst:5231 +msgid "" +"Return the text from *index1* up to but not including *index2* as a string. " +"If *index2* is omitted, return the single character at *index1*. Embedded " +"images and windows are omitted from the result." +msgstr "" + +#: library/tkinter.rst:5238 +msgid "" +"Return the position corresponding to *index* in the canonical ``'line." +"char'`` form." +msgstr "" + +#: library/tkinter.rst:5243 +msgid "" +"Compare the positions of *index1* and *index2* using the relational operator " +"*op*, which must be one of ``'<'``, ``'<='``, ``'=='``, ``'>='``, ``'>'`` or " +"``'!='``, and return the boolean result." +msgstr "" + +#: library/tkinter.rst:5249 +msgid "" +"Count the number of items of the requested kinds between *index1* and " +"*index2*; the count is negative if *index1* is after *index2*. Each of " +"*options* names a kind of item to count: ``'chars'``, ``'displaychars'``, " +"``'displayindices'``, ``'displaylines'``, ``'indices'``, ``'lines'``, " +"``'xpixels'`` or ``'ypixels'`` (the default, used when no option is given, " +"is ``'indices'``). The pseudo-option ``'update'`` forces any out-of-date " +"layout information to be recalculated before the following options are " +"evaluated. When *return_ints* is true and a single counting option is given, " +"return a plain integer; otherwise return a tuple with one integer per " +"counting option (or ``None`` if the result is empty)." +msgstr "" + +#: library/tkinter.rst:5263 +msgid "Added the *return_ints* parameter." +msgstr "" + +#: library/tkinter.rst:5269 +msgid "" +"Adjust the view so that the character given by *index* is visible. If it is " +"already visible the method has no effect; if it is a short distance out of " +"view the widget scrolls just enough to bring it to the nearest edge, " +"otherwise it scrolls to center *index* in the window." +msgstr "" + +#: library/tkinter.rst:5276 +msgid "" +"Return a tuple ``(x, y, width, height)`` giving the bounding box, in pixels, " +"of the visible part of the character at *index*, or ``None`` if that " +"character is not visible on the screen." +msgstr "" + +#: library/tkinter.rst:5285 +msgid "" +"Return a tuple ``(x, y, width, height, baseline)`` describing the display " +"line that contains *index*: the first four values give the bounding box of " +"the line in pixels and *baseline* gives the offset of the baseline measured " +"down from the top of the area. Return ``None`` if that display line is not " +"visible on the screen." +msgstr "" + +#: library/tkinter.rst:5293 +msgid "" +"Set the mark named *markName* to the position just before the character at " +"*index*, creating the mark if it does not already exist. A mark created this " +"way has right gravity by default." +msgstr "" + +#: library/tkinter.rst:5299 +msgid "" +"Remove each of the marks named in *markNames*. The special ``insert`` and " +"``current`` marks may not be removed." +msgstr "" + +#: library/tkinter.rst:5304 +msgid "Return a tuple of the names of all marks currently set in the widget." +msgstr "" + +#: library/tkinter.rst:5308 +msgid "" +"If *direction* is omitted, return the gravity of mark *markName*, either " +"``'left'`` or ``'right'``. Otherwise set its gravity to *direction*. The " +"gravity determines on which side of the mark text inserted at the mark's " +"position appears: a mark with right gravity (the default) stays to the right " +"of such text." +msgstr "" + +#: library/tkinter.rst:5317 +msgid "" +"Return the name of the first mark at or after *index*, or ``None`` if there " +"is none. When *index* is the name of a mark, the search starts just after " +"that mark." +msgstr "" + +#: library/tkinter.rst:5324 +msgid "" +"Return the name of the last mark at or before *index*, or ``None`` if there " +"is none. When *index* is the name of a mark, the search starts just before " +"that mark." +msgstr "" + +#: library/tkinter.rst:5331 +msgid "" +"Add the tag *tagName* to the range of characters from *index1* up to but not " +"including the next index in *args*. Further pairs of indices may follow in " +"*args* to tag additional ranges; a trailing single index tags just the " +"character at that index." +msgstr "" + +#: library/tkinter.rst:5338 +msgid "" +"Remove the tag *tagName* from the characters from *index1* up to but not " +"including *index2* (or from the single character at *index1* if *index2* is " +"omitted). The tag itself continues to exist even if no characters carry it." +msgstr "" + +#: library/tkinter.rst:5345 +msgid "" +"Delete each of the tags named in *tagNames*, removing them from all " +"characters and discarding their options and bindings." +msgstr "" + +#: library/tkinter.rst:5353 +msgid "" +"Query or modify the configuration options of the tag *tagName*. This " +"mirrors :meth:`~Misc.configure`, except that it applies to a tag rather than " +"to the widget as a whole: with no options it returns a dictionary describing " +"the current options, otherwise it sets the given options. Defining a tag " +"this way also gives it a priority higher than any existing tag." +msgstr "" + +#: library/tkinter.rst:5361 +msgid "" +"The supported tag options, all controlling the appearance of the tagged " +"text, are:" +msgstr "" + +#: library/tkinter.rst:5367 +msgid "*foreground*" +msgstr "" + +#: library/tkinter.rst:5368 +msgid "The color to use for the text." +msgstr "" + +#: library/tkinter.rst:5370 +msgid "*background*" +msgstr "" + +#: library/tkinter.rst:5371 +msgid "The color to use for the area behind the text." +msgstr "" + +#: library/tkinter.rst:5373 +msgid "*fgstipple*, *bgstipple*" +msgstr "" + +#: library/tkinter.rst:5374 +msgid "" +"Bitmaps used to stipple the foreground (text) and the background; only well " +"supported on X11." +msgstr "" + +#: library/tkinter.rst:5377 +msgid "*borderwidth*" +msgstr "" + +#: library/tkinter.rst:5378 +msgid "" +"The width of the border drawn around the text according to *relief* (default " +"``0``)." +msgstr "" + +#: library/tkinter.rst:5381 +msgid "*relief*" +msgstr "" + +#: library/tkinter.rst:5382 +msgid "" +"The 3-D appearance of the text's border: ``'flat'`` (the default), " +"``'raised'``, ``'sunken'``, ``'ridge'``, ``'groove'`` or ``'solid'``." +msgstr "" + +#: library/tkinter.rst:5385 +msgid "*offset*" +msgstr "" + +#: library/tkinter.rst:5386 +msgid "" +"How far the text is raised above (or, if negative, lowered below) the " +"baseline, for superscripts and subscripts." +msgstr "" + +#: library/tkinter.rst:5390 +msgid "Whether to underline the text." +msgstr "" + +#: library/tkinter.rst:5392 +msgid "*underlinefg*" +msgstr "" + +#: library/tkinter.rst:5393 +msgid "The color of the underline; it defaults to the text color." +msgstr "" + +#: library/tkinter.rst:5395 +msgid "*overstrike*" +msgstr "" + +#: library/tkinter.rst:5396 +msgid "Whether to draw a line through the middle of the text." +msgstr "" + +#: library/tkinter.rst:5398 +msgid "*overstrikefg*" +msgstr "" + +#: library/tkinter.rst:5399 +msgid "The color of the overstrike line; it defaults to the text color." +msgstr "" + +#: library/tkinter.rst:5401 +msgid "*elide*" +msgstr "" + +#: library/tkinter.rst:5402 +msgid "Whether the text is elided (hidden)." +msgstr "" + +#: library/tkinter.rst:5405 +msgid "" +"How to justify the first character of a display line: ``'left'`` (the " +"default), ``'right'`` or ``'center'``." +msgstr "" + +#: library/tkinter.rst:5408 +msgid "*wrap*" +msgstr "" + +#: library/tkinter.rst:5409 +msgid "" +"How to wrap lines that are too long: ``'char'``, ``'word'`` or ``'none'``." +msgstr "" + +#: library/tkinter.rst:5412 +msgid "*lmargin1*, *lmargin2*" +msgstr "" + +#: library/tkinter.rst:5413 +msgid "" +"The indentation, in pixels, of the first display line of a logical line and " +"of the remaining display lines." +msgstr "" + +#: library/tkinter.rst:5416 +msgid "*lmargincolor*" +msgstr "" + +#: library/tkinter.rst:5417 +msgid "The color of the left margin area." +msgstr "" + +#: library/tkinter.rst:5419 +msgid "*rmargin*" +msgstr "" + +#: library/tkinter.rst:5420 +msgid "The right-hand margin, in pixels." +msgstr "" + +#: library/tkinter.rst:5422 +msgid "*rmargincolor*" +msgstr "" + +#: library/tkinter.rst:5423 +msgid "The color of the right margin area." +msgstr "" + +#: library/tkinter.rst:5425 +msgid "*spacing1*, *spacing2*, *spacing3*" +msgstr "" + +#: library/tkinter.rst:5426 +msgid "" +"Extra space, in pixels, above the first display line of a logical line, " +"between its display lines, and below its last display line." +msgstr "" + +#: library/tkinter.rst:5429 +msgid "*tabs*" +msgstr "" + +#: library/tkinter.rst:5430 +msgid "The set of tab stops, in the same form as the widget's *tabs* option." +msgstr "" + +#: library/tkinter.rst:5432 +msgid "*tabstyle*" +msgstr "" + +#: library/tkinter.rst:5433 +msgid "How tab stops are interpreted: ``'tabular'`` or ``'wordprocessor'``." +msgstr "" + +#: library/tkinter.rst:5435 +msgid "*selectbackground*, *selectforeground*" +msgstr "" + +#: library/tkinter.rst:5436 +msgid "" +"The background and foreground colors used for the text while it is selected." +msgstr "" + +#: library/tkinter.rst:5441 +msgid "" +"Tk 8.6 added the *lmargincolor*, *overstrikefg*, *rmargincolor*, " +"*selectbackground*, *selectforeground* and *underlinefg* options." +msgstr "" + +#: library/tkinter.rst:5444 +msgid ":meth:`tag_config` is an alias of :meth:`!tag_configure`." +msgstr "" + +#: library/tkinter.rst:5448 +msgid "" +"Return the current value of the configuration option *option* for the tag " +"*tagName*." +msgstr "" + +#: library/tkinter.rst:5453 +msgid "" +"If *index* is omitted, return a tuple of the names of all tags defined in " +"the widget; otherwise return only the names of the tags applied to the " +"character at *index*. The names are ordered from lowest to highest priority." +msgstr "" + +#: library/tkinter.rst:5460 +msgid "" +"Return a tuple of indices describing all ranges of text tagged with " +"*tagName*. The result alternates start and end indices, so that elements " +"``2*i`` and ``2*i+1`` bound the *i*-th range." +msgstr "" + +#: library/tkinter.rst:5467 +msgid "" +"Search forward from *index1* (up to *index2* if given) for the first range " +"of characters tagged with *tagName*, and return a two-element tuple of its " +"start and end indices, or an empty tuple if there is no such range." +msgstr "" + +#: library/tkinter.rst:5474 +msgid "" +"Search backward from *index1* (down to *index2* if given) for the nearest " +"preceding range of characters tagged with *tagName*, and return a two-" +"element tuple of its start and end indices, or an empty tuple if there is no " +"such range." +msgstr "" + +#: library/tkinter.rst:5481 +msgid "" +"Raise the priority of tag *tagName* so that it is just above the priority of " +"*aboveThis*, or to the highest priority of all tags if *aboveThis* is " +"omitted. When the display options of overlapping tags conflict, the higher-" +"priority tag wins." +msgstr "" + +#: library/tkinter.rst:5489 +msgid "" +"Lower the priority of tag *tagName* so that it is just below the priority of " +"*belowThis*, or to the lowest priority of all tags if *belowThis* is omitted." +msgstr "" + +#: library/tkinter.rst:5495 +msgid "" +"Bind the event *sequence* on characters tagged with *tagName* to the " +"callback *func*, so that *func* is invoked when that event occurs over such " +"a character. If *add* is true the binding is added alongside any existing " +"bindings for *sequence*, otherwise it replaces them. Works like :meth:`~Misc." +"bind` and returns the identifier of the new binding." +msgstr "" + +#: library/tkinter.rst:5505 +msgid "" +"Remove the bindings of the event *sequence* on characters tagged with " +"*tagName*. If *funcid* is given, only that binding (as returned by :meth:" +"`tag_bind`) is removed and its callback is unregistered." +msgstr "" + +#: library/tkinter.rst:5516 +msgid "" +"Embed an image at *index* and return the name assigned to this image " +"instance, which may then be used as an index or passed to the other " +"``image_*`` methods. The options, given in *cnf* and *kw*, include *image* " +"(the Tk image to display), *name* (a base name for the instance), *align*, " +"*padx* and *pady*." +msgstr "" + +#: library/tkinter.rst:5525 +msgid "" +"Return the current value of the configuration option *option* for the " +"embedded image at *index*." +msgstr "" + +#: library/tkinter.rst:5530 +msgid "" +"Query or modify the configuration options of the embedded image at *index*, " +"like :meth:`~Misc.configure` but applied to that image." +msgstr "" + +#: library/tkinter.rst:5535 +msgid "Return a tuple of the names of all images embedded in the widget." +msgstr "" + +#: library/tkinter.rst:5539 +msgid "" +"This shadows the inherited :meth:`Misc.image_names`, which returns the names " +"of all images in the Tcl interpreter; that method is not available on a :" +"class:`Text`." +msgstr "" + +#: library/tkinter.rst:5545 +msgid "" +"Embed a window (any widget) at *index*. The options, given in *cnf* and " +"*kw*, include *window* (the widget to embed), *create* (a callback that " +"creates the widget on demand), *align*, *stretch*, *padx* and *pady*. The " +"embedded widget must be a descendant of the text widget's parent." +msgstr "" + +#: library/tkinter.rst:5553 +msgid "" +"Return the current value of the configuration option *option* for the " +"embedded window at *index*." +msgstr "" + +#: library/tkinter.rst:5561 +msgid "" +"Query or modify the configuration options of the embedded window at *index*, " +"like :meth:`~Misc.configure` but applied to that window." +msgstr "" + +#: library/tkinter.rst:5564 +msgid ":meth:`window_config` is an alias of :meth:`!window_configure`." +msgstr "" + +#: library/tkinter.rst:5568 +msgid "Return a tuple of the names of all windows embedded in the widget." +msgstr "" + +#: library/tkinter.rst:5572 +msgid "" +"Low-level wrapper around the Tk ``edit`` widget command that controls the " +"undo/redo mechanism and the modified flag; *args* is the ``edit`` subcommand " +"and its arguments. The :meth:`!edit_\\*` methods below are thin wrappers " +"around it and are usually more convenient." +msgstr "" + +#: library/tkinter.rst:5580 +msgid "" +"If *arg* is omitted, return the current state of the modified flag as true " +"or false; the flag is set automatically whenever the text is inserted or " +"deleted. Otherwise set the flag to the boolean *arg*." +msgstr "" + +#: library/tkinter.rst:5587 +msgid "" +"Undo the most recent edit action, that is, all the inserts and deletes " +"recorded on the undo stack since the previous separator, and move it to the " +"redo stack. Raises :exc:`TclError` if the undo stack is empty. Has no effect " +"unless the *undo* option is true. Since Tk 9.0, returns a tuple of indices " +"delimiting the ranges of text that were changed." +msgstr "" + +#: library/tkinter.rst:5597 +msgid "" +"Reapply the most recently undone edit action, provided no further edits have " +"been made since, and move it back to the undo stack. Raises :exc:`TclError` " +"if the redo stack is empty. Has no effect unless the *undo* option is true. " +"Since Tk 9.0, returns a tuple of indices delimiting the ranges of text that " +"were changed." +msgstr "" + +#: library/tkinter.rst:5606 +msgid "Clear the undo and redo stacks." +msgstr "" + +#: library/tkinter.rst:5610 +msgid "" +"Push a separator onto the undo stack, marking a boundary between edit " +"actions for undo and redo. Has no effect unless the *undo* option is true. " +"Separators are inserted automatically when the *autoseparators* option is " +"true." +msgstr "" + +#: library/tkinter.rst:5618 +msgid "" +"Search for *pattern* starting at *index* and return the index of the first " +"character of the first match, or an empty string if there is no match. " +"Searching stops at *stopindex* if given; otherwise it wraps around the ends " +"of the text until the starting position is reached again. The following " +"boolean keyword flags control the search: *forwards* or *backwards* select " +"the direction (forward is the default); *exact* (the default) or *regexp* " +"select literal or regular-expression matching; *nocase* makes the match case-" +"insensitive; and *elide* causes hidden text to be searched as well. If " +"*count* is a :class:`Variable`, the number of index positions in the match " +"is stored in it." +msgstr "" + +#: library/tkinter.rst:5640 +msgid "" +"Scroll the widget by 10 times the difference between *x*, *y* and the " +"coordinates passed to the last :meth:`scan_mark` call. This is typically " +"bound to mouse motion events, producing the effect of dragging the text at " +"high speed through the window." +msgstr "" + +#: library/tkinter.rst:5647 +msgid "" +"If *boolean* is omitted, return whether internal consistency checks of the B-" +"tree data structure are enabled. Otherwise enable or disable them. The " +"setting is shared by all text widgets and may noticeably slow down widgets " +"holding large amounts of text." +msgstr "" + +#: library/tkinter.rst:5655 +msgid "" +"Return the contents of the widget from *index1* up to but not including " +"*index2* (or just the segment at *index1* if *index2* is omitted), including " +"text and information about marks, tags, images and windows. The result is a " +"list of ``(key, value, index)`` triples, where *key* is one of ``'text'``, " +"``'mark'``, ``'tagon'``, ``'tagoff'``, ``'image'`` or ``'window'``. By " +"default all kinds are reported; passing any of the keyword arguments *all*, " +"*text*, *mark*, *tag*, *image* or *window* as true restricts the dump to the " +"selected kinds. If *command* is given, it is called once per triple with the " +"three values as arguments and nothing is returned." +msgstr "" + +#: library/tkinter.rst:5669 +msgid "" +"Create a peer text widget with the path name *newPathName* that shares this " +"widget's underlying data (text, marks, tags, images and the undo stack). " +"Changes made through any peer are reflected in all of them. By default the " +"peer covers the same lines as this widget; standard text options, including " +"*startline* and *endline*, may be given to override this." +msgstr "" + +#: library/tkinter.rst:5681 +msgid "" +"Return a tuple of the path names of this widget's peers, not including the " +"widget itself." +msgstr "" + +#: library/tkinter.rst:5688 +msgid "" +"Adjust the view so that the location given by *what* is visible. This is an " +"obsolete equivalent of :meth:`see`, which should be used instead." +msgstr "" + +#: library/tkinter.rst:5694 +msgid "Variable classes" +msgstr "" + +#: library/tkinter.rst:5698 +msgid "" +"The base class for the Tk variable wrappers. A Tk variable is a value stored " +"in the Tcl interpreter that can be linked to widgets through their " +"*variable* or *textvariable* options (see :ref:`coupling-widget-variables`), " +"so that changes propagate both ways: updating the variable updates every " +"widget bound to it, and a user editing such a widget updates the variable." +msgstr "" + +#: library/tkinter.rst:5705 +msgid "" +"*master* is the widget whose Tcl interpreter owns the variable; if omitted, " +"the default root window is used. *value* is the initial value; if omitted, a " +"type-specific default is used. *name* is the name of the variable in the Tcl " +"interpreter; if omitted, a unique name of the form ``'PY_VARnum'`` is " +"generated. If *name* matches an existing variable and *value* is omitted, " +"the existing value is retained." +msgstr "" + +#: library/tkinter.rst:5713 +msgid "" +"In most cases you should use one of the typed subclasses below -- :class:" +"`StringVar`, :class:`IntVar`, :class:`DoubleVar` or :class:`BooleanVar` -- " +"rather than :class:`!Variable` directly." +msgstr "" + +#: library/tkinter.rst:5719 +msgid "" +"When a :class:`!Variable` is garbage collected, its Tcl variable is unset. " +"Keep a reference to it for as long as a widget is linked to it, for example " +"by storing it as an attribute rather than in a local variable. Otherwise Tk " +"recreates the Tcl variable to keep the widget working, but it is never unset " +"again, leaking one Tcl variable per dropped wrapper." +msgstr "" + +#: library/tkinter.rst:5725 +msgid "" +"Two variables now compare equal (``==``) only when they have the same name, " +"are of the same class, and belong to the same Tcl interpreter." +msgstr "" + +#: library/tkinter.rst:5731 +msgid "" +"Return the current value of the variable. For the base class the value is " +"returned as a string; the typed subclasses convert it to the appropriate " +"Python type." +msgstr "" + +#: library/tkinter.rst:5740 +msgid "" +"Set the variable to *value*. :meth:`initialize` is an alias of :meth:`!set`." +msgstr "" + +#: library/tkinter.rst:5874 +msgid "The *initialize* spelling." +msgstr "" + +#: library/tkinter.rst:5748 +msgid "" +"Register *callback* to be called when the variable is accessed according to " +"*mode*. *mode* is one of the strings ``'array'``, ``'read'``, ``'write'`` or " +"``'unset'``, or a list or tuple of such strings." +msgstr "" + +#: library/tkinter.rst:5753 +msgid "" +"When triggered, *callback* is called with three arguments: the name of the " +"Tcl variable, an index (or an empty string if the variable is not an element " +"of an array), and the *mode* that triggered the call." +msgstr "" + +#: library/tkinter.rst:5757 +msgid "" +"Return the internal name of the registered callback, which can be passed to :" +"meth:`trace_remove`." +msgstr "" + +#: library/tkinter.rst:5764 +msgid "" +"Remove a trace callback from the variable. *mode* must match the *mode* that " +"was passed to :meth:`trace_add`, and *cbname* is the callback name returned " +"by :meth:`trace_add`." +msgstr "" + +#: library/tkinter.rst:5772 +msgid "" +"Return a list of ``(modes, cbname)`` pairs describing all traces currently " +"set on the variable, where *modes* is a tuple of mode strings and *cbname* " +"is the internal callback name." +msgstr "" + +#: library/tkinter.rst:5783 +msgid "" +"Register *callback* to be called when the variable is accessed according to " +"*mode*. *mode* is one of the strings ``'r'``, ``'w'`` or ``'u'``, for read, " +"write or unset. Return the internal name of the registered callback. :meth:" +"`trace` is an alias of :meth:`!trace_variable`." +msgstr "" + +#: library/tkinter.rst:5790 +msgid "" +"Use :meth:`trace_add` instead. This method wraps a Tcl feature that was " +"removed in Tcl 9.0." +msgstr "" + +#: library/tkinter.rst:5796 +msgid "" +"Remove the trace callback named *cbname* registered for *mode* with :meth:" +"`trace_variable`." +msgstr "" + +#: library/tkinter.rst:5799 +msgid "" +"Use :meth:`trace_remove` instead. This method wraps a Tcl feature that was " +"removed in Tcl 9.0." +msgstr "" + +#: library/tkinter.rst:5805 +msgid "" +"Return a list of ``(mode, cbname)`` pairs for all traces set on the variable " +"with :meth:`trace_variable`." +msgstr "" + +#: library/tkinter.rst:5808 +msgid "" +"Use :meth:`trace_info` instead. This method wraps a Tcl feature that was " +"removed in Tcl 9.0." +msgstr "" + +#: library/tkinter.rst:5815 +msgid "" +"A :class:`Variable` subclass that holds a string. The default value is " +"``''``." +msgstr "" + +#: library/tkinter.rst:5820 +msgid "Return the value of the variable as a :class:`str`." +msgstr "" + +#: library/tkinter.rst:5825 +msgid "" +"A :class:`Variable` subclass that holds an integer. The default value is " +"``0``." +msgstr "" + +#: library/tkinter.rst:5830 +msgid "Return the value of the variable as an :class:`int`." +msgstr "" + +#: library/tkinter.rst:5835 +msgid "" +"A :class:`Variable` subclass that holds a float. The default value is " +"``0.0``." +msgstr "" + +#: library/tkinter.rst:5840 +msgid "Return the value of the variable as a :class:`float`." +msgstr "" + +#: library/tkinter.rst:5846 +msgid "" +"A floating-point value is always parsed with a period (``.``) as the decimal " +"separator, but :class:`Spinbox`, :class:`Scale` and :class:`ttk.Spinbox " +"` format it according to the ``LC_NUMERIC`` locale. " +"Under a locale that uses a comma they produce a value that :meth:`get` " +"cannot read, raising :exc:`TclError`. Set ``LC_NUMERIC`` to a locale that " +"uses a period (such as ``'C'``) to avoid this." +msgstr "" + +#: library/tkinter.rst:5857 +msgid "" +"A :class:`Variable` subclass that holds a boolean. The default value is " +"``False``." +msgstr "" + +#: library/tkinter.rst:5862 +msgid "" +"Return the value of the variable as a :class:`bool`. Raise a :exc:" +"`ValueError` if the value cannot be interpreted as a boolean." +msgstr "" + +#: library/tkinter.rst:5871 +msgid "" +"Set the variable to *value*, converting it to a boolean. :meth:`initialize` " +"is an alias of :meth:`!set`." +msgstr "" + +#: library/tkinter.rst:5879 +msgid "Image classes" +msgstr "" + +#: library/tkinter.rst:5883 +msgid "" +"Base class for Tk images. *imgtype* is the Tk image type, one of ``'photo'`` " +"or ``'bitmap'``. An image is a named object that can be displayed by widgets " +"through their *image* option; deleting all references to the :class:`!Image` " +"object deletes the underlying Tk image. Usually you create a :class:" +"`PhotoImage` or :class:`BitmapImage` rather than an :class:`!Image` directly." +msgstr "" + +#: library/tkinter.rst:5891 +msgid "" +"The image's configuration options are given by *cnf* and *kw* and may be " +"queried and changed later with the mapping protocol (using ``image[key]``) " +"or with the :meth:`configure` method." +msgstr "" + +#: library/tkinter.rst:5900 +msgid "" +"Modify one or more configuration options of the image. The valid options " +"depend on the image type; see :class:`PhotoImage` and :class:`BitmapImage`. :" +"meth:`config` is an alias of :meth:`!configure`." +msgstr "" + +#: library/tkinter.rst:5907 +msgid "Return the height of the image, in pixels." +msgstr "" + +#: library/tkinter.rst:5911 +msgid "Return the width of the image, in pixels." +msgstr "" + +#: library/tkinter.rst:5915 +msgid "" +"Return the type of the image, that is the value of *imgtype* with which it " +"was created (for example ``'photo'`` or ``'bitmap'``)." +msgstr "" + +#: library/tkinter.rst:5921 +msgid "" +"A full-color image (the Tk ``photo`` image type), stored internally with a " +"varying degree of transparency per pixel. It can read and write GIF, PPM/PGM " +"and (in Tk 8.6 and later) PNG files, read SVG files (in Tk 9.0 and later), " +"and be drawn in widgets. Inherits from :class:`Image`." +msgstr "" + +#: library/tkinter.rst:5927 +msgid "" +"The configuration options include *data* (the image contents as a string), " +"*file* (the name of a file to read the contents from), *format* (the name of " +"the file format handler), *width* and *height* (the size of the image, used " +"when building it up piece by piece), *gamma* and *palette*." +msgstr "" + +#: library/tkinter.rst:5934 +msgid "" +"Blank the image; that is, set the entire image to have no data, so that it " +"is displayed as transparent and the background of whatever window it is " +"displayed in shows through." +msgstr "" + +#: library/tkinter.rst:5940 +msgid "Return the current value of the configuration option *option*." +msgstr "" + +#: library/tkinter.rst:5944 +msgid "Return a new :class:`PhotoImage` with a copy of this image." +msgstr "" + +#: library/tkinter.rst:5946 +msgid "" +"*from_coords* specifies a rectangular sub-region of the source image to be " +"copied. It must be a tuple or a list of 1 to 4 integers ``(x1, y1, x2, " +"y2)``. ``(x1, y1)`` and ``(x2, y2)`` specify diagonally opposite corners of " +"the rectangle. If *x2* and *y2* are not specified, they default to the " +"bottom-right corner of the source image. The pixels copied include the left " +"and top edges of the rectangle but not the bottom or right edges. If " +"*from_coords* is not given, the whole source image is copied." +msgstr "" + +#: library/tkinter.rst:5989 +msgid "" +"If *zoom* or *subsample* are specified, the image is transformed as in the :" +"meth:`zoom` or :meth:`subsample` methods. The value must be a single integer " +"or a pair of integers." +msgstr "" + +#: library/tkinter.rst:5961 +msgid "Added the *from_coords*, *zoom* and *subsample* parameters." +msgstr "" + +#: library/tkinter.rst:5969 +msgid "" +"Copy a region from *sourceImage* (which must be a :class:`PhotoImage`) into " +"this image, possibly with pixel zooming and/or subsampling. If no options " +"are specified, the whole of *sourceImage* is copied into this image, " +"starting at coordinates ``(0, 0)``." +msgstr "" + +#: library/tkinter.rst:6086 library/tkinter.rst:6142 +msgid "" +"*from_coords* specifies a rectangular sub-region of the source image to be " +"copied, as in the :meth:`copy` method." +msgstr "" + +#: library/tkinter.rst:5977 +msgid "" +"*to* specifies a rectangular sub-region of the destination image to be " +"affected. It must be a tuple or a list of 1 to 4 integers ``(x1, y1, x2, " +"y2)``. If *x2* and *y2* are not specified, they default to ``(x1, y1)`` plus " +"the size of the source region (after subsampling and zooming, if specified). " +"If *x2* and *y2* are specified, the source region is replicated if necessary " +"to fill the destination region in a tiled fashion." +msgstr "" + +#: library/tkinter.rst:5985 +msgid "" +"If *shrink* is true, the size of the destination image is reduced, if " +"necessary, so that the region being copied into is at the bottom-right " +"corner of the image." +msgstr "" + +#: library/tkinter.rst:5993 +msgid "" +"*compositingrule* specifies how transparent pixels in the source image are " +"combined with the destination image. With ``'overlay'`` (the default), the " +"old contents of the destination image remain visible, as if the source image " +"were printed on a piece of transparent film and placed over the top of the " +"destination. With ``'set'``, the old contents of the destination image are " +"discarded and the source image is used as-is." +msgstr "" + +#: library/tkinter.rst:6007 +msgid "Return the image data." +msgstr "" + +#: library/tkinter.rst:6009 +msgid "" +"*format* specifies the name of the image file format handler to use. If it " +"is not given, the data is returned as a tuple (one element per row) of " +"strings containing space-separated (one element per pixel/column) colors in " +"``#RRGGBB`` format." +msgstr "" + +#: library/tkinter.rst:6014 +msgid "" +"*from_coords* specifies a rectangular region of the image to be returned. It " +"must be a tuple or a list of 1 to 4 integers ``(x1, y1, x2, y2)``. If only " +"*x1* and *y1* are specified, the region extends from ``(x1, y1)`` to the " +"bottom-right corner of the image. If all four coordinates are given, they " +"specify diagonally opposite corners of the region, including ``(x1, y1)`` " +"and excluding ``(x2, y2)``. If *from_coords* is not given, the whole image " +"is returned." +msgstr "" + +#: library/tkinter.rst:6125 +msgid "" +"If *background* is specified, the data does not contain any transparency " +"information; in all transparent pixels the color is replaced by the " +"specified color." +msgstr "" + +#: library/tkinter.rst:6129 +msgid "" +"If *grayscale* is true, the data does not contain color information; all " +"pixel data is transformed into grayscale." +msgstr "" + +#: library/tkinter.rst:6034 +msgid "" +"Return the color of the pixel at coordinates (*x*, *y*) as an ``(r, g, b)`` " +"tuple of three integers between 0 and 255, representing the red, green and " +"blue components respectively." +msgstr "" + +#: library/tkinter.rst:6040 +msgid "" +"Set pixels of the image to the colors given in *data*, which must be a " +"string or a nested sequence of horizontal rows of pixel colors (for example " +"``\"{red green} {blue yellow}\"``)." +msgstr "" + +#: library/tkinter.rst:6044 +msgid "" +"*to* specifies the coordinates of the region of the image into which the " +"data are copied. It must be a tuple or a list of 2 or 4 integers ``(x1, " +"y1)`` or ``(x1, y1, x2, y2)`` giving the top-left corner, and optionally the " +"bottom-right corner, of the region. The default position is ``(0, 0)``." +msgstr "" + +#: library/tkinter.rst:6054 +msgid "Read image data from the file named *filename* into the image." +msgstr "" + +#: library/tkinter.rst:6056 +msgid "*format* specifies the format of the image data in the file." +msgstr "" + +#: library/tkinter.rst:6058 +msgid "" +"*from_coords* specifies a rectangular sub-region of the image file data to " +"be copied to the destination image. It must be a tuple or a list of 1 to 4 " +"integers ``(x1, y1, x2, y2)``. If only *x1* and *y1* are specified, the " +"region extends from ``(x1, y1)`` to the bottom-right corner of the image in " +"the file. If all four coordinates are given, they specify diagonally " +"opposite corners of the region. If *from_coords* is not given, the whole of " +"the image in the file is read." +msgstr "" + +#: library/tkinter.rst:6068 +msgid "" +"*to* specifies the coordinates of the top-left corner of the region of the " +"image into which the data are read. The default is ``(0, 0)``." +msgstr "" + +#: library/tkinter.rst:6072 +msgid "" +"If *shrink* is true, the size of the image is reduced, if necessary, so that " +"the region into which the file data are read is at the bottom-right corner " +"of the image." +msgstr "" + +#: library/tkinter.rst:6081 +msgid "" +"Return a new :class:`PhotoImage` based on this image but using only every " +"*x*-th pixel in the X direction and every *y*-th pixel in the Y direction. " +"If *y* is not given, it defaults to the same value as *x*." +msgstr "" + +#: library/tkinter.rst:6145 +msgid "Added the *from_coords* parameter." +msgstr "" + +#: library/tkinter.rst:6095 +msgid "" +"Return ``True`` if the pixel at coordinates (*x*, *y*) is fully transparent, " +"``False`` otherwise." +msgstr "" + +#: library/tkinter.rst:6103 +msgid "" +"Make the pixel at coordinates (*x*, *y*) fully transparent if *boolean* is " +"true, fully opaque otherwise." +msgstr "" + +#: library/tkinter.rst:6112 +msgid "Write image data from the image to the file named *filename*." +msgstr "" + +#: library/tkinter.rst:6114 +msgid "" +"*format* specifies the name of the image file format handler to use. If it " +"is not given, the format is guessed from the file extension." +msgstr "" + +#: library/tkinter.rst:6117 +msgid "" +"*from_coords* specifies a rectangular region of the image to be written. It " +"must be a tuple or a list of 1 to 4 integers ``(x1, y1, x2, y2)``. If only " +"*x1* and *y1* are specified, the region extends from ``(x1, y1)`` to the " +"bottom-right corner of the image. If all four coordinates are given, they " +"specify diagonally opposite corners of the region. If *from_coords* is not " +"given, the whole image is written." +msgstr "" + +#: library/tkinter.rst:6132 +msgid "Added the *background* and *grayscale* parameters." +msgstr "" + +#: library/tkinter.rst:6138 +msgid "" +"Return a new :class:`PhotoImage` with this image magnified by a factor of " +"*x* in the X direction and *y* in the Y direction. If *y* is not given, it " +"defaults to the same value as *x*." +msgstr "" + +#: library/tkinter.rst:6152 +msgid "" +"A two-color image (the Tk ``bitmap`` image type) created from an X11 bitmap. " +"Each pixel displays a foreground color, a background color, or nothing " +"(producing a transparent effect). Inherits from :class:`Image`." +msgstr "" + +#: library/tkinter.rst:6157 +msgid "" +"The configuration options are *data* or *file* (the source bitmap, given as " +"a string in X11 bitmap format or as the name of a file in that format), " +"*maskdata* or *maskfile* (the mask bitmap, in the same forms), and " +"*foreground* and *background* (the two colors). For pixels where the mask is " +"zero the image displays nothing; for other pixels it displays the foreground " +"color where the source is one and the background color where the source is " +"zero. If *background* is set to an empty string, the background pixels are " +"transparent." +msgstr "" + +#: library/tkinter.rst:6167 +msgid "" +":class:`!BitmapImage` has no methods of its own beyond those inherited from :" +"class:`Image`." +msgstr "" + +#: library/tkinter.rst:6172 +msgid "Other classes" +msgstr "" + +#: library/tkinter.rst:6176 +msgid "" +"A container for the attributes of an event passed to a callback bound with :" +"meth:`Misc.bind`. An :class:`!Event` instance has the following attributes, " +"each corresponding to a field of the underlying Tk event; depending on the " +"event type, some attributes may be set to the string ``'??'`` to indicate " +"that they are not meaningful. See :ref:`bindings-and-events`." +msgstr "" + +#: library/tkinter.rst:6186 +msgid "The serial number of the event." +msgstr "" + +#: library/tkinter.rst:6190 +msgid "The mouse button that was pressed or released (for button events)." +msgstr "" + +#: library/tkinter.rst:6194 +msgid "Whether the window has the focus (for ``Enter`` and ``Leave`` events)." +msgstr "" + +#: library/tkinter.rst:6199 +msgid "" +"The new height and width of the window (for ``Configure`` and ``Expose`` " +"events)." +msgstr "" + +#: library/tkinter.rst:6204 +msgid "The keycode of the key that was pressed or released." +msgstr "" + +#: library/tkinter.rst:6208 +msgid "" +"The state of the event, as a number (for most events) or a string (for " +"``Visibility`` events)." +msgstr "" + +#: library/tkinter.rst:6213 +msgid "The timestamp of the event, in milliseconds." +msgstr "" + +#: library/tkinter.rst:6218 +msgid "The pointer position relative to the widget, in pixels." +msgstr "" + +#: library/tkinter.rst:6223 +msgid "" +"The pointer position relative to the top-left corner of the screen, in " +"pixels." +msgstr "" + +#: library/tkinter.rst:6228 +msgid "The character typed, as a string (for key events)." +msgstr "" + +#: library/tkinter.rst:6232 +msgid "``True`` if the event was sent by another application." +msgstr "" + +#: library/tkinter.rst:6236 +msgid "The symbolic name of the key that was pressed or released." +msgstr "" + +#: library/tkinter.rst:6240 +msgid "The numeric value of :attr:`keysym`." +msgstr "" + +#: library/tkinter.rst:6244 +msgid "The :class:`EventType` of the event." +msgstr "" + +#: library/tkinter.rst:6248 +msgid "The widget on which the event occurred." +msgstr "" + +#: library/tkinter.rst:6252 +msgid "The amount the mouse wheel was rotated (for ``MouseWheel`` events)." +msgstr "" + +#: library/tkinter.rst:6257 +msgid "" +"An :class:`enum.StrEnum` enumerating the Tk event types, used as the value " +"of :attr:`Event.type`. Its members include, among others, ``KeyPress``, " +"``KeyRelease``, ``ButtonPress``, ``ButtonRelease``, ``Motion``, ``Enter``, " +"``Leave``, ``FocusIn``, ``FocusOut``, ``Configure``, ``Map``, ``Unmap``, " +"``Expose``, ``Destroy`` and ``MouseWheel``." +msgstr "" + +#: library/tkinter.rst:6270 +msgid "" +"Internal helper that wraps a Python callback so that it can be invoked from " +"Tcl. *func* is the Python function, *subst* is an optional function that pre-" +"processes the Tcl arguments, and *widget* is the widget used for error " +"reporting. Instances are created automatically by :meth:`Misc.register`; " +"this class is not normally used directly." +msgstr "" + +#: library/tkinter.rst:6280 +msgid "Module-level functions" +msgstr "" + +#: library/tkinter.rst:6284 +msgid "" +"The :func:`Tcl` function is a factory function which creates an object much " +"like that created by the :class:`Tk` class, except that it does not " +"initialize the Tk subsystem. This is most often useful when driving the Tcl " +"interpreter in an environment where one doesn't want to create extraneous " +"toplevel windows, or where one cannot (such as Unix/Linux systems without an " +"X server). An object created by the :func:`Tcl` object can have a Toplevel " +"window created (and the Tk subsystem initialized) by calling its :meth:`~Tk." +"loadtk` method." +msgstr "" + +#: library/tkinter.rst:6296 +msgid "" +"Inhibit the creation of an implicit default root window. Afterwards :mod:`!" +"tkinter` no longer creates a shared default root automatically, and " +"operations that rely on one --- such as constructing a widget without an " +"explicit *master* --- raise a :exc:`RuntimeError`. Call this early in larger " +"applications to make the root window explicit." +msgstr "" + +#: library/tkinter.rst:6304 +msgid "" +"Run the Tk main event loop on the default root window until all windows are " +"destroyed. Equivalent to calling :meth:`Misc.mainloop` on the default root." +msgstr "" + +#: library/tkinter.rst:6310 +msgid "" +"Convert the Tcl boolean string *s* (one of ``'1'``, ``'true'``, ``'yes'``, " +"``'on'`` and similar, or their false counterparts) to a Python :class:" +"`bool`. Raise :exc:`TclError` for an invalid value." +msgstr "" + +#: library/tkinter.rst:6317 +msgid "" +"Convert *s* to a floating-point number. This is the built-in :class:`float`." +msgstr "" + +#: library/tkinter.rst:6322 +msgid "Convert *s* to an integer. This is the built-in :class:`int`." +msgstr "" + +#: library/tkinter.rst:6327 +msgid "" +"Return the names of all existing images in the default root's interpreter." +msgstr "" + +#: library/tkinter.rst:6331 +msgid "" +"Return the available image types (such as ``'photo'`` and ``'bitmap'``) in " +"the default root's interpreter." +msgstr "" + +#: library/tkinter.rst:6338 +msgid "File handlers" +msgstr "" + +#: library/tkinter.rst:6340 +msgid "" +"Tk allows you to register and unregister a callback function which will be " +"called from the Tk mainloop when I/O is possible on a file descriptor. Only " +"one handler may be registered per file descriptor. Example code::" +msgstr "" + +#: library/tkinter.rst:6344 +msgid "" +"import tkinter\n" +"widget = tkinter.Tk()\n" +"mask = tkinter.READABLE | tkinter.WRITABLE\n" +"widget.tk.createfilehandler(file, mask, callback)\n" +"...\n" +"widget.tk.deletefilehandler(file)" +msgstr "" + +#: library/tkinter.rst:6351 +msgid "This feature is not available on Windows." +msgstr "" + +#: library/tkinter.rst:6353 +msgid "" +"Since you don't know how many bytes are available for reading, you may not " +"want to use the :class:`~io.BufferedIOBase` or :class:`~io.TextIOBase` :meth:" +"`~io.BufferedIOBase.read` or :meth:`~io.IOBase.readline` methods, since " +"these will insist on reading a predefined number of bytes. For sockets, the :" +"meth:`~socket.socket.recv` or :meth:`~socket.socket.recvfrom` methods will " +"work fine; for other files, use raw reads or ``os.read(file.fileno(), " +"maxbytecount)``." +msgstr "" + +#: library/tkinter.rst:6364 +msgid "" +"Registers the file handler callback function *func*. The *file* argument may " +"either be an object with a :meth:`~io.IOBase.fileno` method (such as a file " +"or socket object), or an integer file descriptor. The *mask* argument is an " +"ORed combination of any of the three constants below. The callback is called " +"as follows::" +msgstr "" + +#: library/tkinter.rst:6370 +msgid "callback(file, mask)" +msgstr "" + +#: library/tkinter.rst:6375 +msgid "Unregisters a file handler." +msgstr "" + +#: library/tkinter.rst:6382 +msgid "Constants used in the *mask* arguments." +msgstr "" + +#: library/tkinter.rst:6386 +msgid "Constants" +msgstr "" + +#: library/tkinter.rst:6388 +msgid "" +"The following symbolic constants are available in both the :mod:`!tkinter` " +"and :mod:`!tkinter.constants` namespaces." +msgstr "" + +#: library/tkinter.rst:6395 +msgid "Truthy values, all equal to the integer ``1``." +msgstr "" + +#: library/tkinter.rst:6401 +msgid "Falsy values, all equal to the integer ``0``." +msgstr "" + +#: library/tkinter.rst:6416 +msgid "" +"Compass directions (``'n'``, ``'s'``, ``'e'``, ``'w'`` and the diagonals and " +"edges) plus ``CENTER`` (``'center'``), used as values for the *anchor* and " +"*sticky* options and by methods such as :meth:`Misc.grid_anchor`." +msgstr "" + +#: library/tkinter.rst:6425 +msgid "" +"Sides for the *side* option of the packer (see :meth:`Pack.pack_configure`)." +msgstr "" + +#: library/tkinter.rst:6432 +msgid "" +"Values for the *fill* option of the packer: ``'x'``, ``'y'``, ``'both'`` or " +"``'none'``." +msgstr "" + +#: library/tkinter.rst:6442 +msgid "Values for the *relief* option, which controls a widget's 3-D border." +msgstr "" + +#: library/tkinter.rst:6447 +msgid "" +"Values for the *orient* option of widgets such as :class:`Scale`, :class:" +"`Scrollbar` and :class:`PanedWindow`." +msgstr "" + +#: library/tkinter.rst:6453 +msgid "" +"Values for the *wrap* option of the :class:`Text` widget, selecting line " +"wrapping on character or word boundaries." +msgstr "" + +#: library/tkinter.rst:6458 +msgid "The text-alignment value ``'baseline'``." +msgstr "" + +#: library/tkinter.rst:6463 +msgid "" +"Values for the *bordermode* option of the placer (see :meth:`Place." +"place_configure`)." +msgstr "" + +#: library/tkinter.rst:6474 +msgid "" +"Symbolic indices used by the :class:`Text`, :class:`Entry`, :class:`Listbox` " +"and :class:`Canvas` widgets, such as ``'insert'`` (the insertion cursor), " +"``'current'``, ``'end'``, ``'anchor'`` and the bounds of the selection " +"(``'sel.first'`` and ``'sel.last'``)." +msgstr "" + +#: library/tkinter.rst:6481 +msgid "" +"The special tag ``'all'``, which matches every item of a :class:`Canvas` or " +"every character of a :class:`Text` (for example ``canvas.delete(ALL)``)." +msgstr "" + +#: library/tkinter.rst:6489 +msgid "Values for the *state* option of various widgets and items." +msgstr "" + +#: library/tkinter.rst:6497 +msgid "" +"Menu entry types, used as the *itemType* argument of :meth:`Menu.add` and :" +"meth:`Menu.insert`." +msgstr "" + +#: library/tkinter.rst:6505 +msgid "Values for the *selectmode* option of the :class:`Listbox` widget." +msgstr "" + +#: library/tkinter.rst:6511 +msgid "Values for the *style* option of :class:`Canvas` arc items." +msgstr "" + +#: library/tkinter.rst:6519 +msgid "" +"Values for the *capstyle* (``'butt'``, ``'projecting'``, ``'round'``) and " +"*joinstyle* (``'round'``, ``'bevel'``, ``'miter'``) options of :class:" +"`Canvas` line items." +msgstr "" + +#: library/tkinter.rst:6526 +msgid "" +"Values for the *arrow* option of :class:`Canvas` line items, indicating " +"which ends have arrowheads." +msgstr "" + +#: library/tkinter.rst:6532 +msgid "" +"The first argument passed by a :class:`Scrollbar` to the :meth:`XView.xview` " +"or :meth:`YView.yview` method of the scrolled widget." +msgstr "" + +#: library/tkinter.rst:6538 +msgid "" +"Values for the *what* argument of :meth:`XView.xview_scroll` and :meth:" +"`YView.yview_scroll`." +msgstr "" + +#: library/tkinter.rst:6545 +msgid "Other option values: ``'underline'``, ``'numeric'`` and ``'dotbox'``." +msgstr "" + +#: library/tkinter.rst:589 +msgid "geometry management (widgets)" +msgstr "" + +#: library/tkinter.rst:589 +msgid "packing (widgets)" +msgstr "" + +#: library/tkinter.rst:728 +msgid "window manager (widgets)" +msgstr "" + +#: library/tkinter.rst:766 +msgid "Tk Option Data Types" +msgstr "" + +#: library/tkinter.rst:855 +msgid "bind (widgets)" +msgstr "" + +#: library/tkinter.rst:855 msgid "events (widgets)" msgstr "" diff --git a/library/tkinter.scrolledtext.po b/library/tkinter.scrolledtext.po index 5b4f54f1a..f8829f32b 100644 --- a/library/tkinter.scrolledtext.po +++ b/library/tkinter.scrolledtext.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,14 +18,14 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: library/tkinter.scrolledtext.rst:2 -msgid ":mod:`!tkinter.scrolledtext` --- Scrolled Text Widget" +msgid ":mod:`!tkinter.scrolledtext` --- Scrolled text widget" msgstr "" -#: library/tkinter.scrolledtext.rst:10 +#: library/tkinter.scrolledtext.rst:9 msgid "**Source code:** :source:`Lib/tkinter/scrolledtext.py`" msgstr "" -#: library/tkinter.scrolledtext.rst:14 +#: library/tkinter.scrolledtext.rst:13 msgid "" "The :mod:`tkinter.scrolledtext` module provides a class of the same name " "which implements a basic text widget which has a vertical scroll bar " @@ -33,25 +33,25 @@ msgid "" "is a lot easier than setting up a text widget and scroll bar directly." msgstr "" -#: library/tkinter.scrolledtext.rst:19 +#: library/tkinter.scrolledtext.rst:18 msgid "" -"The text widget and scrollbar are packed together in a :class:`Frame`, and " -"the methods of the :class:`Grid` and :class:`Pack` geometry managers are " -"acquired from the :class:`Frame` object. This allows the :class:" -"`ScrolledText` widget to be used directly to achieve most normal geometry " -"management behavior." +"The text widget and scrollbar are packed together in a :class:`~tkinter." +"Frame`, and the methods of the :class:`~tkinter.Pack`, :class:`~tkinter." +"Grid` and :class:`~tkinter.Place` geometry managers are acquired from the :" +"class:`~tkinter.Frame` object. This allows the :class:`ScrolledText` widget " +"to be used directly to achieve most normal geometry management behavior." msgstr "" -#: library/tkinter.scrolledtext.rst:24 +#: library/tkinter.scrolledtext.rst:25 msgid "" "Should more specific control be necessary, the following attributes are " "available:" msgstr "" -#: library/tkinter.scrolledtext.rst:32 +#: library/tkinter.scrolledtext.rst:33 msgid "The frame which surrounds the text and scroll bar widgets." msgstr "" -#: library/tkinter.scrolledtext.rst:37 +#: library/tkinter.scrolledtext.rst:38 msgid "The scroll bar widget." msgstr "" diff --git a/library/tkinter.ttk.po b/library/tkinter.ttk.po index cdd6ce57e..17b7cb295 100644 --- a/library/tkinter.ttk.po +++ b/library/tkinter.ttk.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-27 09:00+0200\n" +"POT-Creation-Date: 2026-07-18 13:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -27,87 +27,93 @@ msgstr "" #: library/tkinter.ttk.rst:15 msgid "" -"The :mod:`tkinter.ttk` module provides access to the Tk themed widget set, " -"introduced in Tk 8.5. It provides additional benefits including anti-aliased " -"font rendering under X11 and window transparency (requiring a composition " -"window manager on X11)." +"The :mod:`!tkinter.ttk` module provides access to the Tk themed widget set, " +"introduced in Tk 8.5. Its widgets adapt their appearance to the platform's " +"native theme, giving an application a better and more consistent look and " +"feel than the classic :mod:`tkinter` widgets, whose appearance is fixed." msgstr "" -#: library/tkinter.ttk.rst:20 +#: library/tkinter.ttk.rst:21 msgid "" "The basic idea for :mod:`tkinter.ttk` is to separate, to the extent " "possible, the code implementing a widget's behavior from the code " "implementing its appearance." msgstr "" -#: library/tkinter.ttk.rst:27 +#: library/tkinter.ttk.rst:25 msgid "" -"`Tk Widget Styling Support `_" +"Ttk widgets are used just like the classic :mod:`tkinter` widgets and share " +"the same machinery: the widget hierarchy, the geometry managers, variable " +"coupling and event binding. Those foundational concepts are covered in the :" +"mod:`tkinter` documentation and are not repeated here." msgstr "" -#: library/tkinter.ttk.rst:28 -msgid "A document introducing theming support for Tk" +#: library/tkinter.ttk.rst:36 +msgid "" +"`Tk Widget Styling Support (TIP #48) `_" +msgstr "" + +#: library/tkinter.ttk.rst:37 +msgid "" +"The Tcl Improvement Proposal that introduced the themed widget styling " +"engine." msgstr "" -#: library/tkinter.ttk.rst:32 +#: library/tkinter.ttk.rst:41 msgid "Using Ttk" msgstr "" -#: library/tkinter.ttk.rst:34 +#: library/tkinter.ttk.rst:43 msgid "To start using Ttk, import its module::" msgstr "" -#: library/tkinter.ttk.rst:36 +#: library/tkinter.ttk.rst:45 msgid "from tkinter import ttk" msgstr "" -#: library/tkinter.ttk.rst:38 +#: library/tkinter.ttk.rst:47 msgid "" "To override the basic Tk widgets, the import should follow the Tk import::" msgstr "" -#: library/tkinter.ttk.rst:40 +#: library/tkinter.ttk.rst:49 msgid "" "from tkinter import *\n" "from tkinter.ttk import *" msgstr "" -#: library/tkinter.ttk.rst:43 +#: library/tkinter.ttk.rst:52 msgid "" "That code causes several :mod:`tkinter.ttk` widgets (:class:`Button`, :class:" "`Checkbutton`, :class:`Entry`, :class:`Frame`, :class:`Label`, :class:" -"`LabelFrame`, :class:`Menubutton`, :class:`PanedWindow`, :class:" -"`Radiobutton`, :class:`Scale` and :class:`Scrollbar`) to automatically " -"replace the Tk widgets." +"`LabelFrame`, :class:`Menubutton`, :class:`OptionMenu`, :class:" +"`PanedWindow`, :class:`Radiobutton`, :class:`Scale`, :class:`Scrollbar` and :" +"class:`Spinbox`) to automatically replace the Tk widgets." msgstr "" -#: library/tkinter.ttk.rst:49 +#: library/tkinter.ttk.rst:61 +msgid "" +"Overriding the classic widgets with ``from tkinter.ttk import *`` is " +"convenient for adapting existing code, but new code is usually clearer if it " +"imports the module as ``from tkinter import ttk`` and refers to the themed " +"widgets explicitly, such as ``ttk.Button``." +msgstr "" + +#: library/tkinter.ttk.rst:67 msgid "" "This has the direct benefit of using the new widgets which gives a better " "look and feel across platforms; however, the replacement widgets are not " "completely compatible. The main difference is that widget options such as " -"\"fg\", \"bg\" and others related to widget styling are no longer present in " -"Ttk widgets. Instead, use the :class:`ttk.Style` class for improved " +"``fg``, ``bg`` and others related to widget styling are no longer present in " +"Ttk widgets. Instead, use the :class:`ttk.Style