diff --git a/.github/workflows/po-lint.yml b/.github/workflows/po-lint.yml deleted file mode 100644 index 3664a75a..00000000 --- a/.github/workflows/po-lint.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Linting Workflow - -on: - schedule: - - cron: '0 0 * * *' - push: - branches: - - '*' - workflow_dispatch: - -jobs: - lint: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - version: [ '3.14' ] - continue-on-error: true - steps: - - uses: actions/setup-python@master - with: - python-version: 3 - - run: pip install sphinx-lint - - uses: actions/checkout@master - with: - ref: ${{ matrix.version }} - - uses: rffontenelle/sphinx-lint-problem-matcher@v1.0.0 - - run: sphinx-lint diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index 5b77bb14..4350e685 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -2,7 +2,8 @@ name: Test Build Workflow on: schedule: - - cron: '0 0 * * *' + - cron: '30 18 * * *' # Runs every day at 2:30 PM UTC + push: branches: - '*' @@ -14,21 +15,21 @@ jobs: strategy: fail-fast: false matrix: - version: [ '3.14' ] + version: [ '3.14.0-rc.2' ] format: [ html, latex ] steps: - uses: actions/setup-python@master with: - python-version: 3.12 # pinned for Sphinx 3.4.3 to build 3.10 + python-version: 3.14.0-rc.2 # pinned for Sphinx 3.4.3 to build 3.10 - uses: actions/checkout@master with: repository: python/cpython - ref: ${{ matrix.version }} + ref: 3.14 - run: make venv working-directory: ./Doc - uses: actions/checkout@master with: - ref: ${{ matrix.version }} + ref: 3.14 path: Doc/locales/sv/LC_MESSAGES - run: git pull working-directory: ./Doc/locales/sv/LC_MESSAGES @@ -45,7 +46,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - version: [ '3.14' ] + version: [ '3.14.0' ] needs: [ 'build-translation' ] steps: - uses: actions/download-artifact@master diff --git a/.github/workflows/transifex-pull.yml b/.github/workflows/transifex-pull.yml deleted file mode 100644 index 58256c57..00000000 --- a/.github/workflows/transifex-pull.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: Pull Translations from Transifex - -on: - schedule: - - cron: '0 0 * * *' - workflow_dispatch: -permissions: - contents: write - -jobs: - update-translation: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - version: [ '3.14' ] - steps: - - uses: styfle/cancel-workflow-action@main - with: - access_token: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/setup-python@master - with: - python-version: 3 - - name: Install Dependencies - run: | - sudo apt-get install -y gettext - pip install requests cogapp polib transifex-python sphinx-intl blurb six - curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash - working-directory: /usr/local/bin - - uses: actions/checkout@master - with: - ref: ${{ matrix.version }} - fetch-depth: 0 - - run: curl -O https://raw.githubusercontent.com/python-docs-translations/transifex-automations/master/sample-workflows/transifex-util.py - - run: chmod +x transifex-util.py - - run: ./transifex-util.py recreate_tx_config --language sv --project-slug python-newest --version ${{ matrix.version }} - env: - TX_TOKEN: ${{ secrets.TX_TOKEN }} - - run: ./transifex-util.py fetch --language sv --project-slug python-newest --version ${{ matrix.version }} - env: - TX_TOKEN: ${{ secrets.TX_TOKEN }} - - run: ./transifex-util.py delete_obsolete_files --language sv --project-slug python-newest --version ${{ matrix.version }} - - name: Set up Git - run: | - git config --local user.email github-actions@github.com - git config --local user.name "GitHub Action's update-translation job" - - name: Filter files - run: | - ! git diff -I'^"POT-Creation-Date: ' \ - -I'^"Language-Team: ' \ - -I'^# ' -I'^"Last-Translator: ' \ - --exit-code \ - && echo "SIGNIFICANT_CHANGES=1" >> $GITHUB_ENV || exit 0 - - run: git add . - - run: git commit -m 'Update translation from Transifex' - if: env.SIGNIFICANT_CHANGES - - uses: ad-m/github-push-action@master - if: env.SIGNIFICANT_CHANGES - with: - branch: ${{ matrix.version }} - github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.tx/config b/.tx/config index b5fdb058..78292c9b 100644 --- a/.tx/config +++ b/.tx/config @@ -181,6 +181,15 @@ resource_name = c-api--coro replace_edited_strings = false keep_translations = false +[o:python-doc:p:python-newest:r:c-api--curses] +file_filter = c-api/curses.po +source_file = gettext/c-api/curses.pot +type = PO +minimum_perc = 0 +resource_name = c-api--curses +replace_edited_strings = false +keep_translations = false + [o:python-doc:p:python-newest:r:c-api--datetime] file_filter = c-api/datetime.po source_file = gettext/c-api/datetime.pot @@ -325,6 +334,15 @@ resource_name = c-api--init_config replace_edited_strings = false keep_translations = false +[o:python-doc:p:python-newest:r:c-api--interp-lifecycle] +file_filter = c-api/interp-lifecycle.po +source_file = gettext/c-api/interp-lifecycle.pot +type = PO +minimum_perc = 0 +resource_name = c-api--interp-lifecycle +replace_edited_strings = false +keep_translations = false + [o:python-doc:p:python-newest:r:c-api--intro] file_filter = c-api/intro.po source_file = gettext/c-api/intro.pot @@ -487,6 +505,24 @@ resource_name = c-api--perfmaps replace_edited_strings = false keep_translations = false +[o:python-doc:p:python-newest:r:c-api--picklebuffer] +file_filter = c-api/picklebuffer.po +source_file = gettext/c-api/picklebuffer.pot +type = PO +minimum_perc = 0 +resource_name = c-api--picklebuffer +replace_edited_strings = false +keep_translations = false + +[o:python-doc:p:python-newest:r:c-api--profiling] +file_filter = c-api/profiling.po +source_file = gettext/c-api/profiling.pot +type = PO +minimum_perc = 0 +resource_name = c-api--profiling +replace_edited_strings = false +keep_translations = false + [o:python-doc:p:python-newest:r:c-api--refcounting] file_filter = c-api/refcounting.po source_file = gettext/c-api/refcounting.pot @@ -550,6 +586,24 @@ resource_name = c-api--structures replace_edited_strings = false keep_translations = false +[o:python-doc:p:python-newest:r:c-api--subinterpreters] +file_filter = c-api/subinterpreters.po +source_file = gettext/c-api/subinterpreters.pot +type = PO +minimum_perc = 0 +resource_name = c-api--subinterpreters +replace_edited_strings = false +keep_translations = false + +[o:python-doc:p:python-newest:r:c-api--synchronization] +file_filter = c-api/synchronization.po +source_file = gettext/c-api/synchronization.pot +type = PO +minimum_perc = 0 +resource_name = c-api--synchronization +replace_edited_strings = false +keep_translations = false + [o:python-doc:p:python-newest:r:c-api--sys] file_filter = c-api/sys.po source_file = gettext/c-api/sys.pot @@ -559,6 +613,15 @@ resource_name = c-api--sys replace_edited_strings = false keep_translations = false +[o:python-doc:p:python-newest:r:c-api--threads] +file_filter = c-api/threads.po +source_file = gettext/c-api/threads.pot +type = PO +minimum_perc = 0 +resource_name = c-api--threads +replace_edited_strings = false +keep_translations = false + [o:python-doc:p:python-newest:r:c-api--time] file_filter = c-api/time.po source_file = gettext/c-api/time.pot @@ -568,6 +631,15 @@ resource_name = c-api--time replace_edited_strings = false keep_translations = false +[o:python-doc:p:python-newest:r:c-api--tls] +file_filter = c-api/tls.po +source_file = gettext/c-api/tls.pot +type = PO +minimum_perc = 0 +resource_name = c-api--tls +replace_edited_strings = false +keep_translations = false + [o:python-doc:p:python-newest:r:c-api--tuple] file_filter = c-api/tuple.po source_file = gettext/c-api/tuple.pot @@ -757,6 +829,15 @@ resource_name = deprecations--pending-removal-in-3_17 replace_edited_strings = false keep_translations = false +[o:python-doc:p:python-newest:r:deprecations--pending-removal-in-3_18] +file_filter = deprecations/pending-removal-in-3.18.po +source_file = gettext/deprecations/pending-removal-in-3.18.pot +type = PO +minimum_perc = 0 +resource_name = deprecations--pending-removal-in-3_18 +replace_edited_strings = false +keep_translations = false + [o:python-doc:p:python-newest:r:deprecations--pending-removal-in-3_19] file_filter = deprecations/pending-removal-in-3.19.po source_file = gettext/deprecations/pending-removal-in-3.19.pot @@ -937,6 +1018,15 @@ resource_name = glossary_ replace_edited_strings = false keep_translations = false +[o:python-doc:p:python-newest:r:howto--a-conceptual-overview-of-asyncio] +file_filter = howto/a-conceptual-overview-of-asyncio.po +source_file = gettext/howto/a-conceptual-overview-of-asyncio.pot +type = PO +minimum_perc = 0 +resource_name = howto--a-conceptual-overview-of-asyncio +replace_edited_strings = false +keep_translations = false + [o:python-doc:p:python-newest:r:howto--annotations] file_filter = howto/annotations.po source_file = gettext/howto/annotations.pot @@ -1189,6 +1279,24 @@ resource_name = howto--urllib2 replace_edited_strings = false keep_translations = false +[o:python-doc:p:python-newest:r:improve-page] +file_filter = improve-page.po +source_file = gettext/improve-page.pot +type = PO +minimum_perc = 0 +resource_name = improve-page +replace_edited_strings = false +keep_translations = false + +[o:python-doc:p:python-newest:r:improve-page-nojs] +file_filter = improve-page-nojs.po +source_file = gettext/improve-page-nojs.pot +type = PO +minimum_perc = 0 +resource_name = improve-page-nojs +replace_edited_strings = false +keep_translations = false + [o:python-doc:p:python-newest:r:installing--index] file_filter = installing/index.po source_file = gettext/installing/index.pot @@ -1468,6 +1576,15 @@ resource_name = library--asyncio-task replace_edited_strings = false keep_translations = false +[o:python-doc:p:python-newest:r:library--asyncio-threading] +file_filter = library/asyncio-threading.po +source_file = gettext/library/asyncio-threading.pot +type = PO +minimum_perc = 0 +resource_name = library--asyncio-threading +replace_edited_strings = false +keep_translations = false + [o:python-doc:p:python-newest:r:library--asyncore] file_filter = library/asyncore.po source_file = gettext/library/asyncore.pot @@ -3592,6 +3709,15 @@ resource_name = library--threading replace_edited_strings = false keep_translations = false +[o:python-doc:p:python-newest:r:library--threadsafety] +file_filter = library/threadsafety.po +source_file = gettext/library/threadsafety.pot +type = PO +minimum_perc = 0 +resource_name = library--threadsafety +replace_edited_strings = false +keep_translations = false + [o:python-doc:p:python-newest:r:library--time] file_filter = library/time.po source_file = gettext/library/time.pot @@ -4698,3 +4824,4 @@ minimum_perc = 0 resource_name = whatsnew--index replace_edited_strings = false keep_translations = false + diff --git a/about.po b/about.po new file mode 100644 index 00000000..62824a37 --- /dev/null +++ b/about.po @@ -0,0 +1,76 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "About this documentation" +msgstr "Om denna dokumentationen" + +msgid "" +"Python's documentation is generated from `reStructuredText`_ sources using " +"`Sphinx`_, a documentation generator originally created for Python and now " +"maintained as an independent project." +msgstr "" + +msgid "" +"Development of the documentation and its toolchain is an entirely volunteer " +"effort, just like Python itself. If you want to contribute, please take a " +"look at the :ref:`reporting-bugs` page for information on how to do so. New " +"volunteers are always welcome!" +msgstr "" + +msgid "Many thanks go to:" +msgstr "Stort tack till..:" + +msgid "" +"Fred L. Drake, Jr., the creator of the original Python documentation toolset " +"and author of much of the content;" +msgstr "" +"Fred L. Drake, Jr, skaparen av det ursprungliga Python-" +"dokumentationsverktyget och författare till mycket av innehållet;" + +msgid "" +"the `Docutils `_ project for creating " +"reStructuredText and the Docutils suite;" +msgstr "" + +msgid "" +"Fredrik Lundh for his Alternative Python Reference project from which Sphinx " +"got many good ideas." +msgstr "" +"Fredrik Lundh för hans Alternative Python Reference-projekt från vilket " +"Sphinx fick många bra idéer." + +msgid "Contributors to the Python documentation" +msgstr "Bidragsgivare till Python-dokumentationen" + +msgid "" +"Many people have contributed to the Python language, the Python standard " +"library, and the Python documentation. See the `CPython GitHub repository " +"`__ for a partial " +"list of contributors." +msgstr "" + +msgid "" +"It is only with the input and contributions of the Python community that " +"Python has such wonderful documentation -- Thank You!" +msgstr "" diff --git a/bugs.po b/bugs.po new file mode 100644 index 00000000..1e029510 --- /dev/null +++ b/bugs.po @@ -0,0 +1,185 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# Daniel Nylander , 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-03 18:19+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: Daniel Nylander , 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Dealing with Bugs" +msgstr "" + +msgid "" +"Python is a mature programming language which has established a reputation " +"for stability. In order to maintain this reputation, the developers would " +"like to know of any deficiencies you find in Python." +msgstr "" + +msgid "" +"It can be sometimes faster to fix bugs yourself and contribute patches to " +"Python as it streamlines the process and involves fewer people. Learn how " +"to :ref:`contribute `." +msgstr "" + +msgid "Documentation bugs" +msgstr "Dokumentationsbuggar" + +msgid "" +"If you find a bug in this documentation or would like to propose an " +"improvement, please submit a bug report on the :ref:`issue tracker `. If you have a suggestion on how to fix it, include that as " +"well." +msgstr "" + +msgid "" +"If the bug or suggested improvement concerns the translation of this " +"documentation, submit the report to the `translation’s repository " +"`_ instead." +msgstr "" + +msgid "" +"You can also open a discussion item on our `Documentation Discourse forum " +"`_." +msgstr "" + +msgid "" +"If you find a bug in the theme (HTML / CSS / JavaScript) of the " +"documentation, please submit a bug report on the `python-doc-theme issue " +"tracker `_." +msgstr "" + +msgid "`Documentation bugs`_" +msgstr "`Documentation bugs`_" + +msgid "" +"A list of documentation bugs that have been submitted to the Python issue " +"tracker." +msgstr "" + +msgid "`Issue Tracking `_" +msgstr "`Problemhanteraren `_" + +msgid "" +"Overview of the process involved in reporting an improvement on the tracker." +msgstr "" + +msgid "" +"`Helping with Documentation `_" +msgstr "" + +msgid "" +"Comprehensive guide for individuals that are interested in contributing to " +"Python documentation." +msgstr "" + +msgid "" +"`Documentation Translations `_" +msgstr "" + +msgid "" +"A list of GitHub pages for documentation translation and their coordination " +"teams." +msgstr "" + +msgid "Using the Python issue tracker" +msgstr "" + +msgid "" +"Issue reports for Python itself should be submitted via the GitHub issues " +"tracker (https://github.com/python/cpython/issues). The GitHub issues " +"tracker offers a web form which allows pertinent information to be entered " +"and submitted to the developers." +msgstr "" + +msgid "" +"The first step in filing a report is to determine whether the problem has " +"already been reported. The advantage in doing so, aside from saving the " +"developers' time, is that you learn what has been done to fix it; it may be " +"that the problem has already been fixed for the next release, or additional " +"information is needed (in which case you are welcome to provide it if you " +"can!). To do this, search the tracker using the search box at the top of the " +"page." +msgstr "" + +msgid "" +"If the problem you're reporting is not already in the list, log in to " +"GitHub. If you don't already have a GitHub account, create a new account " +"using the \"Sign up\" link. It is not possible to submit a bug report " +"anonymously." +msgstr "" + +msgid "" +"Being now logged in, you can submit an issue. Click on the \"New issue\" " +"button in the top bar to report a new issue." +msgstr "" + +msgid "The submission form has two fields, \"Title\" and \"Comment\"." +msgstr "" + +msgid "" +"For the \"Title\" field, enter a *very* short description of the problem; " +"fewer than ten words is good." +msgstr "" + +msgid "" +"In the \"Comment\" field, describe the problem in detail, including what you " +"expected to happen and what did happen. Be sure to include whether any " +"extension modules were involved, and what hardware and software platform you " +"were using (including version information as appropriate)." +msgstr "" + +msgid "" +"Each issue report will be reviewed by a developer who will determine what " +"needs to be done to correct the problem. You will receive an update each " +"time an action is taken on the issue." +msgstr "" + +msgid "" +"`How to Report Bugs Effectively `_" +msgstr "" + +msgid "" +"Article which goes into some detail about how to create a useful bug report. " +"This describes what kind of information is useful and why it is useful." +msgstr "" + +msgid "" +"`Bug Writing Guidelines `_" +msgstr "" + +msgid "" +"Information about writing a good bug report. Some of this is specific to " +"the Mozilla project, but describes general good practices." +msgstr "" + +msgid "Getting started contributing to Python yourself" +msgstr "" + +msgid "" +"Beyond just reporting bugs that you find, you are also welcome to submit " +"patches to fix them. You can find more information on how to get started " +"patching Python in the `Python Developer's Guide`_. If you have questions, " +"the `core-mentorship mailing list`_ is a friendly place to get answers to " +"any and all questions pertaining to the process of fixing issues in Python." +msgstr "" diff --git a/c-api/abstract.po b/c-api/abstract.po new file mode 100644 index 00000000..4be30bc4 --- /dev/null +++ b/c-api/abstract.po @@ -0,0 +1,45 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# Daniel Nylander , 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: Daniel Nylander , 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Abstract Objects Layer" +msgstr "Lager för abstrakta objekt" + +msgid "" +"The functions in this chapter interact with Python objects regardless of " +"their type, or with wide classes of object types (e.g. all numerical types, " +"or all sequence types). When used on object types for which they do not " +"apply, they will raise a Python exception." +msgstr "" +"Funktionerna i detta kapitel interagerar med Python-objekt oavsett typ, " +"eller med breda klasser av objekttyper (t.ex. alla numeriska typer eller " +"alla sekvenstyper). När de används på objekttyper som de inte är " +"tillämpliga för, kommer de att ge generera ett Python-undantag." + +msgid "" +"It is not possible to use these functions on objects that are not properly " +"initialized, such as a list object that has been created by :c:func:" +"`PyList_New`, but whose items have not been set to some non-\\ ``NULL`` " +"value yet." +msgstr "" diff --git a/c-api/allocation.po b/c-api/allocation.po new file mode 100644 index 00000000..37faec3e --- /dev/null +++ b/c-api/allocation.po @@ -0,0 +1,200 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# Daniel Nylander , 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: Daniel Nylander , 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Allocating objects on the heap" +msgstr "" + +msgid "" +"Initialize a newly allocated object *op* with its type and initial " +"reference. Returns the initialized object. Other fields of the object are " +"not initialized. Despite its name, this function is unrelated to the " +"object's :meth:`~object.__init__` method (:c:member:`~PyTypeObject.tp_init` " +"slot). Specifically, this function does **not** call the object's :meth:`!" +"__init__` method." +msgstr "" + +msgid "" +"In general, consider this function to be a low-level routine. Use :c:member:" +"`~PyTypeObject.tp_alloc` where possible. For implementing :c:member:`!" +"tp_alloc` for your type, prefer :c:func:`PyType_GenericAlloc` or :c:func:" +"`PyObject_New`." +msgstr "" + +msgid "" +"This function only initializes the object's memory corresponding to the " +"initial :c:type:`PyObject` structure. It does not zero the rest." +msgstr "" + +msgid "" +"This does everything :c:func:`PyObject_Init` does, and also initializes the " +"length information for a variable-size object." +msgstr "" + +msgid "" +"This function only initializes some of the object's memory. It does not " +"zero the rest." +msgstr "" + +msgid "" +"Allocates a new Python object using the C structure type *TYPE* and the " +"Python type object *typeobj* (``PyTypeObject*``) by calling :c:func:" +"`PyObject_Malloc` to allocate memory and initializing it like :c:func:" +"`PyObject_Init`. The caller will own the only reference to the object (i.e. " +"its reference count will be one)." +msgstr "" + +msgid "" +"Avoid calling this directly to allocate memory for an object; call the " +"type's :c:member:`~PyTypeObject.tp_alloc` slot instead." +msgstr "" + +msgid "" +"When populating a type's :c:member:`~PyTypeObject.tp_alloc` slot, :c:func:" +"`PyType_GenericAlloc` is preferred over a custom function that simply calls " +"this macro." +msgstr "" + +msgid "" +"This macro does not call :c:member:`~PyTypeObject.tp_alloc`, :c:member:" +"`~PyTypeObject.tp_new` (:meth:`~object.__new__`), or :c:member:" +"`~PyTypeObject.tp_init` (:meth:`~object.__init__`)." +msgstr "" + +msgid "" +"This cannot be used for objects with :c:macro:`Py_TPFLAGS_HAVE_GC` set in :c:" +"member:`~PyTypeObject.tp_flags`; use :c:macro:`PyObject_GC_New` instead." +msgstr "" + +msgid "" +"Memory allocated by this macro must be freed with :c:func:`PyObject_Free` " +"(usually called via the object's :c:member:`~PyTypeObject.tp_free` slot)." +msgstr "" + +msgid "" +"The returned memory is not guaranteed to have been completely zeroed before " +"it was initialized." +msgstr "" + +msgid "" +"This macro does not construct a fully initialized object of the given type; " +"it merely allocates memory and prepares it for further initialization by :c:" +"member:`~PyTypeObject.tp_init`. To construct a fully initialized object, " +"call *typeobj* instead. For example::" +msgstr "" + +msgid "PyObject *foo = PyObject_CallNoArgs((PyObject *)&PyFoo_Type);" +msgstr "" + +msgid ":c:func:`PyObject_Free`" +msgstr ":c:func:`PyObject_Free`" + +msgid ":c:macro:`PyObject_GC_New`" +msgstr ":c:macro:`PyObject_GC_New`" + +msgid ":c:func:`PyType_GenericAlloc`" +msgstr ":c:func:`PyType_GenericAlloc`" + +msgid ":c:member:`~PyTypeObject.tp_alloc`" +msgstr ":c:member:`~PyTypeObject.tp_alloc`" + +msgid "Like :c:macro:`PyObject_New` except:" +msgstr "" + +msgid "" +"It allocates enough memory for the *TYPE* structure plus *size* " +"(``Py_ssize_t``) fields of the size given by the :c:member:`~PyTypeObject." +"tp_itemsize` field of *typeobj*." +msgstr "" + +msgid "The memory is initialized like :c:func:`PyObject_InitVar`." +msgstr "" + +msgid "" +"This is useful for implementing objects like tuples, which are able to " +"determine their size at construction time. Embedding the array of fields " +"into the same allocation decreases the number of allocations, improving the " +"memory management efficiency." +msgstr "" + +msgid "" +"This cannot be used for objects with :c:macro:`Py_TPFLAGS_HAVE_GC` set in :c:" +"member:`~PyTypeObject.tp_flags`; use :c:macro:`PyObject_GC_NewVar` instead." +msgstr "" + +msgid "" +"Memory allocated by this function must be freed with :c:func:`PyObject_Free` " +"(usually called via the object's :c:member:`~PyTypeObject.tp_free` slot)." +msgstr "" + +msgid "" +"PyObject *list_instance = PyObject_CallNoArgs((PyObject *)&PyList_Type);" +msgstr "" + +msgid ":c:macro:`PyObject_GC_NewVar`" +msgstr ":c:macro:`PyObject_GC_NewVar`" + +msgid "" +"Object which is visible in Python as ``None``. This should only be accessed " +"using the :c:macro:`Py_None` macro, which evaluates to a pointer to this " +"object." +msgstr "" + +msgid ":ref:`moduleobjects`" +msgstr ":ref:`moduleobjects`" + +msgid "To allocate and create extension modules." +msgstr "" + +msgid "Soft-deprecated aliases" +msgstr "" + +msgid "" +"These are aliases to existing functions and macros. They exist solely for " +"backwards compatibility." +msgstr "" + +msgid "Soft-deprecated alias" +msgstr "" + +msgid "Function" +msgstr "" + +msgid ":c:macro:`PyObject_New`" +msgstr "" + +msgid ":c:macro:`PyObject_NewVar`" +msgstr "" + +msgid ":c:func:`PyObject_Init`" +msgstr ":c:func:`PyObject_Init`" + +msgid ":c:func:`PyObject_InitVar`" +msgstr ":c:func:`PyObject_InitVar`" + +msgid ":c:func:`PyObject_Malloc`" +msgstr "" + +msgid ":c:func:`PyObject_Realloc`" +msgstr "" diff --git a/c-api/apiabiversion.po b/c-api/apiabiversion.po new file mode 100644 index 00000000..a594ce50 --- /dev/null +++ b/c-api/apiabiversion.po @@ -0,0 +1,244 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# Daniel Nylander , 2026 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: Daniel Nylander , 2026\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "API and ABI Versioning" +msgstr "" + +msgid "Build-time version constants" +msgstr "" + +msgid "" +"CPython exposes its version number in the following macros. Note that these " +"correspond to the version code is **built** with. See :c:var:`Py_Version` " +"for the version used at **run time**." +msgstr "" + +msgid "" +"See :ref:`stable` for a discussion of API and ABI stability across versions." +msgstr "" + +msgid "The ``3`` in ``3.4.1a2``." +msgstr "``3`` i ``3.4.1a2``." + +msgid "The ``4`` in ``3.4.1a2``." +msgstr "``4`` i ``3.4.1a2``." + +msgid "The ``1`` in ``3.4.1a2``." +msgstr "" + +msgid "" +"The ``a`` in ``3.4.1a2``. This can be ``0xA`` for alpha, ``0xB`` for beta, " +"``0xC`` for release candidate or ``0xF`` for final." +msgstr "" + +msgid "" +"For completeness, the values are available as macros: :c:macro:`!" +"PY_RELEASE_LEVEL_ALPHA` (``0xA``), :c:macro:`!PY_RELEASE_LEVEL_BETA` " +"(``0xB``), :c:macro:`!PY_RELEASE_LEVEL_GAMMA` (``0xC``), and :c:macro:`!" +"PY_RELEASE_LEVEL_FINAL` (``0xF``)." +msgstr "" + +msgid "The ``2`` in ``3.4.1a2``. Zero for final releases." +msgstr "" + +msgid "" +"The Python version number encoded in a single integer. See :c:func:" +"`Py_PACK_FULL_VERSION` for the encoding details." +msgstr "" + +msgid "" +"Use this for numeric comparisons, for example, ``#if PY_VERSION_HEX >= ...``." +msgstr "" + +msgid "The Python version as a string, for example, ``\"3.4.1a2\"``." +msgstr "" + +msgid "These macros are defined in :source:`Include/patchlevel.h`." +msgstr "Dessa makron definieras i :source:`Include/patchlevel.h`." + +msgid "Run-time version" +msgstr "Körtidsversion" + +msgid "" +"The Python runtime version number encoded in a single constant integer. See :" +"c:func:`Py_PACK_FULL_VERSION` for the encoding details. This contains the " +"Python version used at run time." +msgstr "" + +msgid "" +"Use this for numeric comparisons, for example, ``if (Py_Version >= ...)``." +msgstr "" + +msgid "Bit-packing macros" +msgstr "" + +msgid "" +"Return the given version, encoded as a single 32-bit integer with the " +"following structure:" +msgstr "" + +msgid "Argument" +msgstr "Argument" + +msgid "No. of bits" +msgstr "Antal bitar" + +msgid "Bit mask" +msgstr "Bitmask" + +msgid "Bit shift" +msgstr "" + +msgid "Example values" +msgstr "" + +msgid "``3.4.1a2``" +msgstr "``3.4.1a2``" + +msgid "``3.10.0``" +msgstr "``3.10.0``" + +msgid "*major*" +msgstr "*major*" + +msgid "8" +msgstr "8" + +msgid "``0xFF000000``" +msgstr "``0xFF000000``" + +msgid "24" +msgstr "24" + +msgid "``0x03``" +msgstr "``0x03``" + +msgid "*minor*" +msgstr "" + +msgid "``0x00FF0000``" +msgstr "" + +msgid "16" +msgstr "16" + +msgid "``0x04``" +msgstr "``0x04``" + +msgid "``0x0A``" +msgstr "``0x0A``" + +msgid "*micro*" +msgstr "" + +msgid "``0x0000FF00``" +msgstr "``0x0000FF00``" + +msgid "``0x01``" +msgstr "``0x01``" + +msgid "``0x00``" +msgstr "``0x00``" + +msgid "*release_level*" +msgstr "*release_level*" + +msgid "4" +msgstr "4" + +msgid "``0x000000F0``" +msgstr "``0x000000F0``" + +msgid "``0xA``" +msgstr "``0xA``" + +msgid "``0xF``" +msgstr "``0xF``" + +msgid "*release_serial*" +msgstr "*release_serial*" + +msgid "``0x0000000F``" +msgstr "``0x0000000F``" + +msgid "0" +msgstr "0" + +msgid "``0x2``" +msgstr "``0x2``" + +msgid "``0x0``" +msgstr "``0x0``" + +msgid "For example:" +msgstr "Till exempel:" + +msgid "Version" +msgstr "Version" + +msgid "``Py_PACK_FULL_VERSION`` arguments" +msgstr "" + +msgid "Encoded version" +msgstr "" + +msgid "``(3, 4, 1, 0xA, 2)``" +msgstr "``(3, 4, 1, 0xA, 2)``" + +msgid "``0x030401a2``" +msgstr "``0x030401a2``" + +msgid "``(3, 10, 0, 0xF, 0)``" +msgstr "``(3, 10, 0, 0xF, 0)```" + +msgid "``0x030a00f0``" +msgstr "``0x030a00f0``" + +msgid "" +"Out-of range bits in the arguments are ignored. That is, the macro can be " +"defined as:" +msgstr "" + +msgid "" +"#ifndef Py_PACK_FULL_VERSION\n" +"#define Py_PACK_FULL_VERSION(X, Y, Z, LEVEL, SERIAL) ( \\\n" +" (((X) & 0xff) << 24) | \\\n" +" (((Y) & 0xff) << 16) | \\\n" +" (((Z) & 0xff) << 8) | \\\n" +" (((LEVEL) & 0xf) << 4) | \\\n" +" (((SERIAL) & 0xf) << 0))\n" +"#endif" +msgstr "" + +msgid "" +"``Py_PACK_FULL_VERSION`` is primarily a macro, intended for use in ``#if`` " +"directives, but it is also available as an exported function." +msgstr "" + +msgid "" +"Equivalent to ``Py_PACK_FULL_VERSION(major, minor, 0, 0, 0)``. The result " +"does not correspond to any Python release, but is useful in numeric " +"comparisons." +msgstr "" diff --git a/c-api/arg.po b/c-api/arg.po new file mode 100644 index 00000000..b8cbe5e3 --- /dev/null +++ b/c-api/arg.po @@ -0,0 +1,1052 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Parsing arguments and building values" +msgstr "" + +msgid "" +"These functions are useful when creating your own extension functions and " +"methods. Additional information and examples are available in :ref:" +"`extending-index`." +msgstr "" + +msgid "" +"The first three of these functions described, :c:func:`PyArg_ParseTuple`, :c:" +"func:`PyArg_ParseTupleAndKeywords`, and :c:func:`PyArg_Parse`, all use " +"*format strings* which are used to tell the function about the expected " +"arguments. The format strings use the same syntax for each of these " +"functions." +msgstr "" + +msgid "Parsing arguments" +msgstr "Tolkning av argument" + +msgid "" +"A format string consists of zero or more \"format units.\" A format unit " +"describes one Python object; it is usually a single character or a " +"parenthesized sequence of format units. With a few exceptions, a format " +"unit that is not a parenthesized sequence normally corresponds to a single " +"address argument to these functions. In the following description, the " +"quoted form is the format unit; the entry in (round) parentheses is the " +"Python object type that matches the format unit; and the entry in [square] " +"brackets is the type of the C variable(s) whose address should be passed." +msgstr "" + +msgid "Strings and buffers" +msgstr "Strängar och buffertar" + +msgid "" +"On Python 3.12 and older, the macro :c:macro:`!PY_SSIZE_T_CLEAN` must be " +"defined before including :file:`Python.h` to use all ``#`` variants of " +"formats (``s#``, ``y#``, etc.) explained below. This is not necessary on " +"Python 3.13 and later." +msgstr "" + +msgid "" +"These formats allow accessing an object as a contiguous chunk of memory. You " +"don't have to provide raw storage for the returned unicode or bytes area." +msgstr "" + +msgid "Unless otherwise stated, buffers are not NUL-terminated." +msgstr "" + +msgid "There are three ways strings and buffers can be converted to C:" +msgstr "" + +msgid "" +"Formats such as ``y*`` and ``s*`` fill a :c:type:`Py_buffer` structure. This " +"locks the underlying buffer so that the caller can subsequently use the " +"buffer even inside a :c:type:`Py_BEGIN_ALLOW_THREADS` block without the risk " +"of mutable data being resized or destroyed. As a result, **you have to " +"call** :c:func:`PyBuffer_Release` after you have finished processing the " +"data (or in any early abort case)." +msgstr "" + +msgid "" +"The ``es``, ``es#``, ``et`` and ``et#`` formats allocate the result buffer. " +"**You have to call** :c:func:`PyMem_Free` after you have finished processing " +"the data (or in any early abort case)." +msgstr "" + +msgid "" +"Other formats take a :class:`str` or a read-only :term:`bytes-like object`, " +"such as :class:`bytes`, and provide a ``const char *`` pointer to its " +"buffer. In this case the buffer is \"borrowed\": it is managed by the " +"corresponding Python object, and shares the lifetime of this object. You " +"won't have to release any memory yourself." +msgstr "" + +msgid "" +"To ensure that the underlying buffer may be safely borrowed, the object's :c:" +"member:`PyBufferProcs.bf_releasebuffer` field must be ``NULL``. This " +"disallows common mutable objects such as :class:`bytearray`, but also some " +"read-only objects such as :class:`memoryview` of :class:`bytes`." +msgstr "" + +msgid "" +"Besides this ``bf_releasebuffer`` requirement, there is no check to verify " +"whether the input object is immutable (e.g. whether it would honor a request " +"for a writable buffer, or whether another thread can mutate the data)." +msgstr "" + +msgid "``s`` (:class:`str`) [const char \\*]" +msgstr "" + +msgid "" +"Convert a Unicode object to a C pointer to a character string. A pointer to " +"an existing string is stored in the character pointer variable whose address " +"you pass. The C string is NUL-terminated. The Python string must not " +"contain embedded null code points; if it does, a :exc:`ValueError` exception " +"is raised. Unicode objects are converted to C strings using ``'utf-8'`` " +"encoding. If this conversion fails, a :exc:`UnicodeError` is raised." +msgstr "" + +msgid "" +"This format does not accept :term:`bytes-like objects `. " +"If you want to accept filesystem paths and convert them to C character " +"strings, it is preferable to use the ``O&`` format with :c:func:" +"`PyUnicode_FSConverter` as *converter*." +msgstr "" + +msgid "" +"Previously, :exc:`TypeError` was raised when embedded null code points were " +"encountered in the Python string." +msgstr "" + +msgid "``s*`` (:class:`str` or :term:`bytes-like object`) [Py_buffer]" +msgstr "" + +msgid "" +"This format accepts Unicode objects as well as bytes-like objects. It fills " +"a :c:type:`Py_buffer` structure provided by the caller. In this case the " +"resulting C string may contain embedded NUL bytes. Unicode objects are " +"converted to C strings using ``'utf-8'`` encoding." +msgstr "" + +msgid "" +"``s#`` (:class:`str`, read-only :term:`bytes-like object`) [const char \\*, :" +"c:type:`Py_ssize_t`]" +msgstr "" + +msgid "" +"Like ``s*``, except that it provides a :ref:`borrowed buffer `. The result is stored into two C variables, the first one a pointer " +"to a C string, the second one its length. The string may contain embedded " +"null bytes. Unicode objects are converted to C strings using ``'utf-8'`` " +"encoding." +msgstr "" + +msgid "``z`` (:class:`str` or ``None``) [const char \\*]" +msgstr "" + +msgid "" +"Like ``s``, but the Python object may also be ``None``, in which case the C " +"pointer is set to ``NULL``." +msgstr "" + +msgid "" +"``z*`` (:class:`str`, :term:`bytes-like object` or ``None``) [Py_buffer]" +msgstr "" + +msgid "" +"Like ``s*``, but the Python object may also be ``None``, in which case the " +"``buf`` member of the :c:type:`Py_buffer` structure is set to ``NULL``." +msgstr "" + +msgid "" +"``z#`` (:class:`str`, read-only :term:`bytes-like object` or ``None``) " +"[const char \\*, :c:type:`Py_ssize_t`]" +msgstr "" + +msgid "" +"Like ``s#``, but the Python object may also be ``None``, in which case the C " +"pointer is set to ``NULL``." +msgstr "" + +msgid "``y`` (read-only :term:`bytes-like object`) [const char \\*]" +msgstr "" + +msgid "" +"This format converts a bytes-like object to a C pointer to a :ref:`borrowed " +"` character string; it does not accept Unicode " +"objects. The bytes buffer must not contain embedded null bytes; if it does, " +"a :exc:`ValueError` exception is raised." +msgstr "" + +msgid "" +"Previously, :exc:`TypeError` was raised when embedded null bytes were " +"encountered in the bytes buffer." +msgstr "" + +msgid "``y*`` (:term:`bytes-like object`) [Py_buffer]" +msgstr "" + +msgid "" +"This variant on ``s*`` doesn't accept Unicode objects, only bytes-like " +"objects. **This is the recommended way to accept binary data.**" +msgstr "" + +msgid "" +"``y#`` (read-only :term:`bytes-like object`) [const char \\*, :c:type:" +"`Py_ssize_t`]" +msgstr "" + +msgid "" +"This variant on ``s#`` doesn't accept Unicode objects, only bytes-like " +"objects." +msgstr "" + +msgid "``S`` (:class:`bytes`) [PyBytesObject \\*]" +msgstr "" + +msgid "" +"Requires that the Python object is a :class:`bytes` object, without " +"attempting any conversion. Raises :exc:`TypeError` if the object is not a " +"bytes object. The C variable may also be declared as :c:expr:`PyObject*`." +msgstr "" + +msgid "``Y`` (:class:`bytearray`) [PyByteArrayObject \\*]" +msgstr "" + +msgid "" +"Requires that the Python object is a :class:`bytearray` object, without " +"attempting any conversion. Raises :exc:`TypeError` if the object is not a :" +"class:`bytearray` object. The C variable may also be declared as :c:expr:" +"`PyObject*`." +msgstr "" + +msgid "``U`` (:class:`str`) [PyObject \\*]" +msgstr "" + +msgid "" +"Requires that the Python object is a Unicode object, without attempting any " +"conversion. Raises :exc:`TypeError` if the object is not a Unicode object. " +"The C variable may also be declared as :c:expr:`PyObject*`." +msgstr "" + +msgid "``w*`` (read-write :term:`bytes-like object`) [Py_buffer]" +msgstr "" + +msgid "" +"This format accepts any object which implements the read-write buffer " +"interface. It fills a :c:type:`Py_buffer` structure provided by the caller. " +"The buffer may contain embedded null bytes. The caller has to call :c:func:" +"`PyBuffer_Release` when it is done with the buffer." +msgstr "" + +msgid "``es`` (:class:`str`) [const char \\*encoding, char \\*\\*buffer]" +msgstr "" + +msgid "" +"This variant on ``s`` is used for encoding Unicode into a character buffer. " +"It only works for encoded data without embedded NUL bytes." +msgstr "" + +msgid "" +"This format requires two arguments. The first is only used as input, and " +"must be a :c:expr:`const char*` which points to the name of an encoding as a " +"NUL-terminated string, or ``NULL``, in which case ``'utf-8'`` encoding is " +"used. An exception is raised if the named encoding is not known to Python. " +"The second argument must be a :c:expr:`char**`; the value of the pointer it " +"references will be set to a buffer with the contents of the argument text. " +"The text will be encoded in the encoding specified by the first argument." +msgstr "" + +msgid "" +":c:func:`PyArg_ParseTuple` will allocate a buffer of the needed size, copy " +"the encoded data into this buffer and adjust *\\*buffer* to reference the " +"newly allocated storage. The caller is responsible for calling :c:func:" +"`PyMem_Free` to free the allocated buffer after use." +msgstr "" + +msgid "" +"``et`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [const char " +"\\*encoding, char \\*\\*buffer]" +msgstr "" + +msgid "" +"Same as ``es`` except that byte string objects are passed through without " +"recoding them. Instead, the implementation assumes that the byte string " +"object uses the encoding passed in as parameter." +msgstr "" + +msgid "" +"``es#`` (:class:`str`) [const char \\*encoding, char \\*\\*buffer, :c:type:" +"`Py_ssize_t` \\*buffer_length]" +msgstr "" + +msgid "" +"This variant on ``s#`` is used for encoding Unicode into a character buffer. " +"Unlike the ``es`` format, this variant allows input data which contains NUL " +"characters." +msgstr "" + +msgid "" +"It requires three arguments. The first is only used as input, and must be " +"a :c:expr:`const char*` which points to the name of an encoding as a NUL-" +"terminated string, or ``NULL``, in which case ``'utf-8'`` encoding is used. " +"An exception is raised if the named encoding is not known to Python. The " +"second argument must be a :c:expr:`char**`; the value of the pointer it " +"references will be set to a buffer with the contents of the argument text. " +"The text will be encoded in the encoding specified by the first argument. " +"The third argument must be a pointer to an integer; the referenced integer " +"will be set to the number of bytes in the output buffer." +msgstr "" + +msgid "There are two modes of operation:" +msgstr "" + +msgid "" +"If *\\*buffer* points a ``NULL`` pointer, the function will allocate a " +"buffer of the needed size, copy the encoded data into this buffer and set " +"*\\*buffer* to reference the newly allocated storage. The caller is " +"responsible for calling :c:func:`PyMem_Free` to free the allocated buffer " +"after usage." +msgstr "" + +msgid "" +"If *\\*buffer* points to a non-``NULL`` pointer (an already allocated " +"buffer), :c:func:`PyArg_ParseTuple` will use this location as the buffer and " +"interpret the initial value of *\\*buffer_length* as the buffer size. It " +"will then copy the encoded data into the buffer and NUL-terminate it. If " +"the buffer is not large enough, a :exc:`ValueError` will be set." +msgstr "" + +msgid "" +"In both cases, *\\*buffer_length* is set to the length of the encoded data " +"without the trailing NUL byte." +msgstr "" + +msgid "" +"``et#`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [const char " +"\\*encoding, char \\*\\*buffer, :c:type:`Py_ssize_t` \\*buffer_length]" +msgstr "" + +msgid "" +"Same as ``es#`` except that byte string objects are passed through without " +"recoding them. Instead, the implementation assumes that the byte string " +"object uses the encoding passed in as parameter." +msgstr "" + +msgid "" +"``u``, ``u#``, ``Z``, and ``Z#`` are removed because they used a legacy " +"``Py_UNICODE*`` representation." +msgstr "" + +msgid "Numbers" +msgstr "" + +msgid "" +"These formats allow representing Python numbers or single characters as C " +"numbers. Formats that require :class:`int`, :class:`float` or :class:" +"`complex` can also use the corresponding special methods :meth:`~object." +"__index__`, :meth:`~object.__float__` or :meth:`~object.__complex__` to " +"convert the Python object to the required type." +msgstr "" + +msgid "" +"For signed integer formats, :exc:`OverflowError` is raised if the value is " +"out of range for the C type. For unsigned integer formats, the most " +"significant bits are silently truncated when the receiving field is too " +"small to receive the value, and :exc:`DeprecationWarning` is emitted when " +"the value is larger than the maximal value for the C type or less than the " +"minimal value for the corresponding signed integer type of the same size." +msgstr "" + +msgid "``b`` (:class:`int`) [unsigned char]" +msgstr "" + +msgid "" +"Convert a nonnegative Python integer to an unsigned tiny integer, stored in " +"a C :c:expr:`unsigned char`." +msgstr "" + +msgid "``B`` (:class:`int`) [unsigned char]" +msgstr "" + +msgid "" +"Convert a Python integer to a tiny integer without overflow checking, stored " +"in a C :c:expr:`unsigned char`. Convert a Python integer to a C :c:expr:" +"`unsigned char`." +msgstr "" + +msgid "``h`` (:class:`int`) [short int]" +msgstr "" + +msgid "Convert a Python integer to a C :c:expr:`short int`." +msgstr "" + +msgid "``H`` (:class:`int`) [unsigned short int]" +msgstr "" + +msgid "Convert a Python integer to a C :c:expr:`unsigned short int`." +msgstr "" + +msgid "``i`` (:class:`int`) [int]" +msgstr "" + +msgid "Convert a Python integer to a plain C :c:expr:`int`." +msgstr "" + +msgid "``I`` (:class:`int`) [unsigned int]" +msgstr "" + +msgid "Convert a Python integer to a C :c:expr:`unsigned int`." +msgstr "" + +msgid "``l`` (:class:`int`) [long int]" +msgstr "" + +msgid "Convert a Python integer to a C :c:expr:`long int`." +msgstr "" + +msgid "``k`` (:class:`int`) [unsigned long]" +msgstr "" + +msgid "Convert a Python integer to a C :c:expr:`unsigned long`." +msgstr "" + +msgid "Use :meth:`~object.__index__` if available." +msgstr "" + +msgid "``L`` (:class:`int`) [long long]" +msgstr "" + +msgid "Convert a Python integer to a C :c:expr:`long long`." +msgstr "" + +msgid "``K`` (:class:`int`) [unsigned long long]" +msgstr "" + +msgid "Convert a Python integer to a C :c:expr:`unsigned long long`." +msgstr "" + +msgid "``n`` (:class:`int`) [:c:type:`Py_ssize_t`]" +msgstr "" + +msgid "Convert a Python integer to a C :c:type:`Py_ssize_t`." +msgstr "" + +msgid "``c`` (:class:`bytes` or :class:`bytearray` of length 1) [char]" +msgstr "" + +msgid "" +"Convert a Python byte, represented as a :class:`bytes` or :class:`bytearray` " +"object of length 1, to a C :c:expr:`char`." +msgstr "" + +msgid "Allow :class:`bytearray` objects." +msgstr "" + +msgid "``C`` (:class:`str` of length 1) [int]" +msgstr "" + +msgid "" +"Convert a Python character, represented as a :class:`str` object of length " +"1, to a C :c:expr:`int`." +msgstr "" + +msgid "``f`` (:class:`float`) [float]" +msgstr "" + +msgid "Convert a Python floating-point number to a C :c:expr:`float`." +msgstr "" + +msgid "``d`` (:class:`float`) [double]" +msgstr "" + +msgid "Convert a Python floating-point number to a C :c:expr:`double`." +msgstr "" + +msgid "``D`` (:class:`complex`) [Py_complex]" +msgstr "" + +msgid "Convert a Python complex number to a C :c:type:`Py_complex` structure." +msgstr "" + +msgid "" +"For unsigned integer formats ``B``, ``H``, ``I``, ``k`` and ``K``, :exc:" +"`DeprecationWarning` is emitted when the value is larger than the maximal " +"value for the C type or less than the minimal value for the corresponding " +"signed integer type of the same size." +msgstr "" + +msgid "Other objects" +msgstr "" + +msgid "``O`` (object) [PyObject \\*]" +msgstr "" + +msgid "" +"Store a Python object (without any conversion) in a C object pointer. The C " +"program thus receives the actual object that was passed. A new :term:" +"`strong reference` to the object is not created (i.e. its reference count is " +"not increased). The pointer stored is not ``NULL``." +msgstr "" + +msgid "``O!`` (object) [*typeobject*, PyObject \\*]" +msgstr "" + +msgid "" +"Store a Python object in a C object pointer. This is similar to ``O``, but " +"takes two C arguments: the first is the address of a Python type object, the " +"second is the address of the C variable (of type :c:expr:`PyObject*`) into " +"which the object pointer is stored. If the Python object does not have the " +"required type, :exc:`TypeError` is raised." +msgstr "" + +msgid "``O&`` (object) [*converter*, *address*]" +msgstr "" + +msgid "" +"Convert a Python object to a C variable through a *converter* function. " +"This takes two arguments: the first is a function, the second is the address " +"of a C variable (of arbitrary type), converted to :c:expr:`void *`. The " +"*converter* function in turn is called as follows::" +msgstr "" + +msgid "status = converter(object, address);" +msgstr "" + +msgid "" +"where *object* is the Python object to be converted and *address* is the :c:" +"expr:`void*` argument that was passed to the ``PyArg_Parse*`` function. The " +"returned *status* should be ``1`` for a successful conversion and ``0`` if " +"the conversion has failed. When the conversion fails, the *converter* " +"function should raise an exception and leave the content of *address* " +"unmodified." +msgstr "" + +msgid "" +"If the *converter* returns :c:macro:`!Py_CLEANUP_SUPPORTED`, it may get " +"called a second time if the argument parsing eventually fails, giving the " +"converter a chance to release any memory that it had already allocated. In " +"this second call, the *object* parameter will be ``NULL``; *address* will " +"have the same value as in the original call." +msgstr "" + +msgid "" +"Examples of converters: :c:func:`PyUnicode_FSConverter` and :c:func:" +"`PyUnicode_FSDecoder`." +msgstr "" + +msgid ":c:macro:`!Py_CLEANUP_SUPPORTED` was added." +msgstr "" + +msgid "``p`` (:class:`bool`) [int]" +msgstr "" + +msgid "" +"Tests the value passed in for truth (a boolean **p**\\ redicate) and " +"converts the result to its equivalent C true/false integer value. Sets the " +"int to ``1`` if the expression was true and ``0`` if it was false. This " +"accepts any valid Python value. See :ref:`truth` for more information about " +"how Python tests values for truth." +msgstr "" + +msgid "``(items)`` (sequence) [*matching-items*]" +msgstr "" + +msgid "" +"The object must be a Python sequence (except :class:`str`, :class:`bytes` " +"or :class:`bytearray`) whose length is the number of format units in " +"*items*. The C arguments must correspond to the individual format units in " +"*items*. Format units for sequences may be nested." +msgstr "" + +msgid "" +"If *items* contains format units which store a :ref:`borrowed buffer ` (``s``, ``s#``, ``z``, ``z#``, ``y``, or ``y#``) or a :" +"term:`borrowed reference` (``S``, ``Y``, ``U``, ``O``, or ``O!``), the " +"object must be a Python tuple. The *converter* for the ``O&`` format unit in " +"*items* must not store a borrowed buffer or a borrowed reference." +msgstr "" + +msgid "" +":class:`str` and :class:`bytearray` objects no longer accepted as a sequence." +msgstr "" + +msgid "" +"Non-tuple sequences are deprecated if *items* contains format units which " +"store a borrowed buffer or a borrowed reference." +msgstr "" + +msgid "" +"A few other characters have a meaning in a format string. These may not " +"occur inside nested parentheses. They are:" +msgstr "" + +msgid "``|``" +msgstr "" + +msgid "" +"Indicates that the remaining arguments in the Python argument list are " +"optional. The C variables corresponding to optional arguments should be " +"initialized to their default value --- when an optional argument is not " +"specified, :c:func:`PyArg_ParseTuple` does not touch the contents of the " +"corresponding C variable(s)." +msgstr "" + +msgid "``$``" +msgstr "" + +msgid "" +":c:func:`PyArg_ParseTupleAndKeywords` only: Indicates that the remaining " +"arguments in the Python argument list are keyword-only. Currently, all " +"keyword-only arguments must also be optional arguments, so ``|`` must always " +"be specified before ``$`` in the format string." +msgstr "" + +msgid "``:``" +msgstr "" + +msgid "" +"The list of format units ends here; the string after the colon is used as " +"the function name in error messages (the \"associated value\" of the " +"exception that :c:func:`PyArg_ParseTuple` raises)." +msgstr "" + +msgid "``;``" +msgstr "" + +msgid "" +"The list of format units ends here; the string after the semicolon is used " +"as the error message *instead* of the default error message. ``:`` and ``;" +"`` mutually exclude each other." +msgstr "" + +msgid "" +"Note that any Python object references which are provided to the caller are " +"*borrowed* references; do not release them (i.e. do not decrement their " +"reference count)!" +msgstr "" + +msgid "" +"Additional arguments passed to these functions must be addresses of " +"variables whose type is determined by the format string; these are used to " +"store values from the input tuple. There are a few cases, as described in " +"the list of format units above, where these parameters are used as input " +"values; they should match what is specified for the corresponding format " +"unit in that case." +msgstr "" + +msgid "" +"For the conversion to succeed, the *arg* object must match the format and " +"the format must be exhausted. On success, the ``PyArg_Parse*`` functions " +"return true, otherwise they return false and raise an appropriate exception. " +"When the ``PyArg_Parse*`` functions fail due to conversion failure in one of " +"the format units, the variables at the addresses corresponding to that and " +"the following format units are left untouched." +msgstr "" + +msgid "API Functions" +msgstr "" + +msgid "" +"Parse the parameters of a function that takes only positional parameters " +"into local variables. Returns true on success; on failure, it returns false " +"and raises the appropriate exception." +msgstr "" + +msgid "" +"Identical to :c:func:`PyArg_ParseTuple`, except that it accepts a va_list " +"rather than a variable number of arguments." +msgstr "" + +msgid "" +"Parse the parameters of a function that takes both positional and keyword " +"parameters into local variables. The *keywords* argument is a ``NULL``-" +"terminated array of keyword parameter names specified as null-terminated " +"ASCII or UTF-8 encoded C strings. Empty names denote :ref:`positional-only " +"parameters `. Returns true on success; on " +"failure, it returns false and raises the appropriate exception." +msgstr "" + +msgid "" +"The *keywords* parameter declaration is :c:expr:`char * const *` in C and :c:" +"expr:`const char * const *` in C++. This can be overridden with the :c:macro:" +"`PY_CXX_CONST` macro." +msgstr "" + +msgid "" +"Added support for :ref:`positional-only parameters `." +msgstr "" + +msgid "" +"The *keywords* parameter has now type :c:expr:`char * const *` in C and :c:" +"expr:`const char * const *` in C++, instead of :c:expr:`char **`. Added " +"support for non-ASCII keyword parameter names." +msgstr "" + +msgid "" +"Identical to :c:func:`PyArg_ParseTupleAndKeywords`, except that it accepts a " +"va_list rather than a variable number of arguments." +msgstr "" + +msgid "" +"Ensure that the keys in the keywords argument dictionary are strings. This " +"is only needed if :c:func:`PyArg_ParseTupleAndKeywords` is not used, since " +"the latter already does this check." +msgstr "" + +msgid "" +"Parse the parameter of a function that takes a single positional parameter " +"into a local variable. Returns true on success; on failure, it returns " +"false and raises the appropriate exception." +msgstr "" + +msgid "Example::" +msgstr "" + +msgid "" +"// Function using METH_O calling convention\n" +"static PyObject*\n" +"my_function(PyObject *module, PyObject *arg)\n" +"{\n" +" int value;\n" +" if (!PyArg_Parse(arg, \"i:my_function\", &value)) {\n" +" return NULL;\n" +" }\n" +" // ... use value ...\n" +"}" +msgstr "" + +msgid "" +"Parse the parameters of a function that takes only array parameters into " +"local variables (that is, a function using the :c:macro:`METH_FASTCALL` " +"calling convention). Returns true on success; on failure, it returns false " +"and raises the appropriate exception." +msgstr "" + +msgid "" +"Parse the parameters of a function that takes both array and keyword " +"parameters into local variables (that is, a function using the :c:macro:" +"`METH_FASTCALL` ``|`` :c:macro:`METH_KEYWORDS` calling convention). Returns " +"true on success; on failure, it returns false and raises the appropriate " +"exception." +msgstr "" + +msgid "" +"A simpler form of parameter retrieval which does not use a format string to " +"specify the types of the arguments. Functions which use this method to " +"retrieve their parameters should be declared as :c:macro:`METH_VARARGS` in " +"function or method tables. The tuple containing the actual parameters " +"should be passed as *args*; it must actually be a tuple. The length of the " +"tuple must be at least *min* and no more than *max*; *min* and *max* may be " +"equal. Additional arguments must be passed to the function, each of which " +"should be a pointer to a :c:expr:`PyObject*` variable; these will be filled " +"in with the values from *args*; they will contain :term:`borrowed references " +"`. The variables which correspond to optional parameters " +"not given by *args* will not be filled in; these should be initialized by " +"the caller. This function returns true on success and false if *args* is not " +"a tuple or contains the wrong number of elements; an exception will be set " +"if there was a failure." +msgstr "" + +msgid "" +"This is an example of the use of this function, taken from the sources for " +"the :mod:`!_weakref` helper module for weak references::" +msgstr "" + +msgid "" +"static PyObject *\n" +"weakref_ref(PyObject *self, PyObject *args)\n" +"{\n" +" PyObject *object;\n" +" PyObject *callback = NULL;\n" +" PyObject *result = NULL;\n" +"\n" +" if (PyArg_UnpackTuple(args, \"ref\", 1, 2, &object, &callback)) {\n" +" result = PyWeakref_NewRef(object, callback);\n" +" }\n" +" return result;\n" +"}" +msgstr "" + +msgid "" +"The call to :c:func:`PyArg_UnpackTuple` in this example is entirely " +"equivalent to this call to :c:func:`PyArg_ParseTuple`::" +msgstr "" + +msgid "PyArg_ParseTuple(args, \"O|O:ref\", &object, &callback)" +msgstr "" + +msgid "" +"The value to be inserted, if any, before :c:expr:`char * const *` in the " +"*keywords* parameter declaration of :c:func:`PyArg_ParseTupleAndKeywords` " +"and :c:func:`PyArg_VaParseTupleAndKeywords`. Default empty for C and " +"``const`` for C++ (:c:expr:`const char * const *`). To override, define it " +"to the desired value before including :file:`Python.h`." +msgstr "" + +msgid "Building values" +msgstr "" + +msgid "" +"Create a new value based on a format string similar to those accepted by the " +"``PyArg_Parse*`` family of functions and a sequence of values. Returns the " +"value or ``NULL`` in the case of an error; an exception will be raised if " +"``NULL`` is returned." +msgstr "" + +msgid "" +":c:func:`Py_BuildValue` does not always build a tuple. It builds a tuple " +"only if its format string contains two or more format units. If the format " +"string is empty, it returns ``None``; if it contains exactly one format " +"unit, it returns whatever object is described by that format unit. To force " +"it to return a tuple of size 0 or one, parenthesize the format string." +msgstr "" + +msgid "" +"When memory buffers are passed as parameters to supply data to build " +"objects, as for the ``s`` and ``s#`` formats, the required data is copied. " +"Buffers provided by the caller are never referenced by the objects created " +"by :c:func:`Py_BuildValue`. In other words, if your code invokes :c:func:" +"`malloc` and passes the allocated memory to :c:func:`Py_BuildValue`, your " +"code is responsible for calling :c:func:`free` for that memory once :c:func:" +"`Py_BuildValue` returns." +msgstr "" + +msgid "" +"In the following description, the quoted form is the format unit; the entry " +"in (round) parentheses is the Python object type that the format unit will " +"return; and the entry in [square] brackets is the type of the C value(s) to " +"be passed." +msgstr "" + +msgid "" +"The characters space, tab, colon and comma are ignored in format strings " +"(but not within format units such as ``s#``). This can be used to make long " +"format strings a tad more readable." +msgstr "" + +msgid "``s`` (:class:`str` or ``None``) [const char \\*]" +msgstr "" + +msgid "" +"Convert a null-terminated C string to a Python :class:`str` object using " +"``'utf-8'`` encoding. If the C string pointer is ``NULL``, ``None`` is used." +msgstr "" + +msgid "" +"``s#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" +msgstr "" + +msgid "" +"Convert a C string and its length to a Python :class:`str` object using " +"``'utf-8'`` encoding. If the C string pointer is ``NULL``, the length is " +"ignored and ``None`` is returned." +msgstr "" + +msgid "``y`` (:class:`bytes`) [const char \\*]" +msgstr "" + +msgid "" +"This converts a C string to a Python :class:`bytes` object. If the C string " +"pointer is ``NULL``, ``None`` is returned." +msgstr "" + +msgid "``y#`` (:class:`bytes`) [const char \\*, :c:type:`Py_ssize_t`]" +msgstr "" + +msgid "" +"This converts a C string and its lengths to a Python object. If the C " +"string pointer is ``NULL``, ``None`` is returned." +msgstr "" + +msgid "Same as ``s``." +msgstr "" + +msgid "" +"``z#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" +msgstr "" + +msgid "Same as ``s#``." +msgstr "" + +msgid "``u`` (:class:`str`) [const wchar_t \\*]" +msgstr "" + +msgid "" +"Convert a null-terminated :c:type:`wchar_t` buffer of Unicode (UTF-16 or " +"UCS-4) data to a Python Unicode object. If the Unicode buffer pointer is " +"``NULL``, ``None`` is returned." +msgstr "" + +msgid "``u#`` (:class:`str`) [const wchar_t \\*, :c:type:`Py_ssize_t`]" +msgstr "" + +msgid "" +"Convert a Unicode (UTF-16 or UCS-4) data buffer and its length to a Python " +"Unicode object. If the Unicode buffer pointer is ``NULL``, the length is " +"ignored and ``None`` is returned." +msgstr "" + +msgid "``U`` (:class:`str` or ``None``) [const char \\*]" +msgstr "" + +msgid "" +"``U#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" +msgstr "" + +msgid "Convert a plain C :c:expr:`int` to a Python integer object." +msgstr "" + +msgid "``b`` (:class:`int`) [char]" +msgstr "" + +msgid "Convert a plain C :c:expr:`char` to a Python integer object." +msgstr "" + +msgid "Convert a plain C :c:expr:`short int` to a Python integer object." +msgstr "" + +msgid "Convert a C :c:expr:`long int` to a Python integer object." +msgstr "" + +msgid "Convert a C :c:expr:`unsigned char` to a Python integer object." +msgstr "" + +msgid "Convert a C :c:expr:`unsigned short int` to a Python integer object." +msgstr "" + +msgid "Convert a C :c:expr:`unsigned int` to a Python integer object." +msgstr "" + +msgid "Convert a C :c:expr:`unsigned long` to a Python integer object." +msgstr "" + +msgid "Convert a C :c:expr:`long long` to a Python integer object." +msgstr "" + +msgid "Convert a C :c:expr:`unsigned long long` to a Python integer object." +msgstr "" + +msgid "Convert a C :c:type:`Py_ssize_t` to a Python integer." +msgstr "" + +msgid "Convert a C :c:expr:`int` to a Python :class:`bool` object." +msgstr "" + +msgid "" +"Be aware that this format requires an ``int`` argument. Unlike most other " +"contexts in C, variadic arguments are not coerced to a suitable type " +"automatically. You can convert another type (for example, a pointer or a " +"float) to a suitable ``int`` value using ``(x) ? 1 : 0`` or ``!!x``." +msgstr "" + +msgid "``c`` (:class:`bytes` of length 1) [char]" +msgstr "" + +msgid "" +"Convert a C :c:expr:`int` representing a byte to a Python :class:`bytes` " +"object of length 1." +msgstr "" + +msgid "" +"Convert a C :c:expr:`int` representing a character to Python :class:`str` " +"object of length 1." +msgstr "" + +msgid "Convert a C :c:expr:`double` to a Python floating-point number." +msgstr "" + +msgid "Convert a C :c:expr:`float` to a Python floating-point number." +msgstr "" + +msgid "``D`` (:class:`complex`) [Py_complex \\*]" +msgstr "" + +msgid "Convert a C :c:type:`Py_complex` structure to a Python complex number." +msgstr "" + +msgid "" +"Pass a Python object untouched but create a new :term:`strong reference` to " +"it (i.e. its reference count is incremented by one). If the object passed in " +"is a ``NULL`` pointer, it is assumed that this was caused because the call " +"producing the argument found an error and set an exception. Therefore, :c:" +"func:`Py_BuildValue` will return ``NULL`` but won't raise an exception. If " +"no exception has been raised yet, :exc:`SystemError` is set." +msgstr "" + +msgid "``S`` (object) [PyObject \\*]" +msgstr "" + +msgid "Same as ``O``." +msgstr "" + +msgid "``N`` (object) [PyObject \\*]" +msgstr "" + +msgid "" +"Same as ``O``, except it doesn't create a new :term:`strong reference`. " +"Useful when the object is created by a call to an object constructor in the " +"argument list." +msgstr "" + +msgid "``O&`` (object) [*converter*, *anything*]" +msgstr "" + +msgid "" +"Convert *anything* to a Python object through a *converter* function. The " +"function is called with *anything* (which should be compatible with :c:expr:" +"`void*`) as its argument and should return a \"new\" Python object, or " +"``NULL`` if an error occurred." +msgstr "" + +msgid "``(items)`` (:class:`tuple`) [*matching-items*]" +msgstr "" + +msgid "" +"Convert a sequence of C values to a Python tuple with the same number of " +"items." +msgstr "" + +msgid "``[items]`` (:class:`list`) [*matching-items*]" +msgstr "" + +msgid "" +"Convert a sequence of C values to a Python list with the same number of " +"items." +msgstr "" + +msgid "``{items}`` (:class:`dict`) [*matching-items*]" +msgstr "" + +msgid "" +"Convert a sequence of C values to a Python dictionary. Each pair of " +"consecutive C values adds one item to the dictionary, serving as key and " +"value, respectively." +msgstr "" + +msgid "" +"If there is an error in the format string, the :exc:`SystemError` exception " +"is set and ``NULL`` returned." +msgstr "" + +msgid "" +"Identical to :c:func:`Py_BuildValue`, except that it accepts a va_list " +"rather than a variable number of arguments." +msgstr "" diff --git a/c-api/bool.po b/c-api/bool.po new file mode 100644 index 00000000..2bca8ccf --- /dev/null +++ b/c-api/bool.po @@ -0,0 +1,70 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Boolean Objects" +msgstr "" + +msgid "" +"Booleans in Python are implemented as a subclass of integers. There are " +"only two booleans, :c:data:`Py_False` and :c:data:`Py_True`. As such, the " +"normal creation and deletion functions don't apply to booleans. The " +"following macros are available, however." +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python boolean type; " +"it is the same object as :class:`bool` in the Python layer." +msgstr "" + +msgid "" +"Return true if *o* is of type :c:data:`PyBool_Type`. This function always " +"succeeds." +msgstr "" + +msgid "" +"The Python ``False`` object. This object has no methods and is :term:" +"`immortal`." +msgstr "" + +msgid ":c:data:`Py_False` is :term:`immortal`." +msgstr "" + +msgid "" +"The Python ``True`` object. This object has no methods and is :term:" +"`immortal`." +msgstr "" + +msgid ":c:data:`Py_True` is :term:`immortal`." +msgstr "" + +msgid "Return :c:data:`Py_False` from a function." +msgstr "" + +msgid "Return :c:data:`Py_True` from a function." +msgstr "" + +msgid "" +"Return :c:data:`Py_True` or :c:data:`Py_False`, depending on the truth value " +"of *v*." +msgstr "" diff --git a/c-api/buffer.po b/c-api/buffer.po new file mode 100644 index 00000000..306eb604 --- /dev/null +++ b/c-api/buffer.po @@ -0,0 +1,654 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Buffer Protocol" +msgstr "" + +msgid "" +"Certain objects available in Python wrap access to an underlying memory " +"array or *buffer*. Such objects include the built-in :class:`bytes` and :" +"class:`bytearray`, and some extension types like :class:`array.array`. Third-" +"party libraries may define their own types for special purposes, such as " +"image processing or numeric analysis." +msgstr "" + +msgid "" +"While each of these types have their own semantics, they share the common " +"characteristic of being backed by a possibly large memory buffer. It is " +"then desirable, in some situations, to access that buffer directly and " +"without intermediate copying." +msgstr "" + +msgid "" +"Python provides such a facility at the C and Python level in the form of " +"the :ref:`buffer protocol `. This protocol has two sides:" +msgstr "" + +msgid "" +"on the producer side, a type can export a \"buffer interface\" which allows " +"objects of that type to expose information about their underlying buffer. " +"This interface is described in the section :ref:`buffer-structs`; for Python " +"see :ref:`python-buffer-protocol`." +msgstr "" + +msgid "" +"on the consumer side, several means are available to obtain a pointer to the " +"raw underlying data of an object (for example a method parameter). For " +"Python see :class:`memoryview`." +msgstr "" + +msgid "" +"Simple objects such as :class:`bytes` and :class:`bytearray` expose their " +"underlying buffer in byte-oriented form. Other forms are possible; for " +"example, the elements exposed by an :class:`array.array` can be multi-byte " +"values." +msgstr "" + +msgid "" +"An example consumer of the buffer interface is the :meth:`~io.BufferedIOBase." +"write` method of file objects: any object that can export a series of bytes " +"through the buffer interface can be written to a file. While :meth:`!write` " +"only needs read-only access to the internal contents of the object passed to " +"it, other methods such as :meth:`~io.BufferedIOBase.readinto` need write " +"access to the contents of their argument. The buffer interface allows " +"objects to selectively allow or reject exporting of read-write and read-only " +"buffers." +msgstr "" + +msgid "" +"There are two ways for a consumer of the buffer interface to acquire a " +"buffer over a target object:" +msgstr "" + +msgid "call :c:func:`PyObject_GetBuffer` with the right parameters;" +msgstr "" + +msgid "" +"call :c:func:`PyArg_ParseTuple` (or one of its siblings) with one of the " +"``y*``, ``w*`` or ``s*`` :ref:`format codes `." +msgstr "" + +msgid "" +"In both cases, :c:func:`PyBuffer_Release` must be called when the buffer " +"isn't needed anymore. Failure to do so could lead to various issues such as " +"resource leaks." +msgstr "" + +msgid "" +"The buffer protocol is now accessible in Python, see :ref:`python-buffer-" +"protocol` and :class:`memoryview`." +msgstr "" + +msgid "Buffer structure" +msgstr "" + +msgid "" +"Buffer structures (or simply \"buffers\") are useful as a way to expose the " +"binary data from another object to the Python programmer. They can also be " +"used as a zero-copy slicing mechanism. Using their ability to reference a " +"block of memory, it is possible to expose any data to the Python programmer " +"quite easily. The memory could be a large, constant array in a C extension, " +"it could be a raw block of memory for manipulation before passing to an " +"operating system library, or it could be used to pass around structured data " +"in its native, in-memory format." +msgstr "" + +msgid "" +"Contrary to most data types exposed by the Python interpreter, buffers are " +"not :c:type:`PyObject` pointers but rather simple C structures. This allows " +"them to be created and copied very simply. When a generic wrapper around a " +"buffer is needed, a :ref:`memoryview ` object can be " +"created." +msgstr "" + +msgid "" +"For short instructions how to write an exporting object, see :ref:`Buffer " +"Object Structures `. For obtaining a buffer, see :c:func:" +"`PyObject_GetBuffer`." +msgstr "" + +msgid "" +"A pointer to the start of the logical structure described by the buffer " +"fields. This can be any location within the underlying physical memory block " +"of the exporter. For example, with negative :c:member:`~Py_buffer.strides` " +"the value may point to the end of the memory block." +msgstr "" + +msgid "" +"For :term:`contiguous` arrays, the value points to the beginning of the " +"memory block." +msgstr "" + +msgid "" +"A new reference to the exporting object. The reference is owned by the " +"consumer and automatically released (i.e. reference count decremented) and " +"set to ``NULL`` by :c:func:`PyBuffer_Release`. The field is the equivalent " +"of the return value of any standard C-API function." +msgstr "" + +msgid "" +"As a special case, for *temporary* buffers that are wrapped by :c:func:" +"`PyMemoryView_FromBuffer` or :c:func:`PyBuffer_FillInfo` this field is " +"``NULL``. In general, exporting objects MUST NOT use this scheme." +msgstr "" + +msgid "" +"``product(shape) * itemsize``. For contiguous arrays, this is the length of " +"the underlying memory block. For non-contiguous arrays, it is the length " +"that the logical structure would have if it were copied to a contiguous " +"representation." +msgstr "" + +msgid "" +"Accessing ``((char *)buf)[0] up to ((char *)buf)[len-1]`` is only valid if " +"the buffer has been obtained by a request that guarantees contiguity. In " +"most cases such a request will be :c:macro:`PyBUF_SIMPLE` or :c:macro:" +"`PyBUF_WRITABLE`." +msgstr "" + +msgid "" +"An indicator of whether the buffer is read-only. This field is controlled by " +"the :c:macro:`PyBUF_WRITABLE` flag." +msgstr "" + +msgid "" +"Item size in bytes of a single element. Same as the value of :func:`struct." +"calcsize` called on non-``NULL`` :c:member:`~Py_buffer.format` values." +msgstr "" + +msgid "" +"Important exception: If a consumer requests a buffer without the :c:macro:" +"`PyBUF_FORMAT` flag, :c:member:`~Py_buffer.format` will be set to " +"``NULL``, but :c:member:`~Py_buffer.itemsize` still has the value for the " +"original format." +msgstr "" + +msgid "" +"If :c:member:`~Py_buffer.shape` is present, the equality ``product(shape) * " +"itemsize == len`` still holds and the consumer can use :c:member:`~Py_buffer." +"itemsize` to navigate the buffer." +msgstr "" + +msgid "" +"If :c:member:`~Py_buffer.shape` is ``NULL`` as a result of a :c:macro:" +"`PyBUF_SIMPLE` or a :c:macro:`PyBUF_WRITABLE` request, the consumer must " +"disregard :c:member:`~Py_buffer.itemsize` and assume ``itemsize == 1``." +msgstr "" + +msgid "" +"A *NULL* terminated string in :mod:`struct` module style syntax describing " +"the contents of a single item. If this is ``NULL``, ``\"B\"`` (unsigned " +"bytes) is assumed." +msgstr "" + +msgid "This field is controlled by the :c:macro:`PyBUF_FORMAT` flag." +msgstr "" + +msgid "" +"The number of dimensions the memory represents as an n-dimensional array. If " +"it is ``0``, :c:member:`~Py_buffer.buf` points to a single item representing " +"a scalar. In this case, :c:member:`~Py_buffer.shape`, :c:member:`~Py_buffer." +"strides` and :c:member:`~Py_buffer.suboffsets` MUST be ``NULL``. The maximum " +"number of dimensions is given by :c:macro:`PyBUF_MAX_NDIM`." +msgstr "" + +msgid "" +"An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim` " +"indicating the shape of the memory as an n-dimensional array. Note that " +"``shape[0] * ... * shape[ndim-1] * itemsize`` MUST be equal to :c:member:" +"`~Py_buffer.len`." +msgstr "" + +msgid "" +"Shape values are restricted to ``shape[n] >= 0``. The case ``shape[n] == 0`` " +"requires special attention. See `complex arrays`_ for further information." +msgstr "" + +msgid "The shape array is read-only for the consumer." +msgstr "" + +msgid "" +"An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim` " +"giving the number of bytes to skip to get to a new element in each dimension." +msgstr "" + +msgid "" +"Stride values can be any integer. For regular arrays, strides are usually " +"positive, but a consumer MUST be able to handle the case ``strides[n] <= " +"0``. See `complex arrays`_ for further information." +msgstr "" + +msgid "The strides array is read-only for the consumer." +msgstr "" + +msgid "" +"An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim`. If " +"``suboffsets[n] >= 0``, the values stored along the nth dimension are " +"pointers and the suboffset value dictates how many bytes to add to each " +"pointer after de-referencing. A suboffset value that is negative indicates " +"that no de-referencing should occur (striding in a contiguous memory block)." +msgstr "" + +msgid "" +"If all suboffsets are negative (i.e. no de-referencing is needed), then this " +"field must be ``NULL`` (the default value)." +msgstr "" + +msgid "" +"This type of array representation is used by the Python Imaging Library " +"(PIL). See `complex arrays`_ for further information how to access elements " +"of such an array." +msgstr "" + +msgid "The suboffsets array is read-only for the consumer." +msgstr "" + +msgid "" +"This is for use internally by the exporting object. For example, this might " +"be re-cast as an integer by the exporter and used to store flags about " +"whether or not the shape, strides, and suboffsets arrays must be freed when " +"the buffer is released. The consumer MUST NOT alter this value." +msgstr "" + +msgid "Constants:" +msgstr "" + +msgid "" +"The maximum number of dimensions the memory represents. Exporters MUST " +"respect this limit, consumers of multi-dimensional buffers SHOULD be able to " +"handle up to :c:macro:`!PyBUF_MAX_NDIM` dimensions. Currently set to 64." +msgstr "" + +msgid "Buffer request types" +msgstr "" + +msgid "" +"Buffers are usually obtained by sending a buffer request to an exporting " +"object via :c:func:`PyObject_GetBuffer`. Since the complexity of the logical " +"structure of the memory can vary drastically, the consumer uses the *flags* " +"argument to specify the exact buffer type it can handle." +msgstr "" + +msgid "" +"All :c:type:`Py_buffer` fields are unambiguously defined by the request type." +msgstr "" + +msgid "request-independent fields" +msgstr "" + +msgid "" +"The following fields are not influenced by *flags* and must always be filled " +"in with the correct values: :c:member:`~Py_buffer.obj`, :c:member:" +"`~Py_buffer.buf`, :c:member:`~Py_buffer.len`, :c:member:`~Py_buffer." +"itemsize`, :c:member:`~Py_buffer.ndim`." +msgstr "" + +msgid "readonly, format" +msgstr "" + +msgid "" +"Controls the :c:member:`~Py_buffer.readonly` field. If set, the exporter " +"MUST provide a writable buffer or else report failure. Otherwise, the " +"exporter MAY provide either a read-only or writable buffer, but the choice " +"MUST be consistent for all consumers. For example, :c:expr:`PyBUF_SIMPLE | " +"PyBUF_WRITABLE` can be used to request a simple writable buffer." +msgstr "" + +msgid "This is an alias to :c:macro:`PyBUF_WRITABLE`." +msgstr "" + +msgid "" +"Controls the :c:member:`~Py_buffer.format` field. If set, this field MUST be " +"filled in correctly. Otherwise, this field MUST be ``NULL``." +msgstr "" + +msgid "" +":c:macro:`PyBUF_WRITABLE` can be \\|'d to any of the flags in the next " +"section. Since :c:macro:`PyBUF_SIMPLE` is defined as 0, :c:macro:" +"`PyBUF_WRITABLE` can be used as a stand-alone flag to request a simple " +"writable buffer." +msgstr "" + +msgid "" +":c:macro:`PyBUF_FORMAT` must be \\|'d to any of the flags except :c:macro:" +"`PyBUF_SIMPLE`, because the latter already implies format ``B`` (unsigned " +"bytes). :c:macro:`!PyBUF_FORMAT` cannot be used on its own." +msgstr "" + +msgid "shape, strides, suboffsets" +msgstr "" + +msgid "" +"The flags that control the logical structure of the memory are listed in " +"decreasing order of complexity. Note that each flag contains all bits of the " +"flags below it." +msgstr "" + +msgid "Request" +msgstr "" + +msgid "shape" +msgstr "" + +msgid "strides" +msgstr "" + +msgid "suboffsets" +msgstr "" + +msgid "yes" +msgstr "" + +msgid "if needed" +msgstr "" + +msgid "NULL" +msgstr "" + +msgid "contiguity requests" +msgstr "" + +msgid "" +"C or Fortran :term:`contiguity ` can be explicitly requested, " +"with and without stride information. Without stride information, the buffer " +"must be C-contiguous." +msgstr "" + +msgid "contig" +msgstr "" + +msgid "C" +msgstr "" + +msgid "F" +msgstr "" + +msgid "C or F" +msgstr "" + +msgid ":c:macro:`PyBUF_ND`" +msgstr "" + +msgid "compound requests" +msgstr "" + +msgid "" +"All possible requests are fully defined by some combination of the flags in " +"the previous section. For convenience, the buffer protocol provides " +"frequently used combinations as single flags." +msgstr "" + +msgid "" +"In the following table *U* stands for undefined contiguity. The consumer " +"would have to call :c:func:`PyBuffer_IsContiguous` to determine contiguity." +msgstr "" + +msgid "readonly" +msgstr "" + +msgid "format" +msgstr "" + +msgid "U" +msgstr "" + +msgid "0" +msgstr "" + +msgid "1 or 0" +msgstr "" + +msgid "Complex arrays" +msgstr "" + +msgid "NumPy-style: shape and strides" +msgstr "" + +msgid "" +"The logical structure of NumPy-style arrays is defined by :c:member:" +"`~Py_buffer.itemsize`, :c:member:`~Py_buffer.ndim`, :c:member:`~Py_buffer." +"shape` and :c:member:`~Py_buffer.strides`." +msgstr "" + +msgid "" +"If ``ndim == 0``, the memory location pointed to by :c:member:`~Py_buffer." +"buf` is interpreted as a scalar of size :c:member:`~Py_buffer.itemsize`. In " +"that case, both :c:member:`~Py_buffer.shape` and :c:member:`~Py_buffer." +"strides` are ``NULL``." +msgstr "" + +msgid "" +"If :c:member:`~Py_buffer.strides` is ``NULL``, the array is interpreted as a " +"standard n-dimensional C-array. Otherwise, the consumer must access an n-" +"dimensional array as follows:" +msgstr "" + +msgid "" +"ptr = (char *)buf + indices[0] * strides[0] + ... + indices[n-1] * " +"strides[n-1];\n" +"item = *((typeof(item) *)ptr);" +msgstr "" + +msgid "" +"As noted above, :c:member:`~Py_buffer.buf` can point to any location within " +"the actual memory block. An exporter can check the validity of a buffer with " +"this function:" +msgstr "" + +msgid "" +"def verify_structure(memlen, itemsize, ndim, shape, strides, offset):\n" +" \"\"\"Verify that the parameters represent a valid array within\n" +" the bounds of the allocated memory:\n" +" char *mem: start of the physical memory block\n" +" memlen: length of the physical memory block\n" +" offset: (char *)buf - mem\n" +" \"\"\"\n" +" if offset % itemsize:\n" +" return False\n" +" if offset < 0 or offset+itemsize > memlen:\n" +" return False\n" +" if any(v % itemsize for v in strides):\n" +" return False\n" +"\n" +" if ndim <= 0:\n" +" return ndim == 0 and not shape and not strides\n" +" if 0 in shape:\n" +" return True\n" +"\n" +" imin = sum(strides[j]*(shape[j]-1) for j in range(ndim)\n" +" if strides[j] <= 0)\n" +" imax = sum(strides[j]*(shape[j]-1) for j in range(ndim)\n" +" if strides[j] > 0)\n" +"\n" +" return 0 <= offset+imin and offset+imax+itemsize <= memlen" +msgstr "" + +msgid "PIL-style: shape, strides and suboffsets" +msgstr "" + +msgid "" +"In addition to the regular items, PIL-style arrays can contain pointers that " +"must be followed in order to get to the next element in a dimension. For " +"example, the regular three-dimensional C-array ``char v[2][2][3]`` can also " +"be viewed as an array of 2 pointers to 2 two-dimensional arrays: ``char " +"(*v[2])[2][3]``. In suboffsets representation, those two pointers can be " +"embedded at the start of :c:member:`~Py_buffer.buf`, pointing to two ``char " +"x[2][3]`` arrays that can be located anywhere in memory." +msgstr "" + +msgid "" +"Here is a function that returns a pointer to the element in an N-D array " +"pointed to by an N-dimensional index when there are both non-``NULL`` " +"strides and suboffsets::" +msgstr "" + +msgid "" +"void *get_item_pointer(int ndim, void *buf, Py_ssize_t *strides,\n" +" Py_ssize_t *suboffsets, Py_ssize_t *indices) {\n" +" char *pointer = (char*)buf;\n" +" int i;\n" +" for (i = 0; i < ndim; i++) {\n" +" pointer += strides[i] * indices[i];\n" +" if (suboffsets[i] >=0 ) {\n" +" pointer = *((char**)pointer) + suboffsets[i];\n" +" }\n" +" }\n" +" return (void*)pointer;\n" +"}" +msgstr "" + +msgid "Buffer-related functions" +msgstr "" + +msgid "" +"Return ``1`` if *obj* supports the buffer interface otherwise ``0``. When " +"``1`` is returned, it doesn't guarantee that :c:func:`PyObject_GetBuffer` " +"will succeed. This function always succeeds." +msgstr "" + +msgid "" +"Send a request to *exporter* to fill in *view* as specified by *flags*. If " +"the exporter cannot provide a buffer of the exact type, it MUST raise :exc:" +"`BufferError`, set ``view->obj`` to ``NULL`` and return ``-1``." +msgstr "" + +msgid "" +"On success, fill in *view*, set ``view->obj`` to a new reference to " +"*exporter* and return 0. In the case of chained buffer providers that " +"redirect requests to a single object, ``view->obj`` MAY refer to this object " +"instead of *exporter* (See :ref:`Buffer Object Structures `)." +msgstr "" + +msgid "" +"Successful calls to :c:func:`PyObject_GetBuffer` must be paired with calls " +"to :c:func:`PyBuffer_Release`, similar to :c:func:`malloc` and :c:func:" +"`free`. Thus, after the consumer is done with the buffer, :c:func:" +"`PyBuffer_Release` must be called exactly once." +msgstr "" + +msgid "" +"Release the buffer *view* and release the :term:`strong reference` (i.e. " +"decrement the reference count) to the view's supporting object, ``view-" +">obj``. This function MUST be called when the buffer is no longer being " +"used, otherwise reference leaks may occur." +msgstr "" + +msgid "" +"It is an error to call this function on a buffer that was not obtained via :" +"c:func:`PyObject_GetBuffer`." +msgstr "" + +msgid "" +"Return the implied :c:member:`~Py_buffer.itemsize` from :c:member:" +"`~Py_buffer.format`. On error, raise an exception and return -1." +msgstr "" + +msgid "" +"Return ``1`` if the memory defined by the *view* is C-style (*order* is " +"``'C'``) or Fortran-style (*order* is ``'F'``) :term:`contiguous` or either " +"one (*order* is ``'A'``). Return ``0`` otherwise. This function always " +"succeeds." +msgstr "" + +msgid "" +"Get the memory area pointed to by the *indices* inside the given *view*. " +"*indices* must point to an array of ``view->ndim`` indices." +msgstr "" + +msgid "" +"Copy contiguous *len* bytes from *buf* to *view*. *order* can be ``'C'`` or " +"``'F'`` or ``'A'`` (for C-style or Fortran-style ordering or either one). " +"``0`` is returned on success, ``-1`` on error." +msgstr "" + +msgid "" +"Copy *len* bytes from *src* to its contiguous representation in *buf*. " +"*order* can be ``'C'`` or ``'F'`` or ``'A'`` (for C-style or Fortran-style " +"ordering or either one). ``0`` is returned on success, ``-1`` on error." +msgstr "" + +msgid "This function fails if *len* != *src->len*." +msgstr "" + +msgid "" +"Copy data from *src* to *dest* buffer. Can convert between C-style and or " +"Fortran-style buffers." +msgstr "" + +msgid "``0`` is returned on success, ``-1`` on error." +msgstr "" + +msgid "" +"Fill the *strides* array with byte-strides of a :term:`contiguous` (C-style " +"if *order* is ``'C'`` or Fortran-style if *order* is ``'F'``) array of the " +"given shape with the given number of bytes per element." +msgstr "" + +msgid "" +"Handle buffer requests for an exporter that wants to expose *buf* of size " +"*len* with writability set according to *readonly*. *buf* is interpreted as " +"a sequence of unsigned bytes." +msgstr "" + +msgid "" +"The *flags* argument indicates the request type. This function always fills " +"in *view* as specified by flags, unless *buf* has been designated as read-" +"only and :c:macro:`PyBUF_WRITABLE` is set in *flags*." +msgstr "" + +msgid "" +"On success, set ``view->obj`` to a new reference to *exporter* and return 0. " +"Otherwise, raise :exc:`BufferError`, set ``view->obj`` to ``NULL`` and " +"return ``-1``;" +msgstr "" + +msgid "" +"If this function is used as part of a :ref:`getbufferproc `, " +"*exporter* MUST be set to the exporting object and *flags* must be passed " +"unmodified. Otherwise, *exporter* MUST be ``NULL``." +msgstr "" + +msgid "buffer protocol" +msgstr "" + +msgid "buffer interface" +msgstr "" + +msgid "(see buffer protocol)" +msgstr "" + +msgid "buffer object" +msgstr "" + +msgid "PyBufferProcs (C type)" +msgstr "" + +msgid "contiguous" +msgstr "" + +msgid "C-contiguous" +msgstr "" + +msgid "Fortran contiguous" +msgstr "" diff --git a/c-api/bytearray.po b/c-api/bytearray.po new file mode 100644 index 00000000..4ce4483e --- /dev/null +++ b/c-api/bytearray.po @@ -0,0 +1,111 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Byte Array Objects" +msgstr "" + +msgid "" +"This subtype of :c:type:`PyObject` represents a Python bytearray object." +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python bytearray " +"type; it is the same object as :class:`bytearray` in the Python layer." +msgstr "" + +msgid "Type check macros" +msgstr "" + +msgid "" +"Return true if the object *o* is a bytearray object or an instance of a " +"subtype of the bytearray type. This function always succeeds." +msgstr "" + +msgid "" +"Return true if the object *o* is a bytearray object, but not an instance of " +"a subtype of the bytearray type. This function always succeeds." +msgstr "" + +msgid "Direct API functions" +msgstr "" + +msgid "" +"Return a new bytearray object from any object, *o*, that implements the :ref:" +"`buffer protocol `." +msgstr "" + +msgid "On failure, return ``NULL`` with an exception set." +msgstr "" + +msgid "" +"If the object implements the buffer protocol, then the buffer must not be " +"mutated while the bytearray object is being created." +msgstr "" + +msgid "Create a new bytearray object from *string* and its length, *len*." +msgstr "" + +msgid "" +"Concat bytearrays *a* and *b* and return a new bytearray with the result." +msgstr "" + +msgid "Return the size of *bytearray* after checking for a ``NULL`` pointer." +msgstr "" + +msgid "" +"Return the contents of *bytearray* as a char array after checking for a " +"``NULL`` pointer. The returned array always has an extra null byte appended." +msgstr "" + +msgid "" +"It is not thread-safe to mutate the bytearray object while using the " +"returned char array." +msgstr "" + +msgid "" +"Resize the internal buffer of *bytearray* to *len*. Failure is a ``-1`` " +"return with an exception set." +msgstr "" + +msgid "" +"A negative *len* will now result in an exception being set and -1 returned." +msgstr "" + +msgid "Macros" +msgstr "" + +msgid "These macros trade safety for speed and they don't check pointers." +msgstr "" + +msgid "Similar to :c:func:`PyByteArray_AsString`, but without error checking." +msgstr "" + +msgid "Similar to :c:func:`PyByteArray_Size`, but without error checking." +msgstr "" + +msgid "object" +msgstr "" + +msgid "bytearray" +msgstr "" diff --git a/c-api/bytes.po b/c-api/bytes.po new file mode 100644 index 00000000..5e6dd100 --- /dev/null +++ b/c-api/bytes.po @@ -0,0 +1,535 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2026 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-19 16:29+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2026\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Bytes Objects" +msgstr "" + +msgid "" +"These functions raise :exc:`TypeError` when expecting a bytes parameter and " +"called with a non-bytes parameter." +msgstr "" + +msgid "This subtype of :c:type:`PyObject` represents a Python bytes object." +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python bytes type; it " +"is the same object as :class:`bytes` in the Python layer." +msgstr "" + +msgid "" +"Return true if the object *o* is a bytes object or an instance of a subtype " +"of the bytes type. This function always succeeds." +msgstr "" + +msgid "" +"Return true if the object *o* is a bytes object, but not an instance of a " +"subtype of the bytes type. This function always succeeds." +msgstr "" + +msgid "" +"Return a new bytes object with a copy of the string *v* as value on success, " +"and ``NULL`` on failure. The parameter *v* must not be ``NULL``; it will " +"not be checked." +msgstr "" + +msgid "" +"Return a new bytes object with a copy of the string *v* as value and length " +"*len* on success, and ``NULL`` on failure. If *v* is ``NULL``, the contents " +"of the bytes object are uninitialized." +msgstr "" + +msgid "" +"Use the :c:type:`PyBytesWriter` API instead of " +"``PyBytes_FromStringAndSize(NULL, len)``." +msgstr "" + +msgid "" +"Take a C :c:func:`printf`\\ -style *format* string and a variable number of " +"arguments, calculate the size of the resulting Python bytes object and " +"return a bytes object with the values formatted into it. The variable " +"arguments must be C types and must correspond exactly to the format " +"characters in the *format* string. The following format characters are " +"allowed:" +msgstr "" + +msgid "Format Characters" +msgstr "" + +msgid "Type" +msgstr "" + +msgid "Comment" +msgstr "" + +msgid "``%%``" +msgstr "" + +msgid "*n/a*" +msgstr "" + +msgid "The literal % character." +msgstr "" + +msgid "``%c``" +msgstr "" + +msgid "int" +msgstr "" + +msgid "A single byte, represented as a C int." +msgstr "" + +msgid "``%d``" +msgstr "" + +msgid "Equivalent to ``printf(\"%d\")``. [1]_" +msgstr "" + +msgid "``%u``" +msgstr "" + +msgid "unsigned int" +msgstr "" + +msgid "Equivalent to ``printf(\"%u\")``. [1]_" +msgstr "" + +msgid "``%ld``" +msgstr "" + +msgid "long" +msgstr "" + +msgid "Equivalent to ``printf(\"%ld\")``. [1]_" +msgstr "" + +msgid "``%lu``" +msgstr "" + +msgid "unsigned long" +msgstr "" + +msgid "Equivalent to ``printf(\"%lu\")``. [1]_" +msgstr "" + +msgid "``%zd``" +msgstr "" + +msgid ":c:type:`\\ Py_ssize_t`" +msgstr "" + +msgid "Equivalent to ``printf(\"%zd\")``. [1]_" +msgstr "" + +msgid "``%zu``" +msgstr "" + +msgid "size_t" +msgstr "" + +msgid "Equivalent to ``printf(\"%zu\")``. [1]_" +msgstr "" + +msgid "``%i``" +msgstr "" + +msgid "Equivalent to ``printf(\"%i\")``. [1]_" +msgstr "" + +msgid "``%x``" +msgstr "" + +msgid "Equivalent to ``printf(\"%x\")``. [1]_" +msgstr "" + +msgid "``%s``" +msgstr "" + +msgid "const char\\*" +msgstr "" + +msgid "A null-terminated C character array." +msgstr "" + +msgid "``%p``" +msgstr "" + +msgid "const void\\*" +msgstr "" + +msgid "" +"The hex representation of a C pointer. Mostly equivalent to " +"``printf(\"%p\")`` except that it is guaranteed to start with the literal " +"``0x`` regardless of what the platform's ``printf`` yields." +msgstr "" + +msgid "" +"An unrecognized format character causes all the rest of the format string to " +"be copied as-is to the result object, and any extra arguments discarded." +msgstr "" + +msgid "" +"For integer specifiers (d, u, ld, lu, zd, zu, i, x): the 0-conversion flag " +"has effect even when a precision is given." +msgstr "" + +msgid "" +"Identical to :c:func:`PyBytes_FromFormat` except that it takes exactly two " +"arguments." +msgstr "" + +msgid "" +"Return the bytes representation of object *o* that implements the buffer " +"protocol." +msgstr "" + +msgid "" +"If the object implements the buffer protocol, then the buffer must not be " +"mutated while the bytes object is being created." +msgstr "" + +msgid "Return the length of the bytes in bytes object *o*." +msgstr "" + +msgid "Similar to :c:func:`PyBytes_Size`, but without error checking." +msgstr "" + +msgid "" +"Return a pointer to the contents of *o*. The pointer refers to the internal " +"buffer of *o*, which consists of ``len(o) + 1`` bytes. The last byte in the " +"buffer is always null, regardless of whether there are any other null " +"bytes. The data must not be modified in any way, unless the object was just " +"created using ``PyBytes_FromStringAndSize(NULL, size)``. It must not be " +"deallocated. If *o* is not a bytes object at all, :c:func:" +"`PyBytes_AsString` returns ``NULL`` and raises :exc:`TypeError`." +msgstr "" + +msgid "Similar to :c:func:`PyBytes_AsString`, but without error checking." +msgstr "" + +msgid "" +"Return the null-terminated contents of the object *obj* through the output " +"variables *buffer* and *length*. Returns ``0`` on success." +msgstr "" + +msgid "" +"If *length* is ``NULL``, the bytes object may not contain embedded null " +"bytes; if it does, the function returns ``-1`` and a :exc:`ValueError` is " +"raised." +msgstr "" + +msgid "" +"The buffer refers to an internal buffer of *obj*, which includes an " +"additional null byte at the end (not counted in *length*). The data must " +"not be modified in any way, unless the object was just created using " +"``PyBytes_FromStringAndSize(NULL, size)``. It must not be deallocated. If " +"*obj* is not a bytes object at all, :c:func:`PyBytes_AsStringAndSize` " +"returns ``-1`` and raises :exc:`TypeError`." +msgstr "" + +msgid "" +"Previously, :exc:`TypeError` was raised when embedded null bytes were " +"encountered in the bytes object." +msgstr "" + +msgid "" +"Create a new bytes object in *\\*bytes* containing the contents of *newpart* " +"appended to *bytes*; the caller will own the new reference. The reference " +"to the old value of *bytes* will be stolen. If the new object cannot be " +"created, the old reference to *bytes* will still be discarded and the value " +"of *\\*bytes* will be set to ``NULL``; the appropriate exception will be set." +msgstr "" + +msgid "" +"If *newpart* implements the buffer protocol, then the buffer must not be " +"mutated while the new bytes object is being created." +msgstr "" + +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 "" + +msgid "Similar to ``sep.join(iterable)`` in Python." +msgstr "" + +msgid "" +"*sep* must be Python :class:`bytes` object. (Note that :c:func:" +"`PyUnicode_Join` accepts ``NULL`` separator and treats it as a space, " +"whereas :c:func:`PyBytes_Join` doesn't accept ``NULL`` separator.)" +msgstr "" + +msgid "" +"*iterable* must be an iterable object yielding objects that implement the :" +"ref:`buffer protocol `." +msgstr "" + +msgid "" +"On success, return a new :class:`bytes` object. On error, set an exception " +"and return ``NULL``." +msgstr "" + +msgid "" +"If *iterable* objects implement the buffer protocol, then the buffers must " +"not be mutated while the new bytes object is being created." +msgstr "" + +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 " +"one, only more efficiently. Pass the address of an existing bytes object as " +"an lvalue (it may be written into), and the new size desired. On success, " +"*\\*bytes* holds the resized bytes object and ``0`` is returned; the address " +"in *\\*bytes* may differ from its input value. If the reallocation fails, " +"the original bytes object at *\\*bytes* is deallocated, *\\*bytes* is set to " +"``NULL``, :exc:`MemoryError` is set, and ``-1`` is returned." +msgstr "" + +msgid "Use the :c:type:`PyBytesWriter` API instead." +msgstr "" + +msgid "" +"Get the string representation of *bytes*. This function is currently used to " +"implement :meth:`!bytes.__repr__` in Python." +msgstr "" + +msgid "" +"This function does not do type checking; it is undefined behavior to pass " +"*bytes* as a non-bytes object or ``NULL``." +msgstr "" + +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*. " +"For example, the byte string ``'Python'`` would be represented as " +"``b\"'Python'\"`` when *smartquotes* is true, or ``b'\\'Python\\''`` when it " +"is false." +msgstr "" + +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 "" + +msgid "" +"Unescape a backslash-escaped string *s*. *s* must not be ``NULL``. *len* " +"must be the size of *s*." +msgstr "" + +msgid "" +"*errors* must be one of ``\"strict\"``, ``\"replace\"``, or ``\"ignore\"``. " +"If *errors* is ``NULL``, then ``\"strict\"`` is used by default." +msgstr "" + +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 "" + +msgid "*unicode* and *recode_encoding* are now unused." +msgstr "" + +msgid "PyBytesWriter" +msgstr "" + +msgid "" +"The :c:type:`PyBytesWriter` API can be used to create a Python :class:" +"`bytes` object." +msgstr "" + +msgid "A bytes writer instance." +msgstr "" + +msgid "" +"The API is **not thread safe**: a writer should only be used by a single " +"thread at the same time." +msgstr "" + +msgid "" +"The instance must be destroyed by :c:func:`PyBytesWriter_Finish` on success, " +"or :c:func:`PyBytesWriter_Discard` on error." +msgstr "" + +msgid "Create, Finish, Discard" +msgstr "" + +msgid "Create a :c:type:`PyBytesWriter` to write *size* bytes." +msgstr "" + +msgid "" +"If *size* is greater than zero, allocate *size* bytes, and set the writer " +"size to *size*. The caller is responsible to write *size* bytes using :c:" +"func:`PyBytesWriter_GetData`. This function does not overallocate." +msgstr "" + +msgid "On error, set an exception and return ``NULL``." +msgstr "" + +msgid "*size* must be positive or zero." +msgstr "" + +msgid "" +"Finish a :c:type:`PyBytesWriter` created by :c:func:`PyBytesWriter_Create`." +msgstr "" + +msgid "" +"On success, return a Python :class:`bytes` object. On error, set an " +"exception and return ``NULL``." +msgstr "" + +msgid "" +"The writer instance is invalid after the call in any case. No API can be " +"called on the writer after :c:func:`PyBytesWriter_Finish`." +msgstr "" + +msgid "" +"Similar to :c:func:`PyBytesWriter_Finish`, but resize the writer to *size* " +"bytes before creating the :class:`bytes` object." +msgstr "" + +msgid "" +"Similar to :c:func:`PyBytesWriter_Finish`, but resize the writer using *buf* " +"pointer before creating the :class:`bytes` object." +msgstr "" + +msgid "" +"Set an exception and return ``NULL`` if *buf* pointer is outside the " +"internal buffer bounds." +msgstr "" + +msgid "Function pseudo-code::" +msgstr "" + +msgid "" +"Py_ssize_t size = (char*)buf - (char*)PyBytesWriter_GetData(writer);\n" +"return PyBytesWriter_FinishWithSize(writer, size);" +msgstr "" + +msgid "" +"Discard a :c:type:`PyBytesWriter` created by :c:func:`PyBytesWriter_Create`." +msgstr "" + +msgid "Do nothing if *writer* is ``NULL``." +msgstr "" + +msgid "" +"The writer instance is invalid after the call. No API can be called on the " +"writer after :c:func:`PyBytesWriter_Discard`." +msgstr "" + +msgid "High-level API" +msgstr "" + +msgid "" +"Grow the *writer* internal buffer by *size* bytes, write *size* bytes of " +"*bytes* at the *writer* end, and add *size* to the *writer* size." +msgstr "" + +msgid "" +"If *size* is equal to ``-1``, call ``strlen(bytes)`` to get the string " +"length." +msgstr "" + +msgid "On success, return ``0``. On error, set an exception and return ``-1``." +msgstr "" + +msgid "" +"Similar to :c:func:`PyBytes_FromFormat`, but write the output directly at " +"the writer end. Grow the writer internal buffer on demand. Then add the " +"written size to the writer size." +msgstr "" + +msgid "Getters" +msgstr "" + +msgid "Get the writer size." +msgstr "" + +msgid "" +"The function does not invalidate pointers returned by :c:func:" +"`PyBytesWriter_GetData`." +msgstr "" + +msgid "The function cannot fail." +msgstr "" + +msgid "Get the writer data: start of the internal buffer." +msgstr "" + +msgid "" +"The pointer remains valid until a :c:type:`PyBytesWriter` function other " +"than :c:func:`PyBytesWriter_GetData` or :c:func:`PyBytesWriter_GetSize` is " +"called on *writer*." +msgstr "" + +msgid "Low-level API" +msgstr "" + +msgid "" +"Resize the writer to *size* bytes. It can be used to enlarge or to shrink " +"the writer. This function typically overallocates to achieve amortized " +"performance when resizing multiple times." +msgstr "" + +msgid "Newly allocated bytes are left uninitialized." +msgstr "" + +msgid "" +"Resize the writer by adding *grow* bytes to the current writer size. This " +"function typically overallocates to achieve amortized performance when " +"resizing multiple times." +msgstr "" + +msgid "*size* can be negative to shrink the writer." +msgstr "" + +msgid "" +"Similar to :c:func:`PyBytesWriter_Grow`, but update also the *buf* pointer." +msgstr "" + +msgid "" +"The *buf* pointer is moved if the internal buffer is moved in memory. The " +"*buf* relative position within the internal buffer is left unchanged." +msgstr "" + +msgid "*buf* must not be ``NULL``." +msgstr "" + +msgid "" +"Py_ssize_t pos = (char*)buf - (char*)PyBytesWriter_GetData(writer);\n" +"if (PyBytesWriter_Grow(writer, size) < 0) {\n" +" return NULL;\n" +"}\n" +"return (char*)PyBytesWriter_GetData(writer) + pos;" +msgstr "" + +msgid "object" +msgstr "" + +msgid "bytes" +msgstr "" diff --git a/c-api/call.po b/c-api/call.po new file mode 100644 index 00000000..df40f42d --- /dev/null +++ b/c-api/call.po @@ -0,0 +1,473 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Call Protocol" +msgstr "" + +msgid "" +"CPython supports two different calling protocols: *tp_call* and vectorcall." +msgstr "" + +msgid "The *tp_call* Protocol" +msgstr "" + +msgid "" +"Instances of classes that set :c:member:`~PyTypeObject.tp_call` are " +"callable. The signature of the slot is::" +msgstr "" + +msgid "" +"PyObject *tp_call(PyObject *callable, PyObject *args, PyObject *kwargs);" +msgstr "" + +msgid "" +"A call is made using a tuple for the positional arguments and a dict for the " +"keyword arguments, similarly to ``callable(*args, **kwargs)`` in Python " +"code. *args* must be non-NULL (use an empty tuple if there are no arguments) " +"but *kwargs* may be *NULL* if there are no keyword arguments." +msgstr "" + +msgid "" +"This convention is not only used by *tp_call*: :c:member:`~PyTypeObject." +"tp_new` and :c:member:`~PyTypeObject.tp_init` also pass arguments this way." +msgstr "" + +msgid "" +"To call an object, use :c:func:`PyObject_Call` or another :ref:`call API " +"`." +msgstr "" + +msgid "The Vectorcall Protocol" +msgstr "" + +msgid "" +"The vectorcall protocol was introduced in :pep:`590` as an additional " +"protocol for making calls more efficient." +msgstr "" + +msgid "" +"As rule of thumb, CPython will prefer the vectorcall for internal calls if " +"the callable supports it. However, this is not a hard rule. Additionally, " +"some third-party extensions use *tp_call* directly (rather than using :c:" +"func:`PyObject_Call`). Therefore, a class supporting vectorcall must also " +"implement :c:member:`~PyTypeObject.tp_call`. Moreover, the callable must " +"behave the same regardless of which protocol is used. The recommended way to " +"achieve this is by setting :c:member:`~PyTypeObject.tp_call` to :c:func:" +"`PyVectorcall_Call`. This bears repeating:" +msgstr "" + +msgid "" +"A class supporting vectorcall **must** also implement :c:member:" +"`~PyTypeObject.tp_call` with the same semantics." +msgstr "" + +msgid "" +"The :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag is now removed from a class " +"when the class's :py:meth:`~object.__call__` method is reassigned. (This " +"internally sets :c:member:`~PyTypeObject.tp_call` only, and thus may make it " +"behave differently than the vectorcall function.) In earlier Python " +"versions, vectorcall should only be used with :c:macro:`immutable " +"` or static types." +msgstr "" + +msgid "" +"A class should not implement vectorcall if that would be slower than " +"*tp_call*. For example, if the callee needs to convert the arguments to an " +"args tuple and kwargs dict anyway, then there is no point in implementing " +"vectorcall." +msgstr "" + +msgid "" +"Classes can implement the vectorcall protocol by enabling the :c:macro:" +"`Py_TPFLAGS_HAVE_VECTORCALL` flag and setting :c:member:`~PyTypeObject." +"tp_vectorcall_offset` to the offset inside the object structure where a " +"*vectorcallfunc* appears. This is a pointer to a function with the following " +"signature:" +msgstr "" + +msgid "*callable* is the object being called." +msgstr "" + +msgid "" +"*args* is a C array consisting of the positional arguments followed by the" +msgstr "" + +msgid "" +"values of the keyword arguments. This can be *NULL* if there are no " +"arguments." +msgstr "" + +msgid "*nargsf* is the number of positional arguments plus possibly the" +msgstr "" + +msgid "" +":c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET` flag. To get the actual number of " +"positional arguments from *nargsf*, use :c:func:`PyVectorcall_NARGS`." +msgstr "" + +msgid "*kwnames* is a tuple containing the names of the keyword arguments;" +msgstr "" + +msgid "" +"in other words, the keys of the kwargs dict. These names must be strings " +"(instances of ``str`` or a subclass) and they must be unique. If there are " +"no keyword arguments, then *kwnames* can instead be *NULL*." +msgstr "" + +msgid "" +"If this flag is set in a vectorcall *nargsf* argument, the callee is allowed " +"to temporarily change ``args[-1]``. In other words, *args* points to " +"argument 1 (not 0) in the allocated vector. The callee must restore the " +"value of ``args[-1]`` before returning." +msgstr "" + +msgid "" +"For :c:func:`PyObject_VectorcallMethod`, this flag means instead that " +"``args[0]`` may be changed." +msgstr "" + +msgid "" +"Whenever they can do so cheaply (without additional allocation), callers are " +"encouraged to use :c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET`. Doing so will " +"allow callables such as bound methods to make their onward calls (which " +"include a prepended *self* argument) very efficiently." +msgstr "" + +msgid "" +"To call an object that implements vectorcall, use a :ref:`call API ` function as with any other callable. :c:func:`PyObject_Vectorcall` " +"will usually be most efficient." +msgstr "" + +msgid "Recursion Control" +msgstr "" + +msgid "" +"When using *tp_call*, callees do not need to worry about :ref:`recursion " +"`: CPython uses :c:func:`Py_EnterRecursiveCall` and :c:func:" +"`Py_LeaveRecursiveCall` for calls made using *tp_call*." +msgstr "" + +msgid "" +"For efficiency, this is not the case for calls done using vectorcall: the " +"callee should use *Py_EnterRecursiveCall* and *Py_LeaveRecursiveCall* if " +"needed." +msgstr "" + +msgid "Vectorcall Support API" +msgstr "" + +msgid "" +"Given a vectorcall *nargsf* argument, return the actual number of arguments. " +"Currently equivalent to::" +msgstr "" + +msgid "(Py_ssize_t)(nargsf & ~PY_VECTORCALL_ARGUMENTS_OFFSET)" +msgstr "" + +msgid "" +"However, the function ``PyVectorcall_NARGS`` should be used to allow for " +"future extensions." +msgstr "" + +msgid "" +"If *op* does not support the vectorcall protocol (either because the type " +"does not or because the specific instance does not), return *NULL*. " +"Otherwise, return the vectorcall function pointer stored in *op*. This " +"function never raises an exception." +msgstr "" + +msgid "" +"This is mostly useful to check whether or not *op* supports vectorcall, " +"which can be done by checking ``PyVectorcall_Function(op) != NULL``." +msgstr "" + +msgid "" +"Call *callable*'s :c:type:`vectorcallfunc` with positional and keyword " +"arguments given in a tuple and dict, respectively." +msgstr "" + +msgid "" +"This is a specialized function, intended to be put in the :c:member:" +"`~PyTypeObject.tp_call` slot or be used in an implementation of ``tp_call``. " +"It does not check the :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag and it does " +"not fall back to ``tp_call``." +msgstr "" + +msgid "Object Calling API" +msgstr "" + +msgid "" +"Various functions are available for calling a Python object. Each converts " +"its arguments to a convention supported by the called object – either " +"*tp_call* or vectorcall. In order to do as little conversion as possible, " +"pick one that best fits the format of data you have available." +msgstr "" + +msgid "" +"The following table summarizes the available functions; please see " +"individual documentation for details." +msgstr "" + +msgid "Function" +msgstr "" + +msgid "callable" +msgstr "" + +msgid "args" +msgstr "" + +msgid "kwargs" +msgstr "" + +msgid ":c:func:`PyObject_Call`" +msgstr "" + +msgid "``PyObject *``" +msgstr "" + +msgid "tuple" +msgstr "" + +msgid "dict/``NULL``" +msgstr "" + +msgid ":c:func:`PyObject_CallNoArgs`" +msgstr "" + +msgid "---" +msgstr "" + +msgid ":c:func:`PyObject_CallOneArg`" +msgstr "" + +msgid "1 object" +msgstr "" + +msgid ":c:func:`PyObject_CallObject`" +msgstr "" + +msgid "tuple/``NULL``" +msgstr "" + +msgid ":c:func:`PyObject_CallFunction`" +msgstr "" + +msgid "format" +msgstr "" + +msgid ":c:func:`PyObject_CallMethod`" +msgstr "" + +msgid "obj + ``char*``" +msgstr "" + +msgid ":c:func:`PyObject_CallFunctionObjArgs`" +msgstr "" + +msgid "variadic" +msgstr "" + +msgid ":c:func:`PyObject_CallMethodObjArgs`" +msgstr "" + +msgid "obj + name" +msgstr "" + +msgid ":c:func:`PyObject_CallMethodNoArgs`" +msgstr "" + +msgid ":c:func:`PyObject_CallMethodOneArg`" +msgstr "" + +msgid ":c:func:`PyObject_Vectorcall`" +msgstr "" + +msgid "vectorcall" +msgstr "" + +msgid ":c:func:`PyObject_VectorcallDict`" +msgstr "" + +msgid ":c:func:`PyObject_VectorcallMethod`" +msgstr "" + +msgid "arg + name" +msgstr "" + +msgid "" +"Call a callable Python object *callable*, with arguments given by the tuple " +"*args*, and named arguments given by the dictionary *kwargs*." +msgstr "" + +msgid "" +"*args* must not be *NULL*; use an empty tuple if no arguments are needed. If " +"no named arguments are needed, *kwargs* can be *NULL*." +msgstr "" + +msgid "" +"Return the result of the call on success, or raise an exception and return " +"*NULL* on failure." +msgstr "" + +msgid "" +"This is the equivalent of the Python expression: ``callable(*args, " +"**kwargs)``." +msgstr "" + +msgid "" +"Call a callable Python object *callable* without any arguments. It is the " +"most efficient way to call a callable Python object without any argument." +msgstr "" + +msgid "" +"Call a callable Python object *callable* with exactly 1 positional argument " +"*arg* and no keyword arguments." +msgstr "" + +msgid "" +"Call a callable Python object *callable*, with arguments given by the tuple " +"*args*. If no arguments are needed, then *args* can be *NULL*." +msgstr "" + +msgid "This is the equivalent of the Python expression: ``callable(*args)``." +msgstr "" + +msgid "" +"Call a callable Python object *callable*, with a variable number of C " +"arguments. The C arguments are described using a :c:func:`Py_BuildValue` " +"style format string. The format can be *NULL*, indicating that no arguments " +"are provided." +msgstr "" + +msgid "" +"Note that if you only pass :c:expr:`PyObject *` args, :c:func:" +"`PyObject_CallFunctionObjArgs` is a faster alternative." +msgstr "" + +msgid "The type of *format* was changed from ``char *``." +msgstr "" + +msgid "" +"Call the method named *name* of object *obj* with a variable number of C " +"arguments. The C arguments are described by a :c:func:`Py_BuildValue` " +"format string that should produce a tuple." +msgstr "" + +msgid "The format can be *NULL*, indicating that no arguments are provided." +msgstr "" + +msgid "" +"This is the equivalent of the Python expression: ``obj.name(arg1, " +"arg2, ...)``." +msgstr "" + +msgid "" +"Note that if you only pass :c:expr:`PyObject *` args, :c:func:" +"`PyObject_CallMethodObjArgs` is a faster alternative." +msgstr "" + +msgid "The types of *name* and *format* were changed from ``char *``." +msgstr "" + +msgid "" +"Call a callable Python object *callable*, with a variable number of :c:expr:" +"`PyObject *` arguments. The arguments are provided as a variable number of " +"parameters followed by *NULL*." +msgstr "" + +msgid "" +"This is the equivalent of the Python expression: ``callable(arg1, " +"arg2, ...)``." +msgstr "" + +msgid "" +"Call a method of the Python object *obj*, where the name of the method is " +"given as a Python string object in *name*. It is called with a variable " +"number of :c:expr:`PyObject *` arguments. The arguments are provided as a " +"variable number of parameters followed by *NULL*." +msgstr "" + +msgid "" +"Call a method of the Python object *obj* without arguments, where the name " +"of the method is given as a Python string object in *name*." +msgstr "" + +msgid "" +"Call a method of the Python object *obj* with a single positional argument " +"*arg*, where the name of the method is given as a Python string object in " +"*name*." +msgstr "" + +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 "" + +msgid "as ``_PyObject_Vectorcall``" +msgstr "" + +msgid "" +"Renamed to the current name, without the leading underscore. The old " +"provisional name is :term:`soft deprecated`." +msgstr "" + +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 "" + +msgid "" +"Regardless of which protocol is used internally, a conversion of arguments " +"needs to be done. Therefore, this function should only be used if the caller " +"already has a dictionary ready to use for the keyword arguments, but not a " +"tuple for the positional arguments." +msgstr "" + +msgid "" +"Call a method using the vectorcall calling convention. The name of the " +"method is given as a Python string *name*. The object whose method is called " +"is *args[0]*, and the *args* array starting at *args[1]* represents the " +"arguments of the call. There must be at least one positional argument. " +"*nargsf* is the number of positional arguments including *args[0]*, plus :c:" +"macro:`PY_VECTORCALL_ARGUMENTS_OFFSET` if the value of ``args[0]`` may " +"temporarily be changed. Keyword arguments can be passed just like in :c:func:" +"`PyObject_Vectorcall`." +msgstr "" + +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 "" + +msgid "Call Support API" +msgstr "" + +msgid "" +"Determine if the object *o* is callable. Return ``1`` if the object is " +"callable and ``0`` otherwise. This function always succeeds." +msgstr "" diff --git a/c-api/capsule.po b/c-api/capsule.po new file mode 100644 index 00000000..406624ff --- /dev/null +++ b/c-api/capsule.po @@ -0,0 +1,203 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Capsules" +msgstr "" + +msgid "" +"Refer to :ref:`using-capsules` for more information on using these objects." +msgstr "" + +msgid "" +"This subtype of :c:type:`PyObject` represents an opaque value, useful for C " +"extension modules which need to pass an opaque value (as a :c:expr:`void*` " +"pointer) through Python code to other C code. It is often used to make a C " +"function pointer defined in one module available to other modules, so the " +"regular import mechanism can be used to access C APIs defined in dynamically " +"loaded modules." +msgstr "" + +msgid "" +"The type object corresponding to capsule objects. This is the same object " +"as :class:`types.CapsuleType` in the Python layer." +msgstr "" + +msgid "The type of a destructor callback for a capsule. Defined as::" +msgstr "" + +msgid "typedef void (*PyCapsule_Destructor)(PyObject *);" +msgstr "" + +msgid "" +"See :c:func:`PyCapsule_New` for the semantics of PyCapsule_Destructor " +"callbacks." +msgstr "" + +msgid "" +"Return true if its argument is a :c:type:`PyCapsule`. This function always " +"succeeds." +msgstr "" + +msgid "" +"Create a :c:type:`PyCapsule` encapsulating the *pointer*. The *pointer* " +"argument may not be ``NULL``." +msgstr "" + +msgid "On failure, set an exception and return ``NULL``." +msgstr "" + +msgid "" +"The *name* string may either be ``NULL`` or a pointer to a valid C string. " +"If non-``NULL``, this string must outlive the capsule. (Though it is " +"permitted to free it inside the *destructor*.)" +msgstr "" + +msgid "" +"If the *destructor* argument is not ``NULL``, it will be called with the " +"capsule as its argument when it is destroyed." +msgstr "" + +msgid "" +"If this capsule will be stored as an attribute of a module, the *name* " +"should be specified as ``modulename.attributename``. This will enable other " +"modules to import the capsule using :c:func:`PyCapsule_Import`." +msgstr "" + +msgid "" +"Retrieve the *pointer* stored in the capsule. On failure, set an exception " +"and return ``NULL``." +msgstr "" + +msgid "" +"The *name* parameter must compare exactly to the name stored in the capsule. " +"If the name stored in the capsule is ``NULL``, the *name* passed in must " +"also be ``NULL``. Python uses the C function :c:func:`!strcmp` to compare " +"capsule names." +msgstr "" + +msgid "" +"Return the current destructor stored in the capsule. On failure, set an " +"exception and return ``NULL``." +msgstr "" + +msgid "" +"It is legal for a capsule to have a ``NULL`` destructor. This makes a " +"``NULL`` return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` or :" +"c:func:`PyErr_Occurred` to disambiguate." +msgstr "" + +msgid "" +"Return the current context stored in the capsule. On failure, set an " +"exception and return ``NULL``." +msgstr "" + +msgid "" +"It is legal for a capsule to have a ``NULL`` context. This makes a ``NULL`` " +"return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` or :c:func:" +"`PyErr_Occurred` to disambiguate." +msgstr "" + +msgid "" +"Return the current name stored in the capsule. On failure, set an exception " +"and return ``NULL``." +msgstr "" + +msgid "" +"It is legal for a capsule to have a ``NULL`` name. This makes a ``NULL`` " +"return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` or :c:func:" +"`PyErr_Occurred` to disambiguate." +msgstr "" + +msgid "" +"Import a pointer to a C object from a capsule attribute in a module. The " +"*name* parameter should specify the full name to the attribute, as in " +"``module.attribute``. The *name* stored in the capsule must match this " +"string exactly." +msgstr "" + +msgid "" +"This function splits *name* on the ``.`` character, and imports the first " +"element. It then processes further elements using attribute lookups." +msgstr "" + +msgid "" +"Return the capsule's internal *pointer* on success. On failure, set an " +"exception and return ``NULL``." +msgstr "" + +msgid "" +"If *name* points to an attribute of some submodule or subpackage, this " +"submodule or subpackage must be previously imported using other means (for " +"example, by using :c:func:`PyImport_ImportModule`) for the attribute lookups " +"to succeed." +msgstr "" + +msgid "*no_block* has no effect anymore." +msgstr "" + +msgid "" +"Determines whether or not *capsule* is a valid capsule. A valid capsule is " +"non-``NULL``, passes :c:func:`PyCapsule_CheckExact`, has a non-``NULL`` " +"pointer stored in it, and its internal name matches the *name* parameter. " +"(See :c:func:`PyCapsule_GetPointer` for information on how capsule names are " +"compared.)" +msgstr "" + +msgid "" +"In other words, if :c:func:`PyCapsule_IsValid` returns a true value, calls " +"to any of the accessors (any function starting with ``PyCapsule_Get``) are " +"guaranteed to succeed." +msgstr "" + +msgid "" +"Return a nonzero value if the object is valid and matches the name passed " +"in. Return ``0`` otherwise. This function will not fail." +msgstr "" + +msgid "Set the context pointer inside *capsule* to *context*." +msgstr "" + +msgid "" +"Return ``0`` on success. Return nonzero and set an exception on failure." +msgstr "" + +msgid "Set the destructor inside *capsule* to *destructor*." +msgstr "" + +msgid "" +"Set the name inside *capsule* to *name*. If non-``NULL``, the name must " +"outlive the capsule. If the previous *name* stored in the capsule was not " +"``NULL``, no attempt is made to free it." +msgstr "" + +msgid "" +"Set the void pointer inside *capsule* to *pointer*. The pointer may not be " +"``NULL``." +msgstr "" + +msgid "object" +msgstr "" + +msgid "Capsule" +msgstr "" diff --git a/c-api/cell.po b/c-api/cell.po new file mode 100644 index 00000000..065d0274 --- /dev/null +++ b/c-api/cell.po @@ -0,0 +1,80 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Cell Objects" +msgstr "" + +msgid "" +"\"Cell\" objects are used to implement variables referenced by multiple " +"scopes. For each such variable, a cell object is created to store the value; " +"the local variables of each stack frame that references the value contain a " +"reference to the cells from outer scopes which also use that variable. When " +"the value is accessed, the value contained in the cell is used instead of " +"the cell object itself. This de-referencing of the cell object requires " +"support from the generated byte-code; these are not automatically de-" +"referenced when accessed. Cell objects are not likely to be useful elsewhere." +msgstr "" + +msgid "The C structure used for cell objects." +msgstr "" + +msgid "The type object corresponding to cell objects." +msgstr "" + +msgid "" +"Return true if *ob* is a cell object; *ob* must not be ``NULL``. This " +"function always succeeds." +msgstr "" + +msgid "" +"Create and return a new cell object containing the value *ob*. The parameter " +"may be ``NULL``." +msgstr "" + +msgid "" +"Return the contents of the cell *cell*, which can be ``NULL``. If *cell* is " +"not a cell object, returns ``NULL`` with an exception set." +msgstr "" + +msgid "" +"Return the contents of the cell *cell*, but without checking that *cell* is " +"non-``NULL`` and a cell object." +msgstr "" + +msgid "" +"Set the contents of the cell object *cell* to *value*. This releases the " +"reference to any current content of the cell. *value* may be ``NULL``. " +"*cell* must be non-``NULL``." +msgstr "" + +msgid "" +"On success, return ``0``. If *cell* is not a cell object, set an exception " +"and return ``-1``." +msgstr "" + +msgid "" +"Sets the value of the cell object *cell* to *value*. No reference counts " +"are adjusted, and no checks are made for safety; *cell* must be non-``NULL`` " +"and must be a cell object." +msgstr "" diff --git a/c-api/code.po b/c-api/code.po new file mode 100644 index 00000000..9a43bd9d --- /dev/null +++ b/c-api/code.po @@ -0,0 +1,395 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Code Objects" +msgstr "" + +msgid "" +"Code objects are a low-level detail of the CPython implementation. Each one " +"represents a chunk of executable code that hasn't yet been bound into a " +"function." +msgstr "" + +msgid "" +"The C structure of the objects used to describe code objects. The fields of " +"this type are subject to change at any time." +msgstr "" + +msgid "" +"This is an instance of :c:type:`PyTypeObject` representing the Python :ref:" +"`code object `." +msgstr "" + +msgid "" +"Return true if *co* is a :ref:`code object `. This function " +"always succeeds." +msgstr "" + +msgid "" +"Return the number of :term:`free (closure) variables ` in " +"a code object." +msgstr "" + +msgid "" +"Return the position of the first :term:`free (closure) variable ` in a code object." +msgstr "" + +msgid "" +"Renamed from ``PyCode_GetFirstFree`` as part of :ref:`unstable-c-api`. The " +"old name is deprecated, but will remain available until the signature " +"changes again." +msgstr "" + +msgid "" +"Return a new code object. If you need a dummy code object to create a " +"frame, use :c:func:`PyCode_NewEmpty` instead." +msgstr "" + +msgid "" +"Since the definition of the bytecode changes often, calling :c:func:" +"`PyUnstable_Code_New` directly can bind you to a precise Python version." +msgstr "" + +msgid "" +"The many arguments of this function are inter-dependent in complex ways, " +"meaning that subtle changes to values are likely to result in incorrect " +"execution or VM crashes. Use this function only with extreme care." +msgstr "" + +msgid "Added ``qualname`` and ``exceptiontable`` parameters." +msgstr "" + +msgid "" +"Renamed from ``PyCode_New`` as part of :ref:`unstable-c-api`. The old name " +"is deprecated, but will remain available until the signature changes again." +msgstr "" + +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 "" + +msgid "as ``PyCode_NewWithPosOnlyArgs``" +msgstr "" + +msgid "Added ``qualname`` and ``exceptiontable`` parameters." +msgstr "" + +msgid "" +"Renamed to ``PyUnstable_Code_NewWithPosOnlyArgs``. The old name is " +"deprecated, but will remain available until the signature changes again." +msgstr "" + +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 "" + +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 "" + +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 "" + +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 "" + +msgid "Returns ``1`` if the function succeeds and 0 otherwise." +msgstr "" + +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 "" + +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 "" + +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 "" + +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 " +"variables that are referenced by nested functions. On error, ``NULL`` is " +"returned and an exception is raised." +msgstr "" + +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:" +"`free (closure) variables `. On error, ``NULL`` is " +"returned and an exception is raised." +msgstr "" + +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 " +"of error (e.g. no more watcher IDs available), return ``-1`` and set an " +"exception." +msgstr "" + +msgid "" +"Clear watcher identified by *watcher_id* previously returned from :c:func:" +"`PyCode_AddWatcher` for the current interpreter. Return ``0`` on success, or " +"``-1`` and set an exception on error (e.g. if the given *watcher_id* was " +"never registered.)" +msgstr "" + +msgid "" +"Enumeration of possible code object watcher events: - " +"``PY_CODE_EVENT_CREATE`` - ``PY_CODE_EVENT_DESTROY``" +msgstr "" + +msgid "Type of a code object watcher callback function." +msgstr "" + +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 " +"the destruction of *co* takes place, so the prior state of *co* can be " +"inspected." +msgstr "" + +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 " +"from being freed at this time. When the resurrected object is destroyed " +"later, any watcher callbacks active at that time will be called again." +msgstr "" + +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 " +"and timing of creation and destruction of code objects. While changes in " +"these details may result in differences observable by watchers (including " +"whether a callback is invoked or not), it does not change the semantics of " +"the Python code being executed." +msgstr "" + +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 "" + +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 " +"set. This means the callback may not call any other API that can set an " +"exception unless it saves and clears the exception state first, and restores " +"it before returning." +msgstr "" + +msgid "This is a function that does nothing." +msgstr "" + +msgid "" +"Prior to Python 3.10, this function would perform basic optimizations to a " +"code object." +msgstr "" + +msgid "This function now does nothing." +msgstr "" + +msgid "Code Object Flags" +msgstr "" + +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:" +"`PyObject_GetAttrString`), and set using a *flags* argument to :c:func:" +"`PyUnstable_Code_New` and similar functions." +msgstr "" + +msgid "" +"Flags whose names start with ``CO_FUTURE_`` correspond to features normally " +"selectable by :ref:`future statements `. These flags can be used in :" +"c:member:`PyCompilerFlags.cf_flags`. Note that many ``CO_FUTURE_`` flags are " +"mandatory in current versions of Python, and setting them has no effect." +msgstr "" + +msgid "" +"The following flags are available. For their meaning, see the linked " +"documentation of their Python equivalents." +msgstr "" + +msgid "Flag" +msgstr "" + +msgid "Meaning" +msgstr "" + +msgid ":py:data:`inspect.CO_OPTIMIZED`" +msgstr "" + +msgid ":py:data:`inspect.CO_NEWLOCALS`" +msgstr "" + +msgid ":py:data:`inspect.CO_VARARGS`" +msgstr "" + +msgid ":py:data:`inspect.CO_VARKEYWORDS`" +msgstr "" + +msgid ":py:data:`inspect.CO_NESTED`" +msgstr "" + +msgid ":py:data:`inspect.CO_GENERATOR`" +msgstr "" + +msgid ":py:data:`inspect.CO_COROUTINE`" +msgstr "" + +msgid ":py:data:`inspect.CO_ITERABLE_COROUTINE`" +msgstr "" + +msgid ":py:data:`inspect.CO_ASYNC_GENERATOR`" +msgstr "" + +msgid ":py:data:`inspect.CO_HAS_DOCSTRING`" +msgstr "" + +msgid ":py:data:`inspect.CO_METHOD`" +msgstr "" + +msgid "no effect (:py:data:`__future__.division`)" +msgstr "" + +msgid "no effect (:py:data:`__future__.absolute_import`)" +msgstr "" + +msgid "no effect (:py:data:`__future__.with_statement`)" +msgstr "" + +msgid "no effect (:py:data:`__future__.print_function`)" +msgstr "" + +msgid "no effect (:py:data:`__future__.unicode_literals`)" +msgstr "" + +msgid "no effect (:py:data:`__future__.generator_stop`)" +msgstr "" + +msgid ":py:data:`__future__.annotations`" +msgstr "" + +msgid "Extra information" +msgstr "" + +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 "" + +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 "" + +msgid "Return a new opaque index value used to adding data to code objects." +msgstr "" + +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 "" + +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 "" + +msgid "as ``_PyEval_RequestCodeExtraIndex``" +msgstr "som ``_PyEval_RequestCodeExtraIndex``" + +msgid "" +"Renamed to ``PyUnstable_Eval_RequestCodeExtraIndex``. The old private name " +"is deprecated, but will be available until the API changes." +msgstr "" + +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 "" + +msgid "" +"If no data was set under the index, set *extra* to ``NULL`` and return 0 " +"without setting an exception." +msgstr "" + +msgid "as ``_PyCode_GetExtra``" +msgstr "som ``_PyCode_GetExtra``" + +msgid "" +"Renamed to ``PyUnstable_Code_GetExtra``. The old private name is deprecated, " +"but will be available until the API changes." +msgstr "" + +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 "" + +msgid "as ``_PyCode_SetExtra``" +msgstr "som ``_PyCode_SetExtra``" + +msgid "" +"Renamed to ``PyUnstable_Code_SetExtra``. The old private name is deprecated, " +"but will be available until the API changes." +msgstr "" + +msgid "object" +msgstr "" + +msgid "code" +msgstr "" + +msgid "code object" +msgstr "" + +msgid "PyCode_New (C function)" +msgstr "" diff --git a/c-api/codec.po b/c-api/codec.po new file mode 100644 index 00000000..b715a3d3 --- /dev/null +++ b/c-api/codec.po @@ -0,0 +1,159 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Codec registry and support functions" +msgstr "" + +msgid "Register a new codec search function." +msgstr "" + +msgid "" +"As a side effect, this tries to load the :mod:`!encodings` package, if not " +"yet done, to make sure that it is always first in the list of search " +"functions." +msgstr "" + +msgid "" +"Unregister a codec search function and clear the registry's cache. If the " +"search function is not registered, do nothing. Return 0 on success. Raise an " +"exception and return -1 on error." +msgstr "" + +msgid "" +"Return ``1`` or ``0`` depending on whether there is a registered codec for " +"the given *encoding*. This function always succeeds." +msgstr "" + +msgid "Generic codec based encoding API." +msgstr "" + +msgid "" +"*object* is passed through the encoder function found for the given " +"*encoding* using the error handling method defined by *errors*. *errors* " +"may be ``NULL`` to use the default method defined for the codec. Raises a :" +"exc:`LookupError` if no encoder can be found." +msgstr "" + +msgid "Generic codec based decoding API." +msgstr "" + +msgid "" +"*object* is passed through the decoder function found for the given " +"*encoding* using the error handling method defined by *errors*. *errors* " +"may be ``NULL`` to use the default method defined for the codec. Raises a :" +"exc:`LookupError` if no decoder can be found." +msgstr "" + +msgid "Codec lookup API" +msgstr "" + +msgid "" +"In the following functions, the *encoding* string is looked up converted to " +"all lower-case characters, which makes encodings looked up through this " +"mechanism effectively case-insensitive. If no codec is found, a :exc:" +"`KeyError` is set and ``NULL`` returned." +msgstr "" + +msgid "Get an encoder function for the given *encoding*." +msgstr "" + +msgid "Get a decoder function for the given *encoding*." +msgstr "" + +msgid "" +"Get an :class:`~codecs.IncrementalEncoder` object for the given *encoding*." +msgstr "" + +msgid "" +"Get an :class:`~codecs.IncrementalDecoder` object for the given *encoding*." +msgstr "" + +msgid "" +"Get a :class:`~codecs.StreamReader` factory function for the given " +"*encoding*." +msgstr "" + +msgid "" +"Get a :class:`~codecs.StreamWriter` factory function for the given " +"*encoding*." +msgstr "" + +msgid "Registry API for Unicode encoding error handlers" +msgstr "" + +msgid "" +"Register the error handling callback function *error* under the given " +"*name*. This callback function will be called by a codec when it encounters " +"unencodable characters/undecodable bytes and *name* is specified as the " +"error parameter in the call to the encode/decode function." +msgstr "" + +msgid "" +"The callback gets a single argument, an instance of :exc:" +"`UnicodeEncodeError`, :exc:`UnicodeDecodeError` or :exc:" +"`UnicodeTranslateError` that holds information about the problematic " +"sequence of characters or bytes and their offset in the original string " +"(see :ref:`unicodeexceptions` for functions to extract this information). " +"The callback must either raise the given exception, or return a two-item " +"tuple containing the replacement for the problematic sequence, and an " +"integer giving the offset in the original string at which encoding/decoding " +"should be resumed." +msgstr "" + +msgid "Return ``0`` on success, ``-1`` on error." +msgstr "" + +msgid "" +"Lookup the error handling callback function registered under *name*. As a " +"special case ``NULL`` can be passed, in which case the error handling " +"callback for \"strict\" will be returned." +msgstr "" + +msgid "Raise *exc* as an exception." +msgstr "" + +msgid "Ignore the unicode error, skipping the faulty input." +msgstr "" + +msgid "Replace the unicode encode error with ``?`` or ``U+FFFD``." +msgstr "" + +msgid "Replace the unicode encode error with XML character references." +msgstr "" + +msgid "" +"Replace the unicode encode error with backslash escapes (``\\x``, ``\\u`` " +"and ``\\U``)." +msgstr "" + +msgid "Replace the unicode encode error with ``\\N{...}`` escapes." +msgstr "" + +msgid "Codec utility variables" +msgstr "" + +msgid "" +"A string constant containing the lowercase hexadecimal digits: " +"``\"0123456789abcdef\"``." +msgstr "" diff --git a/c-api/complex.po b/c-api/complex.po new file mode 100644 index 00000000..14a06374 --- /dev/null +++ b/c-api/complex.po @@ -0,0 +1,197 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-05 16:27+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Complex Number Objects" +msgstr "" + +msgid "" +"This subtype of :c:type:`PyObject` represents a Python complex number object." +msgstr "" + +msgid "" +"The complex number value, using the C :c:type:`Py_complex` representation." +msgstr "" + +msgid "" +"Use :c:func:`PyComplex_AsCComplex` and :c:func:`PyComplex_FromCComplex` to " +"convert a Python complex number to/from the C :c:type:`Py_complex` " +"representation." +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python complex number " +"type. It is the same object as :class:`complex` in the Python layer." +msgstr "" + +msgid "" +"Return true if its argument is a :c:type:`PyComplexObject` or a subtype of :" +"c:type:`PyComplexObject`. This function always succeeds." +msgstr "" + +msgid "" +"Return true if its argument is a :c:type:`PyComplexObject`, but not a " +"subtype of :c:type:`PyComplexObject`. This function always succeeds." +msgstr "" + +msgid "" +"Return a new :c:type:`PyComplexObject` object from *real* and *imag*. Return " +"``NULL`` with an exception set on error." +msgstr "" + +msgid "Return the real part of *op* as a C :c:expr:`double`." +msgstr "" + +msgid "" +"If *op* is not a Python complex number object but has a :meth:`~object." +"__complex__` method, this method will first be called to convert *op* to a " +"Python complex number object. If :meth:`!__complex__` is not defined then " +"it falls back to call :c:func:`PyFloat_AsDouble` and returns its result." +msgstr "" + +msgid "" +"Upon failure, this method returns ``-1.0`` with an exception set, so one " +"should call :c:func:`PyErr_Occurred` to check for errors." +msgstr "" + +msgid "Use :meth:`~object.__complex__` if available." +msgstr "" + +msgid "Return the imaginary part of *op* as a C :c:expr:`double`." +msgstr "" + +msgid "" +"If *op* is not a Python complex number object but has a :meth:`~object." +"__complex__` method, this method will first be called to convert *op* to a " +"Python complex number object. If :meth:`!__complex__` is not defined then " +"it falls back to call :c:func:`PyFloat_AsDouble` and returns ``0.0`` on " +"success." +msgstr "" + +msgid "" +"This C structure defines an export format for a Python complex number object." +msgstr "" + +msgid "The structure is defined as::" +msgstr "" + +msgid "" +"typedef struct {\n" +" double real;\n" +" double imag;\n" +"} Py_complex;" +msgstr "" + +msgid "" +"Create a new Python complex number object from a C :c:type:`Py_complex` " +"value. Return ``NULL`` with an exception set on error." +msgstr "" + +msgid "Return the :c:type:`Py_complex` value of the complex number *op*." +msgstr "" + +msgid "" +"If *op* is not a Python complex number object but has a :meth:`~object." +"__complex__` method, this method will first be called to convert *op* to a " +"Python complex number object. If :meth:`!__complex__` is not defined then " +"it falls back to :meth:`~object.__float__`. If :meth:`!__float__` is not " +"defined then it falls back to :meth:`~object.__index__`." +msgstr "" + +msgid "" +"Upon failure, this method returns :c:type:`Py_complex` with :c:member:" +"`~Py_complex.real` set to ``-1.0`` and with an exception set, so one should " +"call :c:func:`PyErr_Occurred` to check for errors." +msgstr "" + +msgid "Use :meth:`~object.__index__` if available." +msgstr "" + +msgid "Complex Numbers as C Structures" +msgstr "" + +msgid "" +"The API also provides functions for working with complex numbers, using the :" +"c:type:`Py_complex` representation. Note that the functions which accept " +"these structures as parameters and return them as results do so *by value* " +"rather than dereferencing them through pointers." +msgstr "" + +msgid "" +"Please note, that these functions are :term:`soft deprecated` since Python " +"3.15. Avoid using this API in a new code to do complex arithmetic: either " +"use the :ref:`Number Protocol ` API or use native complex types, " +"like :c:expr:`double complex`." +msgstr "" + +msgid "" +"Return the sum of two complex numbers, using the C :c:type:`Py_complex` " +"representation." +msgstr "" + +msgid "" +"Return the difference between two complex numbers, using the C :c:type:" +"`Py_complex` representation." +msgstr "" + +msgid "" +"Return the negation of the complex number *num*, using the C :c:type:" +"`Py_complex` representation." +msgstr "" + +msgid "" +"Return the product of two complex numbers, using the C :c:type:`Py_complex` " +"representation." +msgstr "" + +msgid "" +"Return the quotient of two complex numbers, using the C :c:type:`Py_complex` " +"representation." +msgstr "" + +msgid "" +"If *divisor* is null, this method returns zero and sets :c:data:`errno` to :" +"c:macro:`!EDOM`." +msgstr "" + +msgid "" +"Return the exponentiation of *num* by *exp*, using the C :c:type:" +"`Py_complex` representation." +msgstr "" + +msgid "" +"If *num* is null and *exp* is not a positive real number, this method " +"returns zero and sets :c:data:`errno` to :c:macro:`!EDOM`." +msgstr "" + +msgid "Set :c:data:`errno` to :c:macro:`!ERANGE` on overflows." +msgstr "" + +msgid "Return the absolute value of the complex number *num*." +msgstr "" + +msgid "object" +msgstr "" + +msgid "complex number" +msgstr "" diff --git a/c-api/concrete.po b/c-api/concrete.po new file mode 100644 index 00000000..1196239a --- /dev/null +++ b/c-api/concrete.po @@ -0,0 +1,86 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Concrete Objects Layer" +msgstr "" + +msgid "" +"The functions in this chapter are specific to certain Python object types. " +"Passing them an object of the wrong type is not a good idea; if you receive " +"an object from a Python program and you are not sure that it has the right " +"type, you must perform a type check first; for example, to check that an " +"object is a dictionary, use :c:func:`PyDict_Check`. The chapter is " +"structured like the \"family tree\" of Python object types." +msgstr "" + +msgid "" +"While the functions described in this chapter carefully check the type of " +"the objects which are passed in, many of them do not check for ``NULL`` " +"being passed instead of a valid object. Allowing ``NULL`` to be passed in " +"can cause memory access violations and immediate termination of the " +"interpreter." +msgstr "" + +msgid "Fundamental Objects" +msgstr "" + +msgid "" +"This section describes Python type objects and the singleton object ``None``." +msgstr "" + +msgid "Numeric Objects" +msgstr "Numeriska objekt" + +msgid "Sequence Objects" +msgstr "Sekvensobjekt" + +msgid "" +"Generic operations on sequence objects were discussed in the previous " +"chapter; this section deals with the specific kinds of sequence objects that " +"are intrinsic to the Python language." +msgstr "" + +msgid "Container Objects" +msgstr "" + +msgid "Function Objects" +msgstr "Funktionsobjekt" + +msgid "Other Objects" +msgstr "Övriga objekt" + +msgid "C API for extension modules" +msgstr "" + +msgid "object" +msgstr "" + +msgid "numeric" +msgstr "" + +msgid "sequence" +msgstr "" + +msgid "mapping" +msgstr "" diff --git a/c-api/contextvars.po b/c-api/contextvars.po new file mode 100644 index 00000000..3de24400 --- /dev/null +++ b/c-api/contextvars.po @@ -0,0 +1,201 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Context Variables Objects" +msgstr "" + +msgid "" +"In Python 3.7.1 the signatures of all context variables C APIs were " +"**changed** to use :c:type:`PyObject` pointers instead of :c:type:" +"`PyContext`, :c:type:`PyContextVar`, and :c:type:`PyContextToken`, e.g.::" +msgstr "" + +msgid "" +"// in 3.7.0:\n" +"PyContext *PyContext_New(void);\n" +"\n" +"// in 3.7.1+:\n" +"PyObject *PyContext_New(void);" +msgstr "" + +msgid "See :issue:`34762` for more details." +msgstr "" + +msgid "" +"This section details the public C API for the :mod:`contextvars` module." +msgstr "" + +msgid "" +"The C structure used to represent a :class:`contextvars.Context` object." +msgstr "" + +msgid "" +"The C structure used to represent a :class:`contextvars.ContextVar` object." +msgstr "" + +msgid "The C structure used to represent a :class:`contextvars.Token` object." +msgstr "" + +msgid "The type object representing the *context* type." +msgstr "" + +msgid "The type object representing the *context variable* type." +msgstr "" + +msgid "The type object representing the *context variable token* type." +msgstr "" + +msgid "Type-check macros:" +msgstr "" + +msgid "" +"Return true if *o* is of type :c:data:`PyContext_Type`. *o* must not be " +"``NULL``. This function always succeeds." +msgstr "" + +msgid "" +"Return true if *o* is of type :c:data:`PyContextVar_Type`. *o* must not be " +"``NULL``. This function always succeeds." +msgstr "" + +msgid "" +"Return true if *o* is of type :c:data:`PyContextToken_Type`. *o* must not be " +"``NULL``. This function always succeeds." +msgstr "" + +msgid "Context object management functions:" +msgstr "" + +msgid "" +"Create a new empty context object. Returns ``NULL`` if an error has " +"occurred." +msgstr "" + +msgid "" +"Create a shallow copy of the passed *ctx* context object. Returns ``NULL`` " +"if an error has occurred." +msgstr "" + +msgid "" +"Create a shallow copy of the current thread context. Returns ``NULL`` if an " +"error has occurred." +msgstr "" + +msgid "" +"Set *ctx* as the current context for the current thread. Returns ``0`` on " +"success, and ``-1`` on error." +msgstr "" + +msgid "" +"Deactivate the *ctx* context and restore the previous context as the current " +"context for the current thread. Returns ``0`` on success, and ``-1`` on " +"error." +msgstr "" + +msgid "" +"Register *callback* as a context object watcher for the current interpreter. " +"Return an ID which may be passed to :c:func:`PyContext_ClearWatcher`. In " +"case of error (e.g. no more watcher IDs available), return ``-1`` and set an " +"exception." +msgstr "" + +msgid "" +"Clear watcher identified by *watcher_id* previously returned from :c:func:" +"`PyContext_AddWatcher` for the current interpreter. Return ``0`` on success, " +"or ``-1`` and set an exception on error (e.g. if the given *watcher_id* was " +"never registered.)" +msgstr "" + +msgid "Enumeration of possible context object watcher events:" +msgstr "" + +msgid "" +"``Py_CONTEXT_SWITCHED``: The :term:`current context` has switched to a " +"different context. The object passed to the watch callback is the now-" +"current :class:`contextvars.Context` object, or None if no context is " +"current." +msgstr "" + +msgid "" +"Context object watcher callback function. The object passed to the callback " +"is event-specific; see :c:type:`PyContextEvent` for details." +msgstr "" + +msgid "" +"If the callback returns with an exception set, it must return ``-1``; this " +"exception will be printed as an unraisable exception using :c:func:" +"`PyErr_FormatUnraisable`. Otherwise it should return ``0``." +msgstr "" + +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 " +"set. This means the callback may not call any other API that can set an " +"exception unless it saves and clears the exception state first, and restores " +"it before returning." +msgstr "" + +msgid "Context variable functions:" +msgstr "" + +msgid "" +"Create a new ``ContextVar`` object. The *name* parameter is used for " +"introspection and debug purposes. The *def* parameter specifies a default " +"value for the context variable, or ``NULL`` for no default. If an error has " +"occurred, this function returns ``NULL``." +msgstr "" + +msgid "" +"Get the value of a context variable. Returns ``-1`` if an error has " +"occurred during lookup, and ``0`` if no error occurred, whether or not a " +"value was found." +msgstr "" + +msgid "" +"If the context variable was found, *value* will be a pointer to it. If the " +"context variable was *not* found, *value* will point to:" +msgstr "" + +msgid "*default_value*, if not ``NULL``;" +msgstr "" + +msgid "the default value of *var*, if not ``NULL``;" +msgstr "" + +msgid "``NULL``" +msgstr "" + +msgid "Except for ``NULL``, the function returns a new reference." +msgstr "" + +msgid "" +"Set the value of *var* to *value* in the current context. Returns a new " +"token object for this change, or ``NULL`` if an error has occurred." +msgstr "" + +msgid "" +"Reset the state of the *var* context variable to that it was in before :c:" +"func:`PyContextVar_Set` that returned the *token* was called. This function " +"returns ``0`` on success and ``-1`` on error." +msgstr "" diff --git a/c-api/conversion.po b/c-api/conversion.po new file mode 100644 index 00000000..3b83e2e6 --- /dev/null +++ b/c-api/conversion.po @@ -0,0 +1,291 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "String conversion and formatting" +msgstr "" + +msgid "Functions for number conversion and formatted string output." +msgstr "" + +msgid "" +"Output not more than *size* bytes to *str* according to the format string " +"*format* and the extra arguments. See the Unix man page :manpage:" +"`snprintf(3)`." +msgstr "" + +msgid "" +"Output not more than *size* bytes to *str* according to the format string " +"*format* and the variable argument list *va*. Unix man page :manpage:" +"`vsnprintf(3)`." +msgstr "" + +msgid "" +":c:func:`PyOS_snprintf` and :c:func:`PyOS_vsnprintf` wrap the Standard C " +"library functions :c:func:`snprintf` and :c:func:`vsnprintf`. Their purpose " +"is to guarantee consistent behavior in corner cases, which the Standard C " +"functions do not." +msgstr "" + +msgid "" +"The wrappers ensure that ``str[size-1]`` is always ``'\\0'`` upon return. " +"They never write more than *size* bytes (including the trailing ``'\\0'``) " +"into str. Both functions require that ``str != NULL``, ``size > 0``, " +"``format != NULL`` and ``size < INT_MAX``. Note that this means there is no " +"equivalent to the C99 ``n = snprintf(NULL, 0, ...)`` which would determine " +"the necessary buffer size." +msgstr "" + +msgid "" +"The return value (*rv*) for these functions should be interpreted as follows:" +msgstr "" + +msgid "" +"When ``0 <= rv < size``, the output conversion was successful and *rv* " +"characters were written to *str* (excluding the trailing ``'\\0'`` byte at " +"``str[rv]``)." +msgstr "" + +msgid "" +"When ``rv >= size``, the output conversion was truncated and a buffer with " +"``rv + 1`` bytes would have been needed to succeed. ``str[size-1]`` is " +"``'\\0'`` in this case." +msgstr "" + +msgid "" +"When ``rv < 0``, the output conversion failed and ``str[size-1]`` is " +"``'\\0'`` in this case too, but the rest of *str* is undefined. The exact " +"cause of the error depends on the underlying platform." +msgstr "" + +msgid "" +"The following functions provide locale-independent string to number " +"conversions." +msgstr "" + +msgid "" +"Convert the initial part of the string in ``str`` to an :c:expr:`unsigned " +"long` value according to the given ``base``, which must be between ``2`` and " +"``36`` inclusive, or be the special value ``0``." +msgstr "" + +msgid "" +"Leading white space and case of characters are ignored. If ``base`` is zero " +"it looks for a leading ``0b``, ``0o`` or ``0x`` to tell which base. If " +"these are absent it defaults to ``10``. Base must be 0 or between 2 and 36 " +"(inclusive). If ``ptr`` is non-``NULL`` it will contain a pointer to the " +"end of the scan." +msgstr "" + +msgid "" +"If the converted value falls out of range of corresponding return type, " +"range error occurs (:c:data:`errno` is set to :c:macro:`!ERANGE`) and :c:" +"macro:`!ULONG_MAX` is returned. If no conversion can be performed, ``0`` is " +"returned." +msgstr "" + +msgid "See also the Unix man page :manpage:`strtoul(3)`." +msgstr "" + +msgid "" +"Convert the initial part of the string in ``str`` to an :c:expr:`long` value " +"according to the given ``base``, which must be between ``2`` and ``36`` " +"inclusive, or be the special value ``0``." +msgstr "" + +msgid "" +"Same as :c:func:`PyOS_strtoul`, but return a :c:expr:`long` value instead " +"and :c:macro:`LONG_MAX` on overflows." +msgstr "" + +msgid "See also the Unix man page :manpage:`strtol(3)`." +msgstr "" + +msgid "" +"Convert a string ``s`` to a :c:expr:`double`, raising a Python exception on " +"failure. The set of accepted strings corresponds to the set of strings " +"accepted by Python's :func:`float` constructor, except that ``s`` must not " +"have leading or trailing whitespace. The conversion is independent of the " +"current locale." +msgstr "" + +msgid "" +"If ``endptr`` is ``NULL``, convert the whole string. Raise :exc:" +"`ValueError` and return ``-1.0`` if the string is not a valid representation " +"of a floating-point number." +msgstr "" + +msgid "" +"If endptr is not ``NULL``, convert as much of the string as possible and set " +"``*endptr`` to point to the first unconverted character. If no initial " +"segment of the string is the valid representation of a floating-point " +"number, set ``*endptr`` to point to the beginning of the string, raise " +"ValueError, and return ``-1.0``." +msgstr "" + +msgid "" +"If ``s`` represents a value that is too large to store in a float (for " +"example, ``\"1e500\"`` is such a string on many platforms) then if " +"``overflow_exception`` is ``NULL`` return :c:macro:`!INFINITY` (with an " +"appropriate sign) and don't set any exception. Otherwise, " +"``overflow_exception`` must point to a Python exception object; raise that " +"exception and return ``-1.0``. In both cases, set ``*endptr`` to point to " +"the first character after the converted value." +msgstr "" + +msgid "" +"If any other error occurs during the conversion (for example an out-of-" +"memory error), set the appropriate Python exception and return ``-1.0``." +msgstr "" + +msgid "" +"Convert a :c:expr:`double` *val* to a string using supplied *format_code*, " +"*precision*, and *flags*." +msgstr "" + +msgid "" +"*format_code* must be one of ``'e'``, ``'E'``, ``'f'``, ``'F'``, ``'g'``, " +"``'G'`` or ``'r'``. For ``'r'``, the supplied *precision* must be 0 and is " +"ignored. The ``'r'`` format code specifies the standard :func:`repr` format." +msgstr "" + +msgid "*flags* can be zero or more of the following values or-ed together:" +msgstr "" + +msgid "" +"Always precede the returned string with a sign character, even if *val* is " +"non-negative." +msgstr "" + +msgid "Ensure that the returned string will not look like an integer." +msgstr "" + +msgid "" +"Apply \"alternate\" formatting rules. See the documentation for the :c:func:" +"`PyOS_snprintf` ``'#'`` specifier for details." +msgstr "" + +msgid "Negative zero is converted to positive zero." +msgstr "" + +msgid "" +"If *ptype* is non-``NULL``, then the value it points to will be set to one " +"of the following constants depending on the type of *val*:" +msgstr "" + +msgid "*\\*ptype*" +msgstr "" + +msgid "type of *val*" +msgstr "" + +msgid "finite number" +msgstr "" + +msgid "infinite number" +msgstr "" + +msgid "not a number" +msgstr "" + +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 "" + +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 "" + +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 "" + +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 "" + +msgid "These functions do not use the locale." +msgstr "" + +msgid "Case insensitive comparison of strings." +msgstr "" + +msgid "" +"On Windows, these are aliases of :c:func:`!stricmp` and :c:func:`!strnicmp`, " +"respectively." +msgstr "" + +msgid "" +"On other platforms, they are aliases of :c:func:`PyOS_mystricmp` and :c:func:" +"`PyOS_mystrnicmp`, respectively." +msgstr "" + +msgid "Character classification and conversion" +msgstr "" + +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 "" + +msgid "Return true if the character *c* is an alphanumeric character." +msgstr "" + +msgid "" +"Return true if the character *c* is an alphabetic character (``a-z`` and ``A-" +"Z``)." +msgstr "" + +msgid "Return true if the character *c* is a decimal digit (``0-9``)." +msgstr "" + +msgid "Return true if the character *c* is a lowercase ASCII letter (``a-z``)." +msgstr "" + +msgid "" +"Return true if the character *c* is an uppercase ASCII letter (``A-Z``)." +msgstr "" + +msgid "" +"Return true if the character *c* is a whitespace character (space, tab, " +"carriage return, newline, vertical tab, or form feed)." +msgstr "" + +msgid "" +"Return true if the character *c* is a hexadecimal digit (``0-9``, ``a-f``, " +"and ``A-F``)." +msgstr "" + +msgid "Return the lowercase equivalent of the character *c*." +msgstr "" + +msgid "Return the uppercase equivalent of the character *c*." +msgstr "" diff --git a/c-api/coro.po b/c-api/coro.po new file mode 100644 index 00000000..bf130c0b --- /dev/null +++ b/c-api/coro.po @@ -0,0 +1,49 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Coroutine Objects" +msgstr "" + +msgid "" +"Coroutine objects are what functions declared with an ``async`` keyword " +"return." +msgstr "" + +msgid "The C structure used for coroutine objects." +msgstr "" + +msgid "The type object corresponding to coroutine objects." +msgstr "" + +msgid "" +"Return true if *ob*'s type is :c:type:`PyCoro_Type`; *ob* must not be " +"``NULL``. This function always succeeds." +msgstr "" + +msgid "" +"Create and return a new coroutine object based on the *frame* object, with " +"``__name__`` and ``__qualname__`` set to *name* and *qualname*. A reference " +"to *frame* is stolen by this function. The *frame* argument must not be " +"``NULL``." +msgstr "" diff --git a/c-api/curses.po b/c-api/curses.po new file mode 100644 index 00000000..1488fd72 --- /dev/null +++ b/c-api/curses.po @@ -0,0 +1,157 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-11-11 14:16+0000\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Curses C API" +msgstr "" + +msgid "" +":mod:`curses` exposes a small C interface for extension modules. Consumers " +"must include the header file :file:`py_curses.h` (which is not included by " +"default by :file:`Python.h`) and :c:func:`import_curses` must be invoked, " +"usually as part of the module initialisation function, to populate :c:var:" +"`PyCurses_API`." +msgstr "" + +msgid "" +"Neither the C API nor the pure Python :mod:`curses` module are compatible " +"with subinterpreters." +msgstr "" + +msgid "" +"Import the curses C API. The macro does not need a semi-colon to be called." +msgstr "" + +msgid "On success, populate the :c:var:`PyCurses_API` pointer." +msgstr "" + +msgid "" +"On failure, set :c:var:`PyCurses_API` to NULL and set an exception. The " +"caller must check if an error occurred via :c:func:`PyErr_Occurred`:" +msgstr "" + +msgid "" +"import_curses(); // semi-colon is optional but recommended\n" +"if (PyErr_Occurred()) { /* cleanup */ }" +msgstr "" + +msgid "" +"Dynamically allocated object containing the curses C API. This variable is " +"only available once :c:macro:`import_curses` succeeds." +msgstr "" + +msgid "``PyCurses_API[0]`` corresponds to :c:data:`PyCursesWindow_Type`." +msgstr "" + +msgid "" +"``PyCurses_API[1]``, ``PyCurses_API[2]``, and ``PyCurses_API[3]`` are " +"pointers to predicate functions of type ``int (*)(void)``." +msgstr "" + +msgid "" +"When called, these predicates return whether :func:`curses.setupterm`, :func:" +"`curses.initscr`, and :func:`curses.start_color` have been called " +"respectively." +msgstr "" + +msgid "" +"See also the convenience macros :c:macro:`PyCursesSetupTermCalled`, :c:macro:" +"`PyCursesInitialised`, and :c:macro:`PyCursesInitialisedColor`." +msgstr "" + +msgid "" +"The number of entries in this structure is subject to changes. Consider " +"using :c:macro:`PyCurses_API_pointers` to check if new fields are available " +"or not." +msgstr "" + +msgid "" +"The number of accessible fields (``4``) in :c:var:`PyCurses_API`. This " +"number is incremented whenever new fields are added." +msgstr "" + +msgid "" +"The :ref:`heap type ` corresponding to :class:`curses.window`." +msgstr "" + +msgid "" +"Return true if *op* is a :class:`curses.window` instance, false otherwise." +msgstr "" + +msgid "" +"The following macros are convenience macros expanding into C statements. In " +"particular, they can only be used as ``macro;`` or ``macro``, but not " +"``macro()`` or ``macro();``." +msgstr "" + +msgid "Macro checking if :func:`curses.setupterm` has been called." +msgstr "" + +msgid "The macro expansion is roughly equivalent to:" +msgstr "" + +msgid "" +"{\n" +" typedef int (*predicate_t)(void);\n" +" predicate_t was_setupterm_called = (predicate_t)PyCurses_API[1];\n" +" if (!was_setupterm_called()) {\n" +" return NULL;\n" +" }\n" +"}" +msgstr "" + +msgid "Macro checking if :func:`curses.initscr` has been called." +msgstr "" + +msgid "" +"{\n" +" typedef int (*predicate_t)(void);\n" +" predicate_t was_initscr_called = (predicate_t)PyCurses_API[2];\n" +" if (!was_initscr_called()) {\n" +" return NULL;\n" +" }\n" +"}" +msgstr "" + +msgid "Macro checking if :func:`curses.start_color` has been called." +msgstr "" + +msgid "" +"{\n" +" typedef int (*predicate_t)(void);\n" +" predicate_t was_start_color_called = (predicate_t)PyCurses_API[3];\n" +" if (!was_start_color_called()) {\n" +" return NULL;\n" +" }\n" +"}" +msgstr "" + +msgid "Internal data" +msgstr "" + +msgid "" +"The following objects are exposed by the C API but should be considered " +"internal-only." +msgstr "" + +msgid "Name of the curses capsule to pass to :c:func:`PyCapsule_Import`." +msgstr "" + +msgid "Internal usage only. Use :c:macro:`import_curses` instead." +msgstr "" diff --git a/c-api/datetime.po b/c-api/datetime.po new file mode 100644 index 00000000..dbd96ef3 --- /dev/null +++ b/c-api/datetime.po @@ -0,0 +1,316 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "DateTime Objects" +msgstr "" + +msgid "" +"Various date and time objects are supplied by the :mod:`datetime` module. " +"Before using any of these functions, the header file :file:`datetime.h` must " +"be included in your source (note that this is not included by :file:`Python." +"h`), and the macro :c:macro:`PyDateTime_IMPORT` must be invoked, usually as " +"part of the module initialisation function. The macro puts a pointer to a C " +"structure into a static variable, :c:data:`PyDateTimeAPI`, that is used by " +"the following macros." +msgstr "" + +msgid "Import the datetime C API." +msgstr "" + +msgid "" +"On success, populate the :c:var:`PyDateTimeAPI` pointer. On failure, set :c:" +"var:`PyDateTimeAPI` to ``NULL`` and set an exception. The caller must check " +"if an error occurred via :c:func:`PyErr_Occurred`:" +msgstr "" + +msgid "" +"PyDateTime_IMPORT;\n" +"if (PyErr_Occurred()) { /* cleanup */ }" +msgstr "" + +msgid "This is not compatible with subinterpreters." +msgstr "" + +msgid "This macro is now thread safe." +msgstr "" + +msgid "Structure containing the fields for the datetime C API." +msgstr "" + +msgid "The fields of this structure are private and subject to change." +msgstr "" + +msgid "Do not use this directly; prefer ``PyDateTime_*`` APIs instead." +msgstr "" + +msgid "Dynamically allocated object containing the datetime C API." +msgstr "" + +msgid "" +"This variable is only available once :c:macro:`PyDateTime_IMPORT` succeeds." +msgstr "" + +msgid "" +"This variable should not be accessed directly as direct access is not thread-" +"safe. Use :c:func:`PyDateTime_IMPORT` instead." +msgstr "" + +msgid "This subtype of :c:type:`PyObject` represents a Python date object." +msgstr "" + +msgid "This subtype of :c:type:`PyObject` represents a Python datetime object." +msgstr "" + +msgid "This subtype of :c:type:`PyObject` represents a Python time object." +msgstr "" + +msgid "" +"This subtype of :c:type:`PyObject` represents the difference between two " +"datetime values." +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python date type; it " +"is the same object as :class:`datetime.date` in the Python layer." +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python datetime type; " +"it is the same object as :class:`datetime.datetime` in the Python layer." +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python time type; it " +"is the same object as :class:`datetime.time` in the Python layer." +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python type for the " +"difference between two datetime values; it is the same object as :class:" +"`datetime.timedelta` in the Python layer." +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python time zone info " +"type; it is the same object as :class:`datetime.tzinfo` in the Python layer." +msgstr "" + +msgid "Macro for access to the UTC singleton:" +msgstr "" + +msgid "" +"Returns the time zone singleton representing UTC, the same object as :attr:" +"`datetime.timezone.utc`." +msgstr "" + +msgid "Type-check macros:" +msgstr "" + +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_DateType` or a subtype " +"of :c:data:`!PyDateTime_DateType`. *ob* must not be ``NULL``. This " +"function always succeeds." +msgstr "" + +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_DateType`. *ob* must not " +"be ``NULL``. This function always succeeds." +msgstr "" + +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_DateTimeType` or a " +"subtype of :c:data:`!PyDateTime_DateTimeType`. *ob* must not be ``NULL``. " +"This function always succeeds." +msgstr "" + +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_DateTimeType`. *ob* must " +"not be ``NULL``. This function always succeeds." +msgstr "" + +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_TimeType` or a subtype " +"of :c:data:`!PyDateTime_TimeType`. *ob* must not be ``NULL``. This " +"function always succeeds." +msgstr "" + +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_TimeType`. *ob* must not " +"be ``NULL``. This function always succeeds." +msgstr "" + +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_DeltaType` or a subtype " +"of :c:data:`!PyDateTime_DeltaType`. *ob* must not be ``NULL``. This " +"function always succeeds." +msgstr "" + +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_DeltaType`. *ob* must not " +"be ``NULL``. This function always succeeds." +msgstr "" + +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_TZInfoType` or a subtype " +"of :c:data:`!PyDateTime_TZInfoType`. *ob* must not be ``NULL``. This " +"function always succeeds." +msgstr "" + +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_TZInfoType`. *ob* must " +"not be ``NULL``. This function always succeeds." +msgstr "" + +msgid "Macros to create objects:" +msgstr "" + +msgid "" +"Return a :class:`datetime.date` object with the specified year, month and " +"day." +msgstr "" + +msgid "" +"Return a :class:`datetime.datetime` object with the specified year, month, " +"day, hour, minute, second and microsecond." +msgstr "" + +msgid "" +"Return a :class:`datetime.datetime` object with the specified year, month, " +"day, hour, minute, second, microsecond and fold." +msgstr "" + +msgid "" +"Return a :class:`datetime.time` object with the specified hour, minute, " +"second and microsecond." +msgstr "" + +msgid "" +"Return a :class:`datetime.time` object with the specified hour, minute, " +"second, microsecond and fold." +msgstr "" + +msgid "" +"Return a :class:`datetime.timedelta` object representing the given number of " +"days, seconds and microseconds. Normalization is performed so that the " +"resulting number of microseconds and seconds lie in the ranges documented " +"for :class:`datetime.timedelta` objects." +msgstr "" + +msgid "" +"Return a :class:`datetime.timezone` object with an unnamed fixed offset " +"represented by the *offset* argument." +msgstr "" + +msgid "" +"Return a :class:`datetime.timezone` object with a fixed offset represented " +"by the *offset* argument and with tzname *name*." +msgstr "" + +msgid "" +"Macros to extract fields from date objects. The argument must be an " +"instance of :c:type:`PyDateTime_Date`, including subclasses (such as :c:type:" +"`PyDateTime_DateTime`). The argument must not be ``NULL``, and the type is " +"not checked:" +msgstr "" + +msgid "Return the year, as a positive int." +msgstr "" + +msgid "Return the month, as an int from 1 through 12." +msgstr "" + +msgid "Return the day, as an int from 1 through 31." +msgstr "" + +msgid "" +"Macros to extract fields from datetime objects. The argument must be an " +"instance of :c:type:`PyDateTime_DateTime`, including subclasses. The " +"argument must not be ``NULL``, and the type is not checked:" +msgstr "" + +msgid "Return the hour, as an int from 0 through 23." +msgstr "" + +msgid "Return the minute, as an int from 0 through 59." +msgstr "" + +msgid "Return the second, as an int from 0 through 59." +msgstr "" + +msgid "Return the microsecond, as an int from 0 through 999999." +msgstr "" + +msgid "Return the fold, as an int from 0 through 1." +msgstr "" + +msgid "Return the tzinfo (which may be ``None``)." +msgstr "" + +msgid "" +"Macros to extract fields from time objects. The argument must be an " +"instance of :c:type:`PyDateTime_Time`, including subclasses. The argument " +"must not be ``NULL``, and the type is not checked:" +msgstr "" + +msgid "" +"Macros to extract fields from time delta objects. The argument must be an " +"instance of :c:type:`PyDateTime_Delta`, including subclasses. The argument " +"must not be ``NULL``, and the type is not checked:" +msgstr "" + +msgid "Return the number of days, as an int from -999999999 to 999999999." +msgstr "" + +msgid "Return the number of seconds, as an int from 0 through 86399." +msgstr "" + +msgid "Return the number of microseconds, as an int from 0 through 999999." +msgstr "" + +msgid "Macros for the convenience of modules implementing the DB API:" +msgstr "" + +msgid "" +"Create and return a new :class:`datetime.datetime` object given an argument " +"tuple suitable for passing to :meth:`datetime.datetime.fromtimestamp`." +msgstr "" + +msgid "" +"Create and return a new :class:`datetime.date` object given an argument " +"tuple suitable for passing to :meth:`datetime.date.fromtimestamp`." +msgstr "" + +msgid "Internal data" +msgstr "" + +msgid "" +"The following symbols are exposed by the C API but should be considered " +"internal-only." +msgstr "" + +msgid "Name of the datetime capsule to pass to :c:func:`PyCapsule_Import`." +msgstr "" + +msgid "Internal usage only. Use :c:macro:`PyDateTime_IMPORT` instead." +msgstr "" diff --git a/c-api/descriptor.po b/c-api/descriptor.po new file mode 100644 index 00000000..ee31392e --- /dev/null +++ b/c-api/descriptor.po @@ -0,0 +1,221 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Descriptor Objects" +msgstr "" + +msgid "" +"\"Descriptors\" are objects that describe some attribute of an object. They " +"are found in the dictionary of type objects." +msgstr "" + +msgid "" +"Create a new get-set descriptor for extension type *type* from the :c:type:" +"`PyGetSetDef` structure *getset*." +msgstr "" + +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 "" + +msgid "" +"On success, return a :term:`strong reference` to the descriptor. Return " +"``NULL`` with an exception set on failure." +msgstr "" + +msgid "" +"Create a new member descriptor for extension type *type* from the :c:type:" +"`PyMemberDef` structure *member*." +msgstr "" + +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 "" + +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 "" + +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 "" + +msgid "" +"Create a new method descriptor for extension type *type* from the :c:type:" +"`PyMethodDef` structure *meth*." +msgstr "" + +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 "" + +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 "" + +msgid "Describes a slot wrapper used by :c:func:`PyDescr_NewWrapper`." +msgstr "" + +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 "" + +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 "" + +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 "" + +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 "" + +msgid "" +"Create a new class method descriptor for extension type *type* from the :c:" +"type:`PyMethodDef` structure *method*." +msgstr "" + +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 "" + +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 "" + +msgid "" +"Create a new bound wrapper object from the wrapper descriptor *d* and the " +"instance *self*." +msgstr "" + +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 "" + +msgid "" +"On success, return a :term:`strong reference` to the wrapper object. Return " +"``NULL`` with an exception set on failure." +msgstr "" + +msgid "This is a macro including the common fields for a descriptor object." +msgstr "" + +msgid "" +"This was included in Python's C API by mistake; do not use it in extensions. " +"For creating custom descriptor objects, create a class implementing the " +"descriptor protocol (:c:member:`~PyTypeObject.tp_descr_get` and :c:member:" +"`~PyTypeObject.tp_descr_set`)." +msgstr "" + +msgid "Built-in descriptors" +msgstr "" + +msgid "" +"The type object for property objects. This is the same object as :class:" +"`property` in the Python layer." +msgstr "" + +msgid "" +"The type object for super objects. This is the same object as :class:`super` " +"in the Python layer." +msgstr "" + +msgid "" +"The type of class method objects. This is the same object as :class:" +"`classmethod` in the Python layer." +msgstr "" + +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 "" + +msgid "" +"Create a new :class:`classmethod` object wrapping *callable*. *callable* " +"must be a callable object and must not be ``NULL``." +msgstr "" + +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 "" + +msgid "" +"The type of static method objects. This is the same object as :class:" +"`staticmethod` in the Python layer." +msgstr "" + +msgid "" +"Create a new :class:`staticmethod` object wrapping *callable*. *callable* " +"must be a callable object and must not be ``NULL``." +msgstr "" + +msgid "" +"On success, this function returns a :term:`strong reference` to a new static " +"method descriptor. On failure, this function returns ``NULL`` with an " +"exception set." +msgstr "" diff --git a/c-api/dict.po b/c-api/dict.po new file mode 100644 index 00000000..98d0f6d6 --- /dev/null +++ b/c-api/dict.po @@ -0,0 +1,678 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2026 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2026\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Dictionary objects" +msgstr "" + +msgid "" +"This subtype of :c:type:`PyObject` represents a Python dictionary object." +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python dictionary " +"type. This is the same object as :class:`dict` in the Python layer." +msgstr "" + +msgid "" +"Return true if *p* is a dict object or an instance of a subtype of the dict " +"type. This function always succeeds." +msgstr "" + +msgid "" +"Return true if *p* is a dict object, but not an instance of a subtype of the " +"dict type. This function always succeeds." +msgstr "" + +msgid "Return a new empty dictionary, or ``NULL`` on failure." +msgstr "" + +msgid "" +"Return a :class:`types.MappingProxyType` object for a mapping which enforces " +"read-only behavior. This is normally used to create a view to prevent " +"modification of the dictionary for non-dynamic class types." +msgstr "" + +msgid "" +"The first argument can be a :class:`dict`, a :class:`frozendict`, or a " +"mapping." +msgstr "" + +msgid "Also accept :class:`frozendict`." +msgstr "" + +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 "" + +msgid "Empty an existing dictionary of all key-value pairs." +msgstr "" + +msgid "" +"Do nothing if the argument is not a :class:`dict` or a :class:`!dict` " +"subclass." +msgstr "" + +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 "" + +msgid "The first argument can be a :class:`dict` or a :class:`frozendict`." +msgstr "" + +msgid "" +"The operation is atomic on :term:`free threading ` when " +"*key* is :class:`str`, :class:`int`, :class:`float`, :class:`bool` or :class:" +"`bytes`." +msgstr "" + +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 "" + +msgid "Return a new dictionary that contains the same key-value pairs as *p*." +msgstr "" + +msgid "" +"Insert *val* into the dictionary *p* with a key of *key*. *key* must be :" +"term:`hashable`; if it isn't, :exc:`TypeError` will be raised. Return ``0`` " +"on success or ``-1`` on failure. This function *does not* steal a reference " +"to *val*." +msgstr "" + +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 "" + +msgid "" +"Remove the entry in dictionary *p* with key *key*. *key* must be :term:" +"`hashable`; if it isn't, :exc:`TypeError` is raised. If *key* is not in the " +"dictionary, :exc:`KeyError` is raised. Return ``0`` on success or ``-1`` on " +"failure." +msgstr "" + +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 "" + +msgid "" +"Return a new :term:`strong reference` to the object from dictionary *p* " +"which has a key *key*:" +msgstr "" + +msgid "" +"If the key is present, set *\\*result* to a new :term:`strong reference` to " +"the value and return ``1``." +msgstr "" + +msgid "If the key is missing, set *\\*result* to ``NULL`` and return ``0``." +msgstr "" + +msgid "" +"On error, raise an exception, set *\\*result* to ``NULL`` and return ``-1``." +msgstr "" + +msgid "See also the :c:func:`PyObject_GetItem` function." +msgstr "" + +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 "" + +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 "" + +msgid "" +"In the :term:`free-threaded build`, the returned :term:`borrowed reference` " +"may become invalid if another thread modifies the dictionary concurrently. " +"Prefer :c:func:`PyDict_GetItemRef`, which returns a :term:`strong reference`." +msgstr "" + +msgid "" +"Calling this API without an :term:`attached thread state` had been allowed " +"for historical reason. It is no longer allowed." +msgstr "" + +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 "" + +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 "" + +msgid "" +"Exceptions that occur while this calls :meth:`~object.__hash__` and :meth:" +"`~object.__eq__` methods or while creating the temporary :class:`str` object " +"are silently ignored. Prefer using the :c:func:`PyDict_GetItemWithError` " +"function with your own :c:func:`PyUnicode_FromString` *key* instead." +msgstr "" + +msgid "" +"In the :term:`free-threaded build`, the returned :term:`borrowed reference` " +"may become invalid if another thread modifies the dictionary concurrently. " +"Prefer :c:func:`PyDict_GetItemStringRef`, which returns a :term:`strong " +"reference`." +msgstr "" + +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 "" + +msgid "" +"This is the same as the Python-level :meth:`dict.setdefault`. If present, " +"it returns the value corresponding to *key* from the dictionary *p*. If the " +"key is not in the dict, it is inserted with value *defaultobj* and " +"*defaultobj* is returned. This function evaluates the hash function of " +"*key* only once, instead of evaluating it independently for the lookup and " +"the insertion." +msgstr "" + +msgid "" +"In the :term:`free-threaded build`, the returned :term:`borrowed reference` " +"may become invalid if another thread modifies the dictionary concurrently. " +"Prefer :c:func:`PyDict_SetDefaultRef`, which returns a :term:`strong " +"reference`." +msgstr "" + +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``, " +"then *\\*result* is set to a :term:`strong reference` to either " +"*default_value*, if the key was not present, or the existing value, if *key* " +"was already present in the dictionary. Returns ``1`` if the key was present " +"and *default_value* was not inserted, or ``0`` if the key was not present " +"and *default_value* was inserted. On failure, returns ``-1``, sets an " +"exception, and sets ``*result`` to ``NULL``." +msgstr "" + +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 " +"both *default_value* and *\\*result* (if it's not ``NULL``). These may refer " +"to the same object: in that case you hold two separate references to it." +msgstr "" + +msgid "" +"Remove *key* from dictionary *p* and optionally return the removed value. Do " +"not raise :exc:`KeyError` if the key is missing." +msgstr "" + +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 "" + +msgid "" +"If the key is missing, set *\\*result* to ``NULL`` if *result* is not " +"``NULL``, and return ``0``." +msgstr "" + +msgid "On error, raise an exception and return ``-1``." +msgstr "" + +msgid "" +"Similar to :meth:`dict.pop`, but without the default value and not raising :" +"exc:`KeyError` if the key is missing." +msgstr "" + +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 "" + +msgid "" +"Return a :c:type:`PyListObject` containing all the items from the dictionary." +msgstr "" + +msgid "" +"Return a :c:type:`PyListObject` containing all the keys from the dictionary." +msgstr "" + +msgid "" +"Return a :c:type:`PyListObject` containing all the values from the " +"dictionary *p*." +msgstr "" + +msgid "" +"Return the number of items in the dictionary. This is equivalent to " +"``len(p)`` on a dictionary." +msgstr "" + +msgid "The argument can be a :class:`dict` or a :class:`frozendict`." +msgstr "" + +msgid "Similar to :c:func:`PyDict_Size`, but without error checking." +msgstr "" + +msgid "" +"Iterate over all key-value pairs in the dictionary *p*. The :c:type:" +"`Py_ssize_t` referred to by *ppos* must be initialized to ``0`` prior to the " +"first call to this function to start the iteration; the function returns " +"true for each pair in the dictionary, and false once all pairs have been " +"reported. The parameters *pkey* and *pvalue* should either point to :c:expr:" +"`PyObject*` variables that will be filled in with each key and value, " +"respectively, or may be ``NULL``. Any references returned through them are " +"borrowed. *ppos* should not be altered during iteration. Its value " +"represents offsets within the internal dictionary structure, and since the " +"structure is sparse, the offsets are not consecutive." +msgstr "" + +msgid "For example::" +msgstr "" + +msgid "" +"PyObject *key, *value;\n" +"Py_ssize_t pos = 0;\n" +"\n" +"while (PyDict_Next(self->dict, &pos, &key, &value)) {\n" +" /* do something interesting with the values... */\n" +" ...\n" +"}" +msgstr "" + +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 "" + +msgid "" +"PyObject *key, *value;\n" +"Py_ssize_t pos = 0;\n" +"\n" +"while (PyDict_Next(self->dict, &pos, &key, &value)) {\n" +" long i = PyLong_AsLong(value);\n" +" if (i == -1 && PyErr_Occurred()) {\n" +" return -1;\n" +" }\n" +" PyObject *o = PyLong_FromLong(i + 1);\n" +" if (o == NULL)\n" +" return -1;\n" +" if (PyDict_SetItem(self->dict, key, o) < 0) {\n" +" Py_DECREF(o);\n" +" return -1;\n" +" }\n" +" Py_DECREF(o);\n" +"}" +msgstr "" + +msgid "" +"The function is not thread-safe in the :term:`free-threaded ` build without external synchronization for a mutable :class:" +"`dict`. You can use :c:macro:`Py_BEGIN_CRITICAL_SECTION` to lock the " +"dictionary while iterating over it::" +msgstr "" + +msgid "" +"Py_BEGIN_CRITICAL_SECTION(self->dict);\n" +"while (PyDict_Next(self->dict, &pos, &key, &value)) {\n" +" ...\n" +"}\n" +"Py_END_CRITICAL_SECTION();" +msgstr "" + +msgid "The function is thread-safe on a :class:`frozendict`." +msgstr "" + +msgid "" +"On the free-threaded build, this function can be used safely inside a " +"critical section. However, the references returned for *pkey* and *pvalue* " +"are :term:`borrowed ` and are only valid while the " +"critical section is held. If you need to use these objects outside the " +"critical section or when the critical section can be suspended, create a :" +"term:`strong reference ` (for example, using :c:func:" +"`Py_NewRef`)." +msgstr "" + +msgid "" +"Iterate over mapping object *b* adding key-value pairs to dictionary *a*. " +"*b* may be a dictionary, or any object supporting :c:func:`PyMapping_Keys` " +"and :c:func:`PyObject_GetItem`. If *override* is true, existing pairs in *a* " +"will be replaced if a matching key is found in *b*, otherwise pairs will " +"only be added if there is not a matching key in *a*. Return ``0`` on success " +"or ``-1`` if an exception was raised." +msgstr "" + +msgid "" +"In the :term:`free-threaded build`, when *b* is a :class:`dict` (with the " +"standard iterator), both *a* and *b* are locked for the duration of the " +"operation. When *b* is a non-dict mapping, only *a* is locked; *b* may be " +"concurrently modified by another thread." +msgstr "" + +msgid "" +"This is the same as ``PyDict_Merge(a, b, 1)`` in C, and is similar to ``a." +"update(b)`` in Python except that :c:func:`PyDict_Update` doesn't fall back " +"to the iterating over a sequence of key value pairs if the second argument " +"has no \"keys\" attribute. Return ``0`` on success or ``-1`` if an " +"exception was raised." +msgstr "" + +msgid "" +"Update or merge into dictionary *a*, from the key-value pairs in *seq2*. " +"*seq2* must be an iterable object producing iterable objects of length 2, " +"viewed as key-value pairs. In case of duplicate keys, the last wins if " +"*override* is true, else the first wins. Return ``0`` on success or ``-1`` " +"if an exception was raised. Equivalent Python (except for the return value)::" +msgstr "" + +msgid "" +"def PyDict_MergeFromSeq2(a, seq2, override):\n" +" for key, value in seq2:\n" +" if override or key not in a:\n" +" a[key] = value" +msgstr "" + +msgid "" +"In the :term:`free-threaded ` build, only *a* is locked. The " +"iteration over *seq2* is not synchronized; *seq2* may be concurrently " +"modified by another thread." +msgstr "" + +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 " +"of error (e.g. no more watcher IDs available), return ``-1`` and set an " +"exception." +msgstr "" + +msgid "" +"This function is not internally synchronized. In the :term:`free-threaded " +"` build, callers should ensure no concurrent calls to :c:" +"func:`PyDict_AddWatcher` or :c:func:`PyDict_ClearWatcher` are in progress." +msgstr "" + +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 "" + +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 "" + +msgid "" +"Mark dictionary *dict* as no longer watched. The callback granted " +"*watcher_id* by :c:func:`PyDict_AddWatcher` will no longer be called when " +"*dict* is modified or deallocated. The dict must previously have been " +"watched by this watcher. Return ``0`` on success or ``-1`` on error." +msgstr "" + +msgid "" +"Enumeration of possible dictionary watcher events: ``PyDict_EVENT_ADDED``, " +"``PyDict_EVENT_MODIFIED``, ``PyDict_EVENT_DELETED``, " +"``PyDict_EVENT_CLONED``, ``PyDict_EVENT_CLEARED``, or " +"``PyDict_EVENT_DEALLOCATED``." +msgstr "" + +msgid "Type of a dict watcher callback function." +msgstr "" + +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`` " +"or ``PyDict_EVENT_MODIFIED``, *new_value* will be the new value for *key*. " +"If *event* is ``PyDict_EVENT_DELETED``, *key* is being deleted from the " +"dictionary and *new_value* will be ``NULL``." +msgstr "" + +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 " +"``PyDict_EVENT_ADDED`` events are not issued in this case; instead a single " +"``PyDict_EVENT_CLONED`` is issued, and *key* will be the source dictionary." +msgstr "" + +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 "" + +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 " +"prevent it from being freed at this time. When the resurrected object is " +"destroyed later, any watcher callbacks active at that time will be called " +"again." +msgstr "" + +msgid "" +"Callbacks occur before the notified modification to *dict* takes place, so " +"the prior state of *dict* can be inspected." +msgstr "" + +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 "" + +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 " +"set. This means the callback may not call any other API that can set an " +"exception unless it saves and clears the exception state first, and restores " +"it before returning." +msgstr "" + +msgid "Dictionary view objects" +msgstr "" + +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 "" + +msgid "" +"Type object for a view of dictionary keys. In Python, this is the type of " +"the object returned by :meth:`dict.keys`." +msgstr "" + +msgid "" +"Return true if *op* is an instance of a dictionary keys view. This function " +"always succeeds." +msgstr "" + +msgid "" +"Type object for a view of dictionary values. In Python, this is the type of " +"the object returned by :meth:`dict.values`." +msgstr "" + +msgid "" +"Return true if *op* is an instance of a dictionary values view. This " +"function always succeeds." +msgstr "" + +msgid "" +"Type object for a view of dictionary items. In Python, this is the type of " +"the object returned by :meth:`dict.items`." +msgstr "" + +msgid "" +"Return true if *op* is an instance of a dictionary items view. This function " +"always succeeds." +msgstr "" + +msgid "Frozen dictionary objects" +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python frozen " +"dictionary type. This is the same object as :class:`frozendict` in the " +"Python layer." +msgstr "" + +msgid "" +"Return true if *p* is a :class:`dict` object, a :class:`frozendict` object, " +"or an instance of a subtype of the :class:`!dict` or :class:`!frozendict` " +"type. This function always succeeds." +msgstr "" + +msgid "" +"Return true if *p* is a :class:`dict` object or a :class:`frozendict` " +"object, but not an instance of a subtype of the :class:`!dict` or :class:`!" +"frozendict` type. This function always succeeds." +msgstr "" + +msgid "" +"Return true if *p* is a :class:`frozendict` object or an instance of a " +"subtype of the :class:`!frozendict` type. This function always succeeds." +msgstr "" + +msgid "" +"Return true if *p* is a :class:`frozendict` object, but not an instance of a " +"subtype of the :class:`!frozendict` type. This function always succeeds." +msgstr "" + +msgid "" +"Return a new :class:`frozendict` from an iterable, or ``NULL`` on failure " +"with an exception set." +msgstr "" + +msgid "Create an empty dictionary if *iterable* is ``NULL``." +msgstr "" + +msgid "Ordered dictionaries" +msgstr "" + +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 "" + +msgid "" +"Type object for ordered dictionaries. This is the same object as :class:" +"`collections.OrderedDict` in the Python layer." +msgstr "" + +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 "" + +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 "" + +msgid "Analogous to :c:type:`PyDictKeys_Type` for ordered dictionaries." +msgstr "" + +msgid "Analogous to :c:type:`PyDictValues_Type` for ordered dictionaries." +msgstr "" + +msgid "Analogous to :c:type:`PyDictItems_Type` for ordered dictionaries." +msgstr "" + +msgid "Return a new empty ordered dictionary, or ``NULL`` on failure." +msgstr "" + +msgid "This is analogous to :c:func:`PyDict_New`." +msgstr "" + +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 "" + +msgid "This is analogous to :c:func:`PyDict_SetItem`." +msgstr "" + +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 "" + +msgid "This is analogous to :c:func:`PyDict_DelItem`." +msgstr "" + +msgid "These are :term:`soft deprecated` aliases to ``PyDict`` APIs:" +msgstr "" + +msgid "``PyODict``" +msgstr "" + +msgid "``PyDict``" +msgstr "" + +msgid ":c:func:`PyDict_GetItem`" +msgstr "" + +msgid ":c:func:`PyDict_GetItemWithError`" +msgstr "" + +msgid ":c:func:`PyDict_GetItemString`" +msgstr "" + +msgid ":c:func:`PyDict_Contains`" +msgstr "" + +msgid ":c:func:`PyDict_Size`" +msgstr "" + +msgid ":c:func:`PyDict_GET_SIZE`" +msgstr "" + +msgid "object" +msgstr "" + +msgid "dictionary" +msgstr "" + +msgid "built-in function" +msgstr "" + +msgid "len" +msgstr "" diff --git a/c-api/exceptions.po b/c-api/exceptions.po new file mode 100644 index 00000000..f78fc634 --- /dev/null +++ b/c-api/exceptions.po @@ -0,0 +1,1398 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-03 18:19+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Exception Handling" +msgstr "" + +msgid "" +"The functions described in this chapter will let you handle and raise Python " +"exceptions. It is important to understand some of the basics of Python " +"exception handling. It works somewhat like the POSIX :c:data:`errno` " +"variable: there is a global indicator (per thread) of the last error that " +"occurred. Most C API functions don't clear this on success, but will set it " +"to indicate the cause of the error on failure. Most C API functions also " +"return an error indicator, usually ``NULL`` if they are supposed to return a " +"pointer, or ``-1`` if they return an integer (exception: the ``PyArg_*`` " +"functions return ``1`` for success and ``0`` for failure)." +msgstr "" + +msgid "" +"Concretely, the error indicator consists of three object pointers: the " +"exception's type, the exception's value, and the traceback object. Any of " +"those pointers can be ``NULL`` if non-set (although some combinations are " +"forbidden, for example you can't have a non-``NULL`` traceback if the " +"exception type is ``NULL``)." +msgstr "" + +msgid "" +"When a function must fail because some function it called failed, it " +"generally doesn't set the error indicator; the function it called already " +"set it. It is responsible for either handling the error and clearing the " +"exception or returning after cleaning up any resources it holds (such as " +"object references or memory allocations); it should *not* continue normally " +"if it is not prepared to handle the error. If returning due to an error, it " +"is important to indicate to the caller that an error has been set. If the " +"error is not handled or carefully propagated, additional calls into the " +"Python/C API may not behave as intended and may fail in mysterious ways." +msgstr "" + +msgid "" +"The error indicator is **not** the result of :func:`sys.exc_info`. The " +"former corresponds to an exception that is not yet caught (and is therefore " +"still propagating), while the latter returns an exception after it is caught " +"(and has therefore stopped propagating)." +msgstr "" + +msgid "Printing and clearing" +msgstr "" + +msgid "" +"Clear the error indicator. If the error indicator is not set, there is no " +"effect." +msgstr "" + +msgid "" +"Print a standard traceback to ``sys.stderr`` and clear the error indicator. " +"**Unless** the error is a ``SystemExit``, in that case no traceback is " +"printed and the Python process will exit with the error code specified by " +"the ``SystemExit`` instance." +msgstr "" + +msgid "" +"Call this function **only** when the error indicator is set. Otherwise it " +"will cause a fatal error!" +msgstr "" + +msgid "" +"If *set_sys_last_vars* is nonzero, the variable :data:`sys.last_exc` is set " +"to the printed exception. For backwards compatibility, the deprecated " +"variables :data:`sys.last_type`, :data:`sys.last_value` and :data:`sys." +"last_traceback` are also set to the type, value and traceback of this " +"exception, respectively." +msgstr "" + +msgid "The setting of :data:`sys.last_exc` was added." +msgstr "" + +msgid "Alias for ``PyErr_PrintEx(1)``." +msgstr "" + +msgid "" +"Call :func:`sys.unraisablehook` using the current exception and *obj* " +"argument." +msgstr "" + +msgid "" +"This utility function prints a warning message to ``sys.stderr`` when an " +"exception has been set but it is impossible for the interpreter to actually " +"raise the exception. It is used, for example, when an exception occurs in " +"an :meth:`~object.__del__` method." +msgstr "" + +msgid "" +"The function is called with a single argument *obj* that identifies the " +"context in which the unraisable exception occurred. If possible, the repr of " +"*obj* will be printed in the warning message. If *obj* is ``NULL``, only the " +"traceback is printed." +msgstr "" + +msgid "An exception must be set when calling this function." +msgstr "" + +msgid "Print a traceback. Print only traceback if *obj* is ``NULL``." +msgstr "" + +msgid "Use :func:`sys.unraisablehook`." +msgstr "" + +msgid "" +"Similar to :c:func:`PyErr_WriteUnraisable`, but the *format* and subsequent " +"parameters help format the warning message; they have the same meaning and " +"values as in :c:func:`PyUnicode_FromFormat`. ``PyErr_WriteUnraisable(obj)`` " +"is roughly equivalent to ``PyErr_FormatUnraisable(\"Exception ignored in: " +"%R\", obj)``. If *format* is ``NULL``, only the traceback is printed." +msgstr "" + +msgid "" +"Print the standard traceback display of ``exc`` to ``sys.stderr``, including " +"chained exceptions and notes." +msgstr "" + +msgid "Raising exceptions" +msgstr "" + +msgid "" +"These functions help you set the current thread's error indicator. For " +"convenience, some of these functions will always return a ``NULL`` pointer " +"for use in a ``return`` statement." +msgstr "" + +msgid "" +"This is the most common way to set the error indicator. The first argument " +"specifies the exception type; it is normally one of the standard exceptions, " +"e.g. :c:data:`PyExc_RuntimeError`. You need not create a new :term:`strong " +"reference` to it (e.g. with :c:func:`Py_INCREF`). The second argument is an " +"error message; it is decoded from ``'utf-8'``." +msgstr "" + +msgid "" +"This function is similar to :c:func:`PyErr_SetString` but lets you specify " +"an arbitrary Python object for the \"value\" of the exception." +msgstr "" + +msgid "" +"This function sets the error indicator and returns ``NULL``. *exception* " +"should be a Python exception class. The *format* and subsequent parameters " +"help format the error message; they have the same meaning and values as in :" +"c:func:`PyUnicode_FromFormat`. *format* is an ASCII-encoded string." +msgstr "" + +msgid "" +"Same as :c:func:`PyErr_Format`, but taking a :c:type:`va_list` argument " +"rather than a variable number of arguments." +msgstr "" + +msgid "This is a shorthand for ``PyErr_SetObject(type, Py_None)``." +msgstr "" + +msgid "" +"This is a shorthand for ``PyErr_SetString(PyExc_TypeError, message)``, where " +"*message* indicates that a built-in operation was invoked with an illegal " +"argument. It is mostly for internal use." +msgstr "" + +msgid "" +"This is a shorthand for ``PyErr_SetNone(PyExc_MemoryError)``; it returns " +"``NULL`` so an object allocation function can write ``return " +"PyErr_NoMemory();`` when it runs out of memory." +msgstr "" + +msgid "" +"This is a convenience function to raise an exception when a C library " +"function has returned an error and set the C variable :c:data:`errno`. It " +"constructs a tuple object whose first item is the integer :c:data:`errno` " +"value and whose second item is the corresponding error message (gotten from :" +"c:func:`!strerror`), and then calls ``PyErr_SetObject(type, object)``. On " +"Unix, when the :c:data:`errno` value is :c:macro:`!EINTR`, indicating an " +"interrupted system call, this calls :c:func:`PyErr_CheckSignals`, and if " +"that set the error indicator, leaves it set to that. The function always " +"returns ``NULL``, so a wrapper function around a system call can write " +"``return PyErr_SetFromErrno(type);`` when the system call returns an error." +msgstr "" + +msgid "" +"Similar to :c:func:`PyErr_SetFromErrno`, with the additional behavior that " +"if *filenameObject* is not ``NULL``, it is passed to the constructor of " +"*type* as a third parameter. In the case of :exc:`OSError` exception, this " +"is used to define the :attr:`!filename` attribute of the exception instance." +msgstr "" + +msgid "" +"Similar to :c:func:`PyErr_SetFromErrnoWithFilenameObject`, but takes a " +"second filename object, for raising errors when a function that takes two " +"filenames fails." +msgstr "" + +msgid "" +"Similar to :c:func:`PyErr_SetFromErrnoWithFilenameObject`, but the filename " +"is given as a C string. *filename* is decoded from the :term:`filesystem " +"encoding and error handler`." +msgstr "" + +msgid "" +"This is a convenience function to raise :exc:`OSError`. If called with " +"*ierr* of ``0``, the error code returned by a call to :c:func:`!" +"GetLastError` is used instead. It calls the Win32 function :c:func:`!" +"FormatMessage` to retrieve the Windows description of error code given by " +"*ierr* or :c:func:`!GetLastError`, then it constructs a :exc:`OSError` " +"object with the :attr:`~OSError.winerror` attribute set to the error code, " +"the :attr:`~OSError.strerror` attribute set to the corresponding error " +"message (gotten from :c:func:`!FormatMessage`), and then calls " +"``PyErr_SetObject(PyExc_OSError, object)``. This function always returns " +"``NULL``." +msgstr "" + +msgid "Availability" +msgstr "" + +msgid "" +"Similar to :c:func:`PyErr_SetFromWindowsErr`, with an additional parameter " +"specifying the exception type to be raised." +msgstr "" + +msgid "" +"Similar to :c:func:`PyErr_SetFromWindowsErr`, with the additional behavior " +"that if *filename* is not ``NULL``, it is decoded from the filesystem " +"encoding (:func:`os.fsdecode`) and passed to the constructor of :exc:" +"`OSError` as a third parameter to be used to define the :attr:`!filename` " +"attribute of the exception instance." +msgstr "" + +msgid "" +"Similar to :c:func:`PyErr_SetExcFromWindowsErr`, with the additional " +"behavior that if *filename* is not ``NULL``, it is passed to the constructor " +"of :exc:`OSError` as a third parameter to be used to define the :attr:`!" +"filename` attribute of the exception instance." +msgstr "" + +msgid "" +"Similar to :c:func:`PyErr_SetExcFromWindowsErrWithFilenameObject`, but " +"accepts a second filename object." +msgstr "" + +msgid "" +"Similar to :c:func:`PyErr_SetFromWindowsErrWithFilename`, with an additional " +"parameter specifying the exception type to be raised." +msgstr "" + +msgid "" +"This is a convenience function to raise :exc:`ImportError`. *msg* will be " +"set as the exception's message string. *name* and *path*, both of which can " +"be ``NULL``, will be set as the :exc:`ImportError`'s respective ``name`` and " +"``path`` attributes." +msgstr "" + +msgid "" +"Much like :c:func:`PyErr_SetImportError` but this function allows for " +"specifying a subclass of :exc:`ImportError` to raise." +msgstr "" + +msgid "" +"Set file, line, and offset information for the current exception. If the " +"current exception is not a :exc:`SyntaxError`, then it sets additional " +"attributes, which make the exception printing subsystem think the exception " +"is a :exc:`SyntaxError`." +msgstr "" + +msgid "" +"Similar to :c:func:`PyErr_SyntaxLocationObject`, but also sets the " +"*end_lineno* and *end_col_offset* information for the current exception." +msgstr "" + +msgid "" +"Like :c:func:`PyErr_SyntaxLocationObject`, but *filename* is a byte string " +"decoded from the :term:`filesystem encoding and error handler`." +msgstr "" + +msgid "" +"Like :c:func:`PyErr_SyntaxLocationEx`, but the *col_offset* parameter is " +"omitted." +msgstr "" + +msgid "" +"This is a shorthand for ``PyErr_SetString(PyExc_SystemError, message)``, " +"where *message* indicates that an internal operation (e.g. a Python/C API " +"function) was invoked with an illegal argument. It is mostly for internal " +"use." +msgstr "" + +msgid "" +"Get the source line in *filename* at line *lineno*. *filename* should be a " +"Python :class:`str` object." +msgstr "" + +msgid "" +"On success, this function returns a Python string object with the found " +"line. On failure, this function returns ``NULL`` without an exception set." +msgstr "" + +msgid "" +"Similar to :c:func:`PyErr_ProgramTextObject`, but *filename* is a :c:expr:" +"`const char *`, which is decoded with the :term:`filesystem encoding and " +"error handler`, instead of a Python object reference." +msgstr "" + +msgid "Issuing warnings" +msgstr "" + +msgid "" +"Use these functions to issue warnings from C code. They mirror similar " +"functions exported by the Python :mod:`warnings` module. They normally " +"print a warning message to *sys.stderr*; however, it is also possible that " +"the user has specified that warnings are to be turned into errors, and in " +"that case they will raise an exception. It is also possible that the " +"functions raise an exception because of a problem with the warning " +"machinery. The return value is ``0`` if no exception is raised, or ``-1`` if " +"an exception is raised. (It is not possible to determine whether a warning " +"message is actually printed, nor what the reason is for the exception; this " +"is intentional.) If an exception is raised, the caller should do its normal " +"exception handling (for example, :c:func:`Py_DECREF` owned references and " +"return an error value)." +msgstr "" + +msgid "" +"Issue a warning message. The *category* argument is a warning category (see " +"below) or ``NULL``; the *message* argument is a UTF-8 encoded string. " +"*stack_level* is a positive number giving a number of stack frames; the " +"warning will be issued from the currently executing line of code in that " +"stack frame. A *stack_level* of 1 is the function calling :c:func:" +"`PyErr_WarnEx`, 2 is the function above that, and so forth." +msgstr "" + +msgid "" +"Warning categories must be subclasses of :c:data:`PyExc_Warning`; :c:data:" +"`PyExc_Warning` is a subclass of :c:data:`PyExc_Exception`; the default " +"warning category is :c:data:`PyExc_RuntimeWarning`. The standard Python " +"warning categories are available as global variables whose names are " +"enumerated at :ref:`standardwarningcategories`." +msgstr "" + +msgid "" +"For information about warning control, see the documentation for the :mod:" +"`warnings` module and the :option:`-W` option in the command line " +"documentation. There is no C API for warning control." +msgstr "" + +msgid "" +"Issue a warning message with explicit control over all warning attributes. " +"This is a straightforward wrapper around the Python function :func:`warnings." +"warn_explicit`; see there for more information. The *module* and *registry* " +"arguments may be set to ``NULL`` to get the default effect described there." +msgstr "" + +msgid "" +"Similar to :c:func:`PyErr_WarnExplicitObject` except that *message* and " +"*module* are UTF-8 encoded strings, and *filename* is decoded from the :term:" +"`filesystem encoding and error handler`." +msgstr "" + +msgid "" +"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 "" + +msgid "" +"Similar to :c:func:`PyErr_WarnExplicit`, but uses :c:func:" +"`PyUnicode_FromFormat` to format the warning message. *format* is an ASCII-" +"encoded string." +msgstr "" + +msgid "" +"Function similar to :c:func:`PyErr_WarnFormat`, but *category* is :exc:" +"`ResourceWarning` and it passes *source* to :class:`!warnings." +"WarningMessage`." +msgstr "" + +msgid "Querying the error indicator" +msgstr "" + +msgid "" +"Test whether the error indicator is set. If set, return the exception " +"*type* (the first argument to the last call to one of the ``PyErr_Set*`` " +"functions or to :c:func:`PyErr_Restore`). If not set, return ``NULL``. You " +"do not own a reference to the return value, so you do not need to :c:func:" +"`Py_DECREF` it." +msgstr "" + +msgid "The caller must have an :term:`attached thread state`." +msgstr "" + +msgid "" +"Do not compare the return value to a specific exception; use :c:func:" +"`PyErr_ExceptionMatches` instead, shown below. (The comparison could easily " +"fail since the exception may be an instance instead of a class, in the case " +"of a class exception, or it may be a subclass of the expected exception.)" +msgstr "" + +msgid "" +"Equivalent to ``PyErr_GivenExceptionMatches(PyErr_Occurred(), exc)``. This " +"should only be called when an exception is actually set; a memory access " +"violation will occur if no exception has been raised." +msgstr "" + +msgid "" +"Return true if the *given* exception matches the exception type in *exc*. " +"If *exc* is a class object, this also returns true when *given* is an " +"instance of a subclass. If *exc* is a tuple, all exception types in the " +"tuple (and recursively in subtuples) are searched for a match." +msgstr "" + +msgid "" +"Return the exception currently being raised, clearing the error indicator at " +"the same time. Return ``NULL`` if the error indicator is not set." +msgstr "" + +msgid "" +"This function is used by code that needs to catch exceptions, or code that " +"needs to save and restore the error indicator temporarily." +msgstr "" + +msgid "For example::" +msgstr "" + +msgid "" +"{\n" +" PyObject *exc = PyErr_GetRaisedException();\n" +"\n" +" /* ... code that might produce other errors ... */\n" +"\n" +" PyErr_SetRaisedException(exc);\n" +"}" +msgstr "" + +msgid "" +":c:func:`PyErr_GetHandledException`, to save the exception currently being " +"handled." +msgstr "" + +msgid "" +"Set *exc* as the exception currently being raised, clearing the existing " +"exception if one is set." +msgstr "" + +msgid "This call steals a reference to *exc*, which must be a valid exception." +msgstr "" + +msgid "Use :c:func:`PyErr_GetRaisedException` instead." +msgstr "" + +msgid "" +"Retrieve the error indicator into three variables whose addresses are " +"passed. If the error indicator is not set, set all three variables to " +"``NULL``. If it is set, it will be cleared and you own a reference to each " +"object retrieved. The value and traceback object may be ``NULL`` even when " +"the type object is not." +msgstr "" + +msgid "" +"This function is normally only used by legacy code that needs to catch " +"exceptions or save and restore the error indicator temporarily." +msgstr "" + +msgid "" +"{\n" +" PyObject *type, *value, *traceback;\n" +" PyErr_Fetch(&type, &value, &traceback);\n" +"\n" +" /* ... code that might produce other errors ... */\n" +"\n" +" PyErr_Restore(type, value, traceback);\n" +"}" +msgstr "" + +msgid "Use :c:func:`PyErr_SetRaisedException` instead." +msgstr "" + +msgid "" +"Set the error indicator from the three objects, *type*, *value*, and " +"*traceback*, clearing the existing exception if one is set. If the objects " +"are ``NULL``, the error indicator is cleared. Do not pass a ``NULL`` type " +"and non-``NULL`` value or traceback. The exception type should be a class. " +"Do not pass an invalid exception type or value. (Violating these rules will " +"cause subtle problems later.) This call takes away a reference to each " +"object: you must own a reference to each object before the call and after " +"the call you no longer own these references. (If you don't understand this, " +"don't use this function. I warned you.)" +msgstr "" + +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 "" + +msgid "" +"Use :c:func:`PyErr_GetRaisedException` instead, to avoid any possible de-" +"normalization." +msgstr "" + +msgid "" +"Under certain circumstances, the values returned by :c:func:`PyErr_Fetch` " +"below can be \"unnormalized\", meaning that ``*exc`` is a class object but " +"``*val`` is not an instance of the same class. This function can be used " +"to instantiate the class in that case. If the values are already " +"normalized, nothing happens. The delayed normalization is implemented to " +"improve performance." +msgstr "" + +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 "" + +msgid "" +"if (tb != NULL) {\n" +" PyException_SetTraceback(val, tb);\n" +"}" +msgstr "" + +msgid "" +"Retrieve the active exception instance, as would be returned by :func:`sys." +"exception`. This refers to an exception that was *already caught*, not to an " +"exception that was freshly raised. Returns a new reference to the exception " +"or ``NULL``. Does not modify the interpreter's exception state." +msgstr "" + +msgid "" +"This function is not normally used by code that wants to handle exceptions. " +"Rather, it can be used when code needs to save and restore the exception " +"state temporarily. Use :c:func:`PyErr_SetHandledException` to restore or " +"clear the exception state." +msgstr "" + +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 "" + +msgid "" +"This function is not normally used by code that wants to handle exceptions. " +"Rather, it can be used when code needs to save and restore the exception " +"state temporarily. Use :c:func:`PyErr_GetHandledException` to get the " +"exception state." +msgstr "" + +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*, " +"not to an exception that was freshly raised. Returns new references for the " +"three objects, any of which may be ``NULL``. Does not modify the exception " +"info state. This function is kept for backwards compatibility. Prefer " +"using :c:func:`PyErr_GetHandledException`." +msgstr "" + +msgid "" +"This function is not normally used by code that wants to handle exceptions. " +"Rather, it can be used when code needs to save and restore the exception " +"state temporarily. Use :c:func:`PyErr_SetExcInfo` to restore or clear the " +"exception state." +msgstr "" + +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`." +msgstr "" + +msgid "" +"This function is not normally used by code that wants to handle exceptions. " +"Rather, it can be used when code needs to save and restore the exception " +"state temporarily. Use :c:func:`PyErr_GetExcInfo` to read the exception " +"state." +msgstr "" + +msgid "" +"The ``type`` and ``traceback`` arguments are no longer used and can be NULL. " +"The interpreter now derives them from the exception instance (the ``value`` " +"argument). The function still steals references of all three arguments." +msgstr "" + +msgid "Signal Handling" +msgstr "" + +msgid "" +"Handle external interruptions, such as signals or activating a debugger, " +"whose processing has been delayed until it is safe to run Python code and/or " +"raise exceptions." +msgstr "" + +msgid "" +"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 "" + +msgid "" +":c:func:`!PyErr_CheckSignals` should be called by long-running C code " +"frequently enough so that the response appears immediate to humans." +msgstr "" + +msgid "Handlers invoked by this function currently include:" +msgstr "" + +msgid "" +"Signal handlers, including Python functions registered using the :mod:" +"`signal` module." +msgstr "" + +msgid "" +"Signal handlers are only run in the main thread of the main interpreter." +msgstr "" + +msgid "" +"(This is where the function got the name: originally, signals were the only " +"way to interrupt the interpreter.)" +msgstr "" + +msgid "Running the garbage collector, if necessary." +msgstr "" + +msgid "Executing a pending :ref:`remote debugger ` script." +msgstr "" + +msgid "Raise the exception set by :c:func:`PyThreadState_SetAsyncExc`." +msgstr "" + +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 "" + +msgid "" +"If all handlers finish successfully, or there are no handlers to run, return " +"``0``." +msgstr "" + +msgid "This function may now invoke the garbage collector." +msgstr "" + +msgid "" +"This function may now execute a remote debugger script, if remote debugging " +"is enabled." +msgstr "" + +msgid "The exception set by :c:func:`PyThreadState_SetAsyncExc` is now raised." +msgstr "" + +msgid "" +"Simulate the effect of a :c:macro:`!SIGINT` signal arriving. This is " +"equivalent to ``PyErr_SetInterruptEx(SIGINT)``." +msgstr "" + +msgid "" +"This function is async-signal-safe. It can be called without an :term:" +"`attached thread state` and from a C signal handler." +msgstr "" + +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 "" + +msgid "" +"This function can be called by C code that sets up its own signal handling " +"and wants Python signal handlers to be invoked as expected when an " +"interruption is requested (for example when the user presses Ctrl-C to " +"interrupt an operation)." +msgstr "" + +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 "" + +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 "" + +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 "" + +msgid "" +"The value ``-1`` disables the feature; this is the initial state. This is " +"equivalent to :func:`signal.set_wakeup_fd` in Python, but without any error " +"checking. *fd* should be a valid file descriptor. The function should only " +"be called from the main thread." +msgstr "" + +msgid "On Windows, the function now also supports socket handles." +msgstr "" + +msgid "Exception Classes" +msgstr "" + +msgid "" +"This utility function creates and returns a new exception class. The *name* " +"argument must be the name of the new exception, a C string of the form " +"``module.classname``. The *base* and *dict* arguments are normally " +"``NULL``. This creates a class object derived from :exc:`Exception` " +"(accessible in C as :c:data:`PyExc_Exception`)." +msgstr "" + +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 " +"to the last part (after the last dot). The *base* argument can be used to " +"specify alternate base classes; it can either be only one class or a tuple " +"of classes. The *dict* argument can be used to specify a dictionary of class " +"variables and methods." +msgstr "" + +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 "" + +msgid "" +"Return non-zero if *ob* is an exception class, zero otherwise. This function " +"always succeeds." +msgstr "" + +msgid "Return :c:member:`~PyTypeObject.tp_name` of the exception class *ob*." +msgstr "" + +msgid "This is a macro including the base fields for an exception object." +msgstr "" + +msgid "" +"This was included in Python's C API by mistake and is not designed for use " +"in extensions. For creating custom exception objects, use :c:func:" +"`PyErr_NewException` or otherwise create a class inheriting from :c:data:" +"`PyExc_BaseException`." +msgstr "" + +msgid "Exception Objects" +msgstr "" + +msgid "" +"Return true if *op* is an instance of :class:`BaseException`, false " +"otherwise. This function always succeeds." +msgstr "" + +msgid "Equivalent to :c:func:`Py_TYPE(op) `." +msgstr "" + +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 "" + +msgid "" +"Set the traceback associated with the exception to *tb*. Use ``Py_None`` to " +"clear it." +msgstr "" + +msgid "" +"Return the context (another exception instance during whose handling *ex* " +"was raised) associated with the exception as a new reference, as accessible " +"from Python through the :attr:`~BaseException.__context__` attribute. If " +"there is no context associated, this returns ``NULL``." +msgstr "" + +msgid "" +"Set the context associated with the exception to *ctx*. Use ``NULL`` to " +"clear it. There is no type check to make sure that *ctx* is an exception " +"instance. This steals a reference to *ctx*." +msgstr "" + +msgid "" +"Return the cause (either an exception instance, or ``None``, set by " +"``raise ... from ...``) associated with the exception as a new reference, as " +"accessible from Python through the :attr:`~BaseException.__cause__` " +"attribute." +msgstr "" + +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*." +msgstr "" + +msgid "" +"The :attr:`~BaseException.__suppress_context__` attribute is implicitly set " +"to ``True`` by this function." +msgstr "" + +msgid "Return :attr:`~BaseException.args` of exception *ex*." +msgstr "" + +msgid "Set :attr:`~BaseException.args` of exception *ex* to *args*." +msgstr "" + +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 " +"the exceptions that need to be raised. This list contains the unhandled part " +"of *orig*, if any, as well as the exceptions that were raised from the :" +"keyword:`!except*` clauses (so they have a different traceback from *orig*) " +"and those that were reraised (and have the same traceback as *orig*). Return " +"the :exc:`ExceptionGroup` that needs to be reraised in the end, or ``None`` " +"if there is nothing to reraise." +msgstr "" + +msgid "Unicode Exception Objects" +msgstr "" + +msgid "" +"The following functions are used to create and modify Unicode exceptions " +"from C." +msgstr "" + +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 "" + +msgid "Return the *encoding* attribute of the given exception object." +msgstr "" + +msgid "Return the *object* attribute of the given exception object." +msgstr "" + +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 "" + +msgid "" +"If the :attr:`UnicodeError.object` is an empty sequence, the resulting " +"*start* is ``0``. Otherwise, it is clipped to ``[0, len(object) - 1]``." +msgstr "" + +msgid ":attr:`UnicodeError.start`" +msgstr "" + +msgid "" +"Set the *start* attribute of the given exception object to *start*. Return " +"``0`` on success, ``-1`` on failure." +msgstr "" + +msgid "" +"While passing a negative *start* does not raise an exception, the " +"corresponding getters will not consider it as a relative offset." +msgstr "" + +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 "" + +msgid "" +"If the :attr:`UnicodeError.object` is an empty sequence, the resulting *end* " +"is ``0``. Otherwise, it is clipped to ``[1, len(object)]``." +msgstr "" + +msgid "" +"Set the *end* attribute of the given exception object to *end*. Return " +"``0`` on success, ``-1`` on failure." +msgstr "" + +msgid ":attr:`UnicodeError.end`" +msgstr "" + +msgid "Return the *reason* attribute of the given exception object." +msgstr "" + +msgid "" +"Set the *reason* attribute of the given exception object to *reason*. " +"Return ``0`` on success, ``-1`` on failure." +msgstr "" + +msgid "Recursion Control" +msgstr "" + +msgid "" +"These two functions provide a way to perform safe recursive calls at the C " +"level, both in the core and in extension modules. They are needed if the " +"recursive code does not necessarily invoke Python code (which tracks its " +"recursion depth automatically). They are also not needed for *tp_call* " +"implementations because the :ref:`call protocol ` takes care of " +"recursion handling." +msgstr "" + +msgid "Marks a point where a recursive C-level call is about to be performed." +msgstr "" + +msgid "" +"The function then checks if the stack limit is reached. If this is the " +"case, a :exc:`RecursionError` is set and a nonzero value is returned. " +"Otherwise, zero is returned." +msgstr "" + +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 "" + +msgid "The :c:func:`PyUnstable_ThreadState_SetStackProtection` function." +msgstr "" + +msgid "" +"This function is now also available in the :ref:`limited API `." +msgstr "" + +msgid "" +"Ends a :c:func:`Py_EnterRecursiveCall`. Must be called once for each " +"*successful* invocation of :c:func:`Py_EnterRecursiveCall`." +msgstr "" + +msgid "" +"Properly implementing :c:member:`~PyTypeObject.tp_repr` for container types " +"requires special recursion handling. In addition to protecting the stack, :" +"c:member:`~PyTypeObject.tp_repr` also needs to track objects to prevent " +"cycles. The following two functions facilitate this functionality. " +"Effectively, these are the C equivalent to :func:`reprlib.recursive_repr`." +msgstr "" + +msgid "" +"Called at the beginning of the :c:member:`~PyTypeObject.tp_repr` " +"implementation to detect cycles." +msgstr "" + +msgid "" +"If the object has already been processed, the function returns a positive " +"integer. In that case the :c:member:`~PyTypeObject.tp_repr` implementation " +"should return a string object indicating a cycle. As examples, :class:" +"`dict` objects return ``{...}`` and :class:`list` objects return ``[...]``." +msgstr "" + +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 "" + +msgid "" +"Otherwise, the function returns zero and the :c:member:`~PyTypeObject." +"tp_repr` implementation can continue normally." +msgstr "" + +msgid "" +"Ends a :c:func:`Py_ReprEnter`. Must be called once for each invocation of :" +"c:func:`Py_ReprEnter` that returns zero." +msgstr "" + +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 "" + +msgid "" +"This function cannot fail, and the caller must hold an :term:`attached " +"thread state`." +msgstr "" + +msgid ":py:func:`sys.getrecursionlimit`" +msgstr "" + +msgid "Set the recursion limit for the current interpreter." +msgstr "" + +msgid ":py:func:`sys.setrecursionlimit`" +msgstr "" + +msgid "Exception and warning types" +msgstr "" + +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 "" + +msgid "For completeness, here are all the variables:" +msgstr "" + +msgid "Exception types" +msgstr "" + +msgid "C name" +msgstr "" + +msgid "Python name" +msgstr "" + +msgid ":exc:`BaseException`" +msgstr "" + +msgid ":exc:`BaseExceptionGroup`" +msgstr "" + +msgid ":exc:`Exception`" +msgstr "" + +msgid ":exc:`ArithmeticError`" +msgstr "" + +msgid ":exc:`AssertionError`" +msgstr "" + +msgid ":exc:`AttributeError`" +msgstr "" + +msgid ":exc:`BlockingIOError`" +msgstr "" + +msgid ":exc:`BrokenPipeError`" +msgstr "" + +msgid ":exc:`BufferError`" +msgstr "" + +msgid ":exc:`ChildProcessError`" +msgstr "" + +msgid ":exc:`ConnectionAbortedError`" +msgstr "" + +msgid ":exc:`ConnectionError`" +msgstr "" + +msgid ":exc:`ConnectionRefusedError`" +msgstr "" + +msgid ":exc:`ConnectionResetError`" +msgstr "" + +msgid ":exc:`EOFError`" +msgstr "" + +msgid ":exc:`FileExistsError`" +msgstr "" + +msgid ":exc:`FileNotFoundError`" +msgstr "" + +msgid ":exc:`FloatingPointError`" +msgstr "" + +msgid ":exc:`GeneratorExit`" +msgstr "" + +msgid ":exc:`ImportCycleError`" +msgstr "" + +msgid ":exc:`ImportError`" +msgstr "" + +msgid ":exc:`IndentationError`" +msgstr "" + +msgid ":exc:`IndexError`" +msgstr "" + +msgid ":exc:`InterruptedError`" +msgstr "" + +msgid ":exc:`IsADirectoryError`" +msgstr "" + +msgid ":exc:`KeyError`" +msgstr "" + +msgid ":exc:`KeyboardInterrupt`" +msgstr "" + +msgid ":exc:`LookupError`" +msgstr "" + +msgid ":exc:`MemoryError`" +msgstr "" + +msgid ":exc:`ModuleNotFoundError`" +msgstr "" + +msgid ":exc:`NameError`" +msgstr "" + +msgid ":exc:`NotADirectoryError`" +msgstr "" + +msgid ":exc:`NotImplementedError`" +msgstr "" + +msgid ":exc:`OSError`" +msgstr "" + +msgid ":exc:`OverflowError`" +msgstr "" + +msgid ":exc:`PermissionError`" +msgstr "" + +msgid ":exc:`ProcessLookupError`" +msgstr "" + +msgid ":exc:`PythonFinalizationError`" +msgstr "" + +msgid ":exc:`RecursionError`" +msgstr "" + +msgid ":exc:`ReferenceError`" +msgstr "" + +msgid ":exc:`RuntimeError`" +msgstr "" + +msgid ":exc:`StopAsyncIteration`" +msgstr "" + +msgid ":exc:`StopIteration`" +msgstr "" + +msgid ":exc:`SyntaxError`" +msgstr "" + +msgid ":exc:`SystemError`" +msgstr "" + +msgid ":exc:`SystemExit`" +msgstr "" + +msgid ":exc:`TabError`" +msgstr "" + +msgid ":exc:`TimeoutError`" +msgstr "" + +msgid ":exc:`TypeError`" +msgstr "" + +msgid ":exc:`UnboundLocalError`" +msgstr "" + +msgid ":exc:`UnicodeDecodeError`" +msgstr "" + +msgid ":exc:`UnicodeEncodeError`" +msgstr "" + +msgid ":exc:`UnicodeError`" +msgstr "" + +msgid ":exc:`UnicodeTranslateError`" +msgstr "" + +msgid ":exc:`ValueError`" +msgstr "" + +msgid ":exc:`ZeroDivisionError`" +msgstr "" + +msgid "" +":c:data:`PyExc_BlockingIOError`, :c:data:`PyExc_BrokenPipeError`, :c:data:" +"`PyExc_ChildProcessError`, :c:data:`PyExc_ConnectionError`, :c:data:" +"`PyExc_ConnectionAbortedError`, :c:data:`PyExc_ConnectionRefusedError`, :c:" +"data:`PyExc_ConnectionResetError`, :c:data:`PyExc_FileExistsError`, :c:data:" +"`PyExc_FileNotFoundError`, :c:data:`PyExc_InterruptedError`, :c:data:" +"`PyExc_IsADirectoryError`, :c:data:`PyExc_NotADirectoryError`, :c:data:" +"`PyExc_PermissionError`, :c:data:`PyExc_ProcessLookupError` and :c:data:" +"`PyExc_TimeoutError` were introduced following :pep:`3151`." +msgstr "" + +msgid ":c:data:`PyExc_StopAsyncIteration` and :c:data:`PyExc_RecursionError`." +msgstr "" + +msgid ":c:data:`PyExc_ModuleNotFoundError`." +msgstr "" + +msgid ":c:data:`PyExc_BaseExceptionGroup`." +msgstr "" + +msgid "OSError aliases" +msgstr "" + +msgid "The following are a compatibility aliases to :c:data:`PyExc_OSError`." +msgstr "" + +msgid "These aliases used to be separate exception types." +msgstr "" + +msgid "Notes" +msgstr "" + +msgid "[win]_" +msgstr "" + +msgid "Notes:" +msgstr "" + +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 "" + +msgid "Warning types" +msgstr "" + +msgid ":exc:`Warning`" +msgstr "" + +msgid ":exc:`BytesWarning`" +msgstr "" + +msgid ":exc:`DeprecationWarning`" +msgstr "" + +msgid ":exc:`EncodingWarning`" +msgstr "" + +msgid ":exc:`FutureWarning`" +msgstr "" + +msgid ":exc:`ImportWarning`" +msgstr "" + +msgid ":exc:`PendingDeprecationWarning`" +msgstr "" + +msgid ":exc:`ResourceWarning`" +msgstr "" + +msgid ":exc:`RuntimeWarning`" +msgstr "" + +msgid ":exc:`SyntaxWarning`" +msgstr "" + +msgid ":exc:`UnicodeWarning`" +msgstr "" + +msgid ":exc:`UserWarning`" +msgstr "" + +msgid ":c:data:`PyExc_ResourceWarning`." +msgstr "" + +msgid ":c:data:`PyExc_EncodingWarning`." +msgstr "" + +msgid "Tracebacks" +msgstr "" + +msgid "" +"Type object for traceback objects. This is available as :class:`types." +"TracebackType` in the Python layer." +msgstr "" + +msgid "" +"Return true if *op* is a traceback object, false otherwise. This function " +"does not account for subtypes." +msgstr "" + +msgid "" +"Replace the :attr:`~BaseException.__traceback__` attribute on the current " +"exception with a new traceback prepending *f* to the existing chain." +msgstr "" + +msgid "Calling this function without an exception set is undefined behavior." +msgstr "" + +msgid "" +"This function returns ``0`` on success, and returns ``-1`` with an exception " +"set on failure." +msgstr "" + +msgid "Write the traceback *tb* into the file *f*." +msgstr "" + +msgid "" +"Write a trace of the Python stack in *tstate* into the file *fd*. The " +"format looks like::" +msgstr "" + +msgid "" +"Traceback (most recent call first):\n" +" File \"xxx\", line xxx in \n" +" File \"xxx\", line xxx in \n" +" ...\n" +" File \"xxx\", line xxx in " +msgstr "" + +msgid "" +"This function is meant to debug situations such as segfaults, fatal errors, " +"and similar. The file and function names it outputs are encoded to ASCII " +"with backslashreplace and truncated to 500 characters. It writes only the " +"first 100 frames; further frames are truncated with the line ``...``." +msgstr "" + +msgid "" +"This function will return ``NULL`` on success, or an error message on error." +msgstr "" + +msgid "" +"This function is intended for use in crash scenarios such as signal handlers " +"for SIGSEGV, where the interpreter may be in an inconsistent state. Given " +"that it reads interpreter data structures that may be partially modified, " +"the function might produce incomplete output or it may even crash itself." +msgstr "" + +msgid "" +"The caller does not need to hold an :term:`attached thread state`, nor does " +"*tstate* need to be attached." +msgstr "" + +msgid "Write the traces of all Python threads in *interp* into the file *fd*." +msgstr "" + +msgid "" +"If *interp* is ``NULL`` then this function will try to identify the current " +"interpreter using thread-specific storage. If it cannot, it will return an " +"error." +msgstr "" + +msgid "" +"If *current_tstate* is not ``NULL`` then it will be used to identify what " +"the current thread is in the written output. If it is ``NULL`` then this " +"function will identify the current thread using thread-specific storage. It " +"is not an error if the function is unable to get the current Python thread " +"state." +msgstr "" + +msgid "" +"This function is meant to debug situations such as segfaults, fatal errors, " +"and similar. It calls :c:func:`PyUnstable_DumpTraceback` for each thread. It " +"only writes the tracebacks of the first *max_threads* threads, further " +"output is truncated with the line ``...``. If *max_threads* is 0, the " +"function will use a default value of 100 for the argument." +msgstr "" + +msgid "" +"The caller does not need to hold an :term:`attached thread state`, nor does " +"*current_tstate* need to be attached." +msgstr "" + +msgid "" +"On the :term:`free-threaded build`, this function is not thread-safe. If " +"another thread deletes its :term:`thread state` while this function is being " +"called, the process will likely crash." +msgstr "" + +msgid "strerror (C function)" +msgstr "" + +msgid "module" +msgstr "" + +msgid "signal" +msgstr "" + +msgid "SIGINT (C macro)" +msgstr "" + +msgid "KeyboardInterrupt (built-in exception)" +msgstr "" diff --git a/c-api/extension-modules.po b/c-api/extension-modules.po new file mode 100644 index 00000000..0837dc60 --- /dev/null +++ b/c-api/extension-modules.po @@ -0,0 +1,416 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Defining extension modules" +msgstr "" + +msgid "" +"A C extension for CPython is a shared library (for example, a ``.so`` file " +"on Linux, ``.pyd`` DLL on Windows), which is loadable into the Python " +"process (for example, it is compiled with compatible compiler settings), and " +"which exports an :dfn:`export hook` function (or an old-style :ref:" +"`initialization function `)." +msgstr "" + +msgid "" +"To be importable by default (that is, by :py:class:`importlib.machinery." +"ExtensionFileLoader`), the shared library must be available on :py:attr:`sys." +"path`, and must be named after the module name plus an extension listed in :" +"py:attr:`importlib.machinery.EXTENSION_SUFFIXES`." +msgstr "" + +msgid "" +"Building, packaging and distributing extension modules is best done with " +"third-party tools, and is out of scope of this document. One suitable tool " +"is Setuptools, whose documentation can be found at https://setuptools.pypa." +"io/en/latest/setuptools.html." +msgstr "" + +msgid "Extension export hook" +msgstr "" + +msgid "" +"Support for the :samp:`PyModExport_{}` export hook was added in Python " +"3.15. The older way of defining modules is still available: consult either " +"the :ref:`extension-pyinit` section or earlier versions of this " +"documentation if you plan to support earlier Python versions." +msgstr "" + +msgid "" +"The export hook must be an exported function with the following signature:" +msgstr "" + +msgid "" +"For modules with ASCII-only names, the :ref:`export hook ` must be named :samp:`PyModExport_{}`, with ```` replaced " +"by the module's name." +msgstr "" + +msgid "" +"For non-ASCII module names, the export hook must instead be named :samp:" +"`PyModExportU_{}` (note the ``U``), with ```` encoded using " +"Python's *punycode* encoding with hyphens replaced by underscores. In Python:" +msgstr "" + +msgid "" +"def hook_name(name):\n" +" try:\n" +" suffix = b'_' + name.encode('ascii')\n" +" except UnicodeEncodeError:\n" +" suffix = b'U_' + name.encode('punycode').replace(b'-', b'_')\n" +" return b'PyModExport' + suffix" +msgstr "" + +msgid "" +"The export hook returns an array of :c:type:`PySlot` entries, terminated by " +"an entry with a slot ID of ``0``. These slots describe how the module should " +"be created and initialized." +msgstr "" + +msgid "" +"This array must remain valid and constant until interpreter shutdown. " +"Typically, it should use ``static`` storage. Prefer using the :c:macro:" +"`Py_mod_create` and :c:macro:`Py_mod_exec` slots for any dynamic behavior." +msgstr "" + +msgid "" +"The export hook may return ``NULL`` with an exception set to signal failure." +msgstr "" + +msgid "" +"It is recommended to define the export hook function using a helper macro:" +msgstr "" + +msgid "Declare an extension module export hook. This macro:" +msgstr "" + +msgid "specifies the :c:expr:`PySlot*` return type," +msgstr "" + +msgid "adds any special linkage declarations required by the platform, and" +msgstr "" + +msgid "for C++, declares the function as ``extern \"C\"``." +msgstr "" + +msgid "For example, a module called ``spam`` would be defined like this::" +msgstr "" + +msgid "" +"PyABIInfo_VAR(abi_info);\n" +"\n" +"static PySlot spam_slots[] = {\n" +" PySlot_STATIC_DATA(Py_mod_abi, &abi_info),\n" +" PySlot_STATIC_DATA(Py_mod_name, \"spam\"),\n" +" PySlot_FUNC(Py_mod_init, spam_init_function),\n" +" ...\n" +" PySlot_END\n" +"};\n" +"\n" +"PyMODEXPORT_FUNC\n" +"PyModExport_spam(void)\n" +"{\n" +" return spam_slots;\n" +"}" +msgstr "" + +msgid "" +"The export hook is typically the only non-\\ ``static`` item defined in the " +"module's C source." +msgstr "" + +msgid "" +"The hook should be kept short -- ideally, one line as above. If you do need " +"to use Python C API in this function, it is recommended to call " +"``PyABIInfo_Check(&abi_info, \"modulename\")`` first to raise an exception, " +"rather than crash, in common cases of ABI mismatch." +msgstr "" + +msgid "" +"It is possible to export multiple modules from a single shared library by " +"defining multiple export hooks. However, importing them requires a custom " +"importer or suitably named copies/links of the extension file, because " +"Python's import machinery only finds the function corresponding to the " +"filename. See the `Multiple modules in one library `__ section in :pep:`489` for " +"details." +msgstr "" + +msgid "Multi-phase initialization" +msgstr "" + +msgid "The process of creating an extension module follows several phases:" +msgstr "" + +msgid "" +"Python finds and calls the export hook to get information on how to create " +"the module." +msgstr "" + +msgid "" +"Before any substantial code is executed, Python can determine which " +"capabilities the module supports, and it can adjust the environment or " +"refuse loading an incompatible extension. Slots like :c:data:`Py_mod_abi`, :" +"c:data:`Py_mod_gil` and :c:data:`Py_mod_multiple_interpreters` influence " +"this step." +msgstr "" + +msgid "" +"By default, Python itself then creates the module object -- that is, it does " +"the equivalent of calling :py:meth:`~object.__new__` when creating an " +"object. This step can be overridden using the :c:data:`Py_mod_create` slot." +msgstr "" + +msgid "" +"Python sets initial module attributes like :attr:`~module.__package__` and :" +"attr:`~module.__loader__`, and inserts the module object into :py:attr:`sys." +"modules`." +msgstr "" + +msgid "" +"Afterwards, the module object is initialized in an extension-specific way -- " +"the equivalent of :py:meth:`~object.__init__` when creating an object, or of " +"executing top-level code in a Python-language module. The behavior is " +"specified using the :c:data:`Py_mod_exec` slot." +msgstr "" + +msgid "" +"This is called *multi-phase initialization* to distinguish it from the " +"legacy (but still supported) :ref:`single-phase initialization `, where an initialization function returns a fully " +"constructed module." +msgstr "" + +msgid "Added support for multi-phase initialization (:pep:`489`)." +msgstr "" + +msgid "Multiple module instances" +msgstr "" + +msgid "" +"By default, extension modules are not singletons. For example, if the :py:" +"attr:`sys.modules` entry is removed and the module is re-imported, a new " +"module object is created and, typically, populated with fresh method and " +"type objects. The old module is subject to normal garbage collection. This " +"mirrors the behavior of pure-Python modules." +msgstr "" + +msgid "" +"Additional module instances may be created in :ref:`sub-interpreters ` or after Python runtime reinitialization (:c:func:" +"`Py_Finalize` and :c:func:`Py_Initialize`). In these cases, sharing Python " +"objects between module instances would likely cause crashes or undefined " +"behavior." +msgstr "" + +msgid "" +"To avoid such issues, each instance of an extension module should be " +"*isolated*: changes to one instance should not implicitly affect the others, " +"and all state owned by the module, including references to Python objects, " +"should be specific to a particular module instance. See :ref:`isolating-" +"extensions-howto` for more details and a practical guide." +msgstr "" + +msgid "" +"A simpler way to avoid these issues is :ref:`raising an error on repeated " +"initialization `." +msgstr "" + +msgid "" +"All modules are expected to support :ref:`sub-interpreters `, or otherwise explicitly signal a lack of support. This is usually " +"achieved by isolation or blocking repeated initialization, as above. A " +"module may also be limited to the main interpreter using the :c:data:" +"`Py_mod_multiple_interpreters` slot." +msgstr "" + +msgid "``PyInit`` function" +msgstr "" + +msgid "" +"This functionality will not get new features, but there are no plans to " +"remove it." +msgstr "" + +msgid "" +"Instead of :c:func:`PyModExport_modulename`, an extension module can define " +"an older-style :dfn:`initialization function` with the signature:" +msgstr "" + +msgid "" +"Its name should be :samp:`PyInit_{}`, with ```` replaced by the " +"name of the module. For non-ASCII module names, use :samp:`PyInitU_{}` " +"instead, with ```` encoded in the same way as for the :ref:`export " +"hook ` (that is, using Punycode with underscores)." +msgstr "" + +msgid "" +"If a module exports both :samp:`PyInit_{}` and :samp:" +"`PyModExport_{}`, the :samp:`PyInit_{}` function is ignored." +msgstr "" + +msgid "" +"Like with :c:macro:`PyMODEXPORT_FUNC`, it is recommended to define the " +"initialization function using a helper macro:" +msgstr "" + +msgid "Declare an extension module initialization function. This macro:" +msgstr "" + +msgid "specifies the :c:expr:`PyObject*` return type," +msgstr "" + +msgid "" +"Normally, the initialization function (``PyInit_modulename``) returns a :c:" +"type:`PyModuleDef` instance with non-``NULL`` :c:member:`~PyModuleDef." +"m_slots`. This allows Python to use :ref:`multi-phase initialization `." +msgstr "" + +msgid "" +"Before it is returned, the ``PyModuleDef`` instance must be initialized " +"using the following function:" +msgstr "" + +msgid "" +"Ensure a module definition is a properly initialized Python object that " +"correctly reports its type and a reference count." +msgstr "" + +msgid "Return *def* cast to ``PyObject*``, or ``NULL`` if an error occurred." +msgstr "" + +msgid "" +"Calling this function is required before returning a :c:type:`PyModuleDef` " +"from a module initialization function. It should not be used in other " +"contexts." +msgstr "" + +msgid "" +"Note that Python assumes that ``PyModuleDef`` structures are statically " +"allocated. This function may return either a new reference or a borrowed " +"one; this reference must not be released." +msgstr "" + +msgid "" +"static struct PyModuleDef spam_module = {\n" +" .m_base = PyModuleDef_HEAD_INIT,\n" +" .m_name = \"spam\",\n" +" ...\n" +"};\n" +"\n" +"PyMODINIT_FUNC\n" +"PyInit_spam(void)\n" +"{\n" +" return PyModuleDef_Init(&spam_module);\n" +"}" +msgstr "" + +msgid "Legacy single-phase initialization" +msgstr "" + +msgid "" +"Single-phase initialization is a legacy mechanism to initialize extension " +"modules, with known drawbacks and design flaws. Extension module authors are " +"encouraged to use multi-phase initialization instead." +msgstr "" + +msgid "However, there are no plans to remove support for it." +msgstr "" + +msgid "" +"In single-phase initialization, the old-style :ref:`initialization function " +"` (``PyInit_modulename``) should create, populate and " +"return a module object. This is typically done using :c:func:" +"`PyModule_Create` and functions like :c:func:`PyModule_AddObjectRef`." +msgstr "" + +msgid "" +"Single-phase initialization differs from the :ref:`default ` in the following ways:" +msgstr "" + +msgid "Single-phase modules are, or rather *contain*, “singletons”." +msgstr "" + +msgid "" +"When the module is first initialized, Python saves the contents of the " +"module's ``__dict__`` (that is, typically, the module's functions and types)." +msgstr "" + +msgid "" +"For subsequent imports, Python does not call the initialization function " +"again. Instead, it creates a new module object with a new ``__dict__``, and " +"copies the saved contents to it. For example, given a single-phase module " +"``_testsinglephase`` [#testsinglephase]_ that defines a function ``sum`` and " +"an exception class ``error``:" +msgstr "" + +msgid "" +">>> import sys\n" +">>> import _testsinglephase as one\n" +">>> del sys.modules['_testsinglephase']\n" +">>> import _testsinglephase as two\n" +">>> one is two\n" +"False\n" +">>> one.__dict__ is two.__dict__\n" +"False\n" +">>> one.sum is two.sum\n" +"True\n" +">>> one.error is two.error\n" +"True" +msgstr "" + +msgid "" +"The exact behavior should be considered a CPython implementation detail." +msgstr "" + +msgid "" +"To work around the fact that ``PyInit_modulename`` does not take a *spec* " +"argument, some state of the import machinery is saved and applied to the " +"first suitable module created during the ``PyInit_modulename`` call. " +"Specifically, when a sub-module is imported, this mechanism prepends the " +"parent package name to the name of the module." +msgstr "" + +msgid "" +"A single-phase ``PyInit_modulename`` function should create “its” module " +"object as soon as possible, before any other module objects can be created." +msgstr "" + +msgid "Non-ASCII module names (``PyInitU_modulename``) are not supported." +msgstr "" + +msgid "" +"Single-phase modules support module lookup functions like :c:func:" +"`PyState_FindModule`." +msgstr "" + +msgid "The module's :c:member:`PyModuleDef.m_slots` must be NULL." +msgstr "" + +msgid "" +"``_testsinglephase`` is an internal module used in CPython's self-test " +"suite; your installation may or may not include it." +msgstr "" diff --git a/c-api/file.po b/c-api/file.po new file mode 100644 index 00000000..aabac202 --- /dev/null +++ b/c-api/file.po @@ -0,0 +1,184 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "File objects" +msgstr "" + +msgid "" +"These APIs are a minimal emulation of the Python 2 C API for built-in file " +"objects, which used to rely on the buffered I/O (:c:expr:`FILE*`) support " +"from the C standard library. In Python 3, files and streams use the new :" +"mod:`io` module, which defines several layers over the low-level unbuffered " +"I/O of the operating system. The functions described below are convenience " +"C wrappers over these new APIs, and meant mostly for internal error " +"reporting in the interpreter; third-party code is advised to access the :mod:" +"`io` APIs instead." +msgstr "" + +msgid "" +"Create a Python file object from the file descriptor of an already opened " +"file *fd*. The arguments *name*, *encoding*, *errors* and *newline* can be " +"``NULL`` to use the defaults; *buffering* can be *-1* to use the default. " +"*name* is ignored and kept for backward compatibility. Return ``NULL`` on " +"failure. For a more comprehensive description of the arguments, please refer " +"to the :func:`io.open` function documentation." +msgstr "" + +msgid "" +"Since Python streams have their own buffering layer, mixing them with OS-" +"level file descriptors can produce various issues (such as unexpected " +"ordering of data)." +msgstr "" + +msgid "Ignore *name* attribute." +msgstr "" + +msgid "" +"Return the file descriptor associated with *p* as an :c:expr:`int`. If the " +"object is an integer, its value is returned. If not, the object's :meth:" +"`~io.IOBase.fileno` method is called if it exists; the method must return an " +"integer, which is returned as the file descriptor value. Sets an exception " +"and returns ``-1`` on failure." +msgstr "" + +msgid "" +"Equivalent to ``p.readline([n])``, this function reads one line from the " +"object *p*. *p* may be a file object or any object with a :meth:`~io.IOBase." +"readline` method. If *n* is ``0``, exactly one line is read, regardless of " +"the length of the line. If *n* is greater than ``0``, no more than *n* " +"bytes will be read from the file; a partial line can be returned. In both " +"cases, an empty string is returned if the end of the file is reached " +"immediately. If *n* is less than ``0``, however, one line is read " +"regardless of length, but :exc:`EOFError` is raised if the end of the file " +"is reached immediately." +msgstr "" + +msgid "" +"Overrides the normal behavior of :func:`io.open_code` to pass its parameter " +"through the provided handler." +msgstr "" + +msgid "The *handler* is a function of type:" +msgstr "" + +msgid "" +"Equivalent of :c:expr:`PyObject *(\\*)(PyObject *path, void *userData)`, " +"where *path* is guaranteed to be :c:type:`PyUnicodeObject`." +msgstr "" + +msgid "" +"The *userData* pointer is passed into the hook function. Since hook " +"functions may be called from different runtimes, this pointer should not " +"refer directly to Python state." +msgstr "" + +msgid "" +"As this hook is intentionally used during import, avoid importing new " +"modules during its execution unless they are known to be frozen or available " +"in ``sys.modules``." +msgstr "" + +msgid "" +"Once a hook has been set, it cannot be removed or replaced, and later calls " +"to :c:func:`PyFile_SetOpenCodeHook` will fail. On failure, the function " +"returns -1 and sets an exception if the interpreter has been initialized." +msgstr "" + +msgid "This function is safe to call before :c:func:`Py_Initialize`." +msgstr "" + +msgid "" +"Raises an :ref:`auditing event ` ``setopencodehook`` with no " +"arguments." +msgstr "" + +msgid "" +"Open *path* with the mode ``'rb'``. *path* must be a Python :class:`str` " +"object. The behavior of this function may be overridden by :c:func:" +"`PyFile_SetOpenCodeHook` to allow for some preprocessing of the text." +msgstr "" + +msgid "This is analogous to :func:`io.open_code` in Python." +msgstr "" + +msgid "" +"On success, this function returns a :term:`strong reference` to a Python " +"file object. On failure, this function returns ``NULL`` with an exception " +"set." +msgstr "" + +msgid "" +"Similar to :c:func:`PyFile_OpenCodeObject`, but *path* is a UTF-8 encoded :c:" +"expr:`const char*`." +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`." +msgstr "" + +msgid "If *obj* is ``NULL``, write the string ``\"\"``." +msgstr "" + +msgid "" +"Return ``0`` on success or ``-1`` on failure; the appropriate exception will " +"be set." +msgstr "" + +msgid "" +"Write string *s* to file object *p*. Return ``0`` on success or ``-1`` on " +"failure; the appropriate exception will be set." +msgstr "" + +msgid "Soft-deprecated API" +msgstr "" + +msgid "" +"These are APIs that were included in Python's C API by mistake. They are " +"documented solely for completeness; use other ``PyFile*`` APIs instead." +msgstr "" + +msgid "" +"Use :c:func:`PyFile_FromFd` with defaults (``fd, NULL, \"w\", -1, NULL, " +"NULL, NULL, 0``) instead." +msgstr "" + +msgid "" +"Type of file-like objects used internally at Python startup when :py:mod:" +"`io` is not yet available. Use Python :py:func:`open` or :c:func:" +"`PyFile_FromFd` to create file objects instead." +msgstr "" + +msgid "object" +msgstr "" + +msgid "file" +msgstr "" + +msgid "EOFError (built-in exception)" +msgstr "" + +msgid "Py_PRINT_RAW (C macro)" +msgstr "" diff --git a/c-api/float.po b/c-api/float.po new file mode 100644 index 00000000..6a103025 --- /dev/null +++ b/c-api/float.po @@ -0,0 +1,275 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Floating-Point Objects" +msgstr "" + +msgid "" +"This subtype of :c:type:`PyObject` represents a Python floating-point object." +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python floating-point " +"type. This is the same object as :class:`float` in the Python layer." +msgstr "" + +msgid "" +"Return true if its argument is a :c:type:`PyFloatObject` or a subtype of :c:" +"type:`PyFloatObject`. This function always succeeds." +msgstr "" + +msgid "" +"Return true if its argument is a :c:type:`PyFloatObject`, but not a subtype " +"of :c:type:`PyFloatObject`. This function always succeeds." +msgstr "" + +msgid "" +"Create a :c:type:`PyFloatObject` object based on the string value in *str*, " +"or ``NULL`` on failure." +msgstr "" + +msgid "" +"Create a :c:type:`PyFloatObject` object from *v*, or ``NULL`` on failure." +msgstr "" + +msgid "" +"Return a C :c:expr:`double` representation of the contents of *pyfloat*. If " +"*pyfloat* is not a Python floating-point object but has a :meth:`~object." +"__float__` method, this method will first be called to convert *pyfloat* " +"into a float. If :meth:`!__float__` is not defined then it falls back to :" +"meth:`~object.__index__`. This method returns ``-1.0`` upon failure, so one " +"should call :c:func:`PyErr_Occurred` to check for errors." +msgstr "" + +msgid "Use :meth:`~object.__index__` if available." +msgstr "" + +msgid "" +"Return a C :c:expr:`double` representation of the contents of *pyfloat*, but " +"without error checking." +msgstr "" + +msgid "" +"Return a structseq instance which contains information about the precision, " +"minimum and maximum values of a float. It's a thin wrapper around the header " +"file :file:`float.h`." +msgstr "" + +msgid "" +"Return the maximum representable finite float *DBL_MAX* as C :c:expr:" +"`double`." +msgstr "" + +msgid "" +"Return the minimum normalized positive float *DBL_MIN* as C :c:expr:`double`." +msgstr "" + +msgid "" +"This macro expands to a constant expression of type :c:expr:`double`, that " +"represents the positive infinity." +msgstr "" + +msgid "" +"It is equivalent to the :c:macro:`!INFINITY` macro from the C11 standard " +"```` header." +msgstr "" + +msgid "" +"This macro expands to a constant expression of type :c:expr:`double`, that " +"represents a quiet not-a-number (qNaN) value." +msgstr "" + +msgid "" +"On most platforms, this is equivalent to the :c:macro:`!NAN` macro from the " +"C11 standard ```` header." +msgstr "" + +msgid "Equivalent to :c:macro:`!INFINITY`." +msgstr "" + +msgid "" +"The definition (accurate for a :c:expr:`double` type) of the :data:`math.e` " +"constant." +msgstr "" + +msgid "High precision (long double) definition of :data:`~math.e` constant." +msgstr "" + +msgid "" +"The definition (accurate for a :c:expr:`double` type) of the :data:`math.pi` " +"constant." +msgstr "" + +msgid "High precision (long double) definition of :data:`~math.pi` constant." +msgstr "" + +msgid "" +"The definition (accurate for a :c:expr:`double` type) of the :data:`math." +"tau` constant." +msgstr "" + +msgid "Return :data:`math.nan` from a function." +msgstr "" + +msgid "" +"On most platforms, this is equivalent to ``return PyFloat_FromDouble(NAN)``." +msgstr "" + +msgid "" +"Return :data:`math.inf` or :data:`-math.inf ` from a function, " +"depending on the sign of *sign*." +msgstr "" + +msgid "On most platforms, this is equivalent to the following::" +msgstr "" + +msgid "return PyFloat_FromDouble(copysign(INFINITY, sign));" +msgstr "" + +msgid "" +"Return ``1`` if the given floating-point number *X* is finite, that is, it " +"is normal, subnormal or zero, but not infinite or NaN. Return ``0`` " +"otherwise." +msgstr "" + +msgid "Use :c:macro:`!isfinite` instead." +msgstr "" + +msgid "" +"Return ``1`` if the given floating-point number *X* is positive or negative " +"infinity. Return ``0`` otherwise." +msgstr "" + +msgid "Use :c:macro:`!isinf` instead." +msgstr "" + +msgid "" +"Return ``1`` if the given floating-point number *X* is a not-a-number (NaN) " +"value. Return ``0`` otherwise." +msgstr "" + +msgid "Use :c:macro:`!isnan` instead." +msgstr "" + +msgid "Pack and Unpack functions" +msgstr "" + +msgid "" +"The pack and unpack functions provide an efficient platform-independent way " +"to store floating-point values as byte strings. The Pack routines produce a " +"bytes string from a C :c:expr:`double`, and the Unpack routines produce a C :" +"c:expr:`double` from such a bytes string. The suffix (2, 4 or 8) specifies " +"the number of bytes in the bytes string:" +msgstr "" + +msgid "The 2-byte format is the IEEE 754 binary16 half-precision format." +msgstr "" + +msgid "The 4-byte format is the IEEE 754 binary32 single-precision format." +msgstr "" + +msgid "The 8-byte format is the IEEE 754 binary64 double-precision format." +msgstr "" + +msgid "" +"The NaN type may not be preserved on some platforms while unpacking " +"(signaling NaNs become quiet NaNs), for example on x86 systems in 32-bit " +"mode." +msgstr "" + +msgid "" +"It's assumed that the :c:expr:`double` type has the IEEE 754 binary64 double " +"precision format. What happens if it's not true is partly accidental " +"(alas). On non-IEEE platforms with more precision, or larger dynamic range, " +"than IEEE 754 supports, not all values can be packed; on non-IEEE platforms " +"with less precision, or smaller dynamic range, not all values can be " +"unpacked. The packing of special numbers like INFs and NaNs (if such things " +"exist on the platform) may not be handled correctly, and attempting to " +"unpack a bytes string containing an IEEE INF or NaN may raise an exception." +msgstr "" + +msgid "Pack functions" +msgstr "" + +msgid "" +"The pack routines write 2, 4 or 8 bytes, starting at *p*. *le* is an :c:expr:" +"`int` argument, non-zero if you want the bytes string in little-endian " +"format (exponent last, at ``p+1``, ``p+3``, or ``p+6`` and ``p+7``), zero if " +"you want big-endian format (exponent first, at *p*). Use the :c:macro:`!" +"PY_LITTLE_ENDIAN` constant to select the native endian: it is equal to ``0`` " +"on big endian processor, or ``1`` on little endian processor." +msgstr "" + +msgid "" +"Return value: ``0`` if all is OK, ``-1`` if error (and an exception is set, " +"most likely :exc:`OverflowError`)." +msgstr "" + +msgid "Pack a C double as the IEEE 754 binary16 half-precision format." +msgstr "" + +msgid "Pack a C double as the IEEE 754 binary32 single precision format." +msgstr "" + +msgid "Pack a C double as the IEEE 754 binary64 double precision format." +msgstr "" + +msgid "This function always succeeds in CPython." +msgstr "" + +msgid "Unpack functions" +msgstr "" + +msgid "" +"The unpack routines read 2, 4 or 8 bytes, starting at *p*. *le* is an :c:" +"expr:`int` argument, non-zero if the bytes string is in little-endian format " +"(exponent last, at ``p+1``, ``p+3`` or ``p+6`` and ``p+7``), zero if big-" +"endian (exponent first, at *p*). Use the :c:macro:`!PY_LITTLE_ENDIAN` " +"constant to select the native endian: it is equal to ``0`` on big endian " +"processor, or ``1`` on little endian processor." +msgstr "" + +msgid "" +"Return value: The unpacked double. On error, this is ``-1.0`` and :c:func:" +"`PyErr_Occurred` is true (and an exception is set, most likely :exc:" +"`OverflowError`)." +msgstr "" + +msgid "These functions always succeed in CPython." +msgstr "" + +msgid "Unpack the IEEE 754 binary16 half-precision format as a C double." +msgstr "" + +msgid "Unpack the IEEE 754 binary32 single precision format as a C double." +msgstr "" + +msgid "Unpack the IEEE 754 binary64 double precision format as a C double." +msgstr "" + +msgid "object" +msgstr "" + +msgid "floating-point" +msgstr "" diff --git a/c-api/frame.po b/c-api/frame.po new file mode 100644 index 00000000..7c20818e --- /dev/null +++ b/c-api/frame.po @@ -0,0 +1,220 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2026 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2026\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Frame objects" +msgstr "" + +msgid "The C structure of the objects used to describe frame objects." +msgstr "" + +msgid "There are no public members in this structure." +msgstr "" + +msgid "" +"The members of this structure were removed from the public C API. Refer to " +"the :ref:`What's New entry ` for details." +msgstr "" + +msgid "" +"The :c:func:`PyEval_GetFrame` and :c:func:`PyThreadState_GetFrame` functions " +"can be used to get a frame object." +msgstr "" + +msgid "See also :ref:`Reflection `." +msgstr "" + +msgid "" +"The type of frame objects. It is the same object as :py:class:`types." +"FrameType` in the Python layer." +msgstr "" + +msgid "" +"Previously, this type was only available after including ````." +msgstr "" + +msgid "" +"Create a new frame object. This function returns a :term:`strong reference` " +"to the new frame object on success, and returns ``NULL`` with an exception " +"set on failure." +msgstr "" + +msgid "Return non-zero if *obj* is a frame object." +msgstr "" + +msgid "" +"Previously, this function was only available after including ````." +msgstr "" + +msgid "Get the *frame* next outer frame." +msgstr "" + +msgid "" +"Return a :term:`strong reference`, or ``NULL`` if *frame* has no outer " +"frame. This raises no exceptions." +msgstr "" + +msgid "Get the *frame*'s :attr:`~frame.f_builtins` attribute." +msgstr "" + +msgid "Return a :term:`strong reference`. The result cannot be ``NULL``." +msgstr "" + +msgid "Get the *frame* code." +msgstr "" + +msgid "Return a :term:`strong reference`." +msgstr "Returnera en :term:`strong reference`." + +msgid "The result (frame code) cannot be ``NULL``." +msgstr "" + +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 "" + +msgid "Return a :term:`strong reference`, or ``NULL``." +msgstr "" + +msgid "Get the *frame*'s :attr:`~frame.f_globals` attribute." +msgstr "" + +msgid "Get the *frame*'s :attr:`~frame.f_lasti` attribute." +msgstr "" + +msgid "Returns -1 if ``frame.f_lasti`` is ``None``." +msgstr "" + +msgid "Get the variable *name* of *frame*." +msgstr "" + +msgid "Return a :term:`strong reference` to the variable value on success." +msgstr "" + +msgid "" +"Raise :exc:`NameError` and return ``NULL`` if the variable does not exist." +msgstr "" + +msgid "Raise an exception and return ``NULL`` on error." +msgstr "" + +msgid "*name* type must be a :class:`str`." +msgstr "" + +msgid "" +"Similar to :c:func:`PyFrame_GetVar`, but the variable name is a C string " +"encoded in UTF-8." +msgstr "" + +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 " +"allows modifying the locals. In all other cases (classes, modules, :func:" +"`exec`, :func:`eval`) it returns the mapping representing the frame locals " +"directly (as described for :func:`locals`)." +msgstr "" + +msgid "" +"As part of :pep:`667`, return an instance of :c:var:" +"`PyFrameLocalsProxy_Type`." +msgstr "" + +msgid "Return the line number that *frame* is currently executing." +msgstr "" + +msgid "Frame locals proxies" +msgstr "" + +msgid "" +"The :attr:`~frame.f_locals` attribute on a :ref:`frame object ` is an instance of a \"frame-locals proxy\". The proxy object " +"exposes a write-through view of the underlying locals dictionary for the " +"frame. This ensures that the variables exposed by ``f_locals`` are always up " +"to date with the live local variables in the frame itself." +msgstr "" + +msgid "See :pep:`667` for more information." +msgstr "" + +msgid "The type of frame :func:`locals` proxy objects." +msgstr "" + +msgid "Return non-zero if *obj* is a frame :func:`locals` proxy." +msgstr "" + +msgid "Legacy local variable APIs" +msgstr "" + +msgid "" +"These APIs are :term:`soft deprecated`. As of Python 3.13, they do nothing. " +"They exist solely for backwards compatibility." +msgstr "" + +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 " +"changes in frame objects to be visible to the interpreter. If *clear* was " +"true, this function would process variables that were unset in the locals " +"dictionary." +msgstr "" + +msgid "This function now does nothing." +msgstr "" + +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." +"f_locals` attribute of *f*, allowing changes in local variables to be " +"visible to frame objects." +msgstr "" + +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 "" + +msgid ":pep:`667`" +msgstr "" + +msgid "Internal frames" +msgstr "" + +msgid "Unless using :pep:`523`, you will not need this." +msgstr "" + +msgid "The interpreter's internal frame representation." +msgstr "" + +msgid "Return a :term:`strong reference` to the code object for the frame." +msgstr "" + +msgid "Return the byte offset into the last executed instruction." +msgstr "" + +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 new file mode 100644 index 00000000..a5988859 --- /dev/null +++ b/c-api/function.po @@ -0,0 +1,235 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Function Objects" +msgstr "" + +msgid "There are a few functions specific to Python functions." +msgstr "" + +msgid "The C structure used for functions." +msgstr "" + +msgid "" +"This is an instance of :c:type:`PyTypeObject` and represents the Python " +"function type. It is exposed to Python programmers as ``types." +"FunctionType``." +msgstr "" + +msgid "" +"Return true if *o* is a function object (has type :c:data:" +"`PyFunction_Type`). The parameter must not be ``NULL``. This function " +"always succeeds." +msgstr "" + +msgid "" +"Return a new function object associated with the code object *code*. " +"*globals* must be a dictionary with the global variables accessible to the " +"function." +msgstr "" + +msgid "" +"The function's docstring and name are retrieved from the code object. :attr:" +"`~function.__module__` is retrieved from *globals*. The argument defaults, " +"annotations and closure are set to ``NULL``. :attr:`~function.__qualname__` " +"is set to the same value as the code object's :attr:`~codeobject." +"co_qualname` field." +msgstr "" + +msgid "" +"As :c:func:`PyFunction_New`, but also allows setting the function object's :" +"attr:`~function.__qualname__` attribute. *qualname* should be a unicode " +"object or ``NULL``; if ``NULL``, the :attr:`!__qualname__` attribute is set " +"to the same value as the code object's :attr:`~codeobject.co_qualname` field." +msgstr "" + +msgid "Return the code object associated with the function object *op*." +msgstr "" + +msgid "Return the globals dictionary associated with the function object *op*." +msgstr "" + +msgid "" +"Return a :term:`borrowed reference` to the :attr:`~function.__module__` " +"attribute of the :ref:`function object ` *op*. It can be " +"*NULL*." +msgstr "" + +msgid "" +"This is normally a :class:`string ` containing the module name, but can " +"be set to any other object by Python code." +msgstr "" + +msgid "" +"Return the argument default values of the function object *op*. This can be " +"a tuple of arguments or ``NULL``." +msgstr "" + +msgid "" +"Set the argument default values for the function object *op*. *defaults* " +"must be ``Py_None`` or a tuple." +msgstr "" + +msgid "Raises :exc:`SystemError` and returns ``-1`` on failure." +msgstr "" + +msgid "Set the vectorcall field of a given function object *func*." +msgstr "" + +msgid "" +"Warning: extensions using this API must preserve the behavior of the " +"unaltered (default) vectorcall function!" +msgstr "" + +msgid "" +"Return the keyword-only argument default values of the function object *op*. " +"This can be a dictionary of arguments or ``NULL``." +msgstr "" + +msgid "" +"Set the keyword-only argument default values of the function object *op*. " +"*defaults* must be a dictionary of keyword-only arguments or ``Py_None``." +msgstr "" + +msgid "" +"This function returns ``0`` on success, and returns ``-1`` with an exception " +"set on failure." +msgstr "" + +msgid "" +"Return the closure associated with the function object *op*. This can be " +"``NULL`` or a tuple of cell objects." +msgstr "" + +msgid "" +"Set the closure associated with the function object *op*. *closure* must be " +"``Py_None`` or a tuple of cell objects." +msgstr "" + +msgid "" +"Return the annotations of the function object *op*. This can be a mutable " +"dictionary or ``NULL``." +msgstr "" + +msgid "" +"Set the annotations for the function object *op*. *annotations* must be a " +"dictionary or ``Py_None``." +msgstr "" + +msgid "" +"These functions are similar to their ``PyFunction_Get*`` counterparts, but " +"do not do type checking. Passing anything other than an instance of :c:data:" +"`PyFunction_Type` is undefined behavior." +msgstr "" + +msgid "" +"Register *callback* as a function watcher for the current interpreter. " +"Return an ID which may be passed to :c:func:`PyFunction_ClearWatcher`. In " +"case of error (e.g. no more watcher IDs available), return ``-1`` and set an " +"exception." +msgstr "" + +msgid "" +"Clear watcher identified by *watcher_id* previously returned from :c:func:" +"`PyFunction_AddWatcher` for the current interpreter. Return ``0`` on " +"success, or ``-1`` and set an exception on error (e.g. if the given " +"*watcher_id* was never registered.)" +msgstr "" + +msgid "Enumeration of possible function watcher events:" +msgstr "" + +msgid "``PyFunction_EVENT_CREATE``" +msgstr "" + +msgid "``PyFunction_EVENT_DESTROY``" +msgstr "" + +msgid "``PyFunction_EVENT_MODIFY_CODE``" +msgstr "" + +msgid "``PyFunction_EVENT_MODIFY_DEFAULTS``" +msgstr "" + +msgid "``PyFunction_EVENT_MODIFY_KWDEFAULTS``" +msgstr "" + +msgid "``PyFunction_PYFUNC_EVENT_MODIFY_QUALNAME``" +msgstr "" + +msgid "Type of a function watcher callback function." +msgstr "" + +msgid "" +"If *event* is ``PyFunction_EVENT_CREATE`` or ``PyFunction_EVENT_DESTROY`` " +"then *new_value* will be ``NULL``. Otherwise, *new_value* will hold a :term:" +"`borrowed reference` to the new value that is about to be stored in *func* " +"for the attribute that is being modified." +msgstr "" + +msgid "" +"The callback may inspect but must not modify *func*; doing so could have " +"unpredictable effects, including infinite recursion." +msgstr "" + +msgid "" +"If *event* is ``PyFunction_EVENT_CREATE``, then the callback is invoked " +"after *func* has been fully initialized. Otherwise, the callback is invoked " +"before the modification to *func* takes place, so the prior state of *func* " +"can be inspected. The runtime is permitted to optimize away the creation of " +"function objects when possible. In such cases no event will be emitted. " +"Although this creates the possibility of an observable difference of runtime " +"behavior depending on optimization decisions, it does not change the " +"semantics of the Python code being executed." +msgstr "" + +msgid "" +"If *event* is ``PyFunction_EVENT_DESTROY``, taking a reference in the " +"callback to the about-to-be-destroyed function will resurrect it, preventing " +"it from being freed at this time. When the resurrected object is destroyed " +"later, any watcher callbacks active at that time will be called again." +msgstr "" + +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 "" + +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 " +"set. This means the callback may not call any other API that can set an " +"exception unless it saves and clears the exception state first, and restores " +"it before returning." +msgstr "" + +msgid "object" +msgstr "" + +msgid "function" +msgstr "" + +msgid "MethodType (in module types)" +msgstr "" diff --git a/c-api/gcsupport.po b/c-api/gcsupport.po new file mode 100644 index 00000000..92c7a9ee --- /dev/null +++ b/c-api/gcsupport.po @@ -0,0 +1,587 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2026 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2026\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Supporting Cyclic Garbage Collection" +msgstr "" + +msgid "" +"Python's support for detecting and collecting garbage which involves " +"circular references requires support from object types which are " +"\"containers\" for other objects which may also be containers. Types which " +"do not store references to other objects, or which only store references to " +"atomic types (such as numbers or strings), do not need to provide any " +"explicit support for garbage collection." +msgstr "" + +msgid "" +"To create a container type, the :c:member:`~PyTypeObject.tp_flags` field of " +"the type object must include the :c:macro:`Py_TPFLAGS_HAVE_GC` and provide " +"an implementation of the :c:member:`~PyTypeObject.tp_traverse` handler. If " +"instances of the type are mutable, a :c:member:`~PyTypeObject.tp_clear` " +"implementation must also be provided." +msgstr "" + +msgid ":c:macro:`Py_TPFLAGS_HAVE_GC`" +msgstr "" + +msgid "" +"Objects with a type with this flag set must conform with the rules " +"documented here. For convenience these objects will be referred to as " +"container objects." +msgstr "" + +msgid "Constructors for container types must conform to two rules:" +msgstr "" + +msgid "" +"The memory for the object must be allocated using :c:macro:`PyObject_GC_New` " +"or :c:macro:`PyObject_GC_NewVar`." +msgstr "" + +msgid "" +"Once all the fields which may contain references to other containers are " +"initialized, it must call :c:func:`PyObject_GC_Track`." +msgstr "" + +msgid "" +"Similarly, the deallocator for the object must conform to a similar pair of " +"rules:" +msgstr "" + +msgid "" +"Before fields which refer to other containers are invalidated, :c:func:" +"`PyObject_GC_UnTrack` must be called." +msgstr "" + +msgid "" +"The object's memory must be deallocated using :c:func:`PyObject_GC_Del`." +msgstr "" + +msgid "" +"If a type adds the Py_TPFLAGS_HAVE_GC, then it *must* implement at least a :" +"c:member:`~PyTypeObject.tp_traverse` handler or explicitly use one from its " +"subclass or subclasses." +msgstr "" + +msgid "" +"When calling :c:func:`PyType_Ready` or some of the APIs that indirectly call " +"it like :c:func:`PyType_FromSpecWithBases` or :c:func:`PyType_FromSpec` the " +"interpreter will automatically populate the :c:member:`~PyTypeObject." +"tp_flags`, :c:member:`~PyTypeObject.tp_traverse` and :c:member:" +"`~PyTypeObject.tp_clear` fields if the type inherits from a class that " +"implements the garbage collector protocol and the child class does *not* " +"include the :c:macro:`Py_TPFLAGS_HAVE_GC` flag." +msgstr "" + +msgid "" +"Analogous to :c:macro:`PyObject_New` but for container objects with the :c:" +"macro:`Py_TPFLAGS_HAVE_GC` flag set." +msgstr "" + +msgid "" +"Do not call this directly to allocate memory for an object; call the type's :" +"c:member:`~PyTypeObject.tp_alloc` slot instead." +msgstr "" + +msgid "" +"When populating a type's :c:member:`~PyTypeObject.tp_alloc` slot, :c:func:" +"`PyType_GenericAlloc` is preferred over a custom function that simply calls " +"this macro." +msgstr "" + +msgid "" +"Memory allocated by this macro must be freed with :c:func:`PyObject_GC_Del` " +"(usually called via the object's :c:member:`~PyTypeObject.tp_free` slot)." +msgstr "" + +msgid ":c:func:`PyObject_GC_Del`" +msgstr "" + +msgid ":c:macro:`PyObject_New`" +msgstr "" + +msgid ":c:func:`PyType_GenericAlloc`" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_alloc`" +msgstr "" + +msgid "" +"Analogous to :c:macro:`PyObject_NewVar` but for container objects with the :" +"c:macro:`Py_TPFLAGS_HAVE_GC` flag set." +msgstr "" + +msgid ":c:macro:`PyObject_NewVar`" +msgstr "" + +msgid "" +"Analogous to :c:macro:`PyObject_GC_New` but allocates *extra_size* bytes at " +"the end of the object (at offset :c:member:`~PyTypeObject.tp_basicsize`). " +"The allocated memory is initialized to zeros, except for the :c:type:`Python " +"object header `." +msgstr "" + +msgid "" +"The extra data will be deallocated with the object, but otherwise it is not " +"managed by Python." +msgstr "" + +msgid "" +"Memory allocated by this function must be freed with :c:func:" +"`PyObject_GC_Del` (usually called via the object's :c:member:`~PyTypeObject." +"tp_free` slot)." +msgstr "" + +msgid "" +"The function is marked as unstable because the final mechanism for reserving " +"extra data after an instance is not yet decided. For allocating a variable " +"number of fields, prefer using :c:type:`PyVarObject` and :c:member:" +"`~PyTypeObject.tp_itemsize` instead." +msgstr "" + +msgid "" +"Resize an object allocated by :c:macro:`PyObject_NewVar`. Returns the " +"resized object of type ``TYPE*`` (refers to any C type) or ``NULL`` on " +"failure." +msgstr "" + +msgid "" +"*op* must be of type :c:expr:`PyVarObject *` and must not be tracked by the " +"collector yet. *newsize* must be of type :c:type:`Py_ssize_t`." +msgstr "" + +msgid "" +"Adds the object *op* to the set of container objects tracked by the " +"collector. The collector can run at unexpected times so objects must be " +"valid while being tracked. This should be called once all the fields " +"followed by the :c:member:`~PyTypeObject.tp_traverse` handler become valid, " +"usually near the end of the constructor." +msgstr "" + +msgid "" +"Returns non-zero if the object implements the garbage collector protocol, " +"otherwise returns 0." +msgstr "" + +msgid "" +"The object cannot be tracked by the garbage collector if this function " +"returns 0." +msgstr "" + +msgid "" +"Returns 1 if the object type of *op* implements the GC protocol and *op* is " +"being currently tracked by the garbage collector and 0 otherwise." +msgstr "" + +msgid "This is analogous to the Python function :func:`gc.is_tracked`." +msgstr "" + +msgid "" +"Returns 1 if the object type of *op* implements the GC protocol and *op* has " +"been already finalized by the garbage collector and 0 otherwise." +msgstr "" + +msgid "This is analogous to the Python function :func:`gc.is_finalized`." +msgstr "" + +msgid "" +"Releases memory allocated to an object using :c:macro:`PyObject_GC_New` or :" +"c:macro:`PyObject_GC_NewVar`." +msgstr "" + +msgid "" +"Do not call this directly to free an object's memory; call the type's :c:" +"member:`~PyTypeObject.tp_free` slot instead." +msgstr "" + +msgid "" +"Do not use this for memory allocated by :c:macro:`PyObject_New`, :c:macro:" +"`PyObject_NewVar`, or related allocation functions; use :c:func:" +"`PyObject_Free` instead." +msgstr "" + +msgid ":c:func:`PyObject_Free` is the non-GC equivalent of this function." +msgstr "" + +msgid ":c:macro:`PyObject_GC_New`" +msgstr "" + +msgid ":c:macro:`PyObject_GC_NewVar`" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_free`" +msgstr "" + +msgid "" +"Remove the object *op* from the set of container objects tracked by the " +"collector. Note that :c:func:`PyObject_GC_Track` can be called again on " +"this object to add it back to the set of tracked objects. The deallocator (:" +"c:member:`~PyTypeObject.tp_dealloc` handler) should call this for the object " +"before any of the fields used by the :c:member:`~PyTypeObject.tp_traverse` " +"handler become invalid." +msgstr "" + +msgid "" +"The :c:func:`!_PyObject_GC_TRACK` and :c:func:`!_PyObject_GC_UNTRACK` macros " +"have been removed from the public C API." +msgstr "" + +msgid "" +"The :c:member:`~PyTypeObject.tp_traverse` handler accepts a function " +"parameter of this type:" +msgstr "" + +msgid "" +"Type of the visitor function passed to the :c:member:`~PyTypeObject." +"tp_traverse` handler. The function should be called with an object to " +"traverse as *object* and the third parameter to the :c:member:`~PyTypeObject." +"tp_traverse` handler as *arg*. The Python core uses several visitor " +"functions to implement cyclic garbage detection; it's not expected that " +"users will need to write their own visitor functions." +msgstr "" + +msgid "" +"The :c:member:`~PyTypeObject.tp_clear` handler must be of the :c:type:" +"`inquiry` type, or ``NULL`` if the object is immutable." +msgstr "" + +msgid "" +"Drop references that may have created reference cycles. Immutable objects " +"do not have to define this method since they can never directly create " +"reference cycles. Note that the object must still be valid after calling " +"this method (don't just call :c:func:`Py_DECREF` on a reference). The " +"collector will call this method if it detects that this object is involved " +"in a reference cycle." +msgstr "" + +msgid "Traversal" +msgstr "" + +msgid "" +"The :c:member:`~PyTypeObject.tp_traverse` handler must have the following " +"type:" +msgstr "" + +msgid "" +"Traversal function for a garbage-collected object, used by the garbage " +"collector to detect reference cycles. Implementations must call the *visit* " +"function for each object directly contained by *self*, with the parameters " +"to *visit* being the contained object and the *arg* value passed to the " +"handler. The *visit* function must not be called with a ``NULL`` object " +"argument. If *visit* returns a non-zero value, that value should be " +"returned immediately." +msgstr "" + +msgid "" +"A typical :c:member:`!tp_traverse` function calls the :c:func:`Py_VISIT` " +"convenience macro on each of the instance's members that are Python objects " +"that the instance owns. For example, this is a (slightly outdated) traversal " +"function for the :py:class:`threading.local` class::" +msgstr "" + +msgid "" +"static int\n" +"local_traverse(PyObject *op, visitproc visit, void *arg)\n" +"{\n" +" localobject *self = (localobject *) op;\n" +" Py_VISIT(Py_TYPE(self));\n" +" Py_VISIT(self->args);\n" +" Py_VISIT(self->kw);\n" +" Py_VISIT(self->dict);\n" +" return 0;\n" +"}" +msgstr "" + +msgid "" +":c:func:`Py_VISIT` requires the *visit* and *arg* parameters to :c:func:`!" +"local_traverse` to have these specific names; don't name them just anything." +msgstr "" + +msgid "" +"Instances of :ref:`heap-allocated types ` hold a reference to " +"their type. Their traversal function must therefore visit the type::" +msgstr "" + +msgid "Py_VISIT(Py_TYPE(self));" +msgstr "" + +msgid "" +"Alternately, the type may delegate this responsibility by calling " +"``tp_traverse`` of a heap-allocated superclass (or another heap-allocated " +"type, if applicable). If they do not, the type object may not be garbage-" +"collected." +msgstr "" + +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 "" + +msgid "" +"int err = PyObject_VisitManagedDict((PyObject*)self, visit, arg);\n" +"if (err) {\n" +" return err;\n" +"}" +msgstr "" + +msgid "" +"Only the members that the instance *owns* (by having :term:`strong " +"references ` to them) must be visited. For instance, if an " +"object supports weak references via the :c:member:`~PyTypeObject." +"tp_weaklist` slot, the pointer supporting the linked list (what " +"*tp_weaklist* points to) must **not** be visited as the instance does not " +"directly own the weak references to itself." +msgstr "" + +msgid "The traversal function has a limitation:" +msgstr "" + +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, directly or indirectly." +msgstr "" + +msgid "" +"This means that *most* Python C API functions may not be used, since they " +"can raise a new exception, return a new reference to a result object, have " +"internal logic that uses side effects. Also, unless documented otherwise, " +"functions that happen to not have side effects may start having them in " +"future versions, without warning." +msgstr "" + +msgid "" +"For a list of safe functions, see a :ref:`separate section ` below." +msgstr "" + +msgid "" +"The :c:func:`Py_VISIT` call may be skipped for those members that provably " +"cannot participate in reference cycles. In the ``local_traverse`` example " +"above, there is also a ``self->key`` member, but it can only be ``NULL`` or " +"a Python string and therefore cannot be part of a reference cycle." +msgstr "" + +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 "" + +msgid "" +"The :c:member:`~PyTypeObject.tp_traverse` function can be called from any " +"thread." +msgstr "" + +msgid "" +"Garbage collection is a \"stop-the-world\" operation: even in :term:`free " +"threading` builds, only one thread state is :term:`attached ` when :c:member:`!tp_traverse` handlers run." +msgstr "" + +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 "" + +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 "" + +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 " +"return it." +msgstr "" + +msgid "This corresponds roughly to::" +msgstr "" + +msgid "" +"#define Py_VISIT(o) \\\n" +" if (op) { \\\n" +" int visit_result = visit(o, arg); \\\n" +" if (visit_result != 0) { \\\n" +" return visit_result; \\\n" +" } \\\n" +" }" +msgstr "" + +msgid "Traversal-safe functions" +msgstr "" + +msgid "" +"The following functions and macros are safe to use in a :c:member:" +"`~PyTypeObject.tp_traverse` handler:" +msgstr "" + +msgid "the *visit* function passed to ``tp_traverse``" +msgstr "" + +msgid ":c:func:`Py_VISIT`" +msgstr "" + +msgid ":c:func:`Py_SIZE`" +msgstr "" + +msgid "" +":c:func:`Py_TYPE`: if called from a :c:member:`!tp_traverse` handler, :c:" +"func:`!Py_TYPE`'s result will be valid for the duration of the handler call" +msgstr "" + +msgid ":c:func:`PyObject_VisitManagedDict`" +msgstr "" + +msgid "" +":c:func:`PyObject_TypeCheck`, :c:func:`PyType_IsSubtype`, :c:func:" +"`PyType_HasFeature`" +msgstr "" + +msgid "" +":samp:`Py{}_Check` and :samp:`Py{}_CheckExact` -- for example, :" +"c:func:`PyTuple_Check`" +msgstr "" + +msgid ":ref:`duringgc-functions`" +msgstr "" + +msgid "\"DuringGC\" functions" +msgstr "" + +msgid "" +"The following functions should *only* be used in a :c:member:`~PyTypeObject." +"tp_traverse` handler; calling them in other contexts may have unintended " +"consequences." +msgstr "" + +msgid "" +"These functions act like their counterparts without the ``_DuringGC`` " +"suffix, but they are guaranteed to not have side effects, they do not set an " +"exception on failure, and they return/set :term:`borrowed references " +"` as detailed in the individual documentation." +msgstr "" + +msgid "" +"Note that these functions may fail (return ``NULL`` or ``-1``), but as they " +"do not set an exception, no error information is available. In some cases, " +"failure is not distinguishable from a successful ``NULL`` result." +msgstr "" + +msgid "See :ref:`duringgc-functions` for common information." +msgstr "" + +msgid "" +":c:func:`PyObject_GetTypeData`, :c:func:`PyObject_GetItemData`, :c:func:" +"`PyType_GetModuleState`, :c:func:`PyModule_GetState`, :c:func:" +"`PyModule_GetToken`, :c:func:`PyType_GetBaseByToken`" +msgstr "" + +msgid "" +"Sets *\\*result* to a :term:`borrowed reference` rather than a strong one. " +"The reference is valid for the duration of the :c:member:`!tp_traverse` " +"handler call." +msgstr "" + +msgid ":c:func:`PyType_GetBaseByToken`" +msgstr "" + +msgid "" +"These functions return a :term:`borrowed reference`, which is valid for the " +"duration of the :c:member:`!tp_traverse` handler call." +msgstr "" + +msgid ":c:func:`PyType_GetModule`, :c:func:`PyType_GetModuleByToken`" +msgstr "" + +msgid "Controlling the Garbage Collector State" +msgstr "" + +msgid "" +"The C-API provides the following functions for controlling garbage " +"collection runs." +msgstr "" + +msgid "" +"Perform a full garbage collection, if the garbage collector is enabled. " +"(Note that :func:`gc.collect` runs it unconditionally.)" +msgstr "" + +msgid "" +"Returns the number of collected + unreachable objects which cannot be " +"collected. If the garbage collector is disabled or already collecting, " +"returns ``0`` immediately. Errors during garbage collection are passed to :" +"data:`sys.unraisablehook`. This function does not raise exceptions." +msgstr "" + +msgid "" +"Enable the garbage collector: similar to :func:`gc.enable`. Returns the " +"previous state, 0 for disabled and 1 for enabled." +msgstr "" + +msgid "" +"Disable the garbage collector: similar to :func:`gc.disable`. Returns the " +"previous state, 0 for disabled and 1 for enabled." +msgstr "" + +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 "" + +msgid "Querying Garbage Collector State" +msgstr "" + +msgid "" +"The C-API provides the following interface for querying information about " +"the garbage collector." +msgstr "" + +msgid "" +"Run supplied *callback* on all live GC-capable objects. *arg* is passed " +"through to all invocations of *callback*." +msgstr "" + +msgid "" +"If new objects are (de)allocated by the callback it is undefined if they " +"will be visited." +msgstr "" + +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 "" + +msgid "" +"Type of the visitor function to be passed to :c:func:" +"`PyUnstable_GC_VisitObjects`. *arg* is the same as the *arg* passed to " +"``PyUnstable_GC_VisitObjects``. Return ``1`` to continue iteration, return " +"``0`` to stop iteration. Other return values are reserved for now so " +"behavior on returning anything else is undefined." +msgstr "" diff --git a/c-api/gen.po b/c-api/gen.po new file mode 100644 index 00000000..a79cb9a6 --- /dev/null +++ b/c-api/gen.po @@ -0,0 +1,104 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2026 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2026\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Generator Objects" +msgstr "" + +msgid "" +"Generator objects are what Python uses to implement generator iterators. " +"They are normally created by iterating over a function that yields values, " +"rather than explicitly calling :c:func:`PyGen_New` or :c:func:" +"`PyGen_NewWithQualName`." +msgstr "" + +msgid "The C structure used for generator objects." +msgstr "" + +msgid "The type object corresponding to generator objects." +msgstr "" + +msgid "" +"Return true if *ob* is a generator object; *ob* must not be ``NULL``. This " +"function always succeeds." +msgstr "" + +msgid "" +"Return true if *ob*'s type is :c:type:`PyGen_Type`; *ob* must not be " +"``NULL``. This function always succeeds." +msgstr "" + +msgid "" +"Create and return a new generator object based on the *frame* object. A " +"reference to *frame* is stolen by this function. The argument must not be " +"``NULL``." +msgstr "" + +msgid "" +"Create and return a new generator object based on the *frame* object, with " +"``__name__`` and ``__qualname__`` set to *name* and *qualname*. A reference " +"to *frame* is stolen by this function. The *frame* argument must not be " +"``NULL``." +msgstr "" + +msgid "" +"Return a new :term:`strong reference` to the code object wrapped by *gen*. " +"This function always succeeds." +msgstr "" + +msgid "Asynchronous Generator Objects" +msgstr "" + +msgid ":pep:`525`" +msgstr "" + +msgid "" +"The type object corresponding to asynchronous generator objects. This is " +"available as :class:`types.AsyncGeneratorType` in the Python layer." +msgstr "" + +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``." +msgstr "" + +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 "" + +msgid "" +"Return true if *op* is an asynchronous generator object, false otherwise. " +"This function always succeeds." +msgstr "" + +msgid "Deprecated API" +msgstr "" + +msgid "This is an API that was included in Python's C API by mistake." +msgstr "" + +msgid "It is solely here for completeness; do not use this API." +msgstr "" diff --git a/c-api/hash.po b/c-api/hash.po new file mode 100644 index 00000000..4cff2056 --- /dev/null +++ b/c-api/hash.po @@ -0,0 +1,168 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# Daniel Nylander , 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: Daniel Nylander , 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "PyHash API" +msgstr "" + +msgid "" +"See also the :c:member:`PyTypeObject.tp_hash` member and :ref:`numeric-hash`." +msgstr "" + +msgid "Hash value type: signed integer." +msgstr "" + +msgid "Hash value type: unsigned integer." +msgstr "" + +msgid "" +"A numerical value indicating the algorithm for hashing of :class:`str`, :" +"class:`bytes`, and :class:`memoryview`." +msgstr "" + +msgid "The algorithm name is exposed by :data:`sys.hash_info.algorithm`." +msgstr "" + +msgid "" +"Numerical values to compare to :c:macro:`Py_HASH_ALGORITHM` to determine " +"which algorithm is used for hashing. The hash algorithm can be configured " +"via the configure :option:`--with-hash-algorithm` option." +msgstr "" + +msgid "Add :c:macro:`!Py_HASH_FNV` and :c:macro:`!Py_HASH_SIPHASH24`." +msgstr "" + +msgid "Add :c:macro:`!Py_HASH_SIPHASH13`." +msgstr "" + +msgid "" +"Buffers of length in range ``[1, Py_HASH_CUTOFF)`` are hashed using DJBX33A " +"instead of the algorithm described by :c:macro:`Py_HASH_ALGORITHM`." +msgstr "" + +msgid "A :c:macro:`!Py_HASH_CUTOFF` of 0 disables the optimization." +msgstr "" + +msgid "" +":c:macro:`!Py_HASH_CUTOFF` must be non-negative and less or equal than 7." +msgstr "" + +msgid "" +"32-bit platforms should use a cutoff smaller than 64-bit platforms because " +"it is easier to create colliding strings. A cutoff of 7 on 64-bit platforms " +"and 5 on 32-bit platforms should provide a decent safety margin." +msgstr "" + +msgid "This corresponds to the :data:`sys.hash_info.cutoff` constant." +msgstr "" + +msgid "" +"The `Mersenne prime `_ ``P = " +"2**n -1``, used for numeric hash scheme." +msgstr "" + +msgid "This corresponds to the :data:`sys.hash_info.modulus` constant." +msgstr "" + +msgid "The exponent ``n`` of ``P`` in :c:macro:`PyHASH_MODULUS`." +msgstr "" + +msgid "Prime multiplier used in string and various other hashes." +msgstr "" + +msgid "The hash value returned for a positive infinity." +msgstr "" + +msgid "This corresponds to the :data:`sys.hash_info.inf` constant." +msgstr "" + +msgid "The multiplier used for the imaginary part of a complex number." +msgstr "" + +msgid "This corresponds to the :data:`sys.hash_info.imag` constant." +msgstr "" + +msgid "Hash function definition used by :c:func:`PyHash_GetFuncDef`." +msgstr "" + +msgid "Hash function." +msgstr "" + +msgid "Hash function name (UTF-8 encoded string)." +msgstr "" + +msgid "This corresponds to the :data:`sys.hash_info.algorithm` constant." +msgstr "" + +msgid "Internal size of the hash value in bits." +msgstr "" + +msgid "This corresponds to the :data:`sys.hash_info.hash_bits` constant." +msgstr "" + +msgid "Size of seed input in bits." +msgstr "" + +msgid "This corresponds to the :data:`sys.hash_info.seed_bits` constant." +msgstr "" + +msgid "Get the hash function definition." +msgstr "" + +msgid ":pep:`456` \"Secure and interchangeable hash algorithm\"." +msgstr "" + +msgid "" +"Hash a pointer value: process the pointer value as an integer (cast it to " +"``uintptr_t`` internally). The pointer is not dereferenced." +msgstr "" + +msgid "The function cannot fail: it cannot return ``-1``." +msgstr "" + +msgid "" +"Compute and return the hash value of a buffer of *len* bytes starting at " +"address *ptr*. The hash is guaranteed to match that of :class:`bytes`, :" +"class:`memoryview`, and other built-in objects that implement the :ref:" +"`buffer protocol `." +msgstr "" + +msgid "" +"Use this function to implement hashing for immutable objects whose :c:member:" +"`~PyTypeObject.tp_richcompare` function compares to another object's buffer." +msgstr "" + +msgid "*len* must be greater than or equal to ``0``." +msgstr "" + +msgid "This function always succeeds." +msgstr "" + +msgid "" +"Generic hashing function that is meant to be put into a type object's " +"``tp_hash`` slot. Its result only depends on the object's identity." +msgstr "" + +msgid "In CPython, it is equivalent to :c:func:`Py_HashPointer`." +msgstr "" diff --git a/c-api/import.po b/c-api/import.po new file mode 100644 index 00000000..3ef49eec --- /dev/null +++ b/c-api/import.po @@ -0,0 +1,421 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-09 16:27+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Importing Modules" +msgstr "" + +msgid "" +"This is a wrapper around :c:func:`PyImport_Import()` which takes a :c:expr:" +"`const char *` as an argument instead of a :c:expr:`PyObject *`." +msgstr "" + +msgid "" +"Import a module. This is best described by referring to the built-in Python " +"function :func:`__import__`." +msgstr "" + +msgid "" +"The return value is a new reference to the imported module or top-level " +"package, or ``NULL`` with an exception set on failure. Like for :func:" +"`__import__`, the return value when a submodule of a package was requested " +"is normally the top-level package, unless a non-empty *fromlist* was given." +msgstr "" + +msgid "" +"Failing imports remove incomplete module objects, like with :c:func:" +"`PyImport_ImportModule`." +msgstr "" + +msgid "" +"Import a module. This is best described by referring to the built-in Python " +"function :func:`__import__`, as the standard :func:`__import__` function " +"calls this function directly." +msgstr "" + +msgid "" +"Similar to :c:func:`PyImport_ImportModuleLevelObject`, but the name is a " +"UTF-8 encoded string instead of a Unicode object." +msgstr "" + +msgid "Negative values for *level* are no longer accepted." +msgstr "" + +msgid "" +"This is a higher-level interface that calls the current \"import hook " +"function\" (with an explicit *level* of 0, meaning absolute import). It " +"invokes the :func:`__import__` function from the ``__builtins__`` of the " +"current globals. This means that the import is done using whatever import " +"hooks are installed in the current environment." +msgstr "" + +msgid "This function always uses absolute imports." +msgstr "" + +msgid "" +"Reload a module. Return a new reference to the reloaded module, or ``NULL`` " +"with an exception set on failure (the module still exists in this case)." +msgstr "" + +msgid "Return the module object corresponding to a module name." +msgstr "" + +msgid "" +"The *name* argument may be of the form ``package.module``. First check the " +"modules dictionary if there's one there, and if not, create a new one and " +"insert it in the modules dictionary." +msgstr "" + +msgid "" +"Return a :term:`strong reference` to the module on success. Return ``NULL`` " +"with an exception set on failure." +msgstr "" + +msgid "The module name *name* is decoded from UTF-8." +msgstr "" + +msgid "" +"This function does not load or import the module; if the module wasn't " +"already loaded, you will get an empty module object. Use :c:func:" +"`PyImport_ImportModule` or one of its variants to import a module. Package " +"structures implied by a dotted name for *name* are not created if not " +"already present." +msgstr "" + +msgid "" +"Similar to :c:func:`PyImport_AddModuleRef`, but return a :term:`borrowed " +"reference` and *name* is a Python :class:`str` object." +msgstr "" + +msgid "" +"Similar to :c:func:`PyImport_AddModuleRef`, but return a :term:`borrowed " +"reference`." +msgstr "" + +msgid "" +"Given a module name (possibly of the form ``package.module``) and a code " +"object read from a Python bytecode file or obtained from the built-in " +"function :func:`compile`, load the module. Return a new reference to the " +"module object, or ``NULL`` with an exception set if an error occurred. " +"*name* is removed from :data:`sys.modules` in error cases, even if *name* " +"was already in :data:`sys.modules` on entry to :c:func:" +"`PyImport_ExecCodeModule`. Leaving incompletely initialized modules in :" +"data:`sys.modules` is dangerous, as imports of such modules have no way to " +"know that the module object is an unknown (and probably damaged with respect " +"to the module author's intents) state." +msgstr "" + +msgid "" +"The module's :attr:`~module.__spec__` and :attr:`~module.__loader__` will be " +"set, if not set already, with the appropriate values. The spec's loader " +"will be set to the module's :attr:`!__loader__` (if set) and to an instance " +"of :class:`~importlib.machinery.SourceFileLoader` otherwise." +msgstr "" + +msgid "" +"The module's :attr:`~module.__file__` attribute will be set to the code " +"object's :attr:`~codeobject.co_filename`." +msgstr "" + +msgid "" +"This function will reload the module if it was already imported. See :c:" +"func:`PyImport_ReloadModule` for the intended way to reload a module." +msgstr "" + +msgid "" +"If *name* points to a dotted name of the form ``package.module``, any " +"package structures not already created will still not be created." +msgstr "" + +msgid "" +"See also :c:func:`PyImport_ExecCodeModuleEx` and :c:func:" +"`PyImport_ExecCodeModuleWithPathnames`." +msgstr "" + +msgid "" +"The setting of ``__cached__`` and :attr:`~module.__loader__` is deprecated. " +"See :class:`~importlib.machinery.ModuleSpec` for alternatives." +msgstr "" + +msgid "``__cached__`` is no longer set." +msgstr "" + +msgid "" +"Like :c:func:`PyImport_ExecCodeModule`, but the :attr:`~module.__file__` " +"attribute of the module object is set to *pathname* if it is non-``NULL``." +msgstr "" + +msgid "See also :c:func:`PyImport_ExecCodeModuleWithPathnames`." +msgstr "" + +msgid "" +"Like :c:func:`PyImport_ExecCodeModuleEx`, but the path to any compiled file " +"via *cpathname* is used appropriately when non-``NULL``. Of the three " +"functions, this is the preferred one to use." +msgstr "" + +msgid "" +"Setting ``__cached__`` is deprecated. See :class:`~importlib.machinery." +"ModuleSpec` for alternatives." +msgstr "" + +msgid "``__cached__`` no longer set." +msgstr "" + +msgid "" +"Like :c:func:`PyImport_ExecCodeModuleObject`, but *name*, *pathname* and " +"*cpathname* are UTF-8 encoded strings. Attempts are also made to figure out " +"what the value for *pathname* should be from *cpathname* if the former is " +"set to ``NULL``." +msgstr "" + +msgid "" +"Uses :func:`!imp.source_from_cache` in calculating the source path if only " +"the bytecode path is provided." +msgstr "" + +msgid "No longer uses the removed :mod:`!imp` module." +msgstr "" + +msgid "" +"Return the magic number for Python bytecode files (a.k.a. :file:`.pyc` " +"file). The magic number should be present in the first four bytes of the " +"bytecode file, in little-endian byte order. Returns ``-1`` on error." +msgstr "" + +msgid "Return value of ``-1`` upon failure." +msgstr "" + +msgid "" +"Return the magic tag string for :pep:`3147` format Python bytecode file " +"names. Keep in mind that the value at ``sys.implementation.cache_tag`` is " +"authoritative and should be used instead of this function." +msgstr "" + +msgid "" +"Return the dictionary used for the module administration (a.k.a. ``sys." +"modules``). Note that this is a per-interpreter variable." +msgstr "" + +msgid "" +"Return the already imported module with the given name. If the module has " +"not been imported yet then returns ``NULL`` but does not set an error. " +"Returns ``NULL`` and sets an error if the lookup failed." +msgstr "" + +msgid "" +"Return a finder object for a :data:`sys.path`/:attr:`!pkg.__path__` item " +"*path*, possibly by fetching it from the :data:`sys.path_importer_cache` " +"dict. If it wasn't yet cached, traverse :data:`sys.path_hooks` until a hook " +"is found that can handle the path item. Return ``None`` if no hook could; " +"this tells our caller that the :term:`path based finder` could not find a " +"finder for this path item. Cache the result in :data:`sys." +"path_importer_cache`. Return a new reference to the finder object." +msgstr "" + +msgid "" +"Load a frozen module named *name*. Return ``1`` for success, ``0`` if the " +"module is not found, and ``-1`` with an exception set if the initialization " +"failed. To access the imported module on a successful load, use :c:func:" +"`PyImport_ImportModule`. (Note the misnomer --- this function would reload " +"the module if it was already imported.)" +msgstr "" + +msgid "The ``__file__`` attribute is no longer set on the module." +msgstr "" + +msgid "" +"Similar to :c:func:`PyImport_ImportFrozenModuleObject`, but the name is a " +"UTF-8 encoded string instead of a Unicode object." +msgstr "" + +msgid "" +"This is the structure type definition for frozen module descriptors, as " +"generated by the :program:`freeze` utility (see :file:`Tools/freeze/` in the " +"Python source distribution). Its definition, found in :file:`Include/import." +"h`, is::" +msgstr "" + +msgid "" +"struct _frozen {\n" +" const char *name;\n" +" const unsigned char *code;\n" +" int size;\n" +" bool is_package;\n" +"};" +msgstr "" + +msgid "" +"The new ``is_package`` field indicates whether the module is a package or " +"not. This replaces setting the ``size`` field to a negative value." +msgstr "" + +msgid "" +"This pointer is initialized to point to an array of :c:struct:`_frozen` " +"records, terminated by one whose members are all ``NULL`` or zero. When a " +"frozen module is imported, it is searched in this table. Third-party code " +"could play tricks with this to provide a dynamically created collection of " +"frozen modules." +msgstr "" + +msgid "" +"Add a single module to the existing table of built-in modules. This is a " +"convenience wrapper around :c:func:`PyImport_ExtendInittab`, returning " +"``-1`` if the table could not be extended. The new module can be imported " +"by the name *name*, and uses the function *initfunc* as the initialization " +"function called on the first attempted import. This should be called " +"before :c:func:`Py_Initialize`." +msgstr "" + +msgid "" +"Structure describing a single entry in the list of built-in modules. " +"Programs which embed Python may use an array of these structures in " +"conjunction with :c:func:`PyImport_ExtendInittab` to provide additional " +"built-in modules. The structure consists of two members:" +msgstr "" + +msgid "The module name, as an ASCII encoded string." +msgstr "" + +msgid "Initialization function for a module built into the interpreter." +msgstr "" + +msgid "" +"Add a collection of modules to the table of built-in modules. The *newtab* " +"array must end with a sentinel entry which contains ``NULL`` for the :c:" +"member:`~_inittab.name` field; failure to provide the sentinel value can " +"result in a memory fault. Returns ``0`` on success or ``-1`` if insufficient " +"memory could be allocated to extend the internal table. In the event of " +"failure, no modules are added to the internal table. This must be called " +"before :c:func:`Py_Initialize`." +msgstr "" + +msgid "" +"If Python is initialized multiple times, :c:func:`PyImport_AppendInittab` " +"or :c:func:`PyImport_ExtendInittab` must be called before each Python " +"initialization." +msgstr "" + +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 "" + +msgid "Import the module *mod_name* and get its attribute *attr_name*." +msgstr "" + +msgid "Names must be Python :class:`str` objects." +msgstr "" + +msgid "" +"Helper function combining :c:func:`PyImport_Import` and :c:func:" +"`PyObject_GetAttr`. For example, it can raise :exc:`ImportError` if the " +"module is not found, and :exc:`AttributeError` if the attribute doesn't " +"exist." +msgstr "" + +msgid "" +"Similar to :c:func:`PyImport_ImportModuleAttr`, but names are UTF-8 encoded " +"strings instead of Python :class:`str` objects." +msgstr "" + +msgid "Gets the current lazy imports mode." +msgstr "" + +msgid "" +"Return a :term:`strong reference` to the current lazy imports filter, or " +"``NULL`` if none exists. This function always succeeds." +msgstr "" + +msgid "This function always returns ``0``." +msgstr "" + +msgid "" +"Sets the current lazy imports filter. The *filter* should be a callable that " +"will receive ``(importing_module_name, imported_module_name, [fromlist])`` " +"when an import can potentially be lazy. The ``imported_module_name`` value " +"is the resolved module name, so ``lazy from .spam import eggs`` passes " +"``package.spam``. The callable must return ``True`` if the import should be " +"lazy and ``False`` otherwise." +msgstr "" + +msgid "Return ``0`` on success and ``-1`` with an exception set otherwise." +msgstr "" + +msgid "Enumeration of possible lazy import modes." +msgstr "" + +msgid "Respect the ``lazy`` keyword in source code. This is the default mode." +msgstr "" + +msgid "Make all imports lazy by default." +msgstr "" + +msgid "" +"This function is a building block that enables embedders to implement the :" +"py:meth:`~importlib.abc.Loader.create_module` step of custom static " +"extension importers (e.g. of statically-linked extensions)." +msgstr "" + +msgid "*spec* must be a :class:`~importlib.machinery.ModuleSpec` object." +msgstr "" + +msgid "" +"*initfunc* must be an :ref:`initialization function `, the same as for :c:func:`PyImport_AppendInittab`." +msgstr "" + +msgid "" +"On success, create and return a module object. This module will not be " +"initialized; call :c:func:`PyModule_Exec` to initialize it. (Custom " +"importers should do this in their :py:meth:`~importlib.abc.Loader." +"exec_module` method.)" +msgstr "" + +msgid "On error, return NULL with an exception set." +msgstr "" + +msgid "package variable" +msgstr "" + +msgid "__all__" +msgstr "" + +msgid "__all__ (package variable)" +msgstr "" + +msgid "modules (in module sys)" +msgstr "" + +msgid "built-in function" +msgstr "" + +msgid "__import__" +msgstr "" + +msgid "compile" +msgstr "" + +msgid "freeze utility" +msgstr "" diff --git a/c-api/index.po b/c-api/index.po new file mode 100644 index 00000000..13441124 --- /dev/null +++ b/c-api/index.po @@ -0,0 +1,33 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Python/C API reference manual" +msgstr "" + +msgid "" +"This manual documents the API used by C and C++ programmers who want to " +"write extension modules or embed Python. It is a companion to :ref:" +"`extending-index`, which describes the general principles of extension " +"writing but does not document the API functions in detail." +msgstr "" diff --git a/c-api/init.po b/c-api/init.po new file mode 100644 index 00000000..4a3b8d8b --- /dev/null +++ b/c-api/init.po @@ -0,0 +1,43 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-02 00:16+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Initialization, finalization, and threads" +msgstr "" + +msgid "This page has been split up into the following:" +msgstr "" + +msgid ":ref:`initialization`" +msgstr "" + +msgid ":ref:`threads`" +msgstr "" + +msgid ":ref:`synchronization`" +msgstr "" + +msgid ":ref:`thread-local-storage`" +msgstr "" + +msgid ":ref:`sub-interpreter-support`" +msgstr "" + +msgid ":ref:`profiling`" +msgstr "" diff --git a/c-api/init_config.po b/c-api/init_config.po new file mode 100644 index 00000000..ea5aca8e --- /dev/null +++ b/c-api/init_config.po @@ -0,0 +1,2756 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-17 16:52+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: Swedish (https://app.transifex.com/python-doc/teams/5390/" +"sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Python Initialization Configuration" +msgstr "" + +msgid "PyInitConfig C API" +msgstr "" + +msgid "Python can be initialized with :c:func:`Py_InitializeFromInitConfig`." +msgstr "" + +msgid "" +"The :c:func:`Py_RunMain` function can be used to write a customized Python " +"program." +msgstr "" + +msgid "" +"See also :ref:`Initialization, Finalization, and Threads `." +msgstr "" + +msgid ":pep:`741` \"Python Configuration C API\"." +msgstr "" + +msgid "Example" +msgstr "" + +msgid "" +"Example of customized Python always running with the :ref:`Python " +"Development Mode ` enabled; return ``-1`` on error:" +msgstr "" + +msgid "" +"int init_python(void)\n" +"{\n" +" PyInitConfig *config = PyInitConfig_Create();\n" +" if (config == NULL) {\n" +" printf(\"PYTHON INIT ERROR: memory allocation failed\\n\");\n" +" return -1;\n" +" }\n" +"\n" +" // Enable the Python Development Mode\n" +" if (PyInitConfig_SetInt(config, \"dev_mode\", 1) < 0) {\n" +" goto error;\n" +" }\n" +"\n" +" // Initialize Python with the configuration\n" +" if (Py_InitializeFromInitConfig(config) < 0) {\n" +" goto error;\n" +" }\n" +" PyInitConfig_Free(config);\n" +" return 0;\n" +"\n" +"error:\n" +" {\n" +" // Display the error message.\n" +" //\n" +" // This uncommon braces style is used, because you cannot make\n" +" // goto targets point to variable declarations.\n" +" const char *err_msg;\n" +" (void)PyInitConfig_GetError(config, &err_msg);\n" +" printf(\"PYTHON INIT ERROR: %s\\n\", err_msg);\n" +" PyInitConfig_Free(config);\n" +" return -1;\n" +" }\n" +"}" +msgstr "" + +msgid "Create Config" +msgstr "" + +msgid "Opaque structure to configure the Python initialization." +msgstr "" + +msgid "" +"Create a new initialization configuration using :ref:`Isolated Configuration " +"` default values." +msgstr "" + +msgid "It must be freed by :c:func:`PyInitConfig_Free`." +msgstr "" + +msgid "Return ``NULL`` on memory allocation failure." +msgstr "" + +msgid "Free memory of the initialization configuration *config*." +msgstr "" + +msgid "If *config* is ``NULL``, no operation is performed." +msgstr "" + +msgid "Error Handling" +msgstr "" + +msgid "Get the *config* error message." +msgstr "" + +msgid "Set *\\*err_msg* and return ``1`` if an error is set." +msgstr "" + +msgid "Set *\\*err_msg* to ``NULL`` and return ``0`` otherwise." +msgstr "" + +msgid "An error message is a UTF-8 encoded string." +msgstr "" + +msgid "If *config* has an exit code, format the exit code as an error message." +msgstr "" + +msgid "" +"The error message remains valid until another ``PyInitConfig`` function is " +"called with *config*. The caller doesn't have to free the error message." +msgstr "" + +msgid "Get the *config* exit code." +msgstr "" + +msgid "Set *\\*exitcode* and return ``1`` if *config* has an exit code set." +msgstr "" + +msgid "Return ``0`` if *config* has no exit code set." +msgstr "" + +msgid "" +"Only the ``Py_InitializeFromInitConfig()`` function can set an exit code if " +"the ``parse_argv`` option is non-zero." +msgstr "" + +msgid "" +"An exit code can be set when parsing the command line failed (exit code " +"``2``) or when a command line option asks to display the command line help " +"(exit code ``0``)." +msgstr "" + +msgid "Get Options" +msgstr "" + +msgid "" +"The configuration option *name* parameter must be a non-NULL null-terminated " +"UTF-8 encoded string. See :ref:`Configuration Options `." +msgstr "" + +msgid "Test if the configuration has an option called *name*." +msgstr "" + +msgid "Return ``1`` if the option exists, or return ``0`` otherwise." +msgstr "" + +msgid "Get an integer configuration option." +msgstr "" + +msgid "Set *\\*value*, and return ``0`` on success." +msgstr "" + +msgid "Set an error in *config* and return ``-1`` on error." +msgstr "" + +msgid "" +"Get a string configuration option as a null-terminated UTF-8 encoded string." +msgstr "" + +msgid "" +"*\\*value* can be set to ``NULL`` if the option is an optional string and " +"the option is unset." +msgstr "" + +msgid "" +"On success, the string must be released with ``free(value)`` if it's not " +"``NULL``." +msgstr "" + +msgid "" +"Get a string list configuration option as an array of null-terminated UTF-8 " +"encoded strings." +msgstr "" + +msgid "Set *\\*length* and *\\*value*, and return ``0`` on success." +msgstr "" + +msgid "" +"On success, the string list must be released with " +"``PyInitConfig_FreeStrList(length, items)``." +msgstr "" + +msgid "Free memory of a string list created by ``PyInitConfig_GetStrList()``." +msgstr "" + +msgid "Set Options" +msgstr "" + +msgid "" +"Some configuration options have side effects on other options. This logic is " +"only implemented when ``Py_InitializeFromInitConfig()`` is called, not by " +"the \"Set\" functions below. For example, setting ``dev_mode`` to ``1`` does " +"not set ``faulthandler`` to ``1``." +msgstr "" + +msgid "Set an integer configuration option." +msgstr "" + +msgid "Return ``0`` on success." +msgstr "" + +msgid "" +"Set a string configuration option from a null-terminated UTF-8 encoded " +"string. The string is copied." +msgstr "" + +msgid "" +"Set a string list configuration option from an array of null-terminated " +"UTF-8 encoded strings. The string list is copied." +msgstr "" + +msgid "Module" +msgstr "" + +msgid "Add a built-in extension module to the table of built-in modules." +msgstr "" + +msgid "" +"The new module can be imported by the name *name*, and uses the function " +"*initfunc* as the initialization function called on the first attempted " +"import." +msgstr "" + +msgid "" +"If Python is initialized multiple times, ``PyInitConfig_AddModule()`` must " +"be called at each Python initialization." +msgstr "" + +msgid "Similar to the :c:func:`PyImport_AppendInittab` function." +msgstr "" + +msgid "Initialize Python" +msgstr "" + +msgid "Initialize Python from the initialization configuration." +msgstr "" + +msgid "Set an exit code in *config* and return ``-1`` if Python wants to exit." +msgstr "" + +msgid "See ``PyInitConfig_GetExitcode()`` for the exit code case." +msgstr "" + +msgid "Configuration Options" +msgstr "" + +msgid "Option" +msgstr "" + +msgid "PyConfig/PyPreConfig member" +msgstr "" + +msgid "Type" +msgstr "" + +msgid "Visibility" +msgstr "" + +msgid "``\"allocator\"``" +msgstr "" + +msgid ":c:member:`allocator `" +msgstr "" + +msgid "``int``" +msgstr "" + +msgid "Read-only" +msgstr "" + +msgid "``\"argv\"``" +msgstr "" + +msgid ":c:member:`argv `" +msgstr "" + +msgid "``list[str]``" +msgstr "" + +msgid "Public" +msgstr "" + +msgid "``\"base_exec_prefix\"``" +msgstr "" + +msgid ":c:member:`base_exec_prefix `" +msgstr "" + +msgid "``str``" +msgstr "" + +msgid "``\"base_executable\"``" +msgstr "" + +msgid ":c:member:`base_executable `" +msgstr "" + +msgid "``\"base_prefix\"``" +msgstr "" + +msgid ":c:member:`base_prefix `" +msgstr "" + +msgid "``\"buffered_stdio\"``" +msgstr "" + +msgid ":c:member:`buffered_stdio `" +msgstr "" + +msgid "``bool``" +msgstr "" + +msgid "``\"bytes_warning\"``" +msgstr "" + +msgid ":c:member:`bytes_warning `" +msgstr "" + +msgid "``\"check_hash_pycs_mode\"``" +msgstr "" + +msgid ":c:member:`check_hash_pycs_mode `" +msgstr "" + +msgid "``\"code_debug_ranges\"``" +msgstr "" + +msgid ":c:member:`code_debug_ranges `" +msgstr "" + +msgid "``\"coerce_c_locale\"``" +msgstr "" + +msgid ":c:member:`coerce_c_locale `" +msgstr "" + +msgid "``\"coerce_c_locale_warn\"``" +msgstr "" + +msgid ":c:member:`coerce_c_locale_warn `" +msgstr "" + +msgid "``\"configure_c_stdio\"``" +msgstr "" + +msgid ":c:member:`configure_c_stdio `" +msgstr "" + +msgid "``\"configure_locale\"``" +msgstr "" + +msgid ":c:member:`configure_locale `" +msgstr "" + +msgid "``\"cpu_count\"``" +msgstr "" + +msgid ":c:member:`cpu_count `" +msgstr "" + +msgid "``\"dev_mode\"``" +msgstr "" + +msgid ":c:member:`dev_mode `" +msgstr "" + +msgid "``\"dump_refs\"``" +msgstr "" + +msgid ":c:member:`dump_refs `" +msgstr "" + +msgid "``\"dump_refs_file\"``" +msgstr "" + +msgid ":c:member:`dump_refs_file `" +msgstr "" + +msgid "``\"exec_prefix\"``" +msgstr "" + +msgid ":c:member:`exec_prefix `" +msgstr "" + +msgid "``\"executable\"``" +msgstr "" + +msgid ":c:member:`executable `" +msgstr "" + +msgid "``\"faulthandler\"``" +msgstr "" + +msgid ":c:member:`faulthandler `" +msgstr "" + +msgid "``\"filesystem_encoding\"``" +msgstr "" + +msgid ":c:member:`filesystem_encoding `" +msgstr "" + +msgid "``\"filesystem_errors\"``" +msgstr "" + +msgid ":c:member:`filesystem_errors `" +msgstr "" + +msgid "``\"hash_seed\"``" +msgstr "" + +msgid ":c:member:`hash_seed `" +msgstr "" + +msgid "``\"home\"``" +msgstr "" + +msgid ":c:member:`home `" +msgstr "" + +msgid "``\"import_time\"``" +msgstr "" + +msgid ":c:member:`import_time `" +msgstr "" + +msgid "``\"inspect\"``" +msgstr "" + +msgid ":c:member:`inspect `" +msgstr "" + +msgid "``\"install_signal_handlers\"``" +msgstr "" + +msgid ":c:member:`install_signal_handlers `" +msgstr "" + +msgid "``\"int_max_str_digits\"``" +msgstr "" + +msgid ":c:member:`int_max_str_digits `" +msgstr "" + +msgid "``\"interactive\"``" +msgstr "" + +msgid ":c:member:`interactive `" +msgstr "" + +msgid "``\"isolated\"``" +msgstr "" + +msgid ":c:member:`isolated `" +msgstr "" + +msgid "``\"legacy_windows_fs_encoding\"``" +msgstr "" + +msgid "" +":c:member:`legacy_windows_fs_encoding `" +msgstr "" + +msgid "``\"legacy_windows_stdio\"``" +msgstr "" + +msgid ":c:member:`legacy_windows_stdio `" +msgstr "" + +msgid "``\"malloc_stats\"``" +msgstr "" + +msgid ":c:member:`malloc_stats `" +msgstr "" + +msgid "``\"module_search_paths\"``" +msgstr "" + +msgid ":c:member:`module_search_paths `" +msgstr "" + +msgid "``\"optimization_level\"``" +msgstr "" + +msgid ":c:member:`optimization_level `" +msgstr "" + +msgid "``\"orig_argv\"``" +msgstr "" + +msgid ":c:member:`orig_argv `" +msgstr "" + +msgid "``\"parse_argv\"``" +msgstr "" + +msgid ":c:member:`parse_argv `" +msgstr "" + +msgid "``\"parser_debug\"``" +msgstr "" + +msgid ":c:member:`parser_debug `" +msgstr "" + +msgid "``\"pathconfig_warnings\"``" +msgstr "" + +msgid ":c:member:`pathconfig_warnings `" +msgstr "" + +msgid "``\"perf_profiling\"``" +msgstr "" + +msgid ":c:member:`perf_profiling `" +msgstr "" + +msgid "``\"platlibdir\"``" +msgstr "" + +msgid ":c:member:`platlibdir `" +msgstr "" + +msgid "``\"prefix\"``" +msgstr "" + +msgid ":c:member:`prefix `" +msgstr "" + +msgid "``\"program_name\"``" +msgstr "" + +msgid ":c:member:`program_name `" +msgstr "" + +msgid "``\"pycache_prefix\"``" +msgstr "" + +msgid ":c:member:`pycache_prefix `" +msgstr "" + +msgid "``\"quiet\"``" +msgstr "" + +msgid ":c:member:`quiet `" +msgstr "" + +msgid "``\"run_command\"``" +msgstr "" + +msgid ":c:member:`run_command `" +msgstr "" + +msgid "``\"run_filename\"``" +msgstr "" + +msgid ":c:member:`run_filename `" +msgstr "" + +msgid "``\"run_module\"``" +msgstr "" + +msgid ":c:member:`run_module `" +msgstr "" + +msgid "``\"run_presite\"``" +msgstr "" + +msgid ":c:member:`run_presite `" +msgstr "" + +msgid "``\"safe_path\"``" +msgstr "" + +msgid ":c:member:`safe_path `" +msgstr "" + +msgid "``\"show_ref_count\"``" +msgstr "" + +msgid ":c:member:`show_ref_count `" +msgstr "" + +msgid "``\"site_import\"``" +msgstr "" + +msgid ":c:member:`site_import `" +msgstr "" + +msgid "``\"skip_source_first_line\"``" +msgstr "" + +msgid ":c:member:`skip_source_first_line `" +msgstr "" + +msgid "``\"stdio_encoding\"``" +msgstr "" + +msgid ":c:member:`stdio_encoding `" +msgstr "" + +msgid "``\"stdio_errors\"``" +msgstr "" + +msgid ":c:member:`stdio_errors `" +msgstr "" + +msgid "``\"stdlib_dir\"``" +msgstr "" + +msgid ":c:member:`stdlib_dir `" +msgstr "" + +msgid "``\"tracemalloc\"``" +msgstr "" + +msgid ":c:member:`tracemalloc `" +msgstr "" + +msgid "``\"use_environment\"``" +msgstr "" + +msgid ":c:member:`use_environment `" +msgstr "" + +msgid "``\"use_frozen_modules\"``" +msgstr "" + +msgid ":c:member:`use_frozen_modules `" +msgstr "" + +msgid "``\"use_hash_seed\"``" +msgstr "" + +msgid ":c:member:`use_hash_seed `" +msgstr "" + +msgid "``\"use_system_logger\"``" +msgstr "" + +msgid ":c:member:`use_system_logger `" +msgstr "" + +msgid "``\"user_site_directory\"``" +msgstr "" + +msgid ":c:member:`user_site_directory `" +msgstr "" + +msgid "``\"utf8_mode\"``" +msgstr "" + +msgid ":c:member:`utf8_mode `" +msgstr "" + +msgid "``\"verbose\"``" +msgstr "" + +msgid ":c:member:`verbose `" +msgstr "" + +msgid "``\"warn_default_encoding\"``" +msgstr "" + +msgid ":c:member:`warn_default_encoding `" +msgstr "" + +msgid "``\"warnoptions\"``" +msgstr "" + +msgid ":c:member:`warnoptions `" +msgstr "" + +msgid "``\"write_bytecode\"``" +msgstr "" + +msgid ":c:member:`write_bytecode `" +msgstr "" + +msgid "``\"xoptions\"``" +msgstr "" + +msgid ":c:member:`xoptions `" +msgstr "" + +msgid "``dict[str, str]``" +msgstr "" + +msgid "``\"_pystats\"``" +msgstr "" + +msgid ":c:member:`_pystats `" +msgstr "" + +msgid "Visibility:" +msgstr "" + +msgid "" +"Public: Can be retrieved by :c:func:`PyConfig_Get` and set by :c:func:" +"`PyConfig_Set`." +msgstr "" + +msgid "" +"Read-only: Can be retrieved by :c:func:`PyConfig_Get`, but cannot be set by :" +"c:func:`PyConfig_Set`." +msgstr "" + +msgid "Runtime Python configuration API" +msgstr "" + +msgid "" +"At runtime, it's possible to get and set configuration options using :c:func:" +"`PyConfig_Get` and :c:func:`PyConfig_Set` functions." +msgstr "" + +msgid "" +"Some options are read from the :mod:`sys` attributes. For example, the " +"option ``\"argv\"`` is read from :data:`sys.argv`." +msgstr "" + +msgid "" +"Get the current runtime value of a configuration option as a Python object." +msgstr "" + +msgid "Return a new reference on success." +msgstr "" + +msgid "Set an exception and return ``NULL`` on error." +msgstr "" + +msgid "The object type depends on the configuration option. It can be:" +msgstr "" + +msgid "" +"The caller must have an :term:`attached thread state`. The function cannot " +"be called before Python initialization nor after Python finalization." +msgstr "" + +msgid "Similar to :c:func:`PyConfig_Get`, but get the value as a C int." +msgstr "" + +msgid "Set an exception and return ``-1`` on error." +msgstr "" + +msgid "Get all configuration option names as a ``frozenset``." +msgstr "" + +msgid "Set the current runtime value of a configuration option." +msgstr "" + +msgid "Raise a :exc:`ValueError` if there is no option *name*." +msgstr "" + +msgid "Raise a :exc:`ValueError` if *value* is an invalid value." +msgstr "" + +msgid "Raise a :exc:`ValueError` if the option is read-only (cannot be set)." +msgstr "" + +msgid "Raise a :exc:`TypeError` if *value* has not the proper type." +msgstr "" + +msgid "" +"Raises an :ref:`auditing event ` ``cpython.PyConfig_Set`` with " +"arguments ``name``, ``value``." +msgstr "" + +msgid "" +"The function now replaces :data:`sys.flags` (create a new object), instead " +"of modifying :data:`sys.flags` in-place." +msgstr "" + +msgid "PyConfig C API" +msgstr "" + +msgid "" +"Python can be initialized with :c:func:`Py_InitializeFromConfig` and the :c:" +"type:`PyConfig` structure. It can be preinitialized with :c:func:" +"`Py_PreInitialize` and the :c:type:`PyPreConfig` structure." +msgstr "" + +msgid "There are two kinds of configuration:" +msgstr "" + +msgid "" +"The :ref:`Python Configuration ` can be used to build a " +"customized Python which behaves as the regular Python. For example, " +"environment variables and command line arguments are used to configure " +"Python." +msgstr "" + +msgid "" +"The :ref:`Isolated Configuration ` can be used to embed " +"Python into an application. It isolates Python from the system. For example, " +"environment variables are ignored, the LC_CTYPE locale is left unchanged and " +"no signal handler is registered." +msgstr "" + +msgid ":pep:`587` \"Python Initialization Configuration\"." +msgstr "" + +msgid "Example of customized Python always running in isolated mode::" +msgstr "" + +msgid "" +"int main(int argc, char **argv)\n" +"{\n" +" PyStatus status;\n" +"\n" +" PyConfig config;\n" +" PyConfig_InitPythonConfig(&config);\n" +" config.isolated = 1;\n" +"\n" +" /* Decode command line arguments.\n" +" Implicitly preinitialize Python (in isolated mode). */\n" +" status = PyConfig_SetBytesArgv(&config, argc, argv);\n" +" if (PyStatus_Exception(status)) {\n" +" goto exception;\n" +" }\n" +"\n" +" status = Py_InitializeFromConfig(&config);\n" +" if (PyStatus_Exception(status)) {\n" +" goto exception;\n" +" }\n" +" PyConfig_Clear(&config);\n" +"\n" +" return Py_RunMain();\n" +"\n" +"exception:\n" +" PyConfig_Clear(&config);\n" +" if (PyStatus_IsExit(status)) {\n" +" return status.exitcode;\n" +" }\n" +" /* Display the error message and exit the process with\n" +" non-zero exit code */\n" +" Py_ExitStatusException(status);\n" +"}" +msgstr "" + +msgid "PyWideStringList" +msgstr "" + +msgid "List of ``wchar_t*`` strings." +msgstr "" + +msgid "" +"If *length* is non-zero, *items* must be non-``NULL`` and all strings must " +"be non-``NULL``." +msgstr "" + +msgid "Methods:" +msgstr "" + +msgid "Append *item* to *list*." +msgstr "" + +msgid "Python must be preinitialized to call this function." +msgstr "" + +msgid "Insert *item* into *list* at *index*." +msgstr "" + +msgid "" +"If *index* is greater than or equal to *list* length, append *item* to " +"*list*." +msgstr "" + +msgid "*index* must be greater than or equal to ``0``." +msgstr "" + +msgid "Structure fields:" +msgstr "" + +msgid "List length." +msgstr "" + +msgid "List items." +msgstr "" + +msgid "PyStatus" +msgstr "" + +msgid "" +"Structure to store an initialization function status: success, error or exit." +msgstr "" + +msgid "For an error, it can store the C function name which created the error." +msgstr "" + +msgid "Exit code. Argument passed to ``exit()``." +msgstr "" + +msgid "Error message." +msgstr "" + +msgid "Name of the function which created an error, can be ``NULL``." +msgstr "" + +msgid "Functions to create a status:" +msgstr "" + +msgid "Success." +msgstr "" + +msgid "Initialization error with a message." +msgstr "" + +msgid "*err_msg* must not be ``NULL``." +msgstr "" + +msgid "Memory allocation failure (out of memory)." +msgstr "" + +msgid "Exit Python with the specified exit code." +msgstr "" + +msgid "Functions to handle a status:" +msgstr "" + +msgid "" +"Is the status an error or an exit? If true, the exception must be handled; " +"by calling :c:func:`Py_ExitStatusException` for example." +msgstr "" + +msgid "Is the result an error?" +msgstr "" + +msgid "Is the result an exit?" +msgstr "" + +msgid "" +"Call ``exit(exitcode)`` if *status* is an exit. Print the error message and " +"exit with a non-zero exit code if *status* is an error. Must only be called " +"if ``PyStatus_Exception(status)`` is non-zero." +msgstr "" + +msgid "" +"Internally, Python uses macros which set ``PyStatus.func``, whereas " +"functions to create a status set ``func`` to ``NULL``." +msgstr "" + +msgid "Example::" +msgstr "" + +msgid "" +"PyStatus alloc(void **ptr, size_t size)\n" +"{\n" +" *ptr = PyMem_RawMalloc(size);\n" +" if (*ptr == NULL) {\n" +" return PyStatus_NoMemory();\n" +" }\n" +" return PyStatus_Ok();\n" +"}\n" +"\n" +"int main(int argc, char **argv)\n" +"{\n" +" void *ptr;\n" +" PyStatus status = alloc(&ptr, 16);\n" +" if (PyStatus_Exception(status)) {\n" +" Py_ExitStatusException(status);\n" +" }\n" +" PyMem_Free(ptr);\n" +" return 0;\n" +"}" +msgstr "" + +msgid "PyPreConfig" +msgstr "" + +msgid "Structure used to preinitialize Python." +msgstr "" + +msgid "Function to initialize a preconfiguration:" +msgstr "" + +msgid "" +"Initialize the preconfiguration with :ref:`Python Configuration `." +msgstr "" + +msgid "" +"Initialize the preconfiguration with :ref:`Isolated Configuration `." +msgstr "" + +msgid "Name of the Python memory allocators:" +msgstr "" + +msgid "" +"``PYMEM_ALLOCATOR_NOT_SET`` (``0``): don't change memory allocators (use " +"defaults)." +msgstr "" + +msgid "" +"``PYMEM_ALLOCATOR_DEFAULT`` (``1``): :ref:`default memory allocators " +"`." +msgstr "" + +msgid "" +"``PYMEM_ALLOCATOR_DEBUG`` (``2``): :ref:`default memory allocators ` with :ref:`debug hooks `." +msgstr "" + +msgid "``PYMEM_ALLOCATOR_MALLOC`` (``3``): use ``malloc()`` of the C library." +msgstr "" + +msgid "" +"``PYMEM_ALLOCATOR_MALLOC_DEBUG`` (``4``): force usage of ``malloc()`` with :" +"ref:`debug hooks `." +msgstr "" + +msgid "" +"``PYMEM_ALLOCATOR_PYMALLOC`` (``5``): :ref:`Python pymalloc memory allocator " +"`." +msgstr "" + +msgid "" +"``PYMEM_ALLOCATOR_PYMALLOC_DEBUG`` (``6``): :ref:`Python pymalloc memory " +"allocator ` with :ref:`debug hooks `." +msgstr "" + +msgid "" +"``PYMEM_ALLOCATOR_MIMALLOC`` (``6``): use ``mimalloc``, a fast malloc " +"replacement." +msgstr "" + +msgid "" +"``PYMEM_ALLOCATOR_MIMALLOC_DEBUG`` (``7``): use ``mimalloc``, a fast malloc " +"replacement with :ref:`debug hooks `." +msgstr "" + +msgid "" +"``PYMEM_ALLOCATOR_PYMALLOC`` and ``PYMEM_ALLOCATOR_PYMALLOC_DEBUG`` are not " +"supported if Python is :option:`configured using --without-pymalloc <--" +"without-pymalloc>`." +msgstr "" + +msgid "" +"``PYMEM_ALLOCATOR_MIMALLOC`` and ``PYMEM_ALLOCATOR_MIMALLOC_DEBUG`` are not " +"supported if Python is :option:`configured using --without-mimalloc <--" +"without-mimalloc>` or if the underlying atomic support isn't available." +msgstr "" + +msgid "See :ref:`Memory Management `." +msgstr "" + +msgid "Default: ``PYMEM_ALLOCATOR_NOT_SET``." +msgstr "" + +msgid "Set the LC_CTYPE locale to the user preferred locale." +msgstr "" + +msgid "" +"If equals to ``0``, set :c:member:`~PyPreConfig.coerce_c_locale` and :c:" +"member:`~PyPreConfig.coerce_c_locale_warn` members to ``0``." +msgstr "" + +msgid "See the :term:`locale encoding`." +msgstr "" + +msgid "Default: ``1`` in Python config, ``0`` in isolated config." +msgstr "" + +msgid "If equals to ``2``, coerce the C locale." +msgstr "" + +msgid "" +"If equals to ``1``, read the LC_CTYPE locale to decide if it should be " +"coerced." +msgstr "" + +msgid "Default: ``-1`` in Python config, ``0`` in isolated config." +msgstr "" + +msgid "If non-zero, emit a warning if the C locale is coerced." +msgstr "" + +msgid "" +":ref:`Python Development Mode `: see :c:member:`PyConfig.dev_mode`." +msgstr "" + +msgid "Default: ``-1`` in Python mode, ``0`` in isolated mode." +msgstr "" + +msgid "Isolated mode: see :c:member:`PyConfig.isolated`." +msgstr "" + +msgid "Default: ``0`` in Python mode, ``1`` in isolated mode." +msgstr "" + +msgid "If non-zero:" +msgstr "" + +msgid "Set :c:member:`PyPreConfig.utf8_mode` to ``0``," +msgstr "" + +msgid "Set :c:member:`PyConfig.filesystem_encoding` to ``\"mbcs\"``," +msgstr "" + +msgid "Set :c:member:`PyConfig.filesystem_errors` to ``\"replace\"``." +msgstr "" + +msgid "" +"Initialized from the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` environment " +"variable value." +msgstr "" + +msgid "" +"Only available on Windows. ``#ifdef MS_WINDOWS`` macro can be used for " +"Windows specific code." +msgstr "" + +msgid "Default: ``0``." +msgstr "" + +msgid "" +"If non-zero, :c:func:`Py_PreInitializeFromArgs` and :c:func:" +"`Py_PreInitializeFromBytesArgs` parse their ``argv`` argument the same way " +"the regular Python parses command line arguments: see :ref:`Command Line " +"Arguments `." +msgstr "" + +msgid "" +"Use :ref:`environment variables `? See :c:member:`PyConfig." +"use_environment`." +msgstr "" + +msgid "Default: ``1`` in Python config and ``0`` in isolated config." +msgstr "" + +msgid "If non-zero, enable the :ref:`Python UTF-8 Mode `." +msgstr "" + +msgid "" +"Set to ``0`` or ``1`` by the :option:`-X utf8 <-X>` command line option and " +"the :envvar:`PYTHONUTF8` environment variable." +msgstr "" + +msgid "Default: ``1``." +msgstr "" + +msgid "Preinitialize Python with PyPreConfig" +msgstr "" + +msgid "The preinitialization of Python:" +msgstr "" + +msgid "Set the Python memory allocators (:c:member:`PyPreConfig.allocator`)" +msgstr "" + +msgid "Configure the LC_CTYPE locale (:term:`locale encoding`)" +msgstr "" + +msgid "" +"Set the :ref:`Python UTF-8 Mode ` (:c:member:`PyPreConfig." +"utf8_mode`)" +msgstr "" + +msgid "" +"The current preconfiguration (``PyPreConfig`` type) is stored in " +"``_PyRuntime.preconfig``." +msgstr "" + +msgid "Functions to preinitialize Python:" +msgstr "" + +msgid "Preinitialize Python from *preconfig* preconfiguration." +msgstr "" + +msgid "*preconfig* must not be ``NULL``." +msgstr "" + +msgid "" +"Parse *argv* command line arguments (bytes strings) if :c:member:" +"`~PyPreConfig.parse_argv` of *preconfig* is non-zero." +msgstr "" + +msgid "" +"Parse *argv* command line arguments (wide strings) if :c:member:" +"`~PyPreConfig.parse_argv` of *preconfig* is non-zero." +msgstr "" + +msgid "" +"The caller is responsible to handle exceptions (error or exit) using :c:func:" +"`PyStatus_Exception` and :c:func:`Py_ExitStatusException`." +msgstr "" + +msgid "" +"For :ref:`Python Configuration ` (:c:func:" +"`PyPreConfig_InitPythonConfig`), if Python is initialized with command line " +"arguments, the command line arguments must also be passed to preinitialize " +"Python, since they have an effect on the pre-configuration like encodings. " +"For example, the :option:`-X utf8 <-X>` command line option enables the :ref:" +"`Python UTF-8 Mode `." +msgstr "" + +msgid "" +"``PyMem_SetAllocator()`` can be called after :c:func:`Py_PreInitialize` and " +"before :c:func:`Py_InitializeFromConfig` to install a custom memory " +"allocator. It can be called before :c:func:`Py_PreInitialize` if :c:member:" +"`PyPreConfig.allocator` is set to ``PYMEM_ALLOCATOR_NOT_SET``." +msgstr "" + +msgid "" +"Python memory allocation functions like :c:func:`PyMem_RawMalloc` must not " +"be used before the Python preinitialization, whereas calling directly " +"``malloc()`` and ``free()`` is always safe. :c:func:`Py_DecodeLocale` must " +"not be called before the Python preinitialization." +msgstr "" + +msgid "" +"Example using the preinitialization to enable the :ref:`Python UTF-8 Mode " +"`::" +msgstr "" + +msgid "" +"PyStatus status;\n" +"PyPreConfig preconfig;\n" +"PyPreConfig_InitPythonConfig(&preconfig);\n" +"\n" +"preconfig.utf8_mode = 1;\n" +"\n" +"status = Py_PreInitialize(&preconfig);\n" +"if (PyStatus_Exception(status)) {\n" +" Py_ExitStatusException(status);\n" +"}\n" +"\n" +"/* at this point, Python speaks UTF-8 */\n" +"\n" +"Py_Initialize();\n" +"/* ... use Python API here ... */\n" +"Py_Finalize();" +msgstr "" + +msgid "PyConfig" +msgstr "" + +msgid "Structure containing most parameters to configure Python." +msgstr "" + +msgid "" +"When done, the :c:func:`PyConfig_Clear` function must be used to release the " +"configuration memory." +msgstr "" + +msgid "Structure methods:" +msgstr "" + +msgid "" +"Initialize configuration with the :ref:`Python Configuration `." +msgstr "" + +msgid "" +"Initialize configuration with the :ref:`Isolated Configuration `." +msgstr "" + +msgid "Copy the wide character string *str* into ``*config_str``." +msgstr "" + +msgid ":ref:`Preinitialize Python ` if needed." +msgstr "" + +msgid "" +"Decode *str* using :c:func:`Py_DecodeLocale` and set the result into " +"``*config_str``." +msgstr "" + +msgid "" +"Set command line arguments (:c:member:`~PyConfig.argv` member of *config*) " +"from the *argv* list of wide character strings." +msgstr "" + +msgid "" +"Set command line arguments (:c:member:`~PyConfig.argv` member of *config*) " +"from the *argv* list of bytes strings. Decode bytes using :c:func:" +"`Py_DecodeLocale`." +msgstr "" + +msgid "Set the list of wide strings *list* to *length* and *items*." +msgstr "" + +msgid "Read all Python configuration." +msgstr "" + +msgid "Fields which are already initialized are left unchanged." +msgstr "" + +msgid "" +"Fields for :ref:`path configuration ` are no longer " +"calculated or modified when calling this function, as of Python 3.11." +msgstr "" + +msgid "" +"The :c:func:`PyConfig_Read` function only parses :c:member:`PyConfig.argv` " +"arguments once: :c:member:`PyConfig.parse_argv` is set to ``2`` after " +"arguments are parsed. Since Python arguments are stripped from :c:member:" +"`PyConfig.argv`, parsing arguments twice would parse the application options " +"as Python options." +msgstr "" + +msgid "" +"The :c:member:`PyConfig.argv` arguments are now only parsed once, :c:member:" +"`PyConfig.parse_argv` is set to ``2`` after arguments are parsed, and " +"arguments are only parsed if :c:member:`PyConfig.parse_argv` equals ``1``." +msgstr "" + +msgid "" +":c:func:`PyConfig_Read` no longer calculates all paths, and so fields listed " +"under :ref:`Python Path Configuration ` may no longer be " +"updated until :c:func:`Py_InitializeFromConfig` is called." +msgstr "" + +msgid "Release configuration memory." +msgstr "" + +msgid "" +"Most ``PyConfig`` methods :ref:`preinitialize Python ` if needed. " +"In that case, the Python preinitialization configuration (:c:type:" +"`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 "" + +msgid ":c:member:`PyConfig.dev_mode`" +msgstr "" + +msgid ":c:member:`PyConfig.isolated`" +msgstr "" + +msgid ":c:member:`PyConfig.parse_argv`" +msgstr "" + +msgid ":c:member:`PyConfig.use_environment`" +msgstr "" + +msgid "" +"Moreover, if :c:func:`PyConfig_SetArgv` or :c:func:`PyConfig_SetBytesArgv` " +"is used, this method must be called before other methods, since the " +"preinitialization configuration depends on command line arguments (if :c:" +"member:`~PyConfig.parse_argv` is non-zero)." +msgstr "" + +msgid "" +"The caller of these methods is responsible to handle exceptions (error or " +"exit) using ``PyStatus_Exception()`` and ``Py_ExitStatusException()``." +msgstr "" + +msgid "" +"Set :data:`sys.argv` command line arguments based on :c:member:`~PyConfig." +"argv`. These parameters are similar to those passed to the program's :c:" +"func:`main` function with the difference that the first entry should refer " +"to the script file to be executed rather than the executable hosting the " +"Python interpreter. If there isn't a script that will be run, the first " +"entry in :c:member:`~PyConfig.argv` can be an empty string." +msgstr "" + +msgid "" +"Set :c:member:`~PyConfig.parse_argv` to ``1`` to parse :c:member:`~PyConfig." +"argv` the same way the regular Python parses Python command line arguments " +"and then to strip Python arguments from :c:member:`~PyConfig.argv`." +msgstr "" + +msgid "" +"If :c:member:`~PyConfig.argv` is empty, an empty string is added to ensure " +"that :data:`sys.argv` always exists and is never empty." +msgstr "" + +msgid "Default: ``NULL``." +msgstr "" + +msgid "See also the :c:member:`~PyConfig.orig_argv` member." +msgstr "" + +msgid "" +"If equals to zero, ``Py_RunMain()`` prepends a potentially unsafe path to :" +"data:`sys.path` at startup:" +msgstr "" + +msgid "" +"If :c:member:`argv[0] ` is equal to ``L\"-m\"`` (``python -m " +"module``), prepend the current working directory." +msgstr "" + +msgid "" +"If running a script (``python script.py``), prepend the script's directory. " +"If it's a symbolic link, resolve symbolic links." +msgstr "" + +msgid "" +"Otherwise (``python -c code`` and ``python``), prepend an empty string, " +"which means the current working directory." +msgstr "" + +msgid "" +"Set to ``1`` by the :option:`-P` command line option and the :envvar:" +"`PYTHONSAFEPATH` environment variable." +msgstr "" + +msgid "Default: ``0`` in Python config, ``1`` in isolated config." +msgstr "" + +msgid ":data:`sys.base_exec_prefix`." +msgstr "" + +msgid "Part of the :ref:`Python Path Configuration ` output." +msgstr "" + +msgid "See also :c:member:`PyConfig.exec_prefix`." +msgstr "" + +msgid "Python base executable: :data:`sys._base_executable`." +msgstr "" + +msgid "Set by the :envvar:`__PYVENV_LAUNCHER__` environment variable." +msgstr "" + +msgid "Set from :c:member:`PyConfig.executable` if ``NULL``." +msgstr "" + +msgid "See also :c:member:`PyConfig.executable`." +msgstr "" + +msgid ":data:`sys.base_prefix`." +msgstr "" + +msgid "See also :c:member:`PyConfig.prefix`." +msgstr "" + +msgid "" +"If equals to ``0`` and :c:member:`~PyConfig.configure_c_stdio` is non-zero, " +"disable buffering on the C streams stdout and stderr." +msgstr "" + +msgid "" +"Set to ``0`` by the :option:`-u` command line option and the :envvar:" +"`PYTHONUNBUFFERED` environment variable." +msgstr "" + +msgid "stdin is always opened in buffered mode." +msgstr "" + +msgid "" +"If equals to ``1``, issue a warning when comparing :class:`bytes` or :class:" +"`bytearray` with :class:`str`, or comparing :class:`bytes` with :class:`int`." +msgstr "" + +msgid "" +"If equal or greater to ``2``, raise a :exc:`BytesWarning` exception in these " +"cases." +msgstr "" + +msgid "Incremented by the :option:`-b` command line option." +msgstr "" + +msgid "" +"The :option:`-b` and :option:`!-bb` options will become no-op in 3.17. :c:" +"member:`~PyConfig.bytes_warning` member will be removed in 3.17." +msgstr "" + +msgid "" +"If non-zero, emit a :exc:`EncodingWarning` warning when :class:`io." +"TextIOWrapper` uses its default encoding. See :ref:`io-encoding-warning` for " +"details." +msgstr "" + +msgid "" +"If equals to ``0``, disables the inclusion of the end line and column " +"mappings in code objects. Also disables traceback printing carets to " +"specific error locations." +msgstr "" + +msgid "" +"Set to ``0`` by the :envvar:`PYTHONNODEBUGRANGES` environment variable and " +"by the :option:`-X no_debug_ranges <-X>` command line option." +msgstr "" + +msgid "" +"Control the validation behavior of hash-based ``.pyc`` files: value of the :" +"option:`--check-hash-based-pycs` command line option." +msgstr "" + +msgid "Valid values:" +msgstr "" + +msgid "" +"``L\"always\"``: Hash the source file for invalidation regardless of value " +"of the 'check_source' flag." +msgstr "" + +msgid "``L\"never\"``: Assume that hash-based pycs always are valid." +msgstr "" + +msgid "" +"``L\"default\"``: The 'check_source' flag in hash-based pycs determines " +"invalidation." +msgstr "" + +msgid "Default: ``L\"default\"``." +msgstr "" + +msgid "See also :pep:`552` \"Deterministic pycs\"." +msgstr "" + +msgid "If non-zero, configure C standard streams:" +msgstr "" + +msgid "" +"On Windows, set the binary mode (``O_BINARY``) on stdin, stdout and stderr." +msgstr "" + +msgid "" +"If :c:member:`~PyConfig.buffered_stdio` equals zero, disable buffering of " +"stdin, stdout and stderr streams." +msgstr "" + +msgid "" +"If :c:member:`~PyConfig.interactive` is non-zero, enable stream buffering on " +"stdin and stdout (only stdout on Windows)." +msgstr "" + +msgid "If non-zero, enable the :ref:`Python Development Mode `." +msgstr "" + +msgid "" +"Set to ``1`` by the :option:`-X dev <-X>` option and the :envvar:" +"`PYTHONDEVMODE` environment variable." +msgstr "" + +msgid "Dump Python references?" +msgstr "" + +msgid "If non-zero, dump all objects which are still alive at exit." +msgstr "" + +msgid "Set to ``1`` by the :envvar:`PYTHONDUMPREFS` environment variable." +msgstr "" + +msgid "" +"Needs a special build of Python with the ``Py_TRACE_REFS`` macro defined: " +"see the :option:`configure --with-trace-refs option <--with-trace-refs>`." +msgstr "" + +msgid "Filename where to dump Python references." +msgstr "" + +msgid "Set by the :envvar:`PYTHONDUMPREFSFILE` environment variable." +msgstr "" + +msgid "" +"The site-specific directory prefix where the platform-dependent Python files " +"are installed: :data:`sys.exec_prefix`." +msgstr "" + +msgid "See also :c:member:`PyConfig.base_exec_prefix`." +msgstr "" + +msgid "" +"The absolute path of the executable binary for the Python interpreter: :data:" +"`sys.executable`." +msgstr "" + +msgid "See also :c:member:`PyConfig.base_executable`." +msgstr "" + +msgid "Enable faulthandler?" +msgstr "" + +msgid "If non-zero, call :func:`faulthandler.enable` at startup." +msgstr "" + +msgid "" +"Set to ``1`` by :option:`-X faulthandler <-X>` and the :envvar:" +"`PYTHONFAULTHANDLER` environment variable." +msgstr "" + +msgid "" +":term:`Filesystem encoding `: :func:" +"`sys.getfilesystemencoding`." +msgstr "" + +msgid "On macOS, Android and VxWorks: use ``\"utf-8\"`` by default." +msgstr "" + +msgid "" +"On Windows: use ``\"utf-8\"`` by default, or ``\"mbcs\"`` if :c:member:" +"`~PyPreConfig.legacy_windows_fs_encoding` of :c:type:`PyPreConfig` is non-" +"zero." +msgstr "" + +msgid "Default encoding on other platforms:" +msgstr "" + +msgid "``\"utf-8\"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero." +msgstr "" + +msgid "" +"``\"ascii\"`` if Python detects that ``nl_langinfo(CODESET)`` announces the " +"ASCII encoding, whereas the ``mbstowcs()`` function decodes from a different " +"encoding (usually Latin1)." +msgstr "" + +msgid "``\"utf-8\"`` if ``nl_langinfo(CODESET)`` returns an empty string." +msgstr "" + +msgid "" +"Otherwise, use the :term:`locale encoding`: ``nl_langinfo(CODESET)`` result." +msgstr "" + +msgid "" +"At Python startup, the encoding name is normalized to the Python codec name. " +"For example, ``\"ANSI_X3.4-1968\"`` is replaced with ``\"ascii\"``." +msgstr "" + +msgid "See also the :c:member:`~PyConfig.filesystem_errors` member." +msgstr "" + +msgid "" +":term:`Filesystem error handler `: :" +"func:`sys.getfilesystemencodeerrors`." +msgstr "" + +msgid "" +"On Windows: use ``\"surrogatepass\"`` by default, or ``\"replace\"`` if :c:" +"member:`~PyPreConfig.legacy_windows_fs_encoding` of :c:type:`PyPreConfig` is " +"non-zero." +msgstr "" + +msgid "On other platforms: use ``\"surrogateescape\"`` by default." +msgstr "" + +msgid "Supported error handlers:" +msgstr "" + +msgid "``\"strict\"``" +msgstr "" + +msgid "``\"surrogateescape\"``" +msgstr "" + +msgid "``\"surrogatepass\"`` (only supported with the UTF-8 encoding)" +msgstr "" + +msgid "See also the :c:member:`~PyConfig.filesystem_encoding` member." +msgstr "" + +msgid "If non-zero, use frozen modules." +msgstr "" + +msgid "Set by the :envvar:`PYTHON_FROZEN_MODULES` environment variable." +msgstr "" + +msgid "" +"Default: ``1`` in a release build, or ``0`` in a :ref:`debug build `." +msgstr "" + +msgid "Randomized hash function seed." +msgstr "" + +msgid "" +"If :c:member:`~PyConfig.use_hash_seed` is zero, a seed is chosen randomly at " +"Python startup, and :c:member:`~PyConfig.hash_seed` is ignored." +msgstr "" + +msgid "Set by the :envvar:`PYTHONHASHSEED` environment variable." +msgstr "" + +msgid "" +"Default *use_hash_seed* value: ``-1`` in Python mode, ``0`` in isolated mode." +msgstr "" + +msgid "" +"Set the default Python \"home\" directory, that is, the location of the " +"standard Python libraries (see :envvar:`PYTHONHOME`)." +msgstr "" + +msgid "Set by the :envvar:`PYTHONHOME` environment variable." +msgstr "" + +msgid "Part of the :ref:`Python Path Configuration ` input." +msgstr "" + +msgid "" +"If ``1``, profile import time. If ``2``, include additional output that " +"indicates when an imported module has already been loaded." +msgstr "" + +msgid "" +"Set by the :option:`-X importtime <-X>` option and the :envvar:" +"`PYTHONPROFILEIMPORTTIME` environment variable." +msgstr "" + +msgid "Added support for ``import_time = 2``" +msgstr "" + +msgid "Enter interactive mode after executing a script or a command." +msgstr "" + +msgid "" +"If greater than ``0``, enable inspect: when a script is passed as first " +"argument or the -c option is used, enter interactive mode after executing " +"the script or the command, even when :data:`sys.stdin` does not appear to be " +"a terminal." +msgstr "" + +msgid "" +"Incremented by the :option:`-i` command line option. Set to ``1`` if the :" +"envvar:`PYTHONINSPECT` environment variable is non-empty." +msgstr "" + +msgid "Install Python signal handlers?" +msgstr "" + +msgid "Default: ``1`` in Python mode, ``0`` in isolated mode." +msgstr "" + +msgid "If greater than ``0``, enable the interactive mode (REPL)." +msgstr "" + +msgid "Incremented by the :option:`-i` command line option." +msgstr "" + +msgid "" +"Configures the :ref:`integer string conversion length limitation " +"`. An initial value of ``-1`` means the value will be " +"taken from the command line or environment or otherwise default to 4300 (:" +"data:`sys.int_info.default_max_str_digits`). A value of ``0`` disables the " +"limitation. Values greater than zero but less than 640 (:data:`sys.int_info." +"str_digits_check_threshold`) are unsupported and will produce an error." +msgstr "" + +msgid "" +"Configured by the :option:`-X int_max_str_digits <-X>` command line flag or " +"the :envvar:`PYTHONINTMAXSTRDIGITS` environment variable." +msgstr "" + +msgid "" +"Default: ``-1`` in Python mode. 4300 (:data:`sys.int_info." +"default_max_str_digits`) in isolated mode." +msgstr "" + +msgid "" +"If the value of :c:member:`~PyConfig.cpu_count` is not ``-1`` then it will " +"override the return values of :func:`os.cpu_count`, :func:`os." +"process_cpu_count`, and :func:`multiprocessing.cpu_count`." +msgstr "" + +msgid "" +"Configured by the :samp:`-X cpu_count={n|default}` command line flag or the :" +"envvar:`PYTHON_CPU_COUNT` environment variable." +msgstr "" + +msgid "Default: ``-1``." +msgstr "" + +msgid "If greater than ``0``, enable isolated mode:" +msgstr "" + +msgid "" +"Set :c:member:`~PyConfig.safe_path` to ``1``: don't prepend a potentially " +"unsafe path to :data:`sys.path` at Python startup, such as the current " +"directory, the script's directory or an empty string." +msgstr "" + +msgid "" +"Set :c:member:`~PyConfig.use_environment` to ``0``: ignore ``PYTHON`` " +"environment variables." +msgstr "" + +msgid "" +"Set :c:member:`~PyConfig.user_site_directory` to ``0``: don't add the user " +"site directory to :data:`sys.path`." +msgstr "" + +msgid "" +"Python REPL doesn't import :mod:`readline` nor enable default readline " +"configuration on interactive prompts." +msgstr "" + +msgid "Set to ``1`` by the :option:`-I` command line option." +msgstr "" + +msgid "" +"See also the :ref:`Isolated Configuration ` and :c:" +"member:`PyPreConfig.isolated`." +msgstr "" + +msgid "" +"If non-zero, use :class:`io.FileIO` instead of :class:`!io." +"_WindowsConsoleIO` for :data:`sys.stdin`, :data:`sys.stdout` and :data:`sys." +"stderr`." +msgstr "" + +msgid "" +"Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSSTDIO` environment variable " +"is set to a non-empty string." +msgstr "" + +msgid "See also the :pep:`528` (Change Windows console encoding to UTF-8)." +msgstr "" + +msgid "" +"If non-zero, dump statistics on :ref:`Python pymalloc memory allocator " +"` at exit." +msgstr "" + +msgid "Set to ``1`` by the :envvar:`PYTHONMALLOCSTATS` environment variable." +msgstr "" + +msgid "" +"The option is ignored if Python is :option:`configured using the --without-" +"pymalloc option <--without-pymalloc>`." +msgstr "" + +msgid "Platform library directory name: :data:`sys.platlibdir`." +msgstr "" + +msgid "Set by the :envvar:`PYTHONPLATLIBDIR` environment variable." +msgstr "" + +msgid "" +"Default: value of the ``PLATLIBDIR`` macro which is set by the :option:" +"`configure --with-platlibdir option <--with-platlibdir>` (default: " +"``\"lib\"``, or ``\"DLLs\"`` on Windows)." +msgstr "" + +msgid "" +"This macro is now used on Windows to locate the standard library extension " +"modules, typically under ``DLLs``. However, for compatibility, note that " +"this value is ignored for any non-standard layouts, including in-tree builds " +"and virtual environments." +msgstr "" + +msgid "" +"Module search paths (:data:`sys.path`) as a string separated by ``DELIM`` (:" +"data:`os.pathsep`)." +msgstr "" + +msgid "Set by the :envvar:`PYTHONPATH` environment variable." +msgstr "" + +msgid "Module search paths: :data:`sys.path`." +msgstr "" + +msgid "" +"If :c:member:`~PyConfig.module_search_paths_set` is equal to ``0``, :c:func:" +"`Py_InitializeFromConfig` will replace :c:member:`~PyConfig." +"module_search_paths` and sets :c:member:`~PyConfig.module_search_paths_set` " +"to ``1``." +msgstr "" + +msgid "" +"Default: empty list (``module_search_paths``) and ``0`` " +"(``module_search_paths_set``)." +msgstr "" + +msgid "Compilation optimization level:" +msgstr "" + +msgid "``0``: Peephole optimizer, set ``__debug__`` to ``True``." +msgstr "" + +msgid "``1``: Level 0, remove assertions, set ``__debug__`` to ``False``." +msgstr "" + +msgid "``2``: Level 1, strip docstrings." +msgstr "" + +msgid "" +"Incremented by the :option:`-O` command line option. Set to the :envvar:" +"`PYTHONOPTIMIZE` environment variable value." +msgstr "" + +msgid "" +"The list of the original command line arguments passed to the Python " +"executable: :data:`sys.orig_argv`." +msgstr "" + +msgid "" +"If :c:member:`~PyConfig.orig_argv` list is empty and :c:member:`~PyConfig." +"argv` is not a list only containing an empty string, :c:func:`PyConfig_Read` " +"copies :c:member:`~PyConfig.argv` into :c:member:`~PyConfig.orig_argv` " +"before modifying :c:member:`~PyConfig.argv` (if :c:member:`~PyConfig." +"parse_argv` is non-zero)." +msgstr "" + +msgid "" +"See also the :c:member:`~PyConfig.argv` member and the :c:func:" +"`Py_GetArgcArgv` function." +msgstr "" + +msgid "Default: empty list." +msgstr "" + +msgid "Parse command line arguments?" +msgstr "" + +msgid "" +"If equals to ``1``, parse :c:member:`~PyConfig.argv` the same way the " +"regular Python parses :ref:`command line arguments